With GPGME, how would I check if I can decrypt a given secret with the current keychain.
I can attempt decryption with gpgme_op_decrypt
and catch GPG_ERR_NO_SECKEY
errors, but this seems non-optimal, nor do I know if this covers all cases.
Is there can_decrypt
function, do_we_own_decrypt_key_for_secret
or alike?
Also, can I list the secret recipients without decrypting the secret, that could help with this issue.