diff options
Diffstat (limited to 'aesxx/utils/test/basic.cmake')
| -rw-r--r-- | aesxx/utils/test/basic.cmake | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/aesxx/utils/test/basic.cmake b/aesxx/utils/test/basic.cmake index df4150b..2383f61 100644 --- a/aesxx/utils/test/basic.cmake +++ b/aesxx/utils/test/basic.cmake @@ -67,7 +67,7 @@ foreach(action encrypt decrypt) "${CMAKE_SOURCE_DIR}/cmake/tools/ctest-driver.py" run --exit-code 1 - --pass-regex [=[AES error: Couldn't parse '0001020304050607' \(possibly not complete input\) as a 256-bit block]=] + --pass-regex [=[AES error: Couldn't parse '0001020304050607' \(possibly not complete input\) as a 32-byte hex string]=] -- "$<TARGET_FILE:${tgt}>" -a aes256 -m ecb 0001020304050607 ) @@ -75,7 +75,7 @@ foreach(action encrypt decrypt) "${CMAKE_SOURCE_DIR}/cmake/tools/ctest-driver.py" run --exit-code 1 - --pass-regex [=[AES error: Couldn't parse 'foobar' \(possibly not complete input\) as a 256-bit block]=] + --pass-regex [=[AES error: Couldn't parse 'foobar' \(possibly not complete input\) as a 32-byte hex string]=] -- "$<TARGET_FILE:${tgt}>" -a aes256 -m ecb foobar ) @@ -83,16 +83,24 @@ foreach(action encrypt decrypt) "${CMAKE_SOURCE_DIR}/cmake/tools/ctest-driver.py" run --exit-code 1 - --pass-regex [=[AES error: Couldn't parse '2222222222222222222222222222222' \(possibly not complete input\) as a 128-bit block]=] + --pass-regex [=[AES error: Couldn't parse '2222222222222222222222222222222' \(possibly not complete input\) as a 16-byte hex string]=] -- "$<TARGET_FILE:${tgt}>" -a aes128 -m cbc 11111111111111111111111111111111 2222222222222222222222222222222 ) + add_test(NAME "${tgt}_invalid_iv2" COMMAND Python3::Interpreter + "${CMAKE_SOURCE_DIR}/cmake/tools/ctest-driver.py" + run + --exit-code 1 + --pass-regex [=[AES error: Couldn't parse '222222222222222222222222222222222' \(possibly not complete input\) as a 16-byte hex string]=] + -- + "$<TARGET_FILE:${tgt}>" -a aes128 -m cbc 11111111111111111111111111111111 222222222222222222222222222222222 + ) add_test(NAME "${tgt}_invalid_block" COMMAND Python3::Interpreter "${CMAKE_SOURCE_DIR}/cmake/tools/ctest-driver.py" run --exit-code 1 - --pass-regex [=[AES error: Couldn't parse '0' \(possibly not complete input\) as a 128-bit block]=] + --pass-regex [=[AES error: Couldn't parse '0' \(possibly not complete input\) as a 16-byte hex string]=] -- - "$<TARGET_FILE:${tgt}>" -a aes128 -m cbc 11111111111111111111111111111111 2222222222222222222222222222222 0 + "$<TARGET_FILE:${tgt}>" -a aes128 -m cbc 11111111111111111111111111111111 22222222222222222222222222222222 0 ) endforeach() |
