check that pyopenssl > 0.12 is installed before using fonctions available after this version
This commit is contained in:
parent
8e72a23918
commit
359d3c3069
|
@ -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
|
||||
|
|
|
@ -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.'),
|
||||
|
|
Loading…
Reference in New Issue