Changeset 9964

Show
Ignore:
Timestamp:
07/19/08 22:42:03 (7 weeks ago)
Author:
bct
Message:

added option for esession autonegotiation
added option for modp groups to use in a negotiation

Location:
trunk/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/chat_control.py

    r9963 r9964  
    11561156                # then try E2E 
    11571157                # XXX: Once we have fallback to disco, remove notexistant check 
    1158                 elif not e2e_is_active and \ 
    1159                 gajim.capscache.is_supported(contact, NS_ESESSION) and \ 
    1160                 not gajim.capscache.is_supported(contact, 'notexistant'): 
     1158                elif not e2e_is_active and gajim.HAVE_PYCRYPTO \ 
     1159                and gajim.config.get('autonegotiate_esessions') \ 
     1160                and gajim.capscache.is_supported(contact, NS_ESESSION) \ 
     1161                and not gajim.capscache.is_supported(contact, 'notexistant'): 
    11611162                        self.begin_e2e_negotiation() 
    11621163 
  • trunk/src/common/config.py

    r9945 r9964  
    192192                'tabs_close_button': [opt_bool, True, _('Show close button in tab?')], 
    193193                'log_encrypted_sessions': [opt_bool, True, _('When negotiating an encrypted session, should Gajim assume you want your messages to be logged?')], 
    194                 'e2e_public_key': [opt_bool, False, _('When negotiating an encrypted session, should Gajim prefer to use public keys for identification?')], 
     194                'autonegotiate_esessions': [opt_bool, True, _('Should Gajim automatically start an encrypted session when possible?')], 
     195                'esession_modp': [opt_str, '5,14', _('A list of modp groups to use in a Diffie-Hellman, highest preference first, separated by commas. Valid groups are 1, 2, 5, 14, 15, 16, 17 and 18. Higher numbers are more secure, but take longer to calculate when you start a session.')], 
    195196                'chat_avatar_width': [opt_int, 52], 
    196197                'chat_avatar_height': [opt_int, 52], 
  • trunk/src/common/stanza_session.py

    r9861 r9964  
    484484                x.addChild(node=xmpp.DataField(name='my_nonce', value=base64.b64encode(self.n_s), typ='hidden')) 
    485485 
    486                 modp_options = [ 5, 14, 2, 1 ] 
     486                modp_options = [ int(g) for g in gajim.config.get('esession_modp').split(',') ] 
    487487 
    488488                x.addChild(node=xmpp.DataField(name='modp', typ='list-single', options=map(lambda x: [ None, x ], modp_options)))