Commit 40520af1 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Add public method to access the openssl connection object

parent 63d72fbd
......@@ -119,6 +119,10 @@ class NonBlockingClient:
def get_bound_jid(self):
return self._registered_name
def get_ssl_connection(self):
if 'NonBlockingTCP' in self.__dict__:
return self.NonBlockingTCP.get_ssl_connection()
def disconnect(self, message=''):
Called on disconnection - disconnect callback is picked based on state of
......@@ -212,6 +212,7 @@ class NonBlockingTLS(PlugIn):
None is provided, a default list is used: HIGH:!aNULL
self._exported_methods = [self.get_ssl_connection]
self.cacerts = cacerts
self.mycerts = mycerts
if cipher_list is None:
......@@ -423,3 +424,9 @@ class NonBlockingTLS(PlugIn):
return sslObj.get_finished()
except AttributeError:
raise NotImplementedError
def get_ssl_connection(self):
return self._owner._sslObj
except Exception:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment