diff options
author | xiphon <xiphon@protonmail.com> | 2019-09-17 22:19:48 +0000 |
---|---|---|
committer | xiphon <xiphon@protonmail.com> | 2019-09-17 22:21:16 +0000 |
commit | 4371791977a18653da16a99f41de46cee5fa337b (patch) | |
tree | c695c99378d59132102c4526120aed34fe6be844 /contrib/epee/include/net/net_ssl.h | |
parent | Merge pull request #5876 (diff) | |
download | monero-4371791977a18653da16a99f41de46cee5fa337b.tar.xz |
epee: implement handshake timeout for SSL connections
Diffstat (limited to 'contrib/epee/include/net/net_ssl.h')
-rw-r--r-- | contrib/epee/include/net/net_ssl.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/epee/include/net/net_ssl.h b/contrib/epee/include/net/net_ssl.h index 3a97dfdaf..d2c1c1a3a 100644 --- a/contrib/epee/include/net/net_ssl.h +++ b/contrib/epee/include/net/net_ssl.h @@ -128,7 +128,11 @@ namespace net_utils \return True if the SSL handshake completes with peer verification settings. */ - bool handshake(boost::asio::ssl::stream<boost::asio::ip::tcp::socket> &socket, boost::asio::ssl::stream_base::handshake_type type, const std::string& host = {}) const; + bool handshake( + boost::asio::ssl::stream<boost::asio::ip::tcp::socket> &socket, + boost::asio::ssl::stream_base::handshake_type type, + const std::string& host = {}, + std::chrono::milliseconds timeout = std::chrono::seconds(15)) const; }; // https://security.stackexchange.com/questions/34780/checking-client-hello-for-https-classification |