dirmngr: First take on ntbtls cert verification.
authorWerner Koch <wk@gnupg.org>
Sun, 19 Feb 2017 09:36:43 +0000 (10:36 +0100)
committerWerner Koch <wk@gnupg.org>
Sun, 19 Feb 2017 09:36:43 +0000 (10:36 +0100)
commit64fffd0ce2a4fd9cba152cf07497b585410cc652
treec0fc74bc3ef44fc1db161e71c55486400a9ab1fa
parenta74902cccde539ee2bd216caec0da6eb54b67c1b
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>
dirmngr/Makefile.am
dirmngr/dirmngr.c
dirmngr/dirmngr.h
dirmngr/http-ntbtls.c [new file with mode: 0644]
dirmngr/http.c
dirmngr/ks-engine-hkp.c
dirmngr/ks-engine-http.c
dirmngr/t-http.c