changeset ba7b1db9ad7d in /home/hg/repos/gajim
author: Yann Leboulanger <asterix(a)lagaule.org>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=ba7b1db9ad7d
description: use sys.stderr.isatty() to decide if we use colors in log output or not.
diffstat:
src/gajim.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r dabb86f96777 -r ba7b1db9ad7d src/gajim.py
--- a/src/gajim.py Sun Mar 02 11:26:52 2014 +0100
+++ b/src/gajim.py Sat Mar 08 10:07:40 2014 +0100
@@ -115,7 +115,7 @@
sys.path.append('.')
from common import logging_helpers
-logging_helpers.init('TERM' in os.environ)
+logging_helpers.init(sys.stderr.isatty())
import logging
# gajim.gui or gajim.gtk more appropriate ?
changeset e5f4043c4990 in /home/hg/repos/python-nbxmpp
details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=e5f4043c4990
description: Disable session resumption, protection against Triple Handshakes TLS attack.
Session resumption is currently not supported in Gajim, because
Connection.get_session, Connection.set_session are not used. But in
case someone will try to use them in future disable session cache
using Context.set_session_cache_mode(OpenSSL.SSL.SESS_CACHE_OFF)
Fixes #21
diffstat:
nbxmpp/tls_nb.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 lines):
diff -r 25b4cf13cadb -r e5f4043c4990 nbxmpp/tls_nb.py
--- a/nbxmpp/tls_nb.py Tue Mar 04 17:46:08 2014 +0100
+++ b/nbxmpp/tls_nb.py Tue Mar 04 17:58:52 2014 +0100
@@ -387,6 +387,12 @@
tcpsock._sslContext.set_options(flags)
+ try: # Supported only pyOpenSSL >= 0.14
+ # Disable session resumption, protection against Triple Handshakes TLS attack
+ tcpsock._sslContext.set_session_cache_mode(OpenSSL.SSL.SESS_CACHE_OFF)
+ except AttributeError, e:
+ pass
+
# NonBlockingHTTPBOSH instance has no attribute _owner
if hasattr(tcpsock, '_owner') and tcpsock._owner._caller.client_cert \
and os.path.exists(tcpsock._owner._caller.client_cert):