Class CVC
Class implementing a decoder for card verifiable certificates or requests according to
Extended Access Control (EAC) as defined in BSI TR-03110 1.11 and 2.02.
Defined in: cvc.js.
Constructor Attributes | Constructor Name and Description |
---|---|
CVC(param)
Create a CVC object from a DER encoded ByteString.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
CVC.ATRIGHTS
Table of rights description for id-AT
|
<static> |
CVC.id_TA_ECDSA
TA constants
|
<static> |
CVC.ISRIGHTS
Table of rights description for id-IS
|
<static> |
CVC.OBJECTNAMES
Table of tag names
|
<static> |
CVC.STRIGHTS
Table of rights description for id-ST
|
<static> |
CVC.TAG_AT
Authentication Template
|
<static> |
CVC.TAG_BODY
Certificate Body
|
<static> |
CVC.TAG_CAR
Certification Authority Reference
|
<static> |
CVC.TAG_CED
Certificate Effective Date
|
<static> |
CVC.TAG_CHAT
Certificate Holder Authorisation Template
|
<static> |
CVC.TAG_CHR
Certificate Holder Reference
|
<static> |
CVC.TAG_CPI
Certificate Profile Identifier
|
<static> |
CVC.TAG_CVC
CV Certificate
|
<static> |
CVC.TAG_CXD
Certificate Expiration Date
|
<static> |
CVC.TAG_ECC_A
First coefficient a
|
<static> |
CVC.TAG_ECC_B
Second coefficient b
|
<static> |
CVC.TAG_ECC_G
Base Point G
|
<static> |
CVC.TAG_ECC_H
Cofactor f
|
<static> |
CVC.TAG_ECC_N
Order of the base point
|
<static> |
CVC.TAG_ECC_P
Prime Modulus
|
<static> |
CVC.TAG_ECC_Q
Public Point y
|
<static> |
CVC.TAG_EXTN
Certificate Extension
|
<static> |
CVC.TAG_PUK
Public Key
|
<static> |
CVC.TAG_SIG
Signature
|
Method Attributes | Method Name and Description |
---|---|
Return true of the certificate contains domain parameter
|
|
<static> |
CVC.decodeECPublicKey(pdo, key)
Decode a public key from the TR-03110 format
|
decorate()
Decorate the ASN.1 object with the correct name
|
|
<static> |
CVC.decorateTree(node)
Function to recursively walk the ASN.1 tree
|
getASN1()
Returns the certificate as ASN1 structure
|
|
getBytes()
Returns the encoded certificate
|
|
getCAR()
Returns the certification authority reference (CAR).
|
|
getCED()
Returns the certificate effective date (CED).
|
|
getCHAT()
Returns the extension identified by the object identifier.
|
|
getCHR()
Returns the certificate holder reference (CHR).
|
|
getCXD()
Returns the certificate expiration date (CXD).
|
|
getECPublicKey(domParam)
Returns the EC public key contained in the certificate.
|
|
getExtension(extoid)
Returns the extension identified by the object identifier.
|
|
<static> |
CVC.getHashMech(oid)
Return hash mechanism for object identifier
|
Returns the outer certification authority reference (CAR).
|
|
getPublicKey(domParam)
Returns the public key contained in the certificate.
|
|
Returns the public key object identifier
|
|
Return list of rights granted by the certificate
|
|
Returns the RSA public key contained in the certificate.
|
|
<static> |
CVC.getSignatureMech(oid)
Return signature mechanism for object identifier
|
getType()
Return a string describing the certificate type
|
|
Determine if this is an authenticated request
|
|
Determine if this is a certificate request
|
|
Determine if this is a countersigned authenticated request
|
|
<static> |
CVC.isECDSA(oid)
Return true of the object identifier starts with id-TA-ECDSA
|
Determine if this certificate is expired
|
|
toString()
Return a textual description of the certificate
|
|
verifyATWith(puk, oid, oid)
Verify outer signature of an authenticated request with public key
|
|
verifyATWithCVC(cvc, cvc)
Verify outer signature of an authenticated request with public key from card verifiable certificate
|
|
verifyWith(puk, oid, oid)
Verify certificate signature with public key
|
|
verifyWithCVC(cvc, cvc)
Verify certificate signature with public key from card verifiable certificate
|
Class Detail
CVC(param)
Create a CVC object from a DER encoded ByteString.
- Parameters:
- {ByteString} param
- the DER encoded certificate
- Returns:
Field Detail
<static>
CVC.ATRIGHTS
Table of rights description for id-AT
<static>
CVC.id_TA_ECDSA
TA constants
<static>
CVC.ISRIGHTS
Table of rights description for id-IS
<static>
CVC.OBJECTNAMES
Table of tag names
<static>
CVC.STRIGHTS
Table of rights description for id-ST
<static>
CVC.TAG_AT
Authentication Template
<static>
CVC.TAG_BODY
Certificate Body
<static>
CVC.TAG_CAR
Certification Authority Reference
<static>
CVC.TAG_CED
Certificate Effective Date
<static>
CVC.TAG_CHAT
Certificate Holder Authorisation Template
<static>
CVC.TAG_CHR
Certificate Holder Reference
<static>
CVC.TAG_CPI
Certificate Profile Identifier
<static>
CVC.TAG_CVC
CV Certificate
<static>
CVC.TAG_CXD
Certificate Expiration Date
<static>
CVC.TAG_ECC_A
First coefficient a
<static>
CVC.TAG_ECC_B
Second coefficient b
<static>
CVC.TAG_ECC_G
Base Point G
<static>
CVC.TAG_ECC_H
Cofactor f
<static>
CVC.TAG_ECC_N
Order of the base point
<static>
CVC.TAG_ECC_P
Prime Modulus
<static>
CVC.TAG_ECC_Q
Public Point y
<static>
CVC.TAG_EXTN
Certificate Extension
<static>
CVC.TAG_PUK
Public Key
<static>
CVC.TAG_SIG
Signature
Method Detail
{boolean}
containsDomainParameter()
Return true of the certificate contains domain parameter
- Returns:
- true, if certificate contains domain parameter
<static>
CVC.decodeECPublicKey(pdo, key)
Decode a public key from the TR-03110 format
- Parameters:
- {ASN1} pdo
- the public key data object
- {Key} key
- the key object to fill
decorate()
Decorate the ASN.1 object with the correct name
<static>
CVC.decorateTree(node)
Function to recursively walk the ASN.1 tree
- Parameters:
- node
{ASN1}
getASN1()
Returns the certificate as ASN1 structure
- Returns:
- the certificate as ASN1 structure
{ByteString}
getBytes()
Returns the encoded certificate
- Returns:
- the DER encoded certificate
{PublicKeyReference}
getCAR()
Returns the certification authority reference (CAR).
- Returns:
- the CAR or null
{Date}
getCED()
Returns the certificate effective date (CED).
- Returns:
- the CED or null
{ASN1}
getCHAT()
Returns the extension identified by the object identifier.
- Returns:
- the extension including the OID or null if not defined
{PublicKeyReference}
getCHR()
Returns the certificate holder reference (CHR).
- Returns:
- the CHR
{Date}
getCXD()
Returns the certificate expiration date (CXD).
- Returns:
- the CXD or null
{Key}
getECPublicKey(domParam)
Returns the EC public key contained in the certificate.
- Parameters:
- {Key} domParam
- optional domain parameter if they are not contained in certificate
- Returns:
- the public key object
{ASN1}
getExtension(extoid)
Returns the extension identified by the object identifier.
- Parameters:
- extoid
- Returns:
- the extension including the OID or null if not defined
<static>
{Number}
CVC.getHashMech(oid)
Return hash mechanism for object identifier
- Parameters:
- {ByteString} oid
- the object identifer from the public key object
- Returns:
- the hash mechanism as Crypto. constant or -1 if not defined
{PublicKeyReference}
getOuterCAR()
Returns the outer certification authority reference (CAR).
- Returns:
- the outer CAR or null
{Key}
getPublicKey(domParam)
Returns the public key contained in the certificate.
- Parameters:
- {Key} domParam
- optional domain parameter if they are not contained in certificate
- Returns:
- the public key object
{ByteString}
getPublicKeyOID()
Returns the public key object identifier
- Returns:
- the object identifier assigned to the public key
{String[]}
getRightsAsList()
Return list of rights granted by the certificate
- Returns:
- the list of rights
{Key}
getRSAPublicKey()
Returns the RSA public key contained in the certificate.
- Returns:
- the public key object
<static>
{Number}
CVC.getSignatureMech(oid)
Return signature mechanism for object identifier
- Parameters:
- {ByteString} oid
- the object identifer from the public key object
- Returns:
- the signature mechanism as Crypto. constant or -1 if not defined
{String}
getType()
Return a string describing the certificate type
- Returns:
- a describing string
{Boolean}
isAuthenticatedRequest()
Determine if this is an authenticated request
- Returns:
- true, if authenticated request
{Boolean}
isCertificateRequest()
Determine if this is a certificate request
- Returns:
- true, if certificate request
{Boolean}
isCountersignedRequest()
Determine if this is a countersigned authenticated request
- Returns:
- true, if countersigned authenticated request
<static>
{boolean}
CVC.isECDSA(oid)
Return true of the object identifier starts with id-TA-ECDSA
- Parameters:
- oid
- Returns:
- true, if ECDSA based OID
{Boolean}
isExpired()
Determine if this certificate is expired
- Returns:
- true, if certificate is expired
{String}
toString()
Return a textual description of the certificate
- Returns:
- a string containing information about the certificate
{Boolean}
verifyATWith(puk, oid, oid)
Verify outer signature of an authenticated request with public key
- Parameters:
- {Key} puk
- the public key
- {ByteString} oid
- the signature algorithm
- oid
- Returns:
- true if the signature is valid
{Boolean}
verifyATWithCVC(cvc, cvc)
Verify outer signature of an authenticated request with public key from card verifiable certificate
- Parameters:
- {CVC} cvc
- the card verifiable certificate used to obtain the public key
- cvc
- Returns:
- true if the signature is valid
{Boolean}
verifyWith(puk, oid, oid)
Verify certificate signature with public key
- Parameters:
- {Key} puk
- the public key
- {ByteString} oid
- the signature algorithm
- oid
- Returns:
- true if the signature is valid
{Boolean}
verifyWithCVC(cvc, cvc)
Verify certificate signature with public key from card verifiable certificate
- Parameters:
- {CVC} cvc
- the card verifiable certificate used to obtain the public key
- cvc
- Returns:
- true if the signature is valid