Skip to content

Commit 4551926

Browse files
committed
Fix inverted logic in Sphincs and Falcon
1 parent 66de1d6 commit 4551926

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9300,7 +9300,7 @@ int wc_GetKeyOID(byte* key, word32 keySz, const byte** curveOID, word32* oidSz,
93009300
if (falcon == NULL)
93019301
return MEMORY_E;
93029302

9303-
if (wc_falcon_init(falcon) != 0) {
9303+
if (wc_falcon_init(falcon) == 0) {
93049304
tmpIdx = 0;
93059305
if (wc_falcon_set_level(falcon, 1) == 0) {
93069306
if (wc_Falcon_PrivateKeyDecode(key, &tmpIdx, falcon, keySz)
@@ -9387,7 +9387,7 @@ int wc_GetKeyOID(byte* key, word32 keySz, const byte** curveOID, word32* oidSz,
93879387
if (sphincs == NULL)
93889388
return MEMORY_E;
93899389

9390-
if (wc_sphincs_init(sphincs) != 0) {
9390+
if (wc_sphincs_init(sphincs) == 0) {
93919391
tmpIdx = 0;
93929392
if (wc_sphincs_set_level_and_optim(sphincs, 1, FAST_VARIANT)
93939393
== 0) {

0 commit comments

Comments
 (0)