From 9d074b01e9c99c463c8b5f0b653528ef745c38ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Tue, 4 Feb 2014 22:28:08 +0100 Subject: fix display of fingerprint in key server query --- .../java/org/sufficientlysecure/keychain/util/HkpKeyServer.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java') diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java index 05e52fb47..61fe13ffb 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java @@ -50,6 +50,13 @@ import org.sufficientlysecure.keychain.ui.adapter.ImportKeysListEntry; import android.text.Html; +/** + * TODO: + * rewrite to use machine readable output. + *

+ * see http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#section-5 + * https://github.com/openpgp-keychain/openpgp-keychain/issues/259 + */ public class HkpKeyServer extends KeyServer { private static class HttpError extends Exception { private static final long serialVersionUID = 1718783705229428893L; @@ -181,8 +188,8 @@ public class HkpKeyServer extends KeyServer { ImportKeysListEntry info = new ImportKeysListEntry(); info.bitStrength = Integer.parseInt(matcher.group(1)); info.algorithm = matcher.group(2); + info.hexKeyId = "0x" + matcher.group(3); info.keyId = PgpKeyHelper.convertHexToKeyId(matcher.group(3)); - info.fingerPrint = PgpKeyHelper.convertKeyIdToHex(info.keyId); String chunks[] = matcher.group(4).split("-"); GregorianCalendar tmpGreg = new GregorianCalendar(TimeZone.getTimeZone("UTC")); -- cgit v1.2.3