diff --git a/CHANGELOG.md b/CHANGELOG.md index af4e6fb..6e93af9 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 +- Upgraded [Keyple Java BOM](https://github.com/eclipse-keyple/keyple-java-bom) to `2025.11.21`. + ## [2025-10-29] ### Changed - Switched to [Keyple Java BOM](https://github.com/eclipse-keyple/keyple-java-bom) `2025.10.24` for dependency diff --git a/Example_Card_Calypso/build.gradle.kts b/Example_Card_Calypso/build.gradle.kts index 81eb483..7ec826b 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") @@ -166,6 +166,8 @@ fun copyLicenseFiles() { 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/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_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..4383671 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") @@ -77,6 +77,8 @@ fun copyLicenseFiles() { 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..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.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_Webservice/build.gradle.kts b/Example_Distributed_ReaderClientSide_Webservice/build.gradle.kts index 6f5b7b5..4383671 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") @@ -77,6 +77,8 @@ fun copyLicenseFiles() { 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..2b6025f 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") @@ -78,6 +78,8 @@ fun copyLicenseFiles() { 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..4cf7e60 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") @@ -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_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_Android_OMAPI/app/build.gradle.kts b/Example_Plugin_Android_OMAPI/app/build.gradle.kts index a78455f..7a89e85 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") @@ -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") diff --git a/Example_Plugin_PCSC/build.gradle.kts b/Example_Plugin_PCSC/build.gradle.kts index 714191d..e1e43c6 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") @@ -59,6 +59,8 @@ fun copyLicenseFiles() { 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 79e279c..17167fa 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") @@ -58,6 +58,8 @@ fun copyLicenseFiles() { 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..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,17 +13,17 @@ 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.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.PcscSupportedContactlessProtocol; 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; @@ -94,7 +94,8 @@ public static void main(String[] args) { GenericExtensionService.getInstance() .createCardTransaction(cardReader, smartCard) .prepareApdu(cplcApdu) - .processApdusToHexStrings(ChannelControl.CLOSE_AFTER); + .processCommands(ChannelControl.CLOSE_AFTER) + .getResponsesAsHexStrings(); logger.info("CPLC Data: '{}'", apduResponses.get(0)); @@ -137,7 +138,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..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.PcscSupportedContactlessProtocol; 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); @@ -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_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 970aa31..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.PcscSupportedContactlessProtocol; 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( - PcscSupportedContactlessProtocol.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 4bfbd9f..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.PcscSupportedContactlessProtocol; 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( - PcscSupportedContactlessProtocol.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 a569fe6..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.PcscSupportedContactlessProtocol; 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( - PcscSupportedContactlessProtocol.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 1c1504d..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.PcscSupportedContactlessProtocol; 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( - PcscSupportedContactlessProtocol.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 50e02e3..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.PcscCardCommunicationProtocol; import org.eclipse.keyple.plugin.pcsc.PcscReader; -import org.eclipse.keyple.plugin.pcsc.PcscSupportedContactlessProtocol; 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( - PcscSupportedContactlessProtocol.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 aa17360..fff58c7 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") @@ -59,6 +59,8 @@ fun copyLicenseFiles() { noticeFile.copyTo(File(metaInfDir, "NOTICE.md"), overwrite = true) } +tasks.withType { options.compilerArgs.add("-Xlint:deprecation") } + tasks { spotless { java {