dirmngr: Add per-session verify callback to http.c
authorWerner Koch <wk@gnupg.org>
Sat, 18 Feb 2017 15:09:16 +0000 (16:09 +0100)
committerWerner Koch <wk@gnupg.org>
Sat, 18 Feb 2017 15:39:02 +0000 (16:39 +0100)
commita74902cccde539ee2bd216caec0da6eb54b67c1b
treedaa1f4d3c39dd1ce5a26b1349e593ca893679520
parentcd32ebd152a522e362469ab969d91f8d49f28a60
dirmngr: Add per-session verify callback to http.c

* dirmngr/http.h (http_verify_cb_t): New type.
* dirmngr/http.c (http_session_s): Add fields flags, verify_cb, and
verify_cb_value.
(http_session_new): Remove arg tls_priority.  Add args verify_cb and
verify-cb_value.  Store them in the session object.
(send_request): Use per-session verify callback.
(http_verify_server_credentials) [HTTP_USE_NTBTLS]: Return
GPG_ERR_NOT_IMPLEMENTED.
* dirmngr/ks-engine-hkp.c (send_request): Adjust for changed
http_session_new.
* dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
* dirmngr/t-http.c (main): Ditto.

* dirmngr/server.c (do_get_cert_local): Replace xmalloc by malloc.

Signed-off-by: Werner Koch <wk@gnupg.org>
dirmngr/http.c
dirmngr/http.h
dirmngr/ks-engine-hkp.c
dirmngr/ks-engine-http.c
dirmngr/server.c
dirmngr/t-http.c