Package org.bouncycastle.asn1.cmc
Class CertificationRequest
- java.lang.Object
-
- org.bouncycastle.asn1.ASN1Object
-
- org.bouncycastle.asn1.cmc.CertificationRequest
-
- All Implemented Interfaces:
ASN1Encodable,Encodable
public class CertificationRequest extends ASN1Object
CertificationRequest ::= SEQUENCE { certificationRequestInfo SEQUENCE { version INTEGER, subject Name, subjectPublicKeyInfo SEQUENCE { algorithm AlgorithmIdentifier, subjectPublicKey BIT STRING }, attributes [0] IMPLICIT SET OF Attribute }, signatureAlgorithm AlgorithmIdentifier, signature BIT STRING }
-
-
Constructor Summary
Constructors Constructor Description CertificationRequest(X500Name subject, AlgorithmIdentifier subjectPublicAlgorithm, DERBitString subjectPublicKey, ASN1Set attributes, AlgorithmIdentifier signatureAlgorithm, DERBitString signature)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ASN1SetgetAttributes()static CertificationRequestgetInstance(java.lang.Object o)DERBitStringgetSignature()AlgorithmIdentifiergetSignatureAlgorithm()X500NamegetSubject()DERBitStringgetSubjectPublicKey()AlgorithmIdentifiergetSubjectPublicKeyAlgorithm()java.math.BigIntegergetVersion()ASN1PrimitiveparsePublicKey()If the public key is an encoded object this will return the ASN.1 primitives encoded - if the bitstring can't be decoded this routine throws an IOException.ASN1PrimitivetoASN1Primitive()Method providing a primitive representation of this object suitable for encoding.-
Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
-
-
-
Constructor Detail
-
CertificationRequest
public CertificationRequest(X500Name subject, AlgorithmIdentifier subjectPublicAlgorithm, DERBitString subjectPublicKey, ASN1Set attributes, AlgorithmIdentifier signatureAlgorithm, DERBitString signature)
-
-
Method Detail
-
getInstance
public static CertificationRequest getInstance(java.lang.Object o)
-
getVersion
public java.math.BigInteger getVersion()
-
getSubject
public X500Name getSubject()
-
getAttributes
public ASN1Set getAttributes()
-
getSubjectPublicKeyAlgorithm
public AlgorithmIdentifier getSubjectPublicKeyAlgorithm()
-
getSubjectPublicKey
public DERBitString getSubjectPublicKey()
-
parsePublicKey
public ASN1Primitive parsePublicKey() throws java.io.IOException
If the public key is an encoded object this will return the ASN.1 primitives encoded - if the bitstring can't be decoded this routine throws an IOException.- Returns:
- the public key as an ASN.1 primitive.
- Throws:
java.io.IOException- - if the bit string doesn't represent a DER encoded object.
-
getSignatureAlgorithm
public AlgorithmIdentifier getSignatureAlgorithm()
-
getSignature
public DERBitString getSignature()
-
toASN1Primitive
public ASN1Primitive toASN1Primitive()
Description copied from class:ASN1ObjectMethod providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-
-