aboutsummaryrefslogtreecommitdiffstats
path: root/src/genkey.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-09-14 10:15:35 +0000
committerWerner Koch <[email protected]>2016-09-14 10:42:12 +0000
commitc22f5884c50557f54704f4becc5a8c1ee0749547 (patch)
tree7bb96c1cc7b43662bc09cc3ef3ad53e74a302e17 /src/genkey.c
parentpython: Build for both Python2 and Python3. (diff)
downloadgpgme-c22f5884c50557f54704f4becc5a8c1ee0749547.tar.gz
gpgme-c22f5884c50557f54704f4becc5a8c1ee0749547.zip
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 <[email protected]>
Diffstat (limited to 'src/genkey.c')
-rw-r--r--src/genkey.c15
1 files changed, 11 insertions, 4 deletions
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);
}