Top Description Fields Constructors Methods
org.bouncycastle.asn1.pkcs

public Class CertificationRequestInfo

extends ASN1Object
Class Inheritance
Imports
java.util.Enumeration, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1Primitive, .ASN1Sequence, .ASN1Set, .ASN1TaggedObject, .DERSequence, .DERTaggedObject, org.bouncycastle.asn1.x500.X500Name, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo, .X509Name

PKCS10 CertificationRequestInfo object.
 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
pack-priv ASN1Set
pack-priv X500Name
pack-priv SubjectPublicKeyInfo
pack-priv ASN1Integer

Constructor Summary

AccessConstructor and Description
public
CertificationRequestInfo(X500Name
subject to be associated with the public key
subject
,
SubjectPublicKeyInfo
public key to be associated with subject
pkInfo
,
ASN1Set
any attributes to be associated with the request.
attributes
)

Basic constructor.

public
CertificationRequestInfo(X509Name subject, SubjectPublicKeyInfo pkInfo, ASN1Set attributes)
Deprecated use X500Name method.

private

Method Summary

Modifier and TypeMethod and Description
public ASN1Set
public static CertificationRequestInfo
public X500Name
public SubjectPublicKeyInfo
public ASN1Integer
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

private static void
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

attributesback to summary
pack-priv ASN1Set attributes
subjectback to summary
pack-priv X500Name subject
subjectPKInfoback to summary
pack-priv SubjectPublicKeyInfo subjectPKInfo
versionback to summary
pack-priv ASN1Integer version

Constructor Detail

CertificationRequestInfoback to summary
public CertificationRequestInfo(X500Name subject, SubjectPublicKeyInfo pkInfo, ASN1Set attributes)

Basic constructor.

Note

Early on a lot of CAs would only accept messages with attributes missing. As the ASN.1 def shows the attributes field is not optional so should always at least contain an empty set. If a fully compliant request is required, pass in an empty set, the class will otherwise interpret a null as it should encode the request with the field missing.

Parameters
subject:X500Name

subject to be associated with the public key

pkInfo:SubjectPublicKeyInfo

public key to be associated with subject

attributes:ASN1Set

any attributes to be associated with the request.

CertificationRequestInfoback to summary
public CertificationRequestInfo(X509Name subject, SubjectPublicKeyInfo pkInfo, ASN1Set attributes)

Deprecated

use X500Name method.

CertificationRequestInfoback to summary
private CertificationRequestInfo(ASN1Sequence seq)

Method Detail

getAttributesback to summary
public ASN1Set getAttributes()
getInstanceback to summary
public static CertificationRequestInfo getInstance(Object obj)
getSubjectback to summary
public X500Name getSubject()
getSubjectPublicKeyInfoback to summary
public SubjectPublicKeyInfo getSubjectPublicKeyInfo()
getVersionback to summary
public ASN1Integer getVersion()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

Returns:ASN1Primitive

a primitive representation of this object.

validateAttributesback to summary
private static void validateAttributes(ASN1Set attributes)