Interface CardCertificateComputationData
public interface CardCertificateComputationData
Contains the input/output data of the
FreeTransactionManager.prepareComputeCardCertificate(CardCertificateComputationData)
method.- Since:
- 0.5.0
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the certificate generated by the SAM after the execution of the "PSO Compute Certificate" command.setCardAid
(byte[] aid) Sets the AID of the autonomous PKI application of the target card.setCardPublicKey
(byte[] cardPublicKey) Sets the public key of the card, provided as a 64-byte array.setCardSerialNumber
(byte[] serialNumber) Sets the serial number of the card for which the certificate is being generated.setCardStartupInfo
(byte[] startupInfo) Sets the startup info of the card for which the certificate is being generated.setEndDate
(LocalDate endDate) Sets the end date of the validity period of the certificate's public key.setStartDate
(LocalDate startDate) Sets the start date of the validity period of the certificate's public key.
-
Method Details
-
setCardPublicKey
Sets the public key of the card, provided as a 64-byte array.This key is expected to be on the secp256r1 elliptic curve. It will be used for the verification of card signatures.
- Parameters:
cardPublicKey
- The 64-byte array representing the public key on the secp256r1 curve.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If the provided key is null or out of range.- Since:
- 0.5.0
-
setStartDate
Sets the start date of the validity period of the certificate's public key.The start date is optional. If it is not defined, the certificate is not subject to a start date constraint.
- Parameters:
startDate
- The start date.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If date is null.- Since:
- 0.5.0
-
setEndDate
Sets the end date of the validity period of the certificate's public key.The end date is optional. If it is not defined, the certificate is not subject to an end date constraint.
- Parameters:
endDate
- The end date.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If date is null.- Since:
- 0.5.0
-
setCardAid
Sets the AID of the autonomous PKI application of the target card.The aid field cannot contain only zero bytes.
- Parameters:
aid
- The AID value as a 5 to 16 bytes byte array. Must not contain only zero bytes.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If the provided AID is null, out of range, or contains only zero bytes.- Since:
- 0.5.0
-
setCardSerialNumber
Sets the serial number of the card for which the certificate is being generated.- Parameters:
serialNumber
- The serial number of the card as an 8-byte byte array.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If the provided argument is null or out of range.- Since:
- 0.5.0
-
setCardStartupInfo
Sets the startup info of the card for which the certificate is being generated.- Parameters:
startupInfo
- The 7-byte byte array representing the startup info for the card certificate.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If the provided argument is null or out of range.- Since:
- 0.5.0
-
getCertificate
byte[] getCertificate()Returns the certificate generated by the SAM after the execution of the "PSO Compute Certificate" command.- Returns:
- A 316-byte byte array or null if the computation has not been performed.
- Since:
- 0.5.0
-