mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge pull request #3023 from gilles-peskine-arm/config-crypto
Add crypto-only preset configurations
This commit is contained in:
@ -899,6 +899,33 @@ component_build_deprecated () {
|
||||
make CC=clang CFLAGS='-O -Werror -Wall -Wextra -Wno-unused-function' tests
|
||||
}
|
||||
|
||||
# Check that the specified libraries exist and are empty.
|
||||
are_empty_libraries () {
|
||||
nm "$@" >/dev/null 2>/dev/null
|
||||
! nm "$@" 2>/dev/null | grep -v ':$' | grep .
|
||||
}
|
||||
|
||||
component_build_crypto_default () {
|
||||
msg "build: make, crypto only"
|
||||
scripts/config.py crypto
|
||||
make CFLAGS='-O1 -Werror'
|
||||
if_build_succeeded are_empty_libraries library/libmbedx509.* library/libmbedtls.*
|
||||
}
|
||||
|
||||
component_build_crypto_full () {
|
||||
msg "build: make, crypto only, full config"
|
||||
scripts/config.py crypto_full
|
||||
make CFLAGS='-O1 -Werror'
|
||||
if_build_succeeded are_empty_libraries library/libmbedx509.* library/libmbedtls.*
|
||||
}
|
||||
|
||||
component_build_crypto_baremetal () {
|
||||
msg "build: make, crypto only, baremetal config"
|
||||
scripts/config.py crypto_baremetal
|
||||
make CFLAGS='-O1 -Werror'
|
||||
if_build_succeeded are_empty_libraries library/libmbedx509.* library/libmbedtls.*
|
||||
}
|
||||
|
||||
component_test_depends_curves () {
|
||||
msg "test/build: curves.pl (gcc)" # ~ 4 min
|
||||
record_status tests/scripts/curves.pl
|
||||
|
@ -33,7 +33,8 @@ size_t mbedtls_rsa_key_len_func( void *ctx )
|
||||
}
|
||||
#endif /* MBEDTLS_RSA_C */
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
||||
defined(MBEDTLS_PEM_WRITE_C) && defined(MBEDTLS_X509_CSR_WRITE_C)
|
||||
static int x509_crt_verifycsr( const unsigned char *buf, size_t buflen )
|
||||
{
|
||||
unsigned char hash[MBEDTLS_MD_MAX_SIZE];
|
||||
@ -70,7 +71,7 @@ cleanup:
|
||||
mbedtls_x509_csr_free( &csr );
|
||||
return( ret );
|
||||
}
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO && MBEDTLS_PEM_WRITE_C && MBEDTLS_X509_CSR_WRITE_C */
|
||||
|
||||
/* END_HEADER */
|
||||
|
||||
|
Reference in New Issue
Block a user