Oft benutzt. Hat ’tausende’ Optionen. –> Kompliziert und unübersichtlich!
openssl
¶1openssl genrsa -aes256 -out ca-key.pem 4096
1openssl req -new -x509 -sha256 -days 365 -key ca-key.pem -out ca.pem
1openssl x509 -in ca.pem -text
2openssl x509 -in ca.pem -purpose -noout -text
1openssl genrsa -out cert-key.pem 4096
subject
or common name.1openssl req -new -sha256 -subj "/CN=yourcn" -key cert-key.pem -out cert.csr
extfile
with all the SANs (subject alternative names)1echo "subjectAltName=DNS:your-dns.record,IP:257.10.10.1" >> extfile.cnf
2# optional
3echo "extendedKeyUsage = serverAuth" >> extfile.cnf
1openssl x509 -req -sha256 -days 365 -in cert.csr -CA ca.pem -CAkey ca-key.pem \
2 -out cert.pem -extfile extfile.cnf -CAcreateserial
COMMAND | CONVERSION |
---|---|
openssl x509 -outform der -in cert.pem -out cert.der |
PEM to DER |
openssl x509 -inform der -in cert.der -out cert.pem |
DER to PEM |
openssl pkcs12 -in cert.pfx -out cert.pem -nodes |
PFX to PEM |
1openssl verify -CAfile ca.pem -verbose cert.pem