Skip to content

Commit

Permalink
This will install startcom class 2 ca certs into oracle java
Browse files Browse the repository at this point in the history
installations on mac os x.
  • Loading branch information
John McEntire committed Jul 22, 2014
1 parent 013ce19 commit c01ade3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions install-ca-java.sh
@@ -0,0 +1,22 @@
#!/bin/bash

mkdir /tmp/java-cas
pushd /tmp/java-cas

curl -O http://www.startssl.com/certs/ca.crt
curl -O http://www.startssl.com/certs/sub.class2.server.ca.crt

echo "Keystore password should be \"changeit\", then enter \"y\""

JAVA_VERSIONS=$(ls /Library/Java/JavaVirtualMachines/)

for VERSION in $JAVA_VERSIONS ; do
echo "Importing into java version $VERSION"

sudo keytool -import -trustcacerts -keystore /Library/Java/JavaVirtualMachines/$VERSION/Contents/Home/jre/lib/security/cacerts -alias startcom.ca -file ca.crt
sudo keytool -import -trustcacerts -keystore /Library/Java/JavaVirtualMachines/$VERSION/Contents/Home/jre/lib/security/cacerts -alias class2.startcom.ca -file sub.class2.server.ca.crt

done

popd
rm -rf /tmp/java-cas

0 comments on commit c01ade3

Please sign in to comment.