Skip to content

DominiqueComte/sslpoke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSLPoke

Small program for testing the validity of certificates and trust stores.

Building

Either build "normally":

./mvnw package

or do a native build (that needs a GraalVM JDK)

./mvnw package -Pnative

Usage

with the JAR file and the default trust store

java SSLPoke [target-hostname] [port]

with the native program and the default trust store

sslpoke [target-hostname] [port]

output

If the server certificate is trusted by the client-truststore it will print,

Successfully connected

Otherwise, it will print an 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

extra options

The same options can be passed to the Java program or the native program.

For example:

  • the path to a trust store
    • -Djavax.net.ssl.trustStore=[client-truststore-path]
  • enabling some debugging output
    • -Djavax.net.debug=ssl:handshake
  • proxy settings etc...

source

This class or similar ones are a bit everywhere, I couldn't find which one was the first one. Possibly, from this file on the Atlassian website.

About

the SSLPoke command, from Atlassian, but with a Maven native build and updated to Java 21

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages