我正在尝试使用以下代码连接到ssl服务器:
// Create a context that uses the default paths for
// finding CA certificates.
ssl::context ctx(ssl::context::sslv23);
ctx.set_default_verify_paths();
// Open a socket and connect it to the remote host.
ssl_socket sock(io_service, ctx);
tcp::resolver::query query(host_name_, "https");
boost::asio::connect(sock.lowest_layer(), resolver_.resolve(query));
sock.lowest_layer().set_option(tcp::no_delay(true));
// Perform SSL handshake and verify the remote host's
// certificate.
sock.set_verify_mode(ssl::verify_peer);
sock.set_verify_callback(ssl::rfc2818_verification(host_name_));
sock.handshake(ssl_socket::client);
但是当我运行时,我收到错误消息:异常:handshake:tlsv1无法识别的名称 我可以通过浏览器或使用http://www.digicert.com/help/
连接到服务器