Mac环境导入证书

1
2
3
keytool -import -keystore /Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/security/cacerts -storepass changeit -keypass changeit -alias ca -file /Users/leslie/Desktop/cer/ca.cer

keytool -import -keystore /Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/security/cacerts -storepass changeit -keypass changeit -alias ca_1 -file /Users/leslie/Desktop/cer/ca_1.cer

Docker JDK1.8镜像中导入证书

1
2
3
$JAVA_HOME/bin/keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -keypass changeit -alias ca_1 -file /tmp/ca_1.cer

$JAVA_HOME/bin/keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -keypass changeit -alias ca -file /tmp/ca.cer