From 4412496adbe8e227c6db32444bd50d7fb3bbf330 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Wed, 23 Mar 2022 11:20:04 +0100 Subject: [PATCH] Prefer status_request_v2 over status_request when both are present Reported in https://github.com/wolfSSL/wolfssl/issues/4970 --- src/tls.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tls.c b/src/tls.c index 719ccfa3c..449d97acf 100644 --- a/src/tls.c +++ b/src/tls.c @@ -3506,10 +3506,13 @@ static int TLSX_CSR2_Parse(WOLFSSL* ssl, const byte* input, word16 length, continue; } - /* if using status_request and already sending it, skip this one */ + /* if using status_request and already sending it, remove it + * and prefer to use the v2 version */ #ifdef HAVE_CERTIFICATE_STATUS_REQUEST - if (ssl->status_request) - return 0; + if (ssl->status_request) { + ssl->status_request = 0; + TLSX_Remove(&ssl->extensions, TLSX_STATUS_REQUEST, ssl->heap); + } #endif /* TLS 1.3 servers MUST NOT act upon presence or information in