我正在尝试使用正在开发的数字证书,当我引入SubjectAltName时遇到错误,我不知道如何解决。我有一个cnf文件,其中包含以下几行:
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
[v3_req]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid,issuer
basicConstraints = CA:TRUE
subjectAltName = @alt_names
[alt_names]
otherName=Principal Name:xxxx@gmail.com;RFC822 Name = xxxx@gmail.com
在编写此命令后,我遇到了这个错误openssl req -new -key personal.key -out personal.csr -subj“ / CN = ZZZZZZ / OU = S / OU = E / DC = t / DC = r / DC = d“ -config openssl.cnf:
Error Loading extension section v3_req
140397844021312:error:0D0B10C2:asn1 encoding routines:asn1_cb:unknown tag:../crypto/asn1/asn1_gen.c:266:tag=RFC822 Name = xxxx@gmail.com
140397844021312:error:0D0B20C2:asn1 encoding routines:ASN1_generate_v3:unknown tag:../crypto/asn1/asn1_gen.c:94:
140397844021312:error:220A4093:X509 V3 routines:a2i_GENERAL_NAME:othername error:../crypto/x509v3/v3_alt.c:456:
140397844021312:error:22098080:X509 V3 routines:X509V3_EXT_nconf:error in extension:../crypto/x509v3/v3_conf.c:47:name=subjectAltName, value=@alt_names
那么问题出在哪里呢?非常感谢