Fix failing verification test formatting

This commit is contained in:
Joost Rijneveld 2017-10-30 16:36:08 +01:00
parent df9fe909fc
commit f5d53b252e
No known key found for this signature in database
GPG Key ID: A4FE39CF49CBC553
2 changed files with 5 additions and 5 deletions

View File

@ -49,7 +49,7 @@ int main()
XMSS_SIGN(sk, sm, &smlen, m, 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);
}
else {
@ -66,13 +66,13 @@ int main()
/* Test if the correct message was recovered. */
if (mlen != MLEN) {
printf(" X mlen incorrect [%llu != %u]!.\n", mlen, MLEN);
printf(" X mlen incorrect [%llu != %u]!\n", mlen, MLEN);
}
else {
printf(" mlen as expected [%llu].\n", mlen);
}
if (memcmp(m, mout, mlen)) {
printf(" X output message incorrect!.\n");
if (memcmp(m, mout, MLEN)) {
printf(" X output message incorrect!\n");
}
else {
printf(" output message as expected.\n");

View File

@ -266,7 +266,7 @@ int xmssmt_core_sign_open(const xmss_params *params,
if (memcmp(root, pk, params->n)) {
/* If not, zero the message */
memset(m, 0, *mlen);
*mlen = -1;
*mlen = 0;
return -1;
}