Enum mbedtls::Error

source ·
pub enum Error {
Show 237 variants AesBadInputData, AesFeatureUnavailable, AesHwAccelFailed, AesInvalidInputLength, AesInvalidKeyLength, Arc4HwAccelFailed, AriaFeatureUnavailable, AriaHwAccelFailed, AriaInvalidInputLength, Asn1AllocFailed, Asn1BufTooSmall, Asn1InvalidData, Asn1InvalidLength, Asn1LengthMismatch, Asn1OutOfData, Asn1UnexpectedTag, Base64BufferTooSmall, Base64InvalidCharacter, BlowfishHwAccelFailed, BlowfishInvalidInputLength, CamelliaHwAccelFailed, CamelliaInvalidInputLength, CcmAuthFailed, CcmBadInput, CcmHwAccelFailed, Chacha20BadInputData, Chacha20FeatureUnavailable, Chacha20HwAccelFailed, ChachapolyAuthFailed, ChachapolyBadState, CipherAllocFailed, CipherAuthFailed, CipherBadInputData, CipherFeatureUnavailable, CipherFullBlockExpected, CipherHwAccelFailed, CipherInvalidContext, CipherInvalidPadding, CmacHwAccelFailed, CtrDrbgEntropySourceFailed, CtrDrbgFileIoError, CtrDrbgInputTooBig, CtrDrbgRequestTooBig, DesHwAccelFailed, DesInvalidInputLength, DhmAllocFailed, DhmBadInputData, DhmCalcSecretFailed, DhmFileIoError, DhmHwAccelFailed, DhmInvalidFormat, DhmMakeParamsFailed, DhmMakePublicFailed, DhmReadParamsFailed, DhmReadPublicFailed, DhmSetGroupFailed, EcpAllocFailed, EcpBadInputData, EcpBufferTooSmall, EcpFeatureUnavailable, EcpHwAccelFailed, EcpInvalidKey, EcpRandomFailed, EcpSigLenMismatch, EcpVerifyFailed, EntropyFileIoError, EntropyMaxSources, EntropyNoSourcesDefined, EntropyNoStrongSource, EntropySourceFailed, GcmAuthFailed, GcmBadInput, GcmHwAccelFailed, HkdfBadInputData, HmacDrbgEntropySourceFailed, HmacDrbgFileIoError, HmacDrbgInputTooBig, HmacDrbgRequestTooBig, Md2HwAccelFailed, Md4HwAccelFailed, Md5HwAccelFailed, MdAllocFailed, MdBadInputData, MdFeatureUnavailable, MdFileIoError, MdHwAccelFailed, MpiAllocFailed, MpiBadInputData, MpiBufferTooSmall, MpiDivisionByZero, MpiFileIoError, MpiInvalidCharacter, MpiNegativeValue, MpiNotAcceptable, NetAcceptFailed, NetBadInputData, NetBindFailed, NetBufferTooSmall, NetConnReset, NetConnectFailed, NetInvalidContext, NetListenFailed, NetPollFailed, NetRecvFailed, NetSendFailed, NetSocketFailed, NetUnknownHost, OidBufTooSmall, OidNotFound, PadlockDataMisaligned, PemAllocFailed, PemBadInputData, PemFeatureUnavailable, PemInvalidData, PemInvalidEncIv, PemNoHeaderFooterPresent, PemPasswordMismatch, PemPasswordRequired, PemUnknownEncAlg, PkAllocFailed, PkBadInputData, PkFeatureUnavailable, PkFileIoError, PkHwAccelFailed, PkInvalidAlg, PkInvalidPubkey, PkKeyInvalidFormat, PkKeyInvalidVersion, PkPasswordMismatch, PkPasswordRequired, PkSigLenMismatch, PkTypeMismatch, PkUnknownNamedCurve, PkUnknownPkAlg, Pkcs12BadInputData, Pkcs12FeatureUnavailable, Pkcs12PasswordMismatch, Pkcs12PbeInvalidFormat, Pkcs5BadInputData, Pkcs5FeatureUnavailable, Pkcs5InvalidFormat, Pkcs5PasswordMismatch, Poly1305BadInputData, Poly1305FeatureUnavailable, Poly1305HwAccelFailed, Ripemd160HwAccelFailed, RsaBadInputData, RsaHwAccelFailed, RsaInvalidPadding, RsaKeyCheckFailed, RsaKeyGenFailed, RsaOutputTooLarge, RsaPrivateFailed, RsaPublicFailed, RsaRngFailed, RsaUnsupportedOperation, RsaVerifyFailed, Sha1HwAccelFailed, Sha256HwAccelFailed, Sha512HwAccelFailed, SslAllocFailed, SslAsyncInProgress, SslBadHsCertificate, SslBadHsCertificateRequest, SslBadHsCertificateVerify, SslBadHsChangeCipherSpec, SslBadHsClientHello, SslBadHsClientKeyExchange, SslBadHsClientKeyExchangeCs, SslBadHsClientKeyExchangeRp, SslBadHsFinished, SslBadHsNewSessionTicket, SslBadHsProtocolVersion, SslBadHsServerHello, SslBadHsServerHelloDone, SslBadHsServerKeyExchange, SslBadInputData, SslBufferTooSmall, SslCaChainRequired, SslCertificateRequired, SslCertificateTooLarge, SslClientReconnect, SslCompressionFailed, SslConnEof, SslContinueProcessing, SslCounterWrapping, SslFatalAlertMessage, SslFeatureUnavailable, SslHelloVerifyRequired, SslHwAccelFailed, SslHwAccelFallthrough, SslInternalError, SslInvalidMac, SslInvalidRecord, SslInvalidVerifyHash, SslNoCipherChosen, SslNoClientCertificate, SslNoRng, SslNoUsableCiphersuite, SslNonFatal, SslPeerCloseNotify, SslPeerVerifyFailed, SslPkTypeMismatch, SslPrivateKeyRequired, SslSessionTicketExpired, SslTimeout, SslUnexpectedMessage, SslUnexpectedRecord, SslUnknownCipher, SslUnknownIdentity, SslWaitingServerHelloRenego, SslWantRead, SslWantWrite, X509AllocFailed, X509BadInputData, X509BufferTooSmall, X509CertUnknownFormat, X509CertVerifyFailed, X509FatalError, X509FeatureUnavailable, X509FileIoError, X509InvalidAlg, X509InvalidDate, X509InvalidExtensions, X509InvalidFormat, X509InvalidName, X509InvalidSerial, X509InvalidSignature, X509InvalidVersion, X509SigMismatch, X509UnknownOid, X509UnknownSigAlg, X509UnknownVersion, XteaHwAccelFailed, XteaInvalidInputLength, Other(c_int), Utf8Error(Option<Utf8Error>), // some variants omitted
}

Variants§

§

AesBadInputData

§

AesFeatureUnavailable

§

AesHwAccelFailed

§

AesInvalidInputLength

§

AesInvalidKeyLength

§

Arc4HwAccelFailed

§

AriaFeatureUnavailable

§

AriaHwAccelFailed

§

AriaInvalidInputLength

§

Asn1AllocFailed

§

Asn1BufTooSmall

§

Asn1InvalidData

§

Asn1InvalidLength

§

Asn1LengthMismatch

§

Asn1OutOfData

§

Asn1UnexpectedTag

§

Base64BufferTooSmall

§

Base64InvalidCharacter

§

BlowfishHwAccelFailed

§

BlowfishInvalidInputLength

§

CamelliaHwAccelFailed

§

CamelliaInvalidInputLength

§

CcmAuthFailed

§

CcmBadInput

§

CcmHwAccelFailed

§

Chacha20BadInputData

§

Chacha20FeatureUnavailable

§

Chacha20HwAccelFailed

§

ChachapolyAuthFailed

§

ChachapolyBadState

§

CipherAllocFailed

§

CipherAuthFailed

§

CipherBadInputData

§

CipherFeatureUnavailable

§

CipherFullBlockExpected

§

CipherHwAccelFailed

§

CipherInvalidContext

§

CipherInvalidPadding

§

CmacHwAccelFailed

§

CtrDrbgEntropySourceFailed

§

CtrDrbgFileIoError

§

CtrDrbgInputTooBig

§

CtrDrbgRequestTooBig

§

DesHwAccelFailed

§

DesInvalidInputLength

§

DhmAllocFailed

§

DhmBadInputData

§

DhmCalcSecretFailed

§

DhmFileIoError

§

DhmHwAccelFailed

§

DhmInvalidFormat

§

DhmMakeParamsFailed

§

DhmMakePublicFailed

§

DhmReadParamsFailed

§

DhmReadPublicFailed

§

DhmSetGroupFailed

§

EcpAllocFailed

§

EcpBadInputData

§

EcpBufferTooSmall

§

EcpFeatureUnavailable

§

EcpHwAccelFailed

§

EcpInvalidKey

§

EcpRandomFailed

§

EcpSigLenMismatch

§

EcpVerifyFailed

§

EntropyFileIoError

§

EntropyMaxSources

§

EntropyNoSourcesDefined

§

EntropyNoStrongSource

§

EntropySourceFailed

§

GcmAuthFailed

§

GcmBadInput

§

GcmHwAccelFailed

§

HkdfBadInputData

§

HmacDrbgEntropySourceFailed

§

HmacDrbgFileIoError

§

HmacDrbgInputTooBig

§

HmacDrbgRequestTooBig

§

Md2HwAccelFailed

§

Md4HwAccelFailed

§

Md5HwAccelFailed

§

MdAllocFailed

§

MdBadInputData

§

MdFeatureUnavailable

§

MdFileIoError

§

MdHwAccelFailed

§

MpiAllocFailed

§

MpiBadInputData

§

MpiBufferTooSmall

§

MpiDivisionByZero

§

MpiFileIoError

§

MpiInvalidCharacter

§

MpiNegativeValue

§

MpiNotAcceptable

§

NetAcceptFailed

§

NetBadInputData

§

NetBindFailed

§

NetBufferTooSmall

§

NetConnReset

§

NetConnectFailed

§

NetInvalidContext

§

NetListenFailed

§

NetPollFailed

§

NetRecvFailed

§

NetSendFailed

§

NetSocketFailed

§

NetUnknownHost

§

OidBufTooSmall

§

OidNotFound

§

PadlockDataMisaligned

§

PemAllocFailed

§

PemBadInputData

§

PemFeatureUnavailable

§

PemInvalidData

§

PemInvalidEncIv

§

PemNoHeaderFooterPresent

§

PemPasswordMismatch

§

PemPasswordRequired

§

PemUnknownEncAlg

§

PkAllocFailed

§

PkBadInputData

§

PkFeatureUnavailable

§

PkFileIoError

§

PkHwAccelFailed

§

PkInvalidAlg

§

PkInvalidPubkey

§

PkKeyInvalidFormat

§

PkKeyInvalidVersion

§

PkPasswordMismatch

§

PkPasswordRequired

§

PkSigLenMismatch

§

PkTypeMismatch

§

PkUnknownNamedCurve

§

PkUnknownPkAlg

§

Pkcs12BadInputData

§

Pkcs12FeatureUnavailable

§

Pkcs12PasswordMismatch

§

Pkcs12PbeInvalidFormat

§

Pkcs5BadInputData

§

Pkcs5FeatureUnavailable

§

Pkcs5InvalidFormat

§

Pkcs5PasswordMismatch

§

Poly1305BadInputData

§

Poly1305FeatureUnavailable

§

Poly1305HwAccelFailed

§

Ripemd160HwAccelFailed

§

RsaBadInputData

§

RsaHwAccelFailed

§

RsaInvalidPadding

§

RsaKeyCheckFailed

§

RsaKeyGenFailed

§

RsaOutputTooLarge

§

RsaPrivateFailed

§

RsaPublicFailed

§

RsaRngFailed

§

RsaUnsupportedOperation

§

RsaVerifyFailed

§

Sha1HwAccelFailed

§

Sha256HwAccelFailed

§

Sha512HwAccelFailed

§

SslAllocFailed

§

SslAsyncInProgress

§

SslBadHsCertificate

§

SslBadHsCertificateRequest

§

SslBadHsCertificateVerify

§

SslBadHsChangeCipherSpec

§

SslBadHsClientHello

§

SslBadHsClientKeyExchange

§

SslBadHsClientKeyExchangeCs

§

SslBadHsClientKeyExchangeRp

§

SslBadHsFinished

§

SslBadHsNewSessionTicket

§

SslBadHsProtocolVersion

§

SslBadHsServerHello

§

SslBadHsServerHelloDone

§

SslBadHsServerKeyExchange

§

SslBadInputData

§

SslBufferTooSmall

§

SslCaChainRequired

§

SslCertificateRequired

§

SslCertificateTooLarge

§

SslClientReconnect

§

SslCompressionFailed

§

SslConnEof

§

SslContinueProcessing

§

SslCounterWrapping

§

SslFatalAlertMessage

§

SslFeatureUnavailable

§

SslHelloVerifyRequired

§

SslHwAccelFailed

§

SslHwAccelFallthrough

§

SslInternalError

§

SslInvalidMac

§

SslInvalidRecord

§

SslInvalidVerifyHash

§

SslNoCipherChosen

§

SslNoClientCertificate

§

SslNoRng

§

SslNoUsableCiphersuite

§

SslNonFatal

§

SslPeerCloseNotify

§

SslPeerVerifyFailed

§

SslPkTypeMismatch

§

SslPrivateKeyRequired

§

SslSessionTicketExpired

§

SslTimeout

§

SslUnexpectedMessage

§

SslUnexpectedRecord

§

SslUnknownCipher

§

SslUnknownIdentity

§

SslWaitingServerHelloRenego

§

SslWantRead

§

SslWantWrite

§

X509AllocFailed

§

X509BadInputData

§

X509BufferTooSmall

§

X509CertUnknownFormat

§

X509CertVerifyFailed

§

X509FatalError

§

X509FeatureUnavailable

§

X509FileIoError

§

X509InvalidAlg

§

X509InvalidDate

§

X509InvalidExtensions

§

X509InvalidFormat

§

X509InvalidName

§

X509InvalidSerial

§

X509InvalidSignature

§

X509InvalidVersion

§

X509SigMismatch

§

X509UnknownOid

§

X509UnknownSigAlg

§

X509UnknownVersion

§

XteaHwAccelFailed

§

XteaInvalidInputLength

§

Other(c_int)

§

Utf8Error(Option<Utf8Error>)

Implementations§

source§

impl Error

source

pub fn from_mbedtls_code(code: c_int) -> Self

source

pub fn as_str(&self) -> &'static str

source

pub fn to_int(&self) -> c_int

Trait Implementations§

source§

impl Debug for Error

source§

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

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

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

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Infallible> for Error

source§

fn from(x: Infallible) -> Error

Converts to this type from the input type.
source§

impl From<Utf8Error> for Error

source§

fn from(e: Utf8Error) -> Error

Converts to this type from the input type.
source§

impl PartialEq for Error

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Error

source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.