From b14c227e81e60d9d87b6a56074d47f8b92727db8 Mon Sep 17 00:00:00 2001 From: dartraiden Date: Wed, 4 Jun 2025 10:22:08 +0300 Subject: libcurl: update to 8.14.1 --- libs/libcurl/src/vtls/wolfssl.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'libs/libcurl/src/vtls/wolfssl.c') diff --git a/libs/libcurl/src/vtls/wolfssl.c b/libs/libcurl/src/vtls/wolfssl.c index fad04a997f..0971895859 100644 --- a/libs/libcurl/src/vtls/wolfssl.c +++ b/libs/libcurl/src/vtls/wolfssl.c @@ -299,9 +299,11 @@ static long wssl_bio_cf_ctrl(WOLFSSL_BIO *bio, int cmd, long num, void *ptr) ret = 1; break; #ifdef WOLFSSL_BIO_CTRL_EOF - case WOLFSSL_BIO_CTRL_EOF: + case WOLFSSL_BIO_CTRL_EOF: { /* EOF has been reached on input? */ - return !cf->next || !cf->next->connected; + struct ssl_connect_data *connssl = cf->ctx; + return connssl->peer_closed; + } #endif default: ret = 0; @@ -509,7 +511,7 @@ static CURLcode wssl_on_session_reuse(struct Curl_cfilter *cf, *do_early_data = FALSE; #ifdef WOLFSSL_EARLY_DATA connssl->earlydata_max = wolfSSL_SESSION_get_max_early_data( - wolfSSL_get_session(wssl->ssl)); + wolfSSL_get_session(wssl->ssl)); #else (void)wssl; connssl->earlydata_max = 0; @@ -574,11 +576,19 @@ wssl_setup_session(struct Curl_cfilter *cf, if(result) goto out; } +#ifdef WOLFSSL_EARLY_DATA if(do_early_data) { + unsigned int edmax = (scs->earlydata_max < UINT_MAX) ? + (unsigned int)scs->earlydata_max : UINT_MAX; /* We only try the ALPN protocol the session used before, * otherwise we might send early data for the wrong protocol */ Curl_alpn_restrict_to(alpns, scs->alpn); + wolfSSL_set_max_early_data(wss->ssl, edmax); } +#else + /* Should never enable when not supported */ + DEBUGASSERT(!do_early_data); +#endif } } wolfSSL_SESSION_free(session); @@ -931,14 +941,6 @@ wssl_legacy_CTX_set_max_proto_version(WOLFSSL_CTX* ctx, int version) "POLY1305_SHA256:TLS_AES_128_CCM_SHA256" #define QUIC_GROUPS "P-256:P-384:P-521" -#if defined(HAVE_SECRET_CALLBACK) -static void keylog_callback(const WOLFSSL *ssl, const char *line) -{ - (void)ssl; - Curl_tls_keylog_write_line(line); -} -#endif - CURLcode Curl_wssl_ctx_init(struct wssl_ctx *wctx, struct Curl_cfilter *cf, struct Curl_easy *data, -- cgit v1.2.3