Merge pull request #6111 from superna9999/6101-programs-dont-build-with-libtestdriver-and-use-psa
Programs don't build with libtestdriver and USE_PSA
This commit is contained in:
commit
a84ce3fa81
@ -11,12 +11,12 @@
|
||||
//4 Kb should be enough for every bug ;-)
|
||||
#define MAX_LEN 0x1000
|
||||
|
||||
#if defined(MBEDTLS_PK_PARSE_C) && defined(MBEDTLS_CTR_DRBG_C)
|
||||
#if defined(MBEDTLS_PK_PARSE_C) && defined(MBEDTLS_CTR_DRBG_C) && defined(MBEDTLS_ENTROPY_C)
|
||||
const char *pers = "fuzz_privkey";
|
||||
#endif // MBEDTLS_PK_PARSE_C && MBEDTLS_CTR_DRBG_C
|
||||
#endif // MBEDTLS_PK_PARSE_C && MBEDTLS_CTR_DRBG_C && MBEDTLS_ENTROPY_C
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
#if defined(MBEDTLS_PK_PARSE_C) && defined(MBEDTLS_CTR_DRBG_C)
|
||||
#if defined(MBEDTLS_PK_PARSE_C) && defined(MBEDTLS_CTR_DRBG_C) && defined(MBEDTLS_ENTROPY_C)
|
||||
int ret;
|
||||
mbedtls_pk_context pk;
|
||||
mbedtls_ctr_drbg_context ctr_drbg;
|
||||
@ -88,7 +88,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
#else
|
||||
(void) Data;
|
||||
(void) Size;
|
||||
#endif // MBEDTLS_PK_PARSE_C && MBEDTLS_CTR_DRBG_C
|
||||
#endif // MBEDTLS_PK_PARSE_C && MBEDTLS_CTR_DRBG_C && MBEDTLS_ENTROPY_C
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1901,7 +1901,7 @@ component_test_psa_crypto_config_accel_hash_use_psa () {
|
||||
# but is already disabled in the default config
|
||||
|
||||
loc_accel_flags="$loc_accel_flags $( echo "$loc_accel_list" | sed 's/[^ ]* */-DMBEDTLS_PSA_ACCEL_&/g' )"
|
||||
make CFLAGS="$ASAN_CFLAGS -Werror -I../tests/include -I../tests -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_TEST_LIBTESTDRIVER1 $loc_accel_flags" LDFLAGS="-ltestdriver1 $ASAN_CFLAGS" tests
|
||||
make CFLAGS="$ASAN_CFLAGS -Werror -I../tests/include -I../tests -I../../tests -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_TEST_LIBTESTDRIVER1 $loc_accel_flags" LDFLAGS="-ltestdriver1 $ASAN_CFLAGS" all
|
||||
|
||||
# There's a risk of something getting re-enabled via config_psa.h;
|
||||
# make sure it did not happen.
|
||||
|
Loading…
Reference in New Issue
Block a user