OpenSSL:如何创建一个空主题的证书?

我需要生成带有空主题字段的证书.

我试过使用配置:

[ req ]
default_bits                            = 1024                  # Size of keys
default_md                              = md5                           
algorithm
string_mask                             = nombstr               # permitted characters
#string_mask                            = pkix          # permitted characters
distinguished_name                      = req_distinguished_name
req_extensions                          = v3_req

[ policy_match ]
commonName              = optional
countryName             = optional
emailAddress            = optional

[ req_distinguished_name ]
# Variable name                         Prompt string
#-------------------------        ----------------------------------
0.organizationName                      = Organization Name (company)
organizationalUnitName                  = Organizational Unit Name (division)
localityName                            = Locality Name (city, district)
stateOrProvinceName                     = State or Province Name (full name)
countryName                             = Country Name (2 letter code)
commonName                              = Common Name (hostname, IP, or your name)
0.organizationName_default              = 
localityName_default                    = 
stateOrProvinceName_default             = 
countryName_default                     = 
emailAddress_default                    = 

[ v3_req ]
basicConstraints                        = CA:FALSE
subjectKeyIdentifier                    = hash
subjectAltName                          = critical,DNS:example3.com

但得到了:

Organization Name (company) []:
Organizational Unit Name (department, division) []:
Locality Name (city, district) []:
State or Province Name (full name) []:
Country Name (2 letter code) []:
Common Name (hostname, IP, or your name) []:
error, no objects specified in config file
problems making Certificate Request

我在这里发现了同样的问题:
    https://superuser.com/questions/512673/openssl-how-to-create-a-certificate-with-an-empty-subject-dn

但没有解决方案.当我输入时只输入(空字段)我收到此错误:
错误,配置文件中没有指定对象

你能帮忙吗 ?如何使用空主题名称生成CSR?

谢谢

最佳答案 我找到了解决此问题的方法并将其发布在原始链接中.看到

https://superuser.com/questions/512673/openssl-how-to-create-a-certificate-with-an-empty-subject-dn/944378#944378

点赞