prevent NPE in getRevocationReason()

This commit is contained in:
Vincent Breitmoser 2017-04-24 21:04:17 +02:00
parent c9f9ad0477
commit e73596f7b9

View file

@ -130,6 +130,9 @@ public class WrappedSignature {
}
SignatureSubpacket p = mSig.getHashedSubPackets().getSubpacket(
SignatureSubpacketTags.REVOCATION_REASON);
if (p == null) {
return null;
}
// For some reason, this is missing in SignatureSubpacketInputStream:146
if (!(p instanceof RevocationReason)) {
p = new RevocationReason(false, false, p.getData());