From 85d0f5b6d5724adfbdef462f21d0b0b427f61bde Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Sat, 13 Sep 2014 22:27:22 +0200 Subject: [PATCH] add key id to trailing asym data log msg --- .../keychain/pgp/PgpDecryptVerify.java | 9 ++++++--- OpenKeychain/src/main/res/values/strings.xml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java index bfa504bfd..6e59a3b9b 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java @@ -375,11 +375,14 @@ public class PgpDecryptVerify { while (it.hasNext()) { Object obj = it.next(); if (obj instanceof PGPPublicKeyEncryptedData) { - log.add(LogLevel.WARN, LogType.MSG_DC_TRAIL_ASYM, 0); + PGPPublicKeyEncryptedData encData = (PGPPublicKeyEncryptedData) obj; + long subKeyId = encData.getKeyID(); + log.add(LogLevel.DEBUG, LogType.MSG_DC_TRAIL_ASYM, indent, + PgpKeyHelper.convertKeyIdToHex(subKeyId)); } else if (obj instanceof PGPPBEEncryptedData) { - log.add(LogLevel.WARN, LogType.MSG_DC_TRAIL_SYM, 0); + log.add(LogLevel.WARN, LogType.MSG_DC_TRAIL_SYM, indent); } else { - log.add(LogLevel.WARN, LogType.MSG_DC_TRAIL_UNKNOWN, 0); + log.add(LogLevel.WARN, LogType.MSG_DC_TRAIL_UNKNOWN, indent); } } diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index 9e9b47c7c..5b68d4cdc 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -798,7 +798,7 @@ "Starting decrypt operation…" "Symmetric data not allowed, skipping…" "Found block of symmetrically encrypted data" - "Encountered trailing, asymmetrically encrypted data" + "Encountered trailing, asymmetrically encrypted data for key %s" "Encountered trailing, symmetrically encrypted data" "Encountered trailing data of unknown type" "Unlocking secret key"