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

public Class CVCertificate

extends ASN1Object
Class Inheritance
Imports
java.io.IOException, java.util.Enumeration, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1InputStream, .ASN1Object, .ASN1ObjectIdentifier, .ASN1OctetString, .ASN1ParsingException, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .BERTags, .DERSequence, org.bouncycastle.util.Arrays

an iso7816Certificate structure.
 Certificate ::= SEQUENCE {
     CertificateBody         Iso7816CertificateBody,
     signature               DER Application specific
 }

Field Summary

Modifier and TypeField and Description
private static int
private CertificateBody
private byte[]
private static int
private int

Constructor Summary

AccessConstructor and Description
public
CVCertificate(ASN1InputStream
the byte stream to parse.
aIS
)

Create an iso7816Certificate structure from an ASN1InputStream.

private
CVCertificate(ASN1TaggedObject
the ASN1TaggedObject object.
appSpe
)

Create an iso7816Certificate structure from a ASN1TaggedObject.

public
CVCertificate(CertificateBody
the Iso7816CertificateBody object containing the body.
body
,
byte[]
the byte array containing the signature
signature
)

Create an iso7816Certificate structure from a body and its signature.

Method Summary

Modifier and TypeMethod and Description
public CertificationAuthorityReference

Returns:

the Authority Reference field of the certificate
getAuthorityReference
()

public CertificateBody

Returns:

the body.
getBody
()

Gives the body of the certificate.

public int

Returns:

the type of certificate (request or profile) value is either Iso7816CertificateBody.profileType or Iso7816CertificateBody.requestType. Any other value is not valid.
getCertificateType
()

public PackedDate

Returns:

the date of the certificate generation
getEffectiveDate
()

public PackedDate

Returns:

the date of the certificate generation
getExpirationDate
()

public ASN1ObjectIdentifier

Returns:

the Holder authorization and role (CVCA, DV, IS).
getHolderAuthorization
()

public Flags

Returns:

the bits corresponding the authorizations contained in the certificate See Iso7816CertificateHolderAuthorization static int for values
getHolderAuthorizationRights
()

public int

Returns:

the bits corresponding to the role intented for the certificate See Iso7816CertificateHolderAuthorization static int for values
getHolderAuthorizationRole
()

public CertificateHolderReference

Returns:

the Holder Reference Field of the certificate
getHolderReference
()

public static CVCertificate

Returns:

the Iso7816CertificateStructure represented by the byte stream.
getInstance
(Object
the Object to extract the certificate from.
obj
)

Create an iso7816Certificate structure from an object.

public int

Returns:

role and access rigth
getRole
()

return a bits field coded on one byte.

public byte[]

Returns:

the signature of the body.
getSignature
()

Gives the signature of the whole body.

private void
private void
setPrivateData(ASN1TaggedObject
is a ASN1TaggedObject object containing body and signature.
appSpe
)

Sets the values of the certificate (body and signature).

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.
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

bodyValidback to summary
private static int bodyValid
certificateBodyback to summary
private CertificateBody certificateBody
signatureback to summary
private byte[] signature
signValidback to summary
private static int signValid
validback to summary
private int valid

Constructor Detail

CVCertificateback to summary
public CVCertificate(ASN1InputStream aIS) throws IOException

Create an iso7816Certificate structure from an ASN1InputStream.

Parameters
aIS:ASN1InputStream

the byte stream to parse.

Exceptions
IOException:
if there is a problem parsing the data.
CVCertificateback to summary
private CVCertificate(ASN1TaggedObject appSpe) throws IOException

Create an iso7816Certificate structure from a ASN1TaggedObject.

Parameters
appSpe:ASN1TaggedObject

the ASN1TaggedObject object.

Exceptions
IOException:
if there is a problem parsing the data.
CVCertificateback to summary
public CVCertificate(CertificateBody body, byte[] signature) throws IOException

Create an iso7816Certificate structure from a body and its signature.

Parameters
body:CertificateBody

the Iso7816CertificateBody object containing the body.

signature:byte[]

the byte array containing the signature

Exceptions
IOException:
if there is a problem parsing the data.

Method Detail

getAuthorityReferenceback to summary
public CertificationAuthorityReference getAuthorityReference() throws IOException
Returns:CertificationAuthorityReference

the Authority Reference field of the certificate

getBodyback to summary
public CertificateBody getBody()

Gives the body of the certificate.

Returns:CertificateBody

the body.

getCertificateTypeback to summary
public int getCertificateType()
Returns:int

the type of certificate (request or profile) value is either Iso7816CertificateBody.profileType or Iso7816CertificateBody.requestType. Any other value is not valid.

getEffectiveDateback to summary
public PackedDate getEffectiveDate() throws IOException
Returns:PackedDate

the date of the certificate generation

getExpirationDateback to summary
public PackedDate getExpirationDate() throws IOException
Returns:PackedDate

the date of the certificate generation

getHolderAuthorizationback to summary
public ASN1ObjectIdentifier getHolderAuthorization() throws IOException
Returns:ASN1ObjectIdentifier

the Holder authorization and role (CVCA, DV, IS).

getHolderAuthorizationRightsback to summary
public Flags getHolderAuthorizationRights() throws IOException
Returns:Flags

the bits corresponding the authorizations contained in the certificate See Iso7816CertificateHolderAuthorization static int for values

getHolderAuthorizationRoleback to summary
public int getHolderAuthorizationRole() throws IOException
Returns:int

the bits corresponding to the role intented for the certificate See Iso7816CertificateHolderAuthorization static int for values

getHolderReferenceback to summary
public CertificateHolderReference getHolderReference() throws IOException
Returns:CertificateHolderReference

the Holder Reference Field of the certificate

getInstanceback to summary
public static CVCertificate getInstance(Object obj)

Create an iso7816Certificate structure from an object.

Parameters
obj:Object

the Object to extract the certificate from.

Returns:CVCertificate

the Iso7816CertificateStructure represented by the byte stream.

getRoleback to summary
public int getRole() throws IOException

return a bits field coded on one byte. For signification of the several bit see Iso7816CertificateHolderAuthorization

Returns:int

role and access rigth

See Also
CertificateHolderAuthorization
getSignatureback to summary
public byte[] getSignature()

Gives the signature of the whole body. Type of signature is given in the Iso7816CertificateBody.Iso7816PublicKey.ASN1ObjectIdentifier

Returns:byte[]

the signature of the body.

initFromback to summary
private void initFrom(ASN1InputStream aIS) throws IOException
setPrivateDataback to summary
private void setPrivateData(ASN1TaggedObject appSpe) throws IOException

Sets the values of the certificate (body and signature).

Parameters
appSpe:ASN1TaggedObject

is a ASN1TaggedObject object containing body and signature.

Exceptions
IOException:
if tags or value are incorrect.
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.

See Also
org.bouncycastle.asn1.ASN1Object#toASN1Primitive()