From c22f5884c50557f54704f4becc5a8c1ee0749547 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 14 Sep 2016 12:15:35 +0200 Subject: core: Change a parameter for the engine's genkey function. * src/engine.h (GENKEY_EXTRAFLAG_ARMOR): New. * src/engine-backend.h (engine_ops): Rename USE_ARMOR in genkey to EXTRAFLAGS. * src/engine.c (_gpgme_engine_op_genkey): Ditto. * src/engine-gpg.c (gpg_createkey_from_param): Ditto and test the flags. (gpg_createkey_legacy): Ditto. (gpg_createkey): Ditto. (gpg_addkey): Ditto. (gpg_genkey): Ditto. Signed-off-by: Werner Koch --- src/genkey.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/genkey.c') diff --git a/src/genkey.c b/src/genkey.c index b93abb80..100e655e 100644 --- a/src/genkey.c +++ b/src/genkey.c @@ -267,7 +267,8 @@ genkey_start (gpgme_ctx_t ctx, int synchronous, const char *parms, return _gpgme_engine_op_genkey (ctx->engine, NULL, NULL, 0, 0, NULL, 0, opd->key_parameter, - ctx->use_armor, pubkey, seckey); + ctx->use_armor? GENKEY_EXTRAFLAG_ARMOR:0, + pubkey, seckey); } @@ -352,7 +353,9 @@ createkey_start (gpgme_ctx_t ctx, int synchronous, return _gpgme_engine_op_genkey (ctx->engine, userid, algo, reserved, expires, anchorkey, flags, - NULL, ctx->use_armor, NULL, NULL); + NULL, + ctx->use_armor? GENKEY_EXTRAFLAG_ARMOR:0, + NULL, NULL); } @@ -438,7 +441,9 @@ createsubkey_start (gpgme_ctx_t ctx, int synchronous, return _gpgme_engine_op_genkey (ctx->engine, NULL, algo, reserved, expires, key, flags, - NULL, ctx->use_armor, NULL, NULL); + NULL, + ctx->use_armor? GENKEY_EXTRAFLAG_ARMOR:0, + NULL, NULL); } @@ -522,7 +527,9 @@ adduid_start (gpgme_ctx_t ctx, int synchronous, return _gpgme_engine_op_genkey (ctx->engine, userid, NULL, 0, 0, key, flags, - NULL, ctx->use_armor, NULL, NULL); + NULL, + ctx->use_armor? GENKEY_EXTRAFLAG_ARMOR:0, + NULL, NULL); } -- cgit v1.2.3