#[non_exhaustive]pub enum InvalidMessage {
Show 21 variants
CertificatePayloadTooLarge,
HandshakePayloadTooLarge,
InvalidCcs,
InvalidContentType,
InvalidCertificateStatusType,
InvalidCertRequest,
InvalidDhParams,
InvalidEmptyPayload,
InvalidKeyUpdate,
InvalidServerName,
MessageTooLarge,
MessageTooShort,
MissingData(&'static str),
MissingKeyExchange,
NoSignatureSchemes,
TrailingData(&'static str),
UnexpectedMessage(&'static str),
UnknownProtocolVersion,
UnsupportedCompression,
UnsupportedCurveType,
UnsupportedKeyExchangeAlgorithm(KeyExchangeAlgorithm),
}
Expand description
A corrupt TLS message payload that resulted in an error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CertificatePayloadTooLarge
A certificate payload exceeded rustls’s 64KB limit
HandshakePayloadTooLarge
An advertised message was larger then expected.
InvalidCcs
The peer sent us a syntactically incorrect ChangeCipherSpec payload.
InvalidContentType
An unknown content type was encountered during message decoding.
InvalidCertificateStatusType
A peer sent an invalid certificate status type
InvalidCertRequest
Context was incorrectly attached to a certificate request during a handshake.
InvalidDhParams
A peer’s DH params could not be decoded
InvalidEmptyPayload
A message was zero-length when its record kind forbids it.
InvalidKeyUpdate
A peer sent an unexpected key update request.
InvalidServerName
A peer’s server name could not be decoded
MessageTooLarge
A TLS message payload was larger then allowed by the specification.
MessageTooShort
Message is shorter than the expected length
MissingData(&'static str)
Missing data for the named handshake payload value
MissingKeyExchange
A peer did not advertise its supported key exchange groups.
NoSignatureSchemes
A peer sent an empty list of signature schemes
TrailingData(&'static str)
Trailing data found for the named handshake payload value
UnexpectedMessage(&'static str)
A peer sent an unexpected message type.
UnknownProtocolVersion
An unknown TLS protocol was encountered during message decoding.
UnsupportedCompression
A peer sent a non-null compression method.
UnsupportedCurveType
A peer sent an unknown elliptic curve type.
UnsupportedKeyExchangeAlgorithm(KeyExchangeAlgorithm)
A peer sent an unsupported key exchange algorithm.
Trait Implementations§
Source§impl Clone for InvalidMessage
impl Clone for InvalidMessage
Source§fn clone(&self) -> InvalidMessage
fn clone(&self) -> InvalidMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InvalidMessage
impl Debug for InvalidMessage
Source§impl From<InvalidMessage> for Error
impl From<InvalidMessage> for Error
Source§fn from(e: InvalidMessage) -> Self
fn from(e: InvalidMessage) -> Self
Source§impl PartialEq for InvalidMessage
impl PartialEq for InvalidMessage
impl Copy for InvalidMessage
impl StructuralPartialEq for InvalidMessage
Auto Trait Implementations§
impl Freeze for InvalidMessage
impl RefUnwindSafe for InvalidMessage
impl Send for InvalidMessage
impl Sync for InvalidMessage
impl Unpin for InvalidMessage
impl UnwindSafe for InvalidMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
CertificatePayloadTooLarge
: 0 bytesHandshakePayloadTooLarge
: 0 bytesInvalidCcs
: 0 bytesInvalidContentType
: 0 bytesInvalidCertificateStatusType
: 0 bytesInvalidCertRequest
: 0 bytesInvalidDhParams
: 0 bytesInvalidEmptyPayload
: 0 bytesInvalidKeyUpdate
: 0 bytesInvalidServerName
: 0 bytesMessageTooLarge
: 0 bytesMessageTooShort
: 0 bytesMissingData
: 23 bytesMissingKeyExchange
: 0 bytesNoSignatureSchemes
: 0 bytesTrailingData
: 23 bytesUnexpectedMessage
: 23 bytesUnknownProtocolVersion
: 0 bytesUnsupportedCompression
: 0 bytesUnsupportedCurveType
: 0 bytesUnsupportedKeyExchangeAlgorithm
: 1 byte