Skip to content
Snippets Groups Projects
Commit 359d3c30 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

check that pyopenssl > 0.12 is installed before using fonctions available after this version

parent 8e72a239
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,10 @@ log = logging.getLogger('gajim.c.check_X509') ...@@ -4,6 +4,10 @@ log = logging.getLogger('gajim.c.check_X509')
try: try:
import OpenSSL.SSL import OpenSSL.SSL
import OpenSSL.crypto 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.type import univ, constraint, char, namedtype, tag
from pyasn1.codec.der.decoder import decode from pyasn1.codec.der.decoder import decode
from common.helpers import prep, InvalidFormat from common.helpers import prep, InvalidFormat
......
...@@ -49,8 +49,8 @@ class FeaturesWindow: ...@@ -49,8 +49,8 @@ class FeaturesWindow:
self.features = { self.features = {
_('SSL certificate validation'): (self.pyopenssl_available, _('SSL certificate validation'): (self.pyopenssl_available,
_('A library used to validate server certificates to ensure a secure connection.'), _('A library used to validate server certificates to ensure a secure connection.'),
_('Requires python-pyopenssl.'), _('Requires python-pyopenssl > 0.12 and pyasn1.'),
_('Requires python-pyopenssl.')), _('Requires python-pyopenssl > 0.12 and pyasn1.')),
_('Bonjour / Zeroconf'): (self.zeroconf_available, _('Bonjour / Zeroconf'): (self.zeroconf_available,
_('Serverless chatting with autodetected clients in a local network.'), _('Serverless chatting with autodetected clients in a local network.'),
_('Requires python-avahi.'), _('Requires python-avahi.'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment