better way to detect pyopenssl usage

This commit is contained in:
Yann Leboulanger 2009-07-13 17:44:12 +02:00
parent bbc6aa512a
commit 711dfce03c

View file

@ -669,8 +669,8 @@ class Connection(ConnectionHandlers):
'warn_when_plaintext_connection'):
self.dispatch('PLAIN_CONNECTION', (con,))
return True
if _con_type in ('tls', 'ssl') and not hasattr(con.Connection,
'_sslContext') and gajim.config.get_per('accounts', self.name,
if _con_type in ('tls', 'ssl') and con.Connection.ssl_lib != 'PYOPENSSL' \
and gajim.config.get_per('accounts', self.name,
'warn_when_insecure_ssl_connection') and \
not self.connection_auto_accepted:
# Pyopenssl is not used