aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyserver-internal.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-08-01 13:56:38 +0000
committerWerner Koch <[email protected]>2025-08-01 13:56:38 +0000
commit242ced25509f1aefc257e9844495c3b5803e1486 (patch)
tree7b6bb149ef3f5a82102d1b2a1ea06fb2107e1fd6 /g10/keyserver-internal.h
parentgpgtar: Do not close stderr when calling gpg. (diff)
downloadgnupg-242ced25509f1aefc257e9844495c3b5803e1486.tar.gz
gnupg-242ced25509f1aefc257e9844495c3b5803e1486.zip
gpg: Try to retrieve a key from LDAP before sending it.
* g10/options.h (KEYSERVER_UPDATE_BEFORE_SEND): New. * g10/keyserver-internal.h (KEYSERVER_IMPORT_FLAG_SILENT): New. (KEYSERVER_IMPORT_FLAG_ONLYFPR): New. (KEYSERVER_IMPORT_FLAG_UPDSEND): New. * g10/gpg.c (main): Set default keyserver_options to update-before-send. * g10/keyserver.c (keyserver_opts): Add option "update-before-send". (keyserver_export): Add optional arg assume_new_key. (keyserver_import): Add arg flags. Act upon the new KEYSERVER_IMPORT_FLAG_xxx values and pass flags on. (keyserver_get_chunk): Ditto. (keyserver_put): Add optional arg assume_new_key. Implement update-before-send feature. * g10/import.c (import_one_real): Take care of IMPORT_MERGE_ONLY when passes in the option arg. Required for the update-before-send feature. -- This featureis enabled by default bu can be disabled using --keyserver-flags no-update-before-send . GnuPG-bug-id: 7730
Diffstat (limited to 'g10/keyserver-internal.h')
-rw-r--r--g10/keyserver-internal.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/g10/keyserver-internal.h b/g10/keyserver-internal.h
index cb2c005b4..9506fd015 100644
--- a/g10/keyserver-internal.h
+++ b/g10/keyserver-internal.h
@@ -25,8 +25,11 @@
#include "../common/types.h"
/* Flags for the keyserver import functions. */
-#define KEYSERVER_IMPORT_FLAG_QUICK 1
-#define KEYSERVER_IMPORT_FLAG_LDAP 2
+#define KEYSERVER_IMPORT_FLAG_QUICK 1 /* Short time out. */
+#define KEYSERVER_IMPORT_FLAG_LDAP 2 /* Require LDAP server. */
+#define KEYSERVER_IMPORT_FLAG_SILENT 4 /* Do not print stats. */
+#define KEYSERVER_IMPORT_FLAG_ONLYFPR 8 /* Allow only fingerprint specs. */
+#define KEYSERVER_IMPORT_FLAG_UPDSEND 16 /* In updating before send. */
int parse_keyserver_options(char *options);
void free_keyserver_spec(struct keyserver_spec *keyserver);
@@ -35,8 +38,8 @@ struct keyserver_spec *parse_keyserver_uri (const char *string,
int require_scheme);
struct keyserver_spec *parse_preferred_keyserver(PKT_signature *sig);
int keyserver_any_configured (ctrl_t ctrl);
-int keyserver_export (ctrl_t ctrl, strlist_t users);
-int keyserver_import (ctrl_t ctrl, strlist_t users);
+gpg_error_t keyserver_export (ctrl_t ctrl, strlist_t users, int assume_new_key);
+gpg_error_t keyserver_import (ctrl_t ctrl, strlist_t users, unsigned int flags);
int keyserver_import_fpr (ctrl_t ctrl, const byte *fprint,size_t fprint_len,
struct keyserver_spec *keyserver,
unsigned int flags);