Skip to content

Commit ff42fcf

Browse files
eakralydeanberris
authored andcommitted
Verify hostname only when always_verify==true
1 parent 449b8f5 commit ff42fcf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

boost/network/protocol/http/client/connection/ssl_delegate.ipp

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ void boost::network::http::impl::ssl_delegate::connect(
4848
boost::asio::ssl::context::pem);
4949
socket_.reset(
5050
new asio::ssl::stream<asio::ip::tcp::socket>(service_, *context_));
51-
socket_->set_verify_callback(boost::asio::ssl::rfc2818_verification(host));
51+
if (always_verify_peer_)
52+
socket_->set_verify_callback(boost::asio::ssl::rfc2818_verification(host));
5253
socket_->lowest_layer().async_connect(
5354
endpoint,
5455
::boost::bind(

0 commit comments

Comments
 (0)