public class

PKCS10CertificationRequestHolder

extends Object
java.lang.Object
   ↳ org.bouncycastle.pkcs.PKCS10CertificationRequestHolder
Known Direct Subclasses

Class Overview

Holding class for a PKCS#10 certification request.

Summary

Public Constructors
PKCS10CertificationRequestHolder(CertificationRequest certificationRequest)
Create a PKCS10CertificationRequestHolder from an underlying ASN.1 structure.
PKCS10CertificationRequestHolder(byte[] encoded)
Create a PKCS10CertificationRequestHolder from the passed in bytes.
Public Methods
boolean equals(Object o)
Attribute[] getAttributes()
Return the attributes, if any associated with this request.
Attribute[] getAttributes(ASN1ObjectIdentifier type)
Return an array of attributes matching the passed in type OID.
byte[] getEncoded()
byte[] getSignature()
Return the bytes making up the signature associated with this request.
AlgorithmIdentifier getSignatureAlgorithm()
Return the details of the signature algorithm used to create this request.
X500Name getSubject()
Return the subject on this request.
SubjectPublicKeyInfo getSubjectPublicKeyInfo()
Return the SubjectPublicKeyInfo describing the public key this request is carrying.
int hashCode()
boolean isSignatureValid(ContentVerifierProvider verifierProvider)
Validate the signature on the PKCS10 certification request in this holder.
CertificationRequest toASN1Structure()
Return the underlying ASN.1 structure for this request.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PKCS10CertificationRequestHolder (CertificationRequest certificationRequest)

Create a PKCS10CertificationRequestHolder from an underlying ASN.1 structure.

Parameters
certificationRequest the underlying ASN.1 structure representing a request.

public PKCS10CertificationRequestHolder (byte[] encoded)

Create a PKCS10CertificationRequestHolder from the passed in bytes.

Parameters
encoded BER/DER encoding of the CertificationRequest structure.
Throws
IOException in the event of corrupted data, or an incorrect structure.

Public Methods

public boolean equals (Object o)

public Attribute[] getAttributes ()

Return the attributes, if any associated with this request.

Returns
  • an array of Attribute, zero length if none present.

public Attribute[] getAttributes (ASN1ObjectIdentifier type)

Return an array of attributes matching the passed in type OID.

Parameters
type the type of the attribute being looked for.
Returns
  • an array of Attribute of the requested type, zero length if none present.

public byte[] getEncoded ()

Throws
IOException

public byte[] getSignature ()

Return the bytes making up the signature associated with this request.

Returns
  • the request signature bytes.

public AlgorithmIdentifier getSignatureAlgorithm ()

Return the details of the signature algorithm used to create this request.

Returns
  • the AlgorithmIdentifier describing the signature algorithm used to create this request.

public X500Name getSubject ()

Return the subject on this request.

Returns
  • the X500Name representing the request's subject.

public SubjectPublicKeyInfo getSubjectPublicKeyInfo ()

Return the SubjectPublicKeyInfo describing the public key this request is carrying.

Returns
  • the public key ASN.1 structure contained in the request.

public int hashCode ()

public boolean isSignatureValid (ContentVerifierProvider verifierProvider)

Validate the signature on the PKCS10 certification request in this holder.

Parameters
verifierProvider a ContentVerifierProvider that can generate a verifier for the signature.
Returns
  • true if the signature is valid, false otherwise.
Throws
PKCSException if the signature cannot be processed or is inappropriate.

public CertificationRequest toASN1Structure ()

Return the underlying ASN.1 structure for this request.

Returns
  • a CertificateRequest object.