proxygen
|
Namespaces | |
client | |
detail | |
test | |
Enumerations | |
enum | SecureTransportType { SecureTransportType::NONE, SecureTransportType::TLS, SecureTransportType::ZERO } |
enum | CertCrypto { CertCrypto::BEST_AVAILABLE, CertCrypto::SHA1_SIGNATURE } |
enum | HandlerDir { HandlerDir::IN, HandlerDir::OUT, HandlerDir::BOTH } |
enum | ConnEvent { ConnEvent::CONN_ADDED, ConnEvent::CONN_REMOVED } |
enum | SSLResumeEnum : uint8_t { SSLResumeEnum::HANDSHAKE = 0, SSLResumeEnum::RESUME_SESSION_ID = 1, SSLResumeEnum::RESUME_TICKET = 3, SSLResumeEnum::NA = 2 } |
enum | SSLErrorEnum { SSLErrorEnum::NO_ERROR, SSLErrorEnum::TIMEOUT, SSLErrorEnum::DROPPED } |
Functions | |
std::ostream & | operator<< (std::ostream &os, const ManagedConnection &conn) |
std::string | getSecureTransportName (const SecureTransportType &type) |
AsyncSocket::OptionMap | filterIPSocketOptions (const AsyncSocket::OptionMap &allOptions, const int addrFamily) |
TEST_F (AcceptorTest, TestCanAcceptWithNoConnectionCounter) | |
TEST_F (AcceptorTest, TestCanAcceptWithMaxConnectionsZero) | |
TEST_F (AcceptorTest, TestCanAcceptWithCurrentConnsLessThanMax) | |
TEST_F (AcceptorTest, TestCanAcceptWithCurrentConnsGreaterThanMax) | |
TEST_F (AcceptorTest, TestCanAcceptWhiteListedAddress) | |
TEST_F (AcceptorTest, TestCanAcceptWithNoLoadShed) | |
TEST_F (AcceptorTest, TestCanAcceptWithMaxActiveConnectionsNotSet) | |
TEST_F (AcceptorTest, TestCanAcceptWithActiveConnectionsBreachingThreshold) | |
TEST_F (AcceptorTest, TestCanAcceptWithTotalConnectionsBreachingThreshold) | |
TEST_F (AcceptorTest, TestCanAcceptWithBothConnectionCountsBreachingThresholds) | |
std::string | getPersistentCacheFilename () |
template<typename K , typename V , typename MutexT = std::mutex> | |
void | testSimplePutGet (const std::vector< K > &keys, const std::vector< V > &values) |
bool | setSessionServiceIdentity (SSL_SESSION *session, const std::string &str) |
folly::Optional< std::string > | getSessionServiceIdentity (SSL_SESSION *session) |
folly::Optional< SSLSessionCacheData > | getCacheDataForSession (SSL_SESSION *sess) |
SSL_SESSION * | getSessionFromCacheData (const SSLSessionCacheData &data) |
SSL_SESSION * | cloneSSLSession (SSL_SESSION *toClone) |
TEST_F (SSLSessionPersistentCacheTest, Basic) | |
TEST_F (SSLSessionPersistentCacheTest, BadSession) | |
TEST_F (SSLSessionPersistentCacheTest, Overwrite) | |
TEST_F (SSLSessionPersistentCacheTest, SessionTicketTimeout) | |
std::vector< std::pair< SSL_SESSION *, size_t > > | getSessions () |
std::pair< SSL_SESSION *, size_t > | getSessionWithTicket () |
SSLSessionPtr | createPersistentTestSession (std::pair< SSL_SESSION *, size_t > session) |
std::string | getSessionData (SSL_SESSION *s, size_t expectedLength) |
bool | isSameSession (std::pair< SSL_SESSION *, size_t > lhs, std::pair< SSL_SESSION *, size_t > rhs) |
TEST (Wangle, ClientServerTest) | |
TEST (Wangle, FilterTest) | |
TEST (Wangle, ComplexFilterTest) | |
TEST (Wangle, SuperComplexFilterTest) | |
TEST (Wangle, ServiceFactoryFilter) | |
TEST (Wangle, FactoryToService) | |
TEST (ServiceFilter, ExpiringMax) | |
TEST (ServiceFilter, ExpiringIdle) | |
TEST (ServiceFilter, NoIdleDuringRequests) | |
TEST (SSLContextManagerTest, Test1) | |
TEST (SSLContextManagerTest, DISABLED_TestSessionContextIfSupplied) | |
TEST (SSLContextManagerTest, DISABLED_TestSessionContextIfSessionCacheAbsent) | |
Variables | |
static const std::string | empty_string |
static const std::string | empty_string |
const size_t | kNumSessions = 3 |
const size_t | kSessionDataLen = 1060 |
const unsigned char | kSessionData [kNumSessions][kSessionDataLen] |
const unsigned char | kSessionDataWithTicket [] |
SSLContextConfig helps to describe the configs/options for a SSL_CTX. For example:
SSLContextManager helps to create and manage all SSL_CTX, SSLSessionCacheManager and TLSTicketManager for a listening VIP:PORT. (Note, in SNI, a listening VIP:PORT can have >1 SSL_CTX(s)).
Other responsibilities:
Usage:
Note: Each Acceptor, with SSL support, should have one SSLContextManager to manage all SSL_CTX for the VIP:PORT.
Definition at line 278 of file Pipeline.h.
typedef boost::variant<folly::IOBuf*, folly::AsyncTransportWrapper*, ConnInfo&, ConnEvent, std::tuple<folly::IOBuf*, std::shared_ptr<folly::AsyncUDPSocket>, folly::SocketAddress> > wangle::AcceptPipelineType |
Definition at line 277 of file Pipeline.h.
typedef std::pair<folly::AsyncSSLSocket *, std::unique_ptr<folly::DelayedDestruction::DestructorGuard> > wangle::AttachedLookup |
Definition at line 85 of file SSLSessionCacheManager.h.
typedef HandlerAdapter<folly::IOBufQueue&, std::unique_ptr<folly::IOBuf> > wangle::BytesToBytesHandler |
typedef ByteToMessageDecoder<std::unique_ptr<folly::IOBuf> > wangle::ByteToByteDecoder |
Definition at line 82 of file ByteToMessageDecoder.h.
using wangle::CacheDataVersion = typedef uint64_t |
A counter that represents a "version" of the data. This is used to determine if two components have been synced to the same version. A valid version is 1 or higher. A version of 0 implies no version.
Definition at line 40 of file PersistentCacheCommon.h.
using wangle::DefaultPipeline = typedef Pipeline<folly::IOBufQueue&, std::unique_ptr<folly::IOBuf>> |
Definition at line 241 of file Pipeline.h.
typedef std::basic_string<char, dn_char_traits> wangle::DNString |
Definition at line 70 of file SSLContextSelectionMisc.h.
typedef InboundHandler<folly::IOBufQueue&, std::unique_ptr<folly::IOBuf> > wangle::InboundBytesToBytesHandler |
using wangle::MockHandlerAdapter = typedef MockHandler<R, R, W, W> |
Definition at line 71 of file MockHandler.h.
using wangle::ObservablePtr = typedef std::shared_ptr<Observable<T>> |
using wangle::ObserverPtr = typedef std::shared_ptr<Observer<T>> |
using wangle::ObservingPipeline = typedef Pipeline<folly::IOBufQueue&, T> |
Definition at line 71 of file ObservingHandler.h.
typedef OutboundHandler<std::unique_ptr<folly::IOBuf> > wangle::OutboundBytesToBytesHandler |
using wangle::PeekingCallbackPtr = typedef PeekingAcceptorHandshakeHelper::PeekCallback* |
Definition at line 138 of file PeekingAcceptorHandshakeHelper.h.
Definition at line 105 of file SSLSessionCacheManager.h.
typedef std::shared_ptr<folly::Executor> wangle::SchedulerPtr |
typedef Pipeline<IOBufQueue&, std::string> wangle::ServicePipeline |
Definition at line 32 of file ServiceTest.cpp.
typedef folly::EvictingCacheMap<std::string, SSL_SESSION*> wangle::SSLSessionCacheMap |
Basic SSL session cache map: Maps session id -> session
Definition at line 28 of file SSLSessionCacheManager.h.
using wangle::SSLSessionEstablishedCallbackUniquePtr = typedef std::unique_ptr<SSLSessionEstablishedCallback> |
Definition at line 36 of file BaseClientBootstrap.h.
typedef std::unique_ptr<SSL_SESSION, SessionDestructor> wangle::SSLSessionPtr |
Definition at line 32 of file SSLSession.h.
using wangle::SubjectPtr = typedef std::shared_ptr<Subject<T>> |
|
strong |
Enumerator | |
---|---|
BEST_AVAILABLE | |
SHA1_SIGNATURE |
Definition at line 24 of file SSLContextSelectionMisc.h.
|
strong |
|
strong |
|
strong |
An enum representing different kinds of secure transports we can negotiate.
Enumerator | |
---|---|
NONE | |
TLS | |
ZERO |
Definition at line 26 of file SecureTransportType.h.
|
strong |
|
strong |
SSL_SESSION * wangle::cloneSSLSession | ( | SSL_SESSION * | toClone | ) |
Definition at line 131 of file SSLSessionCacheUtils.cpp.
References getSessionServiceIdentity(), folly::gen::move, and setSessionServiceIdentity().
Referenced by TEST_F().
SSLSessionPtr wangle::createPersistentTestSession | ( | std::pair< SSL_SESSION *, size_t > | session | ) |
Definition at line 350 of file TestUtil.cpp.
Referenced by TEST_F(), and TEST_F().
folly::AsyncSocket::OptionMap wangle::filterIPSocketOptions | ( | const folly::AsyncSocket::OptionMap & | allOptions, |
const int | addrFamily | ||
) |
Returns a copy of the socket options excluding options with the given level.
Definition at line 24 of file SocketOptions.cpp.
References folly::FATAL.
Referenced by wangle::ServerSocketConfig::setSocketOptions().
folly::Optional< SSLSessionCacheData > wangle::getCacheDataForSession | ( | SSL_SESSION * | sess | ) |
Definition at line 99 of file SSLSessionCacheUtils.cpp.
References getSessionServiceIdentity(), and folly::gen::move.
Referenced by wangle::SSLSessionPersistentCacheBase< K >::setSSLSession(), and TEST_F().
std::string wangle::getPersistentCacheFilename | ( | ) |
Definition at line 22 of file TestUtil.cpp.
References folly::test::TemporaryFile::path().
Referenced by testEmptyFile(), testInvalidFile(), testSimplePutGet(), testValidFile(), and TYPED_TEST().
std::string wangle::getSecureTransportName | ( | const SecureTransportType & | type | ) |
Definition at line 20 of file SecureTransportType.cpp.
std::string wangle::getSessionData | ( | SSL_SESSION * | s, |
size_t | expectedLength | ||
) |
SSL_SESSION * wangle::getSessionFromCacheData | ( | const SSLSessionCacheData & | data | ) |
Definition at line 117 of file SSLSessionCacheUtils.cpp.
References wangle::SSLSessionCacheData::serviceIdentity, wangle::SSLSessionCacheData::sessionData, wangle::SSLSessionCacheData::sessionDuplicateTemplate, setSessionServiceIdentity(), and folly::basic_fbstring< E, T, A, Storage >::toStdString().
Referenced by wangle::SSLSessionPersistentCacheBase< K >::getSSLSession(), and TEST_F().
std::vector< std::pair< SSL_SESSION *, size_t > > wangle::getSessions | ( | ) |
Definition at line 320 of file TestUtil.cpp.
References i, isSameSession(), kNumSessions, and s.
Referenced by SSLSessionCacheDataTest::SetUp(), wangle::SSLSessionPersistentCacheTest::SetUp(), and ThreadSafeSSLSessionCacheTest::SetUp().
folly::Optional< std::string > wangle::getSessionServiceIdentity | ( | SSL_SESSION * | session | ) |
Definition at line 88 of file SSLSessionCacheUtils.cpp.
Referenced by cloneSSLSession(), getCacheDataForSession(), wangle::SSLSessionCallbacks::removeSessionCallback(), and TEST_F().
std::pair< SSL_SESSION *, size_t > wangle::getSessionWithTicket | ( | ) |
Definition at line 340 of file TestUtil.cpp.
References isSameSession(), kSessionDataWithTicket, and s.
Referenced by wangle::SSLSessionPersistentCacheTest::SetUp().
bool wangle::isSameSession | ( | std::pair< SSL_SESSION *, size_t > | lhs, |
std::pair< SSL_SESSION *, size_t > | rhs | ||
) |
Definition at line 368 of file TestUtil.cpp.
References getSessionData().
Referenced by getSessions(), getSessionWithTicket(), and wangle::SSLSessionPersistentCacheTest::verifyEntryInCache().
std::ostream & wangle::operator<< | ( | std::ostream & | os, |
const ManagedConnection & | conn | ||
) |
Definition at line 59 of file ManagedConnection.cpp.
References wangle::ManagedConnection::describe().
bool wangle::setSessionServiceIdentity | ( | SSL_SESSION * | session, |
const std::string & | str | ||
) |
Definition at line 78 of file SSLSessionCacheUtils.cpp.
References string.
Referenced by cloneSSLSession(), getSessionFromCacheData(), wangle::SSLSessionCallbacks::newSessionCallback(), and TEST_F().
wangle::TEST | ( | SSLContextManagerTest | , |
Test1 | |||
) |
Definition at line 35 of file SSLContextManagerTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, wangle::SSLContextManager::getSSLCtxByExactDomain(), wangle::SSLContextManager::getSSLCtxBySuffix(), wangle::SSLContextManager::insertSSLCtxByDomainName(), and folly::EventBase::loop().
wangle::TEST | ( | Wangle | , |
ClientServerTest | |||
) |
Definition at line 114 of file ServiceTest.cpp.
References addr, wangle::ServerBootstrap< Pipeline >::bind(), wangle::ServerBootstrap< Pipeline >::childPipeline(), EXPECT_EQ, folly::EventBaseManager::get(), folly::EventBaseManager::getEventBase(), folly::getEventBase(), wangle::ServerBootstrap< Pipeline >::getSockets(), folly::EventBase::loopForever(), folly::gen::move, wangle::ServerBootstrap< Pipeline >::stop(), string, folly::EventBase::terminateLoopSoon(), and value.
wangle::TEST | ( | SSLContextManagerTest | , |
DISABLED_TestSessionContextIfSupplied | |||
) |
Definition at line 129 of file SSLContextManagerTest.cpp.
References wangle::SSLContextConfig::addCertificate(), addr, wangle::SSLContextManager::addSSLContextConfig(), ASSERT_NE, EXPECT_EQ, wangle::SSLContextManager::getSSLCtx(), folly::EventBase::loop(), wangle::SSLContextConfig::sessionContext, and string.
wangle::TEST | ( | SSLContextManagerTest | , |
DISABLED_TestSessionContextIfSessionCacheAbsent | |||
) |
Definition at line 160 of file SSLContextManagerTest.cpp.
References wangle::SSLContextConfig::addCertificate(), addr, wangle::SSLContextManager::addSSLContextConfig(), ASSERT_NE, EXPECT_EQ, wangle::SSLContextManager::getSSLCtx(), folly::EventBase::loop(), wangle::SSLContextConfig::sessionCacheEnabled, wangle::SSLContextConfig::sessionContext, and string.
wangle::TEST | ( | Wangle | , |
FilterTest | |||
) |
Definition at line 165 of file ServiceTest.cpp.
References EXPECT_EQ, and folly::pushmi::operators::filter.
wangle::TEST | ( | Wangle | , |
ComplexFilterTest | |||
) |
Definition at line 172 of file ServiceTest.cpp.
References EXPECT_EQ, and folly::pushmi::operators::filter.
wangle::TEST | ( | Wangle | , |
SuperComplexFilterTest | |||
) |
Definition at line 193 of file ServiceTest.cpp.
References EXPECT_EQ, and folly::pushmi::operators::filter.
wangle::TEST | ( | Wangle | , |
ServiceFactoryFilter | |||
) |
Definition at line 216 of file ServiceTest.cpp.
References addr, wangle::ServerBootstrap< Pipeline >::bind(), wangle::ServerBootstrap< Pipeline >::childPipeline(), EXPECT_EQ, folly::EventBaseManager::get(), folly::getEventBase(), wangle::ServerBootstrap< Pipeline >::getSockets(), wangle::ServerBootstrap< Pipeline >::stop(), and value.
wangle::TEST | ( | Wangle | , |
FactoryToService | |||
) |
Definition at line 248 of file ServiceTest.cpp.
References EXPECT_EQ, and value.
wangle::TEST | ( | ServiceFilter | , |
ExpiringMax | |||
) |
Definition at line 276 of file ServiceTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, and wangle::TimekeeperTester::promises_.
wangle::TEST | ( | ServiceFilter | , |
ExpiringIdle | |||
) |
Definition at line 295 of file ServiceTest.cpp.
References EXPECT_EQ, and wangle::TimekeeperTester::promises_.
wangle::TEST | ( | ServiceFilter | , |
NoIdleDuringRequests | |||
) |
Definition at line 312 of file ServiceTest.cpp.
References EXPECT_EQ, f, folly::gen::move, and wangle::TimekeeperTester::promises_.
wangle::TEST_F | ( | AcceptorTest | , |
TestCanAcceptWithNoConnectionCounter | |||
) |
wangle::TEST_F | ( | AcceptorTest | , |
TestCanAcceptWithMaxConnectionsZero | |||
) |
wangle::TEST_F | ( | AcceptorTest | , |
TestCanAcceptWithCurrentConnsLessThanMax | |||
) |
wangle::TEST_F | ( | AcceptorTest | , |
TestCanAcceptWithCurrentConnsGreaterThanMax | |||
) |
wangle::TEST_F | ( | SSLSessionPersistentCacheTest | , |
Basic | |||
) |
Definition at line 103 of file SSLSessionPersistentCacheTest.cpp.
References ASSERT_EQ, ASSERT_FALSE, createPersistentTestSession(), i, and folly::sformat().
wangle::TEST_F | ( | AcceptorTest | , |
TestCanAcceptWhiteListedAddress | |||
) |
wangle::TEST_F | ( | AcceptorTest | , |
TestCanAcceptWithNoLoadShed | |||
) |
wangle::TEST_F | ( | SSLSessionPersistentCacheTest | , |
BadSession | |||
) |
Definition at line 128 of file SSLSessionPersistentCacheTest.cpp.
References ASSERT_EQ, ASSERT_FALSE, createPersistentTestSession(), and string.
wangle::TEST_F | ( | AcceptorTest | , |
TestCanAcceptWithMaxActiveConnectionsNotSet | |||
) |
wangle::TEST_F | ( | AcceptorTest | , |
TestCanAcceptWithActiveConnectionsBreachingThreshold | |||
) |
wangle::TEST_F | ( | SSLSessionPersistentCacheTest | , |
Overwrite | |||
) |
Definition at line 148 of file SSLSessionPersistentCacheTest.cpp.
References createPersistentTestSession().
wangle::TEST_F | ( | AcceptorTest | , |
TestCanAcceptWithTotalConnectionsBreachingThreshold | |||
) |
wangle::TEST_F | ( | AcceptorTest | , |
TestCanAcceptWithBothConnectionCountsBreachingThresholds | |||
) |
wangle::TEST_F | ( | SSLSessionPersistentCacheTest | , |
SessionTicketTimeout | |||
) |
Definition at line 168 of file SSLSessionPersistentCacheTest.cpp.
References ASSERT_FALSE, ASSERT_NE, ASSERT_TRUE, createPersistentTestSession(), s, folly::portability::ssl::SSL_SESSION_get_ticket_lifetime_hint(), folly::portability::ssl::SSL_SESSION_has_ticket(), and string.
void wangle::testSimplePutGet | ( | const std::vector< K > & | keys, |
const std::vector< V > & | values | ||
) |
Definition at line 32 of file TestUtil.h.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, getPersistentCacheFilename(), and string.
|
static |
Definition at line 24 of file SSLAcceptorHandshakeHelper.cpp.
|
static |
Definition at line 51 of file Acceptor.cpp.
Referenced by wangle::SSLAcceptorHandshakeHelper::handshakeSuc().
const size_t wangle::kNumSessions = 3 |
Definition at line 20 of file TestUtil.cpp.
Referenced by getSessions().
const unsigned char wangle::kSessionData[kNumSessions][kSessionDataLen] |
Definition at line 24 of file TestUtil.cpp.
const size_t wangle::kSessionDataLen = 1060 |
Definition at line 21 of file TestUtil.cpp.
const unsigned char wangle::kSessionDataWithTicket[] |
Definition at line 218 of file TestUtil.cpp.
Referenced by getSessionWithTicket().