Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache SSL连接失败时显示自定义错误文档(SSLVerifyClient)_Apache_Openssl_Client Certificates - Fatal编程技术网

Apache SSL连接失败时显示自定义错误文档(SSLVerifyClient)

Apache SSL连接失败时显示自定义错误文档(SSLVerifyClient),apache,openssl,client-certificates,Apache,Openssl,Client Certificates,我已将Apache2配置为使用客户端证书身份验证,使用: SSLVerifyClient require 它工作,我可以访问我的网站与有效的客户端证书。 但是,当用户在没有安装ClientCertificate的情况下连接到它时,他们会从浏览器中收到一个令人困惑的错误 (Chrome显示“错误”\uSSL\uProtocol\uError”,Firefox显示“SSL\uError\uHandshake\uFailure\uAlert”,Internet explorer仅显示“Interne

我已将Apache2配置为使用客户端证书身份验证,使用:

SSLVerifyClient require
它工作,我可以访问我的网站与有效的客户端证书。 但是,当用户在没有安装ClientCertificate的情况下连接到它时,他们会从浏览器中收到一个令人困惑的错误

(Chrome显示“错误”\uSSL\uProtocol\uError”,Firefox显示“SSL\uError\uHandshake\uFailure\uAlert”,Internet explorer仅显示“Internet explorer无法显示网页”

当用户试图在没有有效客户端证书的情况下访问时,我想向他们显示一个自定义的ErrorDocument

问题是该站点不返回http错误代码,而是中止请求,因此我不能使用Apaches“”ErrorDocument“”

ssl_错误_日志的最后一部分是:

[Wed Aug 31 11:11:57 2011] [info] [client 192.168.2.156] SSL library error 1 in handshake (server url:443)
[Wed Aug 31 11:11:57 2011] [info] SSL Library Error: 336105671 error:140890C7:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:peer did not return a certificate No CAs known to server for verification?
[Wed Aug 31 11:11:57 2011] [info] [client 192.168.2.156] Connection closed to child 1 with abortive shutdown (server url:443)

如何为此返回有效的ErrorDocument?

应KCElement的请求迁移到SF。我开始认为我无法使用apache配置解决此问题,因为请求从未到达apache服务器。(连接在到达apache之前被ssl中止)。我认为在我运行
chef client
作业时发生的情况是,它没有获取用于解锁SSL证书链的密码短语。当我以交互方式运行它时,它会说
Apache需要解密您的SSL密钥
,因此我输入密码短语,这样它才能工作。应KCElement的请求迁移到SF。我开始认为我可以无法使用apache配置修复此问题,因为请求从未到达apache服务器。(在到达apache之前,ssl会中止连接)。我认为在我运行
chef client
作业时发生的情况是,它没有获取密码来解锁SSL证书链。当我以交互方式运行它时,它会说
Apache需要解密您的SSL密钥
,所以我输入密码才能工作。它工作了!谢谢。我真不敢相信我花了这么长时间才弄明白这么简单的东西。后来还发现了另一个资源,其中包含一些更多信息:它很有效!谢谢。我真不敢相信我花了这么长时间才发现了这么简单的东西。后来还发现了另一个资源,其中包含一些更多信息:
SSLVerifyClient optional
RewriteCond %{SSL:SSL_CLIENT_VERIFY} !=SUCCESS
RewriteRule ^/ http://localhost:8080/missing_cert.html [P,L]