基于PKI的网站身份验证的证书问题

时间:2019-07-03 04:03:32

标签: ubuntu nginx openssl ssl-certificate client-certificates

我正在使用以下配置的服务器中设置基于PKI的网站身份验证。

// Once the popup has been created and/or opened
popup.options.closeOnClick = false;
popup._initLayout();

这些是我用来设置证书库身份验证的步骤:

1)首先为我的网站设置HTTPS。 已关注:https://www.humankode.com/ssl/create-a-selfsigned-certificate-for-nginx-in-5-minutes

2)创建CA: Server: Ubuntu 18.04.2 LTS Nginx : 1.14.0 Openssl : 1.1.1 (为ca输入密码)

3)创建CA证书: openssl genrsa -des3 -out ca.key 4096 (在ca密码上方使用)

4)创建用户密钥: openssl req -new -x509 -days 365 -key ca.key -out ca.crt (提供用户密码)

5)创建用户csr: openssl genrsa -des3 -out user.key 4096 (使用的用户密码)

6)签署CSR: openssl req -new -key user.key -out user.csr (使用ca密码)

7)创建PKCS(PFX): openssl x509 -req -days 365 -in user.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out user.crt (使用的用户密码) (提供导出密码)

最后,我将openssl pkcs12 -export -out user.pfx -inkey user.key -in user.crt -certfile ca.crt文件放入桌面并将其导入到浏览器中(使用导出密码)。

Nginx的配置如下所示。

user.pfx

我使用server { listen 443 ssl; listen [::]:443 ssl; root /path to web root/; index index.php index.html index.htm index.nginx-debian.html; ssl on; ssl_certificate /etc/nginx/ssl/localhost.crt; ssl_certificate_key /etc/nginx/ssl/localhost.key; ssl_protocols SSLv3 TLSv1.2 TLSv1.1 TLSv1; ssl_client_certificate /etc/nginx/ssl/ca_client/ca.crt; ssl_verify_client on; 保留HTTPS的所有证书文件,并且我使用/etc/nginx/ssl/保留上述步骤生成的所有文件。

当我浏览网站时,会弹出弹出窗口以选择证书,然后选择证书,然后会显示/etc/nginx/ssl/ca_client/

我在这里想念什么?

0 个答案:

没有答案