mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Improve MultiSocket::ssl_handle
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user