[Title] Add packaging/nettle.spec to build nettle on OBS system
[external/nettle.git] / testsuite / pkcs1-test.c
1 #include "testutils.h"
2
3 #include "pkcs1.h"
4
5 int
6 test_main(void)
7 {
8   uint8_t buffer[16];
9   uint8_t expected[16] = {    1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
10                            0xff, 0xff, 0xff, 0xff, 0,    'a',  'b',  'c' };
11
12   pkcs1_signature_prefix(sizeof(buffer), buffer,
13                          3, "abc", 0);
14
15   ASSERT(MEMEQ(sizeof(buffer), buffer, expected));
16
17   SUCCESS();
18 }