Add extraData property in ImportKeyListEntry

This allows any KeyServer to store some extra data it might need.
In the case of KeybaseKeyServer it is the username, which then can
be grabbed directly, without the hack of storing it as userId.
This commit is contained in:
Thialfihar committed 2014-05-14 14:28:41 +02:00
1 parent d50e798c13
commit 6162247155
3 files changed
+20 -8

No files matched your search

@@ -749,8 +749,8 @@ public class KeychainIntentService extends IntentService
KeybaseKeyServer server = new KeybaseKeyServer();
for (ImportKeysListEntry entry : entries) {
// the keybase handle is in userId(1)
String keybaseID = entry.getUserIds().get(1);
byte[] downloadedKeyBytes = server.get(keybaseID).getBytes();
String keybaseId = entry.getExtraData();
byte[] downloadedKeyBytes = server.get(keybaseId).getBytes();
// create PGPKeyRing object based on downloaded armored key
PGPKeyRing downloadedKey = null;