diff options
Diffstat (limited to 'net-im/gajim/files/gajim-0.16_beta2-pyopenssl-backport-2.patch')
-rw-r--r-- | net-im/gajim/files/gajim-0.16_beta2-pyopenssl-backport-2.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/net-im/gajim/files/gajim-0.16_beta2-pyopenssl-backport-2.patch b/net-im/gajim/files/gajim-0.16_beta2-pyopenssl-backport-2.patch new file mode 100644 index 000000000000..e3375c3f836b --- /dev/null +++ b/net-im/gajim/files/gajim-0.16_beta2-pyopenssl-backport-2.patch @@ -0,0 +1,40 @@ +Index: src/common/crypto.py
+===================================================================
+--- src/common/crypto.py (revision 15338)
++++ src/common/crypto.py (revision 15339)
+@@ -99,14 +99,14 @@
+ for d in dirs:
+ if os.access(d, os.R_OK):
+- for filename in os.listdir(d):
+- OpenSSL.rand.add(filename, 0)
+- try:
+- with open(d + os.sep + filename, "r") as fp:
+- # Limit the ammount of read bytes, in case a memory
+- # file was opened
+- OpenSSL.rand.add(str(fp.read(5000)), 0.01)
+- except:
+- # Ignore all read and access errors
+- pass
++ for filename in os.listdir(d):
++ OpenSSL.rand.add(filename, 0)
++ try:
++ with open(d + os.sep + filename, "r") as fp:
++ # Limit the ammount of read bytes, in case a memory
++ # file was opened
++ OpenSSL.rand.add(str(fp.read(5000)), 1)
++ except IOError:
++ # Ignore all read and access errors
++ pass
+
+ PYOPENSSL_PRNG_PRESENT = False
+Index: src/gajim.py
+===================================================================
+--- src/gajim.py (revision 15338)
++++ src/gajim.py (revision 15339)
+@@ -464,5 +464,5 @@
+ # Save the entropy from OpenSSL PRNG
+ if PYOPENSSL_PRNG_PRESENT:
+- OpenSSL.rand.write_file(RNG_SEED)
++ OpenSSL.rand.write_file(str(RNG_SEED))
+ # delete pid file on normal exit
+ if os.path.exists(pid_filename):
|