proxygen
|
#include <SSLAcceptorHandshakeHelper.h>
Public Member Functions | |
SSLAcceptorHandshakeHelper (const folly::SocketAddress &clientAddr, std::chrono::steady_clock::time_point acceptTime, TransportInfo &tinfo) | |
void | start (folly::AsyncSSLSocket::UniquePtr sock, AcceptorHandshakeHelper::Callback *callback) noexceptoverride |
void | dropConnection (SSLErrorEnum reason=SSLErrorEnum::NO_ERROR) override |
Public Member Functions inherited from folly::DelayedDestruction | |
virtual void | destroy () |
bool | getDestroyPending () const |
Public Member Functions inherited from folly::DelayedDestructionBase | |
virtual | ~DelayedDestructionBase ()=default |
Public Member Functions inherited from folly::AsyncSSLSocket::HandshakeCB | |
virtual | ~HandshakeCB ()=default |
virtual bool | handshakeVer (AsyncSSLSocket *, bool preverifyOk, X509_STORE_CTX *) noexcept |
Static Public Member Functions | |
static void | fillSSLTransportInfoFields (folly::AsyncSSLSocket *sock, TransportInfo &tinfo) |
Protected Member Functions | |
void | handshakeSuc (folly::AsyncSSLSocket *sock) noexceptoverride |
void | handshakeErr (folly::AsyncSSLSocket *sock, const folly::AsyncSocketException &ex) noexceptoverride |
Protected Member Functions inherited from folly::DelayedDestruction | |
~DelayedDestruction () override=default | |
DelayedDestruction () | |
Protected Member Functions inherited from folly::DelayedDestructionBase | |
DelayedDestructionBase () | |
uint32_t | getDestructorGuardCount () const |
Protected Attributes | |
folly::AsyncSSLSocket::UniquePtr | socket_ |
AcceptorHandshakeHelper::Callback * | callback_ |
const folly::SocketAddress & | clientAddr_ |
std::chrono::steady_clock::time_point | acceptTime_ |
TransportInfo & | tinfo_ |
SSLErrorEnum | sslError_ {SSLErrorEnum::NO_ERROR} |
Additional Inherited Members | |
Public Types inherited from wangle::AcceptorHandshakeHelper | |
using | UniquePtr = std::unique_ptr< AcceptorHandshakeHelper, folly::DelayedDestruction::Destructor > |
Definition at line 28 of file SSLAcceptorHandshakeHelper.h.
|
inline |
Definition at line 31 of file SSLAcceptorHandshakeHelper.h.
References folly::pushmi::__adl::noexcept(), and start().
Referenced by wangle::DefaultToSSLPeekingCallback::getHelper().
|
inlineoverridevirtual |
Implements wangle::AcceptorHandshakeHelper.
Definition at line 43 of file SSLAcceptorHandshakeHelper.h.
References fillSSLTransportInfoFields(), handshakeErr(), handshakeSuc(), socket_, and sslError_.
|
static |
Definition at line 39 of file SSLAcceptorHandshakeHelper.cpp.
References folly::AsyncSSLSocket::getNegotiatedCipherName(), folly::AsyncSSLSocket::getRawBytesReceived(), folly::AsyncSSLSocket::getRawBytesWritten(), wangle::SSLUtil::getResumeState(), folly::AsyncSSLSocket::getSecurityProtocol(), folly::AsyncSSLSocket::getSSLCertSigAlgName(), folly::AsyncSSLSocket::getSSLCertSize(), folly::AsyncSSLSocket::getSSLClientCiphers(), folly::AsyncSSLSocket::getSSLClientComprMethods(), folly::AsyncSSLSocket::getSSLClientExts(), folly::AsyncSSLSocket::getSSLClientSigAlgs(), folly::AsyncSSLSocket::getSSLClientSupportedVersions(), folly::AsyncSSLSocket::getSSLServerCiphers(), folly::AsyncSSLSocket::getSSLServerName(), folly::AsyncSSLSocket::getSSLVersion(), wangle::TransportInfo::secure, wangle::TransportInfo::securityType, wangle::TransportInfo::sslCertSigAlgName, wangle::TransportInfo::sslCertSize, wangle::TransportInfo::sslCipher, wangle::TransportInfo::sslClientCiphers, wangle::TransportInfo::sslClientCiphersHex, wangle::TransportInfo::sslClientComprMethods, wangle::TransportInfo::sslClientExts, wangle::TransportInfo::sslClientSigAlgs, wangle::TransportInfo::sslClientSupportedVersions, wangle::TransportInfo::sslResume, wangle::TransportInfo::sslServerCiphers, wangle::TransportInfo::sslServerName, wangle::TransportInfo::sslSetupBytesRead, wangle::TransportInfo::sslSetupBytesWritten, and wangle::TransportInfo::sslVersion.
Referenced by dropConnection(), and wangle::FizzAcceptorHandshakeHelper::handshakeSuc().
|
overrideprotectedvirtualnoexcept |
handshakeErr() is called if an error occurs while establishing the SSL connection.
The HandshakeCB will be uninstalled before handshakeErr() is called.
sock | SSL socket on which the handshake was initiated |
ex | An exception representing the error. |
Implements folly::AsyncSSLSocket::HandshakeCB.
Definition at line 104 of file SSLAcceptorHandshakeHelper.cpp.
References callback_, now(), and socket_.
Referenced by dropConnection().
|
overrideprotectedvirtualnoexcept |
handshakeSuc() is called when a new SSL connection is established, i.e., after SSL_accept/connect() returns successfully.
The HandshakeCB will be uninstalled before handshakeSuc() is called.
sock | SSL socket on which the handshake was initiated |
Implements folly::AsyncSSLSocket::HandshakeCB.
Definition at line 72 of file SSLAcceptorHandshakeHelper.cpp.
References callback_, wangle::empty_string, folly::gen::move, wangle::NO_ERROR, now(), socket_, string, and wangle::TLS.
Referenced by dropConnection().
|
overridevirtualnoexcept |
Implements wangle::AcceptorHandshakeHelper.
Definition at line 28 of file SSLAcceptorHandshakeHelper.cpp.
References callback_, folly::gen::move, and socket_.
Referenced by SSLAcceptorHandshakeHelper().
|
protected |
Definition at line 62 of file SSLAcceptorHandshakeHelper.h.
|
protected |
Definition at line 60 of file SSLAcceptorHandshakeHelper.h.
|
protected |
Definition at line 61 of file SSLAcceptorHandshakeHelper.h.
|
protected |
Definition at line 59 of file SSLAcceptorHandshakeHelper.h.
Referenced by dropConnection().
|
protected |
Definition at line 64 of file SSLAcceptorHandshakeHelper.h.
Referenced by dropConnection().
|
protected |
Definition at line 63 of file SSLAcceptorHandshakeHelper.h.