From 711dfce03ca7aca7937d37926328959a3698f161 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 13 Jul 2009 17:44:12 +0200 Subject: [PATCH] better way to detect pyopenssl usage --- src/common/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index d09846c49..fe6baec2a 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -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