diff --git a/lib/libesp32_div/ESP32-HomeKit/src/port/esp_bignum.c b/lib/libesp32_div/ESP32-HomeKit/src/port/esp_bignum.c index 5ef9d49f9..44e0a798c 100644 --- a/lib/libesp32_div/ESP32-HomeKit/src/port/esp_bignum.c +++ b/lib/libesp32_div/ESP32-HomeKit/src/port/esp_bignum.c @@ -151,7 +151,7 @@ cleanup: - +#if ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4, 0, 0) /* Z = (X * Y) mod M Not an mbedTLS function @@ -193,6 +193,8 @@ cleanup: return ret; } +#endif // ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4, 0, 0) + #if defined(MBEDTLS_MPI_EXP_MOD_ALT) #ifdef ESP_MPI_USE_MONT_EXP @@ -374,6 +376,7 @@ cleanup: static int mpi_mult_mpi_failover_mod_mult( mbedtls_mpi *Z, const mbedtls_mpi *X, const mbedtls_mpi *Y, size_t z_words); static int mpi_mult_mpi_overlong(mbedtls_mpi *Z, const mbedtls_mpi *X, const mbedtls_mpi *Y, size_t y_words, size_t z_words); +#if ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4, 0, 0) /* Z = X * Y */ int mbedtls_mpi_mul_mpi( mbedtls_mpi *Z, const mbedtls_mpi *X, const mbedtls_mpi *Y ) { @@ -447,6 +450,7 @@ int mbedtls_mpi_mul_mpi( mbedtls_mpi *Z, const mbedtls_mpi *X, const mbedtls_mpi cleanup: return ret; } +#endif //ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4, 0, 0)