Some chmods to make the life easier.
authorSomeone <someone@somenet.org>
Wed, 4 Feb 2015 23:19:54 +0000 (00:19 +0100)
committerSomeone <someone@somenet.org>
Wed, 4 Feb 2015 23:19:54 +0000 (00:19 +0100)
certgen.sh

index 4131eba489408af28fbb0639fb036f3409e1df22..7fc33f3199f753c5b95488ab5b4d35ad20efcf79 100755 (executable)
@@ -23,6 +23,7 @@ while read cdline ; do
        fi
 
        mkdir "output/${certdata[1]}"
+       chmod o+x "output/${certdata[1]}"
 
        SUBJECT="${certdata[2]}CN=${certdata[1]}/"
        CERTGEN_DNS_ALT_NAMES=$(echo "DNS:${certdata[1]},${certdata[3]}" | sed -e 's/,/ DNS:/g')
@@ -35,6 +36,8 @@ while read cdline ; do
        if [[ ${certdata[0]} == "CRT" ]] ; then
                openssl x509 -req -signkey "${certdata[1]}.key" -in "${certdata[1]}.csr" -out "${certdata[1]}.crt" -extensions v3_req -extfile /tmp/certgen.cnf \
                        -days 365 -sha512 &> /dev/null
+               chmod o+r "${certdata[1]}.crt"
+
                echo -n "${certdata[1]} " >> "${MYPWD}/output/fpfile.txt"
                openssl x509 -in "${certdata[1]}.crt" -fingerprint -noout -sha512 >> "${MYPWD}/output/fpfile.txt"
                echo "" >> "${MYPWD}/output/fpfile.txt"