proxygen
fizz::client::FizzClient< ActionMoveVisitor, SM > Class Template Reference

#include <FizzClient.h>

Inheritance diagram for fizz::client::FizzClient< ActionMoveVisitor, SM >:
fizz::FizzBase< Derived, ActionMoveVisitor, StateMachine >

Public Member Functions

void connect (std::shared_ptr< const FizzClientContext > context, std::shared_ptr< const CertificateVerifier > verifier, folly::Optional< std::string > sni, folly::Optional< CachedPsk > cachedPsk, const std::shared_ptr< ClientExtensions > &extensions=nullptr)
 
void connect (std::shared_ptr< const FizzClientContext > context, folly::Optional< std::string > hostname)
 
Buf getEarlyEkm (folly::StringPiece label, const Buf &context, uint16_t length) const
 
- Public Member Functions inherited from fizz::FizzBase< Derived, ActionMoveVisitor, StateMachine >
 FizzBase (const typename StateMachine::StateType &state, folly::IOBufQueue &transportReadBuf, ActionMoveVisitor &visitor, folly::DelayedDestructionBase *owner)
 
void writeNewSessionTicket (WriteNewSessionTicket writeNewSessionTicket)
 
void appWrite (AppWrite appWrite)
 
void earlyAppWrite (EarlyAppWrite appWrite)
 
void appClose ()
 
void waitForData ()
 
void newTransportData ()
 
void moveToErrorState (const folly::AsyncSocketException &ex)
 
bool inErrorState () const
 
bool actionProcessing () const
 
Buf getEkm (folly::StringPiece label, const Buf &context, uint16_t length) const
 

Private Member Functions

void startActions (Actions actions)
 

Friends

class FizzBase< FizzClient< ActionMoveVisitor, SM >, ActionMoveVisitor, SM >
 

Additional Inherited Members

- Protected Member Functions inherited from fizz::FizzBase< Derived, ActionMoveVisitor, StateMachine >
void processActions (typename StateMachine::CompletedActions actions)
 
void addProcessingActions (typename StateMachine::ProcessingActions actions)
 
- Protected Attributes inherited from fizz::FizzBase< Derived, ActionMoveVisitor, StateMachine >
StateMachine machine_
 
const StateMachine::StateType & state_
 
folly::IOBufQueuetransportReadBuf_
 

Detailed Description

template<typename ActionMoveVisitor, typename SM = ClientStateMachine>
class fizz::client::FizzClient< ActionMoveVisitor, SM >

Definition at line 21 of file FizzClient.h.

Member Function Documentation

template<typename ActionMoveVisitor , typename SM >
void fizz::client::FizzClient< ActionMoveVisitor, SM >::connect ( std::shared_ptr< const FizzClientContext context,
std::shared_ptr< const CertificateVerifier verifier,
folly::Optional< std::string sni,
folly::Optional< CachedPsk cachedPsk,
const std::shared_ptr< ClientExtensions > &  extensions = nullptr 
)

Definition at line 13 of file FizzClient-inl.h.

References folly::gen::move.

18  {
19  this->addProcessingActions(this->machine_.processConnect(
20  this->state_,
22  std::move(verifier),
23  std::move(sni),
24  std::move(cachedPsk),
25  extensions));
26 }
context
Definition: CMakeCache.txt:563
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void addProcessingActions(typename StateMachine::ProcessingActions actions)
Definition: FizzBase-inl.h:102
StateMachine machine_
Definition: FizzBase.h:101
template<typename ActionMoveVisitor , typename SM >
void fizz::client::FizzClient< ActionMoveVisitor, SM >::connect ( std::shared_ptr< const FizzClientContext context,
folly::Optional< std::string hostname 
)

Uses the default verifier to verify certificates

Definition at line 29 of file FizzClient-inl.h.

References fizz::Client, folly::netops::connect(), and folly::gen::move.

31  {
32  const auto pskIdentity = hostname;
33  connect(
35  std::make_shared<DefaultCertificateVerifier>(VerificationContext::Client),
36  std::move(hostname),
37  std::move(pskIdentity));
38 }
context
Definition: CMakeCache.txt:563
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void connect(std::shared_ptr< const FizzClientContext > context, std::shared_ptr< const CertificateVerifier > verifier, folly::Optional< std::string > sni, folly::Optional< CachedPsk > cachedPsk, const std::shared_ptr< ClientExtensions > &extensions=nullptr)
template<typename ActionMoveVisitor , typename SM >
Buf fizz::client::FizzClient< ActionMoveVisitor, SM >::getEarlyEkm ( folly::StringPiece  label,
const Buf context,
uint16_t  length 
) const

Returns an exported key material derived from the early secret of the TLS connection. Throws if the early secret is not available.

Definition at line 41 of file FizzClient-inl.h.

References fizz::Exporter::getEkm(), and fizz::test::label.

44  {
45  if (!this->state_.earlyDataParams()) {
46  throw std::runtime_error("early ekm not available");
47  }
48  return Exporter::getEkm(
49  this->state_.earlyDataParams()->cipher,
50  this->state_.earlyDataParams()->earlyExporterSecret->coalesce(),
51  label,
52  context ? context->clone() : nullptr,
53  length);
54 }
context
Definition: CMakeCache.txt:563
const StateMachine::StateType & state_
Definition: FizzBase.h:102
static Buf getEkm(CipherSuite cipher, folly::ByteRange exporterMaster, folly::StringPiece label, Buf context, uint16_t length)
Definition: Exporter.cpp:13
StringPiece label
template<typename ActionMoveVisitor , typename SM >
void fizz::client::FizzClient< ActionMoveVisitor, SM >::startActions ( Actions  actions)
private

Definition at line 57 of file FizzClient-inl.h.

References folly::gen::move.

57  {
59 }
void processActions(typename StateMachine::CompletedActions actions)
Definition: FizzBase-inl.h:87
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
Actions actions(Args &&...act)
Definition: Actions.h:86

Friends And Related Function Documentation

template<typename ActionMoveVisitor, typename SM = ClientStateMachine>
friend class FizzBase< FizzClient< ActionMoveVisitor, SM >,ActionMoveVisitor,SM >
friend

Definition at line 54 of file FizzClient.h.


The documentation for this class was generated from the following files: