Google Chrome - не открывается ссылка ERR_CERT_COMMON_NAME_INVALID - PullRequest
0 голосов
/ 28 июня 2018

В Google Chrome я продолжаю получать ERR_CERT_COMMON_NAME_INVALID.

enter image description here enter image description here

Создан сертификат:

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

Что не так? Зачем получать ERR_CERT_COMMON_NAME_INVALID?

1 Ответ

0 голосов
/ 28 июня 2018

РАБОТАЕТ.

enter image description here enter image description here

Шаг 1

А)

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

В)

# 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

С)

# 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

Шаг 2

Использование в Apache SSLCertificateFile /etc/apache2/ssl/server.crt SSLCertificateKeyFile /etc/apache2/ssl/server.key

Шаг 3:

  • Добавить PEM в браузер
  • Chromium -> Настройка -> (Дополнительно) Управление сертификатами -> Импорт -> 'server_rootCA.pem'

enter image description here

enter image description here enter image description here

...