Fix failing verification test formatting
This commit is contained in:
parent
df9fe909fc
commit
f5d53b252e
@ -49,7 +49,7 @@ int main()
|
|||||||
XMSS_SIGN(sk, sm, &smlen, m, MLEN);
|
XMSS_SIGN(sk, sm, &smlen, m, MLEN);
|
||||||
|
|
||||||
if (smlen != params.sig_bytes + MLEN) {
|
if (smlen != params.sig_bytes + MLEN) {
|
||||||
printf(" X smlen incorrect [%llu != %u]!.\n",
|
printf(" X smlen incorrect [%llu != %u]!\n",
|
||||||
smlen, params.sig_bytes);
|
smlen, params.sig_bytes);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -66,13 +66,13 @@ int main()
|
|||||||
|
|
||||||
/* Test if the correct message was recovered. */
|
/* Test if the correct message was recovered. */
|
||||||
if (mlen != MLEN) {
|
if (mlen != MLEN) {
|
||||||
printf(" X mlen incorrect [%llu != %u]!.\n", mlen, MLEN);
|
printf(" X mlen incorrect [%llu != %u]!\n", mlen, MLEN);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf(" mlen as expected [%llu].\n", mlen);
|
printf(" mlen as expected [%llu].\n", mlen);
|
||||||
}
|
}
|
||||||
if (memcmp(m, mout, mlen)) {
|
if (memcmp(m, mout, MLEN)) {
|
||||||
printf(" X output message incorrect!.\n");
|
printf(" X output message incorrect!\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf(" output message as expected.\n");
|
printf(" output message as expected.\n");
|
||||||
|
@ -266,7 +266,7 @@ int xmssmt_core_sign_open(const xmss_params *params,
|
|||||||
if (memcmp(root, pk, params->n)) {
|
if (memcmp(root, pk, params->n)) {
|
||||||
/* If not, zero the message */
|
/* If not, zero the message */
|
||||||
memset(m, 0, *mlen);
|
memset(m, 0, *mlen);
|
||||||
*mlen = -1;
|
*mlen = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user