public class ProtectedPKIMessage
extends java.lang.Object
Constructor and Description |
---|
ProtectedPKIMessage(GeneralPKIMessage pkiMessage)
Base constructor.
|
Modifier and Type | Method and Description |
---|---|
org.bouncycastle.asn1.cmp.PKIBody |
getBody()
Return the message body.
|
X509CertificateHolder[] |
getCertificates()
Return the extra certificates associated with this message.
|
org.bouncycastle.asn1.cmp.PKIHeader |
getHeader()
Return the message header.
|
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getProtectionAlgorithm()
Return the message's protection algorithm.
|
boolean |
hasPasswordBasedMacProtection()
Determine whether the message is protected by a CMP password based MAC.
|
org.bouncycastle.asn1.cmp.PKIMessage |
toASN1Structure()
Return the underlying ASN.1 structure contained in this object.
|
boolean |
verify(ContentVerifierProvider verifierProvider)
Verify a message with a public key based signature attached.
|
boolean |
verify(PBEMacCalculatorProvider pbeMacCalculatorProvider,
char[] password)
Verify a message with password based MAC protection.
|
public ProtectedPKIMessage(GeneralPKIMessage pkiMessage)
pkiMessage
- a GeneralPKIMessage withpublic org.bouncycastle.asn1.cmp.PKIHeader getHeader()
public org.bouncycastle.asn1.cmp.PKIBody getBody()
public org.bouncycastle.asn1.cmp.PKIMessage toASN1Structure()
public boolean hasPasswordBasedMacProtection()
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getProtectionAlgorithm()
public X509CertificateHolder[] getCertificates()
public boolean verify(ContentVerifierProvider verifierProvider) throws CMPException
verifierProvider
- a provider of signature verifiers.CMPException
- if an exception is thrown trying to verify the signature.public boolean verify(PBEMacCalculatorProvider pbeMacCalculatorProvider, char[] password) throws CMPException
pbeMacCalculatorProvider
- MAC builder that can be used to construct the appropriate MacCalculatorpassword
- the MAC passwordCMPException
- if algorithm not MAC based, or an exception is thrown verifying the MAC.