Update 'docker_portainer_stacks/portainer/setup-dockerapi-withtls'

This commit is contained in:
sthope 2021-09-02 23:27:27 +02:00
parent d5f1e63acc
commit 50868425f5

View File

@ -30,7 +30,15 @@ $(openssl_genrsa_pass);cat remember2delete
openssl genrsa -aes256 -passout file:remember2delete -out ca-key.pem 4096
openssl req -new -x509 -days 365 -key ca-key.pem -sha256 -out ca.pem -passin file:remember2delete \
-subj "/C=US/CN=${MY_IP}"
-subj "/C=US/CN=$MY_IP"
openssl genrsa -out server-key.pem 4096
echo subjectAltName = DNS:$MY_IP,IP:10.0.0.200,IP:127.0.0.1 >> extfile.cnf
echo extendedKeyUsage = serverAuth >> extfile.cnf
openssl x509 -req -days 365 -sha256 -in server.csr -CA ca.pem -CAkey ca-key.pem \
-CAcreateserial -out server-cert.pem -extfile extfile.cnf
clear
echo "##########################################################"