Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
autonym
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
putro
autonym
Commits
e2ee1a37
Commit
e2ee1a37
authored
Apr 04, 2014
by
putro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bad management of wrong password in signing, fixed mail-to-news option
parent
11bc0e21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
autonym.py
autonym.py
+5
-6
gpgfuncts.py
gpgfuncts.py
+1
-1
No files found.
autonym.py
View file @
e2ee1a37
...
...
@@ -53,10 +53,9 @@ def menu():
4 to delete a nym
\n\
5 to create a new secret key
\n\
6 to delete a secret key
\n\
10 to send msg via smtp (NOT ANONYMOUS)
\n\
q to quit
\n\n\n
"
)
#perform actions based on selection above
#
perform actions based on selection above
if
selection
==
"1"
:
askNym
()
menu
()
...
...
@@ -164,6 +163,8 @@ def prepareSetupMsg(keyid, subj_type, subject):
def
signCryptMsg
(
msg
,
dest
,
sign
,
passphrase
):
msg
=
gpgfuncts
.
stripVersion
(
str
(
gpgfuncts
.
encrypt
(
msg
,
dest
,
sign
=
sign
,
passphrase
=
passphrase
)))
if
msg
==
"ERROR"
:
menu
()
return
msg
...
...
@@ -229,7 +230,7 @@ def writeMessage():
if
validateEmail
(
recipient
):
msg
=
msg
+
"To: %s
\n
"
%
recipient
else
:
msg
=
msg
+
"To: %s
\n
"
%
options
[
'mail-to-news'
]
msg
=
msg
+
"To: %s
\n
"
%
[
config
[
'options'
][
'mail-to-news'
]
]
msg
=
msg
+
"Newsgroups: %s
\n
"
%
recipient
msg
=
msg
+
"Subject: %s
\n\n
"
%
subject
...
...
@@ -241,9 +242,7 @@ def writeMessage():
msg
=
msg
+
text
dest
=
'send@'
+
anym
.
domain
emsg
=
gpgfuncts
.
stripVersion
(
str
(
gpgfuncts
.
encrypt
(
msg
,
dest
,
sign
=
anym
.
fp
,
passphrase
=
pwd
)))
signCryptMsg
(
msg
,
dest
,
sign
=
anym
.
fp
,
passphrase
=
pwd
)
sendMixMsg
(
dest
,
emsg
)
...
...
gpgfuncts.py
View file @
e2ee1a37
...
...
@@ -155,7 +155,7 @@ def encrypt(message, recipient, sign=False, passphrase=False, test=False):
if
not
test
:
if
encrypted_ascii_data
.
status
!=
"encryption ok"
:
config
[
'last_message'
]
=
"ERROR "
+
encrypted_ascii_data
.
status
+
" (recipient: %s)"
%
recipient
return
False
return
"ERROR"
else
:
return
stripVersion
(
str
(
encrypted_ascii_data
))
else
:
...
...
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