proxygen
|
#include <AsyncSSLSocketTest.h>
Public Types | |
enum | ExpectType { EXPECT_SUCCESS, EXPECT_ERROR } |
Public Member Functions | |
HandshakeCallback (ReadCallbackBase *rcb, ExpectType expect=EXPECT_SUCCESS) | |
void | setSocket (const std::shared_ptr< AsyncSSLSocket > &socket) |
void | setState (StateEnum s) |
void | handshakeSuc (AsyncSSLSocket *sock) noexceptoverride |
void | handshakeErr (AsyncSSLSocket *, const AsyncSocketException &ex) noexceptoverride |
void | waitForHandshake () |
~HandshakeCallback () override | |
void | closeSocket () |
std::shared_ptr< AsyncSSLSocket > | getSocket () |
Public Member Functions inherited from folly::AsyncSSLSocket::HandshakeCB | |
virtual | ~HandshakeCB ()=default |
virtual bool | handshakeVer (AsyncSSLSocket *, bool preverifyOk, X509_STORE_CTX *) noexcept |
Public Attributes | |
StateEnum | state |
std::shared_ptr< AsyncSSLSocket > | socket_ |
ReadCallbackBase * | rcb_ |
ExpectType | expect_ |
std::mutex | mutex_ |
std::condition_variable | cv_ |
std::string | errorString_ |
Definition at line 478 of file AsyncSSLSocketTest.h.
Enumerator | |
---|---|
EXPECT_SUCCESS | |
EXPECT_ERROR |
Definition at line 480 of file AsyncSSLSocketTest.h.
|
inlineexplicit |
Definition at line 482 of file AsyncSSLSocketTest.h.
|
inlineoverride |
Definition at line 525 of file AsyncSSLSocketTest.h.
References EXPECT_EQ, and folly::STATE_SUCCEEDED.
|
inline |
Definition at line 529 of file AsyncSSLSocketTest.h.
References folly::SendMsgParamsCallbackBase::socket_, and folly::STATE_SUCCEEDED.
Referenced by folly::TEST().
|
inline |
Definition at line 534 of file AsyncSSLSocketTest.h.
References folly::SendMsgParamsCallbackBase::socket_.
Referenced by folly::TEST().
|
inlineoverridevirtualnoexcept |
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 506 of file AsyncSSLSocketTest.h.
References cv_, g(), mutex_, folly::STATE_FAILED, and folly::STATE_SUCCEEDED.
|
inlineoverridevirtualnoexcept |
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 497 of file AsyncSSLSocketTest.h.
References cv_, EXPECT_EQ, g(), mutex_, folly::SendMsgParamsCallbackBase::socket_, folly::STATE_FAILED, and folly::STATE_SUCCEEDED.
|
inline |
Definition at line 487 of file AsyncSSLSocketTest.h.
References folly::netops::socket(), and folly::SendMsgParamsCallbackBase::socket_.
|
inline |
|
inline |
Definition at line 520 of file AsyncSSLSocketTest.h.
References cv_, folly::lock(), mutex_, and folly::STATE_WAITING.
Referenced by folly::TEST().
std::condition_variable folly::HandshakeCallback::cv_ |
Definition at line 543 of file AsyncSSLSocketTest.h.
std::string folly::HandshakeCallback::errorString_ |
Definition at line 544 of file AsyncSSLSocketTest.h.
Referenced by folly::TEST().
ExpectType folly::HandshakeCallback::expect_ |
Definition at line 541 of file AsyncSSLSocketTest.h.
std::mutex folly::HandshakeCallback::mutex_ |
Definition at line 542 of file AsyncSSLSocketTest.h.
ReadCallbackBase* folly::HandshakeCallback::rcb_ |
Definition at line 540 of file AsyncSSLSocketTest.h.
std::shared_ptr<AsyncSSLSocket> folly::HandshakeCallback::socket_ |
Definition at line 539 of file AsyncSSLSocketTest.h.
StateEnum folly::HandshakeCallback::state |
Definition at line 538 of file AsyncSSLSocketTest.h.