we can now use SSL
(we can't force to not use TLS: bug in xmpp)
This commit is contained in:
parent
abbf2bde6f
commit
f9f341f104
|
@ -117,7 +117,7 @@ class Config:
|
|||
'proxypass': [ opt_str, '' ],
|
||||
'keyid': [ opt_str, '' ],
|
||||
'keyname': [ opt_str, '' ],
|
||||
'usetls': [ opt_bool, False ],
|
||||
'usessl': [ opt_bool, False ],
|
||||
'force_nonSASL': [ opt_bool, False ],
|
||||
'savegpgpass': [ opt_bool, False ],
|
||||
'gpgpassword': [ opt_str, '' ],
|
||||
|
|
|
@ -519,7 +519,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')
|
||||
usessl = gajim.config.get_per('accounts', self.name, 'usessl')
|
||||
|
||||
#create connection if it doesn't already exist
|
||||
if self.connection:
|
||||
|
@ -545,7 +545,10 @@ class Connection:
|
|||
common.xmpp.dispatcher.DefaultTimeout = 45
|
||||
con.UnregisterDisconnectHandler(con.DisconnectHandler)
|
||||
con.RegisterDisconnectHandler(self._disconnectedCB)
|
||||
con_type = con.connect((hostname,5222), proxy=proxy, tls=usetls) #FIXME: blocking
|
||||
port = 5222
|
||||
if usessl:
|
||||
port = 5223
|
||||
con_type = con.connect((hostname, port), proxy = proxy) #FIXME: blocking
|
||||
if not con_type:
|
||||
gajim.log.debug("Couldn't connect to %s" % name)
|
||||
self.connected = 0
|
||||
|
|
|
@ -1083,8 +1083,8 @@ class Account_modification_window:
|
|||
entry.set_text(gajim.config.get_per('accounts', self.account,
|
||||
'proxypass'))
|
||||
|
||||
usetls = gajim.config.get_per('accounts', self.account, 'usetls')
|
||||
self.xml.get_widget('use_tls_checkbutton').set_active(usetls)
|
||||
usessl = gajim.config.get_per('accounts', self.account, 'usessl')
|
||||
self.xml.get_widget('use_ssl_checkbutton').set_active(usessl)
|
||||
|
||||
gpg_key_label = self.xml.get_widget('gpg_key_label')
|
||||
if gajim.config.get('usegpg'):
|
||||
|
@ -1168,7 +1168,7 @@ class Account_modification_window:
|
|||
dialogs.Error_dialog(_('You must enter a proxy host to use proxy'))
|
||||
return
|
||||
|
||||
config['usetls'] = self.xml.get_widget('use_tls_checkbutton').get_active()
|
||||
config['usessl'] = self.xml.get_widget('use_ssl_checkbutton').get_active()
|
||||
(config['name'], config['hostname']) = jid.split('@')
|
||||
config['keyname'] = self.xml.get_widget('gpg_name_label').get_text()
|
||||
if config['keyname'] == '': #no key selected
|
||||
|
|
|
@ -1029,7 +1029,7 @@
|
|||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="tls_frame">
|
||||
<widget class="GtkFrame" id="ssl_frame">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
|
@ -1048,10 +1048,11 @@
|
|||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="use_tls_checkbutton">
|
||||
<widget class="GtkCheckButton" id="use_ssl_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Check this so Gajim will connect in port 5223 where legacy servers are expected to have SSL capabilities. Note that Gajim use TLS encryption by default if broadcasted by the server, and with this option on you disable TLS</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Use _TLS</property>
|
||||
<property name="label" translatable="yes">Use _SSL</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
|
@ -1066,7 +1067,7 @@
|
|||
<child>
|
||||
<widget class="GtkLabel" id="label252">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>TLS</b></property>
|
||||
<property name="label" translatable="yes"><b>SSL</b></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
|
|
Loading…
Reference in New Issue