summaryrefslogtreecommitdiff
path: root/slixmpp
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2022-04-05 19:39:17 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2022-04-05 19:42:49 +0200
commit88d2f5dae4866369be33c34c7d8bbf252ead3414 (patch)
tree35f34095c6c716982450cbb3b5481489e75afb99 /slixmpp
parentf7902d056ec995f7f373df4c865d644fa2d0bbfd (diff)
downloadslixmpp-88d2f5dae4866369be33c34c7d8bbf252ead3414.tar.gz
slixmpp-88d2f5dae4866369be33c34c7d8bbf252ead3414.tar.bz2
slixmpp-88d2f5dae4866369be33c34c7d8bbf252ead3414.tar.xz
slixmpp-88d2f5dae4866369be33c34c7d8bbf252ead3414.zip
features_starttls/Proceed: raise exception on InvalidCABundle
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'slixmpp')
-rw-r--r--slixmpp/features/feature_starttls/stanza.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/slixmpp/features/feature_starttls/stanza.py b/slixmpp/features/feature_starttls/stanza.py
index 70979402..f433f1b2 100644
--- a/slixmpp/features/feature_starttls/stanza.py
+++ b/slixmpp/features/feature_starttls/stanza.py
@@ -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):
"""