davsclaus opened a new pull request, #25753: URL: https://github.com/apache/camel/pull/25753
## Backport of #25510 Cherry-pick of #25510 onto `camel-4.22.x`. **Original PR:** #25510 - CAMEL-22114: Fix PQC KeyStore tests on Java 25 (InvalidKeyException) **Original author:** @gnodet **Target branch:** `camel-4.22.x` ### Original description ## Summary - Fix `InvalidKeyException: unknown private key passed to ML-DSA` when using PQC KeyStore-based signing on Java 25 - Re-encode JDK-native PQC keys through Bouncy Castle's `KeyFactory` after loading from a KeyStore or user-supplied KeyPair, transparently converting them to BC types - No-op on Java 17/21 where JKS always returns BC key instances ## Root Cause Java 25 natively supports ML-DSA ([JEP 497](https://openjdk.org/jeps/497)). When a Bouncy Castle ML-DSA private key is stored in a JKS KeyStore and retrieved, the JDK's built-in ML-DSA `KeyFactory` deserializes it as a JDK-native ML-DSA key object. When this key is passed to BC's `Signature.getInstance("ML-DSA", "BC").initSign()`, BC does not recognize it. See original PR for full details. --- _Claude Code on behalf of davsclaus_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
