We are currently migrating all git repositories to new storage. In the unlikely event that you attempt to write to your git repo at the exact time it is being moved, you will receive a message about your repository being write protected.

Commit 74e6a1c3 authored by Raymond Kristiansen's avatar Raymond Kristiansen
Browse files

Updated cert generation script to run with batch

parent fb7ce75d
......@@ -11,15 +11,27 @@ cnf="cnf/${host}.cnf"
if [ -f "cnf/${host}.cnf" ]; then
cnf="cnf/${host}.cnf"
else
cnf="intermediate/openssl.cnf"
echo "[ req ]
default_bits = 2048
prompt = no
encrypt_key = no
default_md = sha256
distinguished_name = dn
utf8 = yes
[ dn ]
C = NO
O = My Org
CN = ${host}
" > cnf/${host}.cnf
cnf="cnf/${host}.cnf"
fi
echo "Using ${cnf} as config file"
openssl genrsa -out intermediate/private/${host}.key.pem 2048
openssl req -config ${cnf} -key intermediate/private/${host}.key.pem -new -sha256 -out intermediate/csr/${host}.csr.pem
openssl req -config ${cnf} -batch -key intermediate/private/${host}.key.pem -new -sha256 -out intermediate/csr/${host}.csr.pem
openssl ca -config intermediate/openssl.cnf -extensions v3_req \
-days 375 -notext -md sha256 -in intermediate/csr/${host}.csr.pem \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment