mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
dirmngr: Implement CRL fetching via https.
* dirmngr/http.h (HTTP_FLAG_TRUST_CFG): New flag. * dirmngr/http.c (http_register_cfg_ca): New. (http_session_new) [HTTP_USE_GNUTLS]: Implement new trust flag. * dirmngr/certcache.c (load_certs_from_dir): Call new function. (cert_cache_deinit): Ditto. * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Ditto. * dirmngr/ks-engine-http.c (ks_http_fetch): Add new args 'send_no_cache' and 'extra_http_trust_flags'. Change all callers to provide the default value. * dirmngr/crlfetch.c (crl_fetch): Rewrite to make use of ks_http_fetch. -- The old code simply did not use https for downloading of CRLS. Instead it rewrote https to http under the assumption that the CRL service was also available without encryption. Note that a CRL is self-standing and thus it does not need to have extra authenticity as provided by TLS. These days we should not use any unencrypted content and thus this patch. Be aware that cacert.org give a https CRL DP but that currently redirects to to http! This is a downgrade attack which we detect and don't allow. The outcome is that it is right now not possible to use CAcert certificates. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
71903eee89
commit
705d8e9cf0
10 changed files with 131 additions and 129 deletions
|
@ -87,13 +87,15 @@ gnupg_http_tls_verify_cb (void *opaque,
|
|||
}
|
||||
else /* Use the certificates as requested from the HTTP module. */
|
||||
{
|
||||
if ((http_flags & HTTP_FLAG_TRUST_CFG))
|
||||
validate_flags |= VALIDATE_FLAG_TRUST_CONFIG;
|
||||
if ((http_flags & HTTP_FLAG_TRUST_DEF))
|
||||
validate_flags |= VALIDATE_FLAG_TRUST_HKP;
|
||||
if ((http_flags & HTTP_FLAG_TRUST_SYS))
|
||||
validate_flags |= VALIDATE_FLAG_TRUST_SYSTEM;
|
||||
|
||||
/* If HKP trust is requested and there are no HKP certificates
|
||||
* configured, also try thye standard system certificates. */
|
||||
* configured, also try the standard system certificates. */
|
||||
if ((validate_flags & VALIDATE_FLAG_TRUST_HKP)
|
||||
&& !cert_cache_any_in_class (CERTTRUST_CLASS_HKP))
|
||||
validate_flags |= VALIDATE_FLAG_TRUST_SYSTEM;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue