Currently we only have the fields can_encrypt, can_certify, can_encrypt and "is_qualified"
For digital signature we would need non_repudation.
My proposal would be to have this more extendable as we can maybe in the future also make a difference between dataEncipherment or keyEncipherment. Or with even more usages.
So why not just use flags like we do at other places
#define GPGME_KEY_USAGE_ENCRYPT 1 #define GPGME_KEY_USAGE_SIGN 2 #define GPGME_KEY_USAGE_AUTHENTICATE 4 #define GPGME_KEY_USAGE_KEYENCIPHER 8 #define GPGME_KEY_USAGE_DATAENCIPHER 16 #define GPGME_KEY_USAGE_NONREPUDIATION 32 typedef unsigned int gpgme_capability_flags_t
With maybe some more intelligent values? Just as a more extendable suggestion so that we can either base the high level checks on this and give the application access to the more low level / protocol specific capabilities below that without having to add new API for every new capability?