Class C509CertificationRequestHolder
java.lang.Object
org.bouncycastle.cert.c509.C509CertificationRequestHolder
- All Implemented Interfaces:
org.bouncycastle.util.Encodable
public class C509CertificationRequestHolder
extends Object
implements org.bouncycastle.util.Encodable
Holding class for a C509 certification request (Section 4 of
draft-ietf-cose-cbor-encoded-cert-20), mirroring the PKCS#10 holding class.
For a natively signed request (type 2) the signature covers the TBSCertificationRequest CBOR sequence; for a re-encoded RFC 2986 request (type 3) it covers the reconstructed DER CertificationRequestInfo.
-
Constructor Summary
ConstructorsConstructorDescriptionC509CertificationRequestHolder(byte[] encoding) Create a holder from the CBOR encoding of a C509 certification request.C509CertificationRequestHolder(org.bouncycastle.cbor.c509.C509CertificationRequest request) Base constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.cbor.c509.C509Attribute[]org.bouncycastle.cbor.c509.C509CertificationRequestReturn the certification request this holder wraps.byte[]Return the CBOR encoding of the certification request.intbyte[]Return the bytes the request signature is computed over: the TBSCertificationRequest CBOR sequence for a natively signed request, the reconstructed DER CertificationRequestInfo for a re-encoded one.org.bouncycastle.asn1.x500.X500Nameorg.bouncycastle.asn1.x509.SubjectPublicKeyInfobooleanisSignatureValid(ContentVerifierProvider verifierProvider) Validate the signature (the proof-of-possession) on this certification request.
-
Constructor Details
-
C509CertificationRequestHolder
public C509CertificationRequestHolder(org.bouncycastle.cbor.c509.C509CertificationRequest request) Base constructor. -
C509CertificationRequestHolder
Create a holder from the CBOR encoding of a C509 certification request.- Throws:
IOException
-
-
Method Details
-
getC509CertificationRequest
public org.bouncycastle.cbor.c509.C509CertificationRequest getC509CertificationRequest()Return the certification request this holder wraps. -
getRequestType
public int getRequestType() -
getSubject
public org.bouncycastle.asn1.x500.X500Name getSubject() -
getSubjectPublicKeyInfo
public org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getSubjectPublicKeyInfo() -
getAttributes
public org.bouncycastle.cbor.c509.C509Attribute[] getAttributes() -
isSignatureValid
Validate the signature (the proof-of-possession) on this certification request.- Parameters:
verifierProvider- a provider of verifiers built on the request's subject public key.- Returns:
- true if the signature verifies, false otherwise.
- Throws:
CertException
-
getSignedBytes
Return the bytes the request signature is computed over: the TBSCertificationRequest CBOR sequence for a natively signed request, the reconstructed DER CertificationRequestInfo for a re-encoded one.- Throws:
IOException
-
getEncoded
Return the CBOR encoding of the certification request.- Specified by:
getEncodedin interfaceorg.bouncycastle.util.Encodable- Throws:
IOException
-