forked from wolfSSL/wolfssl
remove extra setting of ecc key size with CRYPTOCELL build
This commit is contained in:
@ -4037,20 +4037,12 @@ int wc_ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key, int curve_id)
|
|||||||
CRYS_ECPKI_KG_TempData_t tempBuff;
|
CRYS_ECPKI_KG_TempData_t tempBuff;
|
||||||
CRYS_ECPKI_KG_FipsContext_t fipsCtx;
|
CRYS_ECPKI_KG_FipsContext_t fipsCtx;
|
||||||
byte ucompressed_key[ECC_MAX_CRYPTO_HW_SIZE*2 + 1];
|
byte ucompressed_key[ECC_MAX_CRYPTO_HW_SIZE*2 + 1];
|
||||||
word32 raw_size;
|
word32 raw_size = 0;
|
||||||
#endif
|
#endif
|
||||||
if (key == NULL || rng == NULL) {
|
if (key == NULL || rng == NULL) {
|
||||||
return BAD_FUNC_ARG;
|
return BAD_FUNC_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WOLFSSL_CRYPTOCELL)
|
|
||||||
if (key->dp == NULL) {
|
|
||||||
WOLFSSL_MSG("ECC internal dp structure was NULL");
|
|
||||||
return BAD_FUNC_ARG;
|
|
||||||
}
|
|
||||||
|
|
||||||
raw_size = (word32) (key->dp->size)*2 + 1;
|
|
||||||
#endif
|
|
||||||
/* make sure required variables are reset */
|
/* make sure required variables are reset */
|
||||||
wc_ecc_reset(key);
|
wc_ecc_reset(key);
|
||||||
|
|
||||||
@ -7240,21 +7232,13 @@ static int wc_ecc_import_raw_private(ecc_key* key, const char* qx,
|
|||||||
const CRYS_ECPKI_Domain_t* pDomain;
|
const CRYS_ECPKI_Domain_t* pDomain;
|
||||||
CRYS_ECPKI_BUILD_TempData_t tempBuff;
|
CRYS_ECPKI_BUILD_TempData_t tempBuff;
|
||||||
byte key_raw[ECC_MAX_CRYPTO_HW_SIZE*2 + 1];
|
byte key_raw[ECC_MAX_CRYPTO_HW_SIZE*2 + 1];
|
||||||
word32 keySz;
|
word32 keySz = 0;
|
||||||
#endif
|
#endif
|
||||||
/* if d is NULL, only import as public key using Qx,Qy */
|
/* if d is NULL, only import as public key using Qx,Qy */
|
||||||
if (key == NULL || qx == NULL || qy == NULL) {
|
if (key == NULL || qx == NULL || qy == NULL) {
|
||||||
return BAD_FUNC_ARG;
|
return BAD_FUNC_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WOLFSSL_CRYPTOCELL)
|
|
||||||
if (key->dp == NULL) {
|
|
||||||
WOLFSSL_MSG("ECC internal dp structure was NULL");
|
|
||||||
return BAD_FUNC_ARG;
|
|
||||||
}
|
|
||||||
|
|
||||||
keySz = (word32) (key->dp->size)*2 + 1;
|
|
||||||
#endif
|
|
||||||
/* make sure required variables are reset */
|
/* make sure required variables are reset */
|
||||||
wc_ecc_reset(key);
|
wc_ecc_reset(key);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user