diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 13720a3b0..51ebc2c58 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -1607,7 +1607,8 @@ static void alt_fp_init(mp_int* a) #endif /* ALT_ECC_SIZE */ -#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) +#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) && \ + !defined(WOLFSSL_CRYPTOCELL) #if !defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_PUBLIC_ECC_ADD_DBL) @@ -2296,7 +2297,10 @@ int ecc_projective_dbl_point(ecc_point *P, ecc_point *R, mp_int* a, #endif } -#if !defined(FREESCALE_LTC_ECC) && !defined(WOLFSSL_STM32_PKA) +#if !defined(FREESCALE_LTC_ECC) && !defined(WOLFSSL_STM32_PKA) && \ + !defined(WOLFSSL_CRYPTOCELL) + + /** Map a projective Jacobian point back to affine space P [in/out] The point to map @@ -2524,8 +2528,8 @@ int ecc_map(ecc_point* P, mp_int* modulus, mp_digit mp) } #endif /* !WOLFSSL_SP_MATH || WOLFSSL_PUBLIC_ECC_ADD_DBL */ -#if !defined(FREESCALE_LTC_ECC) && !defined(WOLFSSL_STM32_PKA) - +#if !defined(FREESCALE_LTC_ECC) && !defined(WOLFSSL_STM32_PKA) && \ + !defined(WOLFSSL_CRYPTOCELL) #if !defined(WOLFSSL_SP_MATH) #ifndef ECC_TIMING_RESISTANT @@ -4464,7 +4468,8 @@ static int ecc_make_pub_ex(ecc_key* key, ecc_curve_spec* curveIn, SAVE_VECTOR_REGISTERS(return _svr_ret;); #if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) \ - && !defined(WOLFSSL_SILABS_SE_ACCEL) && !defined(WOLFSSL_KCAPI_ECC) + && !defined(WOLFSSL_SILABS_SE_ACCEL) && !defined(WOLFSSL_KCAPI_ECC) && \ + !defined(WOLFSSL_CRYPTOCELL) /* if ecc_point passed in then use it as output for public key point */ if (pubOut != NULL) { diff --git a/wolfcrypt/src/signature.c b/wolfcrypt/src/signature.c index a9496cbb7..a86947892 100644 --- a/wolfcrypt/src/signature.c +++ b/wolfcrypt/src/signature.c @@ -48,11 +48,11 @@ /* Signature wrapper disabled check */ #ifndef NO_SIG_WRAPPER -#ifdef WOLFSSL_CRYPTOCELL -extern int cc310_RsaSSL_Verify(const byte* in, word32 inLen, byte* sig, - RsaKey* key, CRYS_RSA_HASH_OpMode_t mode); -extern int cc310_RsaSSL_Sign(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key, CRYS_RSA_HASH_OpMode_t mode); +#if !defined(NO_RSA) && defined(WOLFSSL_CRYPTOCELL) + extern int cc310_RsaSSL_Verify(const byte* in, word32 inLen, byte* sig, + RsaKey* key, CRYS_RSA_HASH_OpMode_t mode); + extern int cc310_RsaSSL_Sign(const byte* in, word32 inLen, byte* out, + word32 outLen, RsaKey* key, CRYS_RSA_HASH_OpMode_t mode); #endif #if !defined(NO_RSA) && !defined(NO_ASN) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 13dbdd4ce..6ce47db75 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -21580,12 +21580,12 @@ static int ecc_test_make_pub(WC_RNG* rng) if (pubPoint == NULL) { ERROR_OUT(-9858, done); } - +#if !defined(WOLFSSL_CRYPTOCELL) ret = wc_ecc_make_pub(key, pubPoint); if (ret != 0) { - ERROR_OUT(-9859, done); + ERROR_OUT(-9859, done); } - +#endif TEST_SLEEP(); #ifdef HAVE_ECC_KEY_EXPORT @@ -22840,7 +22840,8 @@ done: } #endif /* HAVE_ECC_KEY_IMPORT && HAVE_ECC_KEY_EXPORT */ -#if defined(HAVE_ECC_KEY_IMPORT) && !defined(WOLFSSL_VALIDATE_ECC_IMPORT) +#if defined(HAVE_ECC_KEY_IMPORT) && !defined(WOLFSSL_VALIDATE_ECC_IMPORT) && \ + !defined(WOLFSSL_CRYPTOCELL) static int ecc_mulmod_test(ecc_key* key1) { int ret; @@ -22999,7 +23000,7 @@ static int ecc_def_curve_test(WC_RNG *rng) #endif TEST_SLEEP(); - #ifdef HAVE_ECC_DHE + #if defined(HAVE_ECC_DHE) && !defined(WOLFSSL_CRYPTOCELL) ret = ecc_ssh_test(key, rng); if (ret < 0) goto done; @@ -23038,7 +23039,8 @@ static int ecc_def_curve_test(WC_RNG *rng) if (ret < 0) goto done; #endif -#if defined(HAVE_ECC_KEY_IMPORT) && !defined(WOLFSSL_VALIDATE_ECC_IMPORT) +#if defined(HAVE_ECC_KEY_IMPORT) && !defined(WOLFSSL_VALIDATE_ECC_IMPORT) && \ + !defined(WOLFSSL_CRYPTOCELL) ret = ecc_mulmod_test(key); if (ret < 0) goto done;