openSSL https_client-Zertifikat mit CA signieren

Ich muss einfach

CA-Zertifikat erstellencreate a https_client-certificatesigniere das https_client-Zertifikat von der CA

Über die Befehlszeile unter Linux - openSUSE. Ich erstelle das CA-Zertifikat:

 # openssl genrsa -out rootCA.key 2048
Generating RSA private key, 2048 bit long modulus
..........................................................+++
....................+++
e is 65537 (0x10001)
 # openssl req -x509 -new -nodes -key rootCA.key -days 3650 -out rootCA.pem
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:AA
State or Province Name (full name) [Some-State]:A
Locality Name (eg, city) []:A
Organization Name (eg, company) [Internet Widgits Pty Ltd]:A
Organizational Unit Name (eg, section) []:A
Common Name (e.g. server FQDN or YOUR name) []:A
Email Address []:A
 #

Funktioniert gut. Dann erstelle ich das https_client-Zertifikat:

 # openssl genrsa -out client1.key 2048
Generating RSA private key, 2048 bit long modulus
............................+++
.............................................+++
e is 65537 (0x10001)
 #
 # openssl req -x509 -new -nodes -key client1.key -days 3650 -out client1.pem
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:BB
State or Province Name (full name) [Some-State]:B
Locality Name (eg, city) []:B
Organization Name (eg, company) [Internet Widgits Pty Ltd]:B
Organizational Unit Name (eg, section) []:B
Common Name (e.g. server FQDN or YOUR name) []:B
Email Address []:B
 #

Funktioniert gut. Wenn ich versuche, das https_client-Zertifikat mit der Zertifizierungsstelle zu signieren, wird hier eine Fehlermeldung angezeigt:

 # openssl ca -in client1.pem -out client11.pem
Using configuration from /etc/ssl/openssl.cnf
Error opening CA private key ./demoCA/private/cakey.pem
139667082016400:error:02001002:system library:fopen:No such file or directory:bss_file.c:404:fopen('./demoCA/private/cakey.pem','re')
139667082016400:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:406:
unable to load CA private key
 #

Ich habe es schon versucht

unter Verwendung absoluter Pfade "Fehler beim Öffnen des privaten CA-Schlüssels" unter Windows)

aber kein erfolg für mich. Ich habe irgendwo gelesen, dass bestimmte eingegebene Attribute die gleichen sein müssen, die bei der CA-Erstellung eingegeben wurden, aber zumindest beim Erstellen von Zertifikaten unter Windows mit XCA-Tool ist dies nicht korrekt. Ich kann ganz andere Dinge eingeben, solange ich sie mit CA signiere. Ich kann sie verwenden. Kann mir jemand helfen

Aktualisieren Ich benutze nur .key und .pem, da dies unter Windows mit dem XCA-Tool funktioniert ... Ich lese gerade das openSSL-Kochbuch https: //www.feistyduck.com/library/openssl-cookbook/online/ch-openssl.htm) um zu sehen, ob ich etwas falsch gemacht habe. Erster Gedanke, Muss ich .csr zum Signieren eines Zertifikats verwenden oder kann ich auch ein anderes Format verwenden?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage