diff options
author | Daiki Ueno <dueno@redhat.com> | 2020-03-25 22:49:02 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-03-31 14:39:00 +0200 |
commit | 0736ee73d346a521ad10c9bcce5839386a1cc47a (patch) | |
tree | 0dd0aa1e74d8324715f8f07f92f26f0f1575f5f9 /lib/vquic/ngtcp2.h | |
parent | e37dc71eaeb40b37c4c6a2dce2f9daf925f23118 (diff) |
vquic: add support for GnuTLS backend of ngtcp2
Currently, the TLS backend used by vquic/ngtcp2.c is selected at compile
time. Therefore OpenSSL support needs to be explicitly disabled.
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Closes #5148
Diffstat (limited to 'lib/vquic/ngtcp2.h')
-rw-r--r-- | lib/vquic/ngtcp2.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/vquic/ngtcp2.h b/lib/vquic/ngtcp2.h index 30d442fdd..862a00107 100644 --- a/lib/vquic/ngtcp2.h +++ b/lib/vquic/ngtcp2.h @@ -28,7 +28,11 @@ #include <ngtcp2/ngtcp2.h> #include <nghttp3/nghttp3.h> +#ifdef USE_OPENSSL #include <openssl/ssl.h> +#elif defined(USE_GNUTLS) +#include <gnutls/gnutls.h> +#endif struct quic_handshake { char *buf; /* pointer to the buffer */ @@ -44,8 +48,13 @@ struct quicsocket { ngtcp2_cid scid; uint32_t version; ngtcp2_settings settings; +#ifdef USE_OPENSSL SSL_CTX *sslctx; SSL *ssl; +#elif defined(USE_GNUTLS) + gnutls_certificate_credentials_t cred; + gnutls_session_t ssl; +#endif struct quic_handshake crypto_data[3]; /* the last TLS alert description generated by the local endpoint */ uint8_t tls_alert; |