Enum w5500_tls::AlertDescription
source · #[non_exhaustive]#[repr(u8)]pub enum AlertDescription {
Show 27 variants
CloseNotify = 0,
UnexpectedMessage = 10,
BadRecordMac = 20,
RecordOverflow = 22,
HandshakeFailure = 40,
BadCertificate = 42,
UnsupportedCertificate = 43,
CertificateRevoked = 44,
CertificateExpired = 45,
CertificateUnknown = 46,
IllegalParameter = 47,
UnknownCa = 48,
AccessDenied = 49,
DecodeError = 50,
DecryptError = 51,
ProtocolVersion = 70,
InsufficientSecurity = 71,
InternalError = 80,
InappropriateFallback = 86,
UserCanceled = 90,
MissingExtension = 109,
UnsupportedExtension = 110,
UnrecognizedName = 112,
BadCertificateStatusResponse = 113,
UnknownPskIdentity = 115,
CertificateRequired = 116,
NoApplicationProtocol = 120,
}
Expand description
Alert description.
References
enum {
close_notify(0),
unexpected_message(10),
bad_record_mac(20),
record_overflow(22),
handshake_failure(40),
bad_certificate(42),
unsupported_certificate(43),
certificate_revoked(44),
certificate_expired(45),
certificate_unknown(46),
illegal_parameter(47),
unknown_ca(48),
access_denied(49),
decode_error(50),
decrypt_error(51),
protocol_version(70),
insufficient_security(71),
internal_error(80),
inappropriate_fallback(86),
user_canceled(90),
missing_extension(109),
unsupported_extension(110),
unrecognized_name(112),
bad_certificate_status_response(113),
unknown_psk_identity(115),
certificate_required(116),
no_application_protocol(120),
(255)
} AlertDescription;
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CloseNotify = 0
This alert notifies the recipient that the sender will not send any more messages on this connection. Any data received after a closure alert has been received MUST be ignored.
UnexpectedMessage = 10
An inappropriate message (e.g., the wrong handshake message, premature Application Data, etc.) was received. This alert should never be observed in communication between proper implementations.
BadRecordMac = 20
This alert is returned if a record is received which cannot be deprotected. Because AEAD algorithms combine decryption and verification, and also to avoid side-channel attacks, this alert is used for all deprotection failures. This alert should never be observed in communication between proper implementations, except when messages were corrupted in the network.
RecordOverflow = 22
A TLSCiphertext record was received that had a
length more than 2^14 + 256
bytes, or a record decrypted to a
TLSPlaintext record with more than 2^14
bytes (or some other
negotiated limit). This alert should never be observed in
communication between proper implementations, except when messages
were corrupted in the network.
HandshakeFailure = 40
Receipt of a handshake_failure
alert message
indicates that the sender was unable to negotiate an acceptable
set of security parameters given the options available.
BadCertificate = 42
A certificate was corrupt, contained signatures that did not verify correctly, etc.
UnsupportedCertificate = 43
A certificate was of an unsupported type.
CertificateRevoked = 44
A certificate was revoked by its signer.
CertificateExpired = 45
A certificate has expired or is not currently valid.
CertificateUnknown = 46
Some other (unspecified) issue arose in processing the certificate, rendering it unacceptable.
IllegalParameter = 47
A field in the handshake was incorrect or inconsistent with other fields. This alert is used for errors which conform to the formal protocol syntax but are otherwise incorrect.
UnknownCa = 48
A valid certificate chain or partial chain was received, but the certificate was not accepted because the CA certificate could not be located or could not be matched with a known trust anchor.
AccessDenied = 49
A valid certificate or PSK was received, but when access control was applied, the sender decided not to proceed with negotiation.
DecodeError = 50
A message could not be decoded because some field was out of the specified range or the length of the message was incorrect. This alert is used for errors where the message does not conform to the formal protocol syntax. This alert should never be observed in communication between proper implementations, except when messages were corrupted in the network.
DecryptError = 51
A handshake (not record layer) cryptographic operation failed, including being unable to correctly verify a signature or validate a Finished message or a PSK binder.
ProtocolVersion = 70
The protocol version the peer has attempted to negotiate is recognized but not supported.
InsufficientSecurity = 71
Returned instead of handshake_failure
when
a negotiation has failed specifically because the server requires
parameters more secure than those supported by the client.
InternalError = 80
An internal error unrelated to the peer or the correctness of the protocol (such as a memory allocation failure) makes it impossible to continue.
InappropriateFallback = 86
Sent by a server in response to an invalid connection retry attempt from a client (see RFC 7507).
UserCanceled = 90
This alert notifies the recipient that the sender is
canceling the handshake for some reason unrelated to a protocol
failure. If a user cancels an operation after the handshake is
complete, just closing the connection by sending a close_notify
is more appropriate. This alert SHOULD be followed by a
close_notify
. This alert generally has AlertLevel::Warning
.
MissingExtension = 109
Sent by endpoints that receive a handshake message not containing an extension that is mandatory to send for the offered TLS version or other negotiated parameters.
UnsupportedExtension = 110
Sent by endpoints receiving any handshake
message containing an extension known to be prohibited for
inclusion in the given handshake message, or including any
extensions in a ServerHello
or Certificate
not first offered in
the corresponding ClientHello
or CertificateRequest
.
UnrecognizedName = 112
Sent by servers when no server exists identified
by the name provided by the client via the server_name
extension
(see RFC 6066).
BadCertificateStatusResponse = 113
Sent by clients when an invalid or
unacceptable OCSP response is provided by the server via the
status_request
extension (see RFC 6066).
UnknownPskIdentity = 115
Sent by servers when PSK key establishment is
desired but no acceptable PSK identity is provided by the client.
Sending this alert is OPTIONAL; servers MAY instead choose to send
a decrypt_error
alert to merely indicate an invalid PSK
identity.
CertificateRequired = 116
Sent by servers when a client certificate is desired but none was provided by the client.
NoApplicationProtocol = 120
Sent by servers when a client
application_layer_protocol_negotiation
extension advertises only
protocols that the server does not support (see RFC 7301).
Trait Implementations§
source§impl Clone for AlertDescription
impl Clone for AlertDescription
source§fn clone(&self) -> AlertDescription
fn clone(&self) -> AlertDescription
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AlertDescription
impl Debug for AlertDescription
source§impl Format for AlertDescription
impl Format for AlertDescription
source§impl From<AlertDescription> for u8
impl From<AlertDescription> for u8
source§fn from(alert_description: AlertDescription) -> Self
fn from(alert_description: AlertDescription) -> Self
source§impl PartialEq for AlertDescription
impl PartialEq for AlertDescription
source§fn eq(&self, other: &AlertDescription) -> bool
fn eq(&self, other: &AlertDescription) -> bool
self
and other
values to be equal, and is used
by ==
.