From 3b73048a64c3798cf796f717b675aa235b7d8a4c Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Wed, 4 Jan 2012 11:38:09 +0100 Subject: [PATCH] check that pyopenssl > 0.12 is installed before using fonctions available after this version --- src/common/check_X509.py | 4 ++++ src/features_window.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/check_X509.py b/src/common/check_X509.py index 6605be707b..e7af52a8eb 100644 --- a/src/common/check_X509.py +++ b/src/common/check_X509.py @@ -4,6 +4,10 @@ log = logging.getLogger('gajim.c.check_X509') try: import OpenSSL.SSL import OpenSSL.crypto + ver = OpenSSL.__version__ + ver_l = [int(i) for i in ver.split('.')] + if ver_l < [0, 12]: + raise ImportError from pyasn1.type import univ, constraint, char, namedtype, tag from pyasn1.codec.der.decoder import decode from common.helpers import prep, InvalidFormat diff --git a/src/features_window.py b/src/features_window.py index 79ffd67451..a7137b36ed 100644 --- a/src/features_window.py +++ b/src/features_window.py @@ -49,8 +49,8 @@ class FeaturesWindow: self.features = { _('SSL certificate validation'): (self.pyopenssl_available, _('A library used to validate server certificates to ensure a secure connection.'), - _('Requires python-pyopenssl.'), - _('Requires python-pyopenssl.')), + _('Requires python-pyopenssl > 0.12 and pyasn1.'), + _('Requires python-pyopenssl > 0.12 and pyasn1.')), _('Bonjour / Zeroconf'): (self.zeroconf_available, _('Serverless chatting with autodetected clients in a local network.'), _('Requires python-avahi.'), -- GitLab