Here is the revised patch set for opportunistic encrypt. It's a large patch set, but most patches haven't changed much, and only the last 2 patches are new. Here is an overview of each patch.
* part-1-refactor-findkeys-adrlist-code.patch: This patch hasn't changed at all. It pulls the common "address merging" code in each find_key into crypt_get_keys(). * part-2-add-oppenc-mode-parameter.patch: This patch hasn't changed, except that "auto_mode" has been renamed to "oppenc_mode". This patch just adds the parameter through the call stack. * part-3-remove-dup-is-numerical-keyid.patch: This patch hasn't changed. It relocates is_numerical_keyid() into crypt.c so it can be shared by gpgme. * part-4-add-oppenc-mode-functionality.patch: The patch has changed some. Previously, the getkeybyaddr methods didn't work quite right for oppenc_mode. Pgp classic was only returning fully valid keys. Gpgme was returning a match against the personal field. Both were changed to return a valid strong address match, or just a valid address match. Also, gpgme had a bug where it was considering two address matches with the *same* key to be "multiple" keys. * part-5-add-can-oppor-crypt-function.patch: This patch hasn't changed. Note that the HEADER bit isn't implemented until patch 7. * part-6-add-option-and-calls.patch This patch hasn't changed much. The documentation was updated to reflect the new functionality implemented in the next 2 patches though. * part-7-add-message-bit.patch This patch is all new. It implements the OPPENCRYPT bit for header->security. It adds the "O" flag for postpone/resume to note if OPPENCRYPT was on, and changes resend to enable oppencrypt. Lastly, it turns the oppencrypt header bit off if something else enabled encryption in ci_send_message(). * part-8-ui-changes.patch: This patch is also all new. It changes the pgp_menu and smime_menu to not show the (e)ncrypt and (b)oth options when oppenc is active. It also add the (o)ppenc toggle to the menus. As I mentioned in the parent email, these could alternatively be put into a compose menu function, but I think it works okay here. Since the menu choices now vary, the switch statement was changed to operate off of letters instead of numbers. Also, the menus liked to set security=0 when clearing, but this will overwrite the OPPENCRYPT bit. So, the code was changed to try and keep the APPLICATION and OPPENCRYPT bit set in various places. If you've read this far, thank you very much. I'd appreciate comments, or if people would be willing to try the patch set out. Unless this feature is disliked, I'd like to work towards getting these committed. Thanks, -Kevin
signature.asc
Description: PGP signature
