Enum rustls::WebPkiError[][src]

#[non_exhaustive]
pub enum WebPkiError {
Show variants BadEncoding, BadTimeEncoding, CaUsedAsEndEntity, CertExpired, CertNotValidForName, CertNotValidYet, EndEntityUsedAsCa, ExtensionValueInvalid, InvalidCertValidity, InvalidSignatureForPublicKey, NameConstraintViolation, PathLenConstraintViolation, SignatureAlgorithmMismatch, RequiredEkuNotFound, UnknownIssuer, UnsupportedCertVersion, MissingOrMalformedExtension, UnsupportedCriticalExtension, UnsupportedSignatureAlgorithmForPublicKey, UnsupportedSignatureAlgorithm,
}
Expand description

Reasons for a WebPKI operation to fail, used in 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.
BadEncoding

Encountered an illegal encoding.

BadTimeEncoding

Encountered an illegal encoding of a time field.

CaUsedAsEndEntity

A CA certificate was used as an end-entity.

CertExpired

A certificate was expired, ie the verification time was after the notAfter instant.

CertNotValidForName

A certificate was not issued for the given name.

CertNotValidYet

A certificate was not yet valid, ie the verification time was before the notBefore instant.

EndEntityUsedAsCa

An end-entity certificate was used as a CA

ExtensionValueInvalid

An X.509 extension had an invalid value

InvalidCertValidity

An X.509 certificate had an illegal validity period; for example notBefore was after notAfter

InvalidSignatureForPublicKey

The given signature is invalid.

NameConstraintViolation

A certificate violated name constraits required by its issuing path.

PathLenConstraintViolation

A certificate violated path length constraits required by its issuing path.

SignatureAlgorithmMismatch

A certificate contained inconsistent signature algorithms.

RequiredEkuNotFound

A certificate did not contain the the required extended key usage bits.

UnknownIssuer

It wasn’t possible to construct a path from the given end-entity certificate to one of the trusted issuers.

UnsupportedCertVersion

An X.509 certificate was encountered that had an illegal version, or a version other than 3.

MissingOrMalformedExtension

An X.509 extension was encountered that had a missing or malformed extensions.

UnsupportedCriticalExtension

An X.509 unrecognized extension was encountered with the critical bit set.

UnsupportedSignatureAlgorithmForPublicKey

The given certified public key cannot verify signatures of this type.

UnsupportedSignatureAlgorithm

The given signature algorithm is not supported.

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

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. 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.