pub struct TlsExtension<'a> { /* private fields */ }Expand description
A raw TLS extension preserving its type and opaque payload.
Implementations§
Source§impl<'a> TlsExtension<'a>
impl<'a> TlsExtension<'a>
Sourcepub fn quic_transport_parameters(
&self,
) -> Result<QuicTransportParameters<'a>, QuicTransportParametersTlsExtensionError>
pub fn quic_transport_parameters( &self, ) -> Result<QuicTransportParameters<'a>, QuicTransportParametersTlsExtensionError>
Parses this RFC 9001 QUIC transport-parameters extension payload.
RFC 9001 permits this extension in ClientHello and EncryptedExtensions and requires it in both. Callers that own the parent handshake-message context enforce its placement and presence; this accessor parses only the extension payload.
Source§impl<'a> TlsExtension<'a>
impl<'a> TlsExtension<'a>
Sourcepub const fn extension_type(&self) -> TlsExtensionType
pub const fn extension_type(&self) -> TlsExtensionType
Returns the raw extension type.
Sourcepub fn client_server_name_list(
&self,
) -> Result<ClientServerNameList<'a>, TlsParseError>
pub fn client_server_name_list( &self, ) -> Result<ClientServerNameList<'a>, TlsParseError>
Parses the ClientHello server_name list layout.
Sourcepub fn server_name_acknowledgement(&self) -> Result<(), TlsParseError>
pub fn server_name_acknowledgement(&self) -> Result<(), TlsParseError>
Validates the empty ServerHello server_name acknowledgement.
Sourcepub fn alpn_protocol_list(&self) -> Result<AlpnProtocolList<'a>, TlsParseError>
pub fn alpn_protocol_list(&self) -> Result<AlpnProtocolList<'a>, TlsParseError>
Parses an ordered ALPN protocol-name list.
Sourcepub fn server_selected_alpn(
&self,
) -> Result<ServerSelectedAlpn<'a>, TlsParseError>
pub fn server_selected_alpn( &self, ) -> Result<ServerSelectedAlpn<'a>, TlsParseError>
Parses the single protocol selected by a server ALPN extension.
Sourcepub fn client_supported_versions(
&self,
) -> Result<ClientSupportedVersions<'a>, TlsParseError>
pub fn client_supported_versions( &self, ) -> Result<ClientSupportedVersions<'a>, TlsParseError>
Parses the ClientHello supported_versions vector.
Sourcepub fn server_supported_version(
&self,
) -> Result<TlsProtocolVersion, TlsParseError>
pub fn server_supported_version( &self, ) -> Result<TlsProtocolVersion, TlsParseError>
Returns the selected server or HelloRetryRequest protocol version.
Sourcepub fn server_supported_version_view(
&self,
) -> Result<ServerSupportedVersion, TlsParseError>
pub fn server_supported_version_view( &self, ) -> Result<ServerSupportedVersion, TlsParseError>
Parses the server or HelloRetryRequest supported_versions layout.
Sourcepub fn supported_groups(&self) -> Result<SupportedGroups<'a>, TlsParseError>
pub fn supported_groups(&self) -> Result<SupportedGroups<'a>, TlsParseError>
Parses the ordered supported named groups.
Sourcepub fn signature_algorithms(
&self,
) -> Result<SignatureAlgorithms<'a>, TlsParseError>
pub fn signature_algorithms( &self, ) -> Result<SignatureAlgorithms<'a>, TlsParseError>
Parses the signature_algorithms scheme list.
Sourcepub fn signature_algorithms_cert(
&self,
) -> Result<SignatureAlgorithms<'a>, TlsParseError>
pub fn signature_algorithms_cert( &self, ) -> Result<SignatureAlgorithms<'a>, TlsParseError>
Parses the signature_algorithms_cert scheme list.
Sourcepub fn ec_point_formats(&self) -> Result<EcPointFormats<'a>, TlsParseError>
pub fn ec_point_formats(&self) -> Result<EcPointFormats<'a>, TlsParseError>
Parses the legacy EC point-format list.
Parses the ClientHello key-share entry vector.
Parses the single ServerHello key-share entry.
Parses the selected HelloRetryRequest key-share group.
Sourcepub fn psk_key_exchange_modes(
&self,
) -> Result<PskKeyExchangeModes<'a>, TlsParseError>
pub fn psk_key_exchange_modes( &self, ) -> Result<PskKeyExchangeModes<'a>, TlsParseError>
Parses the ordered PSK key-exchange modes.
Parses ClientHello PSK identities and binders.
Parses the ServerHello selected PSK identity.
Sourcepub fn certificate_compression_algorithms(
&self,
) -> Result<CertificateCompressionAlgorithms<'a>, TlsParseError>
pub fn certificate_compression_algorithms( &self, ) -> Result<CertificateCompressionAlgorithms<'a>, TlsParseError>
Parses the offered certificate-compression algorithms.
Parses the nonempty cookie vector.
Sourcepub fn early_data_marker(&self) -> Result<(), TlsParseError>
pub fn early_data_marker(&self) -> Result<(), TlsParseError>
Validates an empty ClientHello or EncryptedExtensions early_data marker.
Sourcepub fn early_data_max_size(&self) -> Result<u32, TlsParseError>
pub fn early_data_max_size(&self) -> Result<u32, TlsParseError>
Parses a NewSessionTicket maximum early-data size.