tls握手,客户端发送clien hello后就收到服务器端回的失败,抓包如下:
解决方案:
本以为是ssl::context参数的设置原因,各种尝试,花了我两天时间,还ao了两个大夜。最终定位到具然是SNI设置的不对。
查了一下SNI的作用,才上慌然大悟,这个参数要设置成访问目标服务器的域名。
不是我说的,TLS真的不友好,出点错从抓包来看根本看不出来具体原因。靠经验的大多了。国内外网按上述的TLS握手出错信息,都没有找到说是SNI的原因的。无语啊。还得对TLS原理流程要非常熟悉。学不完啊。
- Description Handshake Failure Record TLSv1description handshake failure record sslv3_alert_handshake_failure sslv3_alert_handshake_failure exceptions handshake tlsv1 nginx tlsv1 tlsv client tlsv1 edge tlsv handshake gnutls_handshake error ssl_client_socket_impl handshake net_error gnutls_handshake non-properly connection terminated