diff options
Diffstat (limited to 'nbxmpp/tls_nb.py')
-rw-r--r-- | nbxmpp/tls_nb.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nbxmpp/tls_nb.py b/nbxmpp/tls_nb.py index 99ca4f5..da9ba0c 100644 --- a/nbxmpp/tls_nb.py +++ b/nbxmpp/tls_nb.py @@ -508,7 +508,13 @@ class NonBlockingTLS(PlugIn): def _ssl_verify_callback(self, sslconn, cert, errnum, depth, ok): # Exceptions can't propagate up through this callback, so print them here. try: + if errnum: + self._owner.ssl_errors.append(errnum) + # This stores all ssl errors that are encountered while + # the chain is verifyed if not self._owner.ssl_errnum: + # This records the first ssl error that is encountered + # we keep this because of backwards compatibility self._owner.ssl_errnum = errnum if depth == 0: self._owner.ssl_certificate = cert |