如何在本地(ubuntu)配置openssl?

 潇潇雨621715 发布于 2022-10-25 07:26

按照这个文档 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:

问题在哪呢?

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有