Package org.bouncycastle.pkcs.bc
Class BcPKCS10CertificationRequest
- java.lang.Object
-
- org.bouncycastle.pkcs.PKCS10CertificationRequest
-
- org.bouncycastle.pkcs.bc.BcPKCS10CertificationRequest
-
public class BcPKCS10CertificationRequest extends PKCS10CertificationRequest
Lightweight extension ofPKCS10CertificationRequestthat exposes the request's public key as anAsymmetricKeyParameter(no JCA dependency).
-
-
Constructor Summary
Constructors Constructor Description BcPKCS10CertificationRequest(byte[] encoding)Parse a BER/DER encoded PKCS#10 request.BcPKCS10CertificationRequest(org.bouncycastle.asn1.pkcs.CertificationRequest certificationRequest)Wrap a parsedCertificationRequest.BcPKCS10CertificationRequest(PKCS10CertificationRequest requestHolder)Re-wrap an existingPKCS10CertificationRequestas a lightweight-aware holder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.crypto.params.AsymmetricKeyParametergetPublicKey()Return the public key carried by the request as a lightweightAsymmetricKeyParameter.-
Methods inherited from class org.bouncycastle.pkcs.PKCS10CertificationRequest
equals, getAttributes, getAttributes, getEncoded, getRequestedExtensions, getSignature, getSignatureAlgorithm, getSubject, getSubjectPublicKeyInfo, hasAltPublicKey, hashCode, isAltSignatureValid, isSignatureValid, toASN1Structure
-
-
-
-
Constructor Detail
-
BcPKCS10CertificationRequest
public BcPKCS10CertificationRequest(org.bouncycastle.asn1.pkcs.CertificationRequest certificationRequest)
Wrap a parsedCertificationRequest.- Parameters:
certificationRequest- the underlying request.
-
BcPKCS10CertificationRequest
public BcPKCS10CertificationRequest(byte[] encoding) throws java.io.IOExceptionParse a BER/DER encoded PKCS#10 request.- Parameters:
encoding- the encoded request bytes.- Throws:
java.io.IOException- if the data is not a valid CertificationRequest.
-
BcPKCS10CertificationRequest
public BcPKCS10CertificationRequest(PKCS10CertificationRequest requestHolder)
Re-wrap an existingPKCS10CertificationRequestas a lightweight-aware holder.- Parameters:
requestHolder- the existing holder.
-
-
Method Detail
-
getPublicKey
public org.bouncycastle.crypto.params.AsymmetricKeyParameter getPublicKey() throws PKCSExceptionReturn the public key carried by the request as a lightweightAsymmetricKeyParameter.- Returns:
- the request's public key.
- Throws:
PKCSException- if the embedded SubjectPublicKeyInfo cannot be decoded.
-
-