summaryrefslogtreecommitdiffstats
path: root/tools/gpg-wks.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2022-10-06 18:38:29 +0200
committerWerner Koch <wk@gnupg.org>2022-10-06 18:38:29 +0200
commit7ccd489aa2e5c5ef6c4554c9f04dd74394b43409 (patch)
tree8bd139418b51ef5cc97611c662ff1ed4a6b0b798 /tools/gpg-wks.h
parentdirmngr: Support paged LDAP mode for KS_GET (diff)
downloadgnupg2-7ccd489aa2e5c5ef6c4554c9f04dd74394b43409.tar.xz
gnupg2-7ccd489aa2e5c5ef6c4554c9f04dd74394b43409.zip
wkd: New command --mirror for gpg-wks-client.
* tools/gpg-wks-client.c (aMirror,oBlacklist,oNoAutostart): New. (opts): Add ----mirror, --no-autostart, and --blacklist. (parse_arguments): Parse new options. (main): Parse common.conf. Implement aMirror. (mirror_one_key_parm): New. (mirror_one_keys_userid, mirror_one_key): New. (command_mirror): New. * tools/gpg-wks.h (struct uidinfo_list_s): Add fields flags. * tools/wks-util.c (wks_cmd_install_key): Factor some code out to ... (wks_install_key_core): new. * tools/call-dirmngr.c (wkd_dirmngr_ks_get): New. -- This implements the basic LDAP to WKD mirroring. The blacklist option and domain restrictions are not yet fully implemented. Take care: In OpenLDAP you may need to increase the paged result limit by using a configuration like: dn: olcDatabase={1}mdb,cn=config changetype: modify replace: olcLimits olcLimits: dn.subtree="dc=example,dc=org" size.prtotal=unlimited GnuPG-bug-id: 6224
Diffstat (limited to 'tools/gpg-wks.h')
-rw-r--r--tools/gpg-wks.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gpg-wks.h b/tools/gpg-wks.h
index 6c5dc8b17..50350eddb 100644
--- a/tools/gpg-wks.h
+++ b/tools/gpg-wks.h
@@ -38,11 +38,13 @@ struct
int quiet;
int use_sendmail;
int with_colons;
+ int no_autostart;
const char *output;
const char *gpg_program;
const char *directory;
const char *default_from;
strlist_t extra_headers;
+ const char *blacklist;
} opt;
/* Debug values and macros. */
@@ -78,6 +80,7 @@ struct uidinfo_list_s
struct uidinfo_list_s *next;
time_t created; /* Time the userid was created. */
char *mbox; /* NULL or the malloced mailbox from UID. */
+ unsigned int flags; /* These flags are cleared on creation. */
char uid[1];
};
typedef struct uidinfo_list_s *uidinfo_list_t;
@@ -102,6 +105,7 @@ void wks_free_policy (policy_flags_t policy);
gpg_error_t wks_fname_from_userid (const char *userid, int hash_only,
char **r_fname, char **r_addrspec);
gpg_error_t wks_compute_hu_fname (char **r_fname, const char *addrspec);
+gpg_error_t wks_install_key_core (estream_t key, const char *addrspec);
gpg_error_t wks_cmd_install_key (const char *fname, const char *userid);
gpg_error_t wks_cmd_remove_key (const char *userid);
gpg_error_t wks_cmd_print_wkd_hash (const char *userid);