changeset e7666c925c22 in /home/hg/repos/gajim
author: Fedor Brunner fedor.brunner@azet.sk branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=e7666c925c22 description: Fix changes in interface of pyOpenSSL.
Fixes: #7642
diffstat:
src/common/crypto.py | 2 +- src/common/jingle_xtls.py | 4 ++-- src/gajim.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r 65b506a4086d -r e7666c925c22 src/common/crypto.py --- a/src/common/crypto.py Wed Jan 29 22:10:48 2014 +0100 +++ b/src/common/crypto.py Thu Jan 30 14:19:37 2014 +0100 @@ -87,7 +87,7 @@ os.environ, os.getcwd(), os.getpid()]
for s in sources: - OpenSSL.rand.add(str(s), 0.01) + OpenSSL.rand.add(str(s), 1)
# On Windows add the current contents of the screen to the PRNG state. if os.name == 'nt': diff -r 65b506a4086d -r e7666c925c22 src/common/jingle_xtls.py --- a/src/common/jingle_xtls.py Wed Jan 29 22:10:48 2014 +0100 +++ b/src/common/jingle_xtls.py Thu Jan 30 14:19:37 2014 +0100 @@ -119,7 +119,7 @@ dh_params_name = os.path.join(gajim.MY_CERT_DIR, DH_PARAMS) try: with open(dh_params_name, "r") as dh_params_file: - ctx.load_tmp_dh(dh_params_name) + ctx.load_tmp_dh(str(dh_params_name)) except IOError as err: log.warn('Unable to load DH parameter file: %s. You should generate it ' 'by using this command : "openssl dhparam 4096 -out ' @@ -129,7 +129,7 @@ 'other', DEFAULT_DH_PARAMS) try: with open(default_dh_params_name, "r") as default_dh_params_file: - ctx.load_tmp_dh(default_dh_params_name) + ctx.load_tmp_dh(str(default_dh_params_name)) except IOError as err: log.error('Unable to load default DH parameter file: %s , %s' % (default_dh_params_name, err)) diff -r 65b506a4086d -r e7666c925c22 src/gajim.py --- a/src/gajim.py Wed Jan 29 22:10:48 2014 +0100 +++ b/src/gajim.py Thu Jan 30 14:19:37 2014 +0100 @@ -310,7 +310,7 @@ from common import crypto PYOPENSSL_PRNG_PRESENT = True # Seed from file - OpenSSL.rand.load_file(RNG_SEED) + OpenSSL.rand.load_file(str(RNG_SEED)) crypto.add_entropy_sources_OpenSSL() except ImportError: log.info("PyOpenSSL PRNG not available")