@@ -9997,7 +9997,7 @@ int wc_ecc_export_x963(ecc_key* key, byte* out, word32* outLen)
99979997 }
99989998
99999999 ret = wc_CryptoCb_ExportKey(key->devId, WC_PK_TYPE_ECDSA_SIGN,
10000- (void*) key, tmpKey);
10000+ key, tmpKey);
1000110001 if (ret == 0) {
1000210002 /* Call software helper (no callback recursion) */
1000310003 ret = _ecc_export_x963(tmpKey, out, outLen);
@@ -11326,7 +11326,7 @@ int wc_ecc_export_ex(ecc_key* key, byte* qx, word32* qxLen,
1132611326 }
1132711327
1132811328 err = wc_CryptoCb_ExportKey(key->devId, WC_PK_TYPE_ECDSA_SIGN,
11329- (void*) key, tmpKey);
11329+ key, tmpKey);
1133011330 if (err == 0) {
1133111331 /* Call software helper (no callback recursion) */
1133211332 err = _ecc_export_ex(tmpKey, qx, qxLen, qy, qyLen, d, dLen,
@@ -11412,7 +11412,7 @@ static int _ecc_import_private_key_ex(const byte* priv, word32 privSz,
1141211412 if (pub != NULL) {
1141311413 #ifndef NO_ASN
1141411414 word32 idx = 0;
11415- ret = wc_ecc_import_x963_ex (pub, pubSz, key, curve_id);
11415+ ret = _ecc_import_x963_ex2 (pub, pubSz, key, curve_id, 0 );
1141611416 if (ret < 0)
1141711417 ret = wc_EccPublicKeyDecode(pub, &idx, key, pubSz);
1141811418 key->type = ECC_PRIVATEKEY;
@@ -12250,7 +12250,8 @@ int wc_ecc_size(ecc_key* key)
1225012250 return 0;
1225112251 }
1225212252
12253- #ifdef WOLF_CRYPTO_CB
12253+ #if defined(WOLF_CRYPTO_CB) && \
12254+ (defined(WOLF_CRYPTO_CB_SETKEY) || defined(WOLF_CRYPTO_CB_EXPORT_KEY))
1225412255 if (key->devId != INVALID_DEVID) {
1225512256 int ret;
1225612257 int keySz = 0;
@@ -12301,7 +12302,8 @@ int wc_ecc_sig_size(const ecc_key* key)
1230112302 return 0;
1230212303 }
1230312304
12304- #ifdef WOLF_CRYPTO_CB
12305+ #if defined(WOLF_CRYPTO_CB) && \
12306+ (defined(WOLF_CRYPTO_CB_SETKEY) || defined(WOLF_CRYPTO_CB_EXPORT_KEY))
1230512307 if (key->devId != INVALID_DEVID) {
1230612308 int ret;
1230712309 int cbKeySz = 0;
0 commit comments