Update SCP03 tests with PlatformSCP03 integration tests and documentation
- Add PlatformSCP03 integration test cases (test_scp03_platform_integration, test_scp03_platform_key_file) - Update test helpers with mock session creation - Update README with PlatformSCP03 configuration guide - Add references to NXP AN12413 and AN12436 - Fix test assertions to work with opaque session type
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(se050_wireguard C)
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
# Include directories
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
# Source files
|
||||
set(SOURCES
|
||||
src/se050_i2c_hal.c
|
||||
src/se050_session.c
|
||||
src/se050_keystore.c
|
||||
src/se050_rng.c
|
||||
src/se050_x25519.c
|
||||
src/se050_scp03.c
|
||||
)
|
||||
|
||||
# Create library
|
||||
add_library(se050_wireguard STATIC ${SOURCES})
|
||||
|
||||
# Linux-specific flags
|
||||
if(UNIX AND NOT APPLE)
|
||||
# OpenSSL for SCP03 encryption
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(se050_wireguard OpenSSL::SSL OpenSSL::Crypto)
|
||||
endif()
|
||||
|
||||
# Enable testing
|
||||
option(BUILD_TESTS "Build test suite" ON)
|
||||
if(BUILD_TESTS)
|
||||
enable_testing()
|
||||
|
||||
# SCP03 tests
|
||||
add_executable(test_scp03 tests/test_scp03.c)
|
||||
target_link_libraries(test_scp03 se050_wireguard)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_link_libraries(test_scp03 OpenSSL::SSL OpenSSL::Crypto)
|
||||
endif()
|
||||
|
||||
add_test(NAME SCP03Tests COMMAND test_scp03)
|
||||
endif()
|
||||
|
||||
# Install headers
|
||||
install(FILES include/se050_wireguard.h
|
||||
DESTINATION include)
|
||||
|
||||
# Install library
|
||||
install(TARGETS se050_wireguard
|
||||
ARCHIVE DESTINATION lib)
|
||||
Reference in New Issue
Block a user