diff --git a/CMakeLists.txt b/CMakeLists.txt index 2908103a..eb2a1810 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -657,6 +657,10 @@ if (CMAKE_C_COMPILER_ID MATCHES "MSVC") endif() +add_test(NAME gmssl_sm3 + COMMAND ${CMAKE_COMMAND} -P "${CMAKE_SOURCE_DIR}/cmake/gmssl_sm3.cmake") + + # Generate install package with cpack # cpack -G TGZ # cpack -G STGZ diff --git a/cmake/gmssl_sm3.cmake b/cmake/gmssl_sm3.cmake new file mode 100644 index 00000000..508fff55 --- /dev/null +++ b/cmake/gmssl_sm3.cmake @@ -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() diff --git a/src/sm2_z256_arm64.S b/src/sm2_z256_arm64.S new file mode 100644 index 00000000..d89c31af --- /dev/null +++ b/src/sm2_z256_arm64.S @@ -0,0 +1 @@ + * Licensed under the Apache License, Version 2.0 (the License); you may