diff options
| author | Werner Koch <[email protected]> | 2016-04-26 19:57:56 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2016-04-26 19:57:56 +0000 |
| commit | fd765df6a7883c3d841abeb657330a1aab4b7756 (patch) | |
| tree | 9f267dcc9800f1aa3461948079c767a5fe6d86d4 /dirmngr/http.h | |
| parent | gpg: Add OpenPGP card vendor 0x2342. (diff) | |
| download | gnupg-fd765df6a7883c3d841abeb657330a1aab4b7756.tar.gz gnupg-fd765df6a7883c3d841abeb657330a1aab4b7756.zip | |
http: Allow to request system defined CAs for TLS.
* dirmngr/http.h (HTTP_FLAG_TRUST_DEF, HTTP_FLAG_TRUST_SYS): New.
* dirmngr/http.c (http_session_new): Add arg "flags".
* dirmngr/ks-engine-hkp.c (send_request): Use new flag
HTTP_FLAG_TRUST_DEF for the new arg of http_session_new.
* dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
* dirmngr/t-http.c (main): Ditto.
--
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/http.h')
| -rw-r--r-- | dirmngr/http.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dirmngr/http.h b/dirmngr/http.h index 58b8c1ac7..569ccea0e 100644 --- a/dirmngr/http.h +++ b/dirmngr/http.h @@ -80,11 +80,13 @@ enum HTTP_FLAG_TRY_PROXY = 1, /* Try to use a proxy. */ HTTP_FLAG_SHUTDOWN = 2, /* Close sending end after the request. */ HTTP_FLAG_FORCE_TOR = 4, /* Force a TOR connection. */ - HTTP_FLAG_LOG_RESP = 8, /* Log the server respone. */ + HTTP_FLAG_LOG_RESP = 8, /* Log the server response. */ HTTP_FLAG_FORCE_TLS = 16, /* Force the use of TLS. */ HTTP_FLAG_IGNORE_CL = 32, /* Ignore content-length. */ HTTP_FLAG_IGNORE_IPv4 = 64, /* Do not use IPv4. */ - HTTP_FLAG_IGNORE_IPv6 = 128 /* Do not use IPv6. */ + HTTP_FLAG_IGNORE_IPv6 = 128, /* Do not use IPv6. */ + HTTP_FLAG_TRUST_DEF = 256, /* Use the default CAs. */ + HTTP_FLAG_TRUST_SYS = 512 /* Also use the system defined CAs. */ }; @@ -99,7 +101,8 @@ void http_register_tls_ca (const char *fname); gpg_error_t http_session_new (http_session_t *r_session, const char *tls_priority, - const char *intended_hostname); + const char *intended_hostname, + unsigned int flags); http_session_t http_session_ref (http_session_t sess); void http_session_release (http_session_t sess); |
