Created
June 14, 2023 22:40
-
-
Save perryism/c2638cbb67a986a118bf4135169affc0 to your computer and use it in GitHub Desktop.
Import certs from a folder to a java runtime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JAVA_HOME=$(java_home -v 18) | |
CERT_FOLDER=/Users/plee/.certs | |
KEYSTORE=$JAVA_HOME/lib/security/cacerts | |
for cert in $(ls $CERT_FOLDER) | |
do | |
sudo keytool -import -alias $(basename $cert .cer) -keystore $KEYSTORE -file $CERT_FOLDER/$cert | |
done | |
#sudo keytool -list -keystore $KEYSTORE | grep -i <cert name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment