From ebdc818c584107bfe354afe86ea6d23f3ac93919 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Fortune Date: Mon, 24 Nov 2025 14:56:33 +0100 Subject: [PATCH 1/5] feat: update Keyple BOM version to 2025.11.21 --- Example_Card_Calypso/build.gradle.kts | 4 ++-- .../CardReaderObserver.java | 2 +- .../Main_SessionTrace_TN313_Pcsc.java | 4 ++-- ...erformanceMeasurement_EmbeddedValidation_Pcsc.java | 6 +++--- ...formanceMeasurement_DistributedReloading_Pcsc.java | 6 +++--- .../Main_ReadLegacySamCountersAndCeilings_Pcsc.java | 7 ++++--- .../Main_ExtendedModeSession_Pcsc.java | 9 ++++----- .../Main_PkiModeSession_Pcsc.java | 5 +++-- .../Main_CardKeyPairGeneratedByCard_Pcsc.java | 11 +++++------ .../Main_CardKeyPairGeneratedByLegacySam_Pcsc.java | 11 +++++------ .../Main_ExplicitSelectionAid_Pcsc.java | 4 ++-- .../Main_ScheduledSelection_Pcsc.java | 4 ++-- .../Main_Rev1Selection_Pcsc.java | 6 +++--- .../Main_CardAuthentication_Pcsc.java | 9 ++++----- ...in_CardAuthentication_Pcsc_SamResourceService.java | 6 +++--- ...in_CardAuthentication_Stub_SamResourceService.java | 2 +- .../Main_MultipleSession_Pcsc.java | 9 ++++----- .../UseCase6_VerifyPin/Main_VerifyPin_Pcsc.java | 8 ++++---- .../Main_StoredValue_SimpleReloading_Pcsc.java | 8 ++++---- .../Main_StoredValue_DebitInSession_Pcsc.java | 8 ++++---- .../UseCase9_ChangePin/Main_ChangePin_Pcsc.java | 9 ++++----- .../build.gradle.kts | 4 ++-- .../client/CalypsoTicketingServiceUtil.java | 2 +- .../build.gradle.kts | 4 ++-- .../readerclientside/webservice/client/AppClient.java | 4 ++-- .../server/CalypsoTicketingServiceUtil.java | 2 +- .../build.gradle.kts | 4 ++-- .../readerclientside/websocket/client/AppClient.java | 4 ++-- .../websocket/server/CalypsoTicketingServiceUtil.java | 2 +- Example_Plugin_Android_NFC/app/build.gradle.kts | 2 +- Example_Plugin_Android_OMAPI/app/build.gradle.kts | 2 +- Example_Plugin_PCSC/build.gradle.kts | 4 ++-- Example_Service/build.gradle.kts | 4 ++-- .../Main_BasicSelection_Pcsc.java | 4 ++-- .../Main_ProtocolBasedSelection_Pcsc.java | 6 +++--- .../Main_AidBasedSelection_Pcsc.java | 4 ++-- .../Main_ScheduledSelection_Pcsc.java | 4 ++-- .../Main_SequentialMultiSelection_Pcsc.java | 4 ++-- .../Main_GroupedMultiSelection_Pcsc.java | 4 ++-- .../PluginObserver.java | 4 ++-- Example_Service_Resource/build.gradle.kts | 4 ++-- 41 files changed, 103 insertions(+), 107 deletions(-) diff --git a/Example_Card_Calypso/build.gradle.kts b/Example_Card_Calypso/build.gradle.kts index 81eb483..9928226 100644 --- a/Example_Card_Calypso/build.gradle.kts +++ b/Example_Card_Calypso/build.gradle.kts @@ -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") @@ -165,7 +165,7 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } - +tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } tasks { spotless { java { diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase10_SessionTrace_TN313/CardReaderObserver.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase10_SessionTrace_TN313/CardReaderObserver.java index a455396..f0de952 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase10_SessionTrace_TN313/CardReaderObserver.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase10_SessionTrace_TN313/CardReaderObserver.java @@ -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; diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase10_SessionTrace_TN313/Main_SessionTrace_TN313_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase10_SessionTrace_TN313/Main_SessionTrace_TN313_Pcsc.java index eb092ec..6d9f04c 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase10_SessionTrace_TN313/Main_SessionTrace_TN313_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase10_SessionTrace_TN313/Main_SessionTrace_TN313_Pcsc.java @@ -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); } @@ -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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase12_PerformanceMeasurement_EmbeddedValidation/Main_PerformanceMeasurement_EmbeddedValidation_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase12_PerformanceMeasurement_EmbeddedValidation/Main_PerformanceMeasurement_EmbeddedValidation_Pcsc.java index bb388f0..a03bcc9 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase12_PerformanceMeasurement_EmbeddedValidation/Main_PerformanceMeasurement_EmbeddedValidation_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase12_PerformanceMeasurement_EmbeddedValidation/Main_PerformanceMeasurement_EmbeddedValidation_Pcsc.java @@ -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; @@ -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); } @@ -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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase13_PerformanceMeasurement_DistributedReloading/Main_PerformanceMeasurement_DistributedReloading_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase13_PerformanceMeasurement_DistributedReloading/Main_PerformanceMeasurement_DistributedReloading_Pcsc.java index 17de2ab..1214e83 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase13_PerformanceMeasurement_DistributedReloading/Main_PerformanceMeasurement_DistributedReloading_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase13_PerformanceMeasurement_DistributedReloading/Main_PerformanceMeasurement_DistributedReloading_Pcsc.java @@ -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; @@ -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); } @@ -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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase14_ReadLegacySamCountersAndCeilings/Main_ReadLegacySamCountersAndCeilings_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase14_ReadLegacySamCountersAndCeilings/Main_ReadLegacySamCountersAndCeilings_Pcsc.java index 8611e6e..7397bc7 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase14_ReadLegacySamCountersAndCeilings/Main_ReadLegacySamCountersAndCeilings_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase14_ReadLegacySamCountersAndCeilings/Main_ReadLegacySamCountersAndCeilings_Pcsc.java @@ -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; @@ -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())); @@ -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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase15_ExtendedModeSession/Main_ExtendedModeSession_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase15_ExtendedModeSession/Main_ExtendedModeSession_Pcsc.java index 506f449..1df8020 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase15_ExtendedModeSession/Main_ExtendedModeSession_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase15_ExtendedModeSession/Main_ExtendedModeSession_Pcsc.java @@ -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; @@ -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); } @@ -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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase16_PkiModeSession/Main_PkiModeSession_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase16_PkiModeSession/Main_PkiModeSession_Pcsc.java index c0a00f9..b522ac0 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase16_PkiModeSession/Main_PkiModeSession_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase16_PkiModeSession/Main_PkiModeSession_Pcsc.java @@ -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; @@ -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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase17_PkiPrePersonalization/Main_CardKeyPairGeneratedByCard_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase17_PkiPrePersonalization/Main_CardKeyPairGeneratedByCard_Pcsc.java index 0e620f3..a565e2a 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase17_PkiPrePersonalization/Main_CardKeyPairGeneratedByCard_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase17_PkiPrePersonalization/Main_CardKeyPairGeneratedByCard_Pcsc.java @@ -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; @@ -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 @@ -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); } @@ -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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase17_PkiPrePersonalization/Main_CardKeyPairGeneratedByLegacySam_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase17_PkiPrePersonalization/Main_CardKeyPairGeneratedByLegacySam_Pcsc.java index 3a55041..846e956 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase17_PkiPrePersonalization/Main_CardKeyPairGeneratedByLegacySam_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase17_PkiPrePersonalization/Main_CardKeyPairGeneratedByLegacySam_Pcsc.java @@ -21,15 +21,13 @@ 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; @@ -37,6 +35,7 @@ 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; @@ -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 @@ -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); } @@ -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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase1_ExplicitSelectionAid/Main_ExplicitSelectionAid_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase1_ExplicitSelectionAid/Main_ExplicitSelectionAid_Pcsc.java index 29af2e8..89f916d 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase1_ExplicitSelectionAid/Main_ExplicitSelectionAid_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase1_ExplicitSelectionAid/Main_ExplicitSelectionAid_Pcsc.java @@ -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; @@ -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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase2_ScheduledSelection/Main_ScheduledSelection_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase2_ScheduledSelection/Main_ScheduledSelection_Pcsc.java index 0875573..9b1419b 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase2_ScheduledSelection/Main_ScheduledSelection_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase2_ScheduledSelection/Main_ScheduledSelection_Pcsc.java @@ -16,9 +16,9 @@ import java.util.Properties; import org.eclipse.keyple.card.calypso.CalypsoExtensionService; import org.eclipse.keyple.core.service.*; +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.CalypsoCardSelectionExtension; import org.eclipse.keypop.reader.CardReader; @@ -183,7 +183,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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase3_Rev1Selection/Main_Rev1Selection_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase3_Rev1Selection/Main_Rev1Selection_Pcsc.java index d438059..bb9f199 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase3_Rev1Selection/Main_Rev1Selection_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase3_Rev1Selection/Main_Rev1Selection_Pcsc.java @@ -17,13 +17,13 @@ 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.transaction.ChannelControl; 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.*; @@ -177,7 +177,7 @@ private static void initCardReader() { true, PcscReader.IsoProtocol.T1, PcscReader.SharingMode.SHARED, - PcscSupportedContactlessProtocol.INNOVATRON_B_PRIME_CARD.name(), + PcscCardCommunicationProtocol.INNOVATRON_B_PRIME.name(), INNOVATRON_CARD_PROTOCOL); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Pcsc.java index 3b42d3a..27abc76 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Pcsc.java @@ -21,19 +21,18 @@ 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.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; @@ -186,7 +185,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); } @@ -204,7 +203,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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Pcsc_SamResourceService.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Pcsc_SamResourceService.java index cec667b..6267071 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Pcsc_SamResourceService.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Pcsc_SamResourceService.java @@ -25,14 +25,13 @@ import org.eclipse.keyple.core.service.resource.spi.CardResourceProfileExtension; import org.eclipse.keyple.core.service.resource.spi.ReaderConfiguratorSpi; 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.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.SymmetricCryptoSecuritySetting; import org.eclipse.keypop.calypso.crypto.legacysam.LegacySamApiFactory; import org.eclipse.keypop.calypso.crypto.legacysam.sam.LegacySam; @@ -40,6 +39,7 @@ import org.eclipse.keypop.calypso.crypto.legacysam.spi.LegacySamDynamicUnlockDataProviderSpi; import org.eclipse.keypop.calypso.crypto.legacysam.spi.LegacySamStaticUnlockDataProviderSpi; 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.*; @@ -217,7 +217,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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Stub_SamResourceService.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Stub_SamResourceService.java index cb65b85..cb5125f 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Stub_SamResourceService.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase4_CardAuthentication/Main_CardAuthentication_Stub_SamResourceService.java @@ -28,12 +28,12 @@ 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.SymmetricCryptoSecuritySetting; import org.eclipse.keypop.calypso.crypto.legacysam.LegacySamApiFactory; import org.eclipse.keypop.calypso.crypto.legacysam.sam.LegacySam; import org.eclipse.keypop.calypso.crypto.legacysam.sam.LegacySamSelectionExtension; import org.eclipse.keypop.reader.CardReader; +import org.eclipse.keypop.reader.ChannelControl; import org.eclipse.keypop.reader.ReaderApiFactory; import org.eclipse.keypop.reader.selection.*; import org.slf4j.Logger; diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase5_MultipleSession/Main_MultipleSession_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase5_MultipleSession/Main_MultipleSession_Pcsc.java index 4d5648e..12c6aa8 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase5_MultipleSession/Main_MultipleSession_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase5_MultipleSession/Main_MultipleSession_Pcsc.java @@ -21,19 +21,18 @@ import org.eclipse.keyple.card.calypso.crypto.legacysam.LegacySamUtil; 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.PcscSupportedContactProtocol; -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.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; @@ -206,7 +205,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); } @@ -224,7 +223,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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase6_VerifyPin/Main_VerifyPin_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase6_VerifyPin/Main_VerifyPin_Pcsc.java index a8c08bb..51d13ba 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase6_VerifyPin/Main_VerifyPin_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase6_VerifyPin/Main_VerifyPin_Pcsc.java @@ -21,10 +21,9 @@ import org.eclipse.keyple.card.calypso.crypto.legacysam.LegacySamUtil; 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.PcscSupportedContactProtocol; -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; @@ -32,6 +31,7 @@ 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; @@ -225,7 +225,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); } @@ -243,7 +243,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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase7_StoredValue_SimpleReloading/Main_StoredValue_SimpleReloading_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase7_StoredValue_SimpleReloading/Main_StoredValue_SimpleReloading_Pcsc.java index e103d27..e79d70c 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase7_StoredValue_SimpleReloading/Main_StoredValue_SimpleReloading_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase7_StoredValue_SimpleReloading/Main_StoredValue_SimpleReloading_Pcsc.java @@ -21,10 +21,9 @@ 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.card.CalypsoCard; import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension; @@ -32,6 +31,7 @@ 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; @@ -179,7 +179,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); } @@ -197,7 +197,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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase8_StoredValue_DebitInSession/Main_StoredValue_DebitInSession_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase8_StoredValue_DebitInSession/Main_StoredValue_DebitInSession_Pcsc.java index 25c8758..9e77db2 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase8_StoredValue_DebitInSession/Main_StoredValue_DebitInSession_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase8_StoredValue_DebitInSession/Main_StoredValue_DebitInSession_Pcsc.java @@ -21,10 +21,9 @@ import org.eclipse.keyple.card.calypso.crypto.legacysam.LegacySamUtil; 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.PcscSupportedContactProtocol; -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; @@ -32,6 +31,7 @@ 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; @@ -188,7 +188,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); } @@ -206,7 +206,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); } diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase9_ChangePin/Main_ChangePin_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase9_ChangePin/Main_ChangePin_Pcsc.java index 49eb7e5..e43d489 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase9_ChangePin/Main_ChangePin_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase9_ChangePin/Main_ChangePin_Pcsc.java @@ -23,19 +23,18 @@ 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.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; @@ -213,7 +212,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); } @@ -231,7 +230,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); } diff --git a/Example_Distributed_PoolReaderServerSide_Webservice/build.gradle.kts b/Example_Distributed_PoolReaderServerSide_Webservice/build.gradle.kts index 6f5b7b5..4850b05 100644 --- a/Example_Distributed_PoolReaderServerSide_Webservice/build.gradle.kts +++ b/Example_Distributed_PoolReaderServerSide_Webservice/build.gradle.kts @@ -18,7 +18,7 @@ dependencies { /* Keyple 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.keyple:keyple-common-java-api") @@ -76,7 +76,7 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } - +tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } tasks { spotless { java { diff --git a/Example_Distributed_PoolReaderServerSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/poolreaderserverside/webservice/client/CalypsoTicketingServiceUtil.java b/Example_Distributed_PoolReaderServerSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/poolreaderserverside/webservice/client/CalypsoTicketingServiceUtil.java index 41a3a50..8e69c1d 100644 --- a/Example_Distributed_PoolReaderServerSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/poolreaderserverside/webservice/client/CalypsoTicketingServiceUtil.java +++ b/Example_Distributed_PoolReaderServerSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/poolreaderserverside/webservice/client/CalypsoTicketingServiceUtil.java @@ -19,7 +19,7 @@ import org.eclipse.keypop.calypso.card.card.CalypsoCard; import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension; import org.eclipse.keypop.calypso.card.card.ElementaryFile; -import org.eclipse.keypop.calypso.card.transaction.ChannelControl; +import org.eclipse.keypop.reader.ChannelControl; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ReaderApiFactory; import org.eclipse.keypop.reader.selection.CardSelectionManager; diff --git a/Example_Distributed_ReaderClientSide_Webservice/build.gradle.kts b/Example_Distributed_ReaderClientSide_Webservice/build.gradle.kts index 6f5b7b5..4850b05 100644 --- a/Example_Distributed_ReaderClientSide_Webservice/build.gradle.kts +++ b/Example_Distributed_ReaderClientSide_Webservice/build.gradle.kts @@ -18,7 +18,7 @@ dependencies { /* Keyple 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.keyple:keyple-common-java-api") @@ -76,7 +76,7 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } - +tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } tasks { spotless { java { diff --git a/Example_Distributed_ReaderClientSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/webservice/client/AppClient.java b/Example_Distributed_ReaderClientSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/webservice/client/AppClient.java index 5e701f5..c49013f 100644 --- a/Example_Distributed_ReaderClientSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/webservice/client/AppClient.java +++ b/Example_Distributed_ReaderClientSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/webservice/client/AppClient.java @@ -26,9 +26,9 @@ import org.eclipse.keyple.distributed.LocalServiceClientFactoryBuilder; import org.eclipse.keyple.example.distributed.readerclientside.webservice.common.InputDataDto; import org.eclipse.keyple.example.distributed.readerclientside.webservice.common.OutputDataDto; +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.keyple.plugin.stub.*; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; @@ -191,7 +191,7 @@ private void initPcscReader() { // Activates the protocol ISO_14443_4 on the reader. ((ConfigurableCardReader) reader) - .activateProtocol(PcscSupportedContactlessProtocol.ISO_14443_4.name(), ISO_CARD_PROTOCOL); + .activateProtocol(PcscCardCommunicationProtocol.ISO_14443_4.name(), ISO_CARD_PROTOCOL); logger.info( "Client - Local reader was configured with PCSC reader : {} with a card", reader.getName()); diff --git a/Example_Distributed_ReaderClientSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/webservice/server/CalypsoTicketingServiceUtil.java b/Example_Distributed_ReaderClientSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/webservice/server/CalypsoTicketingServiceUtil.java index 22977a8..713d199 100644 --- a/Example_Distributed_ReaderClientSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/webservice/server/CalypsoTicketingServiceUtil.java +++ b/Example_Distributed_ReaderClientSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/webservice/server/CalypsoTicketingServiceUtil.java @@ -19,8 +19,8 @@ import org.eclipse.keypop.calypso.card.card.CalypsoCard; import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension; import org.eclipse.keypop.calypso.card.card.ElementaryFile; -import org.eclipse.keypop.calypso.card.transaction.ChannelControl; import org.eclipse.keypop.reader.CardReader; +import org.eclipse.keypop.reader.ChannelControl; import org.eclipse.keypop.reader.ReaderApiFactory; import org.eclipse.keypop.reader.selection.CardSelectionManager; import org.eclipse.keypop.reader.selection.IsoCardSelector; diff --git a/Example_Distributed_ReaderClientSide_Websocket/build.gradle.kts b/Example_Distributed_ReaderClientSide_Websocket/build.gradle.kts index 4bf12c7..7267e6c 100644 --- a/Example_Distributed_ReaderClientSide_Websocket/build.gradle.kts +++ b/Example_Distributed_ReaderClientSide_Websocket/build.gradle.kts @@ -18,7 +18,7 @@ dependencies { /* Keyple 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.keyple:keyple-common-java-api") @@ -77,7 +77,7 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } - +tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } tasks { spotless { java { diff --git a/Example_Distributed_ReaderClientSide_Websocket/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/websocket/client/AppClient.java b/Example_Distributed_ReaderClientSide_Websocket/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/websocket/client/AppClient.java index a7bcf29..861df1a 100644 --- a/Example_Distributed_ReaderClientSide_Websocket/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/websocket/client/AppClient.java +++ b/Example_Distributed_ReaderClientSide_Websocket/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/websocket/client/AppClient.java @@ -26,9 +26,9 @@ import org.eclipse.keyple.distributed.LocalServiceClientFactoryBuilder; import org.eclipse.keyple.example.distributed.readerclientside.websocket.common.InputDataDto; import org.eclipse.keyple.example.distributed.readerclientside.websocket.common.OutputDataDto; +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.keyple.plugin.stub.StubPlugin; import org.eclipse.keyple.plugin.stub.StubPluginFactoryBuilder; import org.eclipse.keyple.plugin.stub.StubReader; @@ -193,7 +193,7 @@ private void initPcscReader() { // Activates the protocol ISO_14443_4 on the reader. ((ConfigurableCardReader) reader) - .activateProtocol(PcscSupportedContactlessProtocol.ISO_14443_4.name(), ISO_CARD_PROTOCOL); + .activateProtocol(PcscCardCommunicationProtocol.ISO_14443_4.name(), ISO_CARD_PROTOCOL); logger.info( "Client - Local reader was configured with PCSC reader : {} with a card", reader.getName()); diff --git a/Example_Distributed_ReaderClientSide_Websocket/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/websocket/server/CalypsoTicketingServiceUtil.java b/Example_Distributed_ReaderClientSide_Websocket/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/websocket/server/CalypsoTicketingServiceUtil.java index 284665f..404c749 100644 --- a/Example_Distributed_ReaderClientSide_Websocket/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/websocket/server/CalypsoTicketingServiceUtil.java +++ b/Example_Distributed_ReaderClientSide_Websocket/src/main/java/org/eclipse/keyple/example/distributed/readerclientside/websocket/server/CalypsoTicketingServiceUtil.java @@ -19,8 +19,8 @@ import org.eclipse.keypop.calypso.card.card.CalypsoCard; import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension; import org.eclipse.keypop.calypso.card.card.ElementaryFile; -import org.eclipse.keypop.calypso.card.transaction.ChannelControl; import org.eclipse.keypop.reader.CardReader; +import org.eclipse.keypop.reader.ChannelControl; import org.eclipse.keypop.reader.ReaderApiFactory; import org.eclipse.keypop.reader.selection.CardSelectionManager; import org.eclipse.keypop.reader.selection.IsoCardSelector; diff --git a/Example_Plugin_Android_NFC/app/build.gradle.kts b/Example_Plugin_Android_NFC/app/build.gradle.kts index f58ecda..156b482 100644 --- a/Example_Plugin_Android_NFC/app/build.gradle.kts +++ b/Example_Plugin_Android_NFC/app/build.gradle.kts @@ -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.keyple:keyple-common-java-api") diff --git a/Example_Plugin_Android_OMAPI/app/build.gradle.kts b/Example_Plugin_Android_OMAPI/app/build.gradle.kts index a78455f..9a65db4 100644 --- a/Example_Plugin_Android_OMAPI/app/build.gradle.kts +++ b/Example_Plugin_Android_OMAPI/app/build.gradle.kts @@ -25,7 +25,7 @@ dependencies { "exclude" to listOf("org.simalliance.openmobileapi.jar")))) // 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.keyple:keyple-common-java-api") diff --git a/Example_Plugin_PCSC/build.gradle.kts b/Example_Plugin_PCSC/build.gradle.kts index 714191d..72e50c1 100644 --- a/Example_Plugin_PCSC/build.gradle.kts +++ b/Example_Plugin_PCSC/build.gradle.kts @@ -16,7 +16,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.keyple:keyple-common-java-api") implementation("org.eclipse.keyple:keyple-util-java-lib") @@ -58,7 +58,7 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } - +tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } tasks { spotless { java { diff --git a/Example_Service/build.gradle.kts b/Example_Service/build.gradle.kts index 79e279c..7f9e006 100644 --- a/Example_Service/build.gradle.kts +++ b/Example_Service/build.gradle.kts @@ -16,7 +16,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.keyple:keyple-common-java-api") implementation("org.eclipse.keyple:keyple-util-java-lib") @@ -57,7 +57,7 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } - +tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } tasks { spotless { java { diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java index 0467d99..90c50e6 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java @@ -22,7 +22,7 @@ import org.eclipse.keyple.core.util.HexUtil; import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder; import org.eclipse.keyple.plugin.pcsc.PcscReader; -import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol; +import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -137,7 +137,7 @@ private static void initCardReader() { true, PcscReader.IsoProtocol.T1, PcscReader.SharingMode.EXCLUSIVE, - PcscSupportedContactlessProtocol.ISO_14443_4.name(), + PcscCardCommunicationProtocol.ISO_14443_4.name(), ISO_CARD_PROTOCOL); } diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase2_ProtocolBasedSelection/Main_ProtocolBasedSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase2_ProtocolBasedSelection/Main_ProtocolBasedSelection_Pcsc.java index ec78872..6245d18 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase2_ProtocolBasedSelection/Main_ProtocolBasedSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase2_ProtocolBasedSelection/Main_ProtocolBasedSelection_Pcsc.java @@ -17,7 +17,7 @@ import org.eclipse.keyple.core.service.*; import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder; import org.eclipse.keyple.plugin.pcsc.PcscReader; -import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol; +import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -156,10 +156,10 @@ private static CardReader getReader( .setSharingMode(sharingMode); ((ConfigurableCardReader) reader) - .activateProtocol(PcscSupportedContactlessProtocol.ISO_14443_4.name(), ISO_CARD_PROTOCOL); + .activateProtocol(PcscCardCommunicationProtocol.ISO_14443_4.name(), ISO_CARD_PROTOCOL); ((ConfigurableCardReader) reader) .activateProtocol( - PcscSupportedContactlessProtocol.MIFARE_CLASSIC.name(), MIFARE_CLASSIC_PROTOCOL); + PcscCardCommunicationProtocol.MIFARE_CLASSIC.name(), MIFARE_CLASSIC_PROTOCOL); return reader; } diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase3_AidBasedSelection/Main_AidBasedSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase3_AidBasedSelection/Main_AidBasedSelection_Pcsc.java index 970aa31..1275a01 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase3_AidBasedSelection/Main_AidBasedSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase3_AidBasedSelection/Main_AidBasedSelection_Pcsc.java @@ -17,7 +17,7 @@ import org.eclipse.keyple.example.core.service.common.ConfigurationUtil; import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder; import org.eclipse.keyple.plugin.pcsc.PcscReader; -import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol; +import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -81,7 +81,7 @@ public static void main(String[] args) { .setSharingMode(PcscReader.SharingMode.SHARED); ((ConfigurableCardReader) cardReader) .activateProtocol( - PcscSupportedContactlessProtocol.ISO_14443_4.name(), + PcscCardCommunicationProtocol.ISO_14443_4.name(), ConfigurationUtil.ISO_CARD_PROTOCOL); logger.info("=============== UseCase Generic #3: AID based card selection =================="); diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase4_ScheduledSelection/Main_ScheduledSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase4_ScheduledSelection/Main_ScheduledSelection_Pcsc.java index 4bfbd9f..dadc7c1 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase4_ScheduledSelection/Main_ScheduledSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase4_ScheduledSelection/Main_ScheduledSelection_Pcsc.java @@ -17,7 +17,7 @@ import org.eclipse.keyple.example.core.service.common.ConfigurationUtil; import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder; import org.eclipse.keyple.plugin.pcsc.PcscReader; -import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol; +import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ObservableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -82,7 +82,7 @@ public static void main(String[] args) throws InterruptedException { .setSharingMode(PcscReader.SharingMode.SHARED); ((ConfigurableCardReader) observableCardReader) .activateProtocol( - PcscSupportedContactlessProtocol.ISO_14443_4.name(), + PcscCardCommunicationProtocol.ISO_14443_4.name(), ConfigurationUtil.ISO_CARD_PROTOCOL); logger.info( diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase5_SequentialMultiSelection/Main_SequentialMultiSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase5_SequentialMultiSelection/Main_SequentialMultiSelection_Pcsc.java index a569fe6..6b312d2 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase5_SequentialMultiSelection/Main_SequentialMultiSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase5_SequentialMultiSelection/Main_SequentialMultiSelection_Pcsc.java @@ -19,7 +19,7 @@ import org.eclipse.keyple.example.core.service.common.ConfigurationUtil; import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder; import org.eclipse.keyple.plugin.pcsc.PcscReader; -import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol; +import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -85,7 +85,7 @@ public static void main(String[] args) { .setSharingMode(PcscReader.SharingMode.SHARED); ((ConfigurableCardReader) cardReader) .activateProtocol( - PcscSupportedContactlessProtocol.ISO_14443_4.name(), + PcscCardCommunicationProtocol.ISO_14443_4.name(), ConfigurationUtil.ISO_CARD_PROTOCOL); logger.info( diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase6_GroupedMultiSelection/Main_GroupedMultiSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase6_GroupedMultiSelection/Main_GroupedMultiSelection_Pcsc.java index 1c1504d..5ede0bf 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase6_GroupedMultiSelection/Main_GroupedMultiSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase6_GroupedMultiSelection/Main_GroupedMultiSelection_Pcsc.java @@ -20,7 +20,7 @@ import org.eclipse.keyple.example.core.service.common.ConfigurationUtil; import org.eclipse.keyple.plugin.pcsc.PcscPluginFactoryBuilder; import org.eclipse.keyple.plugin.pcsc.PcscReader; -import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol; +import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -86,7 +86,7 @@ public static void main(String[] args) { .setSharingMode(PcscReader.SharingMode.SHARED); ((ConfigurableCardReader) cardReader) .activateProtocol( - PcscSupportedContactlessProtocol.ISO_14443_4.name(), + PcscCardCommunicationProtocol.ISO_14443_4.name(), ConfigurationUtil.ISO_CARD_PROTOCOL); logger.info( diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase7_PluginAndReaderObservation/PluginObserver.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase7_PluginAndReaderObservation/PluginObserver.java index 50e02e3..e4d2a6c 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase7_PluginAndReaderObservation/PluginObserver.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase7_PluginAndReaderObservation/PluginObserver.java @@ -19,7 +19,7 @@ import org.eclipse.keyple.core.service.spi.PluginObserverSpi; import org.eclipse.keyple.example.core.service.common.ConfigurationUtil; import org.eclipse.keyple.plugin.pcsc.PcscReader; -import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol; +import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ObservableCardReader; @@ -143,7 +143,7 @@ private void setupReader(CardReader cardReader) { // Activate the ISO14443 card protocol. ((ConfigurableCardReader) cardReader) .activateProtocol( - PcscSupportedContactlessProtocol.ISO_14443_4.name(), + PcscCardCommunicationProtocol.ISO_14443_4.name(), ConfigurationUtil.ISO_CARD_PROTOCOL); } diff --git a/Example_Service_Resource/build.gradle.kts b/Example_Service_Resource/build.gradle.kts index aa17360..8eb6bac 100644 --- a/Example_Service_Resource/build.gradle.kts +++ b/Example_Service_Resource/build.gradle.kts @@ -16,7 +16,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.keyple:keyple-common-java-api") implementation("org.eclipse.keyple:keyple-util-java-lib") @@ -58,7 +58,7 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } - +tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } tasks { spotless { java { From 669e95dd2a7f17104bcbcc6e501acd82688dd405 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Fortune Date: Tue, 25 Nov 2025 10:25:53 +0100 Subject: [PATCH 2/5] refactor: improve protocol handling, cleanup imports, and enable deprecation warnings - Enhanced protocol filtering expressions for clarity and efficiency in PC/SC examples. - Replaced redundant exception types and updated error message handling. - Standardized configuration and protocol activation methods. - Enabled `-Xlint:deprecation` compiler flag across build scripts. - Refined import statements for better organization and readability. --- Example_Card_Calypso/build.gradle.kts | 2 ++ .../build.gradle.kts | 2 ++ .../client/CalypsoTicketingServiceUtil.java | 2 +- .../build.gradle.kts | 2 ++ .../build.gradle.kts | 2 ++ .../keyple/example/plugin/android/nfc/MainActivity.kt | 4 +--- Example_Plugin_PCSC/build.gradle.kts | 2 ++ .../Main_ReaderTypeAutoIdentification_Pcsc.java | 4 +--- Example_Service/build.gradle.kts | 2 ++ .../Main_BasicSelection_Pcsc.java | 11 +++++++---- .../Main_ProtocolBasedSelection_Pcsc.java | 10 +++++----- .../Main_AidBasedSelection_Pcsc.java | 5 ++--- .../Main_ScheduledSelection_Pcsc.java | 5 ++--- .../Main_SequentialMultiSelection_Pcsc.java | 5 ++--- .../Main_GroupedMultiSelection_Pcsc.java | 5 ++--- .../PluginObserver.java | 5 ++--- Example_Service_Resource/build.gradle.kts | 2 ++ 17 files changed, 39 insertions(+), 31 deletions(-) diff --git a/Example_Card_Calypso/build.gradle.kts b/Example_Card_Calypso/build.gradle.kts index 9928226..7ec826b 100644 --- a/Example_Card_Calypso/build.gradle.kts +++ b/Example_Card_Calypso/build.gradle.kts @@ -165,7 +165,9 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } + tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } + tasks { spotless { java { diff --git a/Example_Distributed_PoolReaderServerSide_Webservice/build.gradle.kts b/Example_Distributed_PoolReaderServerSide_Webservice/build.gradle.kts index 4850b05..4383671 100644 --- a/Example_Distributed_PoolReaderServerSide_Webservice/build.gradle.kts +++ b/Example_Distributed_PoolReaderServerSide_Webservice/build.gradle.kts @@ -76,7 +76,9 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } + tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } + tasks { spotless { java { diff --git a/Example_Distributed_PoolReaderServerSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/poolreaderserverside/webservice/client/CalypsoTicketingServiceUtil.java b/Example_Distributed_PoolReaderServerSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/poolreaderserverside/webservice/client/CalypsoTicketingServiceUtil.java index 8e69c1d..e4f0cc1 100644 --- a/Example_Distributed_PoolReaderServerSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/poolreaderserverside/webservice/client/CalypsoTicketingServiceUtil.java +++ b/Example_Distributed_PoolReaderServerSide_Webservice/src/main/java/org/eclipse/keyple/example/distributed/poolreaderserverside/webservice/client/CalypsoTicketingServiceUtil.java @@ -19,8 +19,8 @@ import org.eclipse.keypop.calypso.card.card.CalypsoCard; import org.eclipse.keypop.calypso.card.card.CalypsoCardSelectionExtension; import org.eclipse.keypop.calypso.card.card.ElementaryFile; -import org.eclipse.keypop.reader.ChannelControl; import org.eclipse.keypop.reader.CardReader; +import org.eclipse.keypop.reader.ChannelControl; import org.eclipse.keypop.reader.ReaderApiFactory; import org.eclipse.keypop.reader.selection.CardSelectionManager; import org.eclipse.keypop.reader.selection.IsoCardSelector; diff --git a/Example_Distributed_ReaderClientSide_Webservice/build.gradle.kts b/Example_Distributed_ReaderClientSide_Webservice/build.gradle.kts index 4850b05..4383671 100644 --- a/Example_Distributed_ReaderClientSide_Webservice/build.gradle.kts +++ b/Example_Distributed_ReaderClientSide_Webservice/build.gradle.kts @@ -76,7 +76,9 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } + tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } + tasks { spotless { java { diff --git a/Example_Distributed_ReaderClientSide_Websocket/build.gradle.kts b/Example_Distributed_ReaderClientSide_Websocket/build.gradle.kts index 7267e6c..2b6025f 100644 --- a/Example_Distributed_ReaderClientSide_Websocket/build.gradle.kts +++ b/Example_Distributed_ReaderClientSide_Websocket/build.gradle.kts @@ -77,7 +77,9 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } + tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } + tasks { spotless { java { diff --git a/Example_Plugin_Android_NFC/app/src/main/kotlin/org/eclipse/keyple/example/plugin/android/nfc/MainActivity.kt b/Example_Plugin_Android_NFC/app/src/main/kotlin/org/eclipse/keyple/example/plugin/android/nfc/MainActivity.kt index deac4bf..29d1cc2 100644 --- a/Example_Plugin_Android_NFC/app/src/main/kotlin/org/eclipse/keyple/example/plugin/android/nfc/MainActivity.kt +++ b/Example_Plugin_Android_NFC/app/src/main/kotlin/org/eclipse/keyple/example/plugin/android/nfc/MainActivity.kt @@ -30,8 +30,6 @@ import org.eclipse.keyple.plugin.android.nfc.AndroidNfcPluginFactoryProvider import org.eclipse.keyple.plugin.android.nfc.AndroidNfcSupportedProtocols import org.eclipse.keypop.calypso.card.CalypsoCardApiFactory import org.eclipse.keypop.calypso.card.card.CalypsoCard -import org.eclipse.keypop.calypso.card.transaction.CardIOException -import org.eclipse.keypop.calypso.card.transaction.ChannelControl import org.eclipse.keypop.calypso.card.transaction.FreeTransactionManager import org.eclipse.keypop.reader.* import org.eclipse.keypop.reader.selection.CardSelectionManager @@ -263,7 +261,7 @@ class MainActivity : CalypsoConstants.RECORD_NUMBER_1))}") addActionMessage("Waiting for card removal...") - } catch (e: CardIOException) { + } catch (e: CardCommunicationException) { addResultMessage("Card communication link lost.") } catch (e: Exception) { addResultMessage("An unexpected error occurred ${e.message}.") diff --git a/Example_Plugin_PCSC/build.gradle.kts b/Example_Plugin_PCSC/build.gradle.kts index 72e50c1..e1e43c6 100644 --- a/Example_Plugin_PCSC/build.gradle.kts +++ b/Example_Plugin_PCSC/build.gradle.kts @@ -58,7 +58,9 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } + tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } + tasks { spotless { java { diff --git a/Example_Plugin_PCSC/src/main/java/org/eclipse/keyple/example/plugin/pcsc/UseCase1_ReaderTypeAutoIdentification/Main_ReaderTypeAutoIdentification_Pcsc.java b/Example_Plugin_PCSC/src/main/java/org/eclipse/keyple/example/plugin/pcsc/UseCase1_ReaderTypeAutoIdentification/Main_ReaderTypeAutoIdentification_Pcsc.java index 34ca6a9..a4f5723 100644 --- a/Example_Plugin_PCSC/src/main/java/org/eclipse/keyple/example/plugin/pcsc/UseCase1_ReaderTypeAutoIdentification/Main_ReaderTypeAutoIdentification_Pcsc.java +++ b/Example_Plugin_PCSC/src/main/java/org/eclipse/keyple/example/plugin/pcsc/UseCase1_ReaderTypeAutoIdentification/Main_ReaderTypeAutoIdentification_Pcsc.java @@ -68,9 +68,7 @@ public static void main(String[] args) { smartCardService.registerPlugin( PcscPluginFactoryBuilder.builder() .useContactlessReaderIdentificationFilter( - ".*ASK LoGO.*|.*HID OMNIKEY 5427 CK.*|.*contactless.*") - .useContactReaderIdentificationFilter( - ".*Identive.*|.*HID Global OMNIKEY 3x21.*|(?=contact)(?!contactless)") + "^(?!(.*Identive|.*HID Global OMNIKEY 3x21|.*contact\\b(?!less))).*(ASK LoGO|HID OMNIKEY 5427 CK|contactless).*") .build()); // Log the type of each connected reader diff --git a/Example_Service/build.gradle.kts b/Example_Service/build.gradle.kts index 7f9e006..17167fa 100644 --- a/Example_Service/build.gradle.kts +++ b/Example_Service/build.gradle.kts @@ -57,7 +57,9 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } + tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } + tasks { spotless { java { diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java index 90c50e6..edf3f3e 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java @@ -13,17 +13,18 @@ package org.eclipse.keyple.example.core.service.UseCase1_BasicSelection; import java.util.List; -import org.eclipse.keyple.card.generic.ChannelControl; +import org.eclipse.keyple.card.generic.CardTransactionManager; import org.eclipse.keyple.card.generic.GenericCardSelectionExtension; import org.eclipse.keyple.card.generic.GenericExtensionService; 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.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.PcscCardCommunicationProtocol; 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; @@ -90,11 +91,13 @@ public static void main(String[] args) { // Execute an APDU to get CPLC Data (cf. Global Platform Specification) byte[] cplcApdu = HexUtil.toByteArray("80CA9F7F00"); - List apduResponses = + CardTransactionManager transactionManager = GenericExtensionService.getInstance() .createCardTransaction(cardReader, smartCard) .prepareApdu(cplcApdu) - .processApdusToHexStrings(ChannelControl.CLOSE_AFTER); + .processCommands(ChannelControl.CLOSE_AFTER); + + List apduResponses = transactionManager.getResponsesAsHexStrings(); logger.info("CPLC Data: '{}'", apduResponses.get(0)); diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase2_ProtocolBasedSelection/Main_ProtocolBasedSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase2_ProtocolBasedSelection/Main_ProtocolBasedSelection_Pcsc.java index 6245d18..93bf3a7 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase2_ProtocolBasedSelection/Main_ProtocolBasedSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase2_ProtocolBasedSelection/Main_ProtocolBasedSelection_Pcsc.java @@ -15,9 +15,9 @@ import org.eclipse.keyple.card.generic.GenericCardSelectionExtension; import org.eclipse.keyple.card.generic.GenericExtensionService; import org.eclipse.keyple.core.service.*; +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.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -57,7 +57,7 @@ public class Main_ProtocolBasedSelection_Pcsc { public static final String CONTACTLESS_READER_NAME_REGEX = ".*ASK LoGO.*|.*Contactless.*"; public static final String ISO_CARD_PROTOCOL = "ISO_14443_4_CARD"; - public static final String MIFARE_CLASSIC_PROTOCOL = "MIFARE_CLASSIC_CARD"; + public static final String MIFARE_ULTRALIGHT_PROTOCOL = "MIFARE_ULTRALIGHT_CARD"; private static Plugin plugin; private static ReaderApiFactory readerApiFactory; private static CardReader cardReader; @@ -76,7 +76,7 @@ public static void main(String[] args) { System.exit(0); } - logger.info("= #### Select the card if the protocol is '{}'.", MIFARE_CLASSIC_PROTOCOL); + logger.info("= #### Select the card if the protocol is '{}'.", MIFARE_ULTRALIGHT_PROTOCOL); SmartCard smartCard = selectCard(cardReader); @@ -159,7 +159,7 @@ private static CardReader getReader( .activateProtocol(PcscCardCommunicationProtocol.ISO_14443_4.name(), ISO_CARD_PROTOCOL); ((ConfigurableCardReader) reader) .activateProtocol( - PcscCardCommunicationProtocol.MIFARE_CLASSIC.name(), MIFARE_CLASSIC_PROTOCOL); + PcscCardCommunicationProtocol.MIFARE_ULTRALIGHT.name(), MIFARE_ULTRALIGHT_PROTOCOL); return reader; } @@ -176,7 +176,7 @@ private static CardReader getReader( private static SmartCard selectCard(CardReader reader) { CardSelectionManager cardSelectionManager = readerApiFactory.createCardSelectionManager(); CardSelector cardSelector = - readerApiFactory.createBasicCardSelector().filterByCardProtocol(MIFARE_CLASSIC_PROTOCOL); + readerApiFactory.createBasicCardSelector().filterByCardProtocol(MIFARE_ULTRALIGHT_PROTOCOL); GenericCardSelectionExtension genericCardSelectionExtension = GenericExtensionService.getInstance().createGenericCardSelectionExtension(); cardSelectionManager.prepareSelection(cardSelector, genericCardSelectionExtension); diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase3_AidBasedSelection/Main_AidBasedSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase3_AidBasedSelection/Main_AidBasedSelection_Pcsc.java index 1275a01..9467129 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase3_AidBasedSelection/Main_AidBasedSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase3_AidBasedSelection/Main_AidBasedSelection_Pcsc.java @@ -15,9 +15,9 @@ import org.eclipse.keyple.card.generic.GenericExtensionService; import org.eclipse.keyple.core.service.*; import org.eclipse.keyple.example.core.service.common.ConfigurationUtil; +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.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -81,8 +81,7 @@ public static void main(String[] args) { .setSharingMode(PcscReader.SharingMode.SHARED); ((ConfigurableCardReader) cardReader) .activateProtocol( - PcscCardCommunicationProtocol.ISO_14443_4.name(), - ConfigurationUtil.ISO_CARD_PROTOCOL); + PcscCardCommunicationProtocol.ISO_14443_4.name(), ConfigurationUtil.ISO_CARD_PROTOCOL); logger.info("=============== UseCase Generic #3: AID based card selection =================="); diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase4_ScheduledSelection/Main_ScheduledSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase4_ScheduledSelection/Main_ScheduledSelection_Pcsc.java index dadc7c1..b2c3007 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase4_ScheduledSelection/Main_ScheduledSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase4_ScheduledSelection/Main_ScheduledSelection_Pcsc.java @@ -15,9 +15,9 @@ import org.eclipse.keyple.card.generic.GenericExtensionService; import org.eclipse.keyple.core.service.*; import org.eclipse.keyple.example.core.service.common.ConfigurationUtil; +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.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ObservableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -82,8 +82,7 @@ public static void main(String[] args) throws InterruptedException { .setSharingMode(PcscReader.SharingMode.SHARED); ((ConfigurableCardReader) observableCardReader) .activateProtocol( - PcscCardCommunicationProtocol.ISO_14443_4.name(), - ConfigurationUtil.ISO_CARD_PROTOCOL); + PcscCardCommunicationProtocol.ISO_14443_4.name(), ConfigurationUtil.ISO_CARD_PROTOCOL); logger.info( "=============== UseCase Generic #4: scheduled AID based selection =================="); diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase5_SequentialMultiSelection/Main_SequentialMultiSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase5_SequentialMultiSelection/Main_SequentialMultiSelection_Pcsc.java index 6b312d2..1225471 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase5_SequentialMultiSelection/Main_SequentialMultiSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase5_SequentialMultiSelection/Main_SequentialMultiSelection_Pcsc.java @@ -17,9 +17,9 @@ import org.eclipse.keyple.core.service.*; import org.eclipse.keyple.core.util.HexUtil; import org.eclipse.keyple.example.core.service.common.ConfigurationUtil; +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.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -85,8 +85,7 @@ public static void main(String[] args) { .setSharingMode(PcscReader.SharingMode.SHARED); ((ConfigurableCardReader) cardReader) .activateProtocol( - PcscCardCommunicationProtocol.ISO_14443_4.name(), - ConfigurationUtil.ISO_CARD_PROTOCOL); + PcscCardCommunicationProtocol.ISO_14443_4.name(), ConfigurationUtil.ISO_CARD_PROTOCOL); logger.info( "=============== UseCase Generic #5: sequential selections based on an AID prefix =================="); diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase6_GroupedMultiSelection/Main_GroupedMultiSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase6_GroupedMultiSelection/Main_GroupedMultiSelection_Pcsc.java index 5ede0bf..3f738c3 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase6_GroupedMultiSelection/Main_GroupedMultiSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase6_GroupedMultiSelection/Main_GroupedMultiSelection_Pcsc.java @@ -18,9 +18,9 @@ import org.eclipse.keyple.core.service.*; import org.eclipse.keyple.core.util.HexUtil; import org.eclipse.keyple.example.core.service.common.ConfigurationUtil; +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.PcscCardCommunicationProtocol; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ReaderApiFactory; @@ -86,8 +86,7 @@ public static void main(String[] args) { .setSharingMode(PcscReader.SharingMode.SHARED); ((ConfigurableCardReader) cardReader) .activateProtocol( - PcscCardCommunicationProtocol.ISO_14443_4.name(), - ConfigurationUtil.ISO_CARD_PROTOCOL); + PcscCardCommunicationProtocol.ISO_14443_4.name(), ConfigurationUtil.ISO_CARD_PROTOCOL); logger.info( "=============== UseCase Generic #6: Grouped selections based on an AID prefix =================="); diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase7_PluginAndReaderObservation/PluginObserver.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase7_PluginAndReaderObservation/PluginObserver.java index e4d2a6c..197d524 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase7_PluginAndReaderObservation/PluginObserver.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase7_PluginAndReaderObservation/PluginObserver.java @@ -18,8 +18,8 @@ import org.eclipse.keyple.core.service.spi.PluginObservationExceptionHandlerSpi; import org.eclipse.keyple.core.service.spi.PluginObserverSpi; import org.eclipse.keyple.example.core.service.common.ConfigurationUtil; -import org.eclipse.keyple.plugin.pcsc.PcscReader; import org.eclipse.keyple.plugin.pcsc.PcscCardCommunicationProtocol; +import org.eclipse.keyple.plugin.pcsc.PcscReader; import org.eclipse.keypop.reader.CardReader; import org.eclipse.keypop.reader.ConfigurableCardReader; import org.eclipse.keypop.reader.ObservableCardReader; @@ -143,8 +143,7 @@ private void setupReader(CardReader cardReader) { // Activate the ISO14443 card protocol. ((ConfigurableCardReader) cardReader) .activateProtocol( - PcscCardCommunicationProtocol.ISO_14443_4.name(), - ConfigurationUtil.ISO_CARD_PROTOCOL); + PcscCardCommunicationProtocol.ISO_14443_4.name(), ConfigurationUtil.ISO_CARD_PROTOCOL); } /** diff --git a/Example_Service_Resource/build.gradle.kts b/Example_Service_Resource/build.gradle.kts index 8eb6bac..fff58c7 100644 --- a/Example_Service_Resource/build.gradle.kts +++ b/Example_Service_Resource/build.gradle.kts @@ -58,7 +58,9 @@ fun copyLicenseFiles() { licenseFile.copyTo(File(metaInfDir, "LICENSE"), overwrite = true) noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } + tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } + tasks { spotless { java { From b000d5b7b2a6fc727955b9dcd63080f5f86edf90 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Fortune Date: Tue, 25 Nov 2025 15:19:34 +0100 Subject: [PATCH 3/5] Enable deprecation warnings and enhance channel control usage. Added `-Xlint:deprecation` to Kotlin and Java compiler options to highlight deprecated API usage. Updated `processCommands` calls to use `ChannelControl.KEEP_OPEN` for improved channel management during signature operations. Adjusted dependencies in the test project to use the latest Keyple BOM version. --- .../UseCase11_DataSigning/Main_DataSigning_Pcsc.java | 9 +++++---- Example_Plugin_Android_NFC/app/build.gradle.kts | 7 ++++++- Example_Plugin_Android_OMAPI/app/build.gradle.kts | 7 ++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase11_DataSigning/Main_DataSigning_Pcsc.java b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase11_DataSigning/Main_DataSigning_Pcsc.java index 3774dde..ef9d9f3 100644 --- a/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase11_DataSigning/Main_DataSigning_Pcsc.java +++ b/Example_Card_Calypso/src/main/java/org/eclipse/keyple/example/card/calypso/UseCase11_DataSigning/Main_DataSigning_Pcsc.java @@ -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; @@ -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); @@ -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); } @@ -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); @@ -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); } diff --git a/Example_Plugin_Android_NFC/app/build.gradle.kts b/Example_Plugin_Android_NFC/app/build.gradle.kts index 156b482..4cf7e60 100644 --- a/Example_Plugin_Android_NFC/app/build.gradle.kts +++ b/Example_Plugin_Android_NFC/app/build.gradle.kts @@ -85,7 +85,10 @@ android { targetCompatibility = JavaVersion.toVersion(javaTargetLevel) println("Compiling Java $sourceCompatibility to Java $targetCompatibility") } - kotlinOptions { jvmTarget = javaTargetLevel } + kotlinOptions { + jvmTarget = javaTargetLevel + freeCompilerArgs = listOf("-Xlint:deprecation") + } sourceSets { getByName("main").java.srcDirs("src/main/kotlin") getByName("debug").java.srcDirs("src/debug/kotlin") @@ -112,6 +115,8 @@ android { lint { abortOnError = false } } +tasks.withType().configureEach { options.compilerArgs.add("-Xlint:deprecation") } + fun copyLicenseFiles() { val metaInfDir = File(layout.buildDirectory.get().asFile, "resources/main/META-INF") val licenseFile = File(project.rootDir, "LICENSE") diff --git a/Example_Plugin_Android_OMAPI/app/build.gradle.kts b/Example_Plugin_Android_OMAPI/app/build.gradle.kts index 9a65db4..7a89e85 100644 --- a/Example_Plugin_Android_OMAPI/app/build.gradle.kts +++ b/Example_Plugin_Android_OMAPI/app/build.gradle.kts @@ -91,7 +91,10 @@ android { targetCompatibility = JavaVersion.toVersion(javaTargetLevel) println("Compiling Java $sourceCompatibility to Java $targetCompatibility") } - kotlinOptions { jvmTarget = javaTargetLevel } + kotlinOptions { + jvmTarget = javaTargetLevel + freeCompilerArgs = listOf("-Xlint:deprecation") + } sourceSets { getByName("main").java.srcDirs("src/main/kotlin") getByName("debug").java.srcDirs("src/debug/kotlin") @@ -118,6 +121,8 @@ android { lint { abortOnError = false } } +tasks.withType().configureEach { options.compilerArgs.add("-Xlint:deprecation") } + fun copyLicenseFiles() { val metaInfDir = File(layout.buildDirectory.get().asFile, "resources/main/META-INF") val licenseFile = File(project.rootDir, "LICENSE") From 71f5d38c10d2f688479a12acf7c879155e10988e Mon Sep 17 00:00:00 2001 From: Jean-Pierre Fortune Date: Thu, 27 Nov 2025 09:51:36 +0100 Subject: [PATCH 4/5] Refactor transaction handling to simplify response retrieval Replaced `CardTransactionManager` usage with direct method chaining for response retrieval in multiple instances. This streamlines the code by eliminating intermediate variables and improves readability. Updated Keyple Java BOM dependency version to `2025.11.21` in changelogs. --- CHANGELOG.md | 3 +++ .../UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af4e6fb..08b20b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Upgraded +- Upgrade [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 diff --git a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java index edf3f3e..82277d0 100644 --- a/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java +++ b/Example_Service/src/main/java/org/eclipse/keyple/example/core/service/UseCase1_BasicSelection/Main_BasicSelection_Pcsc.java @@ -13,7 +13,6 @@ package org.eclipse.keyple.example.core.service.UseCase1_BasicSelection; import java.util.List; -import org.eclipse.keyple.card.generic.CardTransactionManager; import org.eclipse.keyple.card.generic.GenericCardSelectionExtension; import org.eclipse.keyple.card.generic.GenericExtensionService; import org.eclipse.keyple.core.service.Plugin; @@ -91,13 +90,12 @@ public static void main(String[] args) { // Execute an APDU to get CPLC Data (cf. Global Platform Specification) byte[] cplcApdu = HexUtil.toByteArray("80CA9F7F00"); - CardTransactionManager transactionManager = + List apduResponses = GenericExtensionService.getInstance() .createCardTransaction(cardReader, smartCard) .prepareApdu(cplcApdu) - .processCommands(ChannelControl.CLOSE_AFTER); - - List apduResponses = transactionManager.getResponsesAsHexStrings(); + .processCommands(ChannelControl.CLOSE_AFTER) + .getResponsesAsHexStrings(); logger.info("CPLC Data: '{}'", apduResponses.get(0)); From c24c46855ee8d8d19e3ec1490f8d9a6f35aa5587 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Fortune Date: Thu, 27 Nov 2025 09:58:29 +0100 Subject: [PATCH 5/5] Fix changelog wording for Keyple Java BOM upgrade. Updated the changelogs in two modules to use "Upgraded" instead of "Upgrade" for consistency. This ensures alignment with the past tense used in other entries. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08b20b9..6e93af9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ### Upgraded -- Upgrade [Keyple Java BOM](https://github.com/eclipse-keyple/keyple-java-bom) to `2025.11.21`. +- Upgraded [Keyple Java BOM](https://github.com/eclipse-keyple/keyple-java-bom) to `2025.11.21`. ## [2025-10-29] ### Changed