CA-Zertifikat erstellen:
# ggf. Key erstellen openssl genrsa -aes256 -out ca-key.pem 4096
# neues Zertifikat (self-signed) austellen # ggf. Konfiguration aus Abschnitt "v3_ca" in der Datei /etc/ssl/openssl.conf nutzen openssl req -x509 -new -nodes -extensions v3_ca -key ca-key.pem -days 3650 -out ca-root.pem -sha512
Nutzerzertifikate erstellen:
# ggf Key erstellen openssl genrsa -aes256 -out ca-key.pem 4096
# CSR erstellen aus vorhandenem Key openssl req -new -key haproxy-key.pem -out haproxy-crt.csr -sha512
# Nutzerzertifikat von CA unterschreiben # ggf. Konfiguration aus Abschnitt "web_cert" in der Datei /etc/ssl/openssl.conf für Key-Usages nutzen openssl x509 -req -in haproxy-crt.csr -CA ca-root.pem -CAkey ca-key.pem -CAcreateserial -out haproxy-crt.pem -extensions web_cert -extfile /etc/ssl/openssl.cnf -days 365 -sha512
/etc/ssl/openssl.cnf
# kein CA-Zertifikat basicConstraints=CA:FALSE #KeyUsages keyUsage = digitalSignature, keyEncipherment extendedKeyUsage = critical, serverAuth, clientAuth # SAN subjectAltName=DNS:ronnyfriedland.de,DNS:www.ronnyfriedland.de,DNS:ronfri.ddns.net
PKCS12-Keystore erzeugen (für Import Client-Zertifikate in Browser)
openssl pkcs12 -export -in haproxy-combined.crt -out client.pkcs12 -name web -noiter -nomaciter