OpenSSL Handshake Failure (14094410) - Erroneous Client Certificate Check from Mobile Phone

Posted by Clayton Sims on Server Fault See other posts from Server Fault or by Clayton Sims
Published on 2011-06-10T15:05:11Z Indexed on 2012/06/27 3:17 UTC
Read the original article Hit count: 698

Filed under:
|
|

I'm running a proxy server through Apache with modssl, which we're using to proxy POSTs from mobile devices to another internal server. This works successfully for most clients, but requests from a specific phone model (Nokia 2690) are showing a bizarre handshake failure.

It looks as though OpenSSL is either requesting (or attempting to read an unsolicited) client certificate from the phone (which is especially bizarre because j2me's kssl implementation doesn't support client certs). I've disabled client certificates with the SSLVerifyClient none directive in both the virtual host conf and the modssl conf. The trace from error.log on debug level is (details redacted):

[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)

I've tried enabling all ciphers and all protocols temporarily with modssl, neither of which seemed to be the issue. The phone should be using RSA_RC4_128_MD5 and SSLv3, all of which are available.

Am I missing something more fundamental about what's failing here? It seemed like the certificate request might have been part of a renegotiation failure. I tried enabling SSLInsecureRenegotiation On on the virtual host, in case it was an issue of the phone's SSL not supporting the new protocol, but to no avail.

Currently running: Apache/2.2.16 (Ubuntu) mod_ssl/2.2.16 OpenSSL/0.9.8o Apache proxy_html/3.0.1

© Server Fault or respective owner

Related posts about apache2

Related posts about openssl