mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
dirmngr: Initialize cache from sysconfig dir
* dirmngr/certcache.c (cert_cache_init): Load certificates from sysconfig dir instead of the homeidr. * dirmngr/dirmngr.c (main): Removed parsing of obsolete homedir_data option. * dirmngr/dirmngr.h (opt): Removed homedir_data. * doc/dirmngr.texi: Update and clarify certs directory doc. -- Using the homedir for extra-certs and trusted-certs makes little sense when dirmngr is used with a caller that manages it's own store of certificates and can provide those through the SENDCERT command. You can use trusted-certs and extra-certs to provide users with a base of locally available certificates that are not already in store of the applications.
This commit is contained in:
parent
b4c798b86e
commit
070d7bf940
5 changed files with 21 additions and 23 deletions
|
@ -435,11 +435,11 @@ cert_cache_init (void)
|
|||
init_cache_lock ();
|
||||
acquire_cache_write_lock ();
|
||||
|
||||
dname = make_filename (opt.homedir, "trusted-certs", NULL);
|
||||
dname = make_filename (gnupg_sysconfdir (), "trusted-certs", NULL);
|
||||
load_certs_from_dir (dname, 1);
|
||||
xfree (dname);
|
||||
|
||||
dname = make_filename (opt.homedir_data, "extra-certs", NULL);
|
||||
dname = make_filename (gnupg_sysconfdir (), "extra-certs", NULL);
|
||||
load_certs_from_dir (dname, 0);
|
||||
xfree (dname);
|
||||
|
||||
|
|
|
@ -800,7 +800,6 @@ main (int argc, char **argv)
|
|||
#else
|
||||
opt.homedir = gnupg_sysconfdir ();
|
||||
#endif
|
||||
opt.homedir_data = gnupg_datadir ();
|
||||
opt.homedir_cache = gnupg_cachedir ();
|
||||
socket_name = dirmngr_sys_socket_name ();
|
||||
}
|
||||
|
@ -926,8 +925,6 @@ main (int argc, char **argv)
|
|||
if (nogreeting )
|
||||
greeting = 0;
|
||||
|
||||
if (!opt.homedir_data)
|
||||
opt.homedir_data = opt.homedir;
|
||||
if (!opt.homedir_cache)
|
||||
opt.homedir_cache = opt.homedir;
|
||||
|
||||
|
|
|
@ -80,7 +80,6 @@ struct
|
|||
int dry_run; /* don't change any persistent data */
|
||||
int batch; /* batch mode */
|
||||
const char *homedir; /* Configuration directory name */
|
||||
const char *homedir_data; /* Ditto for data files (/usr/share/dirmngr). */
|
||||
const char *homedir_cache; /* Ditto for cache files (/var/cache/dirmngr). */
|
||||
|
||||
char *config_filename; /* Name of a config file, which will be
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue