OpenSSL 握手失败 (14094410) - 手机客户端证书检查错误

OpenSSL 握手失败 (14094410) - 手机客户端证书检查错误

我正在使用 modssl 通过 Apache 运行代理服务器,我们用它来将移动设备上的 POST 代理到另一台内部服务器。对于大多数客户端来说,这都可以成功运行,但来自特定手机型号(诺基亚 2690)的请求会显示奇怪的握手失败。

看起来 OpenSSL 正在请求(或试图读取未经请求的)手机客户端证书(这尤其奇怪,因为 j2me 的 kssl 实现不支持客户端证书)。我已使用SSLVerifyClient none虚拟主机配置和 modssl 配置中的指令禁用了客户端证书。来自调试级别的 error.log 的跟踪是(详细信息已删除):

[client 41.220.207.10] Connection to child 0 established (server www.myserver.org:443)
[info] Seeding PRNG with 656 bytes of entropy
[debug] ssl_engine_kernel.c(1866): OpenSSL: Handshake: start
[debug] ssl_engine_kernel.c(1874): OpenSSL: Loop: before/accept initialization
[debug] ssl_engine_io.c(1882): OpenSSL: read 11/11 bytes from BIO#7fe3fbaf17a0 [mem: 7fe3fbaf90d0] (BIO dump follows)
[debug] ssl_engine_io.c(1815): +-------------------------------------------------------------------------+
[debug] ssl_engine_io.c(1860): +-------------------------------------------------------------------------+
[debug] ssl_engine_io.c(1882): OpenSSL: read 49/49 bytes from BIO#7fe3fbaf17a0 [mem: 7fe3fbaf90db] (BIO dump follows)
[debug] ssl_engine_io.c(1815): +-------------------------------------------------------------------------+
[debug] ssl_engine_io.c(1860): +-------------------------------------------------------------------------+
[debug] ssl_engine_kernel.c(1874): OpenSSL: Loop: SSLv3 read client hello A
[debug] ssl_engine_kernel.c(1874): OpenSSL: Loop: SSLv3 write server hello A
[debug] ssl_engine_kernel.c(1874): OpenSSL: Loop: SSLv3 write certificate A
[debug] ssl_engine_kernel.c(1874): OpenSSL: Loop: SSLv3 write server done A
[debug] ssl_engine_kernel.c(1874): OpenSSL: Loop: SSLv3 flush data
[debug] ssl_engine_io.c(1882): OpenSSL: read 5/5 bytes from BIO#7fe3fbaf17a0 [mem: 7fe3fbaf90d0] (BIO dump follows)
[debug] ssl_engine_io.c(1815): +-------------------------------------------------------------------------+
[debug] ssl_engine_io.c(1860): +-------------------------------------------------------------------------+
[debug] ssl_engine_io.c(1882): OpenSSL: read 2/2 bytes from BIO#7fe3fbaf17a0 [mem: 7fe3fbaf90d5] (BIO dump follows)
[debug] ssl_engine_io.c(1815): +-------------------------------------------------------------------------+
[debug] ssl_engine_io.c(1860): +-------------------------------------------------------------------------+
[debug] ssl_engine_kernel.c(1879): OpenSSL: Read: SSLv3 read client certificate A
[debug] ssl_engine_kernel.c(1898): OpenSSL: Exit: failed in SSLv3 read client certificate A
[client 41.220.207.10] SSL library error 1 in handshake (server www.myserver.org:443)
[info] SSL Library Error: 336151568 error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
[client 41.220.207.10] Connection closed to child 0 with abortive shutdown (server www.myserver.org:443)

我尝试使用 modssl 临时启用所有密码和所有协议,但似乎都没有问题。手机应该使用 RSA_RC4_128_MD5 和 SSLv3,所有这些都可用。

我是否忽略了这里失败的更根本的原因?证书请求似乎是重新协商失败的一部分。我尝试SSLInsecureRenegotiation On在虚拟主机上启用,以防手机的 SSL 不支持新协议的问题,但无济于事。

当前运行:Apache/2.2.16 (Ubuntu) mod_ssl/2.2.16 OpenSSL/0.9.8o Apache proxy_html/3.0.1

答案1

我遇到了同样的问题,结果发现问题实际上出在错误消息中 - 这令人困惑。如果您查看服务器读取的确切协议字节(您已删除 - 以下是我的日志中的相关部分):

ssl_engine_io.c(1854):| 0000:15 03 01 00 02

ssl_engine_io.c(1854):|0000:02 28

0x15 指的是 ContentType 21,这是一条警报消息。“03 01”是版本,“00 02”是实际消息的长度。

“02 28” 表示致命错误 40,指的是 handshake_failure,这仅仅意味着服务器没有提供客户端可以使用的任何东西。换句话说,诺基亚没有识别您的 SSL 证书所需的根证书。

发生此错误时,服务器协议状态机正在等待读取可选的客户端证书。因此,“SSLv3 读取客户端证书 A”只是服务器报告其收到来自客户端的警报消息时所处的状态。

只是有点令人困惑。

相关内容