
NAME
jssl - Resolve Java SSL issues like PKIX path building failed instantly.
Diagnose, retrieve, and install certificates into Java keystores with ease.
SYNOPSIS
jssl <operation> [host|file] [options]
DESCRIPTION
jssl is a command-line tool to interact with Java keystores and SSL endpoints. It allows users to diagnose SSL handshake issues, retrieve remote certificates, and install them into local Java keystores. It also parses Maven logs for missing certificate errors and handles them automatically.
OPERATIONS
ping
: Check the SSL handshake against a host without modifying the keystore.
install
: Connect to a host, retrieve its SSL certificate, and install it into the Java keystore. If the target alias already exists, it is replaced.
file
: Process a file containing a list of hosts (one per line) to install certificates.
list
: List trusted certificates installed with jssl in a table, including creation and expiration dates. Certificates expiring within 30 days are highlighted in yellow; expired certificates are highlighted in red.
uninstall
: Remove a certificate from the Java keystore, identified by its hostname or alias.
doctor
: Read Maven build logs (from stdin) and automatically detect and install missing certificates based on connection errors.
OPTIONS
-p, --port: SSL port to connect to. Defaults to 443.
-a, --alias: Alias to use in the Java keystore. Defaults to jssl_<host>.
-v, --verbose: Print debug output.
--version: Print jssl and Java version information.
-h, --help: Print help.
KEYSTORE OVERRIDES
By default, jssl uses the active Java truststore. For tests or custom workflows, the target keystore can be overridden with environment variables:
JSSL_KEYSTORE_PATH=/path/to/cacerts JSSL_STOREPASS=changeit jssl list
JSSL_STOREPASS defaults to changeit when unset.
INSTALLATION
Via script
curl -sL https://raw.githubusercontent.com/pmamico/java-ssl-tools/main/install.sh | bash
Run in a Unix terminal. For native Windows Java, use Git Bash with administrative privileges.
For Java running inside Windows Subsystem for Linux (WSL), install and run jssl
inside that distribution with a Linux JDK. See the WSL setup and troubleshooting guide
for SDKMAN, keystore permissions, and VPN-related TLS timeouts.
Via Homebrew
brew install pmamico/keg/jssl
DEMO

COMPATIBILITY

REQUIREMENTS
JAVA_HOME environment variable must be set
openssl must be available on the system
- A JDK with
java, javac (for ping), and keytool is required
SEE ALSO
keytool(1), openssl(1), mvn(1)
评论