From 322b2a3b46348ec1c5acbc538de93310c9030b96 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Wed, 12 Jul 2023 21:11:20 +0100 Subject: reimplement sasl (with SCRAM!) --- src/error.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 7f704e5..17bfbef 100644 --- a/src/error.rs +++ b/src/error.rs @@ -18,6 +18,7 @@ pub enum JabberError { NoFeatures, UnknownNamespace, ParseError, + UnexpectedEnd, XML(quick_xml::Error), SASL(SASLError), Element(ElementError<'static>), @@ -28,6 +29,8 @@ pub enum JabberError { pub enum SASLError { SASL(rsasl::prelude::SASLError), MechanismName(MechanismNameError), + NoChallenge, + NoSuccess, } impl From for JabberError { @@ -37,8 +40,14 @@ impl From for JabberError { } impl From for JabberError { - fn from(value: MechanismNameError) -> Self { - Self::SASL(SASLError::MechanismName(value)) + fn from(e: MechanismNameError) -> Self { + Self::SASL(SASLError::MechanismName(e)) + } +} + +impl From for JabberError { + fn from(e: SASLError) -> Self { + Self::SASL(e) } } -- cgit