Skip to content
Snippets Groups Projects
Commit ef49f309 authored by Niels Möller's avatar Niels Möller
Browse files

* testsuite/Makefile.am (TS_PROGS): Added pkcs1-test.

* testsuite/pkcs1-test.c: New test.

Rev: src/nettle/testsuite/.cvsignore:1.22
Rev: src/nettle/testsuite/Makefile.am:1.37
Rev: src/nettle/testsuite/pkcs1-test.c:1.1
parent c6a942a9
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ hmac-test
knuth-lfib-test
md5-compat-test
md5-test
pkcs1-test
rsa-keygen-test
rsa-test
rsa2sexp-test
......
......@@ -19,6 +19,7 @@
/knuth-lfib-test
/md5-compat-test
/md5-test
/pkcs1-test
/rsa-keygen-test
/rsa-test
/rsa2sexp-test
......
......@@ -14,6 +14,7 @@ TS_PROGS = aes-test arcfour-test blowfish-test cast128-test \
rsa2sexp-test sexp2rsa-test \
knuth-lfib-test \
cbc-test hmac-test bignum-test \
pkcs1-test \
rsa-test rsa-keygen-test \
dsa-test dsa-keygen-test \
yarrow-test
......
#include "testutils.h"
#include "pkcs1.h"
int
test_main(void)
{
#if WITH_PUBLIC_KEY
uint8_t buffer[16];
uint8_t expected[16] = { 1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0, 'a', 'b', 'c' };
pkcs1_signature_prefix(sizeof(buffer), buffer,
3, "abc");
ASSERT(MEMEQ(sizeof(buffer), buffer, expected));
SUCCESS();
#else /* !WITH_PUBLIC_KEY */
SKIP();
#endif /* !WITH_PUBLIC_KEY */
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment