跳到主要内容

InvalidMessage

枚举 InvalidMessage 

Source
#[non_exhaustive]
pub enum InvalidMessage {
Show 28 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), EmptyTicketValue, IllegalEmptyList(&'static str), IllegalEmptyValue, DuplicateExtension(u16), PreSharedKeyIsNotFinalExtension, UnknownHelloRetryRequestExtension, UnknownCertificateExtension,
}
展开描述

导致错误的损坏 TLS 消息有效载荷。

变体 (Non-exhaustive)§

This enum is marked as non-exhaustive
非穷尽枚举未来可能添加新的变体。因此,在对非穷尽枚举的变体进行模式匹配时,必须额外增加一个通配符分支以涵盖未来的新变体。
§

CertificatePayloadTooLarge

证书有效载荷超过 rustls 的 64KB 限制

§

HandshakePayloadTooLarge

广播的消息比预期的更大。

§

InvalidCcs

此 peer sent us 一个 syntactically incorrect ChangeCipherSpec payload.

§

InvalidContentType

解码消息时遇到了未知的内容类型。

§

InvalidCertificateStatusType

对端发送了无效的证书状态类型

§

InvalidCertRequest

Context was incorrectly attached 到 一个 certificate request during 一个 handshake.

§

InvalidDhParams

peer 的 DH 参数无法解码

§

InvalidEmptyPayload

记录类型不允许时,消息长度为零。

§

InvalidKeyUpdate

对端发送了预期之外的密钥更新请求。

§

InvalidServerName

peer 的服务器名称无法解码

§

MessageTooLarge

TLS 消息的有效载荷超出了规范允许的大小。

§

MessageTooShort

消息长度小于期望值

§

MissingData(&'static str)

Missing data 用于 the named handshake payload value

§

MissingKeyExchange

对端没有广播它支持的密钥交换群。

§

NoSignatureSchemes

对端发送了一个空的签名方案列表

§

TrailingData(&'static str)

Trailing data found 用于 the named handshake payload value

§

UnexpectedMessage(&'static str)

对端发送了预期之外的消息类型。

§

UnknownProtocolVersion

消息解码时遇到了未知的 TLS 协议版本。

§

UnsupportedCompression

A peer sent 一个 non-null compression method.

§

UnsupportedCurveType

对端发送了未知的楚箭几何类型。

§

UnsupportedKeyExchangeAlgorithm(KeyExchangeAlgorithm)

A peer sent an unsupported key exchange 算法.

§

EmptyTicketValue

服务器发送了一个空 ticket

§

IllegalEmptyList(&'static str)

A peer sent an empty list of items, but 一个 non-empty list is required.

此 argument names the context.

§

IllegalEmptyValue

A peer sent an empty value, but 一个 non-empty value is required.

§

DuplicateExtension(u16)

A peer sent 一个 message where 一个 given extension type was repeated

§

PreSharedKeyIsNotFinalExtension

A peer sent 一个 message with 一个 PSK offer extension in wrong position

§

UnknownHelloRetryRequestExtension

A server sent 一个 HelloRetryRequest with an unknown extension

§

UnknownCertificateExtension

此 peer sent 一个 TLS 1.3 Certificate with an unknown extension

Trait 实现§

Source§

impl Clone for InvalidMessage

Source§

fn clone(&self) -> InvalidMessage

返回值的副本。 更多信息
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment 从 source. 更多信息
Source§

impl Debug for InvalidMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化器格式化此值。 更多信息
Source§

impl From<InvalidMessage> for AlertDescription

Source§

fn from(e: InvalidMessage) -> Self

从输入类型转换为此类型。
Source§

impl From<InvalidMessage> for Error

Source§

fn from(e: InvalidMessage) -> Self

从输入类型转换为此类型。
Source§

impl PartialEq for InvalidMessage

Source§

fn eq(&self, other: &InvalidMessage) -> bool

测试 selfother 值是否相等,供 == 运算符使用。
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

测试 != 运算符。默认实现几乎总是够用,除非有非常充分的理由,否则不应被覆盖。
Source§

impl Copy for InvalidMessage

Source§

impl StructuralPartialEq for InvalidMessage

自动 Trait 实现§

Blanket 实现§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. 更多信息
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows 从 an owned value. 更多信息
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows 从 an owned value. 更多信息
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment 从 selfdest. 更多信息
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

原样返回传入的参数。

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::从(self)

That is, this conversion is whatever the implementation of From<T> 用于 U 的实现方式。

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

获得所有权后的类型。
Source§

fn to_owned(&self) -> T

Creates owned data 从 borrowed data, usually by cloning. 更多信息
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data 到 replace owned data, usually by cloning. 更多信息
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

转换出错时返回的类型。
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行转换。
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

转换出错时返回的类型。
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

执行转换。