proxygen
|
#include <MockAsyncSSLSocket.h>
Public Member Functions | |
MockAsyncSSLSocket (const std::shared_ptr< SSLContext > &ctx, EventBase *base, bool deferSecurityNegotiation=false) | |
MOCK_METHOD5 (connect_, void(AsyncSocket::ConnectCallback *, const folly::SocketAddress &, int, const OptionMap &, const folly::SocketAddress &)) | |
void | connect (AsyncSocket::ConnectCallback *callback, const folly::SocketAddress &address, int timeout, const OptionMap &options, const folly::SocketAddress &bindAddr) noexceptoverride |
MOCK_CONST_METHOD1 (getLocalAddress, void(folly::SocketAddress *)) | |
MOCK_CONST_METHOD1 (getPeerAddress, void(folly::SocketAddress *)) | |
MOCK_METHOD0 (closeNow, void()) | |
MOCK_CONST_METHOD0 (good, bool()) | |
MOCK_CONST_METHOD0 (readable, bool()) | |
MOCK_CONST_METHOD0 (hangup, bool()) | |
MOCK_CONST_METHOD2 (getSelectedNextProtocol, void(const unsigned char **, unsigned *)) | |
MOCK_CONST_METHOD2 (getSelectedNextProtocolNoThrow, bool(const unsigned char **, unsigned *)) | |
MOCK_METHOD1 (setReadCB, void(ReadCallback *)) | |
void | sslConn (AsyncSSLSocket::HandshakeCB *cb, std::chrono::milliseconds timeout, const SSLContext::SSLVerifyPeerEnum &verify) override |
void | sslAccept (AsyncSSLSocket::HandshakeCB *cb, std::chrono::milliseconds timeout, const SSLContext::SSLVerifyPeerEnum &verify) override |
MOCK_METHOD3 (sslConnectMockable, void(AsyncSSLSocket::HandshakeCB *, std::chrono::milliseconds, const SSLContext::SSLVerifyPeerEnum &)) | |
MOCK_METHOD3 (sslAcceptMockable, void(AsyncSSLSocket::HandshakeCB *, std::chrono::milliseconds, const SSLContext::SSLVerifyPeerEnum &)) | |
![]() | |
AsyncSSLSocket (const std::shared_ptr< folly::SSLContext > &ctx, EventBase *evb, bool deferSecurityNegotiation=false) | |
AsyncSSLSocket (const std::shared_ptr< folly::SSLContext > &ctx, EventBase *evb, int fd, bool server=true, bool deferSecurityNegotiation=false) | |
AsyncSSLSocket (const std::shared_ptr< folly::SSLContext > &ctx, AsyncSocket::UniquePtr oldAsyncSocket, bool server=true, bool deferSecurityNegotiation=false) | |
void | closeNow () override |
void | shutdownWrite () override |
void | shutdownWriteNow () override |
bool | good () const override |
bool | connecting () const override |
std::string | getApplicationProtocol () const noexceptoverride |
std::string | getSecurityProtocol () const override |
void | setEorTracking (bool track) override |
size_t | getRawBytesWritten () const override |
size_t | getRawBytesReceived () const override |
void | enableClientHelloParsing () |
void | restartSSLAccept () |
virtual void | connect (ConnectCallback *callback, const folly::SocketAddress &address, std::chrono::milliseconds connectTimeout, std::chrono::milliseconds totalConnectTimeout, const OptionMap &options=emptyOptionMap, const folly::SocketAddress &bindAddr=anyAddress()) noexcept |
SSLStateEnum | getSSLState () const |
SSL_SESSION * | getSSLSession () |
const SSL * | getSSL () const |
void | setSSLSession (SSL_SESSION *session, bool takeOwnership=false) |
virtual void | getSelectedNextProtocol (const unsigned char **protoName, unsigned *protoLen) const |
virtual bool | getSelectedNextProtocolNoThrow (const unsigned char **protoName, unsigned *protoLen) const |
virtual bool | getSSLSessionReused () const |
bool | sessionIDResumed () const |
void | setSessionIDResumed (bool resumed) |
virtual const char * | getNegotiatedCipherName () const |
const char * | getSSLServerName () const |
const char * | getSSLServerNameNoThrow () const |
int | getSSLVersion () const |
const char * | getSSLCertSigAlgName () const |
int | getSSLCertSize () const |
const X509 * | getSelfCert () const override |
void | attachEventBase (EventBase *eventBase) override |
void | detachEventBase () override |
bool | isDetachable () const override |
virtual void | attachTimeoutManager (TimeoutManager *manager) |
virtual void | detachTimeoutManager () |
const std::shared_ptr< folly::SSLContext > & | getSSLContext () const |
void | timeoutExpired (std::chrono::milliseconds timeout) noexcept |
void | getSSLClientCiphers (std::string &clientCiphers, bool convertToString=true) const |
std::string | getSSLClientComprMethods () const |
std::string | getSSLClientExts () const |
std::string | getSSLClientSigAlgs () const |
std::string | getSSLClientSupportedVersions () const |
std::string | getSSLAlertsReceived () const |
void | setSSLCertVerificationAlert (std::string alert) |
std::string | getSSLCertVerificationAlert () const |
void | getSSLSharedCiphers (std::string &sharedCiphers) const |
void | getSSLServerCiphers (std::string &serverCiphers) const |
bool | needsPeerVerification () const |
void | resetClientHelloParsing (SSL *ssl) |
ssl::ClientHelloInfo * | getClientHelloInfo () const |
virtual std::chrono::nanoseconds | getHandshakeTime () const |
void | setMinWriteSize (size_t minWriteSize) |
size_t | getMinWriteSize () const |
void | setReadCB (ReadCallback *callback) override |
void | setBufferMovableEnabled (bool enabled) |
const AsyncTransportCertificate * | getPeerCertificate () const override |
const AsyncTransportCertificate * | getSelfCertificate () const override |
ssl::X509UniquePtr | getPeerCert () const override |
void | forceCacheAddrOnFailure (bool force) |
const std::string & | getSessionKey () const |
void | setSessionKey (std::string sessionKey) |
void | setCertCacheHit (bool hit) |
bool | getCertCacheHit () const |
bool | sessionResumptionAttempted () const |
std::chrono::milliseconds | getTotalConnectTimeout () const |
void | setAsyncOperationFinishCallback (std::unique_ptr< ReadCallback > cb) |
![]() | |
AsyncSocket () | |
AsyncSocket (EventBase *evb) | |
void | setShutdownSocketSet (const std::weak_ptr< ShutdownSocketSet > &wSS) |
AsyncSocket (EventBase *evb, const folly::SocketAddress &address, uint32_t connectTimeout=0) | |
AsyncSocket (EventBase *evb, const std::string &ip, uint16_t port, uint32_t connectTimeout=0) | |
AsyncSocket (EventBase *evb, int fd, uint32_t zeroCopyBufId=0) | |
AsyncSocket (AsyncSocket::UniquePtr) | |
void | destroy () override |
EventBase * | getEventBase () const override |
virtual int | getFd () const |
virtual int | detachFd () |
void | connect (ConnectCallback *callback, const std::string &ip, uint16_t port, int timeout=0, const OptionMap &options=emptyOptionMap) noexcept |
void | cancelConnect () |
void | setSendTimeout (uint32_t milliseconds) override |
uint32_t | getSendTimeout () const override |
void | setMaxReadsPerEvent (uint16_t maxReads) |
uint16_t | getMaxReadsPerEvent () const |
virtual void | setErrMessageCB (ErrMessageCallback *callback) |
virtual ErrMessageCallback * | getErrMessageCallback () const |
virtual void | setSendMsgParamCB (SendMsgParamsCallback *callback) |
virtual SendMsgParamsCallback * | getSendMsgParamsCB () const |
ReadCallback * | getReadCallback () const override |
bool | setZeroCopy (bool enable) |
bool | getZeroCopy () const |
uint32_t | getZeroCopyBufId () const |
size_t | getZeroCopyReenableThreshold () const |
void | setZeroCopyReenableThreshold (size_t threshold) |
void | write (WriteCallback *callback, const void *buf, size_t bytes, WriteFlags flags=WriteFlags::NONE) override |
void | writev (WriteCallback *callback, const iovec *vec, size_t count, WriteFlags flags=WriteFlags::NONE) override |
void | writeChain (WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&buf, WriteFlags flags=WriteFlags::NONE) override |
virtual void | writeRequest (WriteRequest *req) |
void | writeRequestReady () |
void | close () override |
void | closeWithReset () override |
bool | readable () const override |
bool | writable () const override |
bool | isPending () const override |
virtual bool | hangup () const |
bool | error () const override |
void | getLocalAddress (folly::SocketAddress *address) const override |
void | getPeerAddress (folly::SocketAddress *address) const override |
bool | isEorTrackingEnabled () const override |
virtual bool | isClosedByPeer () const |
virtual bool | isClosedBySelf () const |
size_t | getAppBytesWritten () const override |
size_t | getAppBytesReceived () const override |
std::chrono::nanoseconds | getConnectTime () const |
std::chrono::milliseconds | getConnectTimeout () const |
std::chrono::steady_clock::time_point | getConnectStartTime () const |
std::chrono::steady_clock::time_point | getConnectEndTime () const |
bool | getTFOAttempted () const |
bool | getTFOFinished () const |
bool | getTFOSucceded () const |
int | setNoDelay (bool noDelay) |
void | setCloseOnExec () |
int | setCongestionFlavor (const std::string &cname) |
int | setQuickAck (bool quickack) |
int | setSendBufSize (size_t bufsize) |
int | setRecvBufSize (size_t bufsize) |
int | setTCPProfile (int profd) |
template<typename T > | |
int | getSockOpt (int level, int optname, T *optval, socklen_t *optlen) |
template<typename T > | |
int | setSockOpt (int level, int optname, const T *optval) |
virtual int | getSockOptVirtual (int level, int optname, void *optval, socklen_t *optlen) |
virtual int | setSockOptVirtual (int level, int optname, void const *optval, socklen_t optlen) |
virtual void | setPreReceivedData (std::unique_ptr< IOBuf > data) |
void | enableTFO () |
void | disableTransparentTls () |
void | disableTSocks () |
void | setBufferCallback (BufferCallback *cb) |
void | setEvbChangedCallback (std::unique_ptr< EvbChangeCallback > cb) |
void | cacheAddresses () |
bool | isZeroCopyWriteInProgress () const noexcept |
bool | processZeroCopyWriteInProgress () noexcept |
void | setPeerCertificate (std::unique_ptr< const AsyncTransportCertificate > cert) |
void | setSelfCertificate (std::unique_ptr< const AsyncTransportCertificate > cert) |
![]() | |
virtual const AsyncTransportWrapper * | getWrappedTransport () const |
template<class T > | |
const T * | getUnderlyingTransport () const |
template<class T > | |
T * | getUnderlyingTransport () |
![]() | |
SocketAddress | getLocalAddress () const |
void | getAddress (SocketAddress *address) const override |
SocketAddress | getPeerAddress () const |
virtual bool | isReplaySafe () const |
virtual void | setReplaySafetyCallback (ReplaySafetyCallback *callback) |
![]() | |
bool | getDestroyPending () const |
![]() | |
virtual | ~DelayedDestructionBase ()=default |
![]() | |
virtual | ~AsyncSocketBase ()=default |
Additional Inherited Members | |
![]() | |
enum | SSLStateEnum { STATE_UNINIT, STATE_UNENCRYPTED, STATE_ACCEPTING, STATE_CACHE_LOOKUP, STATE_ASYNC_PENDING, STATE_CONNECTING, STATE_ESTABLISHED, STATE_REMOTE_CLOSED, STATE_CLOSING, STATE_CONNECTING_CLOSING, STATE_CLOSED, STATE_ERROR } |
typedef std::unique_ptr< AsyncSSLSocket, Destructor > | UniquePtr |
using | X509_deleter = folly::static_function_deleter< X509,&X509_free > |
![]() | |
enum | StateEnum : uint8_t { StateEnum::UNINIT, StateEnum::CONNECTING, StateEnum::ESTABLISHED, StateEnum::CLOSED, StateEnum::ERROR, StateEnum::FAST_OPEN } |
typedef std::unique_ptr< AsyncSocket, Destructor > | UniquePtr |
typedef std::map< OptionKey, int > | OptionMap |
![]() | |
using | UniquePtr = std::unique_ptr< AsyncTransportWrapper, Destructor > |
using | ReadCallback = AsyncReader::ReadCallback |
using | WriteCallback = AsyncWriter::WriteCallback |
![]() | |
typedef std::unique_ptr< AsyncTransport, Destructor > | UniquePtr |
![]() | |
static std::shared_ptr< AsyncSSLSocket > | newSocket (const std::shared_ptr< folly::SSLContext > &ctx, EventBase *evb, int fd, bool server=true, bool deferSecurityNegotiation=false) |
static std::shared_ptr< AsyncSSLSocket > | newSocket (const std::shared_ptr< folly::SSLContext > &ctx, EventBase *evb, bool deferSecurityNegotiation=false) |
static int | getSSLExDataIndex () |
static AsyncSSLSocket * | getFromSSL (const SSL *ssl) |
static int | bioWrite (BIO *b, const char *in, int inl) |
static int | bioRead (BIO *b, char *out, int outl) |
static void | clientHelloParsingCallback (int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg) |
static const char * | getSSLServerNameFromSSL (SSL *ssl) |
![]() | |
static std::shared_ptr< AsyncSocket > | newSocket (EventBase *evb) |
static std::shared_ptr< AsyncSocket > | newSocket (EventBase *evb, const folly::SocketAddress &address, uint32_t connectTimeout=0) |
static std::shared_ptr< AsyncSocket > | newSocket (EventBase *evb, const std::string &ip, uint16_t port, uint32_t connectTimeout=0) |
static std::shared_ptr< AsyncSocket > | newSocket (EventBase *evb, int fd) |
static const folly::SocketAddress & | anyAddress () |
![]() | |
static const OptionMap | emptyOptionMap |
![]() | |
enum | ReadResultEnum { READ_EOF = 0, READ_ERROR = -1, READ_BLOCKING = -2, READ_NO_ERROR = -3 } |
enum | WriteResultEnum { WRITE_ERROR = -1 } |
enum | ShutdownFlags { SHUT_WRITE_PENDING = 0x01, SHUT_WRITE = 0x02, SHUT_READ = 0x04 } |
![]() | |
~AsyncSSLSocket () override | |
void | prepareReadBuffer (void **buf, size_t *buflen) override |
void | handleRead () noexceptoverride |
void | handleWrite () noexceptoverride |
void | handleAccept () noexcept |
void | handleConnect () noexceptoverride |
void | invalidState (HandshakeCB *callback) |
bool | willBlock (int ret, int *sslErrorOut, unsigned long *errErrorOut) noexcept |
void | checkForImmediateRead () noexceptoverride |
void | handleInitialReadWrite () noexceptoverride |
WriteResult | interpretSSLError (int rc, int error) |
ReadResult | performRead (void **buf, size_t *buflen, size_t *offset) override |
WriteResult | performWrite (const iovec *vec, uint32_t count, WriteFlags flags, uint32_t *countWritten, uint32_t *partialWritten) override |
ssize_t | performWriteIovec (const iovec *vec, uint32_t count, WriteFlags flags, uint32_t *countWritten, uint32_t *partialWritten) |
virtual int | sslWriteImpl (SSL *ssl, const void *buf, int n) |
void | applyVerificationOptions (const ssl::SSLUniquePtr &ssl) |
bool | setupSSLBio () |
int | eorAwareSSLWrite (const ssl::SSLUniquePtr &ssl, const void *buf, int n, bool eor) |
void | failHandshake (const char *fn, const AsyncSocketException &ex) |
void | invokeHandshakeErr (const AsyncSocketException &ex) |
void | invokeHandshakeCB () |
void | invokeConnectErr (const AsyncSocketException &ex) override |
void | invokeConnectSuccess () override |
void | scheduleConnectTimeout () override |
void | startSSLConnect () |
![]() | |
~AsyncSocket () override | |
void | init () |
void | scheduleImmediateRead () noexcept |
void | scheduleInitialReadWrite () noexcept |
void | ioReady (uint16_t events) noexcept |
virtual size_t | handleErrMessages () noexcept |
void | timeoutExpired () noexcept |
void | writeChainImpl (WriteCallback *callback, iovec *vec, size_t count, std::unique_ptr< folly::IOBuf > &&buf, WriteFlags flags) |
void | writeImpl (WriteCallback *callback, const iovec *vec, size_t count, std::unique_ptr< folly::IOBuf > &&buf, WriteFlags flags=WriteFlags::NONE) |
AsyncSocket::WriteResult | sendSocketMessage (int fd, struct msghdr *msg, int msg_flags) |
virtual ssize_t | tfoSendMsg (int fd, struct msghdr *msg, int msg_flags) |
int | socketConnect (const struct sockaddr *addr, socklen_t len) |
void | registerForConnectEvents () |
bool | updateEventRegistration () |
bool | updateEventRegistration (uint16_t enable, uint16_t disable) |
void | doClose () |
void | startFail () |
void | finishFail () |
void | finishFail (const AsyncSocketException &ex) |
void | invokeAllErrors (const AsyncSocketException &ex) |
void | fail (const char *fn, const AsyncSocketException &ex) |
void | failConnect (const char *fn, const AsyncSocketException &ex) |
void | failRead (const char *fn, const AsyncSocketException &ex) |
void | failErrMessageRead (const char *fn, const AsyncSocketException &ex) |
void | failWrite (const char *fn, WriteCallback *callback, size_t bytesWritten, const AsyncSocketException &ex) |
void | failWrite (const char *fn, const AsyncSocketException &ex) |
void | failAllWrites (const AsyncSocketException &ex) |
void | invalidState (ConnectCallback *callback) |
void | invalidState (ErrMessageCallback *callback) |
void | invalidState (ReadCallback *callback) |
void | invalidState (WriteCallback *callback) |
std::string | withAddr (const std::string &s) |
void | cacheLocalAddress () const |
void | cachePeerAddress () const |
bool | isZeroCopyRequest (WriteFlags flags) |
bool | isZeroCopyMsg (const cmsghdr &cmsg) const |
void | processZeroCopyMsg (const cmsghdr &cmsg) |
uint32_t | getNextZeroCopyBufId () |
void | adjustZeroCopyFlags (folly::WriteFlags &flags) |
void | addZeroCopyBuf (std::unique_ptr< folly::IOBuf > &&buf) |
void | addZeroCopyBuf (folly::IOBuf *ptr) |
void | setZeroCopyBuf (std::unique_ptr< folly::IOBuf > &&buf) |
bool | containsZeroCopyBuf (folly::IOBuf *ptr) |
void | releaseZeroCopyBuf (uint32_t id) |
![]() | |
~AsyncTransport () override=default | |
![]() | |
~DelayedDestruction () override=default | |
DelayedDestruction () | |
![]() | |
DelayedDestructionBase () | |
uint32_t | getDestructorGuardCount () const |
![]() | |
virtual | ~AsyncReader ()=default |
![]() | |
virtual | ~AsyncWriter ()=default |
![]() | |
static void | sslInfoCallback (const SSL *ssl, int type, int val) |
static int | sslVerifyCallback (int preverifyOk, X509_STORE_CTX *ctx) |
![]() | |
bool | corkCurrentWrite_ {false} |
bool | server_ {false} |
bool | handshakeComplete_ {false} |
bool | renegotiateAttempted_ {false} |
SSLStateEnum | sslState_ {STATE_UNINIT} |
std::shared_ptr< folly::SSLContext > | ctx_ |
HandshakeCB * | handshakeCallback_ {nullptr} |
ssl::SSLUniquePtr | ssl_ |
SSL_SESSION * | sslSession_ {nullptr} |
Timeout | handshakeTimeout_ |
Timeout | connectionTimeout_ |
size_t | appEorByteNo_ {0} |
size_t | minWriteSize_ {1500} |
size_t | minEorRawByteNo_ {0} |
std::string | sessionKey_ |
folly::SSLContext::SSLVerifyPeerEnum | verifyPeer_ |
bool | parseClientHello_ {false} |
bool | cacheAddrOnFailure_ {false} |
bool | bufferMovableEnabled_ {false} |
bool | certCacheHit_ {false} |
std::unique_ptr< ssl::ClientHelloInfo > | clientHelloInfo_ |
std::vector< std::pair< char, StringPiece > > | alertsReceived_ |
std::chrono::steady_clock::time_point | handshakeStartTime_ |
std::chrono::steady_clock::time_point | handshakeEndTime_ |
std::chrono::milliseconds | handshakeConnectTimeout_ {0} |
std::chrono::milliseconds | totalConnectTimeout_ {0} |
std::string | sslVerificationAlert_ |
bool | sessionResumptionAttempted_ {false} |
bool | sessionIDResumed_ {false} |
std::unique_ptr< ReadCallback > | asyncOperationFinishCallback_ |
![]() | |
uint32_t | zeroCopyBufId_ {0} |
std::unordered_map< uint32_t, folly::IOBuf * > | idZeroCopyBufPtrMap_ |
std::unordered_map< folly::IOBuf *, IOBufInfo > | idZeroCopyBufInfoMap_ |
StateEnum | state_ |
StateEnum describing current state. More... | |
uint8_t | shutdownFlags_ |
Shutdown state (ShutdownFlags) More... | |
uint16_t | eventFlags_ |
EventBase::HandlerFlags settings. More... | |
int | fd_ |
The socket file descriptor. More... | |
folly::SocketAddress | addr_ |
The address we tried to connect to. More... | |
folly::SocketAddress | localAddr_ |
The address we are connecting from. More... | |
uint32_t | sendTimeout_ |
The send timeout, in milliseconds. More... | |
uint16_t | maxReadsPerEvent_ |
Max reads per event loop iteration. More... | |
bool | isBufferMovable_ {false} |
int8_t | readErr_ {READ_NO_ERROR} |
The read error encountered, if any. More... | |
EventBase * | eventBase_ |
The EventBase. More... | |
WriteTimeout | writeTimeout_ |
A timeout for connect and write. More... | |
IoHandler | ioHandler_ |
A EventHandler to monitor the fd. More... | |
ImmediateReadCB | immediateReadHandler_ |
LoopCallback for checking read. More... | |
ConnectCallback * | connectCallback_ |
ConnectCallback. More... | |
ErrMessageCallback * | errMessageCallback_ |
TimestampCallback. More... | |
SendMsgParamsCallback * | sendMsgParamCallback_ |
< Callback for retrieving More... | |
ReadCallback * | readCallback_ |
ReadCallback. More... | |
WriteRequest * | writeReqHead_ |
Chain of WriteRequests. More... | |
WriteRequest * | writeReqTail_ |
End of WriteRequest chain. More... | |
std::weak_ptr< ShutdownSocketSet > | wShutdownSocketSet_ |
size_t | appBytesReceived_ |
Num of bytes received from socket. More... | |
size_t | appBytesWritten_ |
Num of bytes written to socket. More... | |
std::unique_ptr< IOBuf > | preReceivedData_ |
std::chrono::steady_clock::time_point | connectStartTime_ |
std::chrono::steady_clock::time_point | connectEndTime_ |
std::chrono::milliseconds | connectTimeout_ {0} |
std::unique_ptr< EvbChangeCallback > | evbChangeCb_ {nullptr} |
BufferCallback * | bufferCallback_ {nullptr} |
bool | tfoEnabled_ {false} |
bool | tfoAttempted_ {false} |
bool | tfoFinished_ {false} |
bool | noTransparentTls_ {false} |
bool | noTSocks_ {false} |
bool | trackEor_ {false} |
bool | zeroCopyEnabled_ {false} |
bool | zeroCopyVal_ {false} |
size_t | zeroCopyReenableThreshold_ {0} |
size_t | zeroCopyReenableCounter_ {0} |
std::unique_ptr< const AsyncTransportCertificate > | peerCertData_ |
std::unique_ptr< const AsyncTransportCertificate > | selfCertData_ |
Definition at line 24 of file MockAsyncSSLSocket.h.
|
inline |
Definition at line 26 of file MockAsyncSSLSocket.h.
References MOCK_METHOD5().
|
inlineoverridevirtualnoexcept |
Connect to the given address, invoking callback when complete or on error
Note timeout applies to TCP + SSL connection time
Reimplemented from folly::AsyncSSLSocket.
Definition at line 41 of file MockAsyncSSLSocket.h.
References folly::AsyncSSLSocket::closeNow(), folly::AsyncTransport::getLocalAddress(), folly::AsyncTransport::getPeerAddress(), folly::AsyncSSLSocket::getSelectedNextProtocol(), folly::AsyncSSLSocket::getSelectedNextProtocolNoThrow(), folly::AsyncSSLSocket::good(), folly::AsyncSocket::hangup(), MOCK_CONST_METHOD0(), MOCK_CONST_METHOD1(), MOCK_CONST_METHOD2(), MOCK_METHOD0(), MOCK_METHOD1(), folly::AsyncSocket::readable(), folly::AsyncSSLSocket::setReadCB(), and folly::detail::timeout.
folly::test::MockAsyncSSLSocket::MOCK_CONST_METHOD0 | ( | readable | , |
bool() | |||
) |
folly::test::MockAsyncSSLSocket::MOCK_CONST_METHOD0 | ( | hangup | , |
bool() | |||
) |
folly::test::MockAsyncSSLSocket::MOCK_CONST_METHOD1 | ( | getLocalAddress | , |
void(folly::SocketAddress *) | |||
) |
Referenced by connect().
folly::test::MockAsyncSSLSocket::MOCK_CONST_METHOD1 | ( | getPeerAddress | , |
void(folly::SocketAddress *) | |||
) |
folly::test::MockAsyncSSLSocket::MOCK_CONST_METHOD2 | ( | getSelectedNextProtocol | , |
void(const unsigned char **, unsigned *) | |||
) |
Referenced by connect().
folly::test::MockAsyncSSLSocket::MOCK_CONST_METHOD2 | ( | getSelectedNextProtocolNoThrow | , |
bool(const unsigned char **, unsigned *) | |||
) |
folly::test::MockAsyncSSLSocket::MOCK_METHOD1 | ( | setReadCB | , |
void(ReadCallback *) | |||
) |
Referenced by connect().
folly::test::MockAsyncSSLSocket::MOCK_METHOD3 | ( | sslConnectMockable | , |
void(AsyncSSLSocket::HandshakeCB *, std::chrono::milliseconds, const SSLContext::SSLVerifyPeerEnum &) | |||
) |
Referenced by sslAccept().
folly::test::MockAsyncSSLSocket::MOCK_METHOD3 | ( | sslAcceptMockable | , |
void(AsyncSSLSocket::HandshakeCB *, std::chrono::milliseconds, const SSLContext::SSLVerifyPeerEnum &) | |||
) |
folly::test::MockAsyncSSLSocket::MOCK_METHOD5 | ( | connect_ | , |
void(AsyncSocket::ConnectCallback *, const folly::SocketAddress &, int, const OptionMap &, const folly::SocketAddress &) | |||
) |
Referenced by MockAsyncSSLSocket().
|
inlineoverridevirtual |
Accept an SSL connection on the socket.
The callback will be invoked and uninstalled when an SSL connection has been established on the underlying socket. The value of verifyPeer determines the client verification method. By default, its set to use the value in the underlying context
callback | callback object to invoke on success/failure |
timeout | timeout for this function in milliseconds, or 0 for no timeout |
verifyPeer | SSLVerifyPeerEnum uses the options specified in the context by default, can be set explcitly to override the method in the context |
Reimplemented from folly::AsyncSSLSocket.
Definition at line 79 of file MockAsyncSSLSocket.h.
References folly::AsyncSocket::ESTABLISHED, folly::AsyncSSLSocket::handshakeCallback_, folly::AsyncSSLSocket::handshakeTimeout_, MOCK_METHOD3(), folly::AsyncSSLSocket::Timeout::scheduleTimeout(), folly::AsyncSSLSocket::sslState_, folly::AsyncSocket::state_, and folly::AsyncSSLSocket::STATE_ACCEPTING.
|
inlineoverridevirtual |
Initiate an SSL connection on the socket The callback will be invoked and uninstalled when an SSL connection has been establshed on the underlying socket. The verification option verifyPeer is applied if it's passed explicitly. If it's not, the options in SSLContext set on the underlying SSLContext are applied.
callback | callback object to invoke on success/failure |
timeout | timeout for this function in milliseconds, or 0 for no timeout |
verifyPeer | SSLVerifyPeerEnum uses the options specified in the context by default, can be set explcitly to override the method in the context. If verification is turned on sets SSL_VERIFY_PEER and invokes HandshakeCB::handshakeVer(). |
Reimplemented from folly::AsyncSSLSocket.
Definition at line 64 of file MockAsyncSSLSocket.h.
References folly::AsyncSocket::ESTABLISHED, folly::AsyncSSLSocket::handshakeCallback_, folly::AsyncSSLSocket::handshakeTimeout_, folly::AsyncSSLSocket::Timeout::scheduleTimeout(), folly::AsyncSSLSocket::sslState_, folly::AsyncSocket::state_, and folly::AsyncSSLSocket::STATE_CONNECTING.