more work on import logging

This commit is contained in:
Vincent Breitmoser 2014-10-25 02:13:02 +02:00
parent 478b2a4d8b
commit ba724353e5
2 changed files with 7 additions and 6 deletions

View File

@ -172,7 +172,7 @@ public class ImportExportOperation extends BaseOperation {
byte[] data;
// Download by fingerprint, or keyId - whichever is available
if (entry.mExpectedFingerprint != null) {
log.add(LogType.MSG_IMPORT_FETCH_KEYSERVER, 1, "0x" + entry.mExpectedFingerprint);
log.add(LogType.MSG_IMPORT_FETCH_KEYSERVER, 1, "0x" + entry.mExpectedFingerprint.substring(24));
data = keyServer.get("0x" + entry.mExpectedFingerprint).getBytes();
} else {
log.add(LogType.MSG_IMPORT_FETCH_KEYSERVER, 1, entry.mKeyIdHex);
@ -212,6 +212,7 @@ public class ImportExportOperation extends BaseOperation {
key = merged;
}
} else {
log.add(LogType.MSG_IMPORT_FETCH_ERROR_DECODE, 2);
key = UncachedKeyRing.decodeFromData(data);
}
} catch (Keyserver.QueryFailedException e) {

View File

@ -947,11 +947,11 @@
<item quantity="other">"Importing %d keys"</item>
</plurals>
<string name="msg_import_fetch_error_decode">"Error decoding retrieved keyring!"</string>
<string name="msg_import_fetch_error">"Key could not be fetched! (Network problems?)"</string>
<string name="msg_import_fetch_keybase">"Fetching from keybase.io: %s"</string>
<string name="msg_import_fetch_keyserver_error">"Could not fetch key from keybase!"</string>
<string name="msg_import_fetch_keyserver">"Fetching from keyserver: %s"</string>
<string name="msg_import_fetch_keyserver_ok">"Fingerprint of fetched key didn't match expected!"</string>
<string name="msg_import_fetch_error">"Key could not be retrieved! (Network problems?)"</string>
<string name="msg_import_fetch_keybase">"Retrieving from keybase.io: %s"</string>
<string name="msg_import_fetch_keyserver_error">"Could not retrieve key from keybase!"</string>
<string name="msg_import_fetch_keyserver">"Retrieving from keyserver: %s"</string>
<string name="msg_import_fetch_keyserver_ok">"Key retrieval successful"</string>
<string name="msg_import_keyserver">"Using keyserver %s"</string>
<string name="msg_import_fingerprint_error">"Fingerprint of fetched key didn't match expected!"</string>
<string name="msg_import_fingerprint_ok">"Fingerprint check OK"</string>