Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
194
Issues
194
List
Boards
Labels
Service Desk
Milestones
Merge Requests
20
Merge Requests
20
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim
Commits
d0ec490b
Commit
d0ec490b
authored
Dec 01, 2013
by
Yann Leboulanger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the "do not ask me again" behaviour with untrusted GPG key warning. Fixes
#7584
parent
54d8b1ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
src/common/connection.py
src/common/connection.py
+1
-1
src/common/gpg.py
src/common/gpg.py
+8
-2
src/gui_interface.py
src/gui_interface.py
+1
-1
No files found.
src/common/connection.py
View file @
d0ec490b
...
...
@@ -326,7 +326,7 @@ def _on_always_trust(answer):
form_node
,
user_nick
,
keyID
,
attention
,
correction_msg
,
callback
)
gajim
.
nec
.
push_incoming_event
(
GPGTrustKeyEvent
(
None
,
conn
=
self
,
callback
=
_on_always_trust
))
conn
=
self
,
keyID
=
keyID
,
callback
=
_on_always_trust
))
else
:
self
.
_message_encrypted_cb
(
output
,
type_
,
msg
,
msgtxt
,
original_message
,
fjid
,
resource
,
jid
,
xhtml
,
...
...
src/common/gpg.py
View file @
d0ec490b
...
...
@@ -34,7 +34,7 @@ def __init__(self, use_agent=False):
self
.
decode_errors
=
'replace'
self
.
passphrase
=
None
self
.
use_agent
=
use_agent
self
.
always_trust
=
False
self
.
always_trust
=
[]
# list of keyID to always trust
def
_setup_my_options
(
self
):
self
.
options
.
armor
=
1
...
...
@@ -47,8 +47,14 @@ def _setup_my_options(self):
self
.
options
.
extra_args
.
append
(
'--use-agent'
)
def
encrypt
(
self
,
str_
,
recipients
,
always_trust
=
False
):
trust
=
always_trust
if
not
trust
:
trust
=
True
for
key
in
recipients
:
if
key
not
in
self
.
always_trust
:
trust
=
False
result
=
super
(
GnuPG
,
self
).
encrypt
(
str_
,
recipients
,
always_trust
=
always_
trust
,
passphrase
=
self
.
passphrase
)
always_trust
=
trust
,
passphrase
=
self
.
passphrase
)
if
result
.
status
==
'invalid recipient'
:
return
''
,
'NOT_TRUSTED'
...
...
src/gui_interface.py
View file @
d0ec490b
...
...
@@ -695,7 +695,7 @@ def handle_event_gpg_trust_key(self, obj):
#('GPG_ALWAYS_TRUST', account, callback)
def
on_yes
(
checked
):
if
checked
:
obj
.
conn
.
gpg
.
always_trust
=
True
obj
.
conn
.
gpg
.
always_trust
.
append
(
obj
.
keyID
)
obj
.
callback
(
True
)
def
on_no
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment