ramu11 commented on PR #30945: URL: https://github.com/apache/camel/pull/30945#issuecomment-7235250601
Thanks @davsclaus for the detailed review and the additional feedback. I have made a further architectural update in the current branch. In particular, I revisited the reflection concern from the earlier implementation and replaced that compatibility approach with typed, version-specific adapters. The main updates are: 1. **Typed Bouncy Castle compatibility:** Added a Camel-owned JDK-only adapter SPI, with separate implementations compiled against the public Bouncy Castle 1.86 and 1.87 APIs. The appropriate implementation is loaded through `ServiceLoader`. The production code no longer uses reflective access. A JUnit fence test checks this boundary and restricts Bouncy Castle imports in the core module to the approved typed JCA support classes. 2. **KEM interoperability:** Provider-based KEM operations now prefer `KeyGenerator` whenever the provider advertises that service. The JDK `KEM` API is used only when no `KeyGenerator` service is available. This preserves the established BC 1.86 derivation behavior. Regression tests cover interoperability between the two paths for HQC, NTRU, NTRU LPRime and SNTRU Prime. 3. **Provider handling:** Provider resolution is based on the requested JCA service and algorithm. Unnecessary provider registration is avoided when the requested service is already available, and error handling and provider-selection documentation have been updated. 4. **Compatibility workflow:** Fixed the dependency bootstrap to include the required build module. Pull-request checks no longer depend on a moving Maven Central latest release; the scheduled latest-version check is restricted to the upstream Apache Camel repository. 5. **Review follow-ups:** Removed the redundant outer KEM synchronization, replaced Bouncy Castle internal HKDF test dependencies with fixed RFC 5869 known-answer vectors, and clarified the `ClassValue` caching documentation. 6. **Upgrade documentation:** Updated the Camel 4.24 upgrade guide and PQC documentation for the API, provider-selection and interoperability changes. The experimental KEM algorithms SABER, NTRU, NTRU LPRime and SNTRU Prime remain available. I have kept any deprecation or migration decision for those algorithms separate from this compatibility change. **Latest local validation:** - `camel-pqc`: 467 unit tests and 18 integration tests passed. - `camel-pqc-micrometer`: 9 tests passed. - Bouncy Castle 1.86/1.87 compatibility and cross-version interoperability checks passed. - The production import/reflection fence passed. - Compile, install and module verification builds passed. The latest branch also includes the upstream `main` merge and has been pushed. Could you please take another look at the revised typed-adapter design, particularly the removal of reflective access and the BC 1.86/1.87 compatibility boundary? Thanks again for the review. -- 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]
