You can change the configuration of a backend engine, and thus change the executable program and configuration directory to be used. You can make these changes the default or set them for some contexts individually.
gpgme_error_t gpgme_set_engine_info (gpgme_protocol_t proto, const char *file_name, const char *home_dir) ¶SINCE: 1.1.0
The function gpgme_set_engine_info changes the default
configuration of the crypto engine implementing the protocol
proto.
file_name is the file name of the executable program
implementing this protocol, and home_dir is the directory name
of the configuration directory for this crypto engine. If
home_dir is NULL, the engine’s default will be used.
The new defaults are not applied to already created GPGME contexts.
This function returns the error code GPG_ERR_NO_ERROR if
successful, or an error code on failure.
The functions gpgme_ctx_get_engine_info and
gpgme_ctx_set_engine_info can be used to change the engine
configuration per context. See Crypto Engine.