26 using namespace folly;
34 socket_->enableClientHelloParsing();
35 socket_->forceCacheAddrOnFailure(
true);
52 std::make_shared<std::string>(sigAlgName ? sigAlgName :
"");
73 const unsigned char* nextProto =
nullptr;
74 unsigned nextProtoLength = 0;
75 sock->getSelectedNextProtocolNoThrow(&nextProto, &nextProtoLength);
78 VLOG(3) <<
"Client selected next protocol " <<
79 std::string((
const char*)nextProto, nextProtoLength);
81 VLOG(3) <<
"Client did not select a next protocol";
87 tinfo_.acceptTime = acceptTime_;
88 tinfo_.sslSetupTime = std::chrono::duration_cast<std::chrono::milliseconds>(
91 fillSSLTransportInfoFields(sock, tinfo_);
93 auto nextProtocol = nextProto ?
108 std::chrono::duration_cast<std::chrono::milliseconds>(
110 VLOG(3) <<
"SSL handshake error after " << elapsedTime.count() <<
111 " ms; " << sock->getRawBytesReceived() <<
" bytes received & " <<
112 sock->getRawBytesWritten() <<
" bytes sent: " <<
115 auto sslEx = folly::make_exception_wrapper<SSLException>(
116 sslError_, elapsedTime, sock->getRawBytesReceived());
void handshakeSuc(folly::AsyncSSLSocket *sock) noexceptoverride
size_t getRawBytesReceived() const override
static const std::string empty_string
std::shared_ptr< std::string > sslClientCiphers
const char * getSSLCertSigAlgName() const
size_t getRawBytesWritten() const override
std::string getSSLClientComprMethods() const
std::string getSSLClientSupportedVersions() const
std::chrono::steady_clock::time_point now()
constexpr detail::Map< Move > move
std::string getSecurityProtocol() const override
std::shared_ptr< std::string > sslClientExts
void start(folly::AsyncSSLSocket::UniquePtr sock, AcceptorHandshakeHelper::Callback *callback) noexceptoverride
const char * getSSLServerName() const
std::shared_ptr< std::string > sslClientSigAlgs
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
std::unique_ptr< AsyncSSLSocket, Destructor > UniquePtr
std::shared_ptr< std::string > sslServerCiphers
std::shared_ptr< std::string > sslServerName
static SSLResumeEnum getResumeState(folly::AsyncSSLSocket *sslSocket)
void handshakeErr(folly::AsyncSSLSocket *sock, const folly::AsyncSocketException &ex) noexceptoverride
AsyncServerSocket::UniquePtr socket_
static void fillSSLTransportInfoFields(folly::AsyncSSLSocket *sock, TransportInfo &tinfo)
uint32_t sslSetupBytesRead
void getSSLClientCiphers(std::string &clientCiphers, bool convertToString=true) const
std::shared_ptr< std::string > sslCertSigAlgName
std::shared_ptr< std::string > sslCipher
std::string getSSLClientExts() const
void getSSLServerCiphers(std::string &serverCiphers) const
std::string getSSLClientSigAlgs() const
std::shared_ptr< std::string > sslClientComprMethods
folly::Function< void()> callback_
uint32_t sslSetupBytesWritten
int getSSLCertSize() const
int getSSLVersion() const
virtual const char * getNegotiatedCipherName() const
std::shared_ptr< std::string > sslClientSupportedVersions
std::shared_ptr< std::string > sslClientCiphersHex