Selbstsigniertes Zertifikat: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 3: Zeile 3:
==CA erstellen==
==CA erstellen==
;Schaubild
;Schaubild
{{#drawio:TLS Authorithy}}
{{#drawio:TLS Authorithy|300px}}
;Erstellen
;Erstellen
*openssl req -new -x509 -newkey rsa:4096 -nodes -keyout ca.key -out ca.crt -days 3650 -subj "/CN=kit-$IT-ca"
*openssl req -new -x509 -newkey rsa:4096 -nodes -keyout ca.key -out ca.crt -days 3650 -subj "/CN=kit-$IT-ca"
Zeile 10: Zeile 10:


==Request und Privaten Key erstellen==
==Request und Privaten Key erstellen==
;Schaubild
{{#drawio:Signing Request}}
*openssl req -new -newkey rsa:4096 -nodes -keyout fw.it$IT.int.key -out fw.it$IT.int.csr -subj "/CN=fw.it$IT.int"
*openssl req -new -newkey rsa:4096 -nodes -keyout fw.it$IT.int.key -out fw.it$IT.int.csr -subj "/CN=fw.it$IT.int"


==Signierung==
==Signierung==
;Schaubild
{{#drawio:cert-server}}
;Signieren
;Signieren
*openssl x509 -req -days 730 -in fw.it$IT.int.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out fw.it$IT.int.crt
*openssl x509 -req -days 730 -in fw.it$IT.int.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out fw.it$IT.int.crt

Aktuelle Version vom 29. September 2026, 08:01 Uhr

Variablen setzen

  • IT=2XX

CA erstellen

Schaubild
TLS Authorithy
Erstellen
  • openssl req -new -x509 -newkey rsa:4096 -nodes -keyout ca.key -out ca.crt -days 3650 -subj "/CN=kit-$IT-ca"
Angucken
  • openssl x509 -noout -text -in ca.crt

Request und Privaten Key erstellen

Schaubild
Signing Request
  • openssl req -new -newkey rsa:4096 -nodes -keyout fw.it$IT.int.key -out fw.it$IT.int.csr -subj "/CN=fw.it$IT.int"

Signierung

Schaubild
cert-server
Signieren
  • openssl x509 -req -days 730 -in fw.it$IT.int.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out fw.it$IT.int.crt
Angucken
  • openssl x509 -noout -text -in fw.it$IT.int.crt
Test
  • openssl verify -CAfile ca.crt fw.it$IT.int.crt