Improve MultiSocket::ssl_handle

This commit is contained in:
Vinnie Falco
2013-11-07 09:35:04 -08:00
parent c5ccabec38
commit 066d92ecfa
3 changed files with 4 additions and 4 deletions

View File

@@ -2512,7 +2512,7 @@ void PeerImp::addTxSet (uint256 const& hash)
// (both sides get the same information, neither side controls it)
void PeerImp::getSessionCookie (std::string& strDst)
{
SSL* ssl = getHandshakeStream ().native_handle ();
SSL* ssl (getHandshakeStream ().ssl_handle ());
if (!ssl) throw std::runtime_error ("No underlying connection");

View File

@@ -108,7 +108,8 @@ public:
virtual IPAddress remote_endpoint() = 0;
virtual ProxyInfo getProxyInfo () = 0;
virtual SSL* native_handle () = 0;
/** Returns a pointer to the SSL handle or nullptr if no SSL. */
virtual SSL* ssl_handle () = 0;
static MultiSocket* New (
boost::asio::io_service& io_service,

View File

@@ -125,9 +125,8 @@ protected:
return m_proxyInfo;
}
SSL* native_handle ()
SSL* ssl_handle ()
{
bassert (m_native_ssl_handle != nullptr);
return m_native_ssl_handle;
}