JiriOndrusek commented on code in PR #8483:
URL: https://github.com/apache/camel-quarkus/pull/8483#discussion_r3020577959
##########
extensions-support/bouncycastle/runtime/src/main/java/org/apache/camel/quarkus/support/bouncycastle/BouncyCastleRecorder.java:
##########
@@ -73,12 +85,25 @@ public void registerBouncyCastleProvider(List<String>
cipherTransformations, Shu
}
}
- shutdownContext.addShutdownTask(new Runnable() {
- @Override
- public void run() {
-
Security.removeProvider(SecurityProviderUtils.BOUNCYCASTLE_PROVIDER_NAME);
- LOG.debug("Removed Bouncy Castle security provider");
+ if (additionalProviders.contains(BOUNCYCASTLE_PCQ_PROVIDER_NAME)) {
+ Provider pqcProvider = getProvider("BCPQC");
+ if (pqcProvider == null) {
+ pqcProvider = new BouncyCastlePQCProvider();
+ try {
+ addProvider(pqcProvider);
+ } catch (SecurityException e) {
+ throw new RuntimeException(e);
+ }
+ LOG.debugf("Registered BouncyCastlePQCProvider");
}
+ registeredProviders.add(pqcProvider);
+
+ }
+
+ shutdownContext.addShutdownTask(() -> {
+
registeredProviders.stream().map(Provider::getName).forEach(Security::removeProvider);
+
+ LOG.debug("Removed Bouncy Castle security provider");
});
Review Comment:
removed
--
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]