From 3a9d463ef4e014e1831b6065bc976793bda4bbdb Mon Sep 17 00:00:00 2001 From: David Garske Date: Wed, 25 Aug 2021 09:57:10 -0700 Subject: [PATCH] Fix use of hardcoded number and added comment. --- src/ssl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index 0ac1b0b7d..1320f5d00 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -8434,7 +8434,9 @@ WOLFSSL_EVP_PKEY* wolfSSL_d2i_PrivateKey_id(int type, WOLFSSL_EVP_PKEY** out, key = (ecc_key*)local->ecc->internal; key->devId = devId; key->type = ECC_PRIVATEKEY; - wc_ecc_set_curve(key, 32, ECC_CURVE_DEF); + /* key is required to have a key size / curve set, although + * actual one used is determined by devId callback function */ + wc_ecc_set_curve(key, ECDHE_SIZE, ECC_CURVE_DEF); local->ecc->inSet = 1; break;