From 5aebd115d4a7a8ba7d538621bbf9e88ef941f48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Sun, 15 Sep 2013 16:42:08 +0200 Subject: Put PgpMain methods in separate opbject classes, handle passphrase dialog in EditKey not in SecretKeyList --- .../src/org/sufficientlysecure/keychain/util/HkpKeyServer.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenPGP-Keychain/src/org/sufficientlysecure/keychain/util/HkpKeyServer.java') diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/util/HkpKeyServer.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/util/HkpKeyServer.java index c414dfd86..ff69aa264 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/util/HkpKeyServer.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/util/HkpKeyServer.java @@ -44,7 +44,7 @@ import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils; import org.sufficientlysecure.keychain.pgp.PgpHelper; -import org.sufficientlysecure.keychain.pgp.PgpMain; +import org.sufficientlysecure.keychain.pgp.PgpKeyHelper; import android.text.Html; @@ -179,8 +179,8 @@ public class HkpKeyServer extends KeyServer { KeyInfo info = new KeyInfo(); info.size = Integer.parseInt(matcher.group(1)); info.algorithm = matcher.group(2); - info.keyId = PgpHelper.keyFromHex(matcher.group(3)); - info.fingerPrint = PgpHelper.getSmallFingerPrint(info.keyId); + info.keyId = PgpKeyHelper.keyFromHex(matcher.group(3)); + info.fingerPrint = PgpKeyHelper.getSmallFingerPrint(info.keyId); String chunks[] = matcher.group(4).split("-"); info.date = new GregorianCalendar(Integer.parseInt(chunks[0]), Integer.parseInt(chunks[1]), Integer.parseInt(chunks[2])).getTime(); @@ -211,7 +211,7 @@ public class HkpKeyServer extends KeyServer { HttpClient client = new DefaultHttpClient(); try { HttpGet get = new HttpGet("http://" + mHost + ":" + mPort - + "/pks/lookup?op=get&search=0x" + PgpHelper.keyToHex(keyId)); + + "/pks/lookup?op=get&search=0x" + PgpKeyHelper.keyToHex(keyId)); HttpResponse response = client.execute(get); if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { @@ -221,7 +221,7 @@ public class HkpKeyServer extends KeyServer { HttpEntity entity = response.getEntity(); InputStream is = entity.getContent(); String data = readAll(is, EntityUtils.getContentCharSet(entity)); - Matcher matcher = PgpMain.PGP_PUBLIC_KEY.matcher(data); + Matcher matcher = PgpHelper.PGP_PUBLIC_KEY.matcher(data); if (matcher.find()) { return matcher.group(1); } -- cgit v1.2.3