gnome-keyring r1569 - in trunk: . gcr
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-keyring r1569 - in trunk: . gcr
- Date: Fri, 13 Feb 2009 21:31:01 +0000 (UTC)
Author: nnielsen
Date: Fri Feb 13 21:31:01 2009
New Revision: 1569
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1569&view=rev
Log:
Use more readable upper case space delemited hex encoding for the fingerprint.
Modified:
trunk/ChangeLog
trunk/gcr/gcr-certificate.c
Modified: trunk/gcr/gcr-certificate.c
==============================================================================
--- trunk/gcr/gcr-certificate.c (original)
+++ trunk/gcr/gcr-certificate.c Fri Feb 13 21:31:01 2009
@@ -291,14 +291,23 @@
gcr_certificate_get_fingerprint_hex (GcrCertificate *self, GChecksumType type)
{
GChecksum *sum;
+ guchar *digest;
+ gsize n_digest;
+ gssize length;
gchar *hex;
g_return_val_if_fail (GCR_IS_CERTIFICATE (self), NULL);
sum = digest_certificate (self, type);
g_return_val_if_fail (sum, NULL);
- hex = g_strdup (g_checksum_get_string (sum));
+ length = g_checksum_type_get_length (type);
+ g_return_val_if_fail (length > 0, NULL);
+ digest = g_malloc (length);
+ n_digest = length;
+ g_checksum_get_digest (sum, digest, &n_digest);
+ hex = egg_hex_encode_full (digest, n_digest, TRUE, ' ', 1);
g_checksum_free (sum);
+ g_free (digest);
return hex;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]