Home GnuPG
Diffusion GnuPG a0f7cde9daa7

dirmngr: Add option--user-agent and always use a User-Agent header.

Description

dirmngr: Add option--user-agent and always use a User-Agent header.

* dirmngr/dirmngr.h (opt): Add user_agent.
* dirmngr/dirmngr.c (oUserAgent): New.
(opts): Add "user-agent".
(parse_rereadable_options): Set option.
* dirmngr/ks-engine-hkp.c (send_request): Send User-Agent.
* dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
* dirmngr/ocsp.c (do_ocsp_request): Ditto.

Note that the http_open_document function is not used by dirmngr. If
it ever gets used we may want to add a way to configure the http.c
module with a user-agent string, so that it is send by the
send_request function and we do not need to explictly do that in the
caller.

Details

Provenance
wernerAuthored on Tue, Jul 8, 9:56 AM
Parents
rG6ec40bee2d6c: doc: Typo fixes and such
Branches
Unknown
Tags
Unknown
Tasks
T7715: Dirmngr shall send a User-Agent header