summaryrefslogtreecommitdiff
path: root/src/passwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/passwd.c')
-rw-r--r--src/passwd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/passwd.c b/src/passwd.c
index ff30df0..c34f357 100644
--- a/src/passwd.c
+++ b/src/passwd.c
@@ -148,6 +148,14 @@ passwd_start (gpgme_ctx_t ctx, int synchronous, gpgme_key_t key,
_gpgme_engine_set_status_handler (ctx->engine, passwd_status_handler, ctx);
+ if (ctx->passphrase_cb)
+ {
+ err = _gpgme_engine_set_command_handler
+ (ctx->engine, _gpgme_passphrase_command_handler, ctx, NULL);
+ if (err)
+ return err;
+ }
+
return _gpgme_engine_op_passwd (ctx->engine, key, flags);
}