Commit bf29c7e0 authored by Mingtao Yang's avatar Mingtao Yang Committed by Facebook Github Bot

Add getSSLContext() to AsyncSSLSocket

Reviewed By: knekritz

Differential Revision: D5632201

fbshipit-source-id: 5db380379ab6cb608922c77dd716bfc4410b2cd8
parent 4ff438f8
......@@ -557,6 +557,18 @@ class AsyncSSLSocket : public virtual AsyncSocket {
void detachSSLContext();
#endif
/**
* Returns the original folly::SSLContext associated with this socket.
*
* Suitable for use in AsyncSSLSocket constructor to construct a new
* AsyncSSLSocket using an existing socket's context.
*
* switchServerSSLContext() does not affect this return value.
*/
const std::shared_ptr<folly::SSLContext>& getSSLContext() const {
return ctx_;
}
#if FOLLY_OPENSSL_HAS_SNI
/**
* Switch the SSLContext to continue the SSL handshake.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment