features_starttls/Proceed: raise exception on InvalidCABundle

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-04-05 19:39:17 +02:00
parent f7902d056e
commit 88d2f5dae4

View file

@ -3,8 +3,12 @@
# Copyright (C) 2011 Nathanael C. Fritz
# This file is part of Slixmpp.
# See the file LICENSE for copying permission.
from slixmpp.xmlstream import StanzaBase, ElementBase
from typing import Set, ClassVar
from slixmpp.xmlstream import StanzaBase, ElementBase
from slixmpp.xmlstream.xmlstream import InvalidCABundle
import logging
log = logging.getLogger(__name__)
class STARTTLS(StanzaBase):
@ -36,6 +40,12 @@ class Proceed(StanzaBase):
namespace = 'urn:ietf:params:xml:ns:xmpp-tls'
interfaces: ClassVar[Set[str]] = set()
def exception(self, e: Exception) -> None:
log.exception('Error handling {%s}%s stanza',
self.namespace, self.name)
if isinstance(e, InvalidCABundle):
raise e
class Failure(StanzaBase):
"""