Add support for <failure xmlns=starttls/>

Specified in RFC 6120 §5.4.2.2
This commit is contained in:
Jonas Schäfer 2025-07-09 17:06:45 +02:00
commit c229ab0127

View file

@ -18,6 +18,11 @@ pub struct Request;
#[xml(namespace = ns::TLS, name = "proceed")] #[xml(namespace = ns::TLS, name = "proceed")]
pub struct Proceed; pub struct Proceed;
/// Information that the peer cannot do TLS after all.
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
#[xml(namespace = ns::TLS, name = "failure")]
pub struct Failure;
/// Stream feature for StartTLS /// Stream feature for StartTLS
/// ///
/// Used in [`crate::stream_features::StreamFeatures`]. /// Used in [`crate::stream_features::StreamFeatures`].
@ -40,6 +45,10 @@ pub enum Nonza {
/// Information that TLS may now commence /// Information that TLS may now commence
#[xml(transparent)] #[xml(transparent)]
Proceed(Proceed), Proceed(Proceed),
/// Information that the peer cannot do TLS after all.
#[xml(transparent)]
Failure(Failure),
} }
#[cfg(test)] #[cfg(test)]