Make use of user passphrase handler during genkey.
* src/genkey.c (genkey_start): set engine passphrase command handler. -- This allows for inquiring a new passphrase during key generation rather than requiring a pinentry. Needs a patch to gnupg to make use of --command-fd with --gen-key.
This commit is contained in:
parent
e07d38f5f9
commit
2b6ae3dadf
@ -186,6 +186,14 @@ genkey_start (gpgme_ctx_t ctx, int synchronous, const char *parms,
|
||||
|
||||
_gpgme_engine_set_status_handler (ctx->engine, genkey_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_genkey (ctx->engine, opd->key_parameter,
|
||||
ctx->use_armor, pubkey, seckey);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user