我正在尝试使用我自己的内部 Windows CA 启用 lighttpd 客户端证书身份验证。免责声明:我对 PKI 还很陌生 :D
我的家庭实验室中有一个离线根 CA 和一个下属 CA。我已经将根 CA 导入到受信任 CA 下的 Firefox 中。对于客户端证书,我使用 openssl 生成 CSR,并使用启用了客户端身份验证的模板与我的下属 CA 一起签名。此客户端证书也作为 pfx 文件导入 Firefox。我还配置了 lighttpd,如下所示:
ssl.pemfile = "/etc/lighttpd/certs/lighttpd.pem"
ssl.ca-file = "/etc/lighttpd/certs/ca.cer"
ssl.verifyclient.activate = "enable"
ssl.verifyclient.enforce = "enable"
ssl.verifyclient.username = "SSL_CLIENT_S_DN_CN"
我收到以下错误:
Firefox 错误:
Peer does not recognize and trust the CA that issued your certificate.
Error code: SSL_ERROR_UNKNOWN_CA_ALERT
Lighttpd 错误:
SSL: 1 error:14089086:SSL routines:ssl3_get_client_certificate:certificate verify failed
SSL: 1 -1 error:140E0197:SSL routines:SSL_shutdown:shutdown while in ini
其他:
Acceptable client certificate CA names
DC = org, DC = homelab, CN = homelab-V-2019-ICA-CA
Client Certificate Types: RSA sign, DSA sign, ECDSA sign
癌基因
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
5a:00:00:00:02:47:18:65:49:6e:51:2a:56:00:00:00:00:00:02
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=V-2019-RCA-CA
Validity
Not Before: Nov 24 06:00:19 2020 GMT
Not After : Nov 24 06:10:19 2021 GMT
Subject: DC=org, DC=homelab, CN=homelab-V-2019-ICA-CA
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
客户端证书
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
56:00:00:00:23:c0:0e:f2:75:d8:de:ef:65:00:00:00:00:00:23
Signature Algorithm: sha256WithRSAEncryption
Issuer: DC = org, DC = homelab, CN = homelab-V-2019-ICA-CA
Validity
Not Before: Dec 1 23:54:33 2020 GMT
Not After : Nov 24 06:10:19 2021 GMT
Subject: C = US, ST = Rhode Island, L = Providence, O = HOMELAB, OU = HOMELAB, CN = homelab-V-2019-ICA-CA.homelab.org
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
...
X509v3 Extended Key Usage:
TLS Web Server Authentication, TLS Web Client Authentication
1.3.6.1.4.1.311.21.10:
不知道接下来该去哪里。任何帮助或文章都将不胜感激。:)