按照這個文檔 https://help.ubuntu.com/community/OpenSSL 配置,執行到 openssl ca -in tempreq.pem -out server_crt.pem
時,本地出現了
Using configuration from /home/username/myCA/caconfig.cnf
Error opening CA private key /home/username/myCA/private/cakey.pem
140021783320224:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/home/username/myCA/private/cakey.pem','r')
140021783320224:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
unable to load CA private key
和文檔中不一樣,為什麼呢?Google了一下,說要加 -keyfile private/cakey.pem
,然後出現
Using configuration from /home/username/myCA/caconfig.cnf
Enter pass phrase for private/cakey.pem:
Error opening CA certificate /home/username/myCA/cacert.pem
139907629594272:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/home/username/myCA/cacert.pem','r')
139907629594272:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
繼續Google,說要加 -cert cacert.pem
,然後出現
Using configuration from /home/username/myCA/caconfig.cnf
Enter pass phrase for private/cakey.pem:
CA certificate and CA private key do not match
140656015046304:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:x509_cmp.c:331:
問題在哪呢?
闭关修行中......