From b98af853f211c5fd464d79f96d5bab8d5c8ef9e0 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Fri, 15 Nov 2024 08:17:02 +1000 Subject: [PATCH] Kyber: Fix wolfSSL_get_curve_name() Fix protection around Kyber hybrid strings when compiling for original with wolfSSL implementation. --- src/ssl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 1f75345200..8ed2daa277 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -14667,19 +14667,19 @@ const char* wolfSSL_get_curve_name(WOLFSSL* ssl) case WOLFSSL_P521_KYBER_LEVEL5: return "P521_KYBER_LEVEL5"; #elif defined(WOLFSSL_WC_KYBER) - #ifdef WOLFSSL_KYBER512 + #ifndef WOLFSSL_NO_KYBER512 case WOLFSSL_KYBER_LEVEL1: return "KYBER_LEVEL1"; case WOLFSSL_P256_KYBER_LEVEL1: return "P256_KYBER_LEVEL1"; #endif - #ifdef WOLFSSL_KYBER768 + #ifndef WOLFSSL_NO_KYBER768 case WOLFSSL_KYBER_LEVEL3: return "KYBER_LEVEL3"; case WOLFSSL_P384_KYBER_LEVEL3: return "P384_KYBER_LEVEL3"; #endif - #ifdef WOLFSSL_KYBER1024 + #ifndef WOLFSSL_NO_KYBER1024 case WOLFSSL_KYBER_LEVEL5: return "KYBER_LEVEL5"; case WOLFSSL_P521_KYBER_LEVEL5: