aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dirmngr.c
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <[email protected]>2016-10-27 22:30:57 +0000
committerWerner Koch <[email protected]>2016-11-17 14:29:35 +0000
commitc4e02a3b7ad6ee1da6bfc439921378bdbd5c029c (patch)
treeb848f775a60bc78bc7948db5791e6a98927e2669 /dirmngr/dirmngr.c
parentdoc: Typo fixes. (diff)
downloadgnupg-c4e02a3b7ad6ee1da6bfc439921378bdbd5c029c.tar.gz
gnupg-c4e02a3b7ad6ee1da6bfc439921378bdbd5c029c.zip
dirmngr: Register hkp-cacert even if the file doesn't exist yet
* dirmngr/dirmngr.c (parse_readable_options): If we're unable to turn an argument for hkp-cacert into an absolute filename, terminate completely. * dirmngr/http.c (http_register_tls_ca): Show a warning if file is not immediately accessible, but register it anyway. -- Without this changeset, the condition of the filesystem when dirmngr is initialized will have an effect on later activities of dirmngr. For example, if a file identified by a hkp-cacert directive doesn't exist when dirmngr starts, dirmngr will behave as though it simply didn't have the hkp-cacert directive set at all, even if the file should appear later. dirmngr currently behaves differently if no hkp-cacert directives have been set then it does when at least one hkp-cacert directive has been set. For example, its choice of CA cert for hkps://hkps.pool.sks-keyservers.net depends on whether a TLS CA file has been registered. That behavior shouldn't additionally depend on the state of the filesystem at the time of dirmngr launch. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
Diffstat (limited to 'dirmngr/dirmngr.c')
-rw-r--r--dirmngr/dirmngr.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 9d4fb1474..f5dce811f 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -611,15 +611,9 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread)
{
char *tmpname;
- /* Do tilde expansion and print a warning if the file can't be
- accessed. */
- tmpname = make_absfilename_try (pargs->r.ret_str, NULL);
- if (!tmpname || access (tmpname, F_OK))
- log_info (_("can't access '%s': %s\n"),
- tmpname? tmpname : pargs->r.ret_str,
- gpg_strerror (gpg_error_from_syserror()));
- else
- http_register_tls_ca (tmpname);
+ /* Do tilde expansion and make path absolute. */
+ tmpname = make_absfilename (pargs->r.ret_str, NULL);
+ http_register_tls_ca (tmpname);
xfree (tmpname);
}
break;