Dont check for OpenSSL we require it on install

This commit is contained in:
Philipp Hörist 2018-04-23 23:47:17 +02:00
parent 872c68b368
commit 986898f69d
3 changed files with 9 additions and 24 deletions

View File

@ -200,17 +200,6 @@ else:
if not test_gpg(binary='gpg'):
HAVE_GPG = False
HAVE_PYOPENSSL = True
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
except Exception:
HAVE_PYOPENSSL = False
HAVE_FARSTREAM = True
try:
if os.name == 'nt':

View File

@ -42,7 +42,9 @@ import locale
import hmac
import hashlib
import json
import logging
from functools import partial
from string import Template
try:
randomsource = random.SystemRandom()
@ -54,29 +56,23 @@ import signal
if os.name != 'nt':
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
if os.name == 'nt':
import certifi
import OpenSSL.crypto
import nbxmpp
from nbxmpp import Smacks
from gajim import common
from gajim.common import helpers
from gajim.common import app
from gajim.common import gpg
from gajim.common import passwords
from gajim.common import exceptions
from gajim.common import check_X509
from gajim.common.connection_handlers import *
from gajim.common.helpers import version_condition
from gajim.common.contacts import GC_Contact
from gajim.gtkgui_helpers import get_action
if app.HAVE_PYOPENSSL:
import OpenSSL.crypto
if os.name == 'nt':
import certifi
from nbxmpp import Smacks
from string import Template
import logging
log = logging.getLogger('gajim.c.connection')
ssl_error = {

View File

@ -30,8 +30,10 @@ import sys
import os
from time import time as time_time
import OpenSSL.crypto
import nbxmpp
from nbxmpp.protocol import NS_CHATSTATES
from gajim.common import atom
from gajim.common import nec
from gajim.common import helpers
@ -45,8 +47,6 @@ from gajim.common.jingle_transport import JingleTransportSocks5
from gajim.common.file_props import FilesProp
from gajim.common.nec import NetworkEvent
if app.HAVE_PYOPENSSL:
import OpenSSL.crypto
log = logging.getLogger('gajim.c.connection_handlers_events')