Table of Contents

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

certReqMsg CertReqMsg

CertificateRequestMessage(byte[])

Create a CertificateRequestMessage from the passed in bytes.

public CertificateRequestMessage(byte[] encoded)

Parameters

encoded byte[]

BER/DER encoding of the CertReqMsg structure.

Fields

popKeyAgreement

public static readonly int popKeyAgreement

Field Value

int

popKeyEncipherment

public static readonly int popKeyEncipherment

Field Value

int

popRaVerified

public static readonly int popRaVerified

Field Value

int

popSigningKey

public static readonly int popSigningKey

Field Value

int

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

type DerObjectIdentifier

Returns

AttributeTypeAndValue

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

type DerObjectIdentifier

the 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

objectIdentifier DerObjectIdentifier

the 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

verifierProvider IVerifierFactoryProvider

a 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

verifierProvider IVerifierFactoryProvider

a provider that can produce content verifiers for the signature contained in this POP.

macBuilder PKMacBuilder

a suitable PKMacBuilder to create the MAC verifier.

password 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.

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

verifierProvider IVerifierFactoryProvider

a provider that can produce content verifiers for the signature contained in this POP.

macBuilder PKMacBuilder

a suitable PKMacBuilder to create the MAC verifier.

password ReadOnlySpan<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