diff options
author | Werner Koch <[email protected]> | 2014-05-02 13:37:02 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-05-02 15:28:02 +0000 |
commit | 0e59195642eb26263b8e0b9200290538631d35cd (patch) | |
tree | 111943e8a19b2ebf2dbc10b665458a8b73f2ceb2 /common/http.h | |
parent | common: Fix test for openpgp_oid_is_ed25519. (diff) | |
download | gnupg-0e59195642eb26263b8e0b9200290538631d35cd.tar.gz gnupg-0e59195642eb26263b8e0b9200290538631d35cd.zip |
http: Add HTTP_FLAG_FORCE_TLS and http_get_tls_info.
* common/http.c (http_parse_uri): Factor code out to ...
(parse_uri): here. Add arg FORCE_TLS.
(do_parse_uri): Ditto. Implement flag.
(http_get_tls_info): New.
(http_register_tls_ca): Allow clearing of the list.
(send_request): Use a default verification function.
* common/http.h (HTTP_FLAG_FORCE_TLS): New.
* common/t-http.c (main): Add several command line options.
Diffstat (limited to 'common/http.h')
-rw-r--r-- | common/http.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/http.h b/common/http.h index e38fadcf4..fa73b6e59 100644 --- a/common/http.h +++ b/common/http.h @@ -77,6 +77,7 @@ enum HTTP_FLAG_TRY_PROXY = 1, /* Try to use a proxy. */ HTTP_FLAG_SHUTDOWN = 2, /* Close sending end after the request. */ HTTP_FLAG_LOG_RESP = 8, /* Log the server respone. */ + HTTP_FLAG_FORCE_TLS = 16, /* Force the use opf 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. */ @@ -133,6 +134,7 @@ gpg_error_t http_open_document (http_t *r_hd, estream_t http_get_read_ptr (http_t hd); estream_t http_get_write_ptr (http_t hd); unsigned int http_get_status_code (http_t hd); +const char *http_get_tls_info (http_t hd, const char *what); const char *http_get_header (http_t hd, const char *name); const char **http_get_header_names (http_t hd); gpg_error_t http_verify_server_credentials (http_session_t sess); |