Problems with BouncyCastle in native images #28234
-
I have a Quarkus application that works with encryption, signatures and digests using BouncyCastle. It works well in Java mode, but in native mode I get: and:
There are probably other similar problems that I have yet to find. My guess is that I need to register classes for reflection, but the whole point of indirection such as I'm considering writing a tool that dumps all classes in the BC jars to register every single one just in case. Could there be something I have missed, or am I on the right track here? Is there a better way? I'm using the BC versions pulled in by the Quarkus BOM with 2.12.3, SSL is enabled in the configuration. I tried to set I'm grateful for any hints, as this is a blocker. Running the application in Java mode is an option, but that would be a waste. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
/cc @sberyozkin |
Beta Was this translation helpful? Give feedback.
-
@erik-wramner Can you please try only do Right now it also registers many of the individual algorithms for reflection, however may be we should indeed consider just registering all of them, the only problem there is that there is a massive number of them, where an application uses a few at most, with many of those algorithms being quite specific, so my thinking has been so far that we should cover most of the well-known ones and let users register others as needed. |
Beta Was this translation helpful? Give feedback.
@erik-wramner Can you please try only do
quarkus.security.security-providers=BC
, without creating it manually, and make sureio.quarkus:quarkus-security
is on the classpath ?Right now it also registers many of the individual algorithms for reflection, however may be we should indeed consider just registering all of them, the only problem there is that there is a massive number of them, where an application uses a few at most, with many of those algorithms being quite specific, so my thinking has been so far that we should cover most of the well-known ones and let users register others as needed.