From 62dca90e74ff8bceb227ee88201054cf9c63028c Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 16 Oct 2020 11:02:54 -0700 Subject: [PATCH] Fix for server-side reporting of curve in `wolfSSL_get_curve_name` if client_hello includes ffdhe, but ECC curve is used. --- src/internal.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/internal.c b/src/internal.c index 0e6d02b11..458260336 100644 --- a/src/internal.c +++ b/src/internal.c @@ -29398,6 +29398,13 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, ssl->arrays->preMasterSz = private_key->dp->size; ssl->peerEccKeyPresent = 1; + + #if defined(WOLFSSL_TLS13) || defined(HAVE_FFDHE) + /* client_hello may have sent FFEDH2048, which sets namedGroup, + but that is not being used, so clear it */ + /* resolves issue with server side wolfSSL_get_curve_name */ + ssl->namedGroup = 0; + #endif #endif /* HAVE_ECC */ break;