Add TLS 1.2 TLS 1.3 tests

This commit is contained in:
Zhi Guan
2024-06-02 12:56:15 +08:00
parent cffee1dd9f
commit c0f0ed0449
8 changed files with 231 additions and 142 deletions

14
cmake/sm3_commands.cmake Normal file
View File

@@ -0,0 +1,14 @@
execute_process(
COMMAND gmssl sm3 -in_str abc
RESULT_VARIABLE TEST_RESULT
ERROR_VARIABLE TEST_STDERR
OUTPUT_VARIABLE TEST_OUTPUT
)
if(NOT ${TEST_RESULT} EQUAL 0)
message(FATAL_ERROR "stderr: ${TEST_STDERR}")
endif()
if(NOT ${TEST_OUTPUT} STREQUAL "66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0\n")
message(FATAL_ERROR "stdout: ${TEST_OUTPUT}")
endif()