]> WPIA git - gigi.git/blobdiff - keys/generateTruststore.sh
[Keys] a certificate structure that looks like the planned future.
[gigi.git] / keys / generateTruststore.sh
index a51481de3d8130058bbff0fef857ad947a5e6e67..0c5aedc2c2d575b8b5e2b501ffb6a928200dcbb0 100755 (executable)
@@ -1,11 +1,20 @@
-#!/bin/sh
+#!/bin/bash
 # this script imports the cacert root certs
 
+rm -f ../config/cacerts.jks
+
 #wget -N http://www.cacert.org/certs/root.crt
 #wget -N http://www.cacert.org/certs/class3.crt
 
 #keytool -importcert -keystore ../config/cacerts.jks -file root.crt -alias root -storepass "changeit" $1
 #keytool -importcert -keystore ../config/cacerts.jks -file class3.crt -alias class3 -storepass "changeit" $1
-keytool -importcert -keystore ../config/cacerts.jks -file testca.crt -alias own -storepass "changeit" $1
+
+function import(){
+  keytool -importcert -keystore ../config/cacerts.jks -file "$1.crt" -alias own -storepass "changeit" -alias "$1" $2
+}
+
+import root -noprompt
+import assured
+import unassured
 
 keytool -list -keystore ../config/cacerts.jks -storepass "changeit"