diff options
author | Rob Austein <sra@hactrn.net> | 2015-06-18 18:44:40 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-06-18 18:44:40 -0400 |
commit | a615b134c498f8d88e0dab047f40c7096a2f9e03 (patch) | |
tree | 48b0a15338a1d360848273f6b8c8a5b482542133 /tests | |
parent | 30e821659ae85e76082932074cc7463e80bc59b9 (diff) |
Supply public exponent as bigendian byte string rather than unsigned
long, since that's the form we'll need for PKCS #11.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-rsa.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |