Home GnuPG
Diffusion GnuPG f4b72c4eb7f3

dirmngr: Cleanup the http module.

Description

dirmngr: Cleanup the http module.

* configure.ac (NEED_NTBTLS_VERSION): Require at least 0.2.0 so that
we can remove a conditional compilation.
* dirmngr/http.c (struct proxy_info_s): New.
(release_proxy_info): New to keep proxy information in one object.
(send_request): Factor some code out to ...
(get_proxy_for_url): this,
(send_request_basic_checks): this,
(send_request_set_sni): this,
(run_ntbtls_handshake): this,
(run_gnutls_handshake): and this.

Note that this also removes some never used code. For example the
NTBTLS handshake has code taken from GNUTLS which was never used due
to the different ways on how the certificates are checked.

The proxy code has been factored out to make to prepare further
authentication methods. The proxy_info_t was introduced for the same
reason.

Tested against gnutls and ntbtls builds. No proxy tests yet done,
because we need more sophisticated tests anyway.

Details

Provenance
wernerAuthored on Sep 18 2023, 5:37 PM
Parents
rGde84c58d90a7: gpg: Fix --no-utf8-strings.
Branches
Unknown
Tags
Unknown
Tasks
T5768: Dirmngr: Use windows proxy settings if system proxy settings should be used