#[repr(u8)]pub enum PP2Tlvs<'zc> {
Show 14 variants
TypeAlpn(Cow<'zc, [Cow<'zc, [u8]>]>),
TypeAuthority(Cow<'zc, str>),
TypeCrc32c(u32),
TypeNoop = 4,
TypeUniqId(Cow<'zc, [u8]>),
TypeSsl {
client: PP2TlvClient,
verify: u32,
},
TypeSubtypeSslVersion(Cow<'zc, str>),
TypeSubtypeSslCn(Cow<'zc, str>),
TypeSubtypeSslCipher(Cow<'zc, str>),
TypeSubtypeSslSigAlg(Cow<'zc, str>),
TypeSubtypeSslKeyAlg(Cow<'zc, str>),
TypeSubTypeSslGroup(Cow<'zc, str>),
TypeSubTypeSslSigScheme(Cow<'zc, str>),
TypeNetNs(Cow<'zc, str>),
}Expand description
Can be used for testing.
Variants§
TypeAlpn(Cow<'zc, [Cow<'zc, [u8]>]>)
Application-Layer Protocol Negotiation (ALPN).
TypeAuthority(Cow<'zc, str>)
“SNI” i.e the “server_name” extension as defined by RFC3546 UTF8-encoded string
TypeCrc32c(u32)
32-bit number storing the CRC32c checksum of the PROXY protocol header
TypeNoop = 4
The TLV of this type should be ignored when parsed. The value is zero or more bytes. Can be used for data padding or alignment. Note that it can be used to align only by 3 or more bytes because a TLV can not be smaller than that.
TypeUniqId(Cow<'zc, [u8]>)
opaque byte sequence of up to 128 bytes generated by the upstream proxy that uniquely identifies the connection.
TypeSsl
SSL properties
TypeSubtypeSslVersion(Cow<'zc, str>)
US-ASCII string representation of the TLS version (format?)
TypeSubtypeSslCn(Cow<'zc, str>)
In all cases, the string representation (in UTF8) of the Common Name field (OID: 2.5.4.3) of the client certificate’s Distinguished Name, is appended using the TLV format and the type PP2_SUBTYPE_SSL_CN. E.g. “example.com”.
TypeSubtypeSslCipher(Cow<'zc, str>)
US-ASCII string name of the used cipher, for example “ECDHE-RSA-AES128-GCM-SHA256”.
TypeSubtypeSslSigAlg(Cow<'zc, str>)
US-ASCII string name of the algorithm used to sign the certificate presented by the frontend when the incoming connection was made over an SSL/TLS transport layer, for example “SHA256”.
TypeSubtypeSslKeyAlg(Cow<'zc, str>)
US-ASCII string name of the algorithm used to generate the key of the certificate presented by the frontend when the incoming connection was made over an SSL/TLS transport layer, for example “RSA2048”.
TypeSubTypeSslGroup(Cow<'zc, str>)
US-ASCII string name of the key exchange algorithm used for the frontend TLS connection, for example “secp256r1”.
TypeSubTypeSslSigScheme(Cow<'zc, str>)
US-ASCII string name of the algorithm the frontend used to sign the ServerKeyExchange or CertificateVerify message, for example “rsa_pss_rsae_sha256”.
TypeNetNs(Cow<'zc, str>)
US-ASCII string representation of the namespace’s name
Implementations§
Source§impl<'zc> PP2Tlvs<'zc>
impl<'zc> PP2Tlvs<'zc>
Sourcepub const TLV_TYPE_MAIN_RANGES: &'static [RangeInclusive<u8>]
pub const TLV_TYPE_MAIN_RANGES: &'static [RangeInclusive<u8>]
A constraints by range of all types.
Sourcepub const TLV_TYPE_SSL_SUB_RANGE: &'static [RangeInclusive<u8>]
pub const TLV_TYPE_SSL_SUB_RANGE: &'static [RangeInclusive<u8>]
A constraints for the SSL subtypes.
pub const TYPE_ALPN: u8 = 1u8
pub const TYPE_AUTHORITY: u8 = 2u8
pub const TYPE_CRC32C: u8 = 3u8
pub const TYPE_NOOP: u8 = 4u8
pub const TYPE_UNIQID: u8 = 5u8
pub const TYPE_SSL: u8 = 32u8
pub const TYPE_SUBTYPE_SSL_VERSION: u8 = 33u8
pub const TYPE_SUBTYPE_SSL_CN: u8 = 34u8
pub const TYPE_SUBTYPE_SSL_CIPHER: u8 = 35u8
pub const TYPE_SUBTYPE_SSL_SIGALG: u8 = 36u8
pub const TYPE_SUBTYPE_SSL_KEYALG: u8 = 37u8
Sourcepub const TYPE_SUBTYPE_SSL_GROUP: u8 = 38u8
pub const TYPE_SUBTYPE_SSL_GROUP: u8 = 38u8
TLV PP2_SUBTYPE_SSL_GROUP provides the US-ASCII string name