mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +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
3
NEWS
3
NEWS
@ -1,6 +1,9 @@
|
|||||||
Noteworthy changes in version 2.1.3 (unreleased)
|
Noteworthy changes in version 2.1.3 (unreleased)
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
|
* dirmngr: extra-certs and trusted-certs are now always loaded from
|
||||||
|
the sysconfig dir instead of the homedir.
|
||||||
|
|
||||||
|
|
||||||
Noteworthy changes in version 2.1.2 (2015-02-11)
|
Noteworthy changes in version 2.1.2 (2015-02-11)
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
@ -435,11 +435,11 @@ cert_cache_init (void)
|
|||||||
init_cache_lock ();
|
init_cache_lock ();
|
||||||
acquire_cache_write_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);
|
load_certs_from_dir (dname, 1);
|
||||||
xfree (dname);
|
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);
|
load_certs_from_dir (dname, 0);
|
||||||
xfree (dname);
|
xfree (dname);
|
||||||
|
|
||||||
|
@ -800,7 +800,6 @@ main (int argc, char **argv)
|
|||||||
#else
|
#else
|
||||||
opt.homedir = gnupg_sysconfdir ();
|
opt.homedir = gnupg_sysconfdir ();
|
||||||
#endif
|
#endif
|
||||||
opt.homedir_data = gnupg_datadir ();
|
|
||||||
opt.homedir_cache = gnupg_cachedir ();
|
opt.homedir_cache = gnupg_cachedir ();
|
||||||
socket_name = dirmngr_sys_socket_name ();
|
socket_name = dirmngr_sys_socket_name ();
|
||||||
}
|
}
|
||||||
@ -926,8 +925,6 @@ main (int argc, char **argv)
|
|||||||
if (nogreeting )
|
if (nogreeting )
|
||||||
greeting = 0;
|
greeting = 0;
|
||||||
|
|
||||||
if (!opt.homedir_data)
|
|
||||||
opt.homedir_data = opt.homedir;
|
|
||||||
if (!opt.homedir_cache)
|
if (!opt.homedir_cache)
|
||||||
opt.homedir_cache = opt.homedir;
|
opt.homedir_cache = opt.homedir;
|
||||||
|
|
||||||
|
@ -80,7 +80,6 @@ struct
|
|||||||
int dry_run; /* don't change any persistent data */
|
int dry_run; /* don't change any persistent data */
|
||||||
int batch; /* batch mode */
|
int batch; /* batch mode */
|
||||||
const char *homedir; /* Configuration directory name */
|
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). */
|
const char *homedir_cache; /* Ditto for cache files (/var/cache/dirmngr). */
|
||||||
|
|
||||||
char *config_filename; /* Name of a config file, which will be
|
char *config_filename; /* Name of a config file, which will be
|
||||||
|
@ -143,9 +143,8 @@ running mode:
|
|||||||
@table @asis
|
@table @asis
|
||||||
|
|
||||||
@item With @code{--daemon} given on the commandline
|
@item With @code{--daemon} given on the commandline
|
||||||
the directory named @file{/etc/gnupg} for configuration files,
|
the directory named @file{/etc/gnupg} is used for configuration files
|
||||||
@file{/var/lib/gnupg/} for extra data and @file{/var/cache/gnupg}
|
and @file{/var/cache/gnupg} for cached CRLs.
|
||||||
for cached CRLs.
|
|
||||||
|
|
||||||
@item Without @code{--daemon} given on the commandline
|
@item Without @code{--daemon} given on the commandline
|
||||||
the directory named @file{.gnupg} directly below the home directory
|
the directory named @file{.gnupg} directly below the home directory
|
||||||
@ -428,11 +427,9 @@ Dirmngr makes use of several directories when running in daemon mode:
|
|||||||
The first is the standard home directory for all configuration files.
|
The first is the standard home directory for all configuration files.
|
||||||
In the deprecated system daemon mode the second directory is used instead.
|
In the deprecated system daemon mode the second directory is used instead.
|
||||||
|
|
||||||
@item ~/.gnupg/trusted-certs
|
@item /etc/gnupg/trusted-certs
|
||||||
@itemx /etc/gnupg/trusted-certs
|
This directory should be filled with certificates of Root CAs you
|
||||||
The first directory should be filled with certificates of Root CAs you
|
are trusting in checking the CRLs and signing OCSP Reponses.
|
||||||
are trusting in checking the CRLs and signing OCSP Reponses. The
|
|
||||||
second directory is used in the deprecated systems daemon mode.
|
|
||||||
|
|
||||||
Usually these are the same certificates you use with the applications
|
Usually these are the same certificates you use with the applications
|
||||||
making use of dirmngr. It is expected that each of these certificate
|
making use of dirmngr. It is expected that each of these certificate
|
||||||
@ -442,20 +439,22 @@ those certificates on startup and when given a SIGHUP. Certificates
|
|||||||
which are not readable or do not make up a proper X.509 certificate
|
which are not readable or do not make up a proper X.509 certificate
|
||||||
are ignored; see the log file for details.
|
are ignored; see the log file for details.
|
||||||
|
|
||||||
|
Applications using dirmngr (e.g. gpgsm) can request these
|
||||||
|
certificates to complete a trust chain in the same way as with the
|
||||||
|
extra-certs directory (see below).
|
||||||
|
|
||||||
Note that for OCSP responses the certificate specified using the option
|
Note that for OCSP responses the certificate specified using the option
|
||||||
@option{--ocsp-signer} is always considered valid to sign OCSP requests.
|
@option{--ocsp-signer} is always considered valid to sign OCSP requests.
|
||||||
|
|
||||||
|
@item /etc/gnupg/extra-certs
|
||||||
@item ~/.gnupg/extra-certs
|
This directory may contain extra certificates which are preloaded
|
||||||
@itemx /var/lib/gnupg/extra-certs
|
into the interal cache on startup. Applications using dirmngr (e.g. gpgsm)
|
||||||
The first directory may contain extra certificates which are preloaded
|
can request cached certificates to complete a trust chain.
|
||||||
into the interal cache on startup.This is convenient in cases you have
|
This is convenient in cases you have a couple intermediate CA certificates
|
||||||
a couple intermediate CA certificates or certificates ususally used to
|
or certificates ususally used to sign OCSP reponses.
|
||||||
sign OCSP reponses. These certificates are first tried before going
|
These certificates are first tried before going
|
||||||
out to the net to look for them. These certificates must also be
|
out to the net to look for them. These certificates must also be
|
||||||
@acronym{DER} encoded and suffixed with @file{.crt} or @file{.der}.
|
@acronym{DER} encoded and suffixed with @file{.crt} or @file{.der}.
|
||||||
The second directory is used instead in the deprecated systems daemon
|
|
||||||
mode.
|
|
||||||
|
|
||||||
@item /var/run/gnupg
|
@item /var/run/gnupg
|
||||||
This directory is only used in the deprecated system daemon mode. It
|
This directory is only used in the deprecated system daemon mode. It
|
||||||
|
Loading…
x
Reference in New Issue
Block a user