How can I resolve my ssl certificate not being rec...
# wiremock-java
w
How can I resolve my ssl certificate not being recognized by the browser? I have added a keystore jks file but the browser doesnt like the certificate?
t
You can download the PEM version, which your browser should accept
w
Copy code
Failed to export certificate authority cert from /Users/..../.wiremock/ca-keystore.jks
t
Are you running Java 17+?
w
openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment (build 19.0.1+10-21) OpenJDK 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing)
Am i running the wrong version of java?
t
For 17+ you need to start the server with an arg that allows the sun crypto libraries to be included:
--add-exports=java.base/sun.security.x509=ALL-UNNAMED
w
Exception in thread "main" joptsimple.UnrecognizedOptionException: add-exports is not a recognized option
java -jar wiremock-jre8-standalone-2.35.0.jar --https-port 8443 --https-keystore ./keystore.jks --add-exports=java.base/sun.security.x509=ALL-UNNAMED --verbose
t
I think you need to add it before the
-jar
part
1
w
hmmm still same issue
Failed to export certificate authority cert from
thanks for the help @Tom I keep trying tomorrow.