refactor protocol extensions

This commit is contained in:
Toshit Chawda 2024-10-24 19:47:38 -07:00
parent 1ae3986a82
commit 36fddc8943
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
10 changed files with 289 additions and 190 deletions

View file

@ -106,10 +106,21 @@ pub enum WispError {
/// The specified protocol extensions are not supported by the other side.
#[error("Protocol extensions {0:?} not supported")]
ExtensionsNotSupported(Vec<u8>),
/// The password authentication username/password was invalid.
#[error("Password protocol extension: Invalid username/password")]
PasswordExtensionCredsInvalid,
/// No password authentication username/password was provided.
#[error("Password protocol extension: No username/password provided")]
PasswordExtensionNoCreds,
/// The certificate authentication certificate type was unsupported.
#[error("Certificate authentication protocol extension: Invalid certificate type")]
CertAuthExtensionCertTypeInvalid,
/// The certificate authentication signature was invalid.
#[error("Certificate authentication protocol extension: Invalid signature")]
CertAuthExtensionSigInvalid,
/// No certificate authentication signing key was provided.
#[error("Password protocol extension: No signing key provided")]
CertAuthExtensionNoKey,
}