OpenSSL "req -new" - "no objects specified in config file" Error


Why am I getting the "no objects specified in config file" error when running the OpenSSL "req -new" command?



If you are getting the "no objects specified in config file" error when running the OpenSSL "req -new" command, because OpenSSL receives no value for all DN (Distinguished Name) fields.

OpenSSL requires non-blank value at least for one DN field to identify the subject.

The test below shows you an example of the "no objects specified in config file" error:

C:\Users\fyicenter>type test.cnf
# unnamed section of generic options
default_md = md5

# default section for "req" command options
input_password     = fyicenter
prompt             = yes
distinguished_name = my_req_dn_prompt


# Minimum of 4 bytes are needed for common name
commonName         = Common Name
commonName_default = CA

# ISO2 country code only
countryName         = Country Name
countryName_default = US

# State is optional, no minimum limit
stateOrProvinceName         = State
stateOrProvinceName_default = NY

# City is required
localityName         = City
localityName_default = New York

# Organization is optional
organizationName         = Organization
organizationName_default =

# Organization Unit is optional
organizationalUnitName         = Department
organizationalUnitName_default = IT

# Email is optional
emailAddress         = Email
emailAddress_default =


OpenSSL> req -new -key rsa_test.key -out test.csr -config test.cnf
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
Common Name [ CA]:.
Country Name [US]:.
State [NY]:.
City [New York]:.
Organization []:.
Department [IT]:.
Email []:.
error, no objects specified in config file
problems making Certificate Request
error in req

Note that "." are entered to remove default values of all DN fields. OpepSSL is not able to create the subject for the new CSR.


OpenSSL "req -new" - Repeating DN Fields

OpenSSL "req new -batch" - Using DN Default Values Only

OpenSSL "req" Command

⇑⇑ OpenSSL Tutorials

2016-10-29, 30404👍, 0💬