Home GnuPG
Diffusion GPGME 05a0e97f5c12

cpp: Add some convenience functions

Description

cpp: Add some convenience functions

* lang/cpp/src/context.cpp (Context::create): New.
* lang/cpp/src/context.h: Update accordingly.
* lang/cpp/src/key.cpp, lang/cpp/src/key.h:
(Key::isBad, Subkey::isBad, UserID::isBad)
(UserID::Signature::isBad): Add shorthand for the isX checks.
* NEWS: Mention it.

I don't know how often I wrote:
if (key.isNull() || key.isExpired() || key.isRevoked() ...

And for the context it is good practice to use a unique ptr
so the API should make it easy.

Details

Provenance
aheineckeAuthored on Oct 25 2018, 2:09 PM
Parents
rM04791c896712: docs: python howto
Branches
Unknown
Tags
Unknown