14
3
Is it possible to create a PKCS#10 certificate request / X.509 certificate with the identifying information only in the subject alternate name attribute/extension? According to X.509 4.1.2.6 Subject, the subject can be empty for a certificate whose subject is not a CA as long as the subjectAltName is critical.
But when I use this config file with an empty distinguished_name section:
# request.config
[ req ]
distinguished_name = req_distinguished_name
req_extensions = v3_req
prompt = no
[ req_distinguished_name ]
[ v3_req ]
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName=critical,email:certtest@example.com
and commands
openssl genrsa 1024 > key.pem
openssl req -new -key key.pem -out req.pem -config request.config
OpenSSL complains:
error, no objects specified in config file
problems making Certificate Request
I had to do the same. Despite putting values in the config file, it still prompted me for all the DN components again. I had to repeat them, but it worked at least. – Nate W. – 2014-09-03T17:50:14.730
3This is because the config file did not actually contain default values.
C = US
means that the "prompt" for C is "US", not the default value. Instead, the file should containC = Country
andC_default = US
. – jordanbtucker – 2014-10-14T22:55:21.8235Oh, and that's only if
prompt = yes [or blank]
. Ifprompt = no
thenC = US
would mean "US" is the default value. – jordanbtucker – 2014-10-14T23:06:23.387