#[non_exhaustive]
pub enum InvalidMessage {
Show 20 variants 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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.