#[non_exhaustive]pub enum ApiMisuse {
Show 21 variants
ExporterAlreadyUsed,
ExporterContextTooLong,
ExporterOutputTooLong,
ExporterOutputZeroLength,
AcceptorPolledAfterCompletion,
InvalidQuicHeaderProtectionSampleLength,
InvalidQuicHeaderProtectionPacketNumberLength,
InvalidSignerForProtocolVersion,
QuicRequiresTls13Support,
NoQuicCompatibleCipherSuites,
EmptyCertificateChain,
QuicRestrictsMaxEarlyDataSize,
NoCipherSuitesConfigured,
NoKeyExchangeGroupsConfigured,
NoSignatureVerificationAlgorithms,
EchRequiresTls13Support,
EchForbidsTls12Support,
SecretExtractionRequiresPriorOptIn,
SecretExtractionWithPendingSendableData,
UnverifiableCertificateType,
NoSupportedCertificateTypes,
}Expand description
Describes cases of API misuse
Variants here should be sufficiently detailed that the action needed is clear.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ExporterAlreadyUsed
The KeyingMaterialExporter was already consumed.
Methods that obtain an exporter (eg, ConnectionCommon::exporter()) can only
be used once. This error is returned on subsequent calls.
ExporterContextTooLong
The context parameter to KeyingMaterialExporter::derive() was too long.
For TLS1.2 connections (only) this parameter is limited to 64KB.
ExporterOutputTooLong
The output object for KeyingMaterialExporter::derive() was too long.
For TLS1.3 connections this is limited to 255 times the hash output length.
ExporterOutputZeroLength
The output object to KeyingMaterialExporter::derive() was zero length.
This doesn’t make sense, so we explicitly return an error (rather than simply producing no output as requested.)
AcceptorPolledAfterCompletion
Acceptor::accept() called after it yielded a connection.
InvalidQuicHeaderProtectionSampleLength
Incorrect sample length provided to quic::HeaderProtectionKey::encrypt_in_place()
InvalidQuicHeaderProtectionPacketNumberLength
Incorrect relation between sample length and header number length provided to
quic::HeaderProtectionKey::encrypt_in_place()
InvalidSignerForProtocolVersion
Raw keys cannot be used with TLS 1.2.
QuicRequiresTls13Support
QUIC attempted with a configuration that does not support TLS1.3.
NoQuicCompatibleCipherSuites
QUIC attempted with a configuration that does not support a ciphersuite that supports QUIC.
EmptyCertificateChain
An empty certificate chain was provided.
QuicRestrictsMaxEarlyDataSize
QUIC attempted with unsupported ServerConfig::max_early_data_size
This field must be either zero or u32::MAX for QUIC.
NoCipherSuitesConfigured
A CryptoProvider must have at least one cipher suite.
NoKeyExchangeGroupsConfigured
A CryptoProvider must have at least one key exchange group.
NoSignatureVerificationAlgorithms
An empty list of signature verification algorithms was provided.
EchRequiresTls13Support
ECH attempted with a configuration that does not support TLS1.3.
EchForbidsTls12Support
ECH attempted with a configuration that also supports TLS1.2.
SecretExtractionRequiresPriorOptIn
Secret extraction operation attempted without opting-in to secret extraction.
This is possible from:
ClientConnection::dangerous_extract_secrets()ServerConnection::dangerous_extract_secrets()ClientConnection::dangerous_into_kernel_connection()ServerConnection::dangerous_into_kernel_connection()
You must set ServerConfig::enable_secret_extraction or
ClientConfig::enable_secret_extraction to true before calling
these functions.
SecretExtractionWithPendingSendableData
Secret extraction operation attempted without first extracting all pending TLS data.
See Self::SecretExtractionRequiresPriorOptIn for a list of the affected
functions. You must ensure any prior generated TLS records are extracted
from the library before using one of these functions.
UnverifiableCertificateType
Attempt to verify a certificate with an unsupported type.
A verifier indicated support for a certificate type but then failed to verify the peer’s identity of that type.
NoSupportedCertificateTypes
A verifier or resolver implementation signalled that it does not support any certificate types.