Skip to content

Commit 0ff9278

Browse files
fix for ecc init flag being set
1 parent 67c7a11 commit 0ff9278

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/api/test_lms_xmss.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,9 +865,9 @@ static int rfc9802_gen_chain(void* caKey, int caKeyType, int caSigType,
865865
ExpectNotNull(caDer = (byte*)XMALLOC(derCap, NULL, DYNAMIC_TYPE_TMP_BUFFER));
866866
ExpectNotNull(leafDer = (byte*)XMALLOC(derCap, NULL,
867867
DYNAMIC_TYPE_TMP_BUFFER));
868-
ExpectIntEQ(wc_ecc_init(&leafKey), 0);
869-
if (EXPECT_SUCCESS()) /* only flag for free if init ran and succeeded */
868+
if (wc_ecc_init(&leafKey) == 0) /* only flag for free if init succeeded */
870869
leafKeyInit = 1;
870+
ExpectIntEQ(leafKeyInit, 1);
871871
ExpectIntEQ(wc_ecc_make_key(rng, 32, &leafKey), 0);
872872

873873
/* Self-signed CA root. */

0 commit comments

Comments
 (0)