summaryrefslogtreecommitdiff
path: root/src/export.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-09-13 18:57:38 +0200
committerWerner Koch <wk@gnupg.org>2016-09-13 18:59:10 +0200
commit00c501d296da287bec2fd6a0e3912abfbde90a98 (patch)
tree496dbb635f8062aaec7978e7f64719d0e1528481 /src/export.c
parent70a3be27a509a1b5ea7372bee93d83c5019427ff (diff)
downloadgpgme-00c501d296da287bec2fd6a0e3912abfbde90a98.tar.gz
core: New function gpgme_op_create_key.
* src/engine-backend.h (engine_ops): Change prototype of genkey. * src/engine-gpgsm.c (gpgsm_genkey): Change accordingly. * src/engine-gpg.c (gpg_genkey): Change it to a dispatcher. (gpg_createkey_from_param): New for the old functionality. (gpg_createkey_legacy): New. Stub for now. (gpg_createkey): New. (gpg_addkey): New. Stub for now. (gpg_adduid): New. Stub for now. * src/engine.c (_gpgme_engine_op_genkey): Add new args. * src/genkey.c (op_data_t): Add field ERROR_CODE. (parse_error): New. (genkey_status_handler): Parse ERROR status line. (genkey_start): Use NULL/0 for the new args. (createkey_start): New. (gpgme_op_createkey_start, gpgme_op_createkey): New. * src/gpgme.def, src/libgpgme.vers: Add gpgme_op_createkey_start and gpgme_op_createkey. * src/gpgme.h.in (_gpgme_op_genkey_result): Add fields PUBKEY and SECKEY. (GPGME_CREATE_SIGN): New. (GPGME_CREATE_ENCR): New. (GPGME_CREATE_CERT): New. (GPGME_CREATE_AUTH): New. (GPGME_CREATE_NOPASSWD): New. (GPGME_CREATE_SELFSIGNED): New. (GPGME_CREATE_NOSTORE): New. (GPGME_CREATE_WANTPUB): New. (GPGME_CREATE_WANTSEC): New. (GPGME_CREATE_FORCE): New. * tests/run-genkey.c: New. * tests/Makefile.am (noinst_PROGRAMS): Add it. -- This function uses the new --quick-gen-key API of gpg. A limited compatibility mode to use older gpg versions and gpgsm will eventually be provided. Not all flags are currently implemented. ./run-genkey --unprotected --force test@example.com Create a new standard key with the given user id. --force is used to allow creating more than one key with that user id in the keyring. ./run-genkey --unprotected --force \ test@example.com default default 2145826800 Creates a new standard key with an expiration date of 2037-12-31. ./run-genkey --unprotected --force \ test@example.com future-default default 2145826800 Create a standard key using the fugure default algorithms. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/export.c')
-rw-r--r--src/export.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/export.c b/src/export.c
index a29fbde8..41a9ebaf 100644
--- a/src/export.c
+++ b/src/export.c
@@ -34,7 +34,7 @@
/* Local operation data. */
typedef struct
{
- gpg_error_t err; /* Error encountred during the export. */
+ gpg_error_t err; /* Error encountered during the export. */
} *op_data_t;