@@ -9990,7 +9990,7 @@ int wc_ecc_export_x963(ecc_key* key, byte* out, word32* outLen)
99909990 }
99919991
99929992 ret = wc_CryptoCb_ExportKey(key->devId, WC_PK_TYPE_ECDSA_SIGN,
9993- (void*) key, tmpKey);
9993+ key, tmpKey);
99949994 if (ret == 0) {
99959995 /* Call software helper (no callback recursion) */
99969996 ret = _ecc_export_x963(tmpKey, out, outLen);
@@ -11346,7 +11346,7 @@ int wc_ecc_export_ex(ecc_key* key, byte* qx, word32* qxLen,
1134611346 }
1134711347
1134811348 err = wc_CryptoCb_ExportKey(key->devId, WC_PK_TYPE_ECDSA_SIGN,
11349- (void*) key, tmpKey);
11349+ key, tmpKey);
1135011350 if (err == 0) {
1135111351 /* Call software helper (no callback recursion) */
1135211352 err = _ecc_export_ex(tmpKey, qx, qxLen, qy, qyLen, d, dLen,
@@ -11432,7 +11432,7 @@ static int _ecc_import_private_key_ex(const byte* priv, word32 privSz,
1143211432 if (pub != NULL) {
1143311433 #ifndef NO_ASN
1143411434 word32 idx = 0;
11435- ret = wc_ecc_import_x963_ex (pub, pubSz, key, curve_id);
11435+ ret = _ecc_import_x963_ex2 (pub, pubSz, key, curve_id, 0 );
1143611436 if (ret < 0)
1143711437 ret = wc_EccPublicKeyDecode(pub, &idx, key, pubSz);
1143811438 key->type = ECC_PRIVATEKEY;
@@ -12270,7 +12270,8 @@ int wc_ecc_size(ecc_key* key)
1227012270 return 0;
1227112271 }
1227212272
12273- #ifdef WOLF_CRYPTO_CB
12273+ #if defined(WOLF_CRYPTO_CB) && \
12274+ (defined(WOLF_CRYPTO_CB_SETKEY) || defined(WOLF_CRYPTO_CB_EXPORT_KEY))
1227412275 if (key->devId != INVALID_DEVID) {
1227512276 int ret;
1227612277 int keySz = 0;
@@ -12321,7 +12322,8 @@ int wc_ecc_sig_size(const ecc_key* key)
1232112322 return 0;
1232212323 }
1232312324
12324- #ifdef WOLF_CRYPTO_CB
12325+ #if defined(WOLF_CRYPTO_CB) && \
12326+ (defined(WOLF_CRYPTO_CB_SETKEY) || defined(WOLF_CRYPTO_CB_EXPORT_KEY))
1232512327 if (key->devId != INVALID_DEVID) {
1232612328 int ret;
1232712329 int cbKeySz = 0;
0 commit comments