====== OpenSSL ====== |Serverconfig check|http://www.sslshopper.com/ssl-checker.html| |StartSSL Apache Config|http://www.startssl.com/?app=21| Alle Komandos sind so parameterisiert, dass die Keys kein Passwort bekommen. ===== KEY ===== openssl genrsa -nodes -out domain.key 4096 ===== CSR ===== openssl req -new -key domain.key -out domain.csr -sha256 [[openssl.conf]] für Wildcard und Multidomain-CSRs openssl req -new -key domain.key -config openssl.cnf -out domain.csr -sha256 ===== KEY und CSR ===== openssl req –newkey rsa:4096 –keyout domain.key –nodes –new –out domain.csr -sha256 [[openssl.conf]] für Wildcard und Multidomain-CSRs openssl req –newkey rsa:4096 –keyout domain.key –nodes –new -config openssl.cnf –out domain.csr -sha256 ===== KEY und CSR ohne Prompt mit Suject ===== openssl req -nodes -newkey rsa:2048 -keyout domain.key -out domain.csr -subj "/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=example.com" ===== COMPARE ===== openssl x509 -modulus -in dommain.crt -text -noout | openssl md5 openssl rsa -noout -modulus -in domain.key | openssl md5 openssl req -noout -modulus -in domain.csr | openssl md5 ===== APACHE ===== cat /tmp/domainkey.pem > /etc/apache2/ssl/domain.pem; cat /tmp/domain.crt >> /etc/apache2/ssl/domain.pem ln -s /etc/apache2/ssl/domain.pem `/usr/lib/ssl/misc/c_hash domain.pem` :!: Wenn Nötig intermediate Zertifikat noch mit anhängen :!: ===== CHECKS ===== CSR anschauen openssl req -text -noout -verify -in CSR.csr Privatekey anschauen openssl rsa -in privateKey.key -check openssl rsa -in privateKey.pem -check Zertifikat anschauen openssl x509 -in certificate.crt -text -noout ===== PEM (PKCS10) in PKCS12 ===== openssl pkcs12 -export -in domain.crt -inkey domain.key -out domain.p12 Mit Root bzw. Chain: openssl pkcs12 -export -in domain.crt -inkey domain.key -out domain.p12 -certfile CACert.cer