Hi guys!
I have SSL-proxy server which send me error "ssl handshake failure" in browser and other proxy-tools.
But when I use ncat or openssl-tool the proxy work fine.

When i'm trying to use direct remoteSSLproxy.com as HTTPS-proxy (in Firefox for example) I'm getting an error:

HTTP/1.0 500 handshakefailed
Via: 1.0 192.168.10.111 (Web Gateway)
Connection: Close
Content-Type: text/html
Cache-Control: no-cache
Content-Length: 1944

But when I'm connecting with openssl(openssl s_client -connect remoteSSLproxy.com:443  -tls1) or ncat (ncat --ssl remoteSSLproxy.com:443) proxy working fine.

Please help me to make working tunnel.
I think I need tunnel like below:
localhost->localhostSSLtl
s1:443->remoteSSLproxy.com:443



Working examples:
openssl s_client -connect remoteSSLproxy.com:443  -tls1
openssl s_client -connect remoteSSLproxy.com:443  -cipher HIGH
openssl s_client -connect remoteSSLproxy.com:443  -cipher MEDIUM



Not working:
$ openssl s_client -connect remoteSSLproxy.com:443  -cipher LOW
CONNECTED(00000003)
17269:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/ssl/s23_clnt.c:593:

Not working:
$ openssl s_client -connect remoteSSLproxy.com:443  -ssl2
CONNECTED(00000003)
17261:error:140EC11B:SSL routines:SSL2_READ_INTERNAL:illegal padding:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/ssl/s2_pkt.c:243:

Not working:
$ openssl s_client -connect remoteSSLproxy.com:443  -ssl3
CONNECTED(00000003)
17262:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/ssl/s3_pkt.c:1145:SSL alert number 40
17262:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/ssl/s3_pkt.c:566:


Thanks!