Kaynağa Gözat

Fix failing verification test formatting

master
Joost Rijneveld 7 yıl önce
ebeveyn
işleme
f5d53b252e
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: A4FE39CF49CBC553
2 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. +4
    -4
      test/xmss.c
  2. +1
    -1
      xmss_commons.c

+ 4
- 4
test/xmss.c Dosyayı Görüntüle

@@ -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");


+ 1
- 1
xmss_commons.c Dosyayı Görüntüle

@@ -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;
}



Yükleniyor…
İptal
Kaydet