we now handle when the user doesn't give his OpenPGP passphrase and print an error message
This commit is contained in:
parent
0bc0b5f783
commit
7538333c5d
|
@ -724,6 +724,10 @@ class Connection:
|
|||
signed = ''
|
||||
keyID = gajim.config.get_per('accounts', self.name, 'keyid')
|
||||
if keyID and USE_GPG:
|
||||
if self.connected < 2 and self.gpg.passphrase == None: # We didn't set a passphrase
|
||||
self.dispatch('ERROR', (_('OpenPGP Key was not given'),
|
||||
_('You will be connected to %s without OpenPGP.') % self.name))
|
||||
else:
|
||||
if not msg:
|
||||
lowered_uf_status_msg = helpers.get_uf_show(show).lower()
|
||||
msg = _("I'm %s") % lowered_uf_status_msg
|
||||
|
|
|
@ -907,7 +907,7 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
|
|||
_('Save passphrase'))
|
||||
passphrase, save = w.run()
|
||||
if passphrase == -1:
|
||||
passphrase = ''
|
||||
passphrase = None
|
||||
else:
|
||||
self.gpg_passphrase[keyid] = passphrase
|
||||
gobject.timeout_add(30000, self.forget_gpg_passphrase, keyid)
|
||||
|
|
Loading…
Reference in New Issue