openssl - OPENSSL 创建根 CA 签名证书
问题描述
我有一个问题想问更了解 SSL 证书的人。我试图为一些应该连接到远程服务器的应用程序创建根 CA 签名证书。这就是我在服务器端所做的:
openssl genrsa -out rootca.pem 4096
openssl req -x509 -new -nodes -key rootca.pem -days 3650 -config certconfig_root.txt -out rootca.crt
openssl genrsa -out privkey.pem 4096
openssl req -new -key privkey.pem -config certconfig_app.txt -out newcert.csr
openssl x509 -req -in newcert.csr -CA rootca.crt -CAkey rootca.pem -CAcreateserial -out newcert.pem -days 3650
openssl pkcs12 -inkey privkey.pem -in newcert.pem -export -out newcert.pfx -passout pass:
openssl pkcs12 -inkey rootca.pem -in rootca.crt -export -out rootca.pfx -passout pass:
然后我将 newcert.pfx & rootca.pfx 移动到 APP 端,并将 rootca.pfx 证书安装到 Windows 的 Root CA 证书容器中。它在 certmgr.msc 中可见
APP端证书通用名newcert.pem按照规范正确设置。
然而 SSL hadshake 失败了。我在这里做错了什么?
解决方案
推荐阅读
- c++ - 如何从两个不同的双向链表中更改两个不同的节点?
- javascript - Linux 和 MacOS 上的 Webpack 开发服务器热重载,但 Windows 上没有?
- python - 为什么启动 Numba cuda 内核最多可使用 640 个线程,但在有大量可用 GPU 内存时会因 641 而失败?
- react-native - 如何在从我的反应本机应用程序共享/发布文本到 Facebook 时避免“登录”
- python - 计算熊猫中的数组
- directus - 使用 SQL 插入图像
- dask - 在雪花中使用时间戳索引时出错
- python - TensorFlow 在导入期间失败:“ImportError: cannot import name 'mirrored_strategy_with_two_gpus_no_merge_call'”
- animation - 如何从 react-beautiful-dnd 中删除拖动开始动画?
- javascript - 如何通过 Ajax 调用发送列表?