mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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): 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
Backported-from-master: 7ccd489aa2
This commit is contained in:
parent
c300253181
commit
a946343f14
5 changed files with 306 additions and 30 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue