Skip to content

Commit

Permalink
Merge branch fix-https-linux into development
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219-msft committed Apr 14, 2016
2 parents 1c4171b + fde3e9a commit f4c8a47
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions Release/include/cpprest/details/http_server_asio.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class connection
bool m_chunked;
std::atomic<int> m_refs; // track how many threads are still referring to this

std::unique_ptr<boost::asio::ssl::context> m_ssl_context;
std::unique_ptr<boost::asio::ssl::stream<boost::asio::ip::tcp::socket&>> m_ssl_stream;

public:
Expand All @@ -85,9 +86,11 @@ class connection
{
if (is_https)
{
boost::asio::ssl::context ssl_context(boost::asio::ssl::context::sslv23);
ssl_context_callback(ssl_context);
m_ssl_stream = utility::details::make_unique<boost::asio::ssl::stream<boost::asio::ip::tcp::socket&>>(*m_socket, ssl_context);
m_ssl_context = utility::details::make_unique<boost::asio::ssl::context>(boost::asio::ssl::context::sslv23);
ssl_context_callback(*m_ssl_context);
m_ssl_stream = utility::details::make_unique<boost::asio::ssl::stream<boost::asio::ip::tcp::socket&>>(*m_socket, *m_ssl_context);
m_ssl_stream = utility::details::make_unique<boost::asio::ssl::stream<boost::asio::ip::tcp::socket&>>(*m_socket, *m_ssl_context);

m_ssl_stream->async_handshake(boost::asio::ssl::stream_base::server, [this](const boost::system::error_code&) { this->start_request_response(); });
}
else
Expand Down
2 changes: 1 addition & 1 deletion Release/tests/functional/http/client/outside_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ TEST(server_selfsigned_cert)
});
}

TEST(server_hostname_mismatch)
TEST(server_hostname_mismatch, "Ignore", "Site fixed certificate. Improve test (new site or alternate method).")
{
handle_timeout([]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ TEST(self_signed_cert)
handshake_error_test_impl(U("wss://www.pcwebshop.co.uk/"));
}

TEST(hostname_mismatch)
TEST(hostname_mismatch, "Ignore", "Site fixed certificate. Improve test (new site or alternate method).")
{
handshake_error_test_impl(U("wss://swordsoftruth.com/"));
}
Expand Down

0 comments on commit f4c8a47

Please sign in to comment.