Skip to content

Commit 26e5adc

Browse files
committed
Fix for keysz in 25519
1 parent e1ed52a commit 26e5adc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wh_server_crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,12 +452,12 @@ int wh_Server_CacheImportCurve25519Key(whServerContext* server,
452452
uint8_t* cacheBuf;
453453
whNvmMetadata* cacheMeta;
454454
int ret;
455-
uint16_t keySz = keySz;
456455

457456
#ifndef CURVE25519_MAX_KEY_TO_DER_SZ
458457
#define CURVE25519_MAX_KEY_TO_DER_SZ 128
459458
#endif
460459
uint8_t der_buf[CURVE25519_MAX_KEY_TO_DER_SZ];
460+
uint16_t keySz = sizeof(der_buf);
461461

462462

463463
if ((server == NULL) || (key == NULL) || (WH_KEYID_ISERASED(keyId)) ||

0 commit comments

Comments
 (0)