Interface FreeTransactionManager
- All Superinterfaces:
ReadTransactionManager<FreeTransactionManager>
,TransactionManager<FreeTransactionManager>
An instance of this interface can be obtained via the method LegacySamApiFactory.createFreeTransactionManager(CardReader, LegacySam)
.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionExecutes the required commands to obtain the security context, which will be used for future asynchronous write operations.Schedules the execution of a "PSO Compute Certificate" command.Schedules the execution of a "Data Cipher" or "PSO Compute Signature" command.prepareGenerateCardAsymmetricKeyPair
(KeyPairContainer keyPairContainer) Schedules the execution of "Card Generate Asymmetric Key Pair" command.prepareGetData
(GetDataTag tag) Schedules the execution of a "Get Data" command for the specified tag.Schedules the execution of a "Data Cipher" or "PSO Verify Signature" command.Methods inherited from interface org.eclipse.keypop.calypso.crypto.legacysam.transaction.ReadTransactionManager
prepareReadAllCountersStatus, prepareReadCounterStatus, prepareReadSystemKeyParameters
Methods inherited from interface org.eclipse.keypop.calypso.crypto.legacysam.transaction.TransactionManager
processCommands
-
Method Details
-
prepareGetData
Schedules the execution of a "Get Data" command for the specified tag.Once this command is processed, data is accessible using dedicated getter methods, like
LegacySam.getCaCertificate()
.- Parameters:
tag
- The tag to retrieve the data for.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If tag is null.- Since:
- 0.5.0
-
prepareGenerateCardAsymmetricKeyPair
Schedules the execution of "Card Generate Asymmetric Key Pair" command.Once this command is processed, the key pair data will be available in the provided output
KeyPairContainer
objects.- Parameters:
keyPairContainer
- The container for the output data.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If keyPairContainer is null.- Since:
- 0.5.0
- See Also:
-
prepareComputeCardCertificate
Schedules the execution of a "PSO Compute Certificate" command.Once the command is processed, the result will be available in the provided input/output
LegacyCardCertificateComputationData
object.- Parameters:
data
- The input/output data containing the parameters of the command.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If data is null.- Since:
- 0.5.0
- See Also:
-
prepareComputeSignature
Schedules the execution of a "Data Cipher" or "PSO Compute Signature" command.Once the command is processed, the result will be available in the provided input/output
BasicSignatureComputationData
orTraceableSignatureComputationData
objects.The signature may be used for many purposes, for example:
- To add a signature to data recorded in a contactless card or ticket.
Remark: to speed up processing, it is recommended to use a constant signing key (which is not diversified before ciphering). Instead, the serial number of the card or ticket should be inserted at the beginning of the data to sign. - To sign some data reported from a terminal to a central system.
Remark: in this case, the terminal SAM contains a signing work key diversified with its own serial number, guarantying that the data has indeed been signed by this SAM. The central system SAM uses the master signing key, diversified before signing with the diversifier set previously by "Select Diversifier" command.
- Parameters:
data
- The input/output data containing the parameters of the command.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If the input data is inconsistent.- Since:
- 0.1.0
- See Also:
- To add a signature to data recorded in a contactless card or ticket.
-
prepareVerifySignature
Schedules the execution of a "Data Cipher" or "PSO Verify Signature" command.Once the command is processed, the result will be available in the provided input/output
BasicSignatureVerificationData
orTraceableSignatureVerificationData
objects.- Parameters:
data
- The input/output data containing the parameters of the command.- Returns:
- The current instance.
- Throws:
IllegalArgumentException
- If the input data is inconsistent.SamRevokedException
- If the signature has been computed in "SAM traceability" mode and the SAM revocation status check has been requested and the SAM is revoked (for traceable signature only).- Since:
- 0.1.0
- See Also:
-
exportTargetSamContextForAsyncTransaction
String exportTargetSamContextForAsyncTransaction()Executes the required commands to obtain the security context, which will be used for future asynchronous write operations.The exported target SAM context must be provided when creating an
AsyncTransactionCreatorManager
with the methodLegacySamApiFactory.createAsyncTransactionCreatorManager(String, SecuritySetting)
.- Returns:
- A not empty string containing the context.
- Since:
- 0.2.0
-