From be490307f97b5e73bad5c4882afab6dff1f10b48 Mon Sep 17 00:00:00 2001 From: mar-v-in Date: Thu, 29 May 2014 10:24:00 +0200 Subject: [PATCH] Download from origin during ACTION_DOWNLOAD_AND_IMPORT_KEYS --- .../keychain/service/KeychainIntentService.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java index 6f38418ff..b6ee234f4 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java @@ -796,10 +796,11 @@ public class KeychainIntentService extends IntentService ArrayList entries = data.getParcelableArrayList(DOWNLOAD_KEY_LIST); String keyServer = data.getString(DOWNLOAD_KEY_SERVER); - // this downloads the keys and places them into the ImportKeysListEntry entries - HkpKeyserver server = new HkpKeyserver(keyServer); - for (ImportKeysListEntry entry : entries) { + + // this downloads the keys and places them into the ImportKeysListEntry entries + HkpKeyserver server = new HkpKeyserver(entry.getOrigin() != null ? entry.getOrigin() : keyServer); + // if available use complete fingerprint for get request byte[] downloadedKeyBytes; if (entry.getFingerprintHex() != null) {