diff options
author | Ben Kibbey <[email protected]> | 2015-10-28 22:16:27 +0000 |
---|---|---|
committer | Ben Kibbey <[email protected]> | 2015-10-29 22:05:10 +0000 |
commit | dfa79f9300b837b0f7f2ea44afa589bfcda1dbd9 (patch) | |
tree | b3f7aef3d69fb1b575fdffdec2fc633a5fe3ef8e /src/passwd.c | |
parent | w32: Add extra diagnostic about possible missing gpgme-w32spawn.exe. (diff) | |
download | gpgme-dfa79f9300b837b0f7f2ea44afa589bfcda1dbd9.tar.gz gpgme-dfa79f9300b837b0f7f2ea44afa589bfcda1dbd9.zip |
Make use of user passphrase handler during passwd.
* src/passwd.c (passwd_start): set engine passphrase command handler.
--
This allows for inquiring a passphrase when changing a passphrase rather
than requiring a pinentry.
Diffstat (limited to 'src/passwd.c')
-rw-r--r-- | src/passwd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/passwd.c b/src/passwd.c index ff30df01..c34f3577 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); } |