proxygen
|
#include <AsyncSSLSocketTest.h>
Public Member Functions | |
SSLHandshakeBase (AsyncSSLSocket::UniquePtr socket, bool preverifyResult, bool verifyResult) | |
AsyncSSLSocket::UniquePtr | moveSocket ()&& |
Public Member Functions inherited from folly::AsyncSSLSocket::HandshakeCB | |
virtual | ~HandshakeCB ()=default |
Public Attributes | |
bool | handshakeVerify_ |
bool | handshakeSuccess_ |
bool | handshakeError_ |
std::chrono::nanoseconds | handshakeTime |
Protected Member Functions | |
bool | handshakeVer (AsyncSSLSocket *, bool preverifyOk, X509_STORE_CTX *) noexceptoverride |
void | handshakeSuc (AsyncSSLSocket *) noexceptoverride |
void | handshakeErr (AsyncSSLSocket *, const AsyncSocketException &ex) noexceptoverride |
void | writeSuccess () noexceptoverride |
void | writeErr (size_t bytesWritten, const AsyncSocketException &ex) noexceptoverride |
Protected Attributes | |
AsyncSSLSocket::UniquePtr | socket_ |
bool | preverifyResult_ |
bool | verifyResult_ |
Additional Inherited Members | |
Private Member Functions inherited from folly::AsyncWriter::WriteCallback | |
virtual | ~WriteCallback ()=default |
Definition at line 1270 of file AsyncSSLSocketTest.h.
|
inlineexplicit |
Definition at line 1273 of file AsyncSSLSocketTest.h.
|
inlineoverrideprotectedvirtualnoexcept |
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 1317 of file AsyncSSLSocketTest.h.
References folly::INFO.
|
inlineoverrideprotectedvirtualnoexcept |
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.
Reimplemented in folly::SSLHandshakeServerParseClientHello.
Definition at line 1309 of file AsyncSSLSocketTest.h.
References folly::INFO.
|
inlineoverrideprotectedvirtualnoexcept |
handshakeVer() is invoked during handshaking to give the application chance to validate it's peer's certificate.
Note that OpenSSL performs only rudimentary internal consistency verification checks by itself. Any other validation like whether or not the certificate was issued by a trusted CA. The default implementation of this callback mimics what what OpenSSL does internally if SSL_VERIFY_PEER is set with no verification callback.
See the passages on verify_callback in SSL_CTX_set_verify(3) for more details.
Reimplemented from folly::AsyncSSLSocket::HandshakeCB.
Definition at line 1299 of file AsyncSSLSocketTest.h.
References EXPECT_EQ.
|
inline |
Definition at line 1284 of file AsyncSSLSocketTest.h.
References folly::gen::move, and folly::SendMsgParamsCallbackBase::socket_.
|
inlineoverrideprotectedvirtualnoexcept |
writeError() will be invoked if an error occurs writing the data.
bytesWritten | The number of bytes that were successfull |
ex | An exception describing the error that occurred. |
Implements folly::AsyncWriter::WriteCallback.
Definition at line 1334 of file AsyncSSLSocketTest.h.
References ADD_FAILURE.
|
inlineoverrideprotectedvirtualnoexcept |
writeSuccess() will be invoked when all of the data has been successfully written.
Note that this mainly signals that the buffer containing the data to write is no longer needed and may be freed or re-used. It does not guarantee that the data has been fully transmitted to the remote endpoint. For example, on socket-based transports, writeSuccess() only indicates that the data has been given to the kernel for eventual transmission.
Implements folly::AsyncWriter::WriteCallback.
Definition at line 1328 of file AsyncSSLSocketTest.h.
bool folly::SSLHandshakeBase::handshakeError_ |
Definition at line 1290 of file AsyncSSLSocketTest.h.
Referenced by folly::TEST().
bool folly::SSLHandshakeBase::handshakeSuccess_ |
Definition at line 1289 of file AsyncSSLSocketTest.h.
Referenced by folly::TEST(), and folly::TEST_F().
std::chrono::nanoseconds folly::SSLHandshakeBase::handshakeTime |
Definition at line 1291 of file AsyncSSLSocketTest.h.
Referenced by folly::TEST().
bool folly::SSLHandshakeBase::handshakeVerify_ |
Definition at line 1288 of file AsyncSSLSocketTest.h.
Referenced by folly::TEST().
|
protected |
Definition at line 1295 of file AsyncSSLSocketTest.h.
|
protected |
Definition at line 1294 of file AsyncSSLSocketTest.h.
|
protected |
Definition at line 1296 of file AsyncSSLSocketTest.h.