From c8fd8870b3bf089f99156448b7d1e59c1150f994 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 1 Feb 2021 16:47:46 +0100 Subject: [PATCH] core: Remove experimental feature GPGME_EXPORT_MODE_NOUID. * src/export.c (export_start): Remove GPGME_EXPORT_MODE_NOUID check. * src/engine-gpg.c (export_common): Ditto. -- Note that this constant was never announed and used only for internal tests. It made it into some release only by accident. The constants is kept in gpgme.h to not break any code but it is non-fucntionals. We do not consider this an ABI break. GnuPG-bug-id: 5284 --- src/engine-gpg.c | 9 +-------- src/export.c | 1 - src/gpgme.h.in | 6 +++++- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/engine-gpg.c b/src/engine-gpg.c index 9a9a26ef..5e663e16 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -2336,13 +2336,8 @@ export_common (engine_gpg_t gpg, gpgme_export_mode_t mode, if ((mode & GPGME_EXPORT_MODE_MINIMAL)) { - if ((mode & GPGME_EXPORT_MODE_NOUID)) - err = add_arg (gpg, "--export-options=export-minimal,export-drop-uids"); - else - err = add_arg (gpg, "--export-options=export-minimal"); + err = add_arg (gpg, "--export-options=export-minimal"); } - else if ((mode & GPGME_EXPORT_MODE_NOUID)) - err = add_arg (gpg, "--export-options=export-drop-uids"); if (err) ; @@ -2358,8 +2353,6 @@ export_common (engine_gpg_t gpg, gpgme_export_mode_t mode, else if ((mode & GPGME_EXPORT_MODE_EXTERN)) { err = add_arg (gpg, "--send-keys"); - if (!err && (mode & GPGME_EXPORT_MODE_NOUID)) - err = add_arg (gpg, "--keyserver-options=export-drop-uids"); } else { diff --git a/src/export.c b/src/export.c index 879a54f9..4cee0ef9 100644 --- a/src/export.c +++ b/src/export.c @@ -129,7 +129,6 @@ export_start (gpgme_ctx_t ctx, int synchronous, const char *pattern, |GPGME_EXPORT_MODE_SECRET |GPGME_EXPORT_MODE_SSH |GPGME_EXPORT_MODE_RAW - |GPGME_EXPORT_MODE_NOUID |GPGME_EXPORT_MODE_PKCS12))) return gpg_error (GPG_ERR_INV_VALUE); /* Invalid flags in MODE. */ diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 1defa4df..9e98816d 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -406,7 +406,6 @@ gpgme_pinentry_mode_t; #define GPGME_EXPORT_MODE_SECRET 16 #define GPGME_EXPORT_MODE_RAW 32 #define GPGME_EXPORT_MODE_PKCS12 64 -#define GPGME_EXPORT_MODE_NOUID 128 /* Experimental(!)*/ #define GPGME_EXPORT_MODE_SSH 256 typedef unsigned int gpgme_export_mode_t; @@ -2463,6 +2462,11 @@ char *gpgme_addrspec_from_uid (const char *uid); * Deprecated types, constants and functions. */ +/* This is a former experimental only features. The constant is + * provided to not break existing code in the compiler phase. */ +#define GPGME_EXPORT_MODE_NOUID 128 /* Do not use! */ + + /* The possible stati for gpgme_op_edit. The use of that function and * these status codes are deprecated in favor of gpgme_op_interact. */ typedef enum