-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Native Image] Loading Mac keystore aka KeychainStore results into a runtime exception #10387
Comments
Hi @selhagani Sure, I have created the json file with the tracing agent. I have added as an attachment below: |
Hi @Hakky54, I just used the tracing agent and the generated native image works just fine. |
can you rerun your last step on a Mac OS X with the following command:
|
I just did and it does not print the error message you shared above |
So it created a system.crt file on your current directory? I used the command you shared, I am still getting that exception |
I now also tried with a Apple M1 laptop with GraalVM 22, 21, 17 and I am getting the same error as shown below:
I think the JNI for Apple is missing while creating the native image. The tool is trying to load I compile the same project on Windows and at runtime it is working. As for Windows it is also trying to load different native keystores as shown here: https://github.com/Hakky54/sslcontext-kickstart/blob/master/sslcontext-kickstart/src/main/java/nl/altindag/ssl/util/KeyStoreUtils.java#L251-L257 So my assumptions is that for the case of mac os x it is not resolving the native libraries for Apple. I am still not sure how it works on your machine, but I am open to have a video call with screen sharing to demonstrate the issue |
When I run on my machine I get this error message here:
|
I think you are on the master branch. Can you switch to the feature branch with the following command:
And then run for example the following command:
|
I see, you're right. Now I get that error message as well. I will take a closer look into this and I'll make sure to keep you updated. |
Describe the Issue
I have built Certificate Ripper which is a CLI app to extract server certificates.
I recently added the option to also extract the Operating System trusted certificates. This works as a jar file, however if I compile it to a native image and run it then it will fail with a runtime exception.
Using the latest version of GraalVM can resolve many issues.
I could not use version 23.x as it is not supported yet with a library which I use, which is pico cli. So I can use atmost version 22.x
GraalVM Version
openjdk version "22.0.2" 2024-07-16
OpenJDK Runtime Environment GraalVM CE 22.0.2+9.1 (build 22.0.2+9-jvmci-b01)
OpenJDK 64-Bit Server VM GraalVM CE 22.0.2+9.1 (build 22.0.2+9-jvmci-b01, mixed mode, sharing)
Operating System and Version
Mac OS X 14.5
Troubleshooting Confirmation
Run Command
Expected Behavior
It should create a system.crt file in the current directory
Actual Behavior
Steps to Reproduce
mvn clean install -Pnative-image
./target/crip export pem --extract-system-ca --combined=true
Additional Context
No response
Run-Time Log Output and Error Messages
No response
The text was updated successfully, but these errors were encountered: