Class ManagePKA
Class providing support for public key authentication
Defined in: ManagePKA.js.
Constructor Attributes | Constructor Name and Description |
---|---|
ManagePKA(sc, deviceId)
Manage Public Key Authentication
|
Method Attributes | Method Name and Description |
---|---|
Check if registered public keys can be enumerated
|
|
checkKeyStatus(chr)
Check status of public key
|
|
Describe current status in human readable form
|
|
Enumerate names (CHR) or registered public keys
|
|
Get number of keys already authenticated in this session
|
|
Get number of public keys missing for complete setup
|
|
Get number of public keys (m)
|
|
Get number of keys required for successfull authentication (n)
|
|
isActive()
Check if public key authentication is active for device
|
|
performAuthentication(srcsc, key)
Perform authentication with source SmartCard-HSM and key on that device
|
|
registerPublicKey(pk, devcert, dicacert, replace)
Validate and register public key
|
Class Detail
ManagePKA(sc, deviceId)
Manage Public Key Authentication
- Parameters:
- {SmartCardHSM} sc
- the SmartCard-HSM used as target for PKA
- {ByteString} deviceId
- the device id as returned by getCHR().getBytes() for the device certificate
Method Detail
{boolean}
canEnumeratePublicKeys()
Check if registered public keys can be enumerated
- Returns:
- true if enumeration is supported
{Number}
checkKeyStatus(chr)
Check status of public key
- Parameters:
- {PublicKeyReference} chr
- the public key reference under which the public key is registered
- Returns:
- ManagePKA.KEY_PRESENT if key is registered in SmartCard-HSM, ManagePKA.KEY_NOT_FOUND if not. ManagePKA.KEY_ALREADY_AUTHENTICATED is returned if the public key has already been authenticated
{String}
describeStatus()
Describe current status in human readable form
- Returns:
- the status
{Object}
enumeratePublicKeys()
Enumerate names (CHR) or registered public keys
- Returns:
- Object with property chr containing the PublicKeyReference and with property status containing ManagePKA.KEY_PRESENT if a key is registered at that slot, ManagePKA.KEY_NOT_FOUND if not. ManagePKA.KEY_ALREADY_AUTHENTICATED is returned if the public key has already been authenticated.
{Number}
getAuthenticatedPublicKeys()
Get number of keys already authenticated in this session
- Returns:
- the number of keys already authenticated in this session
{Number}
getMissingPublicKeys()
Get number of public keys missing for complete setup
- Returns:
- the number of public keys missing for complete setup
{Number}
getNumberOfPublicKeys()
Get number of public keys (m)
- Returns:
- the number of public keys (m)
{Number}
getRequiredPublicKeysForAuthentication()
Get number of keys required for successfull authentication (n)
- Returns:
- the number of keys required for successfull authentication (n)
{boolean}
isActive()
Check if public key authentication is active for device
- Returns:
- true if supported and active
performAuthentication(srcsc, key)
Perform authentication with source SmartCard-HSM and key on that device
- Parameters:
- {SmartCardHSM} srcsc
- the SmartCard-HSM containing the private key for authentication
- {Key} key
- the private key
registerPublicKey(pk, devcert, dicacert, replace)
Validate and register public key
- Parameters:
- {CVC} pk
- public key in CSR format from card
- {CVC} devcert
- device certificate
- {CVC} dicacert
- device issuer certificate
- {Number} replace
- the id of the key to be replaced (0-based) or undefined