tls: add USE_HTTP2 define

This abstracts across the two HTTP/2 backends: nghttp2 and Hyper.

Add our own define for the "h2" ALPN protocol, so TLS backends can use
it without depending on a specific HTTP backend.

Closes #6959
This commit is contained in:
Jacob Hoffman-Andrews 2021-04-24 18:05:15 -07:00 committed by Daniel Stenberg
parent 5c932f8fe9
commit a3268eca79
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 55 additions and 56 deletions

View file

@ -801,6 +801,10 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
#define UNITTEST static
#endif
#if defined(USE_NGHTTP2) || defined(USE_HYPER)
#define USE_HTTP2
#endif
#if defined(USE_NGTCP2) || defined(USE_QUICHE)
#define ENABLE_QUIC
#endif