pass in private key for generation of cert requests
This commit is contained in:
parent
c91ddb9f2e
commit
5d66a9880c
5 changed files with 267 additions and 6 deletions
|
|
@ -39,7 +39,7 @@ openssl req -passin pass:dontusethiskey -new -x509 -days 365 -key $TEST_PATH/ca.
|
|||
echo "[+] Generating Server key"
|
||||
openssl genrsa -passout pass:${SRVCAPASS} -aes256 -out $SERVER_PATH/private.key 4096
|
||||
echo "[+] Generating Server signing request"
|
||||
openssl req -passin pass:${SRVCAPASS} -out $SERVER_PATH/request.csr -subj "/CN=${SERVER_CN}"
|
||||
openssl req -passin pass:${SRVCAPASS} -new -key $SERVER_PATH/private.key -out $SERVER_PATH/request.csr -subj "/CN=${SERVER_CN}"
|
||||
echo "[+] Generating Server certificate "
|
||||
openssl x509 -req -passin pass:${SRVCAPASS} -days 365 -in $SERVER_PATH/request.csr -CA $SERVER_PATH/ca.crt -CAkey $SERVER_PATH/ca.key -set_serial 01 -out $SERVER_PATH/server.crt
|
||||
echo "[+] Removing passphrase from server key"
|
||||
|
|
@ -49,18 +49,18 @@ openssl rsa -passin pass:${SRVCAPASS} -in $SERVER_PATH/private.key -out $SERVER_
|
|||
echo "[+] Generating Client key"
|
||||
openssl genrsa -passout pass:${CLTCAPASS} -aes256 -out $CLIENT_PATH/private.key 4096
|
||||
echo "[+] Generating Client signing request"
|
||||
openssl req -passin pass:${CLTCAPASS} -out $CLIENT_PATH/request.csr -subj "/CN=${CLIENT_CN}"
|
||||
openssl req -passin pass:${CLTCAPASS} -new -key $CLIENT_PATH/private.key -out $CLIENT_PATH/request.csr -subj "/CN=${CLIENT_CN}"
|
||||
echo "[+] Generating Client certificate "
|
||||
openssl x509 -req -passin pass:${CLTCAPASS} -days 365 -in $CLIENT_PATH/request.csr -CA $CLIENT_PATH/ca.crt -CAkey $CLIENT_PATH/ca.key -set_serial 01 -out $CLIENT_PATH/server.crt
|
||||
echo "[+] Removing passphrase from client key"
|
||||
openssl rsa -passin pass:${CLTCAPASS} -in $CLIENT_PATH/private.key -out $CLIENT_PATH/private.key
|
||||
|
||||
# Generate Test Key, Signing request, cert
|
||||
echo "[+] Generating server key"
|
||||
echo "[+] Generating test key"
|
||||
openssl genrsa -passout pass:dontusethiskey -aes256 -out $TEST_PATH/private.key 4096
|
||||
echo "[+] Generating server signing request"
|
||||
openssl req -passin pass:dontusethiskey -out $TEST_PATH/request.csr -subj "/CN=${DontUseMe}"
|
||||
echo "[+] Generating server certificate "
|
||||
echo "[+] Generating test signing request"
|
||||
openssl req -passin pass:dontusethiskey -new -key $TEST_PATH/private.key -out $TEST_PATH/request.csr -subj "/CN=${DontUseMe}"
|
||||
echo "[+] Generating test certificate "
|
||||
openssl x509 -req -passin pass:dontusethiskey -days 365 -in $TEST_PATH/request.csr -CA $TEST_PATH/ca.crt -CAkey $TEST_PATH/ca.key -set_serial 01 -out $TEST_PATH/server.crt
|
||||
echo "[+] Removing passphrase from test key"
|
||||
openssl rsa -passin pass:dontusethiskey -in $TEST_PATH/private.key -out $TEST_PATH/private.key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue