mirror of
https://github.com/curl/curl.git
synced 2025-04-12 16:20:35 +08:00
mbedtls: remove 'protocols' array from backend when ALPN is not used
Closes #8663
This commit is contained in:
parent
fda4b81635
commit
266627b0bc
@ -70,6 +70,14 @@
|
||||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
/* ALPN for http2 */
|
||||
#ifdef USE_HTTP2
|
||||
# undef HAS_ALPN
|
||||
# ifdef MBEDTLS_SSL_ALPN
|
||||
# define HAS_ALPN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
struct ssl_backend_data {
|
||||
mbedtls_ctr_drbg_context ctr_drbg;
|
||||
mbedtls_entropy_context entropy;
|
||||
@ -82,7 +90,9 @@ struct ssl_backend_data {
|
||||
#endif
|
||||
mbedtls_pk_context pk;
|
||||
mbedtls_ssl_config config;
|
||||
#ifdef HAS_ALPN
|
||||
const char *protocols[3];
|
||||
#endif
|
||||
};
|
||||
|
||||
/* apply threading? */
|
||||
@ -144,14 +154,6 @@ static void mbed_debug(void *context, int level, const char *f_name,
|
||||
#else
|
||||
#endif
|
||||
|
||||
/* ALPN for http2 */
|
||||
#ifdef USE_HTTP2
|
||||
# undef HAS_ALPN
|
||||
# ifdef MBEDTLS_SSL_ALPN
|
||||
# define HAS_ALPN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* profile
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user