OpenSSL: Unterschied zwischen den Versionen

Aus Matthias Wiki
Zur Navigation springen Zur Suche springen
Zeile 1: Zeile 1:
== Links ==
== Links ==
*[http://www.openssl.org OpenSSL Project]
*[https://www.openssl.org OpenSSL Project]
*[http://pages.cs.wisc.edu/~zmiller/ca-howto How To Setup a CA]
*[http://pages.cs.wisc.edu/~zmiller/ca-howto How To Setup a CA]
*[http://serverfault.com/questions/306345/certification-authority-root-certificate-expiry-and-renewal Zertifikate erneuern]
*[https://serverfault.com/questions/306345/certification-authority-root-certificate-expiry-and-renewal Zertifikate erneuern]
*[http://blog.didierstevens.com/2013/05/08/howto-make-your-own-cert-and-revocation-list-with-openssl Howto: Make Your Own Cert And Revocation List With OpenSSL]
*[https://blog.didierstevens.com/2013/05/08/howto-make-your-own-cert-and-revocation-list-with-openssl Howto: Make Your Own Cert And Revocation List With OpenSSL]
*[http://stackoverflow.com/questions/589834/what-rsa-key-length-should-i-use-for-my-ssl-certificates Diskussion über Schlüssellängen]
*[https://stackoverflow.com/questions/589834/what-rsa-key-length-should-i-use-for-my-ssl-certificates Diskussion über Schlüssellängen]
*[http://de.wikipedia.org/wiki/X.509 X.509 auf Wikipedia]
*[https://de.wikipedia.org/wiki/X.509 X.509 auf Wikipedia]
*[http://de.wikipedia.org/wiki/RSA-Kryptosystem RSA auf Wikipedia]
*[https://de.wikipedia.org/wiki/RSA-Kryptosystem RSA auf Wikipedia]
*[http://www.zytrax.com/tech/survival/ssl.html Survival guides - TLS/SSL and SSL (X.509) Certificates]
*[http://www.zytrax.com/tech/survival/ssl.html Survival guides - TLS/SSL and SSL (X.509) Certificates]
*[https://www.shellhacks.com/create-csr-openssl-without-prompt-non-interactive Create CSR using OpenSSL Without Prompt]


== Wichtige Kommandos ==
== Wichtige Kommandos ==

Version vom 10. Januar 2018, 15:05 Uhr

Links

Wichtige Kommandos

Neuen Masterschlüssel erzeugen

openssl genrsa -des3 -out mycert.key 2048

Masterschlüssel mit sich selbst signieren

openssl req -new -x509 -days 3650 -key mycert.key -out mycert.crt -config openssl.cnf

Passwort von Schlüssel entfernen

openssl rsa -in mycert_with_password.key -out mycert_without_passwort.key

Zertifikat oder Schlüssel anzeigen

openssl x509 -noout -text -in mycert.crt

Zertifikat prüfen

openssl req -verify -noout -in mycert.crt

Benutzerzertifikat anlegen und unterschreiben

openssl req -newkey rsa:1024 -keyout mycert.key -config openssl.cnf -out mycert.req
openssl ca -config openssl.cnf -out mycert.crt -infiles mycert.req

Zertifikat für Computer anlegen und unterschreiben

openssl req -newkey rsa:1024 -keyout mycert.key -nodes -config openssl.cnf -out mycert.req 
openssl ca -config openssl.cnf -out mycert.crt -infiles mycert.req

Zertifikat wiederrufen

openssl ca -config openssl.cnf -revoke mycert.crt
openssl ca -updatedb
openssl ca -config openssl.cnf -gencrl -out ca-crl.pem
openssl crl -inform pem -outform der -in ca-crl.pem -out ca-crl.crl

Zertifikatsdatenbank aktualisieren

openssl ca -updatedb