proxygen
ClientProtocol.cpp File Reference

Go to the source code of this file.

Namespaces

 fizz
 
 fizz::sm
 
 fizz::client
 
 fizz::client::detail
 

Functions

 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::Uninitialized, Event::Connect, StateEnum::ExpectingServerHello)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingServerHello, Event::HelloRetryRequest, StateEnum::ExpectingServerHello)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingServerHello, Event::ServerHello, StateEnum::ExpectingEncryptedExtensions)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingServerHello, Event::EarlyAppWrite, StateEnum::Error)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingEncryptedExtensions, Event::EncryptedExtensions, StateEnum::ExpectingCertificate, StateEnum::ExpectingFinished)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingEncryptedExtensions, Event::EarlyAppWrite, StateEnum::Error)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingCertificate, Event::CertificateRequest, StateEnum::ExpectingCertificate)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingCertificate, Event::Certificate, StateEnum::ExpectingCertificateVerify)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingCertificate, Event::CompressedCertificate, StateEnum::ExpectingCertificateVerify)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingCertificate, Event::EarlyAppWrite, StateEnum::Error)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingCertificateVerify, Event::CertificateVerify, StateEnum::ExpectingFinished)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingCertificateVerify, Event::EarlyAppWrite, StateEnum::Error)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingFinished, Event::Finished, StateEnum::Established)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::ExpectingFinished, Event::EarlyAppWrite, StateEnum::Error)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::Established, Event::EarlyAppWrite, StateEnum::Error)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::Established, Event::NewSessionTicket, StateEnum::Error)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::Established, Event::AppData, StateEnum::Error)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::Established, Event::AppWrite, StateEnum::Error)
 
 fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ClientTypes, StateEnum::Established, Event::KeyUpdate, StateEnum::Error)
 
Actions fizz::client::detail::processEvent (const State &state, Param param)
 
Actions fizz::client::detail::handleError (const State &state, ReportError error, Optional< AlertDescription > alertDesc)
 
Actions fizz::client::detail::handleAppClose (const State &state)
 
Actions fizz::client::detail::handleInvalidEvent (const State &state, Event event, Param param)
 
static folly::Optional< CachedPskfizz::sm::validatePsk (const FizzClientContext &context, folly::Optional< CachedPsk > psk)
 
static std::map< NamedGroup, std::unique_ptr< KeyExchange > > fizz::sm::getKeyExchangers (const Factory &factory, const std::vector< NamedGroup > &groups)
 
static ClientHello fizz::sm::getClientHello (const Factory &, const Random &random, const std::vector< CipherSuite > &supportedCiphers, const std::vector< ProtocolVersion > &supportedVersions, const std::vector< NamedGroup > &supportedGroups, const std::map< NamedGroup, std::unique_ptr< KeyExchange >> &shares, const std::vector< SignatureScheme > &supportedSigSchemes, const std::vector< PskKeyExchangeMode > &supportedPskModes, const folly::Optional< std::string > &hostname, const std::vector< std::string > &supportedAlpns, const std::vector< CertificateCompressionAlgorithm > &compressionAlgos, const Optional< EarlyDataParams > &earlyDataParams, const Buf &legacySessionId, ClientExtensions *extensions, Buf cookie=nullptr)
 
static ClientPresharedKey fizz::sm::getPskExtension (const CachedPsk &psk)
 
static Buf fizz::sm::encodeAndAddBinders (ClientHello chlo, const CachedPsk &psk, KeyScheduler &scheduler, HandshakeContext &handshakeContext)
 
static Optional< EarlyDataParamsfizz::sm::getEarlyDataParams (const FizzClientContext &context, const Optional< CachedPsk > &psk)
 
template<typename ServerMessage >
static std::pair< ProtocolVersion, CipherSuite > fizz::sm::getAndValidateVersionAndCipher (const ServerMessage &msg, const std::vector< ProtocolVersion > &supportedVersions, const std::vector< CipherSuite > &supportedCiphers)
 
static auto fizz::sm::negotiateParameters (const ServerHello &shlo, const std::vector< ProtocolVersion > &supportedVersions, const std::vector< CipherSuite > &supportedCiphers, const std::map< NamedGroup, std::unique_ptr< KeyExchange >> &keyExchangers)
 
static void fizz::sm::validateNegotiationConsistency (const State &state, ProtocolVersion version, CipherSuite cipher)
 
static NegotiatedPsk fizz::sm::negotiatePsk (const std::vector< PskKeyExchangeMode > &supportedPskModes, const folly::Optional< CachedPsk > &attemptedPsk, const ServerHello &shlo, ProtocolVersion version, CipherSuite cipher, bool hasExchange)
 
static HrrParams fizz::sm::negotiateParameters (const HelloRetryRequest &hrr, const std::vector< ProtocolVersion > &supportedVersions, const std::vector< CipherSuite > &supportedCiphers, const std::vector< NamedGroup > &supportedGroups)
 
static std::map< NamedGroup, std::unique_ptr< KeyExchange > > fizz::sm::getHrrKeyExchangers (const Factory &factory, std::map< NamedGroup, std::unique_ptr< KeyExchange >> previous, Optional< NamedGroup > negotiatedGroup)
 
static void fizz::sm::validateAcceptedEarly (const State &state, const Optional< std::string > &alpn)
 
static std::tuple< folly::Optional< SignatureScheme >, std::shared_ptr< const SelfCert > > fizz::sm::getClientCert (const State &state, const std::vector< SignatureScheme > &schemes)
 
static MutateState fizz::sm::handleCertMsg (const State &state, CertificateMsg certMsg, folly::Optional< CertificateCompressionAlgorithm > algo)
 
static uint32_t fizz::sm::getMaxEarlyDataSize (const NewSessionTicket &nst)
 
static Actions fizz::sm::ignoreEarlyAppWrite (const State &state, EarlyAppWrite write)
 
static Actions fizz::sm::handleEarlyAppWrite (const State &state, EarlyAppWrite appWrite)
 

Variable Documentation

PskType type

Definition at line 777 of file ClientProtocol.cpp.

Referenced by testing::ACTION_TEMPLATE(), folly::addBenchmark(), folly::FutureExecutor< ExecutorImpl >::addFuture(), folly::fibers::FiberManager::addTaskFinally(), folly::fibers::FiberManager::addTaskRemoteFuture(), folly::allocationBytesForOverAligned(), folly::BaseFormatter< Formatter< containerMode, Args... >, containerMode, Args... >::asDerived(), testing::internal::AssertHelper::AssertHelperData::AssertHelperData(), folly::BasicFixedString< Char, N >::assign(), folly::dynamic::at(), folly::dynamic::atImpl(), folly::io::test::availableCodecs(), folly::io::test::availableStreamCodecs(), folly::detail::avgHelper(), folly::BasicFixedString< Char, N >::BasicFixedString(), folly::gen::detail::Batch::Batch(), folly::portability::ssl::BIO_meth_new(), folly::bitReverse(), folly::BitIterator< BaseIter >::bitsPerBlock(), folly::chrono::ceil(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::Accessor::cend(), folly::futures::detail::chainExecutor(), folly::detail::checkConversion(), folly::fibers::collectAll(), folly::fibers::collectN(), folly::detail::constexpr_clamp_cast_helper(), folly::constexpr_sub_overflow_clamped(), folly::gen::detail::Contains< Needle >::Contains(), folly::test::TupleTo2< TemplateSeq< std::size_t, Ns... > >::convert(), folly::DynamicConverter< T, typename std::enable_if< std::is_enum< T >::value >::type >::convert(), folly::detail::convertTo(), wangle::Pipeline< int >::create(), folly::StandardLogHandlerFactory::createHandler(), fizz::extensions::TokenBindingConstructor::createTokenBinding(), folly::io::compression::detail::dataStartsWithLE(), folly::defaulted(), folly::detail::SingleElementQueue< T, Atom >::dequeue(), folly::detail::SingletonHolder< T >::destroyInstance(), folly::compression::instructions::detect(), folly::detail::digits_to(), folly::compression::instructions::dispatch(), folly::compression::dispatchInstructions(), folly::FormatValue< T, typename std::enable_if< std::is_integral< T >::value &&!std::is_same< T, bool >::value >::type >::doFormat(), folly::BaseFormatter< Formatter< containerMode, Args... >, containerMode, Args... >::doFormatFrom(), folly::doNotOptimizeAway(), folly::Optional< NamedGroup >::emplace(), folly::gen::empty(), folly::detail::enforceWhitespace(), folly::detail::SingleElementQueue< T, Atom >::enqueue(), folly::io::QueueAppender::ensureSlow(), fizz::enumToHex(), folly::estimateSpaceNeeded(), folly::exception_wrapper::exception_wrapper(), testing::internal::TuplePrefix< N >::ExplainMatchFailuresTo(), folly::chrono::floor(), for_each_argument(), folly::for_each_detail::for_each_impl(), folly::for_each_detail::for_each_tuple_impl(), folly::format(), folly::formatChecked(), folly::Function< std::vector< ResultT >(std::vector< InputT > &&)>::Function(), folly::detail::futexWaitImpl(), folly::detail::futexWaitUntil(), folly::Future< folly::folly::Unit >::Future(), folly::Future< T >::Future(), folly::futures::detail::FutureBase< T >::FutureBase(), folly::FutureExecutor< ExecutorImpl >::FutureExecutor(), proxygen::HTTP2Codec::generateSettings(), folly::detail::SingletonHolder< T >::get(), folly::get_default(), folly::for_each_detail::get_impl(), folly::get_ptr(), folly::dynamic::get_ptr(), folly::dynamic::get_ptrImpl(), folly::get_ref_default(), folly::symbolizer::ElfFile::getBaseAddress(), folly::AsyncSocketException::getErrno(), folly::SharedPromise< T >::getFuture(), folly::Promise< T >::getFuture(), proxygen::HTTP2Codec::getHeaderIndexingStrategy(), folly::BaseFormatter< Formatter< containerMode, Args... >, containerMode, Args... >::getSizeArgFrom(), testing::internal::GetTypeName(), folly::BaseFormatter< Formatter< containerMode, Args... >, containerMode, Args... >::getValue(), folly::detail::constexpr_abs_helper< T, typename std::enable_if< std::is_integral< T >::value &&!std::is_same< T, bool >::value &&std::is_signed< T >::value >::type >::go(), folly::gen::detail::GroupBy< Selector >::GroupBy(), folly::gen::detail::GroupByAdjacent< Selector >::GroupByAdjacent(), proxygen::HTTPCommonHeaders::hash(), folly::dynamic::hash(), testing::internal::HasOneFailure(), proxygen::ZlibStreamCompressor::init(), proxygen::ZlibStreamDecompressor::init(), wangle::StaticPipeline< R, W, Handler, Handlers... >::initialize(), folly::AtomicHashArray< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::insertInternal(), folly::compression::instructionsOverride(), folly::detail::internalJoin(), folly::detail::internalJoinAppend(), folly::DelayedDestructionBase::IntrusivePtr< AliasType >::IntrusivePtr(), folly::IOBuf::IOBuf(), proxygen::http2::isValidFrameType(), folly::join(), folly::Executor::KeepAlive< folly::VirtualEventBase >::KeepAlive(), wangle::detail::logWarningIfNotUnit< folly::Unit >(), folly::DelayedDestructionBase::IntrusivePtr< AliasType >::make(), folly::NotificationQueue< MessageT >::Consumer::make(), folly::make_array(), folly::make_unique(), makeClientCodec(), folly::makeConversionError(), folly::makeFuture(), folly::makeFutureWith(), folly::makeGuard(), folly::makeSemiFuture(), folly::makeSemiFutureWith(), makeServerCodec(), folly::makeTryWith(), folly::makeUnpredictable(), folly::futures::map(), folly::gen::detail::Map< Predicate >::Map(), testing::internal::FieldMatcher< Class, FieldType >::MatchAndExplain(), testing::internal::PropertyMatcher< Class, PropertyType >::MatchAndExplain(), testing::internal::ContainerEqMatcher< Container >::MatchAndExplain(), testing::internal::BoundSecondMatcher< Tuple2Matcher, Second >::Impl< T >::MatchAndExplain(), folly::detail::GroupVarintBase< T >::maxSize(), folly::gen::detail::Min< Selector, Comparer >::Min(), folly::LockedPtr< SynchronizedType, LockPolicy >::moveFromUpgradeToRead(), folly::LockedPtr< SynchronizedType, LockPolicy >::moveFromUpgradeToWrite(), folly::LockedPtr< SynchronizedType, LockPolicy >::moveFromWriteToUpgrade(), folly::detail::moveObjectsRight(), folly::detail::IntegralSizePolicy< SizeType, true >::moveToUninitialized(), naive_executor_bulk_target(), folly::detail::notThereYet(), folly::Future< T >::onError(), folly::Future< T >::onTimeout(), folly::ThreadLocalPtr< SubscriberMap >::operator bool(), folly::detail::IteratorFacade< dynamic::const_key_iterator, dynamic const , std::forward_iterator_tag >::operator!=(), folly::operator!=(), folly::gen::detail::MergeTuples::operator()(), folly::detail::TypeDescriptorHasher::operator()(), hash< folly::Optional< T > >::operator()(), folly::detail::ReturnUnit< Error >::operator()(), folly::gen::operator+(), folly::Executor::KeepAlive< folly::VirtualEventBase >::operator=(), folly::BasicFixedString< Char, N >::operator=(), folly::Future< T >::operator=(), folly::basic_fbstring< E, T, A, Storage >::operator=(), folly::basic_fbstring< char >::operator=(), folly::dynamic::operator==(), folly::gen::operator|(), folly::gen::detail::operator|(), folly::gen::detail::Order< Selector, Comparer >::Order(), folly::gen::detail::Parallel< Ops >::Parallel(), proxygen::http2::parseFrameHeader(), proxygen::StructuredHeadersBuffer::parseNumber(), folly::parseTo(), folly::detail::parseToWrap(), proxygen::PassThroughHTTPCodecFilter::PassThroughHTTPCodecFilter(), wangle::PeekingAcceptorHandshakeHelper::peekSuccess(), testing::internal::InvokeMethodAction< Class, MethodPtr >::Perform(), folly::gen::detail::PMap< Predicate >::PMap(), folly::poly_type(), folly::prettyPrint(), folly::prettyToDouble(), testing::internal::UniversalTersePrinter< wchar_t * >::Print(), folly::futures::detail::FutureBase< T >::raise(), folly::Range< unsigned char * >::Range(), wangle::Pipeline< R, W >::read(), fizz::detail::Reader< U >::read(), fizz::detail::Reader< Extension >::read(), wangle::SocketPeeker::readEOF(), wangle::Pipeline< R, W >::readEOF(), wangle::Pipeline< R, W >::readException(), utils::recursively_flatten_list(), folly::reduce(), folly::gen::detail::Reduce< Reducer >::Reduce(), folly::LoggerDB::registerHandlerFactory(), folly::detail::SingletonHolder< T >::registerSingleton(), folly::detail::SingletonHolder< T >::registerSingletonMock(), folly::reserveInTargetDelim(), folly::ThreadLocalPtr< SubscriberMap >::reset(), folly::resizeWithoutInitialization(), folly::chrono::round(), folly::chrono::detail::round_impl(), run_constexpr_clamp_cast_test(), folly::sync_tests::runParallel(), folly::gen::detail::Sample< Random >::Sample(), folly::LockedPtr< SynchronizedType, LockPolicy >::scopedUnlock(), folly::symbolizer::Dwarf::Section::Section(), folly::SemiFuture< T >::SemiFuture(), folly::Bits< T, Traits >::set(), folly::futures::detail::FutureBase< T >::setExecutor(), wangle::StaticPipeline< R, W, Handler, Handlers... >::setHandler(), proxygen::HPACKDecoderBase::setMaxUncompressed(), folly::Req::setType(), folly::SingletonVault::setType(), folly::detail::shiftPointer(), testing::internal::ShouldRunTestCase(), folly::detail::SingletonHolder< T >::singleton(), folly::dynamic::size(), folly::fbstring_core< char >::size(), folly::splitTo(), folly::AsyncSSLSocket::sslInfoCallback(), folly::AsyncSSLSocket::sslWriteImpl(), folly::detail::str_to_integral(), folly::svformatChecked(), folly::Expected< int, E >::swap(), TEST(), folly::io::test::TEST(), TEST_F(), folly::TEST_F(), folly::io::test::TEST_P(), folly::sync_tests::testBasic(), folly::sync_tests::testBasicImpl(), testIntegral2String(), testString2Integral(), folly::sync_tests::testUnlock(), folly::sync_tests::testUnlockCommon(), folly::sync_tests::testWithLock(), folly::Future< T >::then(), folly::Try< void >::throwIfFailed(), folly::detail::time_point_conv(), folly::to(), folly::to_signed(), folly::to_unsigned(), folly::toAppend(), folly::toAppendStrImpl(), folly::detail::Bytes::toHex(), wangle::Pipeline< R, W >::transportActive(), wangle::Pipeline< R, W >::transportInactive(), folly::Try< folly::folly::Unit >::Try(), folly::PicoSpinLock< uintptr_t >::try_lock(), folly::tryDecodeVarint(), folly::futures::detail::detail_msvc_15_7_workaround::tryInvoke(), folly::detail::tryPosixTimeToDuration(), folly::tryTo(), folly::io::Codec::type(), UBSafeAdd(), UBSafeSub(), folly::PicoSpinLock< uintptr_t >::unlock(), testing::UnorderedPointwise(), folly::unwrapTryTuple(), folly::try_detail::unwrapTryTupleImpl(), folly::detail::value_before(), verify(), folly::Expected< int, E >::which(), folly::gen::detail::Window::Window(), fizz::detail::Writer< U >::write(), wangle::Pipeline< R, W >::write(), fizz::detail::write< Extension >(), wangle::Pipeline< R, W >::writeException(), writeFrameHeaderManual(), folly::gen::detail::Zip< Container >::Zip(), folly::detail::SingleElementQueue< T, Atom >::~SingleElementQueue(), and proxygen::HeaderCodec::Stats::~Stats().

ProtocolVersion version

Definition at line 1005 of file ClientProtocol.cpp.

Referenced by doEmptyHeaderValueTest(), folly::symbolizer::Dwarf::findDebugInfoOffset(), folly::symbolizer::Dwarf::findLocation(), proxygen::HTTP1xCodec::generateHeader(), fizz::sm::getCertificateRequest(), proxygen::HTTPDefaultSessionCodecFactory::getCodec(), fizz::server::getCookieState(), folly::observer_detail::Core::getData(), folly::SSLContext::getErrors(), fizz::sm::getHelloRetryRequest(), fizz::sm::getHrrKeyExchangers(), fizz::sm::getServerHello(), folly::AsyncSSLSocket::getSSLContext(), fizz::server::getStatelessHelloRetryRequest(), proxygen::HTTPMessage::getUpgradeProtocol(), getVersionedSpdyFrame(), proxygen::SPDYCodec::getVersionSettings(), wangle::LRUInMemoryCache< K, V, M >::hasChangedSince(), proxygen::HTTPDefaultSessionCodecFactory::HTTPDefaultSessionCodecFactory(), HTTPDownstreamTest< SPDY3_1CodecPair >::HTTPDownstreamTest(), makeClientCodec(), HTTPUpstreamTest< SPDY3CodecPair >::makeServerCodec(), fizz::sm::negotiateParameters(), fizz::sm::negotiatePsk(), fizz::sm::negotiateVersion(), fizz::extensions::TokenBindingClientExtension::onEncryptedExtensions(), proxygen::PassThroughHTTPCodecFilter::PassThroughHTTPCodecFilter(), wangle::CachePersistence< K, V >::persistVersionedData(), folly::observer_detail::Core::refresh(), wangle::CachePersistence< K, V >::setPersistedVersion(), wangle::LRUPersistentCache< K, V, MutexT >::setPersistenceHelper(), HTTPUpstreamTest< SPDY3CodecPair >::SetUp(), fizz::extensions::test::TokenBindingClientExtensionTest::setUpServerHelloExtensions(), fizz::extensions::test::TokenBindingServerExtensionTest::setUpTokenBindingWithParameters(), wangle::LRUPersistentCache< K, V, MutexT >::syncNow(), TYPED_TEST_P(), and fizz::sm::validateNegotiationConsistency().