2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

TLS code refactoring, fixes and unit-tests

This commit fixes numerous stability issues with TLS transport code as
well as adds unit tests for it.
This commit is contained in:
Artem Boldariev
2021-03-10 14:30:16 +02:00
parent 01cd310407
commit 11ed7aac5d
8 changed files with 1221 additions and 188 deletions

View File

@@ -816,23 +816,22 @@ struct isc_nmsocket {
/*% TLS stuff */
struct tlsstream {
bool server;
BIO *app_bio;
BIO *bio_in;
BIO *bio_out;
isc_tls_t *tls;
isc_tlsctx_t *ctx;
BIO *ssl_bio;
isc_nmsocket_t *tlslistener;
isc_nmiface_t server_iface;
isc_nmiface_t local_iface;
bool connect_from_networker;
atomic_bool result_updated;
enum {
TLS_INIT,
TLS_HANDSHAKE,
TLS_IO,
TLS_CLOSING,
TLS_CLOSED
} state; /*%< The order of these is significant */
size_t nsending;
bool reading;
} tlsstream;
isc_nmsocket_h2_t h2;