From a615b134c498f8d88e0dab047f40c7096a2f9e03 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Thu, 18 Jun 2015 18:44:40 -0400 Subject: Supply public exponent as bigendian byte string rather than unsigned long, since that's the form we'll need for PKCS #11. --- tests/test-rsa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-rsa.c b/tests/test-rsa.c index 9b346b5..03ea8bb 100644 --- a/tests/test-rsa.c +++ b/tests/test-rsa.c @@ -133,7 +133,9 @@ static int test_gen(const char * const kind, const rsa_tc_t * const tc) hal_error_t err = HAL_OK; FILE *f; - if ((err = hal_rsa_key_gen(&key1, keybuf1, sizeof(keybuf1), bitsToBytes(tc->size), 0x010001)) != HAL_OK) { + const uint8_t f4[] = { 0x01, 0x00, 0x01 }; + + if ((err = hal_rsa_key_gen(&key1, keybuf1, sizeof(keybuf1), bitsToBytes(tc->size), f4, sizeof(f4))) != HAL_OK) { printf("RSA key generation failed: %s\n", hal_error_string(err)); return 0; } -- cgit v1.2.3