Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Vorhergehende Überarbeitung | |||
easyrsa [07/08/2023 - 11:48] – thommie4 | — | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== EasyRSA ====== | ||
- | |||
- | Quelle: [[https:// | ||
- | |||
- | EasyTLS Erweiterung: | ||
- | |||
- | ===== CA einrichten ===== | ||
- | |||
- | initialisieren | ||
- | |||
- | '' | ||
- | |||
- | DH erzeugen | ||
- | |||
- | '' | ||
- | |||
- | pki bauen (mit PW) | ||
- | |||
- | '' | ||
- | ===== Signing Request ===== | ||
- | |||
- | Signing Request (CSR) für Server oder Client, mit oder ohne Passwort (nopass = Key ohne Passwort) | ||
- | |||
- | '' | ||
- | ===== Signieren (client oder server) ===== | ||
- | |||
- | '' | ||
- | '' | ||
- | ===== Zertifikats Inhalt anzeigen ===== | ||
- | |||
- | '' | ||
- | |||
- | '' | ||
- | |||
- | Alternativ direkt mit openssl< | ||
- | # Zertifikat komplett anzeigen | ||
- | openssl x509 -text -in < | ||
- | |||
- | # Komplette Anzeige ohne Zertifiaktstext anzeigen | ||
- | openssl x509 -noout -text -in < | ||
- | |||
- | # den Herausgeber des Zertifikats anzeigen | ||
- | openssl x509 -noout -issuer -in < | ||
- | |||
- | # Für wen wurde das Zertifikat ausgestellt? | ||
- | openssl x509 -noout -subject -in < | ||
- | |||
- | # Für welchen Zeitraum ist das Zertifikat gültig? | ||
- | openssl x509 -noout -dates -in < | ||
- | |||
- | # das obige kombiniert anzeigen | ||
- | openssl x509 -noout -issuer -subject -dates -in < | ||
- | |||
- | # den hash anzeigen | ||
- | openssl x509 -noout -hash -in < | ||
- | |||
- | # den MD5-Fingerprint anzeigen | ||
- | openssl x509 -noout -fingerprint -in < | ||
- | </ | ||
- | |||
- | Key Passwörter ändern | ||
- | |||
- | '' | ||
- | |||
- | '' | ||
- | |||
- | Mit " | ||
- | |||
- | **CSR** | ||
- | |||
- | '' | ||
- | |||
- | **Zertifikat** | ||
- | |||
- | '' | ||
- | ===== Zertifikat zurückziehen ===== | ||
- | |||
- | < | ||
- | ./easyrsa revoke EntityName | ||
- | </ | ||
- | |||
- | CRL erzeugen | ||
- | |||
- | < | ||
- | ./easyrsa gen-crl | ||
- | </ | ||
- | |||
- | Achtung: Die CRL sollte **alle sechs Monate** neu erzeugt und auf den openvpn Server übertragen werden. Die genauen Daten stehen in der CRL Datei: | ||
- | |||
- | < | ||
- | root@pki01: | ||
- | Certificate Revocation List (CRL): | ||
- | Version 2 (0x1) | ||
- | Signature Algorithm: sha256WithRSAEncryption | ||
- | Issuer: CN = dvsdnet CA | ||
- | Last Update: Jul 4 14:52:21 2023 GMT | ||
- | Next Update: Dec 31 14:52:21 2023 GMT | ||
- | </ | ||
- | ====== Spezialfälle bei OpenVPN ====== | ||
- | |||
- | Validierung über common name (alte Methode): Der Common Name für das Server Zertifikat muss den Präfix aus der Server Config enthalten: | ||
- | |||
- | '' | ||
- | |||
- | Mit easyrsa3: | ||
- | |||
- | '' | ||
- | |||
- | '' | ||
- | |||
- | **Neue Methode nach RFC3280: Verifikation nach Zertifikatstyp**: | ||
- | |||
- | '' | ||
- | |||
- | '' | ||
- | |||
- | Im Client wird im Gegenzug geprüft, ob das vom OpenVPN Server präsentierte Zertifikat den " | ||
- | |||
- | ====== PKITOOL Befehle ====== | ||
- | |||
- | '' | ||
- | pkitool '''' | ||
- | pkitool –server server1 → Build " | ||
- | pkitool client1 → Build " | ||
- | pkitool –pass client2 → Build password-protected " | ||
- | pkitool –pkcs12 client3 → Build " | ||
- | pkitool –csr client4 → Build " | ||
- | pkitool –sign client4 → Sign " | ||
- | pkitool –inter interca → Build an intermediate key-signing certificate/ | ||
- | pkitool –pkcs11 / | ||
- | |||
- | Typical usage for initial PKI setup. Build myserver, client1, and client2 cert/keys. Protect client2 key with a password. Build DH parms. Generated files in ./keys : | ||
- | |||
- | '' | ||
- | |||
- | Typical usage for adding client cert to existing PKI: | ||
- | |||
- | '' | ||