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

public Class CertificateBody

extends ASN1Object
Class Inheritance
Imports
java.io.IOException, org.bouncycastle.asn1.ASN1ApplicationSpecific, .ASN1EncodableVector, .ASN1InputStream, .ASN1Object, .ASN1Primitive, .BERTags, .DERApplicationSpecific, .DEROctetString

an Iso7816CertificateBody structure.
 CertificateBody ::= SEQUENCE {
     // version of the certificate format. Must be 0 (version 1)
     CertificateProfileIdentifer         ASN1ApplicationSpecific,
     //uniquely identifies the issuinng CA's signature key pair
     // contains the iso3166-1 alpha2 encoded country code, the
     // name of issuer and the sequence number of the key pair.
     CertificationAuthorityReference        ASN1ApplicationSpecific,
     // stores the encoded public key
     PublicKey                            Iso7816PublicKey,
     //associates the public key contained in the certificate with a unique name
     // contains the iso3166-1 alpha2 encoded country code, the
     // name of the holder and the sequence number of the key pair.
     certificateHolderReference            ASN1ApplicationSpecific,
     // Encodes the role of the holder (i.e. CVCA, DV, IS) and assigns read/write
     // access rights to data groups storing sensitive data
     certificateHolderAuthorization        Iso7816CertificateHolderAuthorization,
     // the date of the certificate generation
     CertificateEffectiveDate            ASN1ApplicationSpecific,
     // the date after wich the certificate expires
     certificateExpirationDate            ASN1ApplicationSpecific
 }

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private ASN1ApplicationSpecific
private ASN1ApplicationSpecific
private CertificateHolderAuthorization
private ASN1ApplicationSpecific
private ASN1ApplicationSpecific
private int
private ASN1ApplicationSpecific
private static final int
private static final int
private static final int
private static final int
private static final int
public static final int
private PublicKeyDataObject
public static final int

Constructor Summary

AccessConstructor and Description
public
CertificateBody(DERApplicationSpecific certificateProfileIdentifier, CertificationAuthorityReference certificationAuthorityReference, PublicKeyDataObject publicKey, CertificateHolderReference certificateHolderReference, CertificateHolderAuthorization certificateHolderAuthorization, PackedDate certificateEffectiveDate, PackedDate certificateExpirationDate)

public
CertificateBody(ASN1ApplicationSpecific certificateProfileIdentifier, CertificationAuthorityReference certificationAuthorityReference, PublicKeyDataObject publicKey, CertificateHolderReference certificateHolderReference, CertificateHolderAuthorization certificateHolderAuthorization, PackedDate certificateEffectiveDate, PackedDate certificateExpirationDate)

builds an Iso7816CertificateBody by settings each parameters.

private
CertificateBody(ASN1ApplicationSpecific
ASN1ApplicationSpecific containing the whole body.
obj
)

builds an Iso7816CertificateBody with an ASN1InputStream.

Method Summary

Modifier and TypeMethod and Description
public PackedDate

Returns:

the date of the certificate generation
getCertificateEffectiveDate
()

public PackedDate

Returns:

the date after wich the certificate expires
getCertificateExpirationDate
()

public CertificateHolderAuthorization

Returns:

the Iso7816CertificateHolderAuthorization
getCertificateHolderAuthorization
()

the Iso7816CertificateHolderAuthorization encodes the role of the holder (i.e. CVCA, DV, IS) and assigns read/write access rights to data groups storing sensitive data.

public CertificateHolderReference

Returns:

the certificateHolderReference.
getCertificateHolderReference
()

certificateHolderReference : associates the public key contained in the certificate with a unique name

public ASN1ApplicationSpecific

Returns:

the CertificateProfileIdentifier
getCertificateProfileIdentifier
()

CertificateProfileIdentifier : version of the certificate format.

public int

Returns:

the int representing the data already set.
getCertificateType
()

gives the type of the certificate (value should be profileType or requestType if all data are set).

public CertificationAuthorityReference

Returns:

the certificationAuthorityReference
getCertificationAuthorityReference
()

get the certificationAuthorityReference certificationAuthorityReference : uniquely identifies the issuinng CA's signature key pair

public static CertificateBody

Returns:

the Iso7816CertificateBody taken from Object obj.
getInstance
(Object
is the Object to extract the certificate body from.
obj
)

Gives an instance of Iso7816CertificateBody taken from Object obj

public PublicKeyDataObject

Returns:

the PublicKey
getPublicKey
()

private ASN1Primitive

Returns:

return the "profile" type certificate body.
profileToASN1Object
()

create a profile type Iso7816CertificateBody.

private ASN1Primitive

Returns:

return the "request" type certificate body.
requestToASN1Object
()

create a request type Iso7816CertificateBody.

private void
setCertificateEffectiveDate(ASN1ApplicationSpecific
ASN1ApplicationSpecific containing the date of the certificate generation
ced
)

set the date of the certificate generation

private void
setCertificateExpirationDate(ASN1ApplicationSpecific
ASN1ApplicationSpecific containing the date after wich the certificate expires
ced
)

set the date after wich the certificate expires

private void
setCertificateHolderAuthorization(CertificateHolderAuthorization
the Certificate Holder Authorization
cha
)

set the CertificateHolderAuthorization

private void
private void
private void
setCertificationAuthorityReference(ASN1ApplicationSpecific
the ASN1ApplicationSpecific containing the CertificationAuthorityReference.
certificationAuthorityReference
)

set the CertificationAuthorityReference.

private void
private void
setPublicKey(PublicKeyDataObject
: the ASN1ApplicationSpecific containing the public key
publicKey
)

set the public Key

public ASN1Primitive

Returns:

return the ASN1Primitive representing the "request" or "profile" type certificate body.
toASN1Primitive
()

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

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

create a "request" or "profile" type Iso7816CertificateBody according to the variables sets.
Inherited from org.bouncycastle.asn1.ASN1Object:
equalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

CARback to summary
private static final int CAR
CEfDback to summary
private static final int CEfD
certificateEffectiveDateback to summary
private ASN1ApplicationSpecific certificateEffectiveDate
certificateExpirationDateback to summary
private ASN1ApplicationSpecific certificateExpirationDate
certificateHolderAuthorizationback to summary
private CertificateHolderAuthorization certificateHolderAuthorization
certificateHolderReferenceback to summary
private ASN1ApplicationSpecific certificateHolderReference
certificateProfileIdentifierback to summary
private ASN1ApplicationSpecific certificateProfileIdentifier
certificateTypeback to summary
private int certificateType
certificationAuthorityReferenceback to summary
private ASN1ApplicationSpecific certificationAuthorityReference
CExDback to summary
private static final int CExD
CHAback to summary
private static final int CHA
CHRback to summary
private static final int CHR
CPIback to summary
private static final int CPI
PKback to summary
private static final int PK
profileTypeback to summary
public static final int profileType
publicKeyback to summary
private PublicKeyDataObject publicKey
requestTypeback to summary
public static final int requestType

Constructor Detail

CertificateBodyback to summary
public CertificateBody(DERApplicationSpecific certificateProfileIdentifier, CertificationAuthorityReference certificationAuthorityReference, PublicKeyDataObject publicKey, CertificateHolderReference certificateHolderReference, CertificateHolderAuthorization certificateHolderAuthorization, PackedDate certificateEffectiveDate, PackedDate certificateExpirationDate)
CertificateBodyback to summary
public CertificateBody(ASN1ApplicationSpecific certificateProfileIdentifier, CertificationAuthorityReference certificationAuthorityReference, PublicKeyDataObject publicKey, CertificateHolderReference certificateHolderReference, CertificateHolderAuthorization certificateHolderAuthorization, PackedDate certificateEffectiveDate, PackedDate certificateExpirationDate)

builds an Iso7816CertificateBody by settings each parameters.

CertificateBodyback to summary
private CertificateBody(ASN1ApplicationSpecific obj) throws IOException

builds an Iso7816CertificateBody with an ASN1InputStream.

Parameters
obj:ASN1ApplicationSpecific

ASN1ApplicationSpecific containing the whole body.

Exceptions
IOException:
if the body is not valid.

Method Detail

getCertificateEffectiveDateback to summary
public PackedDate getCertificateEffectiveDate()
Returns:PackedDate

the date of the certificate generation

getCertificateExpirationDateback to summary
public PackedDate getCertificateExpirationDate() throws IOException
Returns:PackedDate

the date after wich the certificate expires

getCertificateHolderAuthorizationback to summary
public CertificateHolderAuthorization getCertificateHolderAuthorization() throws IOException

the Iso7816CertificateHolderAuthorization encodes the role of the holder (i.e. CVCA, DV, IS) and assigns read/write access rights to data groups storing sensitive data. This functions returns the Certificate Holder Authorization

Returns:CertificateHolderAuthorization

the Iso7816CertificateHolderAuthorization

getCertificateHolderReferenceback to summary
public CertificateHolderReference getCertificateHolderReference()

certificateHolderReference : associates the public key contained in the certificate with a unique name

Returns:CertificateHolderReference

the certificateHolderReference.

getCertificateProfileIdentifierback to summary
public ASN1ApplicationSpecific getCertificateProfileIdentifier()

CertificateProfileIdentifier : version of the certificate format. Must be 0 (version 1)

Returns:ASN1ApplicationSpecific

the CertificateProfileIdentifier

getCertificateTypeback to summary
public int getCertificateType()

gives the type of the certificate (value should be profileType or requestType if all data are set).

Returns:int

the int representing the data already set.

getCertificationAuthorityReferenceback to summary
public CertificationAuthorityReference getCertificationAuthorityReference() throws IOException

get the certificationAuthorityReference certificationAuthorityReference : uniquely identifies the issuinng CA's signature key pair

Returns:CertificationAuthorityReference

the certificationAuthorityReference

getInstanceback to summary
public static CertificateBody getInstance(Object obj) throws IOException

Gives an instance of Iso7816CertificateBody taken from Object obj

Parameters
obj:Object

is the Object to extract the certificate body from.

Returns:CertificateBody

the Iso7816CertificateBody taken from Object obj.

Exceptions
IOException:
if object is not valid.
getPublicKeyback to summary
public PublicKeyDataObject getPublicKey()
Returns:PublicKeyDataObject

the PublicKey

profileToASN1Objectback to summary
private ASN1Primitive profileToASN1Object() throws IOException

create a profile type Iso7816CertificateBody.

Returns:ASN1Primitive

return the "profile" type certificate body.

Exceptions
IOException:
if the ASN1ApplicationSpecific cannot be created.
requestToASN1Objectback to summary
private ASN1Primitive requestToASN1Object() throws IOException

create a request type Iso7816CertificateBody.

Returns:ASN1Primitive

return the "request" type certificate body.

Exceptions
IOException:
if the ASN1ApplicationSpecific cannot be created.
setCertificateEffectiveDateback to summary
private void setCertificateEffectiveDate(ASN1ApplicationSpecific ced) throws IllegalArgumentException

set the date of the certificate generation

Parameters
ced:ASN1ApplicationSpecific

ASN1ApplicationSpecific containing the date of the certificate generation

Exceptions
IllegalArgumentException:
if the tag is not Iso7816Tags.APPLICATION_EFFECTIVE_DATE
setCertificateExpirationDateback to summary
private void setCertificateExpirationDate(ASN1ApplicationSpecific ced) throws IllegalArgumentException

set the date after wich the certificate expires

Parameters
ced:ASN1ApplicationSpecific

ASN1ApplicationSpecific containing the date after wich the certificate expires

Exceptions
IllegalArgumentException:
if the tag is not Iso7816Tags.APPLICATION_EXPIRATION_DATE
setCertificateHolderAuthorizationback to summary
private void setCertificateHolderAuthorization(CertificateHolderAuthorization cha)

set the CertificateHolderAuthorization

Parameters
cha:CertificateHolderAuthorization

the Certificate Holder Authorization

setCertificateHolderReferenceback to summary
private void setCertificateHolderReference(ASN1ApplicationSpecific certificateHolderReference) throws IllegalArgumentException
setCertificateProfileIdentifierback to summary
private void setCertificateProfileIdentifier(ASN1ApplicationSpecific certificateProfileIdentifier) throws IllegalArgumentException
setCertificationAuthorityReferenceback to summary
private void setCertificationAuthorityReference(ASN1ApplicationSpecific certificationAuthorityReference) throws IllegalArgumentException

set the CertificationAuthorityReference.

Parameters
certificationAuthorityReference:ASN1ApplicationSpecific

the ASN1ApplicationSpecific containing the CertificationAuthorityReference.

Exceptions
IllegalArgumentException:
if the ASN1ApplicationSpecific is not valid.
setIso7816CertificateBodyback to summary
private void setIso7816CertificateBody(ASN1ApplicationSpecific appSpe) throws IOException
setPublicKeyback to summary
private void setPublicKey(PublicKeyDataObject publicKey)

set the public Key

Parameters
publicKey:PublicKeyDataObject

: the ASN1ApplicationSpecific containing the public key

toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

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

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

create a "request" or "profile" type Iso7816CertificateBody according to the variables sets.

Returns:ASN1Primitive

return the ASN1Primitive representing the "request" or "profile" type certificate body.