Skip to content

Commit 6efbacf

Browse files
authored
Merge pull request #10416 from jackctj117/v6-fix
fix: guard wc_Ed448PublicKeyToDer ed448_export_public call for FIPS<7
2 parents aeeb98c + a3799cf commit 6efbacf

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
@@ -12928,7 +12928,11 @@ int wc_Ed448PublicKeyToDer(const ed448_key* key, byte* output, word32 inLen,
1292812928
return BAD_FUNC_ARG;
1292912929
}
1293012930

12931+
#if defined(HAVE_FIPS) && FIPS_VERSION3_LT(7,0,0)
12932+
ret = wc_ed448_export_public((ed448_key *)key, pubKey, &pubKeyLen);
12933+
#else
1293112934
ret = wc_ed448_export_public(key, pubKey, &pubKeyLen);
12935+
#endif
1293212936
if (ret == 0) {
1293312937
ret = SetAsymKeyDerPublic(pubKey, pubKeyLen, output, inLen,
1293412938
ED448k, withAlg);

0 commit comments

Comments
 (0)