From 87d5904384ea085317af4d898ad5da19be5a65e3 Mon Sep 17 00:00:00 2001 From: js Date: Thu, 24 Jul 2008 22:13:59 +0000 Subject: [PATCH] Possibility to disable ESessions (not only autonegotiation) per account --- src/common/config.py | 1 + src/common/helpers.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/config.py b/src/common/config.py index c6152c692..fa8dc0b89 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -278,6 +278,7 @@ class Config: 'keyid': [ opt_str, '', '', True ], 'gpg_sign_presence': [ opt_bool, True, _('If disabled, don\'t sign presences with GPG key, even if GPG is configured.') ], 'keyname': [ opt_str, '', '', True ], + 'enable_esessions': [opt_bool, True, _('Enable ESessions encryption for this account.')], 'autonegotiate_esessions': [opt_bool, True, _('Should Gajim automatically start an encrypted session when possible?')], 'connection_types': [ opt_str, 'tls ssl plain', _('Ordered list (space separated) of connection type to try. Can contain tls, ssl or plain')], 'warn_when_plaintext_connection': [ opt_bool, True, _('Show a warning dialog before sending password on an plaintext connection.') ], diff --git a/src/common/helpers.py b/src/common/helpers.py index 26d54aa68..cad76fc45 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -1346,7 +1346,8 @@ def update_optional_features(account = None): gajim.gajim_optional_features[a].append(xmpp.NS_CHATSTATES) if not gajim.config.get('ignore_incoming_xhtml'): gajim.gajim_optional_features[a].append(xmpp.NS_XHTML_IM) - if gajim.HAVE_PYCRYPTO: + if gajim.HAVE_PYCRYPTO \ + and gajim.config.get_per('accounts', a, 'enable_esessions'): gajim.gajim_optional_features[a].append(xmpp.NS_ESESSION) if gajim.config.get_per('accounts', a, 'answer_receipts'): gajim.gajim_optional_features[a].append(xmpp.NS_RECEIPTS)