aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src
diff options
context:
space:
mode:
Diffstat (limited to 'OpenKeychain/src')
-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
-rw-r--r--OpenKeychain/src/main/res/values/strings.xml2
3 files changed, 14 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),
diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml
index 38161933f..28a1507f5 100644
--- a/OpenKeychain/src/main/res/values/strings.xml
+++ b/OpenKeychain/src/main/res/values/strings.xml
@@ -561,6 +561,7 @@
<string name="msg_ip_master">"Processing master key %s"</string>
<string name="msg_ip_master_expired">"Keyring expired on %s"</string>
<string name="msg_ip_master_expires">"Keyring expires on %s"</string>
+ <string name="msg_ip_master_flags_unspecified">"Master flags: unspecified (assuming all)"</string>
<string name="msg_ip_master_flags_cesa">"Master flags: certify, encrypt, sign, authenticate"</string>
<string name="msg_ip_master_flags_cesx">"Master flags: certify, encrypt, sign"</string>
<string name="msg_ip_master_flags_cexa">"Master flags: certify, encrypt, authenticate"</string>
@@ -580,6 +581,7 @@
<string name="msg_ip_subkey">"Processing subkey %s"</string>
<string name="msg_ip_subkey_expired">"Subkey expired on %s"</string>
<string name="msg_ip_subkey_expires">"Subkey expires on %s"</string>
+ <string name="msg_ip_subkey_flags_unspecified">"Subkey flags: unspecified (assuming all)"</string>
<string name="msg_ip_subkey_flags_cesa">"Subkey flags: certify, encrypt, sign, authenticate"</string>
<string name="msg_ip_subkey_flags_cesx">"Subkey flags: certify, encrypt, sign"</string>
<string name="msg_ip_subkey_flags_cexa">"Subkey flags: certify, encrypt, authenticate"</string>