Package org.bouncycastle.asn1.eac
Class CVCertificate
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.eac.CVCertificate
- All Implemented Interfaces:
org.bouncycastle.asn1.ASN1Encodable
,org.bouncycastle.util.Encodable
public class CVCertificate
extends org.bouncycastle.asn1.ASN1Object
an iso7816Certificate structure.
Certificate ::= SEQUENCE { CertificateBody Iso7816CertificateBody, signature DER Application specific }
-
Constructor Summary
ConstructorDescriptionCVCertificate
(org.bouncycastle.asn1.ASN1InputStream aIS) Create an iso7816Certificate structure from an ASN1InputStream.CVCertificate
(CertificateBody body, byte[] signature) Create an iso7816Certificate structure from a body and its signature. -
Method Summary
Modifier and TypeMethodDescriptiongetBody()
Gives the body of the certificate.int
org.bouncycastle.asn1.ASN1ObjectIdentifier
int
static CVCertificate
getInstance
(Object obj) Create an iso7816Certificate structure from an object.int
getRole()
return a bits field coded on one byte.byte[]
Gives the signature of the whole body.org.bouncycastle.asn1.ASN1Primitive
Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
CVCertificate
Create an iso7816Certificate structure from an ASN1InputStream.- Parameters:
aIS
- the byte stream to parse.- Throws:
IOException
- if there is a problem parsing the data.
-
CVCertificate
Create an iso7816Certificate structure from a body and its signature.- Parameters:
body
- the Iso7816CertificateBody object containing the body.signature
- the byte array containing the signature- Throws:
IOException
- if there is a problem parsing the data.
-
-
Method Details
-
getInstance
Create an iso7816Certificate structure from an object.- Parameters:
obj
- the Object to extract the certificate from.- Returns:
- the Iso7816CertificateStructure represented by the byte stream.
-
getSignature
public byte[] getSignature()Gives the signature of the whole body. Type of signature is given in the Iso7816CertificateBody.Iso7816PublicKey.ASN1ObjectIdentifier- Returns:
- the signature of the body.
-
getBody
Gives the body of the certificate.- Returns:
- the body.
-
toASN1Primitive
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()- Specified by:
toASN1Primitive
in interfaceorg.bouncycastle.asn1.ASN1Encodable
- Specified by:
toASN1Primitive
in classorg.bouncycastle.asn1.ASN1Object
- See Also:
-
getHolderAuthorization
- Returns:
- the Holder authorization and role (CVCA, DV, IS).
- Throws:
IOException
-
getEffectiveDate
- Returns:
- the date of the certificate generation
- Throws:
IOException
-
getCertificateType
public int getCertificateType()- Returns:
- the type of certificate (request or profile) value is either Iso7816CertificateBody.profileType or Iso7816CertificateBody.requestType. Any other value is not valid.
-
getExpirationDate
- Returns:
- the date of the certificate generation
- Throws:
IOException
-
getRole
return a bits field coded on one byte. For signification of the several bit see Iso7816CertificateHolderAuthorization- Returns:
- role and access rigth
- Throws:
IOException
- See Also:
-
getAuthorityReference
- Returns:
- the Authority Reference field of the certificate
- Throws:
IOException
-
getHolderReference
- Returns:
- the Holder Reference Field of the certificate
- Throws:
IOException
-
getHolderAuthorizationRole
- Returns:
- the bits corresponding to the role intented for the certificate See Iso7816CertificateHolderAuthorization static int for values
- Throws:
IOException
-
getHolderAuthorizationRights
- Returns:
- the bits corresponding the authorizations contained in the certificate See Iso7816CertificateHolderAuthorization static int for values
- Throws:
IOException
-