mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
dirmngr: First take on ntbtls cert verification.
* dirmngr/http-ntbtls.c: New. * dirmngr/Makefile.am (dirmngr_SOURCES): Add file. * dirmngr/dirmngr.h (SERVER_CONTROL_MAGIC): New. (server_conrol_s): Add field 'magic', * dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Set MAGIC. (dirmngr_deinit_default_ctrl): Set MAGIC to deadbeef. * dirmngr/http.c (my_ntbtls_verify_cb): New. (http_session_new) [HTTP_USE_NTBTLS]: Remove all CA setting code. (send_request) [HTTP_USE_NTBTLS]: Set the verify callback. Do not call the verify callback after the handshake. * dirmngr/ks-engine-hkp.c (send_request): Pass gnupg_http_tls_verify_cb to http_session_new. * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto. * dirmngr/t-http.c (my_http_tls_verify_cb): New. (main): Rename option --gnutls-debug to --tls-debug. (main) [HTTP_USE_NTBTLS]: Create a session. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
a74902cccd
commit
64fffd0ce2
8 changed files with 233 additions and 93 deletions
|
@ -77,7 +77,7 @@ ks_http_fetch (ctrl_t ctrl, const char *url, estream_t *r_fp)
|
|||
/* Note that we only use the system provided certificates with the
|
||||
* fetch command. */
|
||||
err = http_session_new (&session, NULL, HTTP_FLAG_TRUST_SYS,
|
||||
NULL, ctrl);
|
||||
gnupg_http_tls_verify_cb, ctrl);
|
||||
if (err)
|
||||
goto leave;
|
||||
http_session_set_log_cb (session, cert_log_cb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue