Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Validate values of PSA Crypto macros against spec #3936

Draft
wants to merge 6 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions programs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ APPS = \
test/query_compile_time_config$(EXEXT) \
test/selftest$(EXEXT) \
test/udp_proxy$(EXEXT) \
test/verify_psa_macros$(EXEXT) \
test/zeroize$(EXEXT) \
util/pem2der$(EXEXT) \
util/strerror$(EXEXT) \
Expand Down Expand Up @@ -315,6 +316,10 @@ test/udp_proxy$(EXEXT): test/udp_proxy.c $(DEP)
echo " CC test/udp_proxy.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/udp_proxy.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@

test/verify_psa_macros$(EXEXT): test/verify_psa_macros.c
echo " CC test/verify_psa_macros.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/verify_psa_macros.c -o $@

test/zeroize$(EXEXT): test/zeroize.c $(DEP)
echo " CC test/zeroize.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/zeroize.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Expand Down
8 changes: 6 additions & 2 deletions programs/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ set(executables_mbedcrypto
zeroize
)

set(executables
verify_psa_macros
)

if(TEST_CPP)
list(APPEND executables_mbedcrypto cpp_dummy_build)
endif()

foreach(exe IN LISTS executables_libs executables_mbedcrypto)
foreach(exe IN LISTS executables_libs executables_mbedcrypto executables)
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)

# This emulates "if ( ... IN_LIST ... )" which becomes available in CMake 3.3
Expand All @@ -40,6 +44,6 @@ endforeach()
set_property(TARGET query_compile_time_config APPEND PROPERTY SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/query_config.c)

install(TARGETS ${executables_libs} ${executables_mbedcrypto}
install(TARGETS ${executables_libs} ${executables_mbedcrypto} ${executables}
DESTINATION "bin"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
Loading