Class PkiExtensionService
- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.keypop.calypso.card.transaction.spi.AsymmetricCryptoCardTransactionManagerFactoryCreates a factory for asymmetric crypto card transaction managers.org.eclipse.keypop.calypso.card.transaction.spi.CaCertificatecreateCaCertificate(byte[] caCertificate) Creates aCaCertificatefrom 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.CaCertificateParsercreateCaCertificateParser(CertificateType certificateType) Creates aCaCertificateParserobject 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.CardCertificateParsercreateCardCertificateParser(CertificateType certificateType) Creates aCardCertificateParserobject 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.PcaCertificatecreatePcaCertificate(byte[] pcaPublicKeyReference, byte[] pcaPublicKeyModulus) Creates aPcaCertificatefrom 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.PcaCertificatecreatePcaCertificate(byte[] pcaPublicKeyReference, RSAPublicKey pcaPublicKey) Creates aPcaCertificatefrom 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 PkiExtensionServiceReturns the service instance.voidSets 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
IllegalStateExceptionexception.- 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 aPcaCertificatefrom 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 aPcaCertificatefrom 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 aCaCertificatefrom 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(CertificateType certificateType) Creates aCaCertificateParserobject 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
CaCertificateParserimplementation based on the providedCertificateType. 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:
certificateType- 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(CertificateType certificateType) Creates aCardCertificateParserobject 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
CardCertificateParserimplementation based on the providedCertificateType. 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:
certificateType- 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
-