proxygen
Types.h File Reference
#include <boost/variant.hpp>
#include <folly/Optional.h>
#include <folly/io/Cursor.h>
#include <folly/io/IOBuf.h>
#include <fizz/protocol/Events.h>
#include <fizz/record/Types-inl.h>

Go to the source code of this file.

Classes

struct  fizz::TLSMessage
 
struct  fizz::message_hash
 
struct  fizz::HandshakeStruct< e, t >
 
struct  fizz::Extension
 
struct  fizz::HkdfLabel
 
struct  fizz::ClientHello
 
struct  fizz::ServerHello
 
struct  fizz::HelloRetryRequest
 
struct  fizz::EndOfEarlyData
 
struct  fizz::EncryptedExtensions
 
struct  fizz::CertificateEntry
 
struct  fizz::CertificateMsg
 
struct  fizz::CompressedCertificate
 
struct  fizz::CertificateRequest
 
struct  fizz::CertificateVerify
 
struct  fizz::Finished
 
struct  fizz::NewSessionTicket
 
struct  fizz::KeyUpdate
 
struct  fizz::Alert
 
class  fizz::FizzException
 

Namespaces

 fizz
 

Typedefs

using fizz::Buf = std::unique_ptr< folly::IOBuf >
 
using fizz::Random = std::array< uint8_t, 32 >
 

Enumerations

enum  fizz::ProtocolVersion : uint16_t {
  fizz::ProtocolVersion::tls_1_0 = 0x0301, fizz::ProtocolVersion::tls_1_1 = 0x0302, fizz::ProtocolVersion::tls_1_2 = 0x0303, fizz::ProtocolVersion::tls_1_3 = 0x0304,
  fizz::ProtocolVersion::tls_1_3_20 = 0x7f14, fizz::ProtocolVersion::tls_1_3_20_fb = 0xfb14, fizz::ProtocolVersion::tls_1_3_21 = 0x7f15, fizz::ProtocolVersion::tls_1_3_21_fb = 0xfb15,
  fizz::ProtocolVersion::tls_1_3_22 = 0x7f16, fizz::ProtocolVersion::tls_1_3_22_fb = 0xfb16, fizz::ProtocolVersion::tls_1_3_23 = 0x7f17, fizz::ProtocolVersion::tls_1_3_23_fb = 0xfb17,
  fizz::ProtocolVersion::tls_1_3_26 = 0x7f1a, fizz::ProtocolVersion::tls_1_3_26_fb = 0xfb1a, fizz::ProtocolVersion::tls_1_3_28 = 0x7f1c
}
 
enum  fizz::ContentType : uint8_t { fizz::ContentType::alert = 21, fizz::ContentType::handshake = 22, fizz::ContentType::application_data = 23, fizz::ContentType::change_cipher_spec = 20 }
 
enum  fizz::HandshakeType : uint8_t {
  fizz::HandshakeType::client_hello = 1, fizz::HandshakeType::server_hello = 2, fizz::HandshakeType::new_session_ticket = 4, fizz::HandshakeType::end_of_early_data = 5,
  fizz::HandshakeType::hello_retry_request = 6, fizz::HandshakeType::encrypted_extensions = 8, fizz::HandshakeType::certificate = 11, fizz::HandshakeType::certificate_request = 13,
  fizz::HandshakeType::certificate_verify = 15, fizz::HandshakeType::finished = 20, fizz::HandshakeType::key_update = 24, fizz::HandshakeType::compressed_certificate = 240,
  fizz::HandshakeType::message_hash = 254
}
 
enum  fizz::ExtensionType : uint16_t {
  fizz::ExtensionType::server_name = 0, fizz::ExtensionType::supported_groups = 10, fizz::ExtensionType::signature_algorithms = 13, fizz::ExtensionType::application_layer_protocol_negotiation = 16,
  fizz::ExtensionType::token_binding = 24, fizz::ExtensionType::quic_transport_parameters = 26, fizz::ExtensionType::key_share_old = 40, fizz::ExtensionType::pre_shared_key = 41,
  fizz::ExtensionType::early_data = 42, fizz::ExtensionType::supported_versions = 43, fizz::ExtensionType::cookie = 44, fizz::ExtensionType::psk_key_exchange_modes = 45,
  fizz::ExtensionType::certificate_authorities = 47, fizz::ExtensionType::post_handshake_auth = 49, fizz::ExtensionType::signature_algorithms_cert = 50, fizz::ExtensionType::key_share = 51,
  fizz::ExtensionType::compress_certificate = 0xff02
}
 
enum  fizz::AlertDescription : uint8_t {
  fizz::AlertDescription::close_notify = 0, fizz::AlertDescription::end_of_early_data = 1, fizz::AlertDescription::unexpected_message = 10, fizz::AlertDescription::bad_record_mac = 20,
  fizz::AlertDescription::record_overflow = 22, fizz::AlertDescription::handshake_failure = 40, fizz::AlertDescription::bad_certificate = 42, fizz::AlertDescription::unsupported_certificate = 43,
  fizz::AlertDescription::certificate_revoked = 44, fizz::AlertDescription::certificate_expired = 45, fizz::AlertDescription::certificate_unknown = 46, fizz::AlertDescription::illegal_parameter = 47,
  fizz::AlertDescription::unknown_ca = 48, fizz::AlertDescription::access_denied = 49, fizz::AlertDescription::decode_error = 50, fizz::AlertDescription::decrypt_error = 51,
  fizz::AlertDescription::protocol_version = 70, fizz::AlertDescription::insufficient_security = 71, fizz::AlertDescription::internal_error = 80, fizz::AlertDescription::inappropriate_fallback = 86,
  fizz::AlertDescription::user_canceled = 90, fizz::AlertDescription::missing_extension = 109, fizz::AlertDescription::unsupported_extension = 110, fizz::AlertDescription::certificate_unobtainable = 111,
  fizz::AlertDescription::unrecognized_name = 112, fizz::AlertDescription::bad_certificate_status_response = 113, fizz::AlertDescription::bad_certificate_hash_value = 114, fizz::AlertDescription::unknown_psk_identity = 115,
  fizz::AlertDescription::certificate_required = 116
}
 
enum  fizz::CipherSuite : uint16_t { fizz::CipherSuite::TLS_AES_128_GCM_SHA256 = 0x1301, fizz::CipherSuite::TLS_AES_256_GCM_SHA384 = 0x1302, fizz::CipherSuite::TLS_CHACHA20_POLY1305_SHA256 = 0x1303, fizz::CipherSuite::TLS_AES_128_OCB_SHA256_EXPERIMENTAL = 0xFF01 }
 
enum  fizz::PskKeyExchangeMode : uint8_t { fizz::PskKeyExchangeMode::psk_ke = 0, fizz::PskKeyExchangeMode::psk_dhe_ke = 1 }
 
enum  fizz::CertificateCompressionAlgorithm : uint16_t { fizz::CertificateCompressionAlgorithm::zlib = 1 }
 
enum  fizz::SignatureScheme : uint16_t {
  fizz::SignatureScheme::ecdsa_secp256r1_sha256 = 0x0403, fizz::SignatureScheme::ecdsa_secp384r1_sha384 = 0x0503, fizz::SignatureScheme::ecdsa_secp521r1_sha512 = 0x0603, fizz::SignatureScheme::rsa_pss_sha256 = 0x0804,
  fizz::SignatureScheme::rsa_pss_sha384 = 0x0805, fizz::SignatureScheme::rsa_pss_sha512 = 0x0806, fizz::SignatureScheme::ed25519 = 0x0807, fizz::SignatureScheme::ed448 = 0x0808
}
 
enum  fizz::KeyUpdateRequest : uint8_t { fizz::KeyUpdateRequest::update_not_requested = 0, fizz::KeyUpdateRequest::update_requested = 1 }
 
enum  fizz::NamedGroup : uint16_t { fizz::NamedGroup::secp256r1 = 23, fizz::NamedGroup::secp384r1 = 24, fizz::NamedGroup::secp521r1 = 25, fizz::NamedGroup::x25519 = 29 }
 

Functions

ProtocolVersion fizz::getRealDraftVersion (ProtocolVersion version)
 
std::string fizz::toString (ProtocolVersion version)
 
std::string fizz::toString (ExtensionType extType)
 
std::string fizz::toString (AlertDescription alertDesc)
 
std::string fizz::toString (CipherSuite cipher)
 
std::string fizz::toString (PskKeyExchangeMode pskKeMode)
 
std::string fizz::toString (CertificateCompressionAlgorithm algo)
 
std::string fizz::toString (SignatureScheme sigScheme)
 
std::string fizz::toString (NamedGroup group)
 
template<class T >
Buf fizz::encode (T &&t)
 
template<class T >
Buf fizz::encodeHandshake (T &&handshakeMsg)
 
template<class T >
T fizz::decode (std::unique_ptr< folly::IOBuf > &&buf)
 
template<class T >
T fizz::decode (folly::io::Cursor &cursor)
 
template<typename T >
std::string fizz::enumToHex (T enumValue)
 
Buf fizz::encodeHkdfLabel (HkdfLabel &&label, const std::string &hkdfLabelPrefix)
 

Variables

constexpr folly::StringPiece fizz::kHkdfLabelPrefix = "tls13 "
 
constexpr folly::StringPiece fizz::FakeChangeCipherSpec
 
constexpr size_t fizz::kMaxHandshakeSize = 0x20000