Skip to content

Commit

Permalink
Improve RSAPSS usage example (#425)
Browse files Browse the repository at this point in the history
Case analysis of invlaid key arguments.
  • Loading branch information
ma-ilsi committed Sep 27, 2023
1 parent fa64094 commit 27f40b2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/rsapss.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,17 @@ TEST(ApiSuite, ApiTest)
generate_rsapss_key(&e, &eBits, &d, &dBits, &mod, &modBits);
uint64_t* skey =
Hacl_RSAPSS_new_rsapss_load_skey(modBits, eBits, dBits, mod, e, d);

if (skey == NULL) {
//Error
}

uint64_t* pkey = Hacl_RSAPSS_new_rsapss_load_pkey(modBits, eBits, mod, e);

if (pkey == NULL) {
//Error
}

// Message
const char* msg = "Hello, World!";
size_t msgLen = strlen(msg);
Expand Down

0 comments on commit 27f40b2

Please sign in to comment.