summaryrefslogtreecommitdiffstats
path: root/autocrypt
AgeCommit message (Collapse)Author
2020-11-24Fix exact-address handling when addr->personal is set.Kevin McCarthy
The exact-address compile-time option takes an exact copy of an address when it is parsed, and prints that out when outputting the address. The idea is to preserve older "user@host (Name)" syntax. Unfortunately, when code tries to "update" the personal/name field, it needs to clear the exact-address copy for it to have any effect. An object-oriented design encapsulating the setting would help prevent this problem. It might be desirable to create a C function instead, but callers would have to remember it, and such a thing isn't common in the Mutt codebase. Another patch (I'm still debating applying) changes the address parser to discard the exact-address copy when it exactly matches the mailbox. However, that still won't fix every case (and it makes the parser even more difficult to follow.) So this commit (to stable) takes the straightforward approach. It fixes bugs in: * Alias creation. The "personal name" prompt was ignored. * Autocrypt initialization from address setting with $realname. * $pgp_getkeys_command handling. * Query menu results. * "unset $reverse_realname" handling. * $from handling of $realname. * Bounce Resent-From handling of $realname.
2020-05-17Clean up Editor Menu interface inside Mutt.Kevin McCarthy
enter_filename() api: * Rename enter_fname() to _enter_fname() * Rename mutt_buffer_enter_mailbox() to mutt_enter_mailbox() * Rename mutt_buffer_enter_filenames() to mutt_enter_filenames() * Remove 'multiple' and 'fname buffer' parameters from mutt_enter_filenames(). Create a temp buffer, and enable multiple automatically. This removes the possibility of mistakenly looking at an unpopulated 'fname' parameter for the result. * Create mutt_enter_filename(). This isn't used currently, but it makes sense to have a "single filename" api already set up with correct parameters. get_field() api: * Rename _mutt_buffer_get_field() to a static _get_field() function. * Remove _mutt_get_field() and make mutt_get_field() an actual function. * Remove the multiple/files/numfiles parameters, since this should only be done through mutt_enter_filenames(). _mutt_enter_string() api: Add comments to mutt_enter_string() and _mutt_enter_string() headers. Noting that they should generally not be called directly. List the functions that should be used inside Mutt. Note the behavior of the multiple parameter.
2020-05-14Add Autocrypt error messages when trying to force send.Kevin McCarthy
If the account doesn't exist, or isn't enabled, display a message back in the compose menu.
2020-05-11Separate mailbox vs buffy-incoming for the "enter_fname" functions.Kevin McCarthy
Create mutt_buffer_enter_mailbox(), which turns on the MUTT_MAILBOX flag (renamed from MUTT_EFILE). This uses the mailbox history file category, and turns on MUTT_SEL_FOLDER in the select_file browser. Add a do_incoming paramter and a new separate flag MUTT_INCOMING, so that buffy-completion can be enabled optionally for mailboxes. It only makes sense for the change-folder operation, so disable it in other contexts (such as saving/copying a message, prompting for an Fcc mailbox, or an autocrypt scan mailbox). Change saving/copying a message to use the mailbox function, so that it shares the history file with other mailbox operations. It would previously use the "file" history category. Create mutt_buffer_enter_filenames() to replace the enter_fname() prompt for files. Since nothing directly uses the _mutt_buffer_enter_fname() function anymore, rename and make it static.
2020-05-02Fix 'gpg' -> 'GPG' in manual and autocrypt translation string.Kevin McCarthy
2020-03-06Change mutt_FormatString() data parameter to type void *.Kevin McCarthy
All invocations pass a pointer parameter. Perhaps at one point this was like the init.h combined usage. But as with that, using an unsigned long is incorrect, and we've been lucky to get away with it. Since we don't need a union, just change it to void * to properly size the parameter.
2020-02-28Create send.h header.Kevin McCarthy
This will hold the send context, so we may as well pull the prototypes into the header file too.
2019-12-21Turn off auto-clear outside of autocrypt initialization.Kevin McCarthy
The auto-clearing code was added in commit 01bc088c, for autocrypt initial prompting. It removed having to keep track of every place a browser or other menu might be displayed and having to remember to clear it out. However, clearing when mutt exits is a change of behavior for those who have turned off alternative screens.
2019-11-30Change "Prf Enc" to "Prf Encr".Kevin McCarthy
Make the abbreviation a bit clearer, that it means Encryption instead of Encoding. Thanks to Morten Bo Johansen for the suggestion.
2019-11-10Add gcc comments for fallthrough case statements.Kevin McCarthy
Most of these were already commented. Change a few of them to a format gcc will recognize. In the future, we'll want to change to whatever is standardized.
2019-08-09Add L10N comment about autocrypt menu help line abbreviations.Kevin McCarthy
2019-08-07Turn off macro processing during autocrypt initialization.Kevin McCarthy
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.
2019-08-07Automatically clear screen when popping the last menu.Kevin McCarthy
This removes the need to manually clear the screen during pre-menu operations, such as autocrypt first run initialization.
2019-08-07Add ability to create autocrypt account from an existing key.Kevin McCarthy
This is useful when adding accounts, or for users who want to use an existing key from the keyring during initial account creation.
2019-08-03Add autocrypt README fileKevin McCarthy
2019-08-03Add option to scan mailboxes during first run.Kevin McCarthy
The scanner will disable the header cache, allowing scanning all messages in the mailbox.
2019-08-03Add more translation string comments for autocrypt.Kevin McCarthy
2019-08-03Basic autocrypt account menu.Kevin McCarthy
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>.
2019-08-03Convert peer_update to just pass the peer object.Kevin McCarthy
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.
2019-08-03Add account->enabled checks.Kevin McCarthy
Add to ui recommendation, keylist generator, and autocrypt header writing routines.
2019-08-03Add prefer-encrypt prompt during account creation.Kevin McCarthy
2019-08-03Add L10N translation message comments.Kevin McCarthy
2019-08-03Print an error message if an autocrypt key can't be found.Kevin McCarthy
2019-08-03Slightly improve the gossip header key update.Kevin McCarthy
Don't set an empty peer.gossip_keydata with a value that matches the current peer.keydata. This just wastes space.
2019-08-03Fix process_gossip_headers() to look at the right envelope.Kevin McCarthy
2019-08-03Autocrypt outgoing emails.Kevin McCarthy
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 SIGN bit outside the call when postponing. * Since autocrypt doesn't set the 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.
2019-08-03Add autocrypt line to the compose menu.Kevin McCarthy
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.
2019-08-03Change gossip header address comparison to use normalized addresses.Kevin McCarthy
2019-08-03Change autocrypt_db normalization to return ADDRESS.Kevin McCarthy
This makes reusing the code in autocrypt.c easier.
2019-08-03Add gossip header processing.Kevin McCarthy
2019-08-03Convert to use sqllite3_prepare_v3().Kevin McCarthy
The documentation suggests the SQLITE_PREPARE_PERSISTENT flag is helpful for long-lived prepared statements, and Mutt is using.
2019-08-03Process autocrypt headers.Kevin McCarthy
Create/update peer database accounts and gpg keys based on the headers.
2019-08-03Add initial autocrypt account setup.Kevin McCarthy
Generate gpg key and add account record to the database.
2019-08-03Start autocrypt gpgme.Kevin McCarthy
Add a basic init function. Bump up the required gpgme version to 1.8.0 if autocrypt is enabled.
2019-08-03Add database and schema initialization.Kevin McCarthy
Add mutt_mkdir() library function supporting recursive mkdir.
2019-08-03Initial autoconf and makefile setup for autocrypt.Kevin McCarthy