Next: Advanced Key Editing, Previous: Changing Passphrases, Up: Key Management [Contents][Index]
The OpenPGP engine features a Trust-On-First-Use (TOFU) key validation model. For resolving conflicts it is necessary to declare the policy for a key. See the GnuPG manual for details on the TOFU implementation.
SINCE: 1.7.0
The gpgme_tofu_policy_t type specifies the set of possible
policy values that are supported by GPGME:
GPGME_TOFU_POLICY_AUTOSet the policy to “auto”.
GPGME_TOFU_POLICY_GOODSet the policy to “good”.
GPGME_TOFU_POLICY_BADSet the policy to “bad”.
GPGME_TOFU_POLICY_ASKSet the policy to “ask”.
GPGME_TOFU_POLICY_UNKNOWNSet the policy to “unknown”.
To change the policy for a key the following functions can be used:
SINCE: 1.7.0
The function gpgme_op_tofu_policy changes the TOFU policy of
key. The valid values for policy are listed above. As of
now this function does only work for OpenPGP and requires at least
version 2.1.10 of GnuPG.
The function returns zero on success, GPG_ERR_NOT_SUPPORTED if
the engine does not support the command, or a bunch of other error
codes.
SINCE: 1.7.0
The function gpgme_op_tofu_policy_start initiates a
gpgme_op_tofu_policy operation. It can be completed by calling
gpgme_wait on the context. See Waiting For Completion.
The function returns 0 if the operation was started successfully,
and an error code if one of the arguments is not valid or the oepration
could not be started.
Next: Advanced Key Editing, Previous: Changing Passphrases, Up: Key Management [Contents][Index]