When I set a passphrase callback, it doesn't seem to be used, and pinentry runs instead. gpgme_set_passphrase_cb(ctx, return_pass, NULL); The application compiles fine, and the function return_pass is setup correctly, but pinentry runs no matter what I change. Is there a way to force this callback?