Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits: e471a74e by Philipp Hörist at 2018-05-01T12:14:23+02:00 Record all ssl errors that are encountered
- - - - -
3 changed files:
- nbxmpp/bosh.py - nbxmpp/tls_nb.py - nbxmpp/transports_nb.py
Changes:
===================================== nbxmpp/bosh.py ===================================== --- a/nbxmpp/bosh.py +++ b/nbxmpp/bosh.py @@ -93,8 +93,10 @@ class NonBlockingBOSH(NonBlockingTransport):
# ssl variables self.ssl_certificate = None + # first ssl error self.ssl_errnum = 0 - + # all ssl errors + self.ssl_errors = []
def connect(self, conn_5tuple, on_connect, on_connect_failure): NonBlockingTransport.connect(self, conn_5tuple, on_connect, on_connect_failure)
===================================== nbxmpp/tls_nb.py ===================================== --- 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
===================================== nbxmpp/transports_nb.py ===================================== --- a/nbxmpp/transports_nb.py +++ b/nbxmpp/transports_nb.py @@ -339,7 +339,10 @@ class NonBlockingTCP(NonBlockingTransport, IdleObject):
# ssl variables self.ssl_certificate = None + # first ssl error self.ssl_errnum = 0 + # all ssl errors + self.ssl_errors = []
self.alpn = alpn
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/e471a74e40d378d2c27e1a045b5...
--- View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/e471a74e40d378d2c27e1a045b5... You're receiving this email because of your account on dev.gajim.org.