Skip to content

Commit a3799cf

Browse files
committed
fix: guard wc_Ed448PublicKeyToDer ed448_export_public call for FIPS<7
1 parent 545376c commit a3799cf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12931,7 +12931,11 @@ int wc_Ed448PublicKeyToDer(const ed448_key* key, byte* output, word32 inLen,
1293112931
return BAD_FUNC_ARG;
1293212932
}
1293312933

12934+
#if defined(HAVE_FIPS) && FIPS_VERSION3_LT(7,0,0)
12935+
ret = wc_ed448_export_public((ed448_key *)key, pubKey, &pubKeyLen);
12936+
#else
1293412937
ret = wc_ed448_export_public(key, pubKey, &pubKeyLen);
12938+
#endif
1293512939
if (ret == 0) {
1293612940
ret = SetAsymKeyDerPublic(pubKey, pubKeyLen, output, inLen,
1293712941
ED448k, withAlg);

0 commit comments

Comments
 (0)