add key id to trailing asym data log msg

This commit is contained in:
Vincent Breitmoser 2014-09-13 22:27:22 +02:00
parent e2675caf23
commit 85d0f5b6d5
2 changed files with 7 additions and 4 deletions

View File

@ -375,11 +375,14 @@ public class PgpDecryptVerify {
while (it.hasNext()) { while (it.hasNext()) {
Object obj = it.next(); Object obj = it.next();
if (obj instanceof PGPPublicKeyEncryptedData) { 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) { } 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 { } else {
log.add(LogLevel.WARN, LogType.MSG_DC_TRAIL_UNKNOWN, 0); log.add(LogLevel.WARN, LogType.MSG_DC_TRAIL_UNKNOWN, indent);
} }
} }

View File

@ -798,7 +798,7 @@
<string name="msg_dc">"Starting decrypt operation…"</string> <string name="msg_dc">"Starting decrypt operation…"</string>
<string name="msg_dc_sym_skip">"Symmetric data not allowed, skipping…"</string> <string name="msg_dc_sym_skip">"Symmetric data not allowed, skipping…"</string>
<string name="msg_dc_sym">"Found block of symmetrically encrypted data"</string> <string name="msg_dc_sym">"Found block of symmetrically encrypted data"</string>
<string name="msg_dc_trail_asym">"Encountered trailing, asymmetrically encrypted data"</string> <string name="msg_dc_trail_asym">"Encountered trailing, asymmetrically encrypted data for key %s"</string>
<string name="msg_dc_trail_sym">"Encountered trailing, symmetrically encrypted data"</string> <string name="msg_dc_trail_sym">"Encountered trailing, symmetrically encrypted data"</string>
<string name="msg_dc_trail_unknown">"Encountered trailing data of unknown type"</string> <string name="msg_dc_trail_unknown">"Encountered trailing data of unknown type"</string>
<string name="msg_dc_unlocking">"Unlocking secret key"</string> <string name="msg_dc_unlocking">"Unlocking secret key"</string>