SSLPoke Save

Java tool for testing validity (certificates) of trust stores

Project README

SSLPoke

Test of java SSL / keystore / cert setup. Came from https://confluence.atlassian.com/download/attachments/117455/SSLPoke.java

Use Gradle to build standalone JAR file:

./gradlew clean jar

Usage:

  1. Negative test SSL connection:

    java -jar build/libs/SSLPoke-1.0.jar <server> 443

    you should get exception like this:

    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    
  2. Create new empty keystore and add exported certificate from server:

    keytool -import -file certificate.cert -alias certificate -keystore trustStore.keystore
    
  3. Do the test again and specify trustStore with password:

    java -Djavax.net.ssl.trustStore=trustStore.keystore -Djavax.net.ssl.trustStorePassword=changeit -jar build/libs/SSLPoke-1.0.jar <server> 443

    you should get positive answer:

    Successfully connected

Open Source Agenda is not affiliated with "SSLPoke" Project. README Source: MichalHecko/SSLPoke
Stars
87
Open Issues
3
Last Commit
1 year ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating