respect most recent sig with actual key flags, if available

This commit is contained in:
Vincent Breitmoser 2017-08-29 01:46:08 +02:00
parent 049d665324
commit d3746b89e5

View file

@ -344,6 +344,12 @@ public class UncachedPublicKey {
continue;
}
// Previous signature had key flags, but new one doesn't
if (!sig.getHashedSubPackets().hasSubpacket(SignatureSubpacketTags.KEY_FLAGS)
&& mostRecentSig.getHashedSubPackets().hasSubpacket(SignatureSubpacketTags.KEY_FLAGS)) {
continue;
}
// Otherwise, note it down as the new "most recent" one
mostRecentSig = sig;
}