Skip to content

Instantly share code, notes, and snippets.

@richmilne
richmilne / import-letsencrypt-java.sh
Last active March 15, 2024 11:26 — forked from galan/import-letsencrypt-java.sh
Import Let's Encrypt certificates into Java's trusted keystore (cacerts)
#!/bin/bash -e
# A codificiation of the steps outlined at
# https://ordina-jworks.github.io/security/2019/08/14/Using-Lets-Encrypt-Certificates-In-Java.html
CERT_EXT=der
# JAVA_HOME can be passed as argument if not set
if [[ -z ${JAVA_HOME+x} ]] || [[ ! -d ${JAVA_HOME} ]]; then
JAVA_HOME=${1}
fi