proxygen
fizz::client::State Class Reference

#include <State.h>

Public Member Functions

StateEnum state () const
 
const FizzClientContextcontext () const
 
std::shared_ptr< const CertserverCert () const
 
std::shared_ptr< const CertclientCert () const
 
folly::Optional< ClientAuthTypeclientAuthRequested () const
 
folly::Optional< SignatureSchemeclientAuthSigScheme () const
 
folly::Optional< ProtocolVersionversion () const
 
folly::Optional< CipherSuitecipher () const
 
folly::Optional< NamedGroupgroup () const
 
folly::Optional< SignatureSchemesigScheme () const
 
folly::Optional< PskTypepskType () const
 
folly::Optional< PskKeyExchangeModepskMode () const
 
folly::Optional< KeyExchangeTypekeyExchangeType () const
 
folly::Optional< EarlyDataTypeearlyDataType () const
 
const folly::Optional< EarlyDataParams > & earlyDataParams () const
 
const folly::Optional< std::string > & alpn () const
 
const folly::Optional< std::string > & sni () const
 
const folly::Optional< CertificateCompressionAlgorithm > & serverCertCompAlgo () const
 
const CertificateVerifierverifier () const
 
const RandomclientRandom () const
 
const BuflegacySessionId () const
 
bool sentCCS () const
 
KeySchedulerkeyScheduler () const
 
ReadRecordLayerreadRecordLayer () const
 
const WriteRecordLayerwriteRecordLayer () const
 
const WriteRecordLayerearlyWriteRecordLayer () const
 
const BufencodedClientHello () const
 
const folly::Optional< std::vector< ExtensionType > > & requestedExtensions () const
 
const BufclientHandshakeSecret () const
 
const BufserverHandshakeSecret () const
 
const BufresumptionSecret () const
 
const std::vector< std::shared_ptr< const PeerCert > > & unverifiedCertChain () const
 
std::shared_ptr< const SelfCertselectedClientCert () const
 
const folly::Optional< Buf > & exporterMasterSecret () const
 
const folly::Optional< CachedPsk > & attemptedPsk () const
 
ClientExtensionsextensions () const
 
auto & state ()
 
auto & context ()
 
auto & verifier ()
 
auto & keyScheduler ()
 
auto & readRecordLayer ()
 
auto & writeRecordLayer ()
 
auto & earlyWriteRecordLayer ()
 
auto & handshakeContext () const
 
auto & serverCert ()
 
auto & clientCert ()
 
auto & selectedClientCert ()
 
auto & clientAuthRequested ()
 
auto & clientAuthSigScheme ()
 
auto & version ()
 
auto & cipher ()
 
auto & group ()
 
auto & sigScheme ()
 
auto & pskType ()
 
auto & pskMode ()
 
auto & keyExchangeType ()
 
auto & earlyDataType ()
 
auto & earlyDataParams ()
 
auto & alpn ()
 
auto & sni ()
 
auto & serverCertCompAlgo ()
 
auto & clientRandom ()
 
auto & legacySessionId ()
 
auto & sentCCS ()
 
auto & encodedClientHello ()
 
auto & keyExchangers () const
 
auto & requestedExtensions ()
 
auto & clientHandshakeSecret ()
 
auto & serverHandshakeSecret ()
 
auto & resumptionSecret ()
 
auto & unverifiedCertChain ()
 
auto & attemptedPsk ()
 
auto & exporterMasterSecret ()
 
auto & extensions ()
 

Private Attributes

StateEnum state_ {StateEnum::Uninitialized}
 
std::shared_ptr< const FizzClientContextcontext_
 
std::shared_ptr< const CertificateVerifierverifier_
 
std::unique_ptr< KeySchedulerkeyScheduler_
 
std::unique_ptr< ReadRecordLayerreadRecordLayer_
 
std::unique_ptr< WriteRecordLayerwriteRecordLayer_
 
std::unique_ptr< EncryptedWriteRecordLayerearlyWriteRecordLayer_
 
std::unique_ptr< HandshakeContexthandshakeContext_
 
std::shared_ptr< const CertserverCert_
 
std::shared_ptr< const CertclientCert_
 
std::shared_ptr< const SelfCertselectedClientCert_
 
folly::Optional< ClientAuthTypeclientAuthRequested_
 
folly::Optional< SignatureSchemeclientAuthSigScheme_
 
folly::Optional< ProtocolVersionversion_
 
folly::Optional< CipherSuitecipher_
 
folly::Optional< NamedGroupgroup_
 
folly::Optional< SignatureSchemesigScheme_
 
folly::Optional< PskTypepskType_
 
folly::Optional< PskKeyExchangeModepskMode_
 
folly::Optional< KeyExchangeTypekeyExchangeType_
 
folly::Optional< EarlyDataTypeearlyDataType_
 
folly::Optional< std::stringalpn_
 
folly::Optional< std::stringsni_
 
folly::Optional< CertificateCompressionAlgorithmserverCertCompAlgo_
 
folly::Optional< EarlyDataParamsearlyDataParams_
 
folly::Optional< RandomclientRandom_
 
folly::Optional< BuflegacySessionId_
 
bool sentCCS_ {false}
 
folly::Optional< BufencodedClientHello_
 
folly::Optional< std::map< NamedGroup, std::unique_ptr< KeyExchange > > > keyExchangers_
 
folly::Optional< std::vector< ExtensionType > > requestedExtensions_
 
folly::Optional< BufclientHandshakeSecret_
 
folly::Optional< BufserverHandshakeSecret_
 
folly::Optional< BufresumptionSecret_
 
folly::Optional< std::vector< std::shared_ptr< const PeerCert > > > unverifiedCertChain_
 
folly::Optional< CachedPskattemptedPsk_
 
folly::Optional< BufexporterMasterSecret_
 
std::shared_ptr< ClientExtensionsextensions_
 

Detailed Description

Definition at line 58 of file State.h.

Member Function Documentation

const folly::Optional<std::string>& fizz::client::State::alpn ( ) const
inline

Application protocol negotiated on this connection.

Definition at line 170 of file State.h.

Referenced by fizz::client::earlyParametersMatch(), fizz::client::AsyncFizzClientT< SM >::getApplicationProtocol(), and fizz::sm::getMaxEarlyDataSize().

170  {
171  return alpn_;
172  }
folly::Optional< std::string > alpn_
Definition: State.h:530
auto& fizz::client::State::alpn ( )
inline

Definition at line 436 of file State.h.

436  {
437  return alpn_;
438  }
folly::Optional< std::string > alpn_
Definition: State.h:530
const folly::Optional<CachedPsk>& fizz::client::State::attemptedPsk ( ) const
inline

CachedPsk that we are attempting to use.

Should not be used outside of the state machine.

Definition at line 336 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers(), fizz::sm::negotiatePsk(), and fizz::sm::validateAcceptedEarly().

336  {
337  return attemptedPsk_;
338  }
folly::Optional< CachedPsk > attemptedPsk_
Definition: State.h:550
auto& fizz::client::State::attemptedPsk ( )
inline

Definition at line 488 of file State.h.

488  {
489  return attemptedPsk_;
490  }
folly::Optional< CachedPsk > attemptedPsk_
Definition: State.h:550
folly::Optional<CipherSuite> fizz::client::State::cipher ( ) const
inline
auto& fizz::client::State::cipher ( )
inline

Definition at line 404 of file State.h.

404  {
405  return cipher_;
406  }
folly::Optional< CipherSuite > cipher_
Definition: State.h:523
folly::Optional<ClientAuthType> fizz::client::State::clientAuthRequested ( ) const
inline

Whether or not the server requested client authentication and whether a cert matched if authentication was requested.

Definition at line 92 of file State.h.

Referenced by fizz::sm::getClientCert(), and fizz::sm::handleCertMsg().

92  {
93  return clientAuthRequested_;
94  }
folly::Optional< ClientAuthType > clientAuthRequested_
Definition: State.h:519
auto& fizz::client::State::clientAuthRequested ( )
inline

Definition at line 392 of file State.h.

392  {
393  return clientAuthRequested_;
394  }
folly::Optional< ClientAuthType > clientAuthRequested_
Definition: State.h:519
folly::Optional<SignatureScheme> fizz::client::State::clientAuthSigScheme ( ) const
inline

Signature scheme selected for client authentication

Definition at line 99 of file State.h.

Referenced by fizz::sm::handleCertMsg().

99  {
100  return clientAuthSigScheme_;
101  }
folly::Optional< SignatureScheme > clientAuthSigScheme_
Definition: State.h:520
auto& fizz::client::State::clientAuthSigScheme ( )
inline

Definition at line 396 of file State.h.

396  {
397  return clientAuthSigScheme_;
398  }
folly::Optional< SignatureScheme > clientAuthSigScheme_
Definition: State.h:520
std::shared_ptr<const Cert> fizz::client::State::clientCert ( ) const
inline

The certificate used by the client for authentication.

Definition at line 84 of file State.h.

Referenced by fizz::client::earlyParametersMatch(), fizz::sm::getMaxEarlyDataSize(), fizz::client::AsyncFizzClientT< SM >::getSelfCertificate(), and fizz::sm::handleCertMsg().

84  {
85  return clientCert_;
86  }
std::shared_ptr< const Cert > clientCert_
Definition: State.h:516
auto& fizz::client::State::clientCert ( )
inline

Definition at line 384 of file State.h.

384  {
385  return clientCert_;
386  }
std::shared_ptr< const Cert > clientCert_
Definition: State.h:516
const Buf& fizz::client::State::clientHandshakeSecret ( ) const
inline

Client handshake secret.

Should not be used outside of the state machine.

Definition at line 283 of file State.h.

Referenced by fizz::sm::handleCertMsg().

283  {
284  return *clientHandshakeSecret_;
285  }
folly::Optional< Buf > clientHandshakeSecret_
Definition: State.h:544
auto& fizz::client::State::clientHandshakeSecret ( )
inline

Definition at line 472 of file State.h.

472  {
473  return clientHandshakeSecret_;
474  }
folly::Optional< Buf > clientHandshakeSecret_
Definition: State.h:544
const Random& fizz::client::State::clientRandom ( ) const
inline

Random sent by the client.

Definition at line 200 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers().

200  {
201  return *clientRandom_;
202  }
folly::Optional< Random > clientRandom_
Definition: State.h:536
auto& fizz::client::State::clientRandom ( )
inline

Definition at line 448 of file State.h.

448  {
449  return clientRandom_;
450  }
folly::Optional< Random > clientRandom_
Definition: State.h:536
const FizzClientContext* fizz::client::State::context ( ) const
inline
auto& fizz::client::State::context ( )
inline

Definition at line 352 of file State.h.

352  {
353  return context_;
354  }
std::shared_ptr< const FizzClientContext > context_
Definition: State.h:503
const folly::Optional<EarlyDataParams>& fizz::client::State::earlyDataParams ( ) const
inline
auto& fizz::client::State::earlyDataParams ( )
inline

Definition at line 432 of file State.h.

432  {
433  return earlyDataParams_;
434  }
folly::Optional< EarlyDataParams > earlyDataParams_
Definition: State.h:534
folly::Optional<EarlyDataType> fizz::client::State::earlyDataType ( ) const
inline

Whether early data is used on this connection.

Definition at line 156 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers(), fizz::sm::handleCertMsg(), fizz::sm::handleEarlyAppWrite(), fizz::sm::ignoreEarlyAppWrite(), and fizz::sm::validateAcceptedEarly().

156  {
157  return earlyDataType_;
158  }
folly::Optional< EarlyDataType > earlyDataType_
Definition: State.h:529
auto& fizz::client::State::earlyDataType ( )
inline

Definition at line 428 of file State.h.

428  {
429  return earlyDataType_;
430  }
folly::Optional< EarlyDataType > earlyDataType_
Definition: State.h:529
const WriteRecordLayer* fizz::client::State::earlyWriteRecordLayer ( ) const
inline

Record layer for writing early data. May be null.

Should not be used outside of the state machine.

Definition at line 254 of file State.h.

Referenced by fizz::sm::getEarlyDataParams(), fizz::sm::getHrrKeyExchangers(), fizz::sm::handleCertMsg(), fizz::sm::handleEarlyAppWrite(), and fizz::sm::validateAcceptedEarly().

254  {
255  return earlyWriteRecordLayer_.get();
256  }
std::unique_ptr< EncryptedWriteRecordLayer > earlyWriteRecordLayer_
Definition: State.h:511
auto& fizz::client::State::earlyWriteRecordLayer ( )
inline

Definition at line 372 of file State.h.

372  {
373  return earlyWriteRecordLayer_;
374  }
std::unique_ptr< EncryptedWriteRecordLayer > earlyWriteRecordLayer_
Definition: State.h:511
const Buf& fizz::client::State::encodedClientHello ( ) const
inline

Contains the client hello that was sent on the wire.

Should not be used outside of the state machine.

Definition at line 263 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers(), and fizz::sm::negotiatePsk().

263  {
264  return *encodedClientHello_;
265  }
folly::Optional< Buf > encodedClientHello_
Definition: State.h:539
auto& fizz::client::State::encodedClientHello ( )
inline

Definition at line 460 of file State.h.

460  {
461  return encodedClientHello_;
462  }
folly::Optional< Buf > encodedClientHello_
Definition: State.h:539
const folly::Optional<Buf>& fizz::client::State::exporterMasterSecret ( ) const
inline

Get the exporter master secret - needed for EKM

Definition at line 327 of file State.h.

Referenced by fizz::sm::handleCertMsg().

327  {
328  return exporterMasterSecret_;
329  }
folly::Optional< Buf > exporterMasterSecret_
Definition: State.h:551
auto& fizz::client::State::exporterMasterSecret ( )
inline

Definition at line 492 of file State.h.

492  {
493  return exporterMasterSecret_;
494  }
folly::Optional< Buf > exporterMasterSecret_
Definition: State.h:551
ClientExtensions* fizz::client::State::extensions ( ) const
inline

Definition at line 344 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers(), and fizz::sm::validateAcceptedEarly().

344  {
345  return extensions_.get();
346  }
std::shared_ptr< ClientExtensions > extensions_
Definition: State.h:552
auto& fizz::client::State::extensions ( )
inline

Definition at line 496 of file State.h.

496  {
497  return extensions_;
498  }
std::shared_ptr< ClientExtensions > extensions_
Definition: State.h:552
folly::Optional<NamedGroup> fizz::client::State::group ( ) const
inline

The named group used if (EC)DH key exchange was used.

Definition at line 120 of file State.h.

Referenced by fizz::sm::getMaxEarlyDataSize().

120  {
121  return group_;
122  }
folly::Optional< NamedGroup > group_
Definition: State.h:524
auto& fizz::client::State::group ( )
inline

Definition at line 408 of file State.h.

408  {
409  return group_;
410  }
folly::Optional< NamedGroup > group_
Definition: State.h:524
auto& fizz::client::State::handshakeContext ( ) const
inline

Definition at line 376 of file State.h.

Referenced by fizz::sm::getClientCert(), fizz::sm::getHrrKeyExchangers(), fizz::sm::handleCertMsg(), fizz::sm::negotiatePsk(), and fizz::sm::validateAcceptedEarly().

376  {
377  return handshakeContext_;
378  }
std::unique_ptr< HandshakeContext > handshakeContext_
Definition: State.h:513
auto& fizz::client::State::keyExchangers ( ) const
inline

Definition at line 464 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers(), and fizz::sm::negotiatePsk().

464  {
465  return keyExchangers_;
466  }
folly::Optional< std::map< NamedGroup, std::unique_ptr< KeyExchange > > > keyExchangers_
Definition: State.h:541
folly::Optional<KeyExchangeType> fizz::client::State::keyExchangeType ( ) const
inline

Key exchange flow used on this connection (none, normal, or hello retry).

Definition at line 149 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers(), and fizz::sm::negotiatePsk().

149  {
150  return keyExchangeType_;
151  }
folly::Optional< KeyExchangeType > keyExchangeType_
Definition: State.h:528
auto& fizz::client::State::keyExchangeType ( )
inline

Definition at line 424 of file State.h.

424  {
425  return keyExchangeType_;
426  }
folly::Optional< KeyExchangeType > keyExchangeType_
Definition: State.h:528
KeyScheduler* fizz::client::State::keyScheduler ( ) const
inline

Key scheduler used on this connection.

The state of the key scheduler may change outside of state mutators. Should not be used outside of the state machine.

Definition at line 225 of file State.h.

Referenced by fizz::sm::getMaxEarlyDataSize(), and fizz::sm::handleCertMsg().

225  {
226  return keyScheduler_.get();
227  }
std::unique_ptr< KeyScheduler > keyScheduler_
Definition: State.h:507
auto& fizz::client::State::keyScheduler ( )
inline

Definition at line 360 of file State.h.

360  {
361  return keyScheduler_;
362  }
std::unique_ptr< KeyScheduler > keyScheduler_
Definition: State.h:507
const Buf& fizz::client::State::legacySessionId ( ) const
inline

Legacy session ID sent by the client. Will be empty unless compatibility mode is in use.

Definition at line 208 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers(), and fizz::sm::negotiatePsk().

208  {
209  return *legacySessionId_;
210  }
folly::Optional< Buf > legacySessionId_
Definition: State.h:537
auto& fizz::client::State::legacySessionId ( )
inline

Definition at line 452 of file State.h.

452  {
453  return legacySessionId_;
454  }
folly::Optional< Buf > legacySessionId_
Definition: State.h:537
folly::Optional<PskKeyExchangeMode> fizz::client::State::pskMode ( ) const
inline

Psk key exchange mode used on this connection, if a psk was accepted.

Definition at line 142 of file State.h.

Referenced by fizz::client::AsyncFizzClientT< SM >::pskResumed().

142  {
143  return pskMode_;
144  }
folly::Optional< PskKeyExchangeMode > pskMode_
Definition: State.h:527
auto& fizz::client::State::pskMode ( )
inline

Definition at line 420 of file State.h.

420  {
421  return pskMode_;
422  }
folly::Optional< PskKeyExchangeMode > pskMode_
Definition: State.h:527
folly::Optional<PskType> fizz::client::State::pskType ( ) const
inline

Psk handshake flow used on this connection (psk not sent, psk rejected, psk accepted, etc.).

Definition at line 135 of file State.h.

Referenced by fizz::sm::validateAcceptedEarly().

135  {
136  return pskType_;
137  }
folly::Optional< PskType > pskType_
Definition: State.h:526
auto& fizz::client::State::pskType ( )
inline

Definition at line 416 of file State.h.

416  {
417  return pskType_;
418  }
folly::Optional< PskType > pskType_
Definition: State.h:526
ReadRecordLayer* fizz::client::State::readRecordLayer ( ) const
inline

Current read record layer. May be null.

The state of the read record layer may change outside of state mutators. Should not be used outside of the state machine.

Definition at line 235 of file State.h.

Referenced by fizz::sm::getMaxEarlyDataSize(), fizz::sm::handleCertMsg(), fizz::sm::negotiatePsk(), and fizz::client::ClientStateMachine::processSocketData().

235  {
236  return readRecordLayer_.get();
237  }
std::unique_ptr< ReadRecordLayer > readRecordLayer_
Definition: State.h:509
auto& fizz::client::State::readRecordLayer ( )
inline

Definition at line 364 of file State.h.

364  {
365  return readRecordLayer_;
366  }
std::unique_ptr< ReadRecordLayer > readRecordLayer_
Definition: State.h:509
const folly::Optional<std::vector<ExtensionType> >& fizz::client::State::requestedExtensions ( ) const
inline

Contains the extensions requested in the initial ClientHello. Used to later verify extensions sent by the server.

Should not be used outside of the state machine.

Definition at line 273 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers(), fizz::sm::negotiatePsk(), and fizz::sm::validateAcceptedEarly().

274  {
275  return requestedExtensions_;
276  }
folly::Optional< std::vector< ExtensionType > > requestedExtensions_
Definition: State.h:542
auto& fizz::client::State::requestedExtensions ( )
inline

Definition at line 468 of file State.h.

468  {
469  return requestedExtensions_;
470  }
folly::Optional< std::vector< ExtensionType > > requestedExtensions_
Definition: State.h:542
const Buf& fizz::client::State::resumptionSecret ( ) const
inline

Resumption secret.

Shoiuld not

Definition at line 301 of file State.h.

Referenced by fizz::sm::getMaxEarlyDataSize(), and fizz::sm::handleCertMsg().

301  {
302  return *resumptionSecret_;
303  }
folly::Optional< Buf > resumptionSecret_
Definition: State.h:546
auto& fizz::client::State::resumptionSecret ( )
inline

Definition at line 480 of file State.h.

480  {
481  return resumptionSecret_;
482  }
folly::Optional< Buf > resumptionSecret_
Definition: State.h:546
std::shared_ptr<const SelfCert> fizz::client::State::selectedClientCert ( ) const
inline

The certificate selected for client authentication (prior to being sent).

Should not be used outside of the state machine.

Definition at line 320 of file State.h.

Referenced by fizz::sm::handleCertMsg().

320  {
321  return selectedClientCert_;
322  }
std::shared_ptr< const SelfCert > selectedClientCert_
Definition: State.h:517
auto& fizz::client::State::selectedClientCert ( )
inline

Definition at line 388 of file State.h.

388  {
389  return selectedClientCert_;
390  }
std::shared_ptr< const SelfCert > selectedClientCert_
Definition: State.h:517
bool fizz::client::State::sentCCS ( ) const
inline

Whether we sent a CCS due to compatibility mode.

Definition at line 215 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers(), fizz::sm::handleCertMsg(), and fizz::sm::handleEarlyAppWrite().

215  {
216  return sentCCS_;
217  }
auto& fizz::client::State::sentCCS ( )
inline

Definition at line 456 of file State.h.

456  {
457  return sentCCS_;
458  }
std::shared_ptr<const Cert> fizz::client::State::serverCert ( ) const
inline

The certificate used by the server for authentication.

Definition at line 77 of file State.h.

Referenced by fizz::client::earlyParametersMatch(), fizz::sm::getMaxEarlyDataSize(), fizz::client::AsyncFizzClientT< SM >::getPeerCertificate(), and fizz::sm::validateAcceptedEarly().

77  {
78  return serverCert_;
79  }
std::shared_ptr< const Cert > serverCert_
Definition: State.h:515
auto& fizz::client::State::serverCert ( )
inline

Definition at line 380 of file State.h.

380  {
381  return serverCert_;
382  }
std::shared_ptr< const Cert > serverCert_
Definition: State.h:515
const folly::Optional<CertificateCompressionAlgorithm>& fizz::client::State::serverCertCompAlgo ( ) const
inline

Compression algorithm used for server certificates (if any).

Definition at line 184 of file State.h.

185  {
186  return serverCertCompAlgo_;
187  }
folly::Optional< CertificateCompressionAlgorithm > serverCertCompAlgo_
Definition: State.h:532
auto& fizz::client::State::serverCertCompAlgo ( )
inline

Definition at line 444 of file State.h.

444  {
445  return serverCertCompAlgo_;
446  }
folly::Optional< CertificateCompressionAlgorithm > serverCertCompAlgo_
Definition: State.h:532
const Buf& fizz::client::State::serverHandshakeSecret ( ) const
inline

Server handshake secret.

Should not be used outside of the state machine.

Definition at line 292 of file State.h.

Referenced by fizz::sm::handleCertMsg().

292  {
293  return *serverHandshakeSecret_;
294  }
folly::Optional< Buf > serverHandshakeSecret_
Definition: State.h:545
auto& fizz::client::State::serverHandshakeSecret ( )
inline

Definition at line 476 of file State.h.

476  {
477  return serverHandshakeSecret_;
478  }
folly::Optional< Buf > serverHandshakeSecret_
Definition: State.h:545
folly::Optional<SignatureScheme> fizz::client::State::sigScheme ( ) const
inline

The signature scheme used if server authentication was used.

Definition at line 127 of file State.h.

127  {
128  return sigScheme_;
129  }
folly::Optional< SignatureScheme > sigScheme_
Definition: State.h:525
auto& fizz::client::State::sigScheme ( )
inline

Definition at line 412 of file State.h.

412  {
413  return sigScheme_;
414  }
folly::Optional< SignatureScheme > sigScheme_
Definition: State.h:525
const folly::Optional<std::string>& fizz::client::State::sni ( ) const
inline

Server name that was sent in the SNI extensions.

Definition at line 177 of file State.h.

References sni_.

Referenced by fizz::sm::getHrrKeyExchangers().

177  {
178  return sni_;
179  }
folly::Optional< std::string > sni_
Definition: State.h:531
auto& fizz::client::State::sni ( )
inline

Definition at line 440 of file State.h.

References sni_.

440  {
441  return sni_;
442  }
folly::Optional< std::string > sni_
Definition: State.h:531
StateEnum fizz::client::State::state ( ) const
inline

Current state of the connection.

Definition at line 63 of file State.h.

Referenced by fizz::client::detail::handleError(), fizz::client::detail::handleInvalidEvent(), and fizz::client::detail::processEvent().

63  {
64  return state_;
65  }
StateEnum state_
Definition: State.h:501
auto& fizz::client::State::state ( )
inline

Definition at line 348 of file State.h.

348  {
349  return state_;
350  }
StateEnum state_
Definition: State.h:501
const std::vector<std::shared_ptr<const PeerCert> >& fizz::client::State::unverifiedCertChain ( ) const
inline

Server certificate chain that has not yet been verified.

Should not be used outside of the state machine.

Definition at line 310 of file State.h.

Referenced by fizz::sm::handleCertMsg().

311  {
312  return *unverifiedCertChain_;
313  }
folly::Optional< std::vector< std::shared_ptr< const PeerCert > > > unverifiedCertChain_
Definition: State.h:549
auto& fizz::client::State::unverifiedCertChain ( )
inline

Definition at line 484 of file State.h.

484  {
485  return unverifiedCertChain_;
486  }
folly::Optional< std::vector< std::shared_ptr< const PeerCert > > > unverifiedCertChain_
Definition: State.h:549
const CertificateVerifier* fizz::client::State::verifier ( ) const
inline

Certificate verifier to be used to verify server certificates on this connection.

Definition at line 193 of file State.h.

References verifier_.

Referenced by fizz::sm::handleCertMsg().

193  {
194  return verifier_.get();
195  }
std::shared_ptr< const CertificateVerifier > verifier_
Definition: State.h:505
auto& fizz::client::State::verifier ( )
inline

Definition at line 356 of file State.h.

References verifier_.

356  {
357  return verifier_;
358  }
std::shared_ptr< const CertificateVerifier > verifier_
Definition: State.h:505
folly::Optional<ProtocolVersion> fizz::client::State::version ( ) const
inline

Protocol version negotiated on this connection.

Definition at line 106 of file State.h.

Referenced by fizz::client::earlyParametersMatch(), fizz::sm::getHrrKeyExchangers(), fizz::sm::getMaxEarlyDataSize(), fizz::sm::handleCertMsg(), and fizz::sm::validateNegotiationConsistency().

106  {
107  return version_;
108  }
folly::Optional< ProtocolVersion > version_
Definition: State.h:522
auto& fizz::client::State::version ( )
inline

Definition at line 400 of file State.h.

400  {
401  return version_;
402  }
folly::Optional< ProtocolVersion > version_
Definition: State.h:522
const WriteRecordLayer* fizz::client::State::writeRecordLayer ( ) const
inline

Current write record layer. May be null.

The state of the write record layer may change outside of state mutators. Should not be used outside of the state machine.

Definition at line 245 of file State.h.

Referenced by fizz::sm::getHrrKeyExchangers(), fizz::sm::getMaxEarlyDataSize(), fizz::client::detail::handleAppClose(), fizz::sm::handleCertMsg(), fizz::sm::handleEarlyAppWrite(), and fizz::client::detail::handleError().

245  {
246  return writeRecordLayer_.get();
247  }
std::unique_ptr< WriteRecordLayer > writeRecordLayer_
Definition: State.h:510
auto& fizz::client::State::writeRecordLayer ( )
inline

Definition at line 368 of file State.h.

368  {
369  return writeRecordLayer_;
370  }
std::unique_ptr< WriteRecordLayer > writeRecordLayer_
Definition: State.h:510

Member Data Documentation

folly::Optional<std::string> fizz::client::State::alpn_
private

Definition at line 530 of file State.h.

folly::Optional<CachedPsk> fizz::client::State::attemptedPsk_
private

Definition at line 550 of file State.h.

folly::Optional<CipherSuite> fizz::client::State::cipher_
private

Definition at line 523 of file State.h.

folly::Optional<ClientAuthType> fizz::client::State::clientAuthRequested_
private

Definition at line 519 of file State.h.

folly::Optional<SignatureScheme> fizz::client::State::clientAuthSigScheme_
private

Definition at line 520 of file State.h.

std::shared_ptr<const Cert> fizz::client::State::clientCert_
private

Definition at line 516 of file State.h.

folly::Optional<Buf> fizz::client::State::clientHandshakeSecret_
private

Definition at line 544 of file State.h.

folly::Optional<Random> fizz::client::State::clientRandom_
private

Definition at line 536 of file State.h.

std::shared_ptr<const FizzClientContext> fizz::client::State::context_
private

Definition at line 503 of file State.h.

folly::Optional<EarlyDataParams> fizz::client::State::earlyDataParams_
private

Definition at line 534 of file State.h.

folly::Optional<EarlyDataType> fizz::client::State::earlyDataType_
private

Definition at line 529 of file State.h.

std::unique_ptr<EncryptedWriteRecordLayer> fizz::client::State::earlyWriteRecordLayer_
private

Definition at line 511 of file State.h.

folly::Optional<Buf> fizz::client::State::encodedClientHello_
private

Definition at line 539 of file State.h.

folly::Optional<Buf> fizz::client::State::exporterMasterSecret_
private

Definition at line 551 of file State.h.

std::shared_ptr<ClientExtensions> fizz::client::State::extensions_
private

Definition at line 552 of file State.h.

folly::Optional<NamedGroup> fizz::client::State::group_
private

Definition at line 524 of file State.h.

std::unique_ptr<HandshakeContext> fizz::client::State::handshakeContext_
mutableprivate

Definition at line 513 of file State.h.

folly::Optional<std::map<NamedGroup, std::unique_ptr<KeyExchange> > > fizz::client::State::keyExchangers_
mutableprivate

Definition at line 541 of file State.h.

folly::Optional<KeyExchangeType> fizz::client::State::keyExchangeType_
private

Definition at line 528 of file State.h.

std::unique_ptr<KeyScheduler> fizz::client::State::keyScheduler_
private

Definition at line 507 of file State.h.

folly::Optional<Buf> fizz::client::State::legacySessionId_
private

Definition at line 537 of file State.h.

folly::Optional<PskKeyExchangeMode> fizz::client::State::pskMode_
private

Definition at line 527 of file State.h.

folly::Optional<PskType> fizz::client::State::pskType_
private

Definition at line 526 of file State.h.

std::unique_ptr<ReadRecordLayer> fizz::client::State::readRecordLayer_
private

Definition at line 509 of file State.h.

folly::Optional<std::vector<ExtensionType> > fizz::client::State::requestedExtensions_
private

Definition at line 542 of file State.h.

folly::Optional<Buf> fizz::client::State::resumptionSecret_
private

Definition at line 546 of file State.h.

std::shared_ptr<const SelfCert> fizz::client::State::selectedClientCert_
private

Definition at line 517 of file State.h.

bool fizz::client::State::sentCCS_ {false}
private

Definition at line 538 of file State.h.

std::shared_ptr<const Cert> fizz::client::State::serverCert_
private

Definition at line 515 of file State.h.

folly::Optional<CertificateCompressionAlgorithm> fizz::client::State::serverCertCompAlgo_
private

Definition at line 532 of file State.h.

folly::Optional<Buf> fizz::client::State::serverHandshakeSecret_
private

Definition at line 545 of file State.h.

folly::Optional<SignatureScheme> fizz::client::State::sigScheme_
private

Definition at line 525 of file State.h.

folly::Optional<std::string> fizz::client::State::sni_
private

Definition at line 531 of file State.h.

StateEnum fizz::client::State::state_ {StateEnum::Uninitialized}
private

Definition at line 501 of file State.h.

folly::Optional<std::vector<std::shared_ptr<const PeerCert> > > fizz::client::State::unverifiedCertChain_
private

Definition at line 549 of file State.h.

std::shared_ptr<const CertificateVerifier> fizz::client::State::verifier_
private

Definition at line 505 of file State.h.

folly::Optional<ProtocolVersion> fizz::client::State::version_
private

Definition at line 522 of file State.h.

std::unique_ptr<WriteRecordLayer> fizz::client::State::writeRecordLayer_
private

Definition at line 510 of file State.h.


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