Dan*_* S. 1 openssl signing certificate pki
为了进行测试,我尝试执行以下 3 个步骤:
我在最后一步失败了(见下文)。我认为我的问题是我对我正在做的步骤有错误的理解,但我不明白它是什么。
# generate self signed CA certificate
openssl req -x509 -days 2557 -newkey rsa:1024 -out ca-cert.pem -keyout ca-sec-key.pem
# for another entity, generate another private key and a signing request
openssl req -newkey rsa:1024 -out sub-request.pem -keyout sub-sec-key.pem
# the following fails:
# sign the request using the CA certificate and key
openssl ca -cert ca-cert.pem -keyfile ca-sec-key.pem -in sub-request.pem -out sub-cert.pem
Run Code Online (Sandbox Code Playgroud)
错误:
The organizationName field needed to be the same in the
CA certificate (My Own CA Company) and the request (My Customer)
Run Code Online (Sandbox Code Playgroud)
我不明白为什么 openssl 抱怨这些完全不同。我认为他们应该有所不同。
您的 OpenSSL 配置很可能基于默认配置文件 ( openssl.cnf),该文件限制 DN 组件的值organizationName。在 CA 部分中找到policy=<section_name>条目并更改organizationName=match为organizationName=supplied:
[ policy_match ]
organizationName = supplied
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3944 次 |
| 最近记录: |