Class PkiExtensionService
- Since:
- 0.1.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.keypop.calypso.card.transaction.spi.AsymmetricCryptoCardTransactionManagerFactory
Creates a factory for asymmetric crypto card transaction managers.org.eclipse.keypop.calypso.card.transaction.spi.CaCertificate
createCaCertificate
(byte[] caCertificate) Creates aCaCertificate
from raw data of a CA certificate provided as a 384-byte byte array, to be injected as intermediate certificate of the chain of trust in the security settings of a card PKI transaction.org.eclipse.keypop.calypso.card.transaction.spi.CaCertificateParser
createCaCertificateParser
(CaCertificateType caCertificateType) Creates aCaCertificateParser
object specifically tailored to parse card CA certificates having the given CA certificate type, to be injected in the security settings of a card PKI transaction.org.eclipse.keypop.calypso.card.transaction.spi.CardCertificateParser
createCardCertificateParser
(CardCertificateType cardCertificateType) Creates aCardCertificateParser
object specifically tailored to parse card certificates having the given card certificate type, to be injected in the security settings of a card PKI transaction.org.eclipse.keypop.calypso.card.transaction.spi.PcaCertificate
createPcaCertificate
(byte[] pcaPublicKeyReference, byte[] pcaPublicKeyModulus) Creates aPcaCertificate
from a provided 2048-bit RSA key modulus with a public exponent equal to 65537, to be injected as root certificate of the chain of trust in the security settings of a card PKI transaction.org.eclipse.keypop.calypso.card.transaction.spi.PcaCertificate
createPcaCertificate
(byte[] pcaPublicKeyReference, RSAPublicKey pcaPublicKey) Creates aPcaCertificate
from a provided 2048-bit RSA public key with a public exponent equal to 65537, to be injected as root certificate of the chain of trust in the security settings of a card PKI transaction.static PkiExtensionService
Returns the service instance.void
Sets the system in test mode.
-
Constructor Details
-
PkiExtensionService
public PkiExtensionService()
-
-
Method Details
-
getInstance
Returns the service instance.- Returns:
- A non-null reference.
- Since:
- 0.1.0
-
setTestMode
public void setTestMode()Sets the system in test mode.In test mode, the system requires the use of test certificates.
Note that enabling test mode should only be done in testing and development environments. It should not be used in production as it may compromise system security or integrity.
The test mode can be set only just after the creation of the instance, this means that as soon as one of the class's other methods is called, the call to this method will generate an
IllegalStateException
exception.- Since:
- 0.1.0
-
createAsymmetricCryptoCardTransactionManagerFactory
public org.eclipse.keypop.calypso.card.transaction.spi.AsymmetricCryptoCardTransactionManagerFactory createAsymmetricCryptoCardTransactionManagerFactory()Creates a factory for asymmetric crypto card transaction managers.- Returns:
- A non-null reference.
- Since:
- 0.1.0
-
createPcaCertificate
public org.eclipse.keypop.calypso.card.transaction.spi.PcaCertificate createPcaCertificate(byte[] pcaPublicKeyReference, RSAPublicKey pcaPublicKey) Creates aPcaCertificate
from a provided 2048-bit RSA public key with a public exponent equal to 65537, to be injected as root certificate of the chain of trust in the security settings of a card PKI transaction.- Parameters:
pcaPublicKeyReference
- The PCA public key reference (29 bytes).pcaPublicKey
- The PCA public key (2048-bit RSA key with public exponent equal to 65537).- Returns:
- A non-null reference.
- Throws:
IllegalArgumentException
- If the public key reference or the key is null or invalid.- Since:
- 0.1.0
-
createPcaCertificate
public org.eclipse.keypop.calypso.card.transaction.spi.PcaCertificate createPcaCertificate(byte[] pcaPublicKeyReference, byte[] pcaPublicKeyModulus) Creates aPcaCertificate
from a provided 2048-bit RSA key modulus with a public exponent equal to 65537, to be injected as root certificate of the chain of trust in the security settings of a card PKI transaction.- Parameters:
pcaPublicKeyReference
- The PCA public key reference (29 bytes).pcaPublicKeyModulus
- The RSA public key modulus (256 bytes).- Returns:
- A non-null reference.
- Throws:
IllegalArgumentException
- If the public key reference or the key modulus is null or invalid.- Since:
- 0.1.0
-
createCaCertificate
public org.eclipse.keypop.calypso.card.transaction.spi.CaCertificate createCaCertificate(byte[] caCertificate) Creates aCaCertificate
from raw data of a CA certificate provided as a 384-byte byte array, to be injected as intermediate certificate of the chain of trust in the security settings of a card PKI transaction.Currently, only CA certificates conforming to Calypso format V1 are supported.
- Parameters:
caCertificate
- The 384-byte byte array containing the CA certificate data.- Returns:
- A non-null reference.
- Throws:
IllegalArgumentException
- If the provided value is null or invalid.- Since:
- 0.1.0
-
createCaCertificateParser
public org.eclipse.keypop.calypso.card.transaction.spi.CaCertificateParser createCaCertificateParser(CaCertificateType caCertificateType) Creates aCaCertificateParser
object specifically tailored to parse card CA certificates having the given CA certificate type, to be injected in the security settings of a card PKI transaction.This method selects and instantiates the appropriate
CaCertificateParser
implementation based on the providedCaCertificateType
. This ensures that the parser is capable of handling the specific format and structure of the certificate type, enabling accurate parsing and data extraction.Currently, only CA certificates conforming to Calypso format V1 are supported.
- Parameters:
caCertificateType
- The type of CA certificate to be parsed, indicating the expected format and structure.- Returns:
- A non-null reference.
- Throws:
IllegalArgumentException
- If the specified type null.- Since:
- 0.1.0
-
createCardCertificateParser
public org.eclipse.keypop.calypso.card.transaction.spi.CardCertificateParser createCardCertificateParser(CardCertificateType cardCertificateType) Creates aCardCertificateParser
object specifically tailored to parse card certificates having the given card certificate type, to be injected in the security settings of a card PKI transaction.This method selects and instantiates the appropriate
CardCertificateParser
implementation based on the providedCardCertificateType
. This ensures that the parser is capable of handling the specific format and structure of the certificate type, enabling accurate parsing and data extraction.Currently, only card certificates conforming to Calypso format V1 are supported.
- Parameters:
cardCertificateType
- The type of card certificate to be parsed, indicating the expected format and structure.- Returns:
- A non-null reference.
- Throws:
IllegalArgumentException
- If the specified type null.- Since:
- 0.1.0
-