From a3799cffda8ec650b024fff686c132d808582195 Mon Sep 17 00:00:00 2001 From: jackctj117 Date: Wed, 6 May 2026 14:09:56 -0600 Subject: [PATCH] fix: guard wc_Ed448PublicKeyToDer ed448_export_public call for FIPS<7 --- wolfcrypt/src/asn.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index d01420d769..dc0cd4f488 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -12931,7 +12931,11 @@ int wc_Ed448PublicKeyToDer(const ed448_key* key, byte* output, word32 inLen, return BAD_FUNC_ARG; } + #if defined(HAVE_FIPS) && FIPS_VERSION3_LT(7,0,0) + ret = wc_ed448_export_public((ed448_key *)key, pubKey, &pubKeyLen); + #else ret = wc_ed448_export_public(key, pubKey, &pubKeyLen); + #endif if (ret == 0) { ret = SetAsymKeyDerPublic(pubKey, pubKeyLen, output, inLen, ED448k, withAlg);