List of usage examples for org.bouncycastle.bcpg.sig RevocationReason RevocationReason
public RevocationReason(boolean isCritical, byte reason, String description)
From source file:org.sufficientlysecure.keychain.pgp.WrappedSignature.java
License:Open Source License
public String getRevocationReason() throws PgpGeneralException { if (!isRevocation()) { throw new PgpGeneralException("Not a revocation signature."); }// w w w . ja v a2 s .co m if (mSig.getHashedSubPackets() == null) { return null; } SignatureSubpacket p = mSig.getHashedSubPackets().getSubpacket(SignatureSubpacketTags.REVOCATION_REASON); // For some reason, this is missing in SignatureSubpacketInputStream:146 if (!(p instanceof RevocationReason)) { p = new RevocationReason(false, false, p.getData()); } return ((RevocationReason) p).getRevocationDescription(); }