Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Upgraded
- Upgraded [Keyple Java BOM](https://github.com/eclipse-keyple/keyple-java-bom) to `2025.11.21`.

## [2025-10-29]
### Changed
- Switched to [Keyple Java BOM](https://github.com/eclipse-keyple/keyple-java-bom) `2025.10.24` for dependency
Expand Down
4 changes: 3 additions & 1 deletion Example_Card_Calypso/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
dependencies {
// Begin Keyple configuration (generated by
// 'https://keyple.org/components/overview/configuration-wizard/')
implementation(platform("org.eclipse.keyple:keyple-java-bom:2025.10.24"))
implementation(platform("org.eclipse.keyple:keyple-java-bom:2025.11.21"))
implementation("org.eclipse.keypop:keypop-reader-java-api")
implementation("org.eclipse.keypop:keypop-calypso-card-java-api")
implementation("org.eclipse.keypop:keypop-calypso-crypto-legacysam-java-api")
Expand Down Expand Up @@ -166,6 +166,8 @@ fun copyLicenseFiles() {
noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true)
}

tasks.withType<JavaCompile> { options.compilerArgs.add("-Xlint:deprecation") }

tasks {
spotless {
java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
import org.eclipse.keyple.core.util.HexUtil;
import org.eclipse.keypop.calypso.card.CalypsoCardApiFactory;
import org.eclipse.keypop.calypso.card.card.CalypsoCard;
import org.eclipse.keypop.calypso.card.transaction.ChannelControl;
import org.eclipse.keypop.calypso.card.transaction.SecureRegularModeTransactionManager;
import org.eclipse.keypop.calypso.card.transaction.SymmetricCryptoSecuritySetting;
import org.eclipse.keypop.reader.CardReader;
import org.eclipse.keypop.reader.CardReaderEvent;
import org.eclipse.keypop.reader.ChannelControl;
import org.eclipse.keypop.reader.ObservableCardReader;
import org.eclipse.keypop.reader.selection.CardSelectionManager;
import org.eclipse.keypop.reader.spi.CardReaderObservationExceptionHandlerSpi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private static void initCardReader() {
true,
PcscReader.IsoProtocol.T1,
PcscReader.SharingMode.SHARED,
PcscSupportedContactlessProtocol.ISO_14443_4.name(),
PcscCardCommunicationProtocol.ISO_14443_4.name(),
ISO_CARD_PROTOCOL);
}

Expand All @@ -286,7 +286,7 @@ private static void initSamReader() {
false,
PcscReader.IsoProtocol.ANY,
PcscReader.SharingMode.SHARED,
PcscSupportedContactProtocol.ISO_7816_3_T0.name(),
PcscCardCommunicationProtocol.ISO_7816_3.name(),
SAM_PROTOCOL);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.eclipse.keypop.calypso.crypto.legacysam.sam.LegacySamSelectionExtension;
import org.eclipse.keypop.calypso.crypto.legacysam.transaction.*;
import org.eclipse.keypop.reader.CardReader;
import org.eclipse.keypop.reader.ChannelControl;
import org.eclipse.keypop.reader.ReaderApiFactory;
import org.eclipse.keypop.reader.selection.BasicCardSelector;
import org.eclipse.keypop.reader.selection.CardSelectionManager;
Expand Down Expand Up @@ -311,7 +312,7 @@ private static void performBasicSignature(CardResource cardResource) {
.createBasicSignatureComputationData()
.setData(HexUtil.toByteArray(DATA_TO_SIGN), KIF_BASIC, KVC_BASIC);
freeTransactionManager.prepareComputeSignature(basicSignatureComputationData);
freeTransactionManager.processCommands();
freeTransactionManager.processCommands(ChannelControl.KEEP_OPEN);
String signatureHex = HexUtil.toHex(basicSignatureComputationData.getSignature());
logger.info("signature='{}'", signatureHex);

Expand All @@ -330,7 +331,7 @@ private static void performBasicSignature(CardResource cardResource) {
KIF_BASIC,
KVC_BASIC);
freeTransactionManager.prepareVerifySignature(basicSignatureVerificationData);
freeTransactionManager.processCommands();
freeTransactionManager.processCommands(ChannelControl.KEEP_OPEN);
boolean isSignatureValid = basicSignatureVerificationData.isSignatureValid();
logger.info("Signature is valid: '{}'", isSignatureValid);
}
Expand All @@ -354,7 +355,7 @@ private static void performTraceableSignature(CardResource cardResource) {
.setData(HexUtil.toByteArray(DATA_TO_SIGN), KIF_TRACEABLE, KVC_TRACEABLE)
.withSamTraceabilityMode(0, SamTraceabilityMode.FULL_SERIAL_NUMBER);
freeTransactionManager.prepareComputeSignature(traceableSignatureComputationData);
freeTransactionManager.processCommands();
freeTransactionManager.processCommands(ChannelControl.KEEP_OPEN);
String signatureHex = HexUtil.toHex(traceableSignatureComputationData.getSignature());
String signedDataHex = HexUtil.toHex(traceableSignatureComputationData.getSignedData());
logger.info("signature='{}'", signatureHex);
Expand All @@ -376,7 +377,7 @@ private static void performTraceableSignature(CardResource cardResource) {
KVC_TRACEABLE)
.withSamTraceabilityMode(0, SamTraceabilityMode.FULL_SERIAL_NUMBER, null);
freeTransactionManager.prepareVerifySignature(traceableSignatureVerificationData);
freeTransactionManager.processCommands();
freeTransactionManager.processCommands(ChannelControl.KEEP_OPEN);
boolean isSignatureValid = traceableSignatureVerificationData.isSignatureValid();
logger.info("Signature is valid: '{}'", isSignatureValid);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
import org.eclipse.keypop.calypso.card.CalypsoCardApiFactory;
import org.eclipse.keypop.calypso.card.card.CalypsoCard;
import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension;
import org.eclipse.keypop.calypso.card.transaction.ChannelControl;
import org.eclipse.keypop.calypso.card.transaction.SecureRegularModeTransactionManager;
import org.eclipse.keypop.calypso.card.transaction.SymmetricCryptoSecuritySetting;
import org.eclipse.keypop.calypso.crypto.legacysam.LegacySamApiFactory;
import org.eclipse.keypop.calypso.crypto.legacysam.sam.LegacySam;
import org.eclipse.keypop.reader.CardReader;
import org.eclipse.keypop.reader.ChannelControl;
import org.eclipse.keypop.reader.ConfigurableCardReader;
import org.eclipse.keypop.reader.ReaderApiFactory;
import org.eclipse.keypop.reader.selection.CardSelectionManager;
Expand Down Expand Up @@ -311,7 +311,7 @@ private static void initCardReader() {
true,
PcscReader.IsoProtocol.T1,
PcscReader.SharingMode.SHARED,
PcscSupportedContactlessProtocol.ISO_14443_4.name(),
PcscCardCommunicationProtocol.ISO_14443_4.name(),
ISO_CARD_PROTOCOL);
}

Expand All @@ -329,7 +329,7 @@ private static void initSamReader() {
false,
PcscReader.IsoProtocol.ANY,
PcscReader.SharingMode.SHARED,
PcscSupportedContactProtocol.ISO_7816_3_T0.name(),
PcscCardCommunicationProtocol.ISO_7816_3.name(),
SAM_PROTOCOL);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
import org.eclipse.keypop.calypso.card.CalypsoCardApiFactory;
import org.eclipse.keypop.calypso.card.card.CalypsoCard;
import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension;
import org.eclipse.keypop.calypso.card.transaction.ChannelControl;
import org.eclipse.keypop.calypso.card.transaction.SecureRegularModeTransactionManager;
import org.eclipse.keypop.calypso.card.transaction.SymmetricCryptoSecuritySetting;
import org.eclipse.keypop.calypso.crypto.legacysam.LegacySamApiFactory;
import org.eclipse.keypop.calypso.crypto.legacysam.sam.LegacySam;
import org.eclipse.keypop.reader.CardReader;
import org.eclipse.keypop.reader.ChannelControl;
import org.eclipse.keypop.reader.ConfigurableCardReader;
import org.eclipse.keypop.reader.ReaderApiFactory;
import org.eclipse.keypop.reader.selection.CardSelectionManager;
Expand Down Expand Up @@ -291,7 +291,7 @@ private static void initCardReader() {
true,
PcscReader.IsoProtocol.T1,
PcscReader.SharingMode.SHARED,
PcscSupportedContactlessProtocol.ISO_14443_4.name(),
PcscCardCommunicationProtocol.ISO_14443_4.name(),
ISO_CARD_PROTOCOL);
}

Expand All @@ -309,7 +309,7 @@ private static void initSamReader() {
false,
PcscReader.IsoProtocol.ANY,
PcscReader.SharingMode.SHARED,
PcscSupportedContactProtocol.ISO_7816_3_T0.name(),
PcscCardCommunicationProtocol.ISO_7816_3.name(),
SAM_PROTOCOL);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
import org.eclipse.keyple.core.service.Plugin;
import org.eclipse.keyple.core.service.SmartCardService;
import org.eclipse.keyple.core.service.SmartCardServiceProvider;
import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol;
import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder;
import org.eclipse.keyple.plugin.pcsc.PcscReader;
import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactProtocol;
import org.eclipse.keypop.calypso.card.CalypsoCardApiFactory;
import org.eclipse.keypop.calypso.crypto.legacysam.LegacySamApiFactory;
import org.eclipse.keypop.calypso.crypto.legacysam.sam.LegacySam;
import org.eclipse.keypop.calypso.crypto.legacysam.transaction.FreeTransactionManager;
import org.eclipse.keypop.reader.CardReader;
import org.eclipse.keypop.reader.ChannelControl;
import org.eclipse.keypop.reader.ConfigurableCardReader;
import org.eclipse.keypop.reader.ReaderApiFactory;
import org.eclipse.keypop.reader.selection.CardSelectionManager;
Expand Down Expand Up @@ -95,7 +96,7 @@ public static void main(String[] args) {
legacySamApiFactory.createFreeTransactionManager(samReader, sam);

// Process the transaction to read counters and ceilings
samTransactionManager.prepareReadAllCountersStatus().processCommands();
samTransactionManager.prepareReadAllCountersStatus().processCommands(ChannelControl.KEEP_OPEN);

// Output results
logger.info("\nSAM event counters =\n{}", gson.toJson(sam.getCounters()));
Expand Down Expand Up @@ -130,7 +131,7 @@ private static void initSamReader() {
false,
PcscReader.IsoProtocol.ANY,
PcscReader.SharingMode.SHARED,
PcscSupportedContactProtocol.ISO_7816_3_T0.name(),
PcscCardCommunicationProtocol.ISO_7816_3.name(),
SAM_PROTOCOL);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,19 @@
import org.eclipse.keyple.core.service.SmartCardService;
import org.eclipse.keyple.core.service.SmartCardServiceProvider;
import org.eclipse.keyple.core.util.HexUtil;
import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol;
import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder;
import org.eclipse.keyple.plugin.pcsc.PcscReader;
import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactProtocol;
import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol;
import org.eclipse.keypop.calypso.card.CalypsoCardApiFactory;
import org.eclipse.keypop.calypso.card.WriteAccessLevel;
import org.eclipse.keypop.calypso.card.card.CalypsoCard;
import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension;
import org.eclipse.keypop.calypso.card.transaction.ChannelControl;
import org.eclipse.keypop.calypso.card.transaction.SecureExtendedModeTransactionManager;
import org.eclipse.keypop.calypso.card.transaction.SymmetricCryptoSecuritySetting;
import org.eclipse.keypop.calypso.crypto.legacysam.LegacySamApiFactory;
import org.eclipse.keypop.calypso.crypto.legacysam.sam.LegacySam;
import org.eclipse.keypop.reader.CardReader;
import org.eclipse.keypop.reader.ChannelControl;
import org.eclipse.keypop.reader.ConfigurableCardReader;
import org.eclipse.keypop.reader.ReaderApiFactory;
import org.eclipse.keypop.reader.selection.CardSelectionManager;
Expand Down Expand Up @@ -178,7 +177,7 @@ private static void initCardReader() {
true,
PcscReader.IsoProtocol.T1,
PcscReader.SharingMode.SHARED,
PcscSupportedContactlessProtocol.ISO_14443_4.name(),
PcscCardCommunicationProtocol.ISO_14443_4.name(),
ISO_CARD_PROTOCOL);
}

Expand All @@ -196,7 +195,7 @@ private static void initSamReader() {
false,
PcscReader.IsoProtocol.ANY,
PcscReader.SharingMode.SHARED,
PcscSupportedContactProtocol.ISO_7816_3_T0.name(),
PcscCardCommunicationProtocol.ISO_7816_3.name(),
SAM_PROTOCOL);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@
import org.eclipse.keyple.core.service.SmartCardService;
import org.eclipse.keyple.core.service.SmartCardServiceProvider;
import org.eclipse.keyple.core.util.HexUtil;
import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol;
import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder;
import org.eclipse.keyple.plugin.pcsc.PcscReader;
import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol;
import org.eclipse.keypop.calypso.card.CalypsoCardApiFactory;
import org.eclipse.keypop.calypso.card.card.CalypsoCard;
import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension;
import org.eclipse.keypop.calypso.card.transaction.*;
import org.eclipse.keypop.calypso.card.transaction.spi.AsymmetricCryptoCardTransactionManagerFactory;
import org.eclipse.keypop.reader.CardReader;
import org.eclipse.keypop.reader.ChannelControl;
import org.eclipse.keypop.reader.ConfigurableCardReader;
import org.eclipse.keypop.reader.ReaderApiFactory;
import org.eclipse.keypop.reader.selection.CardSelectionManager;
Expand Down Expand Up @@ -234,7 +235,7 @@ private static void initCardReader() {
true,
PcscReader.IsoProtocol.T1,
PcscReader.SharingMode.SHARED,
PcscSupportedContactlessProtocol.ISO_14443_4.name(),
PcscCardCommunicationProtocol.ISO_14443_4.name(),
ISO_CARD_PROTOCOL);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,20 @@
import org.eclipse.keyple.core.service.Plugin;
import org.eclipse.keyple.core.service.SmartCardService;
import org.eclipse.keyple.core.service.SmartCardServiceProvider;
import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol;
import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder;
import org.eclipse.keyple.plugin.pcsc.PcscReader;
import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactProtocol;
import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol;
import org.eclipse.keypop.calypso.card.CalypsoCardApiFactory;
import org.eclipse.keypop.calypso.card.PutDataTag;
import org.eclipse.keypop.calypso.card.card.CalypsoCard;
import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension;
import org.eclipse.keypop.calypso.card.transaction.ChannelControl;
import org.eclipse.keypop.calypso.card.transaction.SymmetricCryptoSecuritySetting;
import org.eclipse.keypop.calypso.crypto.legacysam.GetDataTag;
import org.eclipse.keypop.calypso.crypto.legacysam.LegacySamApiFactory;
import org.eclipse.keypop.calypso.crypto.legacysam.sam.LegacySam;
import org.eclipse.keypop.calypso.crypto.legacysam.transaction.LegacyCardCertificateComputationData;
import org.eclipse.keypop.reader.CardReader;
import org.eclipse.keypop.reader.ChannelControl;
import org.eclipse.keypop.reader.ConfigurableCardReader;
import org.eclipse.keypop.reader.ReaderApiFactory;
import org.eclipse.keypop.reader.selection.CardSelectionManager;
Expand Down Expand Up @@ -146,7 +145,7 @@ public static void main(String[] args) {
// Prepare to compute the card certificate by the SAM using the created data
.prepareComputeCardCertificate(cardCertificateComputationData)
// Execute all prepared commands on the SAM device
.processCommands();
.processCommands(ChannelControl.KEEP_OPEN);

// Execute a card transaction to store the generated PKI into the card
calypsoCardApiFactory
Expand Down Expand Up @@ -234,7 +233,7 @@ private static void initCardReader() {
true,
PcscReader.IsoProtocol.T1,
PcscReader.SharingMode.SHARED,
PcscSupportedContactlessProtocol.ISO_14443_4.name(),
PcscCardCommunicationProtocol.ISO_14443_4.name(),
ISO_CARD_PROTOCOL);
}

Expand All @@ -252,7 +251,7 @@ private static void initSamReader() {
false,
PcscReader.IsoProtocol.ANY,
PcscReader.SharingMode.SHARED,
PcscSupportedContactProtocol.ISO_7816_3_T0.name(),
PcscCardCommunicationProtocol.ISO_7816_3.name(),
SAM_PROTOCOL);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,21 @@
import org.eclipse.keyple.core.service.Plugin;
import org.eclipse.keyple.core.service.SmartCardService;
import org.eclipse.keyple.core.service.SmartCardServiceProvider;
import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol;
import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder;
import org.eclipse.keyple.plugin.pcsc.PcscReader;
import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactProtocol;
import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol;
import org.eclipse.keypop.calypso.card.CalypsoCardApiFactory;
import org.eclipse.keypop.calypso.card.PutDataTag;
import org.eclipse.keypop.calypso.card.card.CalypsoCard;
import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension;
import org.eclipse.keypop.calypso.card.transaction.ChannelControl;
import org.eclipse.keypop.calypso.card.transaction.SymmetricCryptoSecuritySetting;
import org.eclipse.keypop.calypso.crypto.legacysam.GetDataTag;
import org.eclipse.keypop.calypso.crypto.legacysam.LegacySamApiFactory;
import org.eclipse.keypop.calypso.crypto.legacysam.sam.LegacySam;
import org.eclipse.keypop.calypso.crypto.legacysam.transaction.KeyPairContainer;
import org.eclipse.keypop.calypso.crypto.legacysam.transaction.LegacyCardCertificateComputationData;
import org.eclipse.keypop.reader.CardReader;
import org.eclipse.keypop.reader.ChannelControl;
import org.eclipse.keypop.reader.ConfigurableCardReader;
import org.eclipse.keypop.reader.ReaderApiFactory;
import org.eclipse.keypop.reader.selection.CardSelectionManager;
Expand Down Expand Up @@ -143,7 +142,7 @@ public static void main(String[] args) {
// Prepare to compute the card certificate by the SAM using the created data
.prepareComputeCardCertificate(cardCertificateComputationData)
// Execute all prepared commands on the SAM device
.processCommands();
.processCommands(ChannelControl.KEEP_OPEN);

// Execute a card transaction to store the generated PKI into the card
calypsoCardApiFactory
Expand Down Expand Up @@ -233,7 +232,7 @@ private static void initCardReader() {
true,
PcscReader.IsoProtocol.T1,
PcscReader.SharingMode.SHARED,
PcscSupportedContactlessProtocol.ISO_14443_4.name(),
PcscCardCommunicationProtocol.ISO_14443_4.name(),
ISO_CARD_PROTOCOL);
}

Expand All @@ -251,7 +250,7 @@ private static void initSamReader() {
false,
PcscReader.IsoProtocol.ANY,
PcscReader.SharingMode.SHARED,
PcscSupportedContactProtocol.ISO_7816_3_T0.name(),
PcscCardCommunicationProtocol.ISO_7816_3.name(),
SAM_PROTOCOL);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import org.eclipse.keyple.card.calypso.CalypsoExtensionService;
import org.eclipse.keyple.core.service.*;
import org.eclipse.keyple.core.util.HexUtil;
import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol;
import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder;
import org.eclipse.keyple.plugin.pcsc.PcscReader;
import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol;
import org.eclipse.keypop.calypso.card.CalypsoCardApiFactory;
import org.eclipse.keypop.calypso.card.card.CalypsoCard;
import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension;
Expand Down Expand Up @@ -175,7 +175,7 @@ private static void initCardReader() {
true,
PcscReader.IsoProtocol.T1,
PcscReader.SharingMode.SHARED,
PcscSupportedContactlessProtocol.ISO_14443_4.name(),
PcscCardCommunicationProtocol.ISO_14443_4.name(),
ISO_CARD_PROTOCOL);
}

Expand Down
Loading