Skip to content

Commit 22e2aa3

Browse files
committed
Fix for ECDHE
1 parent de26517 commit 22e2aa3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

stsafe/wolfssl_stsafe_full_test.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static int test_ecdh_p256(void)
218218
int i;
219219

220220
printf("\nTest: ECDH P-256 Key Exchange (HW + SW)\n");
221-
printf(" Note: STSAFE key used for one side, software for other\n");
221+
printf(" Note: STSAFE key (ephemeral slot 0xFF) for one side, software for other\n");
222222

223223
ret = wc_InitRng(&rng);
224224
if (ret != 0) {
@@ -236,6 +236,9 @@ static int test_ecdh_p256(void)
236236
return -1;
237237
}
238238

239+
/* Configure hardware key for ECDH - uses ephemeral slot 0xFF */
240+
keyHW.devCtx = (void*)(uintptr_t)STSAFE_KEY_SLOT_EPHEMERAL;
241+
239242
/* Initialize software key (INVALID_DEVID for software) */
240243
ret = wc_ecc_init_ex(&keySW, NULL, INVALID_DEVID);
241244
if (ret != 0) {

0 commit comments

Comments
 (0)