Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will install startcom class 2 ca certs into oracle java
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.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |