]> WPIA git - nre.git/blobdiff - commonFunctions
marking extensions critical, adding CPS-identifiers, adding Country
[nre.git] / commonFunctions
old mode 100755 (executable)
new mode 100644 (file)
index 8b12bf4..f46505b
@@ -3,7 +3,7 @@
 
 genKey(){ #subj, internalName
     openssl genrsa -out $2.key ${KEYSIZE}
-    openssl req -new -key $2.key -out $2.csr -subj "$1/O=Test Environment CA Ltd./OU=Test Environment CAs"
+    openssl req -new -key $2.key -out $2.csr -subj "$1/O=Test Environment CA Ltd./OU=Test Environment CAs/C=AU"
 
 }
 
@@ -26,7 +26,7 @@ caSign(){ # csr,ca,config,start,end
     [[ "$end" != "" ]] && end="-enddate $end"
     [[ "$start" == "" && "$end" == "" ]] && start="$ROOT_VALIDITY"
     BASE="$PWD"
-    echo "Signing: $1 with $2"
+    echo "Signing: $BASE/$1 with $2"
     echo "$start $end"
     pushd $2.ca > /dev/null
     if [[ "$2" == "root" && "$1" == root.* ]]; then
@@ -34,7 +34,7 @@ caSign(){ # csr,ca,config,start,end
     else
        signkey="-cert key.crt"
     fi
-    openssl ca $signkey -keyfile key.key -in "$BASE/$1.csr" -out "$BASE/$1.crt" -batch -config "$BASE/selfsign.config" -extfile "$BASE/$3" $start $end
+    openssl ca $signkey -keyfile key.key -in "$BASE/$1.csr" -out "$BASE/$1.crt" -batch -config "$BASE/../selfsign.config" -extfile "$BASE/$3" $start $end
     popd > /dev/null
     echo "Signed"
 }