@@ -9989,7 +9989,7 @@ int wc_ecc_export_x963(ecc_key* key, byte* out, word32* outLen)
99899989 }
99909990
99919991 ret = wc_CryptoCb_ExportKey(key->devId, WC_PK_TYPE_ECDSA_SIGN,
9992- (void*) key, tmpKey);
9992+ key, tmpKey);
99939993 if (ret == 0) {
99949994 /* Call software helper (no callback recursion) */
99959995 ret = _ecc_export_x963(tmpKey, out, outLen);
@@ -11345,7 +11345,7 @@ int wc_ecc_export_ex(ecc_key* key, byte* qx, word32* qxLen,
1134511345 }
1134611346
1134711347 err = wc_CryptoCb_ExportKey(key->devId, WC_PK_TYPE_ECDSA_SIGN,
11348- (void*) key, tmpKey);
11348+ key, tmpKey);
1134911349 if (err == 0) {
1135011350 /* Call software helper (no callback recursion) */
1135111351 err = _ecc_export_ex(tmpKey, qx, qxLen, qy, qyLen, d, dLen,
@@ -11431,7 +11431,7 @@ static int _ecc_import_private_key_ex(const byte* priv, word32 privSz,
1143111431 if (pub != NULL) {
1143211432 #ifndef NO_ASN
1143311433 word32 idx = 0;
11434- ret = wc_ecc_import_x963_ex (pub, pubSz, key, curve_id);
11434+ ret = _ecc_import_x963_ex2 (pub, pubSz, key, curve_id, 0 );
1143511435 if (ret < 0)
1143611436 ret = wc_EccPublicKeyDecode(pub, &idx, key, pubSz);
1143711437 key->type = ECC_PRIVATEKEY;
@@ -12269,7 +12269,8 @@ int wc_ecc_size(ecc_key* key)
1226912269 return 0;
1227012270 }
1227112271
12272- #ifdef WOLF_CRYPTO_CB
12272+ #if defined(WOLF_CRYPTO_CB) && \
12273+ (defined(WOLF_CRYPTO_CB_SETKEY) || defined(WOLF_CRYPTO_CB_EXPORT_KEY))
1227312274 if (key->devId != INVALID_DEVID) {
1227412275 int ret;
1227512276 int keySz = 0;
@@ -12320,7 +12321,8 @@ int wc_ecc_sig_size(const ecc_key* key)
1232012321 return 0;
1232112322 }
1232212323
12323- #ifdef WOLF_CRYPTO_CB
12324+ #if defined(WOLF_CRYPTO_CB) && \
12325+ (defined(WOLF_CRYPTO_CB_SETKEY) || defined(WOLF_CRYPTO_CB_EXPORT_KEY))
1232412326 if (key->devId != INVALID_DEVID) {
1232512327 int ret;
1232612328 int cbKeySz = 0;
0 commit comments