I am having trouble exporting secret keys programmatically. I am using GPGME via the Rust bindings but as you can see in the attached link it seems that the issue comes from the library itself. The passphrase callback is not used when exporting secret keys. I am not sure if this is expected or not.
I tried adding this code before _gpgme_engine_op_export in export_start:
if (ctx->passphrase_cb) { err = _gpgme_engine_set_command_handler (ctx->engine, _gpgme_passphrase_command_handler, ctx); if (err) return err; }
It it still not using the callback.