changeset 716b354b7199 in /home/hg/repos/gajim
author: Yann Leboulanger asterix@lagaule.org branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=716b354b7199 description: do not warn when tls cert changes for a valid one
diffstat:
src/common/connection.py | 15 ++++++++------- src/gui_interface.py | 7 ++++--- 2 files changed, 12 insertions(+), 10 deletions(-)
diffs (42 lines):
diff -r 48e2fb49ba02 -r 716b354b7199 src/common/connection.py --- a/src/common/connection.py Thu Mar 31 22:46:44 2016 +0200 +++ b/src/common/connection.py Sat Apr 02 14:06:20 2016 +0200 @@ -1457,13 +1457,14 @@ if saved_fingerprint: # Check sha1 fingerprint if fingerprint != saved_fingerprint: - gajim.nec.push_incoming_event(FingerprintErrorEvent(None, - conn=self, certificate=con.Connection.ssl_certificate, - new_fingerprint=fingerprint)) - return True - else: - gajim.config.set_per('accounts', self.name, - 'ssl_fingerprint_sha1', fingerprint) + if not check_X509.check_certificate(cert, hostname): + gajim.nec.push_incoming_event(FingerprintErrorEvent( + None, conn=self, + certificate=con.Connection.ssl_certificate, + new_fingerprint=fingerprint)) + return True + gajim.config.set_per('accounts', self.name, 'ssl_fingerprint_sha1', + fingerprint) if not check_X509.check_certificate(con.Connection.ssl_certificate, hostname) and '100' not in gajim.config.get_per('accounts', self.name, 'ignore_ssl_errors').split(): diff -r 48e2fb49ba02 -r 716b354b7199 src/gui_interface.py --- a/src/gui_interface.py Thu Mar 31 22:46:44 2016 +0200 +++ b/src/gui_interface.py Sat Apr 02 14:06:20 2016 +0200 @@ -1400,9 +1400,10 @@
pritext = _('SSL certificate error') sectext = _('It seems the SSL certificate of account %(account)s has ' - 'changed or your connection is being hacked.\nOld fingerprint: ' - '%(old)s\nNew fingerprint: %(new)s\n\nDo you still want to connect ' - 'and update the fingerprint of the certificate?') % \ + 'changed and is not valid or your connection is being hacked.\n' + 'Old fingerprint: %(old)s\nNew fingerprint: %(new)s\n\n' + 'Do you still want to connect and update the fingerprint of the ' + 'certificate?') % \ {'account': account, 'old': gajim.config.get_per('accounts', account, 'ssl_fingerprint_sha1'), 'new': obj.new_fingerprint} if 'fingerprint_error' in self.instances[account]['online_dialog']: