0

Trying to create csr for domain.com only. Key first:

# openssl genrsa -out  domain.com.key 2048
Generating RSA private key, 2048 bit long modulus
........................................................................+++
................+++
e is 65537 (0x10001)

Then CSR:

# openssl req -new -sha256 -key domain.com.key -out domain.com.csr
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.
-----
Country Name (2 letter code) [XX]:US
State or Province Name (full name) []:Connecticut
Locality Name (eg, city) [Default City]:Stamford
Organization Name (eg, company) [Default Company Ltd]:Domain.com Corporation
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:domain.com
Email Address []:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

Now test the csr and see a lot of extra domains:

#  openssl req -noout -text -in domain.com.csr | grep DNS
                DNS:www.domain.com, DNS:www.domain.ae,
DNS:www.domain.at, DNS:www.domain.fr, 
DNS:www.domain.ca, DNS:www.dom.com

The question is: where all those 'extra' domains come from and how to remove them?

Update: I found that set of 'extra' domains depends on the server where the key and CSR were generated. Sounds crazy, I know.

  • 2
    Look at your openssl.cnf file. – Michael Hampton Mar 29 '16 at 21:28
  • @MichaelHampton This should be the answer. – Putnik Mar 30 '16 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.