List of usage examples for org.bouncycastle.cms CMSSignedData verifySignatures
public boolean verifySignatures(SignerInformationVerifierProvider verifierProvider) throws CMSException
From source file:org.ejbca.core.protocol.scep.ScepRequestMessage.java
License:Open Source License
/** * This method verifies the signature of the PKCS#7 wrapper of this message. * //from w ww. j a va 2s . co m * @param publicKey the public key of the keypair that signed this message * @return true if signature verifies. * @throws CMSException if the underlying byte array of this SCEP message couldn't be read * @throws OperatorCreationException if a signature verifier couldn't be constructed from the given public key */ public boolean verifySignature(PublicKey publicKey) throws CMSException, OperatorCreationException { CMSSignedData cmsSignedData = new CMSSignedData(scepmsg); return cmsSignedData.verifySignatures(new ScepVerifierProvider(publicKey)); }