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
2014-05-14 14:13:00 +02:00
parent d50e798c13
commit 6162247155
3 changed files with 20 additions and 8 deletions

View File

@@ -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;