Dus*_*rea 7 ssl certificate openssl
尝试读回自己编写的subjectAltName/otherName/UTF8值时,OpenSSL 似乎已损坏:
相关的openssl.cnf配置(使用官方但随机的 OID):
[alt_names]
DNS.1 = www.foo.com
DNS.2 = www.bar.org
IP.1 = 192.168.1.1
IP.2 = 192.168.69.144
email = email@me
otherName = 1.3.6.1.4.1.1;UTF8:some other identifier
Run Code Online (Sandbox Code Playgroud)
从此配置生成的 CSR 转储示例:
TLS Web Server Authentication
X509v3 Subject Alternative Name:
DNS:www.foo.com, DNS:www.bar.org, IP Address:192.168.1.1, IP Address:192.168.69.144, email:email@me, othername:<unsupported>
Signature Algorithm: sha1WithRSAEncryption
6f:4a:1d:8f:43:7e:4d:d1:0c:7e:05:9d:1f:f0:98:b1:69:cf:
Run Code Online (Sandbox Code Playgroud)
有人可以指出我是否做错了什么吗?这让我发疯。
仅供参考,您必须找到“OBJECT :X509v3 subject Alternative Name”行正下方的“OCTET STRING”行,然后strparse:
# print section offset via
openssl asn1parse -in yourcert.pem
# parse otherName from "OCTET STRING"
openssl asn1parse -in yourcert.pem -strparse <offset>
Run Code Online (Sandbox Code Playgroud)
输出<unsupported>是2010年的常规结果。我的猜测:情况仍然如此。
一位 OpenSSL 开发人员在邮件列表中这样说道(存档于此处。):
史蒂文·汉森,2010-01-02:
目前 OpenSSL 不显示任何 otherName 值。它一般无法知道该字段的准确含义,因为格式可能完全是任意的。它充其量只能解析内容。
如果您openssl asn1parse在文件上使用来查找该:X509v3 Subject Alternative Name部分的偏移量,然后使用-strparse具有该偏移量的选项,那么otherName实际上会显示出来。
| 归档时间: |
|
| 查看次数: |
4897 次 |
| 最近记录: |