Skip to content

Instantly share code, notes, and snippets.

@dportabella
dportabella / TestJKS.java
Last active January 26, 2024 19:34
Test your JKS file easily with java -Djavax.net.ssl.trustStore=your_trust_store.jks TestJKS <url> [<user> <password>]
/*
Test your JKS file easily.
You have created a java JKS trust store file to access a webservice with a certificate, and you want to test if it works?
Some colleagues often test this by deploying the jks to the application server (tomcat, weblogic...), restarting the server and manually running tests,
and repeating this procedure until the jks is properly created.
you can speed up this test by using this simple java program:
> javac TestJKS.java