proxygen
|
#include <fizz/server/ServerProtocol.h>
#include <fizz/crypto/Utils.h>
#include <fizz/protocol/CertificateVerifier.h>
#include <fizz/protocol/Protocol.h>
#include <fizz/protocol/StateMachine.h>
#include <fizz/record/Extensions.h>
#include <fizz/record/PlaintextRecordLayer.h>
#include <fizz/server/AsyncSelfCert.h>
#include <fizz/server/Negotiator.h>
#include <fizz/server/ReplayCache.h>
#include <folly/Overload.h>
#include <algorithm>
Go to the source code of this file.
Namespaces | |
fizz | |
fizz::sm | |
fizz::server | |
fizz::server::detail | |
Functions | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::Uninitialized, Event::Accept, StateEnum::ExpectingClientHello) | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::ExpectingClientHello, Event::ClientHello, StateEnum::ExpectingClientHello, StateEnum::ExpectingCertificate, StateEnum::ExpectingFinished, StateEnum::AcceptingEarlyData, StateEnum::Error) | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::AcceptingEarlyData, Event::AppData, StateEnum::Error) | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::AcceptingEarlyData, Event::AppWrite, StateEnum::Error) | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::AcceptingEarlyData, Event::EndOfEarlyData, StateEnum::ExpectingFinished) | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::ExpectingCertificate, Event::Certificate, StateEnum::ExpectingCertificateVerify, StateEnum::ExpectingFinished) FIZZ_DECLARE_EVENT_HANDLER(ServerTypes | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::ExpectingFinished, Event::AppWrite, StateEnum::Error) | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::ExpectingFinished, Event::Finished, StateEnum::AcceptingData) | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::AcceptingData, Event::WriteNewSessionTicket, StateEnum::Error) | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::AcceptingData, Event::AppData, StateEnum::Error) | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::AcceptingData, Event::AppWrite, StateEnum::Error) | |
fizz::sm::FIZZ_DECLARE_EVENT_HANDLER (ServerTypes, StateEnum::AcceptingData, Event::KeyUpdate, StateEnum::AcceptingData) | |
AsyncActions | fizz::server::detail::processEvent (const State &state, Param param) |
Actions | fizz::server::detail::handleError (const State &state, ReportError error, Optional< AlertDescription > alertDesc) |
Actions | fizz::server::detail::handleAppClose (const State &state) |
Actions | fizz::server::detail::handleInvalidEvent (const State &state, Event event, Param param) |
static void | fizz::sm::addHandshakeLogging (const State &state, const ClientHello &chlo) |
static void | fizz::sm::validateClientHello (const ClientHello &chlo) |
static Optional< ProtocolVersion > | fizz::sm::negotiateVersion (const ClientHello &chlo, const std::vector< ProtocolVersion > &versions) |
static Optional< CookieState > | fizz::sm::getCookieState (const ClientHello &chlo, ProtocolVersion version, CipherSuite cipher, const CookieCipher *cookieCipher) |
static ResumptionStateResult | fizz::sm::getResumptionState (const ClientHello &chlo, const TicketCipher *ticketCipher, const std::vector< PskKeyExchangeMode > &supportedModes) |
Future< ReplayCacheResult > | fizz::sm::getReplayCacheResult (const ClientHello &chlo, bool zeroRttEnabled, ReplayCache *replayCache) |
static bool | fizz::sm::validateResumptionState (const ResumptionState &resState, PskKeyExchangeMode, ProtocolVersion version, CipherSuite cipher) |
static CipherSuite | fizz::sm::negotiateCipher (const ClientHello &chlo, const std::vector< std::vector< CipherSuite >> &supportedCiphers) |
static std::pair< std::unique_ptr< KeyScheduler >, std::unique_ptr< HandshakeContext > > | fizz::sm::setupSchedulerAndContext (const Factory &factory, CipherSuite cipher, const ClientHello &chlo, const Optional< ResumptionState > &resState, const Optional< CookieState > &cookieState, PskType pskType, std::unique_ptr< HandshakeContext > handshakeContext, ProtocolVersion) |
static void | fizz::sm::validateGroups (const std::vector< KeyShareEntry > &client_shares) |
static std::tuple< NamedGroup, Optional< Buf > > | fizz::sm::negotiateGroup (ProtocolVersion version, const ClientHello &chlo, const std::vector< NamedGroup > &supportedGroups) |
static Buf | fizz::sm::doKex (const Factory &factory, NamedGroup group, const Buf &clientShare, KeyScheduler &scheduler) |
static Buf | fizz::sm::getHelloRetryRequest (ProtocolVersion version, CipherSuite cipher, NamedGroup group, Buf legacySessionId, HandshakeContext &handshakeContext) |
static Buf | fizz::sm::getServerHello (ProtocolVersion version, Random random, CipherSuite cipher, bool psk, Optional< NamedGroup > group, Optional< Buf > serverShare, Buf legacy_session_id, HandshakeContext &handshakeContext) |
static Optional< std::string > | fizz::sm::negotiateAlpn (const ClientHello &chlo, folly::Optional< std::string > zeroRttAlpn, const FizzServerContext &context) |
static Optional< std::chrono::milliseconds > | fizz::sm::getClockSkew (const Optional< ResumptionState > &psk, Optional< uint32_t > obfuscatedAge) |
static EarlyDataType | fizz::sm::negotiateEarlyDataType (bool acceptEarlyData, const ClientHello &chlo, const Optional< ResumptionState > &psk, CipherSuite cipher, Optional< KeyExchangeType > keyExchangeType, const Optional< CookieState > &cookieState, Optional< std::string > alpn, ReplayCacheResult replayCacheResult, Optional< std::chrono::milliseconds > clockSkew, ClockSkewTolerance clockSkewTolerance, const AppTokenValidator *appTokenValidator) |
static Buf | fizz::sm::getEncryptedExt (HandshakeContext &handshakeContext, const folly::Optional< std::string > &selectedAlpn, EarlyDataType earlyData, std::vector< Extension > otherExtensions) |
static std::pair< std::shared_ptr< SelfCert >, SignatureScheme > | fizz::sm::chooseCert (const FizzServerContext &context, const ClientHello &chlo) |
static std::tuple< Buf, folly::Optional< CertificateCompressionAlgorithm > > | fizz::sm::getCertificate (const std::shared_ptr< const SelfCert > &serverCert, const FizzServerContext &context, const ClientHello &chlo, HandshakeContext &handshakeContext) |
static Buf | fizz::sm::getCertificateVerify (SignatureScheme sigScheme, Buf signature, HandshakeContext &handshakeContext) |
static Buf | fizz::sm::getCertificateRequest (const std::vector< SignatureScheme > &acceptableSigSchemes, const CertificateVerifier *const verifier, HandshakeContext &handshakeContext) |
static WriteToSocket | fizz::sm::writeNewSessionTicket (const FizzServerContext &context, const WriteRecordLayer &recordLayer, std::chrono::seconds ticketLifetime, uint32_t ticketAgeAdd, Buf nonce, Buf ticket, ProtocolVersion version) |
static Future< Optional< WriteToSocket > > | fizz::sm::generateTicket (const State &state, const std::vector< uint8_t > &resumptionMasterSecret, Buf appToken=nullptr) |
Variables | |
static constexpr uint16_t | kPskIndex = 0 |
Future<std::pair<PskType, Optional<ResumptionState> > > futureResState |
Definition at line 441 of file ServerProtocol.cpp.
Referenced by fizz::sm::getCookieState().
|
static |
Definition at line 30 of file ServerProtocol.cpp.
Referenced by fizz::sm::getResumptionState(), fizz::sm::getServerHello(), and fizz::sm::setupSchedulerAndContext().
Definition at line 443 of file ServerProtocol.cpp.
Referenced by fizz::sm::getCertificateRequest(), and fizz::sm::getCookieState().
Optional<PskKeyExchangeMode> pskMode |
Definition at line 442 of file ServerProtocol.cpp.
Referenced by fizz::sm::getCertificateRequest(), fizz::sm::getCookieState(), fizz::sm::getResumptionState(), and fizz::sm::negotiatePsk().