GPG is always authenticated as we use GPG's WoT.

An idea: Currently, we don't send the message when the key has not
enough trust. How about showing the unauthenticated icon then, but
sending the message?
This commit is contained in:
js 2008-07-15 16:45:39 +00:00
parent 92e9a51fc5
commit e01968ef91

View file

@ -1130,20 +1130,26 @@ class ChatControl(ChatControlBase):
# Enable encryption if needed # Enable encryption if needed
e2e_is_active = self.session and self.session.enable_encryption e2e_is_active = self.session and self.session.enable_encryption
self.gpg_is_active = False self.gpg_is_active = False
gpg_pref = gajim.config.get_per('contacts', contact.jid, 'gpg_enabled') gpg_pref = gajim.config.get_per('contacts', contact.jid,
'gpg_enabled')
# try GPG first # try GPG first
if not e2e_is_active and gpg_pref and gajim.config.get_per('accounts', self.account, 'keyid') and\ if not e2e_is_active and gpg_pref and \
gajim.config.get_per('accounts', self.account, 'keyid') and \
gajim.connections[self.account].USE_GPG: gajim.connections[self.account].USE_GPG:
self.gpg_is_active = True self.gpg_is_active = True
gajim.encrypted_chats[self.account].append(contact.jid) gajim.encrypted_chats[self.account].append(contact.jid)
msg = _('GPG encryption enabled') msg = _('GPG encryption enabled')
ChatControlBase.print_conversation_line(self, msg, 'status', '', None) ChatControlBase.print_conversation_line(self, msg,
'status', '', None)
if self.session: if self.session:
self.session.loggable = gajim.config.get('log_encrypted_sessions') self.session.loggable = gajim.config.get(
self._show_lock_image(self.gpg_is_active, 'GPG', self.gpg_is_active, self.session and \ 'log_encrypted_sessions')
self.session.is_loggable(), self.session and self.session.verified_identity) # 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)
# then try E2E # then try E2E
# XXX: Once we have fallback to disco, remove notexistant check # XXX: Once we have fallback to disco, remove notexistant check
elif not e2e_is_active and \ elif not e2e_is_active and \