aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2014-09-13 21:21:48 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2014-09-13 21:29:29 +0200
commit7b08b18d251d4d3df681ea3be2235338c6a07c65 (patch)
treec5c94ba70881ba0075a07e6d188ad18ebb5ed9f6 /OpenKeychain
parentefd9d1626e0d692d287185deb16d295c4636be48 (diff)
downloadopen-keychain-7b08b18d251d4d3df681ea3be2235338c6a07c65.tar.gz
open-keychain-7b08b18d251d4d3df681ea3be2235338c6a07c65.tar.bz2
open-keychain-7b08b18d251d4d3df681ea3be2235338c6a07c65.zip
some DecryptVerify log refinements
Diffstat (limited to 'OpenKeychain')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java18
-rw-r--r--OpenKeychain/src/main/res/values/strings.xml4
2 files changed, 15 insertions, 7 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 769a48a8e..bfa504bfd 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java
@@ -64,6 +64,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLConnection;
import java.security.SignatureException;
+import java.util.Date;
import java.util.Iterator;
import java.util.Set;
@@ -403,7 +404,7 @@ public class PgpDecryptVerify {
updateProgress(R.string.progress_extracting_key, currentProgress, 100);
try {
- log.add(LogLevel.WARN, LogType.MSG_DC_UNLOCKING, indent +1);
+ log.add(LogLevel.INFO, LogType.MSG_DC_UNLOCKING, indent +1);
if (!secretEncryptionKey.unlock(mPassphrase)) {
log.add(LogLevel.ERROR, LogType.MSG_DC_ERROR_BAD_PASSPHRASE, indent +1);
return new DecryptVerifyResult(DecryptVerifyResult.RESULT_ERROR, log);
@@ -554,10 +555,17 @@ public class PgpDecryptVerify {
literalData.getModificationTime().getTime(),
originalSize);
- log.add(LogLevel.DEBUG, LogType.MSG_DC_CLEAR_META_FILE, indent +1);
- log.add(LogLevel.DEBUG, LogType.MSG_DC_CLEAR_META_MIME, indent +1);
- log.add(LogLevel.DEBUG, LogType.MSG_DC_CLEAR_META_TIME, indent +1);
- log.add(LogLevel.DEBUG, LogType.MSG_DC_CLEAR_META_SIZE, indent +1);
+ if ( ! originalFilename.equals("")) {
+ log.add(LogLevel.DEBUG, LogType.MSG_DC_CLEAR_META_FILE, indent + 1, originalFilename);
+ }
+ log.add(LogLevel.DEBUG, LogType.MSG_DC_CLEAR_META_MIME, indent +1,
+ mimeType);
+ log.add(LogLevel.DEBUG, LogType.MSG_DC_CLEAR_META_TIME, indent +1,
+ new Date(literalData.getModificationTime().getTime()).toString());
+ if (originalSize != 0) {
+ log.add(LogLevel.DEBUG, LogType.MSG_DC_CLEAR_META_SIZE, indent + 1,
+ Long.toString(originalSize));
+ }
// return here if we want to decrypt the metadata only
if (mDecryptMetadataOnly) {
diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml
index 4e23f36b0..378d68c21 100644
--- a/OpenKeychain/src/main/res/values/strings.xml
+++ b/OpenKeychain/src/main/res/values/strings.xml
@@ -767,10 +767,10 @@
<!-- Messages for DecryptVerify operation -->
<string name="msg_dc_askip_no_key">"Data not encrypted with known key, skipping…"</string>
<string name="msg_dc_askip_not_allowed">"Data not encrypted with allowed key, skipping…"</string>
- <string name="msg_dc_asym">"Found block of asymmetrically encrypted data"</string>
+ <string name="msg_dc_asym">"Found block of asymmetrically encrypted data for key %s"</string>
<string name="msg_dc_clear_data">"Processing literal data"</string>
<string name="msg_dc_clear_decompress">"Unpacking compressed data"</string>
- <string name="msg_dc_clear_meta_file">"Filesize: %s"</string>
+ <string name="msg_dc_clear_meta_file">"Filename: %s"</string>
<string name="msg_dc_clear_meta_mime">"MIME type: %s"</string>
<string name="msg_dc_clear_meta_size">"Filesize: %s"</string>
<string name="msg_dc_clear_meta_time">"Modification time: %s"</string>