0

In Google chrome i keep getting ERR_CERT_COMMON_NAME_INVALID.

enter image description here enter image description here

Created certificate :

C:\OpenSSL-Win..\bin>openssl genrsa -aes256 -out private.key 2048
C:\OpenSSL-Win..\bin>openssl rsa -in private.key -out private.key
C:\OpenSSL-Win..\bin>openssl req -new -x509 -sha1 -key private.key -out certificate.crt -days 36500 -config C:\OpenSSL-Win..\bin\openssl.cfg

What is wrong? Why getting ERR_CERT_COMMON_NAME_INVALID?

1 Answers1

0

it WORKS.

enter image description here enter image description here

Step 1

A)

# openssl genrsa -out server_rootCA.key 2048
# openssl req -x509 -new -nodes -key server_rootCA.key -sha256 -days 3650 -out server_rootCA.pem

B)

# cat server_rootCA.csr.cnf
[req]
default_bits = 2048
prompt = no
default_md = sha256
distinguished_name = dn

[dn]
C=BE
ST=oost-vlaanderen
L=Stackoverflow
O=Stackoverflow
OU=local_RootCA
emailAddress=helpdesk@Stackoverflow.com
CN = localhost

# cat v3.ext 
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names

[alt_names]
DNS.1 = localhost

C)

# openssl req -new -sha256 -nodes -out server.csr -newkey rsa:2048 -keyout server.key -config <( cat server_rootCA.csr.cnf )

# openssl x509 -req -in server.csr -CA server_rootCA.pem -CAkey server_rootCA.key -CAcreateserial -out server.crt -days 3650 -sha256 -extfile v3.ext

Step 2

Use in Apache SSLCertificateFile /etc/apache2/ssl/server.crt SSLCertificateKeyFile /etc/apache2/ssl/server.key

Step 3:

  • Add PEM to the browser
  • Chromium -> Setting -> (Advanced) Manage Certificates -> Import -> 'server_rootCA.pem'

enter image description here

enter image description here enter image description here