jstedfast / gmime

A C/C++ MIME creation and parser library with support for S/MIME, PGP, and Unix mbox spools.
GNU Lesser General Public License v2.1
113 stars 36 forks source link

in GMime 4.0, consolidate GMimeVerifyFlags and GMimeDecryptFlags as GMimeCryptoFlags #70

Open dkg opened 4 years ago

dkg commented 4 years ago

in mailing list discussion last year, i suggested consolidating GMimeVerifyFlags and GMimeDecryptFlags at the next API/ABI change.

This is just a bug report to keep track of the proposed change. (if you don't think it's a good idea, feel free to close!)

jstedfast commented 4 years ago

Do all GMimeDecryptFlags make sense for the verify function?

Not sure why they should be consolidated.

dkg commented 4 years ago

in your message on that thread, you wrote:

What I was thinking is that we could just duplicate any VerifyFlags into DecryptFlags.

Possibly we could even make it such that bitwise-oring VerifyFlags and DecryptFlags worked.

In other words, if VerifyFlags was setup such that the enum flags did not overlap with DecryptFlags, they could be combined in the decrypt() calls.

consolidating them into a single bitfield seems simplest to me, and the documentation could just indicate if a flag has no effect on one or the other of the operations.