Openssl: Unterschied zwischen den Versionen

Aus xinux.net
Zur Navigation springen Zur Suche springen
 
(101 dazwischenliegende Versionen von 7 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
'''Auflistung einiger Beispiele für openssl: (Mehr Informationen auf www.openssl.org)
+
*[[TLS vs. SSL]]
 
+
*[[tls funktion]]
 
+
*[[TLS Prinzip Simple]]
== Erstellen eines Privat Keys ==
+
*[[TLS Prinzip]]
 
+
*[[TLS Protokoll]]
openssl genrsa -passout pass:$<variable> -aes256 -out <client.key> 1024
+
*[[openssl howto]]
 
+
*[[ca install]]
-aes256 : Verschlüsselung des Private Keys mit aes256 (optional)
+
*[[xinuxpki]]
-passout pass:$<variable> : Passwort für Private Key steht in $<variable> (optional)
+
*[[X509 ruck zuck]]
-out ... : Outputdatei
+
*[[X509 Begriffe]]
1024 : Schlüssellänge in bit
+
*[[Letsencrypt]]
 
+
*[[SSL Inspection]]
 
+
*[[Site inspection]]
== Erstellen einer CSR (Certificate Signing Request): ==
+
*[[XCA]]
 
 
openssl req -passin env:$<variable> -new -key <Private Key> -out <client csr> -config <config-file>
 
 
 
-passin env:$<variable> : Passwort für Privat Key (optional)
 
-new : Neue CSR
 
-key ... : Privat Key
 
-config : Konfigurationsdatei für openssl (optional)
 
 
 
 
 
== CSR mit eigenem Key signieren (CA-Zertifikat erstellen): ==
 
 
 
openssl x509 -passin env:$<variable> -days <3650> -extfile <filename> -signkey <Private Key>
 
 
 
-days : Gültigkeitsdauer
 
-extfile : Datei mit Zertifikat-extensions (optional)
 
-signkey : Privater Key mit dem Signiert wird
 
 
 
 
 
== Erstellen eines Zertifikates (Unterscheidet sich nur im signieren) ==
 
 
 
openssl x509 -days <3650> -CAserial <serial-file> -CA <ca-zertifikat> -CAkey <Private Key der CA> -in <client.CSR> -req -out <client.crt>
 
 
 
-CAserial ... : Serial-File der CA
 
-CA ... : Zertifikat der CA
 
-CAkey ... : Privat Key der CA
 
-in ... : Inputdatei
 
-req : Gibt an, dass der Input eine DSR ist
 
 
 
 
 
== Überprüfung der Gültigkeit eines Zertifikates: ==
 
 
 
openssl verify -CAfile <ca-zertifikat> <ausgestelletes Zertifikat>
 
 
 
 
 
== Auslesen des Subjects und Serial-Nr.: ==
 
 
 
openssl x509 -noout -subject -serial -in <zertifikat>
 
 
 
-noout : Ausgabe auf den Schirm nicht in Datei
 
-subject : Ausgabe des Subject
 
-serial : Ausgabe der Serien-Nr.
 
 
 
== Zurückrufen (revoke) eines Zertifikates: ==
 
 
 
openssl ca -config <Konfigurationsdatei> -revoke <Zertifikat>
 
 
 
 
 
== Erstellen einer CRL (Certificate Revoke Liste): ==
 
 
 
openssl ca -config <Konfigurationsdatei> -gencrl -out <CRL-file>
 
 
 
 
 
== Umwandeln der CRL ins DER-Format (Notwendig zum Importieren): ==
 
 
 
openssl crl -inform PEM -outform DER -in <CRL-File> -out <CRL-File im DER-Format>
 
 
 
 
 
== Aufbau einer SSL Verbindung mit einem Server: ==
 
 
 
openssl s_client -connect <server>:<Port>
 
 
 
 
 
== Starten eines SSL-Servers ==
 
 
 
openssl s_server -CAfile <Zertifikat> -key <Privat key der CA> -cert <Zertifikat des Servers> -accept <Port> -WWW
 
 
 
-WWW : Emuliert einen einfachen Web-server auf angeegenen Port
 
 
 
P12 = PFX
 
 
 
==Umwandlung von pem in PKCS12 Format==
 
openssl pkcs12 -export -in cert.pem -inkey key.pem -out cred.p12
 
Enter Export Password:
 
Verifying - Enter Export Password:
 
 
 
Links
 
 
 
* http://www.absolute-cool.de/dokus/ssl/openssl/
 
* http://www.tecchannel.de/netzwerk/wan/401848/workshop_vpn_mit_linux/index16.html
 

Aktuelle Version vom 5. Oktober 2022, 20:12 Uhr