summaryrefslogtreecommitdiff
path: root/testsuite/pkcs1-test.c
blob: a0521b031c4bcd5dfd103c6b4bbd3d5e1ad5ed24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "testutils.h"

#include "pkcs1.h"

int
test_main(void)
{
  uint8_t buffer[16];
  uint8_t expected[16] = { 0,    1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
			   0xff, 0xff, 0xff, 0xff, 0,    'a',  'b',  'c' };

  pkcs1_signature_prefix(sizeof(buffer), buffer,
			 3, "abc", 0);

  ASSERT(MEMEQ(sizeof(buffer), buffer, expected));

  SUCCESS();
}