Skip to content

Commit adb4534

Browse files
committed
Remove unnused code in key wrap test. Use client id in sample meta data
1 parent d6f31be commit adb4534

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

test/wh_test_keywrap.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,6 @@
5454

5555
#endif /* HAVE_AESGCM */
5656

57-
/* RSA Specific defines */
58-
#ifndef NO_RSA
59-
60-
#define WH_TEST_RSA_KEY_OFFSET 0x2000
61-
#define WH_TEST_RSA_KEYID 3
62-
#define WH_TEST_RSA_MAX_DER_SIZE 2000
63-
64-
/* We need the extra 4 bytes at the start to store the actual wrapped key size
65-
*/
66-
#define WH_TEST_RSA_MAX_WRAPPED_KEYSIZE \
67-
(sizeof(uint32_t) + WH_TEST_AES_IVSIZE + WH_TEST_AES_TAGSIZE + \
68-
WH_TEST_RSA_MAX_DER_SIZE + sizeof(whNvmMetadata))
69-
#endif /* !NO_RSA */
70-
7157
static int _InitServerKek(whClientContext* client)
7258
{
7359
/* IMPORTANT NOTE: Server KEK is typically intrinsic or set during
@@ -101,7 +87,7 @@ static int _AesGcm_KeyWrap(whClientContext* client, WC_RNG* rng)
10187
uint8_t wrappedKey[WH_TEST_AES_WRAPPED_KEYSIZE];
10288
whKeyId wrappedKeyId;
10389
whNvmMetadata metadata = {
104-
.id = WH_MAKE_KEYID(WH_KEYTYPE_CRYPTO, 0, WH_TEST_AESGCM_KEYID),
90+
.id = WH_MAKE_KEYID(WH_KEYTYPE_CRYPTO, client->comm->client_id, WH_TEST_AESGCM_KEYID),
10591
.label = "AES Key Label",
10692
.len = WH_TEST_AES_KEYSIZE,
10793
.flags = WH_NVM_FLAGS_NONE,

0 commit comments

Comments
 (0)