we can now disable the use of TLS
This commit is contained in:
parent
df6b4b75b9
commit
3fd078dd0b
|
@ -110,6 +110,7 @@ class Config:
|
|||
'proxyport': [ opt_int, 3128 ],
|
||||
'keyid': [ opt_str, '' ],
|
||||
'keyname': [ opt_str, '' ],
|
||||
'usetls': [ opt_bool, True ],
|
||||
'savegpgpass': [ opt_bool, False ],
|
||||
'gpgpassword': [ opt_str, '' ],
|
||||
'sync_with_global_status': [ opt_bool, True ],
|
||||
|
|
|
@ -505,6 +505,7 @@ class Connection:
|
|||
name = gajim.config.get_per('accounts', self.name, 'name')
|
||||
hostname = gajim.config.get_per('accounts', self.name, 'hostname')
|
||||
resource = gajim.config.get_per('accounts', self.name, 'resource')
|
||||
usetls = gajim.config.get_per('accounts', self.name, 'usetls')
|
||||
|
||||
#create connexion if it doesn't already existe
|
||||
if self.connection:
|
||||
|
@ -525,7 +526,7 @@ class Connection:
|
|||
#connection=common.xmlstream.TCP_SSL, port=5223, proxy = proxy)
|
||||
con.RegisterDisconnectHandler(self._disconnectedCB)
|
||||
try:
|
||||
con.connect(proxy=proxy) #FIXME: blocking
|
||||
con.connect(proxy=proxy, tls=usetls) #FIXME: blocking
|
||||
except:
|
||||
gajim.log.debug('Couldn\'t connect to %s' % hostname)
|
||||
self.dispatch('STATUS', 'offline')
|
||||
|
|
|
@ -930,10 +930,9 @@ class Account_modification_window:
|
|||
|
||||
def init_account_gpg(self):
|
||||
keyid = gajim.config.get_per('accounts', self.account, 'keyid')
|
||||
keyname = gajim.config.get_per('accounts', self.account,
|
||||
'keyname')
|
||||
keyname = gajim.config.get_per('accounts', self.account, 'keyname')
|
||||
savegpgpass = gajim.config.get_per('accounts', self.account,
|
||||
'savegpgpass')
|
||||
'savegpgpass')
|
||||
|
||||
if not keyid or not gajim.config.get('usegpg'):
|
||||
return
|
||||
|
@ -985,6 +984,9 @@ class Account_modification_window:
|
|||
entry.set_text(str(gajim.config.get_per('accounts',
|
||||
self.account, 'proxyport')))
|
||||
|
||||
usetls = gajim.config.get_per('accounts', self.account, 'usetls')
|
||||
self.xml.get_widget('use_tls_checkbutton').set_active(usetls)
|
||||
|
||||
gpg_key_label = self.xml.get_widget('gpg_key_label')
|
||||
if gajim.config.get('usegpg'):
|
||||
self.init_account_gpg()
|
||||
|
@ -1060,6 +1062,7 @@ class Account_modification_window:
|
|||
dialogs.Error_dialog(_('You must enter a proxy host to use proxy'))
|
||||
return
|
||||
|
||||
usetls = self.xml.get_widget('use_tls_checkbutton').get_active()
|
||||
(login, hostname) = jid.split('@')
|
||||
key_name = self.xml.get_widget('gpg_name_label').get_text()
|
||||
if key_name == '': #no key selected
|
||||
|
@ -1119,6 +1122,7 @@ class Account_modification_window:
|
|||
gajim.config.set_per('accounts', name, 'use_proxy', use_proxy)
|
||||
gajim.config.set_per('accounts', name, 'proxyhost', proxyhost)
|
||||
gajim.config.set_per('accounts', name, 'proxyport', proxyport)
|
||||
gajim.config.set_per('accounts', name, 'usetls', usetls)
|
||||
gajim.config.set_per('accounts', name, 'keyid', keyID)
|
||||
gajim.config.set_per('accounts', name, 'keyname', key_name)
|
||||
gajim.config.set_per('accounts', name, 'savegpgpass', \
|
||||
|
@ -1160,6 +1164,7 @@ class Account_modification_window:
|
|||
gajim.config.set_per('accounts', name, 'use_proxy', use_proxy)
|
||||
gajim.config.set_per('accounts', name, 'proxyhost', proxyhost)
|
||||
gajim.config.set_per('accounts', name, 'proxyport', proxyport)
|
||||
gajim.config.set_per('accounts', name, 'usetls', usetls)
|
||||
gajim.config.set_per('accounts', name, 'keyid', keyID)
|
||||
gajim.config.set_per('accounts', name, 'keyname', key_name)
|
||||
gajim.config.set_per('accounts', name, 'savegpgpass', \
|
||||
|
|
|
@ -1082,7 +1082,6 @@
|
|||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_use_tls_checkbutton_toggled" last_modification_time="Sun, 08 May 2005 21:50:57 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
Loading…
Reference in New Issue