#[non_exhaustive]pub enum EDHOCError {
Show 13 variants
UnexpectedCredential,
MissingIdentity,
IdentityAlreadySet,
MacVerificationFailed,
UnsupportedMethod,
UnsupportedCipherSuite,
ParsingError,
EncodingError,
CredentialTooLongError,
EadLabelTooLongError,
EadTooLongError,
EADUnprocessable,
AccessDenied,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnexpectedCredential
In an exchange, a credential was set as “expected”, but the credential configured by the peer did not match what was presented. This is more an application internal than an EDHOC error: When the application sets the expected credential, that process should be informed by the known details.
MissingIdentity
IdentityAlreadySet
MacVerificationFailed
UnsupportedMethod
UnsupportedCipherSuite
ParsingError
EncodingError
CredentialTooLongError
EadLabelTooLongError
EadTooLongError
EADUnprocessable
An EAD was received that was either not known (and critical), or not understood, or otherwise erroneous.
AccessDenied
The credential or EADs could be processed (possibly by a third party), but the decision based on that was to not to continue the EDHOC session.
See also https://datatracker.ietf.org/doc/html/draft-ietf-lake-authz#name-edhoc-error-access-denied
Implementations§
Source§impl EDHOCError
impl EDHOCError
Sourcepub fn err_code(&self) -> ErrCode
pub fn err_code(&self) -> ErrCode
The ERR_CODE corresponding to the error
Errors that refer to internal limitations (such as EadTooLongError) are treated the same way as parsing errors, and return an unspecified error: Those are equivalent to limitations of the parser, and a constrained system can not be expected to differentiate between “the standard allows this but my number space is too small” and “this violates the standard”.
If an EDHOCError is returned through EDHOC, it will use this in its EDHOC error message.
Note that this on its own is insufficient to create an error message: Additional ERR_INFO is needed, which may or may not be available with the EDHOCError alone.
TODO: Evolve the EDHOCError type such that all information needed is available.