Azure网站的Openssl证书

时间:2018-06-05 09:34:40

标签: azure ssl openssl

当我尝试将绑定添加到ssl证书时,我收到错误。

错误:

Failed to add SSL binding. The certificate with thumbprint '877EC1DA24CD9D4713FD4107A83AC0EE5A4654E4' is invalid for SSL. The Enhanced Key Usage must be present and must contain Server Authentication (1.3.6.1.5.5.7.3.1).

以下是生成ssl的方法。

第1步

Create file domain.rs.txt

第2步

[req]
default_bits = 2048
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn

[ dn ]
C=DK
ST=Jutland
L=Haderslev
O=Justlearn ApS
OU=Haderslev
emailAddress=team@justlearn.com
CN = www.justlearn.rs

[ req_ext ]
subjectAltName = @alt_names

[ alt_names ]
DNS.1 = justlearn.rs
DNS.2 = www.justlearn.rs

第3步

openssl req -new -sha256 -nodes -out domain.rs.csr -newkey rsa:2048 -keyout domain.rs.key -config domain.rs.txt

第4步

openssl x509 -req -days 365 -in domain.rs.csr -signkey domain.rs.key -out domain.rs.crt

第5步

openssl pkcs12 -export -in domain.rs.crt -inkey domain.rs.key -out mycert.pfx

0 个答案:

没有答案