2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Make isc_nm_tlssocket non-optional

This commit unties generic TLS code (isc_nm_tlssocket) from DoH, so
that it will be available regardless of the fact if BIND was built
with DNS over HTTP support or not.
This commit is contained in:
Artem Boldariev
2022-10-18 15:36:00 +03:00
parent efe4267044
commit 4524bf4083
4 changed files with 22 additions and 50 deletions

View File

@@ -753,7 +753,6 @@ typedef enum {
STATID_MAX = 11,
} isc__nm_statid_t;
#if HAVE_LIBNGHTTP2
typedef struct isc_nmsocket_tls_send_req {
isc_nmsocket_t *tlssock;
isc_region_t data;
@@ -764,6 +763,8 @@ typedef struct isc_nmsocket_tls_send_req {
uint8_t smallbuf[512];
} isc_nmsocket_tls_send_req_t;
#if HAVE_LIBNGHTTP2
typedef enum isc_http_request_type {
ISC_HTTP_REQ_GET,
ISC_HTTP_REQ_POST,
@@ -901,7 +902,6 @@ struct isc_nmsocket {
const char *tls_verify_errmsg;
} tls;
#if HAVE_LIBNGHTTP2
/*% TLS stuff */
struct tlsstream {
bool server;
@@ -927,6 +927,7 @@ struct isc_nmsocket {
bool tcp_nodelay_value;
} tlsstream;
#if HAVE_LIBNGHTTP2
isc_nmsocket_h2_t h2;
#endif /* HAVE_LIBNGHTTP2 */
@@ -1542,7 +1543,6 @@ isc__nm_tlsdns_xfr_allowed(isc_nmsocket_t *sock);
void
isc__nm_tlsdns_cleanup_data(isc_nmsocket_t *sock);
#if HAVE_LIBNGHTTP2
void
isc__nm_tls_send(isc_nmhandle_t *handle, const isc_region_t *region,
isc_nm_cb_t cb, void *cbarg);
@@ -1629,6 +1629,8 @@ isc__nmhandle_tls_get_selected_alpn(isc_nmhandle_t *handle,
isc_result_t
isc__nmhandle_tls_set_tcp_nodelay(isc_nmhandle_t *handle, const bool value);
#if HAVE_LIBNGHTTP2
void
isc__nm_http_stoplistening(isc_nmsocket_t *sock);