From 51ecce510fc18ba8299effa971100ce93e9f7780 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Tue, 30 Sep 2014 14:10:54 +0200 Subject: [PATCH] fix minor logic error (haha) --- .../org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java index 8651760c0..e37ebeaa7 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java @@ -721,7 +721,7 @@ public class UncachedKeyRing { } // If we have flags, check if the algorithm supports all of them - if (selfCert.getHashedSubPackets() == null + if (selfCert.getHashedSubPackets() != null && selfCert.getHashedSubPackets().hasSubpacket(SignatureSubpacketTags.KEY_FLAGS)) { int flags = ((KeyFlags) selfCert.getHashedSubPackets().getSubpacket(SignatureSubpacketTags.KEY_FLAGS)).getFlags(); int algo = key.getAlgorithm();