Skip to content

Verify hostname according to rfc2818 #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 13, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup spaces and tabs
  • Loading branch information
eakraly committed Oct 13, 2014
commit ceed0b5e526976de8cf97baa30a2af38b7425c31
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace impl {
struct normal_delegate : connection_delegate {
normal_delegate(asio::io_service &service);

virtual void connect(asio::ip::tcp::endpoint & endpoint, std::string host,
virtual void connect(asio::ip::tcp::endpoint &endpoint, std::string host,
function<void(system::error_code const &)> handler);
virtual void write(
asio::streambuf &command_streambuf,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ boost::network::http::impl::normal_delegate::normal_delegate(
: service_(service) {}

void boost::network::http::impl::normal_delegate::connect(
asio::ip::tcp::endpoint & endpoint,
std::string host,
asio::ip::tcp::endpoint &endpoint, std::string host,
function<void(system::error_code const &)> handler) {
socket_.reset(new asio::ip::tcp::socket(service_));
socket_->async_connect(endpoint, handler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ boost::network::http::impl::ssl_delegate::ssl_delegate(
always_verify_peer_(always_verify_peer) {}

void boost::network::http::impl::ssl_delegate::connect(
asio::ip::tcp::endpoint &endpoint,
std::string host,
asio::ip::tcp::endpoint &endpoint, std::string host,
function<void(system::error_code const &)> handler) {
context_.reset(
new asio::ssl::context(service_, asio::ssl::context::sslv23_client));
Expand All @@ -49,7 +48,7 @@ void boost::network::http::impl::ssl_delegate::connect(
socket_.reset(
new asio::ssl::stream<asio::ip::tcp::socket>(service_, *context_));
if (always_verify_peer_)
socket_->set_verify_callback(boost::asio::ssl::rfc2818_verification(host));
socket_->set_verify_callback(boost::asio::ssl::rfc2818_verification(host));
socket_->lowest_layer().async_connect(
endpoint,
::boost::bind(
Expand Down