Top Description Fields Constructors Methods
org.bouncycastle.jce

public Class PKCS10CertificationRequest

extends CertificationRequest
Class Inheritance
Imports
java.io.IOException, java.security.AlgorithmParameters, .GeneralSecurityException, .InvalidKeyException, .KeyFactory, .NoSuchAlgorithmException, .NoSuchProviderException, .PrivateKey, .PublicKey, .Signature, .SignatureException, java.security.spec.InvalidKeySpecException, .PSSParameterSpec, .X509EncodedKeySpec, java.util.HashSet, .Hashtable, .Set, javax.security.auth.x500.X500Principal, org.bouncycastle.asn1.ASN1Encodable, .ASN1Encoding, .ASN1InputStream, .ASN1Integer, .ASN1ObjectIdentifier, .ASN1Primitive, .ASN1Sequence, .ASN1Set, .DERBitString, .DERNull, org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers, org.bouncycastle.asn1.nist.NISTObjectIdentifiers, org.bouncycastle.asn1.pkcs.CertificationRequest, .CertificationRequestInfo, .PKCSObjectIdentifiers, .RSASSAPSSparams, org.bouncycastle.asn1.teletrust.TeleTrusTObjectIdentifiers, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .SubjectPublicKeyInfo, .X509Name, org.bouncycastle.asn1.x9.X9ObjectIdentifiers, org.bouncycastle.internal.asn1.oiw.OIWObjectIdentifiers, org.bouncycastle.jce.provider.BouncyCastleProvider, org.bouncycastle.util.Strings

Deprecated

use classes in org.bouncycastle.pkcs.

A class for verifying and creating PKCS10 Certification requests.
CertificationRequest ::= SEQUENCE {
  certificationRequestInfo  CertificationRequestInfo,
  signatureAlgorithm        AlgorithmIdentifier{{ SignatureAlgorithms }},
  signature                 BIT STRING
}

CertificationRequestInfo ::= SEQUENCE {
  version             INTEGER { v1(0) } (v1,...),
  subject             Name,
  subjectPKInfo   SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
  attributes          [0] Attributes{{ CRIAttributes }}
 }

 Attributes { ATTRIBUTE:IOSet } ::= SET OF Attribute{{ IOSet }}

 Attribute { ATTRIBUTE:IOSet } ::= SEQUENCE {
   type    ATTRIBUTE.&id({IOSet}),
   values  SET SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
 }

Field Summary

Modifier and TypeField and Description
private static Hashtable<K, V>
private static Hashtable<K, V>
private static Set<E>
private static Hashtable<K, V>
private static Hashtable<K, V>
Inherited from org.bouncycastle.asn1.pkcs.CertificationRequest:
reqInfosigAlgIdsigBits

Constructor Summary

AccessConstructor and Description
public
PKCS10CertificationRequest(byte[] bytes)

construct a PKCS10 certification request from a DER encoded byte stream.

public
public
PKCS10CertificationRequest(String signatureAlgorithm, X509Name subject, PublicKey key, ASN1Set attributes, PrivateKey signingKey)
References Deprecated X509Name is deprecated or references (maybe indirectly) at least one deprecated element.

create a PKCS10 certfication request using the BC provider.

public
PKCS10CertificationRequest(String signatureAlgorithm, X500Principal subject, PublicKey key, ASN1Set attributes, PrivateKey signingKey)

create a PKCS10 certfication request using the BC provider.

public
PKCS10CertificationRequest(String signatureAlgorithm, X500Principal subject, PublicKey key, ASN1Set attributes, PrivateKey signingKey, String provider)

create a PKCS10 certfication request using the named provider.

public
PKCS10CertificationRequest(String signatureAlgorithm, X509Name subject, PublicKey key, ASN1Set attributes, PrivateKey signingKey, String provider)
References Deprecated X509Name is deprecated or references (maybe indirectly) at least one deprecated element.

create a PKCS10 certfication request using the named provider.

Method Summary

Modifier and TypeMethod and Description
private static X509Name
convertName(X500Principal name)
References Deprecated X509Name is deprecated or references (maybe indirectly) at least one deprecated element.

private static RSASSAPSSparams
creatPSSParams(AlgorithmIdentifier hashAlgId, int saltSize)

private static String
public byte[]
getEncoded()

Overrides org.bouncycastle.asn1.ASN1Object.getEncoded.

Implements org.bouncycastle.util.Encodable.getEncoded.

return a DER encoded byte array representing this object

public PublicKey
getPublicKey()

return the public key associated with the certification request - the public key is created using the BC provider.

public PublicKey
getPublicKey(String provider)

pack-priv static String
private void
private static ASN1Sequence
toDERSequence(byte[] bytes)

public boolean
verify()

verify the request using the BC provider.

public boolean
verify(String provider)

verify the request using the passed in provider.

public boolean
verify(PublicKey pubKey, String provider)

verify the request using the passed in public key and the provider..

Inherited from org.bouncycastle.asn1.pkcs.CertificationRequest:
getCertificationRequestInfogetInstancegetSignaturegetSignatureAlgorithmtoASN1Primitive

Field Detail

algorithmsback to summary
private static Hashtable<K, V> algorithms
keyAlgorithmsback to summary
private static Hashtable<K, V> keyAlgorithms
noParamsback to summary
private static Set<E> noParams
oidsback to summary
private static Hashtable<K, V> oids
paramsback to summary
private static Hashtable<K, V> params

Constructor Detail

PKCS10CertificationRequestback to summary
public PKCS10CertificationRequest(byte[] bytes)

construct a PKCS10 certification request from a DER encoded byte stream.

PKCS10CertificationRequestback to summary
public PKCS10CertificationRequest(ASN1Sequence sequence)
PKCS10CertificationRequestback to summary
public PKCS10CertificationRequest(String signatureAlgorithm, X509Name subject, PublicKey key, ASN1Set attributes, PrivateKey signingKey) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException

References Deprecated

X509Name is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

create a PKCS10 certfication request using the BC provider.

PKCS10CertificationRequestback to summary
public PKCS10CertificationRequest(String signatureAlgorithm, X500Principal subject, PublicKey key, ASN1Set attributes, PrivateKey signingKey) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException

create a PKCS10 certfication request using the BC provider.

PKCS10CertificationRequestback to summary
public PKCS10CertificationRequest(String signatureAlgorithm, X500Principal subject, PublicKey key, ASN1Set attributes, PrivateKey signingKey, String provider) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException

create a PKCS10 certfication request using the named provider.

PKCS10CertificationRequestback to summary
public PKCS10CertificationRequest(String signatureAlgorithm, X509Name subject, PublicKey key, ASN1Set attributes, PrivateKey signingKey, String provider) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException

References Deprecated

X509Name is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

create a PKCS10 certfication request using the named provider.

Method Detail

convertNameback to summary
private static X509Name convertName(X500Principal name)

References Deprecated

X509Name is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

creatPSSParamsback to summary
private static RSASSAPSSparams creatPSSParams(AlgorithmIdentifier hashAlgId, int saltSize)
getDigestAlgNameback to summary
private static String getDigestAlgName(ASN1ObjectIdentifier digestAlgOID)
getEncodedback to summary
public byte[] getEncoded()

Overrides org.bouncycastle.asn1.ASN1Object.getEncoded.

Implements org.bouncycastle.util.Encodable.getEncoded.

return a DER encoded byte array representing this object

Returns:byte[]

Doc from org.bouncycastle.asn1.ASN1Object.getEncoded.

BER/DER byte encoded object.

getPublicKeyback to summary
public PublicKey getPublicKey() throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException

return the public key associated with the certification request - the public key is created using the BC provider.

getPublicKeyback to summary
public PublicKey getPublicKey(String provider) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException
getSignatureNameback to summary
pack-priv static String getSignatureName(AlgorithmIdentifier sigAlgId)
setSignatureParametersback to summary
private void setSignatureParameters(Signature signature, ASN1Encodable params) throws NoSuchAlgorithmException, SignatureException, InvalidKeyException
toDERSequenceback to summary
private static ASN1Sequence toDERSequence(byte[] bytes)
verifyback to summary
public boolean verify() throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException

verify the request using the BC provider.

verifyback to summary
public boolean verify(String provider) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException

verify the request using the passed in provider.

verifyback to summary
public boolean verify(PublicKey pubKey, String provider) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException

verify the request using the passed in public key and the provider..