diff options
author | Werner Koch <[email protected]> | 2016-09-14 09:40:34 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-09-14 09:40:34 +0000 |
commit | 3210f3e4725afc5ee2810b9a1361918ec9c42ca4 (patch) | |
tree | 742cdfee9596708ce838d88ca47236162821817e /src/gpgme.h.in | |
parent | core: New function gpgme_op_createsubkey. (diff) | |
download | gpgme-3210f3e4725afc5ee2810b9a1361918ec9c42ca4.tar.gz gpgme-3210f3e4725afc5ee2810b9a1361918ec9c42ca4.zip |
core: New function gpgme_op_adduid.
* src/genkey.c: Replace most error codes GPG_ERR_INV_VALUE by
GPG_ERR_INV_ARG.
(struct op_data_t): Add field UIDMODE.
(genkey_status_handler): Use UIDMODE.
(adduid_start): New.
(gpgme_op_adduid_start, gpgme_op_adduid): New.
* src/gpgme.def, src/libgpgme.vers: Add them.
* tests/run-genkey.c: Add option --adduid.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/gpgme.h.in')
-rw-r--r-- | src/gpgme.h.in | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 0fdc9276..ec436c80 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -1835,8 +1835,11 @@ struct _gpgme_op_genkey_result /* A sub key was generated. */ unsigned int sub : 1; + /* A user id was generated. */ + unsigned int uid : 1; + /* Internal to GPGME, do not use. */ - unsigned int _unused : 30; + unsigned int _unused : 29; /* The fingerprint of the generated key. */ char *fpr; @@ -1888,6 +1891,14 @@ gpgme_error_t gpgme_op_createsubkey (gpgme_ctx_t ctx, unsigned long expires, unsigned int flags); +/* Add USERID to an existing KEY. */ +gpgme_error_t gpgme_op_adduid_start (gpgme_ctx_t ctx, + gpgme_key_t key, const char *userid, + unsigned int flags); +gpgme_error_t gpgme_op_adduid (gpgme_ctx_t ctx, + gpgme_key_t key, const char *userid, + unsigned int flags); + /* Retrieve a pointer to the result of a genkey, createkey, or |