-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling https URL throws Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty #1034
Comments
|
@codependent does this fix work for you #768 (comment)? Otherwise, can you point to the repo where I can replicate this? |
|
By the way |
|
Regarding I didn't set the
On another hand, I followed the comment linked above and set the trustore location (/home/application/cacerts) and password pointing at a copy of the cacerts included in the graal distribution. Previously I put it in the root of the project so that the Dockerfile COPY statement put it into the container at /home/application/cacerts. The trustore is setup in the ExampleController constructor: However I'm still getting the exception: To reproduce:
|
|
|
|
I cannot replicate the |
|
It looks like I needed to specify |
|
The With these changes and using the |
My native image makes a HTTPS call to a remote resource and throws a
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-emptyThe code is pretty straightforward:
I've followed the documentation at https://github.com/oracle/graal/blob/master/substratevm/URL-PROTOCOLS.md and https://github.com/oracle/graal/blob/master/substratevm/JCA-SECURITY-SERVICES.md to enable security services, adding
--enable-httpsThe only thing I haven't done is adding
libsunec.so. I've looked for it in various JDK installations (1.0.0-rc-12-grl, 8.0.202-zulu, and Oracle's jdk1.8.0_201.jdk), however none of the contained the .so file.Is that the reason why I'm getting that error? If so, where can I get the needed .so file? An updated of the related doc would come in handy in case it is not shipped by default with any jdk.
The text was updated successfully, but these errors were encountered: