forked from boostorg/beast
1 parent
4e384f086b
commit
ea38d841b0
11 files changed
+109
-28
No files matched your search
@@ -69,8 +69,17 @@ int main(int argc, char** argv)
|
||||
// Set SNI Hostname (many hosts need this to handshake successfully)
|
||||
if(! SSL_set_tlsext_host_name(stream.native_handle(), host))
|
||||
{
|
||||
beast::error_code ec{static_cast<int>(::ERR_get_error()), net::error::get_ssl_category()};
|
||||
throw beast::system_error{ec};
|
||||
throw beast::system_error(
|
||||
static_cast<int>(::ERR_get_error()),
|
||||
net::error::get_ssl_category());
|
||||
}
|
||||
|
||||
// Set the expected hostname in the peer certificate for verification
|
||||
if(! SSL_set1_host(stream.native_handle(), host))
|
||||
{
|
||||
throw beast::system_error(
|
||||
static_cast<int>(::ERR_get_error()),
|
||||
net::error::get_ssl_category());
|
||||
}
|
||||
|
||||
// Look up the domain name
|
||||
|
||||
Reference in new issue
Block a user