[seahorse] hkp-source: Prettify the downloaded fingerprint before setting it on the subkey
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] hkp-source: Prettify the downloaded fingerprint before setting it on the subkey
- Date: Tue, 29 Jul 2014 10:02:00 +0000 (UTC)
commit 608a4bed99ebe8989b2b1c369040b1daed33cf40
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Apr 9 17:29:12 2014 -0500
hkp-source: Prettify the downloaded fingerprint before setting it on the subkey
https://bugzilla.gnome.org/show_bug.cgi?id=719872
Signed-off-by: Stef Walter <stefw gnome org>
pgp/seahorse-hkp-source.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/pgp/seahorse-hkp-source.c b/pgp/seahorse-hkp-source.c
index b6b210a..a9bc612 100644
--- a/pgp/seahorse-hkp-source.c
+++ b/pgp/seahorse-hkp-source.c
@@ -408,20 +408,19 @@ parse_hkp_index (const gchar *response)
fingerprint_str = get_fingerprint_string (line);
if (fingerprint_str != NULL) {
- char *str;
+ char *pretty_fingerprint;
- str = g_strdup (fingerprint_str);
- g_strstrip (str);
-
- if (str[0] != 0)
- seahorse_pgp_subkey_set_fingerprint (subkey_with_id, str);
+ pretty_fingerprint = seahorse_pgp_subkey_calc_fingerprint (fingerprint_str);
/* FIXME: we don't check that the fingerprint actually matches the key's ID.
* We also don't validate the fingerprint at all; the keyserver may have
returned
* some garbage and we don't notice.
*/
- g_free (str);
+ if (pretty_fingerprint[0] != 0)
+ seahorse_pgp_subkey_set_fingerprint (subkey_with_id,
pretty_fingerprint);
+
+ g_free (pretty_fingerprint);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]