问题原文
原帖链接 · Dustin Oprea · CC BY-SA 3.0
It seems like OpenSSL is broken when trying to read back subjectAltName/otherName/UTF8 values that were written by itself:
The relevant openssl.cnf configuration (using an official but random 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
A sample from the dump of a CSR generated from this config:
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:
Can someone indicate whether I'm doing something wrong? This is driving me nuts.
社区高分解答
原帖链接 · clarkttfu · CC BY-SA 4.0
FYI, you will have to locate the "OCTET STRING" line just below the "OBJECT :X509v3 Subject Alternative Name" line then strparse:
# print section offset via
openssl asn1parse -in yourcert.pem
# parse otherName from "OCTET STRING"
openssl asn1parse -in yourcert.pem -strparse <offset>
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
