edward.git
8 years agoonly quote the message if we are going to encrypt.
Andrew Engelbrecht [Wed, 22 Jul 2015 23:43:35 +0000 (19:43 -0400)]
only quote the message if we are going to encrypt.

8 years agothis belongs over here
Andrew Engelbrecht [Wed, 22 Jul 2015 23:42:28 +0000 (19:42 -0400)]
this belongs over here

partly because the function it was in was recursive.

8 years agoadded a function which tries to load the pub key
Andrew Engelbrecht [Wed, 22 Jul 2015 23:38:58 +0000 (19:38 -0400)]
added a function which tries to load the pub key

8 years agothis will be useful later
Andrew Engelbrecht [Wed, 22 Jul 2015 21:39:19 +0000 (17:39 -0400)]
this will be useful later

for knowing how which nested layers of decrytion to reply with.

8 years agopick out public key fingerpints from the message
Andrew Engelbrecht [Wed, 22 Jul 2015 21:38:32 +0000 (17:38 -0400)]
pick out public key fingerpints from the message

this will be the key that the reply is encrypted to, if one is
available.

8 years agowhitespace changes
Andrew Engelbrecht [Wed, 22 Jul 2015 21:18:39 +0000 (17:18 -0400)]
whitespace changes

8 years agoreturn fingerprints not sig objects
Andrew Engelbrecht [Wed, 22 Jul 2015 21:17:41 +0000 (17:17 -0400)]
return fingerprints not sig objects

8 years agoadd signed txt, etc. if it's in an encrypted block
Andrew Engelbrecht [Wed, 22 Jul 2015 19:59:34 +0000 (15:59 -0400)]
add signed txt, etc. if it's in an encrypted block

later there will need to be fingerprint checking to make sure that
edward can't become a decryption service for edward traffic observers.

8 years agorenamed variable for clarity
Andrew Engelbrecht [Wed, 22 Jul 2015 19:49:37 +0000 (15:49 -0400)]
renamed variable for clarity

eddy_obj -> eddymsg_obj

8 years agoremoved %s from end of string
Andrew Engelbrecht [Wed, 22 Jul 2015 19:47:20 +0000 (15:47 -0400)]
removed %s from end of string

it's unneeded by this version of edward.

8 years agoadded basic mutli-language reply generation
Andrew Engelbrecht [Wed, 22 Jul 2015 19:44:02 +0000 (15:44 -0400)]
added basic mutli-language reply generation

8 years agofixed detached signature verification
Andrew Engelbrecht [Wed, 22 Jul 2015 19:42:03 +0000 (15:42 -0400)]
fixed detached signature verification

the indentation was wrong.

8 years agosome variable name changes
Andrew Engelbrecht [Wed, 22 Jul 2015 16:32:39 +0000 (12:32 -0400)]
some variable name changes

... to be more specific

8 years agoadded detached sig verification
Andrew Engelbrecht [Wed, 22 Jul 2015 16:29:02 +0000 (12:29 -0400)]
added detached sig verification

woohoo!!

8 years agodon't process 'None' EddyMsg objects
Andrew Engelbrecht [Wed, 22 Jul 2015 15:50:38 +0000 (11:50 -0400)]
don't process 'None' EddyMsg objects

it would only mask bugs elsewhere in the code.

8 years agodon't pass back the object pointer
Andrew Engelbrecht [Wed, 22 Jul 2015 15:49:56 +0000 (11:49 -0400)]
don't pass back the object pointer

because it is unchanged.

8 years agofixed bug
Andrew Engelbrecht [Wed, 22 Jul 2015 14:02:30 +0000 (10:02 -0400)]
fixed bug

which occurred when the parsed email did not have a "To: " field.

8 years agolanguage support requires the translation files
Andrew Engelbrecht [Wed, 22 Jul 2015 13:59:55 +0000 (09:59 -0400)]
language support requires the translation files

this commit adds them.

8 years agoadded the beginnings of language support
Andrew Engelbrecht [Wed, 22 Jul 2015 01:19:03 +0000 (21:19 -0400)]
added the beginnings of language support

8 years agomoved function
Andrew Engelbrecht [Wed, 22 Jul 2015 00:27:08 +0000 (20:27 -0400)]
moved function

8 years agorenamed function
Andrew Engelbrecht [Wed, 22 Jul 2015 00:26:22 +0000 (20:26 -0400)]
renamed function

8 years agomove this here
Andrew Engelbrecht [Tue, 21 Jul 2015 23:53:03 +0000 (19:53 -0400)]
move this here

8 years agonotice when there isn't gpg data available
Andrew Engelbrecht [Tue, 21 Jul 2015 23:51:51 +0000 (19:51 -0400)]
notice when there isn't gpg data available

which happens when gpg doesn't get valid or complete input

8 years agoavoid a certain type of bug
Andrew Engelbrecht [Tue, 21 Jul 2015 23:51:13 +0000 (19:51 -0400)]
avoid a certain type of bug

8 years agoadded clearsigning verification
Andrew Engelbrecht [Tue, 21 Jul 2015 23:32:40 +0000 (19:32 -0400)]
added clearsigning verification

this is all coming along nicely...

8 years agoported key importing capability
Andrew Engelbrecht [Tue, 21 Jul 2015 23:17:58 +0000 (19:17 -0400)]
ported key importing capability

8 years agoremove unused functions
Andrew Engelbrecht [Tue, 21 Jul 2015 23:15:11 +0000 (19:15 -0400)]
remove unused functions

8 years agosimple performance optimization
Andrew Engelbrecht [Tue, 21 Jul 2015 22:55:19 +0000 (18:55 -0400)]
simple performance optimization

by not trying to re-scan and re-split gpg data

8 years agofor better debug functionality
Andrew Engelbrecht [Tue, 21 Jul 2015 22:13:45 +0000 (18:13 -0400)]
for better debug functionality

now you can debug(obj_whatever)

8 years agosimplification of code
Andrew Engelbrecht [Tue, 21 Jul 2015 22:13:33 +0000 (18:13 -0400)]
simplification of code

8 years agoadded decryption function
Andrew Engelbrecht [Tue, 21 Jul 2015 22:13:18 +0000 (18:13 -0400)]
added decryption function

8 years agocreated higher order function used by flatten_eddy
Andrew Engelbrecht [Tue, 21 Jul 2015 22:09:21 +0000 (18:09 -0400)]
created higher order function used by flatten_eddy

it will also be used by the decryption function.

8 years agodon't crash if a byte string can't be decoded
Andrew Engelbrecht [Tue, 21 Jul 2015 17:23:28 +0000 (13:23 -0400)]
don't crash if a byte string can't be decoded

8 years agomore useful ./run-tests output
Andrew Engelbrecht [Tue, 21 Jul 2015 07:20:03 +0000 (03:20 -0400)]
more useful ./run-tests output

8 years agoprogress made toward implementing a better parser
Andrew Engelbrecht [Tue, 21 Jul 2015 07:17:06 +0000 (03:17 -0400)]
progress made toward implementing a better parser

this should make detached signature verification easier and prevent
adding its contents multiple times. it should also give finer-grained
control over what decrypted and/or signed parts to include in a reply.

8 years agoadded the beginnings of detached sig verification
Andrew Engelbrecht [Tue, 21 Jul 2015 00:01:30 +0000 (20:01 -0400)]
added the beginnings of detached sig verification

also added some test cases.

8 years agoadded test of corrupted encryption blocks.
Andrew Engelbrecht [Mon, 20 Jul 2015 23:45:33 +0000 (19:45 -0400)]
added test of corrupted encryption blocks.

8 years agoPass around fingerprints instead of gpgme keys
Andrew Engelbrecht [Mon, 20 Jul 2015 23:06:06 +0000 (19:06 -0400)]
Pass around fingerprints instead of gpgme keys

Keys used for encryption are not alway available. Trying to get the key
from a fingerprint sometimes caused edward to crash. It's a better idea
to pass around fingerprints rather than key objects. This method should
also be faster.

8 years agoupdated the test files and added another gpg key
Andrew Engelbrecht [Mon, 20 Jul 2015 23:03:20 +0000 (19:03 -0400)]
updated the test files and added another gpg key

so everyone is capable of running the tests

8 years agofurther generalization of the testing features
Andrew Engelbrecht [Mon, 20 Jul 2015 21:44:24 +0000 (17:44 -0400)]
further generalization of the testing features

8 years agofurther generalization of the testing script
Andrew Engelbrecht [Mon, 20 Jul 2015 20:47:07 +0000 (16:47 -0400)]
further generalization of the testing script

8 years agoautomatically find the tests directory
Andrew Engelbrecht [Mon, 20 Jul 2015 20:02:30 +0000 (16:02 -0400)]
automatically find the tests directory

... relative to the directory containing run-tests

8 years agopartially generalized the testing suite
Andrew Engelbrecht [Mon, 20 Jul 2015 19:43:27 +0000 (15:43 -0400)]
partially generalized the testing suite

8 years agoupdate test suite to compare mime-decoded messages
Andrew Engelbrecht [Mon, 20 Jul 2015 19:27:18 +0000 (15:27 -0400)]
update test suite to compare mime-decoded messages

8 years agoignore the __pycache__ directory
Andrew Engelbrecht [Mon, 20 Jul 2015 19:20:55 +0000 (15:20 -0400)]
ignore the __pycache__ directory

8 years agothere is no reason to track random_seed
Andrew Engelbrecht [Mon, 20 Jul 2015 19:19:19 +0000 (15:19 -0400)]
there is no reason to track random_seed

it is regularly updated by gnupg and we don't need to commit changes to
that file.

8 years agoignore changes to the gnupg random seed file
Andrew Engelbrecht [Mon, 20 Jul 2015 19:15:05 +0000 (15:15 -0400)]
ignore changes to the gnupg random seed file

8 years ago./run-tests is part of the testing suite.
Andrew Engelbrecht [Mon, 20 Jul 2015 19:12:45 +0000 (15:12 -0400)]
./run-tests is part of the testing suite.

8 years agoadded the beginning of a testing suite to edward
Andrew Engelbrecht [Mon, 20 Jul 2015 19:10:25 +0000 (15:10 -0400)]
added the beginning of a testing suite to edward

automated testing is helpful.

8 years agoadded .gitignore
Andrew Engelbrecht [Mon, 20 Jul 2015 17:44:07 +0000 (13:44 -0400)]
added .gitignore

8 years agofix copyright header
Andrew Engelbrecht [Mon, 20 Jul 2015 15:59:22 +0000 (11:59 -0400)]
fix copyright header

i am not the primary author of the config file.

8 years agocheck for keys in plaintext in decrypted blocks
Andrew Engelbrecht [Mon, 20 Jul 2015 15:25:01 +0000 (11:25 -0400)]
check for keys in plaintext in decrypted blocks

if the message is hand-rolled with gpg, there might be a key in there.
but don't bother with recursive decryption unless they are using mime.

8 years agosimplified unattractive code
Andrew Engelbrecht [Mon, 20 Jul 2015 00:03:34 +0000 (20:03 -0400)]
simplified unattractive code

8 years agoupgraded the debug function
Andrew Engelbrecht [Mon, 20 Jul 2015 00:02:27 +0000 (20:02 -0400)]
upgraded the debug function

8 years agosearch text/plain for keys and encoded messages
Andrew Engelbrecht [Sun, 19 Jul 2015 23:49:10 +0000 (19:49 -0400)]
search text/plain for keys and encoded messages

also don't scan the outer-most layer for keys because that gives
corrupted files. they are still accessible under the content type of
text/plain, even if the email's not a mime-formatted message.

8 years agodon't crash when given an invalid public key block
Andrew Engelbrecht [Sun, 19 Jul 2015 23:44:08 +0000 (19:44 -0400)]
don't crash when given an invalid public key block

8 years agofixed crash when receiving tampered encrypted msgs
Andrew Engelbrecht [Sun, 19 Jul 2015 23:18:26 +0000 (19:18 -0400)]
fixed crash when receiving tampered encrypted msgs

edward now shouldn't crash when receiving a corrupted gpg encryption
block.

8 years agovariable name changes, small function removal
Andrew Engelbrecht [Sun, 19 Jul 2015 22:58:56 +0000 (18:58 -0400)]
variable name changes, small function removal

8 years agofixed key format bug
Andrew Engelbrecht [Sun, 19 Jul 2015 22:32:24 +0000 (18:32 -0400)]
fixed key format bug

8 years agoadd imported keys to list of keys for encryption
Andrew Engelbrecht [Sun, 19 Jul 2015 21:44:26 +0000 (17:44 -0400)]
add imported keys to list of keys for encryption

only one will be used.

8 years agoadded key importing feature
Andrew Engelbrecht [Sun, 19 Jul 2015 21:34:38 +0000 (17:34 -0400)]
added key importing feature

8 years agoadded a debug function
Andrew Engelbrecht [Sun, 19 Jul 2015 21:34:01 +0000 (17:34 -0400)]
added a debug function

8 years agoheader fix
Andrew Engelbrecht [Sun, 19 Jul 2015 20:13:56 +0000 (16:13 -0400)]
header fix

8 years agouse a settings file to manage configurations
Andrew Engelbrecht [Sun, 19 Jul 2015 20:13:19 +0000 (16:13 -0400)]
use a settings file to manage configurations

8 years agoheader improvement
Andrew Engelbrecht [Sun, 19 Jul 2015 19:56:37 +0000 (15:56 -0400)]
header improvement

8 years agorenamed edward-bot to edward
Andrew Engelbrecht [Sun, 19 Jul 2015 19:56:06 +0000 (15:56 -0400)]
renamed edward-bot to edward

8 years agoadded PGP/MIME reply email generation
Andrew Engelbrecht [Sun, 19 Jul 2015 19:37:55 +0000 (15:37 -0400)]
added PGP/MIME reply email generation

now international characters should show up in email clients properly
encoded.

8 years agostylistic changes
Andrew Engelbrecht [Sun, 19 Jul 2015 19:31:33 +0000 (15:31 -0400)]
stylistic changes

8 years agofixed potential string decoding bug
Andrew Engelbrecht [Sun, 19 Jul 2015 04:46:45 +0000 (00:46 -0400)]
fixed potential string decoding bug

8 years agoremoved unused import
Andrew Engelbrecht [Sun, 19 Jul 2015 04:44:24 +0000 (00:44 -0400)]
removed unused import

8 years agostyle fix
Andrew Engelbrecht [Sat, 18 Jul 2015 22:59:44 +0000 (18:59 -0400)]
style fix

removed unecessary space

8 years agofixed bug occurring in messages without a sig
Andrew Engelbrecht [Sat, 18 Jul 2015 22:56:59 +0000 (18:56 -0400)]
fixed bug occurring in messages without a sig

edward will ask for a key.

8 years agosimplified function by using map()
Andrew Engelbrecht [Sat, 18 Jul 2015 22:44:56 +0000 (18:44 -0400)]
simplified function by using map()

8 years agoadded reply signing capability
Andrew Engelbrecht [Sat, 18 Jul 2015 22:31:21 +0000 (18:31 -0400)]
added reply signing capability

currently hard-coded to my own key. will eventually be an option.

8 years agofixed a potential bug
Andrew Engelbrecht [Sat, 18 Jul 2015 22:18:49 +0000 (18:18 -0400)]
fixed a potential bug

this should be set as a flag.

8 years agoadded return message quoting
Andrew Engelbrecht [Sat, 18 Jul 2015 22:18:34 +0000 (18:18 -0400)]
added return message quoting

8 years agoadded simple message reply generation
Andrew Engelbrecht [Sat, 18 Jul 2015 21:51:20 +0000 (17:51 -0400)]
added simple message reply generation

the reply is encrypted to the first encryption-capable key used to sign
the message.

8 years agocreated a function for choosing the encryption key
Andrew Engelbrecht [Sat, 18 Jul 2015 21:28:08 +0000 (17:28 -0400)]
created a function for choosing the encryption key

this is somewhat more intelligent and can be improved upon later.

8 years agoremoved a function, changed a func name
Andrew Engelbrecht [Sat, 18 Jul 2015 21:23:56 +0000 (17:23 -0400)]
removed a function, changed a func name

the removed function will eventually be replaced by a reply generation
function.

8 years agomore name changes; other minor changes
Andrew Engelbrecht [Sat, 18 Jul 2015 20:35:46 +0000 (16:35 -0400)]
more name changes; other minor changes

this makes the code a bit clearer.

8 years agoVariable name changes. Removed gpg sig. analyzer
Andrew Engelbrecht [Sat, 18 Jul 2015 20:17:17 +0000 (16:17 -0400)]
Variable name changes. Removed gpg sig. analyzer

Many variable names were changed to make the code easier to understand.

Signature analysis was removed and replaced with collection of keys used
in gpg signing. This will be useful for choosing the public key to use
when encrypting the reply message.

These two commits should have been separate but the edits got mixed
together.

8 years agointermediary variable isn't needed
Andrew Engelbrecht [Sun, 27 Jul 2014 07:12:11 +0000 (03:12 -0400)]
intermediary variable isn't needed

it's sufficiently clear this way, and uses less code.

8 years agorefactored a bit
Andrew Engelbrecht [Sun, 27 Jul 2014 07:08:56 +0000 (03:08 -0400)]
refactored a bit

this reduces the size of msg_walk()

8 years agohostesty about sig validity certainty
Andrew Engelbrecht [Sun, 27 Jul 2014 06:52:43 +0000 (02:52 -0400)]
hostesty about sig validity certainty

i ought to be honest about how carefully sigs are checked, which is not
very carefully done so far.

8 years agoaccumulate message before printing
Andrew Engelbrecht [Sun, 27 Jul 2014 06:47:22 +0000 (02:47 -0400)]
accumulate message before printing

...so i can transform and do other things with the text. this will allow
me to compose another message quoting this one without a unix pipe.

8 years agoimproved warnings; check cli argument count
Andrew Engelbrecht [Sun, 27 Jul 2014 06:17:24 +0000 (02:17 -0400)]
improved warnings; check cli argument count

warnings now include the program name and print to stderr.

there must be no arguments aside from the program name.

8 years agoorganizational and whitespace changes
Andrew Engelbrecht [Sun, 27 Jul 2014 05:57:36 +0000 (01:57 -0400)]
organizational and whitespace changes

easier to read

8 years agoindentation changes
Andrew Engelbrecht [Sun, 27 Jul 2014 05:49:25 +0000 (01:49 -0400)]
indentation changes

one function was hyper-indented. another didn't need nested indentation.

8 years agore-organized a couple lines of code
Andrew Engelbrecht [Sun, 27 Jul 2014 05:44:25 +0000 (01:44 -0400)]
re-organized a couple lines of code

this order of execution is more logical

8 years agoupdated signature verification code
Andrew Engelbrecht [Sun, 27 Jul 2014 05:37:05 +0000 (01:37 -0400)]
updated signature verification code

edward-bot now prints a helpful note about signature validity.

i've also added some caveats in comment form regarding the remaining
issues with the verification code i've written so far. there are more
important considerations that need to be made when verifying signatures.

8 years agomake the sig output prettier.
Andrew Engelbrecht [Sun, 27 Jul 2014 04:54:41 +0000 (00:54 -0400)]
make the sig output prettier.

this looks more like the gnupg output.

8 years agoadd proper time formatting
Andrew Engelbrecht [Sun, 27 Jul 2014 04:44:30 +0000 (00:44 -0400)]
add proper time formatting

sig time stamps are now printed using the strftime() function. it prints
a time format like gpg.

8 years agoinitial commit for edward-bot
Andrew Engelbrecht [Sun, 27 Jul 2014 04:23:30 +0000 (00:23 -0400)]
initial commit for edward-bot

i've written some code for an "edward bot". it will eventually receive
and reply to gpg-encrypted emails.

some segments of code are based on work by Josh Drake and Lisa Maginnis.

this commit contains a large amount of code for a first commit. while it
was my intention to start using vcs once i had useful code, it's now
well past that time.