Change the extension type of the file psa_crypto_driver_wrapper

Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
This commit is contained in:
Xiaokang Qian 2023-09-11 10:36:20 +00:00
parent 54a4fdfe91
commit fe9666b8c0
11 changed files with 18 additions and 15 deletions

View file

@ -24,8 +24,7 @@
#include "psa/crypto.h" #include "psa/crypto.h"
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include "psa_crypto_driver_wrappers.h" #include "psa_crypto_driver_wrappers_no_static.h"
#include <stddef.h>
#if defined(MBEDTLS_PSA_P256M_DRIVER_ENABLED) #if defined(MBEDTLS_PSA_P256M_DRIVER_ENABLED)

View file

@ -174,14 +174,16 @@ if(GEN_FILES)
add_custom_command( add_custom_command(
OUTPUT OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/psa_crypto_driver_wrappers.c ${CMAKE_CURRENT_BINARY_DIR}/psa_crypto_driver_wrappers.h
${CMAKE_CURRENT_BINARY_DIR}/psa_crypto_driver_wrappers_no_static.c
COMMAND COMMAND
${MBEDTLS_PYTHON_EXECUTABLE} ${MBEDTLS_PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/generate_driver_wrappers.py ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/generate_driver_wrappers.py
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/generate_driver_wrappers.py ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/generate_driver_wrappers.py
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.c.jinja ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.h.jinja
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/data_files/driver_templates/psa_crypto_driver_wrappers_no_static.c.jinja
) )

View file

@ -208,7 +208,7 @@ else
all: shared static all: shared static
endif endif
psa_crypto.o:psa_crypto_driver_wrappers.c psa_crypto.o:psa_crypto_driver_wrappers.h
static: libmbedcrypto.a libmbedx509.a libmbedtls.a static: libmbedcrypto.a libmbedx509.a libmbedtls.a
cd ../tests && echo "This is a seedfile that contains 64 bytes (65 on Windows)......" > seedfile cd ../tests && echo "This is a seedfile that contains 64 bytes (65 on Windows)......" > seedfile
@ -318,7 +318,8 @@ libmbedcrypto.dll: $(OBJS_CRYPTO)
GENERATED_FILES = \ GENERATED_FILES = \
error.c version_features.c \ error.c version_features.c \
ssl_debug_helpers_generated.c \ ssl_debug_helpers_generated.c \
psa_crypto_driver_wrappers.c psa_crypto_driver_wrappers.h \
psa_crypto_driver_wrappers_no_static.c
generated_files: $(GENERATED_FILES) generated_files: $(GENERATED_FILES)
# See root Makefile # See root Makefile
@ -355,10 +356,11 @@ version_features.c:
$(PERL) ../scripts/generate_features.pl $(PERL) ../scripts/generate_features.pl
GENERATED_WRAPPER_FILES = \ GENERATED_WRAPPER_FILES = \
psa_crypto_driver_wrappers.c \ psa_crypto_driver_wrappers.h \
psa_crypto_driver_wrappers_no_static.c psa_crypto_driver_wrappers_no_static.c
$(GENERATED_WRAPPER_FILES): ../scripts/generate_driver_wrappers.py $(GENERATED_WRAPPER_FILES): ../scripts/generate_driver_wrappers.py
$(GENERATED_WRAPPER_FILES): ../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.c.jinja $(GENERATED_WRAPPER_FILES): ../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.h.jinja
$(GENERATED_WRAPPER_FILES): ../scripts/data_files/driver_templates/psa_crypto_driver_wrappers_no_static.c.jinja
$(GENERATED_WRAPPER_FILES): $(GENERATED_WRAPPER_FILES):
echo " Gen $(GENERATED_WRAPPER_FILES)" echo " Gen $(GENERATED_WRAPPER_FILES)"
$(PYTHON) ../scripts/generate_driver_wrappers.py $(PYTHON) ../scripts/generate_driver_wrappers.py

View file

@ -33,8 +33,8 @@
#include "psa_crypto_cipher.h" #include "psa_crypto_cipher.h"
#include "psa_crypto_core.h" #include "psa_crypto_core.h"
#include "psa_crypto_invasive.h" #include "psa_crypto_invasive.h"
#include "psa_crypto_driver_wrappers.c"
#include "psa_crypto_driver_wrappers.h" #include "psa_crypto_driver_wrappers.h"
#include "psa_crypto_driver_wrappers_no_static.h"
#include "psa_crypto_ecp.h" #include "psa_crypto_ecp.h"
#include "psa_crypto_ffdh.h" #include "psa_crypto_ffdh.h"
#include "psa_crypto_hash.h" #include "psa_crypto_hash.h"

View file

@ -25,7 +25,7 @@
#include "psa/crypto.h" #include "psa/crypto.h"
#include "psa_crypto_core.h" #include "psa_crypto_core.h"
#include "psa_crypto_driver_wrappers.h" #include "psa_crypto_driver_wrappers_no_static.h"
#include "psa_crypto_slot_management.h" #include "psa_crypto_slot_management.h"
#include "psa_crypto_storage.h" #include "psa_crypto_storage.h"
#if defined(MBEDTLS_PSA_CRYPTO_SE_C) #if defined(MBEDTLS_PSA_CRYPTO_SE_C)

View file

@ -25,7 +25,7 @@
#include "psa_crypto_aead.h" #include "psa_crypto_aead.h"
#include "psa_crypto_cipher.h" #include "psa_crypto_cipher.h"
#include "psa_crypto_core.h" #include "psa_crypto_core.h"
#include "psa_crypto_driver_wrappers.h" #include "psa_crypto_driver_wrappers_no_static.h"
#include "psa_crypto_hash.h" #include "psa_crypto_hash.h"
#include "psa_crypto_mac.h" #include "psa_crypto_mac.h"
#include "psa_crypto_pake.h" #include "psa_crypto_pake.h"

View file

@ -25,7 +25,7 @@
#include "psa_crypto_aead.h" #include "psa_crypto_aead.h"
#include "psa_crypto_cipher.h" #include "psa_crypto_cipher.h"
#include "psa_crypto_core.h" #include "psa_crypto_core.h"
#include "psa_crypto_driver_wrappers.h" #include "psa_crypto_driver_wrappers_no_static.h"
#include "psa_crypto_hash.h" #include "psa_crypto_hash.h"
#include "psa_crypto_mac.h" #include "psa_crypto_mac.h"
#include "psa_crypto_pake.h" #include "psa_crypto_pake.h"

View file

@ -168,7 +168,7 @@ def trace_exception(e: Exception, file=sys.stderr) -> None:
), file) ), file)
TEMPLATE_FILENAMES = ["psa_crypto_driver_wrappers.c.jinja", TEMPLATE_FILENAMES = ["psa_crypto_driver_wrappers.h.jinja",
"psa_crypto_driver_wrappers_no_static.c.jinja"] "psa_crypto_driver_wrappers_no_static.c.jinja"]
def main() -> int: def main() -> int:

View file

@ -128,7 +128,7 @@ check()
check scripts/generate_errors.pl library/error.c check scripts/generate_errors.pl library/error.c
check scripts/generate_query_config.pl programs/test/query_config.c check scripts/generate_query_config.pl programs/test/query_config.c
check scripts/generate_driver_wrappers.py library/psa_crypto_driver_wrappers.c check scripts/generate_driver_wrappers.py library/psa_crypto_driver_wrappers.h
check scripts/generate_features.pl library/version_features.c check scripts/generate_features.pl library/version_features.c
check scripts/generate_ssl_debug_helpers.py library/ssl_debug_helpers_generated.c check scripts/generate_ssl_debug_helpers.py library/ssl_debug_helpers_generated.c
# generate_visualc_files enumerates source files (library/*.c). It doesn't # generate_visualc_files enumerates source files (library/*.c). It doesn't

View file

@ -284,7 +284,7 @@ class CodeParser():
"library/*.c", "library/*.c",
"3rdparty/everest/library/everest.c", "3rdparty/everest/library/everest.c",
"3rdparty/everest/library/x25519.c" "3rdparty/everest/library/x25519.c"
], ["library/psa_crypto_driver_wrappers.c"]) ], ["library/psa_crypto_driver_wrappers.h"])
symbols = self.parse_symbols() symbols = self.parse_symbols()
# Remove identifier macros like mbedtls_printf or mbedtls_calloc # Remove identifier macros like mbedtls_printf or mbedtls_calloc