This example requires GraalVM with Java 11.
Steps to reproduce:
javac SimpleHTTPSServer.java
javac Https11SimpleClient.java
native-image --no-fallback --enable-all-security-services Https11SimpleClient
java SimpleHTTPSServer
Then in another console:
-> This request is expected to be successful.
java -Djavax.net.ssl.trustStore=testkey.jks -Djavax.net.ssl.trustStorePassword=password Https11SimpleClient
-> Testing the native image fails.
./https11simpleclient -Djavax.net.ssl.trustStore=testkey.jks -Djavax.net.ssl.trustStorePassword=password