Skip to content

Commit 2adc261

Browse files
committed
wycheproof failing PKCS7 depadding test
1 parent 332f66d commit 2adc261

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/padding_test.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,18 @@ int padding_test(void)
194194
}
195195
}
196196

197+
/* wycheproof failing test - https://github.com/libtom/libtomcrypt/pull/454 */
198+
{
199+
unsigned char data[] = { 0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
200+
unsigned long len = sizeof(data);
201+
int err;
202+
203+
err = padding_depad(data, &len, (LTC_PAD_PKCS7 | 16));
204+
if (err == CRYPT_OK) {
205+
fprintf(stderr, "XXX-FIXME padding_depad should fail (err=%d len=%lu)\n", err, len);
206+
/* return CRYPT_FAIL_TESTVECTOR; */
207+
}
208+
}
197209

198210
return CRYPT_OK;
199211
}

0 commit comments

Comments
 (0)