diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2012-01-04 14:38:09 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2012-01-04 14:38:09 +0400 |
commit | 359d3c3069c1e947bfbc1684b67121e425a71520 (patch) | |
tree | ceeda4ab71faa5f05f9d2550a876bec1d8221dcb | |
parent | 8e72a239189935584fb5b43c902e8734f3e4d6ac (diff) |
check that pyopenssl > 0.12 is installed before using fonctions available after this version
-rw-r--r-- | src/common/check_X509.py | 4 | ||||
-rw-r--r-- | 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 6605be707..e7af52a8e 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 79ffd6745..a7137b36e 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.'), |