fix BOSH connection over SSL. Fixes #5710

This commit is contained in:
Yann Leboulanger 2010-04-24 12:31:19 +02:00
parent ad6c4d7500
commit fe48933d5f
1 changed files with 4 additions and 2 deletions

View File

@ -349,8 +349,10 @@ class NonBlockingTLS(PlugIn):
def _startSSL_pyOpenSSL(self): def _startSSL_pyOpenSSL(self):
log.debug("_startSSL_pyOpenSSL called") log.debug("_startSSL_pyOpenSSL called")
tcpsock = self._owner tcpsock = self._owner
# NonBlockingHTTPBOSH instance has no attribute _owner
if hasattr(tcpsock, '_owner') and tcpsock._owner._caller.client_cert \
and os.path.exists(tcpsock._owner._caller.client_cert):
conn = tcpsock._owner._caller conn = tcpsock._owner._caller
if conn.client_cert and os.path.exists(conn.client_cert):
# FIXME make a checkbox for Client Cert / SSLv23 / TLSv1 # FIXME make a checkbox for Client Cert / SSLv23 / TLSv1
# If we are going to use a client cert/key pair for authentication, # If we are going to use a client cert/key pair for authentication,
# we choose TLSv1 method. # we choose TLSv1 method.