aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2014-09-22 17:02:53 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2014-09-22 17:02:53 +0200
commit862c9a8b3ccaadcc712b288b19db49fd5afd533a (patch)
tree0b091ccc9b8f11a6f97788482e1ed6987d7df13a /OpenKeychain/src/main/java
parentf6ac887ce0e440d19273889ff10bc1306d8bed50 (diff)
downloadopen-keychain-862c9a8b3ccaadcc712b288b19db49fd5afd533a.tar.gz
open-keychain-862c9a8b3ccaadcc712b288b19db49fd5afd533a.tar.bz2
open-keychain-862c9a8b3ccaadcc712b288b19db49fd5afd533a.zip
log "unspecified" flags differently
Diffstat (limited to 'OpenKeychain/src/main/java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java12
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java2
2 files changed, 12 insertions, 2 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java
index 6856f087d..f8600d9d4 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java
@@ -389,9 +389,17 @@ public class ProviderHelper {
// see above
if (masterKeyId == keyId) {
- log(LOG_TYPES_FLAG_MASTER[(c?1:0) + (e?2:0) + (s?4:0) + (a?8:0)]);
+ if (key.getKeyUsage() == null) {
+ log(LogType.MSG_IP_MASTER_FLAGS_UNSPECIFIED);
+ } else {
+ log(LOG_TYPES_FLAG_MASTER[(c?1:0) + (e?2:0) + (s?4:0) + (a?8:0)]);
+ }
} else {
- log(LOG_TYPES_FLAG_SUBKEY[(c?1:0) + (e?2:0) + (s?4:0) + (a?8:0)]);
+ if (key.getKeyUsage() == null) {
+ log(LogType.MSG_IP_SUBKEY_FLAGS_UNSPECIFIED);
+ } else {
+ log(LOG_TYPES_FLAG_SUBKEY[(c ? 1 : 0) + (e ? 2 : 0) + (s ? 4 : 0) + (a ? 8 : 0)]);
+ }
}
Date creation = key.getCreationTime();
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java
index fc8fbd4e4..69516eafd 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java
@@ -242,6 +242,7 @@ public abstract class OperationResult implements Parcelable {
MSG_IP_MASTER (LogLevel.DEBUG, R.string.msg_ip_master),
MSG_IP_MASTER_EXPIRED (LogLevel.DEBUG, R.string.msg_ip_master_expired),
MSG_IP_MASTER_EXPIRES (LogLevel.DEBUG, R.string.msg_ip_master_expires),
+ MSG_IP_MASTER_FLAGS_UNSPECIFIED (LogLevel.DEBUG, R.string.msg_ip_master_flags_unspecified),
MSG_IP_MASTER_FLAGS_CESA (LogLevel.DEBUG, R.string.msg_ip_master_flags_cesa),
MSG_IP_MASTER_FLAGS_CESX (LogLevel.DEBUG, R.string.msg_ip_master_flags_cesx),
MSG_IP_MASTER_FLAGS_CEXA (LogLevel.DEBUG, R.string.msg_ip_master_flags_cexa),
@@ -261,6 +262,7 @@ public abstract class OperationResult implements Parcelable {
MSG_IP_SUBKEY (LogLevel.DEBUG, R.string.msg_ip_subkey),
MSG_IP_SUBKEY_EXPIRED (LogLevel.DEBUG, R.string.msg_ip_subkey_expired),
MSG_IP_SUBKEY_EXPIRES (LogLevel.DEBUG, R.string.msg_ip_subkey_expires),
+ MSG_IP_SUBKEY_FLAGS_UNSPECIFIED (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cesa),
MSG_IP_SUBKEY_FLAGS_CESA (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cesa),
MSG_IP_SUBKEY_FLAGS_CESX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cesx),
MSG_IP_SUBKEY_FLAGS_CEXA (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cexa),