GPG -> OpenPGP. Fixes #7312
This commit is contained in:
parent
2da62b5c17
commit
7bbabeec2d
|
@ -1683,7 +1683,7 @@ class ChatControl(ChatControlBase):
|
|||
gajim.connections[self.account].USE_GPG:
|
||||
self.gpg_is_active = True
|
||||
gajim.encrypted_chats[self.account].append(contact.jid)
|
||||
msg = _('GPG encryption enabled')
|
||||
msg = _('OpenPGP encryption enabled')
|
||||
ChatControlBase.print_conversation_line(self, msg, 'status', '',
|
||||
None)
|
||||
|
||||
|
@ -1691,8 +1691,9 @@ class ChatControl(ChatControlBase):
|
|||
self.session.loggable = gajim.config.get_per('accounts',
|
||||
self.account, 'log_encrypted_sessions')
|
||||
# GPG is always authenticated as we use GPG's WoT
|
||||
self._show_lock_image(self.gpg_is_active, 'GPG', self.gpg_is_active,
|
||||
self.session and self.session.is_loggable(), True)
|
||||
self._show_lock_image(self.gpg_is_active, 'OpenPGP',
|
||||
self.gpg_is_active, self.session and self.session.is_loggable()
|
||||
True)
|
||||
|
||||
self.update_ui()
|
||||
# restore previous conversation
|
||||
|
@ -2226,9 +2227,9 @@ class ChatControl(ChatControlBase):
|
|||
|
||||
def _toggle_gpg(self):
|
||||
if not self.gpg_is_active and not self.contact.keyID:
|
||||
dialogs.ErrorDialog(_('No GPG key assigned'),
|
||||
_('No GPG key is assigned to this contact. So you cannot '
|
||||
'encrypt messages with GPG.'))
|
||||
dialogs.ErrorDialog(_('No OpenPGP key assigned'),
|
||||
_('No OpenPGP key is assigned to this contact. So you cannot '
|
||||
'encrypt messages with OpenPGP.'))
|
||||
return
|
||||
ec = gajim.encrypted_chats[self.account]
|
||||
if self.gpg_is_active:
|
||||
|
@ -2236,9 +2237,9 @@ class ChatControl(ChatControlBase):
|
|||
ec.remove(self.contact.jid)
|
||||
self.gpg_is_active = False
|
||||
loggable = False
|
||||
msg = _('GPG encryption disabled')
|
||||
ChatControlBase.print_conversation_line(self, msg,
|
||||
'status', '', None)
|
||||
msg = _('OpenPGP encryption disabled')
|
||||
ChatControlBase.print_conversation_line(self, msg, 'status', '',
|
||||
None)
|
||||
if self.session:
|
||||
self.session.loggable = True
|
||||
|
||||
|
@ -2246,9 +2247,9 @@ class ChatControl(ChatControlBase):
|
|||
# Enable encryption
|
||||
ec.append(self.contact.jid)
|
||||
self.gpg_is_active = True
|
||||
msg = _('GPG encryption enabled')
|
||||
ChatControlBase.print_conversation_line(self, msg,
|
||||
'status', '', None)
|
||||
msg = _('OpenPGP encryption enabled')
|
||||
ChatControlBase.print_conversation_line(self, msg, 'status', '',
|
||||
None)
|
||||
|
||||
loggable = gajim.config.get_per('accounts', self.account,
|
||||
'log_encrypted_sessions')
|
||||
|
@ -2272,7 +2273,7 @@ class ChatControl(ChatControlBase):
|
|||
gajim.config.set_per('contacts', self.contact.jid,
|
||||
'gpg_enabled', self.gpg_is_active)
|
||||
|
||||
self._show_lock_image(self.gpg_is_active, 'GPG',
|
||||
self._show_lock_image(self.gpg_is_active, 'OpenPGP',
|
||||
self.gpg_is_active, loggable, True)
|
||||
|
||||
def _show_lock_image(self, visible, enc_type='', enc_enabled=False,
|
||||
|
|
|
@ -186,7 +186,7 @@ class StandardCommonChatCommands(CommandContainer):
|
|||
self.conv_textview.clear()
|
||||
|
||||
@command
|
||||
@doc(_("Toggle the GPG encryption"))
|
||||
@doc(_("Toggle the OpenPGP encryption"))
|
||||
def gpg(self):
|
||||
self._toggle_gpg()
|
||||
|
||||
|
|
|
@ -5131,22 +5131,22 @@ class GPGInfoWindow:
|
|||
image = 'gajim-security_low'
|
||||
elif not keyID:
|
||||
# No key assigned nor a key is used by remote contact
|
||||
verification_status = _('No GPG key assigned')
|
||||
info = _('No GPG key is assigned to this contact. So you cannot '
|
||||
verification_status = _('No OpenPGP key assigned')
|
||||
info = _('No OpenPGP key is assigned to this contact. So you cannot'
|
||||
' encrypt messages.')
|
||||
image = 'gajim-security_low'
|
||||
else:
|
||||
error = gajim.connections[account].gpg.encrypt('test', [keyID])[1]
|
||||
if error:
|
||||
verification_status = _('''Contact's identity NOT verified''')
|
||||
info = _('GPG key is assigned to this contact, but <b>you do not '
|
||||
'trust his key</b>, so message <b>cannot</b> be encrypted. Use '
|
||||
'your GPG client to trust this key.')
|
||||
info = _('OpenPGP key is assigned to this contact, but <b>you '
|
||||
'do not trust his key</b>, so message <b>cannot</b> be '
|
||||
'encrypted. Use your OpenPGP client to trust this key.')
|
||||
image = 'gajim-security_low'
|
||||
else:
|
||||
verification_status = _('''Contact's identity verified''')
|
||||
info = _('GPG Key is assigned to this contact, and you trust his '
|
||||
'key, so messages will be encrypted.')
|
||||
info = _('OpenPGP Key is assigned to this contact, and you '
|
||||
'trust his key, so messages will be encrypted.')
|
||||
image = 'gajim-security_high'
|
||||
|
||||
status_label.set_markup('<b><span size="x-large">%s</span></b>' % \
|
||||
|
|
|
@ -59,8 +59,8 @@ class FeaturesWindow:
|
|||
_('A script to control Gajim via commandline.'),
|
||||
_('Requires python-dbus.'),
|
||||
_('Feature not available under Windows.')),
|
||||
_('OpenGPG message encryption'): (self.gpg_available,
|
||||
_('Encrypting chat messages with gpg keys.'),
|
||||
_('OpenPGP message encryption'): (self.gpg_available,
|
||||
_('Encrypting chat messages with OpenPGP keys.'),
|
||||
_('Requires gpg and python-gnupg (http://code.google.com/p/python-gnupg/).'),
|
||||
_('Requires gpg.exe in PATH.')),
|
||||
_('Network-manager'): (self.network_manager_available,
|
||||
|
|
|
@ -655,8 +655,9 @@ class Interface:
|
|||
def handle_event_bad_gpg_passphrase(self, obj):
|
||||
#('BAD_PASSPHRASE', account, ())
|
||||
if obj.use_gpg_agent:
|
||||
sectext = _('You configured Gajim to use GPG agent, but there is no'
|
||||
' GPG agent running or it returned a wrong passphrase.\n')
|
||||
sectext = _('You configured Gajim to use OpenPGP agent, but there '
|
||||
'is no OpenPGP agent running or it returned a wrong passphrase.'
|
||||
'\n')
|
||||
sectext += _('You are currently connected without your OpenPGP '
|
||||
'key.')
|
||||
dialogs.WarningDialog(_('Your passphrase is incorrect'), sectext)
|
||||
|
@ -664,7 +665,7 @@ class Interface:
|
|||
path = gtkgui_helpers.get_icon_path('gajim-warning', 48)
|
||||
account = obj.conn.name
|
||||
notify.popup('warning', account, account, 'warning', path,
|
||||
_('OpenGPG Passphrase Incorrect'),
|
||||
_('OpenPGP Passphrase Incorrect'),
|
||||
_('You are currently connected without your OpenPGP key.'))
|
||||
self.forget_gpg_passphrase(obj.keyID)
|
||||
|
||||
|
@ -700,9 +701,9 @@ class Interface:
|
|||
def on_no():
|
||||
obj.callback(False)
|
||||
|
||||
dialogs.YesNoDialog(_('GPG key not trusted'), _('The GPG key used to '
|
||||
'encrypt this chat is not trusted. Do you really want to encrypt '
|
||||
'this message?'), checktext=_('_Do not ask me again'),
|
||||
dialogs.YesNoDialog(_('OpenPGP key not trusted'), _('The OpenPGP key '
|
||||
'used to encrypt this chat is not trusted. Do you really want to '
|
||||
'encrypt this message?'), checktext=_('_Do not ask me again'),
|
||||
on_response_yes=on_yes, on_response_no=on_no)
|
||||
|
||||
def handle_event_password_required(self, obj):
|
||||
|
@ -2978,7 +2979,7 @@ class PassphraseRequest:
|
|||
|
||||
def create_dialog(self, account):
|
||||
title = _('Passphrase Required')
|
||||
second = _('Enter GPG key passphrase for key %(keyid)s (account '
|
||||
second = _('Enter OpenPGP key passphrase for key %(keyid)s (account '
|
||||
'%(account)s).') % {'keyid': self.keyid, 'account': account}
|
||||
|
||||
def _cancel():
|
||||
|
@ -2992,9 +2993,9 @@ class PassphraseRequest:
|
|||
self.complete(passphrase)
|
||||
return
|
||||
elif result == 'expired':
|
||||
dialogs.ErrorDialog(_('GPG key expired'),
|
||||
_('Your GPG key has expired, you will be connected to %s '
|
||||
'without OpenPGP.') % account)
|
||||
dialogs.ErrorDialog(_('OpenPGP key expired'),
|
||||
_('Your OpenPGP key has expired, you will be connected to '
|
||||
'%s without OpenPGP.') % account)
|
||||
# Don't try to connect with GPG
|
||||
gajim.connections[account].continue_connect_info[2] = False
|
||||
self.complete(None)
|
||||
|
@ -3003,7 +3004,7 @@ class PassphraseRequest:
|
|||
if count < 3:
|
||||
# ask again
|
||||
dialogs.PassphraseDialog(_('Wrong Passphrase'),
|
||||
_('Please retype your GPG passphrase or press Cancel.'),
|
||||
_('Please retype your OpenPGP passphrase or press Cancel.'),
|
||||
ok_handler=(_ok, count + 1), cancel_handler=_cancel)
|
||||
else:
|
||||
# user failed 3 times, continue without GPG
|
||||
|
|
|
@ -2129,7 +2129,7 @@ class RosterWindow:
|
|||
|
||||
keyid = gajim.config.get_per('accounts', account, 'keyid')
|
||||
if keyid and not gajim.connections[account].gpg:
|
||||
dialogs.WarningDialog(_('GPG is not usable'),
|
||||
dialogs.WarningDialog(_('OpenPGP is not usable'),
|
||||
_('You will be connected to %s without OpenPGP.') % \
|
||||
account)
|
||||
|
||||
|
|
Loading…
Reference in New Issue