Class CertificateRequestMessage
- Namespace
- Org.BouncyCastle.Crmf
- Assembly
- BouncyCastle.Cryptography.dll
public class CertificateRequestMessage
- Inheritance
-
CertificateRequestMessage
- Inherited Members
Constructors
CertificateRequestMessage(CertReqMsg)
public CertificateRequestMessage(CertReqMsg certReqMsg)
Parameters
certReqMsgCertReqMsg
CertificateRequestMessage(byte[])
Create a CertificateRequestMessage from the passed in bytes.
public CertificateRequestMessage(byte[] encoded)
Parameters
encodedbyte[]BER/DER encoding of the CertReqMsg structure.
Fields
popKeyAgreement
public static readonly int popKeyAgreement
Field Value
popKeyEncipherment
public static readonly int popKeyEncipherment
Field Value
popRaVerified
public static readonly int popRaVerified
Field Value
popSigningKey
public static readonly int popSigningKey
Field Value
Properties
HasControls
Return whether or not this request has control values associated with it.
public bool HasControls { get; }
Property Value
- bool
true if there are control values present, false otherwise.
HasProofOfPossession
Return whether or not this request message has a proof-of-possession field in it.
public bool HasProofOfPossession { get; }
Property Value
- bool
true if proof-of-possession is present, false otherwise.
HasSigningKeyProofOfPossessionWithPkMac
Return whether or not the proof-of-possession (POP) is of the type popSigningKey and it has a public key MAC associated with it.
public bool HasSigningKeyProofOfPossessionWithPkMac { get; }
Property Value
- bool
true if POP is popSigningKey and a PKMAC is present, false otherwise.
ProofOfPossession
Return the type of the proof-of-possession this request message provides.
public int ProofOfPossession { get; }
Property Value
- int
one of: popRaVerified, popSigningKey, popKeyEncipherment, popKeyAgreement
Methods
FindControl(DerObjectIdentifier)
public AttributeTypeAndValue FindControl(DerObjectIdentifier type)
Parameters
typeDerObjectIdentifier
Returns
GetCertReqID()
Return the certificate request ID for this message.
public DerInteger GetCertReqID()
Returns
- DerInteger
the certificate request ID.
GetCertTemplate()
Return the certificate template contained in this message.
public CertTemplate GetCertTemplate()
Returns
- CertTemplate
a CertTemplate structure.
GetControl(DerObjectIdentifier)
Return a control value of the specified type.
public IControl GetControl(DerObjectIdentifier type)
Parameters
typeDerObjectIdentifierthe type OID for the control value we are checking for.
Returns
- IControl
the control value if present, null otherwise.
GetEncoded()
Return the ASN.1 encoding of the certReqMsg we wrap.
public byte[] GetEncoded()
Returns
- byte[]
a byte array containing the binary encoding of the certReqMsg.
HasControl(DerObjectIdentifier)
Return whether or not this request has a specific type of control value.
public bool HasControl(DerObjectIdentifier objectIdentifier)
Parameters
objectIdentifierDerObjectIdentifierthe type OID for the control value we are checking for.
Returns
- bool
true if a control value of type is present, false otherwise.
IsValidSigningKeyPop(IVerifierFactoryProvider)
Return whether or not a signing key proof-of-possession (POP) is valid.
public bool IsValidSigningKeyPop(IVerifierFactoryProvider verifierProvider)
Parameters
verifierProviderIVerifierFactoryProvidera provider that can produce content verifiers for the signature contained in this POP.
Returns
- bool
true if the POP is valid, false otherwise.
Exceptions
- InvalidOperationException
if there is a problem in verification or content verifier creation.
- InvalidOperationException
if POP not appropriate.
IsValidSigningKeyPop(IVerifierFactoryProvider, PKMacBuilder, char[])
Return whether or not a signing key proof-of-possession (POP), with an associated PKMAC, is valid.
public bool IsValidSigningKeyPop(IVerifierFactoryProvider verifierProvider, PKMacBuilder macBuilder, char[] password)
Parameters
verifierProviderIVerifierFactoryProvidera provider that can produce content verifiers for the signature contained in this POP.
macBuilderPKMacBuildera suitable PKMacBuilder to create the MAC verifier.
passwordchar[]the password used to key the MAC calculation.
Returns
- bool
true if the POP is valid, false otherwise.
Exceptions
- InvalidOperationException
if there is a problem in verification or content verifier creation.
- InvalidOperationException
if POP not appropriate.
IsValidSigningKeyPop(IVerifierFactoryProvider, PKMacBuilder, ReadOnlySpan<char>)
Return whether or not a signing key proof-of-possession (POP), with an associated PKMAC, is valid.
public bool IsValidSigningKeyPop(IVerifierFactoryProvider verifierProvider, PKMacBuilder macBuilder, ReadOnlySpan<char> password)
Parameters
verifierProviderIVerifierFactoryProvidera provider that can produce content verifiers for the signature contained in this POP.
macBuilderPKMacBuildera suitable PKMacBuilder to create the MAC verifier.
passwordReadOnlySpan<char>the password used to key the MAC calculation.
Returns
- bool
true if the POP is valid, false otherwise.
Exceptions
- InvalidOperationException
if there is a problem in verification or content verifier creation.
- InvalidOperationException
if POP not appropriate.
ToAsn1Structure()
Return the underlying ASN.1 object defining this CertificateRequestMessage object.
public CertReqMsg ToAsn1Structure()
Returns
- CertReqMsg
A CertReqMsg