ability to see certificate on ssl error dialog. Fixes #3998
This commit is contained in:
parent
3424883913
commit
2b65c5d5a5
|
@ -1273,7 +1273,8 @@ class Connection(CommonConnection, ConnectionHandlers):
|
|||
gajim.nec.push_incoming_event(SSLErrorEvent(None, conn=self,
|
||||
error_text=text, error_num=errnum,
|
||||
cert=con.Connection.ssl_cert_pem,
|
||||
fingerprint=con.Connection.ssl_fingerprint_sha1))
|
||||
fingerprint=con.Connection.ssl_fingerprint_sha1,
|
||||
certificate=con.Connection.ssl_certificate))
|
||||
return True
|
||||
if hasattr(con.Connection, 'ssl_fingerprint_sha1'):
|
||||
saved_fingerprint = gajim.config.get_per('accounts', self.name, 'ssl_fingerprint_sha1')
|
||||
|
|
|
@ -5646,11 +5646,28 @@ class CheckFingerprintDialog(YesNoDialog):
|
|||
self.cert = certificate
|
||||
YesNoDialog.__init__(self, pritext, sectext, checktext, on_response_yes,
|
||||
on_response_no)
|
||||
b = gtk.Button('View cert...')
|
||||
b = gtk.Button(_('View cert...'))
|
||||
b.connect('clicked', self.on_cert_clicked)
|
||||
b.show_all()
|
||||
area = self.get_action_area()
|
||||
area.pack_start(b)
|
||||
|
||||
def on_cert_clicked(self, button):
|
||||
d = CertificatDialog(self, self.account, self.cert)
|
||||
d = CertificatDialog(self, self.account, self.cert)
|
||||
|
||||
class SSLErrorDialog(ConfirmationDialogDoubleCheck):
|
||||
def __init__(self, account, certificate, pritext, sectext, checktext1,
|
||||
checktext2, on_response_ok=None, on_response_cancel=None):
|
||||
self.account = account
|
||||
self.cert = certificate
|
||||
ConfirmationDialogDoubleCheck.__init__(self, pritext, sectext,
|
||||
checktext1, checktext2, on_response_ok, on_response_cancel,
|
||||
is_modal=False)
|
||||
b = gtk.Button(_('View cert...'))
|
||||
b.connect('clicked', self.on_cert_clicked)
|
||||
b.show_all()
|
||||
area = self.get_action_area()
|
||||
area.pack_start(b)
|
||||
|
||||
def on_cert_clicked(self, button):
|
||||
d = CertificatDialog(self, self.account, self.cert)
|
||||
|
|
|
@ -1219,8 +1219,9 @@ class Interface:
|
|||
if 'ssl_error' in self.instances[account]['online_dialog']:
|
||||
self.instances[account]['online_dialog']['ssl_error'].destroy()
|
||||
self.instances[account]['online_dialog']['ssl_error'] = \
|
||||
dialogs.ConfirmationDialogDoubleCheck(pritext, sectext, checktext1,
|
||||
checktext2, on_response_ok=on_ok, on_response_cancel=on_cancel)
|
||||
dialogs.SSLErrorDialog(obj.conn.name, obj.certificate, pritext,
|
||||
sectext, checktext1, checktext2, on_response_ok=on_ok,
|
||||
on_response_cancel=on_cancel)
|
||||
|
||||
def handle_event_fingerprint_error(self, obj):
|
||||
# ('FINGERPRINT_ERROR', account, (new_fingerprint,))
|
||||
|
|
Loading…
Reference in New Issue