]> granicus.if.org Git - neomutt/log
neomutt
5 years agoMake sure Progress doesn't reference an out-of-scope buffer 1820/head
Pietro Cerutti [Thu, 29 Aug 2019 09:46:29 +0000 (09:46 +0000)]
Make sure Progress doesn't reference an out-of-scope buffer

Cleanup mutt_progress_init's callers

Fixes: #1819
5 years agoAdd: mailbox_path() to tidy Mailbox usage
Pietro Cerutti [Tue, 27 Aug 2019 08:48:54 +0000 (08:48 +0000)]
Add: mailbox_path() to tidy Mailbox usage

5 years agoRemember last visited folder when browsing 1816/head
Pietro Cerutti [Mon, 26 Aug 2019 11:13:42 +0000 (11:13 +0000)]
Remember last visited folder when browsing

Fixes #1781

5 years agoclear up different redraw flags
Richard Russon [Mon, 26 Aug 2019 16:58:26 +0000 (17:58 +0100)]
clear up different redraw flags

The Menu and field-entering code had very similarly-named redraw flags.

5 years agocompose: factor out global Window
Richard Russon [Mon, 26 Aug 2019 13:59:34 +0000 (14:59 +0100)]
compose: factor out global Window

5 years agosidebar: fix crash with no mailbox
Richard Russon [Mon, 26 Aug 2019 12:08:58 +0000 (13:08 +0100)]
sidebar: fix crash with no mailbox

5 years agomenu: use enum for menu type
Richard Russon [Sun, 25 Aug 2019 22:42:37 +0000 (23:42 +0100)]
menu: use enum for menu type

- Use `enum MenuType` rather than `int`
- Rename `Menu.menu` to `Menu.type`
- Light tidying

5 years agowindow: externalise global Windows
Richard Russon [Thu, 22 Aug 2019 16:25:45 +0000 (17:25 +0100)]
window: externalise global Windows

Many functions use a global `MuttWindow` pointer.
Change them to use a parameter version instead.

Currently, this is the same Window.
When the nested Windows arrive, it won't be.

5 years agowindow: add copy_size()
Richard Russon [Sat, 24 Aug 2019 16:06:27 +0000 (17:06 +0100)]
window: add copy_size()

Create a dedicated copy function for `MuttWindow`, rather than using
`memcpy()`.

This is in preparation for when `MuttWindow` becomes more complex.

5 years agofix: alias expansion in compose 1814/head
Richard Russon [Thu, 22 Aug 2019 22:21:28 +0000 (23:21 +0100)]
fix: alias expansion in compose

This fixes two bugs when expanding aliases, of the form "alias1, alias1"
in compose.

- only the first alias was expanded
- alias address was leaked

Refactor for clarity:

- Rename local variable
- Reduce scope of variable
- Add comments

5 years agofix: memory leak in mx_mbox_close()
Richard Russon [Thu, 22 Aug 2019 21:41:39 +0000 (22:41 +0100)]
fix: memory leak in mx_mbox_close()

Freeing a Context isn't enough; use ctx_free().

5 years agofix: memory leak in mutt_smtp_send()
Richard Russon [Thu, 22 Aug 2019 21:39:51 +0000 (22:39 +0100)]
fix: memory leak in mutt_smtp_send()

Free the Connection after sending the Email.

5 years agofix: memory leak in parse_menu()
Richard Russon [Thu, 22 Aug 2019 15:53:00 +0000 (16:53 +0100)]
fix: memory leak in parse_menu()

5 years agopager: change summaries to use mutt_do_pager()
Richard Russon [Thu, 22 Aug 2019 10:52:13 +0000 (11:52 +0100)]
pager: change summaries to use mutt_do_pager()

By using mutt_do_pager(), the summary pages now honour "$pager".

5 years agoLet my_hdr override MIME headers
Pietro Cerutti [Thu, 22 Aug 2019 16:25:56 +0000 (16:25 +0000)]
Let my_hdr override MIME headers

5 years agoFix segfault in bounce
Pietro Cerutti [Thu, 22 Aug 2019 15:36:45 +0000 (15:36 +0000)]
Fix segfault in bounce

Fixes #1735

5 years agocheck for empty Context
Richard Russon [Thu, 22 Aug 2019 10:22:21 +0000 (11:22 +0100)]
check for empty Context

We'd already checked for an empty Context at the beginning of the `case`
statement, but we didn't check after any functions that might have
closed the Context.

Fixes: #1799
5 years agoAdd envelope's Organization field to hcache
Stéphane Lesimple [Thu, 22 Aug 2019 07:08:47 +0000 (09:08 +0200)]
Add envelope's Organization field to hcache

This ensures using %W in index_format while having
header cache enabled works as expected.

Note that as we don't modify the header files that
hcachever.sh is looking for, but the serial_dump_envelope
and serial_restore_envelope functions instead, we have
to increment BASEVERSION to ensure that cache built with
previous versions gets invalidated in all cases.

Fixes #1808

5 years agodoxy: fix typo
Richard Russon [Wed, 21 Aug 2019 16:48:33 +0000 (17:48 +0100)]
doxy: fix typo

5 years agomerge: trivial fixes
Richard Russon [Wed, 21 Aug 2019 13:12:09 +0000 (14:12 +0100)]
merge: trivial fixes

 * rename MENU_POST to MENU_POSTPONE
 * imap: rename the command response constants
 * add more Context checks
 * add Context checks to status_format_str()
 * define flags for mutt_pattern_comp()
 * remove unnecessary goto/label
 * reorder params in driver_tags_get_transformed_for()
 * move data/structs to beginning
 * boolify some variables
 * rename mutt_menu_destroy()
 * rename ParameterList variables
 * fix parameter usage of calloc()
 * hcache: unify naming in free()
 * tidy pre-processor defs
 * refactor pre-processor
 * docs: rename mutt to neomutt
 * Update autocrypt keyring documentation
 * Clean up the autocrypt doc a bit more
 * tidy some comments/whitespace

5 years agotidy some comments/whitespace
Richard Russon [Tue, 20 Aug 2019 17:28:03 +0000 (18:28 +0100)]
tidy some comments/whitespace

5 years agoClean up the autocrypt doc a bit more
Kevin McCarthy [Tue, 20 Aug 2019 22:37:06 +0000 (15:37 -0700)]
Clean up the autocrypt doc a bit more

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoUpdate autocrypt keyring documentation
Kevin McCarthy [Tue, 20 Aug 2019 22:17:31 +0000 (15:17 -0700)]
Update autocrypt keyring documentation

Recommend setting $autocrypt_dir to your normal keyring directory if
you want to use your existing key.

Trying to copy it over leads to signature verification issues.  Even
if I reversed the order (which is much less clean), that would just
lead to missing key signature errors for Autocrypt messages instead.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agodocs: rename mutt to neomutt
Richard Russon [Tue, 20 Aug 2019 18:54:29 +0000 (19:54 +0100)]
docs: rename mutt to neomutt

5 years agorefactor pre-processor
Richard Russon [Tue, 20 Aug 2019 19:11:54 +0000 (20:11 +0100)]
refactor pre-processor

5 years agotidy pre-processor defs
Richard Russon [Tue, 20 Aug 2019 18:31:24 +0000 (19:31 +0100)]
tidy pre-processor defs

5 years agohcache: unify naming in free()
Richard Russon [Wed, 21 Aug 2019 11:20:50 +0000 (12:20 +0100)]
hcache: unify naming in free()

Ensure all the hcache backends clean up in the same way.

5 years agofix parameter usage of calloc()
Richard Russon [Tue, 20 Aug 2019 20:55:58 +0000 (21:55 +0100)]
fix parameter usage of calloc()

5 years agorename ParameterList variables
Richard Russon [Tue, 20 Aug 2019 20:45:41 +0000 (21:45 +0100)]
rename ParameterList variables

For consistency, call ParameterLists `pl`.

5 years agorename mutt_menu_destroy()
Richard Russon [Tue, 20 Aug 2019 19:29:26 +0000 (20:29 +0100)]
rename mutt_menu_destroy()

All the other free functions are called *_free().

5 years agoboolify some variables
Richard Russon [Tue, 20 Aug 2019 18:57:31 +0000 (19:57 +0100)]
boolify some variables

5 years agomove data/structs to beginning
Richard Russon [Tue, 20 Aug 2019 18:31:36 +0000 (19:31 +0100)]
move data/structs to beginning

5 years agoreorder params in driver_tags_get_transformed_for()
Richard Russon [Tue, 20 Aug 2019 17:30:55 +0000 (18:30 +0100)]
reorder params in driver_tags_get_transformed_for()

Change the parameter order to match all the other tags functions.

5 years agoremove unnecessary goto/label
Richard Russon [Tue, 20 Aug 2019 17:29:15 +0000 (18:29 +0100)]
remove unnecessary goto/label

5 years agodefine flags for mutt_pattern_comp()
Richard Russon [Wed, 21 Aug 2019 11:31:43 +0000 (12:31 +0100)]
define flags for mutt_pattern_comp()

5 years agoadd Context checks to status_format_str()
Richard Russon [Wed, 19 Jun 2019 20:53:23 +0000 (21:53 +0100)]
add Context checks to status_format_str()

5 years agoadd more Context checks
Richard Russon [Wed, 19 Jun 2019 14:08:37 +0000 (15:08 +0100)]
add more Context checks

Check for the condition where the Context exists, but `Context->mailbox`
is NULL.

Fixes: #1747
5 years agoimap: rename the command response constants
Richard Russon [Tue, 20 Aug 2019 21:38:34 +0000 (22:38 +0100)]
imap: rename the command response constants

Rename command responses to `IMAP_RES_*` to avoid clashing with the
command flags `IMAP_CMD_*`.

5 years agorename MENU_POST to MENU_POSTPONE
Richard Russon [Tue, 20 Aug 2019 17:26:59 +0000 (18:26 +0100)]
rename MENU_POST to MENU_POSTPONE

'POST' implies sending an email, but the menu deals with postponed
emails.

5 years agoFix segfault in PGP key selection
Pietro Cerutti [Wed, 21 Aug 2019 09:17:36 +0000 (09:17 +0000)]
Fix segfault in PGP key selection

Fixes #1809

5 years agocoverity: fix defects
Richard Russon [Tue, 20 Aug 2019 11:48:34 +0000 (12:48 +0100)]
coverity: fix defects

5 years agoClarify hcache invalidation mechanism
Pietro Cerutti [Tue, 20 Aug 2019 11:24:16 +0000 (11:24 +0000)]
Clarify hcache invalidation mechanism

5 years agodoxy: add autocrypt pages
Richard Russon [Tue, 20 Aug 2019 10:42:51 +0000 (11:42 +0100)]
doxy: add autocrypt pages

5 years agomerge: update translations
Richard Russon [Tue, 20 Aug 2019 10:24:06 +0000 (11:24 +0100)]
merge: update translations

 * Update lt_LT translatons
 * Update pt_BR translation
 * Update pt_BR translation
 * Polish translate update
 * sync translations

5 years agosync translations
Richard Russon [Tue, 20 Aug 2019 10:19:23 +0000 (11:19 +0100)]
sync translations

5 years agoPolish translate update
Marcin Rajner [Sat, 10 Aug 2019 20:03:37 +0000 (22:03 +0200)]
Polish translate update

5 years agoUpdate pt_BR translation
Thiago Costa de Paiva [Sun, 4 Aug 2019 14:28:48 +0000 (10:28 -0400)]
Update pt_BR translation

5 years agoUpdate pt_BR translation
Thiago Costa de Paiva [Sun, 4 Aug 2019 14:26:28 +0000 (10:26 -0400)]
Update pt_BR translation

5 years agoUpdate lt_LT translatons
Marius Gedminas [Tue, 23 Jul 2019 13:25:44 +0000 (16:25 +0300)]
Update lt_LT translatons

Fix the fuzzies.

5 years agomerge: upstream autocrypt feature
Richard Russon [Mon, 19 Aug 2019 23:15:00 +0000 (00:15 +0100)]
merge: upstream autocrypt feature

 * address: add mutt_addr_to_intl()
 * build: add autocrypt option
 * Initial autoconf and makefile setup for autocrypt
 * Add autocrypt config vars
 * Add database and schema initialization
 * Start autocrypt gpgme
 * Factor out mutt_edit_address() in send.c
 * Add initial autocrypt account setup
 * Add autocrypt header parsing to mutt_parse_rfc822_line()
 * Process autocrypt headers
 * Convert to use sqlite3_prepare_v3()
 * Add gossip header processing
 * Change autocrypt_db normalization to return struct Address
 * Change gossip header address comparison to use normalized addresses
 * Add another struct Email security bit for autocrypt
 * Add autocrypt line to the compose menu
 * Autocrypt outgoing emails
 * Fix process_gossip_headers() to look at the right envelope
 * Slightly improve the gossip header key update
 * Handle autocrypt message decryption
 * Print an error message if an autocrypt key can't be found
 * Add autocrypt source files to POTFILES.in
 * Add L10N translation message comments
 * Add AUTOCRYPT header to imap fetch list
 * Add prefer-encrypt prompt during account creation
 * Add account->enabled checks
 * Improve gen-map-doc work on multi-word maps
 * Convert peer_update to just pass the peer object
 * Basic autocrypt account menu
 * Add more translation string comments for autocrypt
 * Add option to scan mailboxes during first run
 * Add documentation for the autocrypt feature
 * Add autocrypt README file
 * Don't try to decrypt autocrypt messages if the option is off
 * fix test cases
 * iwyu: tidy #includes
 * rename local variable rv to rc
 * doxy: add comment blocks
 * rename local variable hdr to e
 * rename local variable msg to e
 * add braces to unclear 'if' statements
 * explicitly check retval for strcmp, buffer_len
 * add whitespace for clarity
 * tidy code
 * Add ability to create autocrypt account from an existing key
 * Automatically clear screen when popping the last menu
 * Add $autocrypt_reply
 * Allow nested setting of OptIgnoreMacroEvents
 * Turn off macro processing during autocrypt initialization
 * Enabled writing protected subject with autocrypt too
 * Minor autocrypt manual section updates
 * Add autocrypt documentation about shared key and keyring strategies
 * Add a note about autocrypt first-run and macros
 * Add L10N comment about autocrypt menu help line abbreviations
 * Mention base64 keydata being stored in the autocrypt database

5 years agoMention base64 keydata being stored in the autocrypt database
Kevin McCarthy [Tue, 13 Aug 2019 21:20:33 +0000 (14:20 -0700)]
Mention base64 keydata being stored in the autocrypt database

5 years agoAdd L10N comment about autocrypt menu help line abbreviations
Kevin McCarthy [Fri, 9 Aug 2019 21:15:18 +0000 (14:15 -0700)]
Add L10N comment about autocrypt menu help line abbreviations

5 years agoAdd a note about autocrypt first-run and macros
Kevin McCarthy [Fri, 9 Aug 2019 20:58:55 +0000 (13:58 -0700)]
Add a note about autocrypt first-run and macros

5 years agoAdd autocrypt documentation about shared key and keyring strategies
Kevin McCarthy [Fri, 9 Aug 2019 20:37:08 +0000 (13:37 -0700)]
Add autocrypt documentation about shared key and keyring strategies

5 years agoMinor autocrypt manual section updates
Kevin McCarthy [Fri, 9 Aug 2019 03:49:32 +0000 (20:49 -0700)]
Minor autocrypt manual section updates

Mention key selection during account creation and $autocrypt_reply for
controlling autocrypt mode setting during replies.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoEnabled writing protected subject with autocrypt too
Kevin McCarthy [Thu, 8 Aug 2019 16:18:53 +0000 (09:18 -0700)]
Enabled writing protected subject with autocrypt too

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoTurn off macro processing during autocrypt initialization
Kevin McCarthy [Thu, 8 Aug 2019 01:34:58 +0000 (18:34 -0700)]
Turn off macro processing during autocrypt initialization

The muttrc can push events into the macro buffer, with the assumption
that mailbox will be opened next.  This will interfere with the
prompts uses during first run.  The only issue is that macros won't
work inside the folder browser, if invoked.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAllow nested setting of OptIgnoreMacroEvents
Kevin McCarthy [Thu, 8 Aug 2019 01:24:15 +0000 (18:24 -0700)]
Allow nested setting of OptIgnoreMacroEvents

This will be needed for the first-run of autocrypt initialization.
The initialization involves a number of prompts, and can even use the
folder browser.  The browser could in turn connect to IMAP which might
invoke a certificate prompt, login prompt, etc.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd $autocrypt_reply
Kevin McCarthy [Wed, 7 Aug 2019 21:31:53 +0000 (14:31 -0700)]
Add $autocrypt_reply

This allows turning off the force-autocrypt mode when replying to an
autocrypt email.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAutomatically clear screen when popping the last menu
Kevin McCarthy [Wed, 7 Aug 2019 21:17:28 +0000 (14:17 -0700)]
Automatically clear screen when popping the last menu

This removes the need to manually clear the screen during pre-menu
operations, such as autocrypt first run initialization.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd ability to create autocrypt account from an existing key
Kevin McCarthy [Wed, 7 Aug 2019 21:12:43 +0000 (14:12 -0700)]
Add ability to create autocrypt account from an existing key

This is useful when adding accounts, or for users who want to use an
existing key from the keyring during initial account creation.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agotidy code
Richard Russon [Wed, 7 Aug 2019 21:20:12 +0000 (22:20 +0100)]
tidy code

- boolify variables, members
- reduce variable scope
- initialise pointers
- bracket logic
- name parameters in prototypes

5 years agoadd whitespace for clarity
Richard Russon [Wed, 7 Aug 2019 21:14:09 +0000 (22:14 +0100)]
add whitespace for clarity

5 years agoexplicitly check retval for strcmp, buffer_len
Richard Russon [Wed, 7 Aug 2019 21:02:04 +0000 (22:02 +0100)]
explicitly check retval for strcmp, buffer_len

5 years agoadd braces to unclear 'if' statements
Richard Russon [Wed, 7 Aug 2019 20:57:06 +0000 (21:57 +0100)]
add braces to unclear 'if' statements

5 years agorename local variable msg to e
Richard Russon [Wed, 7 Aug 2019 20:53:54 +0000 (21:53 +0100)]
rename local variable msg to e

5 years agorename local variable hdr to e
Richard Russon [Wed, 7 Aug 2019 20:52:17 +0000 (21:52 +0100)]
rename local variable hdr to e

5 years agodoxy: add comment blocks
Richard Russon [Wed, 7 Aug 2019 20:35:32 +0000 (21:35 +0100)]
doxy: add comment blocks

5 years agorename local variable rv to rc
Richard Russon [Wed, 7 Aug 2019 20:27:52 +0000 (21:27 +0100)]
rename local variable rv to rc

5 years agoiwyu: tidy #includes
Richard Russon [Wed, 7 Aug 2019 20:23:24 +0000 (21:23 +0100)]
iwyu: tidy #includes

5 years agofix test cases
Richard Russon [Tue, 6 Aug 2019 23:26:22 +0000 (00:26 +0100)]
fix test cases

5 years agoDon't try to decrypt autocrypt messages if the option is off
Kevin McCarthy [Sun, 4 Aug 2019 14:55:26 +0000 (07:55 -0700)]
Don't try to decrypt autocrypt messages if the option is off

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd autocrypt README file
Kevin McCarthy [Sat, 3 Aug 2019 20:53:40 +0000 (13:53 -0700)]
Add autocrypt README file

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd documentation for the autocrypt feature
Kevin McCarthy [Fri, 2 Aug 2019 16:03:41 +0000 (09:03 -0700)]
Add documentation for the autocrypt feature

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd option to scan mailboxes during first run
Kevin McCarthy [Thu, 1 Aug 2019 01:56:29 +0000 (18:56 -0700)]
Add option to scan mailboxes during first run

The scanner will disable the header cache, allowing scanning all
messages in the mailbox.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd more translation string comments for autocrypt
Kevin McCarthy [Wed, 31 Jul 2019 22:42:09 +0000 (15:42 -0700)]
Add more translation string comments for autocrypt

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoBasic autocrypt account menu
Kevin McCarthy [Mon, 29 Jul 2019 02:24:11 +0000 (19:24 -0700)]
Basic autocrypt account menu

Provide ability to create, delete, and toggle the prefer-encrypt and
enabled flag for an account.

Hook into the index via 'A' <autocrypt-acct-menu>.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert peer_update to just pass the peer object
Kevin McCarthy [Wed, 31 Jul 2019 02:14:56 +0000 (19:14 -0700)]
Convert peer_update to just pass the peer object

Unlike get and insert, there is no need for an addres parameter that
needs to be normalized, since the address is already in the peer
object.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoImprove gen-map-doc work on multi-word maps
Kevin McCarthy [Mon, 29 Jul 2019 02:23:12 +0000 (19:23 -0700)]
Improve gen-map-doc work on multi-word maps

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd account->enabled checks
Kevin McCarthy [Sat, 27 Jul 2019 22:34:51 +0000 (15:34 -0700)]
Add account->enabled checks

Add to ui recommendation, keylist generator, and autocrypt header
writing routines.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd prefer-encrypt prompt during account creation
Kevin McCarthy [Sat, 27 Jul 2019 22:11:38 +0000 (15:11 -0700)]
Add prefer-encrypt prompt during account creation

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd AUTOCRYPT header to imap fetch list
Kevin McCarthy [Sat, 27 Jul 2019 20:44:36 +0000 (13:44 -0700)]
Add AUTOCRYPT header to imap fetch list

If $autocrypt is set, add the header to make IMAP behave the same as
other formats (parsing on initial mailbox opening).

This will also be useful if we perform an initial scan during account
creation, to make that work for IMAP too.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd L10N translation message comments
Kevin McCarthy [Fri, 26 Jul 2019 23:27:04 +0000 (16:27 -0700)]
Add L10N translation message comments

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd autocrypt source files to POTFILES.in
Kevin McCarthy [Fri, 26 Jul 2019 23:00:22 +0000 (16:00 -0700)]
Add autocrypt source files to POTFILES.in

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoPrint an error message if an autocrypt key can't be found
Kevin McCarthy [Fri, 26 Jul 2019 22:59:47 +0000 (15:59 -0700)]
Print an error message if an autocrypt key can't be found

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoHandle autocrypt message decryption
Kevin McCarthy [Fri, 26 Jul 2019 20:55:46 +0000 (13:55 -0700)]
Handle autocrypt message decryption

Try autocrypt first for crypt_pgp_decrypt_mime() and
pgp_gpgme_encrypted_handler().

Propagate the autocrypt bit if successful.  This is used when replying
to an autocrypt message, to force a reply using autocrypt.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoSlightly improve the gossip header key update
Kevin McCarthy [Fri, 26 Jul 2019 02:12:32 +0000 (19:12 -0700)]
Slightly improve the gossip header key update

Don't set an empty peer.gossip_keydata with a value that matches the
current peer.keydata.  This just wastes space.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFix process_gossip_headers() to look at the right envelope
Kevin McCarthy [Thu, 25 Jul 2019 01:59:07 +0000 (18:59 -0700)]
Fix process_gossip_headers() to look at the right envelope

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAutocrypt outgoing emails
Kevin McCarthy [Sun, 21 Jul 2019 22:15:06 +0000 (15:15 -0700)]
Autocrypt outgoing emails

Change crypt_get_keys() to query autocrypt.

When oppenc_mode is set, we still query the original keyring
regardless, because the compose menu can still run oppenc even if
autocrypt is on.

Since mutt_autocrypt_ui_recommendation() checks each key as part of
making the recommendation, add a keylist parameter and use that
function.

Add gpgme changes to use the autocrypt context for encryption.

Postpone work:
* Change mutt_protect() to have a postpone parameter.  Remove the
  manual toggling of the SEC_SIGN bit outside the call when postponing.

* Since autocrypt doesn't set the SEC_SIGN bit, this allows us to turn off
  signing inside mutt_protect() for both normal and autocrypt mode.

* Set the autocrypt postpone key in AutocryptDefaultKey.

Write autocrypt and gossip headers in outgoing emails.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd autocrypt line to the compose menu
Kevin McCarthy [Fri, 19 Jul 2019 19:54:32 +0000 (12:54 -0700)]
Add autocrypt line to the compose menu

Remove the hardcoded HDR_ATTACH offset calcuation, and add an explicit
enum for the "-- Attachments" line to make loops and padding array
sizes easier.

Add security and recommendataion fields on the line.

Add mutt_autocrypt_ui_recommendation, following the autocrypt spec
guidelines.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd another struct Email security bit for autocrypt
Kevin McCarthy [Sat, 20 Jul 2019 21:48:06 +0000 (14:48 -0700)]
Add another struct Email security bit for autocrypt

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoChange gossip header address comparison to use normalized addresses
Kevin McCarthy [Thu, 18 Jul 2019 20:22:52 +0000 (13:22 -0700)]
Change gossip header address comparison to use normalized addresses

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoChange autocrypt_db normalization to return struct Address
Kevin McCarthy [Thu, 18 Jul 2019 20:19:47 +0000 (13:19 -0700)]
Change autocrypt_db normalization to return struct Address

This makes reusing the code in autocrypt.c easier.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd gossip header processing
Kevin McCarthy [Tue, 16 Jul 2019 01:36:57 +0000 (18:36 -0700)]
Add gossip header processing

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert to use sqlite3_prepare_v3()
Kevin McCarthy [Mon, 15 Jul 2019 01:59:28 +0000 (18:59 -0700)]
Convert to use sqlite3_prepare_v3()

The documentation suggests the SQLITE_PREPARE_PERSISTENT flag is
helpful for long-lived prepared statements, and Mutt is using.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoProcess autocrypt headers
Kevin McCarthy [Fri, 12 Jul 2019 01:45:45 +0000 (18:45 -0700)]
Process autocrypt headers

Create/update peer database accounts and gpg keys based on the headers.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd autocrypt header parsing to mutt_parse_rfc822_line()
Kevin McCarthy [Fri, 12 Jul 2019 01:06:56 +0000 (18:06 -0700)]
Add autocrypt header parsing to mutt_parse_rfc822_line()

Convert parse_parameters() for autocrypt header usage:

  * change to use a struct Buffer to accomodate large autocrypt keydata
    attribute values.

  * Autocrypt header parameters are not rfc2231 compliant.  Rather
    than rolling another very similar function, just change the
    existing one to allow space separation.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd initial autocrypt account setup
Kevin McCarthy [Tue, 9 Jul 2019 03:58:32 +0000 (20:58 -0700)]
Add initial autocrypt account setup

Generate gpg key and add account record to the database.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFactor out mutt_edit_address() in send.c
Kevin McCarthy [Mon, 8 Jul 2019 22:23:44 +0000 (15:23 -0700)]
Factor out mutt_edit_address() in send.c

For reuse by autocrypt for address prompts.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoStart autocrypt gpgme
Kevin McCarthy [Sun, 7 Jul 2019 21:37:52 +0000 (14:37 -0700)]
Start autocrypt gpgme

Add a basic init function.

Bump up the required gpgme version to 1.8.0 if autocrypt is enabled.

Co-authored-by: Richard Russon <rich@flatcap.org>