diff options
Diffstat (limited to 'tests')
36 files changed, 849 insertions, 105 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 480d893..eaf4ed1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | # | ||
| 2 | # Copyright (c) 2015 Brent Cook | ||
| 3 | # | ||
| 4 | # Permission to use, copy, modify, and distribute this software for any | ||
| 5 | # purpose with or without fee is hereby granted, provided that the above | ||
| 6 | # copyright notice and this permission notice appear in all copies. | ||
| 7 | # | ||
| 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | |||
| 1 | add_definitions(-DLIBRESSL_CRYPTO_INTERNAL) | 16 | add_definitions(-DLIBRESSL_CRYPTO_INTERNAL) |
| 2 | 17 | ||
| 3 | include_directories( | 18 | include_directories( |
| @@ -6,9 +21,13 @@ include_directories( | |||
| 6 | ../crypto/asn1 | 21 | ../crypto/asn1 |
| 7 | ../crypto/bio | 22 | ../crypto/bio |
| 8 | ../crypto/bn | 23 | ../crypto/bn |
| 24 | ../crypto/bytestring | ||
| 9 | ../crypto/curve25519 | 25 | ../crypto/curve25519 |
| 26 | ../crypto/ec | ||
| 10 | ../crypto/evp | 27 | ../crypto/evp |
| 28 | ../crypto/mlkem | ||
| 11 | ../crypto/modes | 29 | ../crypto/modes |
| 30 | ../crypto/sha | ||
| 12 | ../crypto/x509 | 31 | ../crypto/x509 |
| 13 | ../ssl | 32 | ../ssl |
| 14 | ../apps/openssl | 33 | ../apps/openssl |
| @@ -18,6 +37,30 @@ include_directories( | |||
| 18 | ../include/compat | 37 | ../include/compat |
| 19 | ) | 38 | ) |
| 20 | 39 | ||
| 40 | if(HOST_AARCH64) | ||
| 41 | include_directories(../crypto/arch/aarch64/) | ||
| 42 | elseif(HOST_ARM) | ||
| 43 | include_directories(../crypto/arch/arm/) | ||
| 44 | elseif(HOST_I386) | ||
| 45 | include_directories(../crypto/arch/i386/) | ||
| 46 | elseif(HOST_LOONGARCH64) | ||
| 47 | include_directories(../crypto/arch/loongarch64) | ||
| 48 | elseif(HOST_MIPS64) | ||
| 49 | include_directories(../crypto/arch/mips64) | ||
| 50 | elseif(HOST_MIPS) | ||
| 51 | include_directories(../crypto/arch/mips) | ||
| 52 | elseif(HOST_POWERPC) | ||
| 53 | include_directories(../crypto/arch/powerpc) | ||
| 54 | elseif(HOST_POWERPC64) | ||
| 55 | include_directories(../crypto/arch/powerpc64) | ||
| 56 | elseif(HOST_RISCV64) | ||
| 57 | include_directories(../crypto/arch/riscv64) | ||
| 58 | elseif(HOST_SPARC64) | ||
| 59 | include_directories(../crypto/arch/sparc64) | ||
| 60 | elseif(HOST_X86_64) | ||
| 61 | include_directories(../crypto/arch/amd64) | ||
| 62 | endif() | ||
| 63 | |||
| 21 | add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../cert.pem\") | 64 | add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../cert.pem\") |
| 22 | 65 | ||
| 23 | file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR) | 66 | file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR) |
| @@ -37,6 +80,12 @@ function(add_platform_test TEST_NAME) | |||
| 37 | endif() | 80 | endif() |
| 38 | endfunction() | 81 | endfunction() |
| 39 | 82 | ||
| 83 | # XXX - should probably be in their own static lib | ||
| 84 | set(TEST_HELPER_SRC test.c test_util.c) | ||
| 85 | if(WIN32) | ||
| 86 | set(TEST_HELPER_SRC ${TEST_HELPER_SRC} compat/mkstemp.c) | ||
| 87 | endif() | ||
| 88 | |||
| 40 | # aeadtest | 89 | # aeadtest |
| 41 | add_executable(aeadtest aeadtest.c) | 90 | add_executable(aeadtest aeadtest.c) |
| 42 | target_link_libraries(aeadtest ${OPENSSL_TEST_LIBS}) | 91 | target_link_libraries(aeadtest ${OPENSSL_TEST_LIBS}) |
| @@ -194,8 +243,13 @@ add_executable(bn_convert bn_convert.c) | |||
| 194 | target_link_libraries(bn_convert ${OPENSSL_TEST_LIBS}) | 243 | target_link_libraries(bn_convert ${OPENSSL_TEST_LIBS}) |
| 195 | add_platform_test(bn_convert bn_convert) | 244 | add_platform_test(bn_convert bn_convert) |
| 196 | 245 | ||
| 246 | # bn_ffdh | ||
| 247 | add_executable(bn_ffdh bn_ffdh.c) | ||
| 248 | target_link_libraries(bn_ffdh ${OPENSSL_TEST_LIBS}) | ||
| 249 | add_platform_test(bn_ffdh bn_ffdh) | ||
| 250 | |||
| 197 | # bn_gcd | 251 | # bn_gcd |
| 198 | add_executable(bn_gcd bn_cmp.c) | 252 | add_executable(bn_gcd bn_gcd.c) |
| 199 | target_link_libraries(bn_gcd ${OPENSSL_TEST_LIBS}) | 253 | target_link_libraries(bn_gcd ${OPENSSL_TEST_LIBS}) |
| 200 | add_platform_test(bn_gcd bn_gcd) | 254 | add_platform_test(bn_gcd bn_gcd) |
| 201 | 255 | ||
| @@ -303,9 +357,10 @@ target_link_libraries(cipherstest ${OPENSSL_TEST_LIBS}) | |||
| 303 | add_platform_test(cipherstest cipherstest) | 357 | add_platform_test(cipherstest cipherstest) |
| 304 | 358 | ||
| 305 | ## clienttest | 359 | ## clienttest |
| 306 | #add_executable(clienttest clienttest.c) | 360 | add_executable(clienttest clienttest.c) |
| 307 | #target_link_libraries(clienttest ${OPENSSL_TEST_LIBS}) | 361 | target_link_libraries(clienttest ${OPENSSL_TEST_LIBS}) |
| 308 | #add_platform_test(clienttest clienttest) | 362 | prepare_emscripten_test_target(clienttest) |
| 363 | add_platform_test(clienttest clienttest) | ||
| 309 | 364 | ||
| 310 | # cmstest | 365 | # cmstest |
| 311 | add_executable(cmstest cmstest.c) | 366 | add_executable(cmstest cmstest.c) |
| @@ -368,6 +423,7 @@ add_platform_test(ecc_cdh ecc_cdh) | |||
| 368 | # ec_asn1_test | 423 | # ec_asn1_test |
| 369 | add_executable(ec_asn1_test ec_asn1_test.c) | 424 | add_executable(ec_asn1_test ec_asn1_test.c) |
| 370 | target_link_libraries(ec_asn1_test ${OPENSSL_TEST_LIBS}) | 425 | target_link_libraries(ec_asn1_test ${OPENSSL_TEST_LIBS}) |
| 426 | prepare_emscripten_test_target(ec_asn1_test) | ||
| 371 | add_platform_test(ec_asn1_test ec_asn1_test) | 427 | add_platform_test(ec_asn1_test ec_asn1_test) |
| 372 | 428 | ||
| 373 | # ec_point_conversion | 429 | # ec_point_conversion |
| @@ -396,16 +452,16 @@ add_executable(ed25519test ed25519test.c) | |||
| 396 | target_link_libraries(ed25519test ${OPENSSL_TEST_LIBS}) | 452 | target_link_libraries(ed25519test ${OPENSSL_TEST_LIBS}) |
| 397 | add_platform_test(ed25519test ed25519test) | 453 | add_platform_test(ed25519test ed25519test) |
| 398 | 454 | ||
| 455 | # err_test | ||
| 456 | add_executable(err_test err_test.c) | ||
| 457 | target_link_libraries(err_test ${OPENSSL_TEST_LIBS}) | ||
| 458 | add_platform_test(err_test err_test) | ||
| 459 | |||
| 399 | # evp_ecx_test | 460 | # evp_ecx_test |
| 400 | add_executable(evp_ecx_test evp_ecx_test.c) | 461 | add_executable(evp_ecx_test evp_ecx_test.c) |
| 401 | target_link_libraries(evp_ecx_test ${OPENSSL_TEST_LIBS}) | 462 | target_link_libraries(evp_ecx_test ${OPENSSL_TEST_LIBS}) |
| 402 | add_platform_test(evp_ecx_test evp_ecx_test) | 463 | add_platform_test(evp_ecx_test evp_ecx_test) |
| 403 | 464 | ||
| 404 | # evp_pkey_check | ||
| 405 | add_executable(evp_pkey_check evp_pkey_check.c) | ||
| 406 | target_link_libraries(evp_pkey_check ${OPENSSL_TEST_LIBS}) | ||
| 407 | add_platform_test(evp_pkey_check evp_pkey_check) | ||
| 408 | |||
| 409 | # evp_pkey_cleanup | 465 | # evp_pkey_cleanup |
| 410 | add_executable(evp_pkey_cleanup evp_pkey_cleanup.c) | 466 | add_executable(evp_pkey_cleanup evp_pkey_cleanup.c) |
| 411 | target_link_libraries(evp_pkey_cleanup ${OPENSSL_TEST_LIBS}) | 467 | target_link_libraries(evp_pkey_cleanup ${OPENSSL_TEST_LIBS}) |
| @@ -420,6 +476,7 @@ add_platform_test(evptest evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptests.txt) | |||
| 420 | # evp_test | 476 | # evp_test |
| 421 | add_executable(evp_test evp_test.c) | 477 | add_executable(evp_test evp_test.c) |
| 422 | target_link_libraries(evp_test ${OPENSSL_TEST_LIBS}) | 478 | target_link_libraries(evp_test ${OPENSSL_TEST_LIBS}) |
| 479 | prepare_emscripten_test_target(evp_test) | ||
| 423 | add_platform_test(evp_test evp_test) | 480 | add_platform_test(evp_test evp_test) |
| 424 | 481 | ||
| 425 | # exdata_test | 482 | # exdata_test |
| @@ -507,10 +564,34 @@ prepare_emscripten_test_target(lhash_test) | |||
| 507 | add_platform_test(lhash_test lhash_test) | 564 | add_platform_test(lhash_test lhash_test) |
| 508 | 565 | ||
| 509 | # md_test | 566 | # md_test |
| 510 | add_executable(md_test md_test.c) | 567 | add_executable(md_test md_test.c ${TEST_HELPER_SRC}) |
| 511 | target_link_libraries(md_test ${OPENSSL_TEST_LIBS}) | 568 | target_link_libraries(md_test ${OPENSSL_TEST_LIBS}) |
| 512 | add_platform_test(md_test md_test) | 569 | add_platform_test(md_test md_test) |
| 513 | 570 | ||
| 571 | # mlkem_tests | ||
| 572 | add_executable(mlkem_tests mlkem_tests.c parse_test_file.c) | ||
| 573 | target_link_libraries(mlkem_tests ${OPENSSL_TEST_LIBS}) | ||
| 574 | prepare_emscripten_test_target(mlkem_tests) | ||
| 575 | if(NOT MSVC) | ||
| 576 | add_test(NAME mlkem_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/mlkem_tests.sh) | ||
| 577 | set_tests_properties(mlkem_tests PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
| 578 | else() | ||
| 579 | add_test(NAME mlkem_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/mlkem_tests.bat $<TARGET_FILE:mlkem_tests>) | ||
| 580 | endif() | ||
| 581 | set_tests_properties(mlkem_tests PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
| 582 | |||
| 583 | # mlkem_iteration_tests | ||
| 584 | add_executable(mlkem_iteration_tests mlkem_iteration_tests.c mlkem_tests_util.c) | ||
| 585 | target_link_libraries(mlkem_iteration_tests ${OPENSSL_TEST_LIBS}) | ||
| 586 | prepare_emscripten_test_target(mlkem_iteration_tests) | ||
| 587 | add_platform_test(mlkem_iteration_tests mlkem_iteration_tests) | ||
| 588 | |||
| 589 | # mlkem_unittest | ||
| 590 | add_executable(mlkem_unittest mlkem_unittest.c mlkem_tests_util.c) | ||
| 591 | target_link_libraries(mlkem_unittest ${OPENSSL_TEST_LIBS}) | ||
| 592 | prepare_emscripten_test_target(mlkem_unittest) | ||
| 593 | add_platform_test(mlkem_unittest mlkem_unittest) | ||
| 594 | |||
| 514 | # objectstest | 595 | # objectstest |
| 515 | add_executable(objectstest objectstest.c) | 596 | add_executable(objectstest objectstest.c) |
| 516 | target_link_libraries(objectstest ${OPENSSL_TEST_LIBS}) | 597 | target_link_libraries(objectstest ${OPENSSL_TEST_LIBS}) |
| @@ -520,7 +601,7 @@ add_platform_test(objectstest objectstest) | |||
| 520 | if(ENABLE_EXTRATESTS) | 601 | if(ENABLE_EXTRATESTS) |
| 521 | add_executable(ocsp_test ocsp_test.c) | 602 | add_executable(ocsp_test ocsp_test.c) |
| 522 | target_link_libraries(ocsp_test ${OPENSSL_TEST_LIBS}) | 603 | target_link_libraries(ocsp_test ${OPENSSL_TEST_LIBS}) |
| 523 | if(NOT MSVC) | 604 | if(NOT WIN32) |
| 524 | add_test(NAME ocsptest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh) | 605 | add_test(NAME ocsptest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh) |
| 525 | else() | 606 | else() |
| 526 | add_test(NAME ocsptest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.bat $<TARGET_FILE:ocsp_test>) | 607 | add_test(NAME ocsptest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.bat $<TARGET_FILE:ocsp_test>) |
| @@ -569,20 +650,14 @@ add_platform_test(policy policy) | |||
| 569 | # pq_test | 650 | # pq_test |
| 570 | add_executable(pq_test pq_test.c) | 651 | add_executable(pq_test pq_test.c) |
| 571 | target_link_libraries(pq_test ${OPENSSL_TEST_LIBS}) | 652 | target_link_libraries(pq_test ${OPENSSL_TEST_LIBS}) |
| 572 | if(NOT MSVC) | 653 | add_platform_test(pq_test pq_test) |
| 573 | add_test(NAME pq_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.sh) | ||
| 574 | else() | ||
| 575 | add_test(NAME pq_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.bat | ||
| 576 | $<TARGET_FILE:pq_test>) | ||
| 577 | endif() | ||
| 578 | set_tests_properties(pq_test PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
| 579 | 654 | ||
| 580 | # quictest | 655 | # quictest |
| 581 | set(QUICTEST_SRC quictest.c) | 656 | set(QUICTEST_SRC quictest.c) |
| 582 | add_executable(quictest ${QUICTEST_SRC}) | 657 | add_executable(quictest ${QUICTEST_SRC}) |
| 583 | target_link_libraries(quictest ${OPENSSL_TEST_LIBS}) | 658 | target_link_libraries(quictest ${OPENSSL_TEST_LIBS}) |
| 584 | prepare_emscripten_test_target(quictest) | 659 | prepare_emscripten_test_target(quictest) |
| 585 | if(NOT MSVC) | 660 | if(NOT WIN32) |
| 586 | add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.sh) | 661 | add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.sh) |
| 587 | else() | 662 | else() |
| 588 | add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.bat $<TARGET_FILE:quictest>) | 663 | add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.bat $<TARGET_FILE:quictest>) |
| @@ -614,6 +689,18 @@ add_executable(record_layer_test record_layer_test.c) | |||
| 614 | target_link_libraries(record_layer_test ${OPENSSL_TEST_LIBS}) | 689 | target_link_libraries(record_layer_test ${OPENSSL_TEST_LIBS}) |
| 615 | add_platform_test(record_layer_test record_layer_test) | 690 | add_platform_test(record_layer_test record_layer_test) |
| 616 | 691 | ||
| 692 | # renegotiation_test | ||
| 693 | set(RENEGOTIATION_TEST_SRC renegotiation_test.c) | ||
| 694 | add_executable(renegotiation_test ${RENEGOTIATION_TEST_SRC}) | ||
| 695 | target_link_libraries(renegotiation_test ${OPENSSL_TEST_LIBS}) | ||
| 696 | prepare_emscripten_test_target(renegotiation_test) | ||
| 697 | if(NOT MSVC) | ||
| 698 | add_test(NAME renegotiation_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/renegotiation_test.sh) | ||
| 699 | else() | ||
| 700 | add_test(NAME renegotiation_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/renegotiation_test.bat $<TARGET_FILE:renegotiation_test>) | ||
| 701 | endif() | ||
| 702 | set_tests_properties(renegotiation_test PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
| 703 | |||
| 617 | # rfc3779 | 704 | # rfc3779 |
| 618 | add_executable(rfc3779 rfc3779.c) | 705 | add_executable(rfc3779 rfc3779.c) |
| 619 | target_link_libraries(rfc3779 ${OPENSSL_TEST_LIBS}) | 706 | target_link_libraries(rfc3779 ${OPENSSL_TEST_LIBS}) |
| @@ -632,6 +719,11 @@ add_executable(rmd_test rmd_test.c) | |||
| 632 | target_link_libraries(rmd_test ${OPENSSL_TEST_LIBS}) | 719 | target_link_libraries(rmd_test ${OPENSSL_TEST_LIBS}) |
| 633 | add_platform_test(rmd_test rmd_test) | 720 | add_platform_test(rmd_test rmd_test) |
| 634 | 721 | ||
| 722 | # rsa_method_test | ||
| 723 | add_executable(rsa_method_test rsa_method_test.c) | ||
| 724 | target_link_libraries(rsa_method_test ${OPENSSL_TEST_LIBS}) | ||
| 725 | add_platform_test(rsa_method_test rsa_method_test) | ||
| 726 | |||
| 635 | # rsa_padding_test | 727 | # rsa_padding_test |
| 636 | add_executable(rsa_padding_test rsa_padding_test.c) | 728 | add_executable(rsa_padding_test rsa_padding_test.c) |
| 637 | target_link_libraries(rsa_padding_test ${OPENSSL_TEST_LIBS}) | 729 | target_link_libraries(rsa_padding_test ${OPENSSL_TEST_LIBS}) |
| @@ -648,7 +740,7 @@ add_platform_test(rsa_test rsa_test) | |||
| 648 | add_executable(servertest servertest.c) | 740 | add_executable(servertest servertest.c) |
| 649 | target_link_libraries(servertest ${OPENSSL_TEST_LIBS}) | 741 | target_link_libraries(servertest ${OPENSSL_TEST_LIBS}) |
| 650 | prepare_emscripten_test_target(servertest) | 742 | prepare_emscripten_test_target(servertest) |
| 651 | if(NOT MSVC) | 743 | if(NOT WIN32) |
| 652 | add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.sh) | 744 | add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.sh) |
| 653 | else() | 745 | else() |
| 654 | add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.bat $<TARGET_FILE:servertest>) | 746 | add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.bat $<TARGET_FILE:servertest>) |
| @@ -656,7 +748,7 @@ endif() | |||
| 656 | set_tests_properties(servertest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | 748 | set_tests_properties(servertest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") |
| 657 | 749 | ||
| 658 | # sha_test | 750 | # sha_test |
| 659 | add_executable(sha_test sha_test.c) | 751 | add_executable(sha_test sha_test.c ${TEST_HELPER_SRC}) |
| 660 | target_link_libraries(sha_test ${OPENSSL_TEST_LIBS}) | 752 | target_link_libraries(sha_test ${OPENSSL_TEST_LIBS}) |
| 661 | add_platform_test(sha_test sha_test) | 753 | add_platform_test(sha_test sha_test) |
| 662 | 754 | ||
| @@ -665,7 +757,7 @@ set(SHUTDOWNTEST_SRC shutdowntest.c) | |||
| 665 | add_executable(shutdowntest ${SHUTDOWNTEST_SRC}) | 757 | add_executable(shutdowntest ${SHUTDOWNTEST_SRC}) |
| 666 | target_link_libraries(shutdowntest ${OPENSSL_TEST_LIBS}) | 758 | target_link_libraries(shutdowntest ${OPENSSL_TEST_LIBS}) |
| 667 | prepare_emscripten_test_target(shutdowntest) | 759 | prepare_emscripten_test_target(shutdowntest) |
| 668 | if(NOT MSVC) | 760 | if(NOT WIN32) |
| 669 | add_test(NAME shutdowntest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/shutdowntest.sh) | 761 | add_test(NAME shutdowntest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/shutdowntest.sh) |
| 670 | else() | 762 | else() |
| 671 | add_test(NAME shutdowntest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/shutdowntest.bat $<TARGET_FILE:shutdowntest>) | 763 | add_test(NAME shutdowntest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/shutdowntest.bat $<TARGET_FILE:shutdowntest>) |
| @@ -676,7 +768,7 @@ set_tests_properties(shutdowntest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_D | |||
| 676 | # Emscripten does not support socketpair syscall. | 768 | # Emscripten does not support socketpair syscall. |
| 677 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "WindowsStore" OR EMSCRIPTEN)) | 769 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "WindowsStore" OR EMSCRIPTEN)) |
| 678 | set(SIGNERTEST_SRC signertest.c) | 770 | set(SIGNERTEST_SRC signertest.c) |
| 679 | check_function_exists(pipe2 HAVE_PIPE2) | 771 | check_symbol_exists(pipe2 "fcntl.h;unistd.h" HAVE_PIPE2) |
| 680 | if(HAVE_PIPE2) | 772 | if(HAVE_PIPE2) |
| 681 | add_definitions(-DHAVE_PIPE2) | 773 | add_definitions(-DHAVE_PIPE2) |
| 682 | else() | 774 | else() |
| @@ -737,7 +829,7 @@ add_platform_test(ssl_versions ssl_versions) | |||
| 737 | add_executable(ssltest ssltest.c) | 829 | add_executable(ssltest ssltest.c) |
| 738 | target_link_libraries(ssltest ${OPENSSL_TEST_LIBS}) | 830 | target_link_libraries(ssltest ${OPENSSL_TEST_LIBS}) |
| 739 | prepare_emscripten_test_target(ssltest) | 831 | prepare_emscripten_test_target(ssltest) |
| 740 | if(NOT MSVC) | 832 | if(NOT WIN32) |
| 741 | add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh) | 833 | add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh) |
| 742 | else() | 834 | else() |
| 743 | add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.bat $<TARGET_FILE:ssltest> $<TARGET_FILE:openssl>) | 835 | add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.bat $<TARGET_FILE:ssltest> $<TARGET_FILE:openssl>) |
| @@ -748,7 +840,7 @@ set_tests_properties(ssltest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | |||
| 748 | # access various files for IO. Adding such files to --preload-file is infeasible. | 840 | # access various files for IO. Adding such files to --preload-file is infeasible. |
| 749 | if(NOT EMSCRIPTEN) | 841 | if(NOT EMSCRIPTEN) |
| 750 | # testdsa | 842 | # testdsa |
| 751 | if(NOT MSVC) | 843 | if(NOT WIN32) |
| 752 | add_test(NAME testdsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.sh) | 844 | add_test(NAME testdsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.sh) |
| 753 | else() | 845 | else() |
| 754 | add_test(NAME testdsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.bat $<TARGET_FILE:openssl>) | 846 | add_test(NAME testdsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.bat $<TARGET_FILE:openssl>) |
| @@ -756,7 +848,7 @@ if(NOT EMSCRIPTEN) | |||
| 756 | set_tests_properties(testdsa PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | 848 | set_tests_properties(testdsa PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") |
| 757 | 849 | ||
| 758 | # testenc | 850 | # testenc |
| 759 | if(NOT MSVC) | 851 | if(NOT WIN32) |
| 760 | add_test(NAME testenc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testenc.sh) | 852 | add_test(NAME testenc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testenc.sh) |
| 761 | else() | 853 | else() |
| 762 | add_test(NAME testenc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testenc.bat $<TARGET_FILE:openssl>) | 854 | add_test(NAME testenc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testenc.bat $<TARGET_FILE:openssl>) |
| @@ -764,7 +856,7 @@ if(NOT EMSCRIPTEN) | |||
| 764 | set_tests_properties(testenc PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | 856 | set_tests_properties(testenc PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") |
| 765 | 857 | ||
| 766 | # testrsa | 858 | # testrsa |
| 767 | if(NOT MSVC) | 859 | if(NOT WIN32) |
| 768 | add_test(NAME testrsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.sh) | 860 | add_test(NAME testrsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.sh) |
| 769 | else() | 861 | else() |
| 770 | add_test(NAME testrsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.bat $<TARGET_FILE:openssl>) | 862 | add_test(NAME testrsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.bat $<TARGET_FILE:openssl>) |
| @@ -792,7 +884,7 @@ add_platform_test(tlslegacytest tlslegacytest) | |||
| 792 | # Emscripten does not support socketpair syscall. | 884 | # Emscripten does not support socketpair syscall. |
| 793 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "WindowsStore" OR EMSCRIPTEN)) | 885 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "WindowsStore" OR EMSCRIPTEN)) |
| 794 | set(TLSTEST_SRC tlstest.c) | 886 | set(TLSTEST_SRC tlstest.c) |
| 795 | check_function_exists(pipe2 HAVE_PIPE2) | 887 | check_symbol_exists(pipe2 "fcntl.h;unistd.h" HAVE_PIPE2) |
| 796 | if(HAVE_PIPE2) | 888 | if(HAVE_PIPE2) |
| 797 | add_definitions(-DHAVE_PIPE2) | 889 | add_definitions(-DHAVE_PIPE2) |
| 798 | else() | 890 | else() |
| @@ -801,7 +893,7 @@ if(NOT (CMAKE_SYSTEM_NAME MATCHES "WindowsStore" OR EMSCRIPTEN)) | |||
| 801 | 893 | ||
| 802 | add_executable(tlstest ${TLSTEST_SRC}) | 894 | add_executable(tlstest ${TLSTEST_SRC}) |
| 803 | target_link_libraries(tlstest ${LIBTLS_TEST_LIBS}) | 895 | target_link_libraries(tlstest ${LIBTLS_TEST_LIBS}) |
| 804 | if(NOT MSVC) | 896 | if(NOT WIN32) |
| 805 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh) | 897 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh) |
| 806 | else() | 898 | else() |
| 807 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.bat $<TARGET_FILE:tlstest>) | 899 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.bat $<TARGET_FILE:tlstest>) |
| @@ -834,11 +926,6 @@ add_executable(verifytest verifytest.c) | |||
| 834 | target_link_libraries(verifytest ${LIBTLS_TEST_LIBS}) | 926 | target_link_libraries(verifytest ${LIBTLS_TEST_LIBS}) |
| 835 | add_platform_test(verifytest verifytest) | 927 | add_platform_test(verifytest verifytest) |
| 836 | 928 | ||
| 837 | # whirlpool_test | ||
| 838 | add_executable(whirlpool_test whirlpool_test.c) | ||
| 839 | target_link_libraries(whirlpool_test ${OPENSSL_TEST_LIBS}) | ||
| 840 | add_platform_test(whirlpool_test whirlpool_test) | ||
| 841 | |||
| 842 | # x25519test | 929 | # x25519test |
| 843 | add_executable(x25519test x25519test.c) | 930 | add_executable(x25519test x25519test.c) |
| 844 | target_link_libraries(x25519test ${OPENSSL_TEST_LIBS}) | 931 | target_link_libraries(x25519test ${OPENSSL_TEST_LIBS}) |
| @@ -870,10 +957,10 @@ add_executable(x509_info x509_info.c) | |||
| 870 | target_link_libraries(x509_info ${OPENSSL_TEST_LIBS}) | 957 | target_link_libraries(x509_info ${OPENSSL_TEST_LIBS}) |
| 871 | add_platform_test(x509_info x509_info) | 958 | add_platform_test(x509_info x509_info) |
| 872 | 959 | ||
| 873 | # x509name | 960 | # x509_name_test |
| 874 | add_executable(x509name x509name.c) | 961 | add_executable(x509_name_test x509_name_test.c) |
| 875 | target_link_libraries(x509name ${OPENSSL_TEST_LIBS}) | 962 | target_link_libraries(x509_name_test ${OPENSSL_TEST_LIBS}) |
| 876 | add_platform_test(x509name x509name) | 963 | add_platform_test(x509_name_test x509_name_test) |
| 877 | 964 | ||
| 878 | # x509req_ext | 965 | # x509req_ext |
| 879 | add_executable(x509req_ext x509req_ext.c) | 966 | add_executable(x509req_ext x509req_ext.c) |
diff --git a/tests/Makefile.am b/tests/Makefile.am index 76ed83a..22e3dee 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | # | ||
| 2 | # Copyright (c) 2015 Brent Cook | ||
| 3 | # | ||
| 4 | # Permission to use, copy, modify, and distribute this software for any | ||
| 5 | # purpose with or without fee is hereby granted, provided that the above | ||
| 6 | # copyright notice and this permission notice appear in all copies. | ||
| 7 | # | ||
| 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | |||
| 1 | include $(top_srcdir)/Makefile.am.common | 16 | include $(top_srcdir)/Makefile.am.common |
| 2 | 17 | ||
| 3 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk | 18 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk |
| @@ -10,15 +25,65 @@ AM_CPPFLAGS += -I $(top_srcdir)/crypto/ | |||
| 10 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/asn1 | 25 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/asn1 |
| 11 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/bio | 26 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/bio |
| 12 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/bn | 27 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/bn |
| 28 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/bytestring | ||
| 13 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/curve25519 | 29 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/curve25519 |
| 30 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/ec | ||
| 14 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/evp | 31 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/evp |
| 32 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/mlkem | ||
| 15 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/modes | 33 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/modes |
| 34 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/sha | ||
| 16 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/x509 | 35 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/x509 |
| 17 | AM_CPPFLAGS += -I $(top_srcdir)/ssl | 36 | AM_CPPFLAGS += -I $(top_srcdir)/ssl |
| 37 | AM_CPPFLAGS += -I $(top_srcdir)/tests | ||
| 18 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl | 38 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl |
| 19 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl/compat | 39 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl/compat |
| 20 | AM_CPPFLAGS += -D_PATH_SSL_CA_FILE=\"$(top_srcdir)/cert.pem\" | 40 | AM_CPPFLAGS += -D_PATH_SSL_CA_FILE=\"$(top_srcdir)/cert.pem\" |
| 21 | 41 | ||
| 42 | # arch | ||
| 43 | if HOST_AARCH64 | ||
| 44 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/aarch64/ | ||
| 45 | endif | ||
| 46 | |||
| 47 | if HOST_ARM | ||
| 48 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/arm/ | ||
| 49 | endif | ||
| 50 | |||
| 51 | if HOST_I386 | ||
| 52 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/i386/ | ||
| 53 | endif | ||
| 54 | |||
| 55 | if HOST_LOONGARCH64 | ||
| 56 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/loongarch64/ | ||
| 57 | endif | ||
| 58 | |||
| 59 | if HOST_MIPS | ||
| 60 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips/ | ||
| 61 | endif | ||
| 62 | |||
| 63 | if HOST_MIPS64 | ||
| 64 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips64/ | ||
| 65 | endif | ||
| 66 | |||
| 67 | if HOST_POWERPC | ||
| 68 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/powerpc/ | ||
| 69 | endif | ||
| 70 | |||
| 71 | if HOST_POWERPC64 | ||
| 72 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/powerpc64/ | ||
| 73 | endif | ||
| 74 | |||
| 75 | if HOST_RISCV64 | ||
| 76 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/riscv64/ | ||
| 77 | endif | ||
| 78 | |||
| 79 | if HOST_SPARC64 | ||
| 80 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/sparc64/ | ||
| 81 | endif | ||
| 82 | |||
| 83 | if HOST_X86_64 | ||
| 84 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/amd64/ | ||
| 85 | endif | ||
| 86 | |||
| 22 | noinst_LTLIBRARIES = libtest.la | 87 | noinst_LTLIBRARIES = libtest.la |
| 23 | libtest_la_LIBADD = $(libcrypto_la_objects) | 88 | libtest_la_LIBADD = $(libcrypto_la_objects) |
| 24 | libtest_la_LIBADD += $(libcompat_la_objects) | 89 | libtest_la_LIBADD += $(libcompat_la_objects) |
| @@ -37,6 +102,13 @@ check_PROGRAMS = | |||
| 37 | EXTRA_DIST = CMakeLists.txt | 102 | EXTRA_DIST = CMakeLists.txt |
| 38 | DISTCLEANFILES = pidwraptest.txt | 103 | DISTCLEANFILES = pidwraptest.txt |
| 39 | 104 | ||
| 105 | # XXX - should probably be in their own static lib | ||
| 106 | TEST_HELPER_SRC = test.c test_util.c | ||
| 107 | noinst_HEADERS = test.h | ||
| 108 | EXTRA_DIST += $(TEST_HELPER_SRC) | ||
| 109 | # Needed by test helper on MSVC | ||
| 110 | EXTRA_DIST += compat/mkstemp.c | ||
| 111 | |||
| 40 | # aeadtest | 112 | # aeadtest |
| 41 | TESTS += aeadtest.sh | 113 | TESTS += aeadtest.sh |
| 42 | check_PROGRAMS += aeadtest | 114 | check_PROGRAMS += aeadtest |
| @@ -193,6 +265,11 @@ TESTS += bn_convert | |||
| 193 | check_PROGRAMS += bn_convert | 265 | check_PROGRAMS += bn_convert |
| 194 | bn_convert_SOURCES = bn_convert.c | 266 | bn_convert_SOURCES = bn_convert.c |
| 195 | 267 | ||
| 268 | # bn_ffdh | ||
| 269 | TESTS += bn_ffdh | ||
| 270 | check_PROGRAMS += bn_ffdh | ||
| 271 | bn_ffdh_SOURCES = bn_ffdh.c | ||
| 272 | |||
| 196 | # bn_gcd | 273 | # bn_gcd |
| 197 | TESTS += bn_gcd | 274 | TESTS += bn_gcd |
| 198 | check_PROGRAMS += bn_gcd | 275 | check_PROGRAMS += bn_gcd |
| @@ -289,7 +366,7 @@ chachatest_SOURCES = chachatest.c | |||
| 289 | TESTS += cipher_list | 366 | TESTS += cipher_list |
| 290 | check_PROGRAMS += cipher_list | 367 | check_PROGRAMS += cipher_list |
| 291 | cipher_list_SOURCES = cipher_list.c | 368 | cipher_list_SOURCES = cipher_list.c |
| 292 | noinst_HEADERS = tests.h | 369 | noinst_HEADERS += tests.h |
| 293 | 370 | ||
| 294 | # cipherstest | 371 | # cipherstest |
| 295 | TESTS += cipherstest | 372 | TESTS += cipherstest |
| @@ -297,9 +374,9 @@ check_PROGRAMS += cipherstest | |||
| 297 | cipherstest_SOURCES = cipherstest.c | 374 | cipherstest_SOURCES = cipherstest.c |
| 298 | 375 | ||
| 299 | ## clienttest | 376 | ## clienttest |
| 300 | #TESTS += clienttest | 377 | TESTS += clienttest |
| 301 | #check_PROGRAMS += clienttest | 378 | check_PROGRAMS += clienttest |
| 302 | #clienttest_SOURCES = clienttest.c | 379 | clienttest_SOURCES = clienttest.c |
| 303 | 380 | ||
| 304 | # cmstest | 381 | # cmstest |
| 305 | TESTS += cmstest | 382 | TESTS += cmstest |
| @@ -389,16 +466,16 @@ TESTS += ed25519test | |||
| 389 | check_PROGRAMS += ed25519test | 466 | check_PROGRAMS += ed25519test |
| 390 | ed25519test_SOURCES = ed25519test.c | 467 | ed25519test_SOURCES = ed25519test.c |
| 391 | 468 | ||
| 469 | # err_test | ||
| 470 | TESTS += err_test | ||
| 471 | check_PROGRAMS += err_test | ||
| 472 | err_test_SOURCES = err_test.c | ||
| 473 | |||
| 392 | # evp_ecx_test | 474 | # evp_ecx_test |
| 393 | TESTS += evp_ecx_test | 475 | TESTS += evp_ecx_test |
| 394 | check_PROGRAMS += evp_ecx_test | 476 | check_PROGRAMS += evp_ecx_test |
| 395 | evp_ecx_test_SOURCES = evp_ecx_test.c | 477 | evp_ecx_test_SOURCES = evp_ecx_test.c |
| 396 | 478 | ||
| 397 | # evp_pkey_check | ||
| 398 | TESTS += evp_pkey_check | ||
| 399 | check_PROGRAMS += evp_pkey_check | ||
| 400 | evp_pkey_check_SOURCES = evp_pkey_check.c | ||
| 401 | |||
| 402 | # evp_pkey_cleanup | 479 | # evp_pkey_cleanup |
| 403 | TESTS += evp_pkey_cleanup | 480 | TESTS += evp_pkey_cleanup |
| 404 | check_PROGRAMS += evp_pkey_cleanup | 481 | check_PROGRAMS += evp_pkey_cleanup |
| @@ -499,7 +576,36 @@ lhash_test_SOURCES = lhash_test.c | |||
| 499 | # md_test | 576 | # md_test |
| 500 | TESTS += md_test | 577 | TESTS += md_test |
| 501 | check_PROGRAMS += md_test | 578 | check_PROGRAMS += md_test |
| 502 | md_test_SOURCES = md_test.c | 579 | md_test_SOURCES = md_test.c $(TEST_HELPER_SRC) |
| 580 | |||
| 581 | noinst_HEADERS += mlkem_tests_util.h | ||
| 582 | noinst_HEADERS += parse_test_file.h | ||
| 583 | |||
| 584 | # mlkem_tests | ||
| 585 | TESTS += mlkem_tests.sh | ||
| 586 | check_PROGRAMS += mlkem_tests | ||
| 587 | mlkem_tests_SOURCES = mlkem_tests.c parse_test_file.c | ||
| 588 | EXTRA_DIST += mlkem_tests.sh mlkem_tests.bat | ||
| 589 | EXTRA_DIST += mlkem768_decap_tests.txt | ||
| 590 | EXTRA_DIST += mlkem768_encap_tests.txt | ||
| 591 | EXTRA_DIST += mlkem768_keygen_tests.txt | ||
| 592 | EXTRA_DIST += mlkem768_nist_decap_tests.txt | ||
| 593 | EXTRA_DIST += mlkem768_nist_keygen_tests.txt | ||
| 594 | EXTRA_DIST += mlkem1024_decap_tests.txt | ||
| 595 | EXTRA_DIST += mlkem1024_encap_tests.txt | ||
| 596 | EXTRA_DIST += mlkem1024_keygen_tests.txt | ||
| 597 | EXTRA_DIST += mlkem1024_nist_decap_tests.txt | ||
| 598 | EXTRA_DIST += mlkem1024_nist_keygen_tests.txt | ||
| 599 | |||
| 600 | # mlkem_iteration_tests | ||
| 601 | TESTS += mlkem_iteration_tests | ||
| 602 | check_PROGRAMS += mlkem_iteration_tests | ||
| 603 | mlkem_iteration_tests_SOURCES = mlkem_iteration_tests.c mlkem_tests_util.c | ||
| 604 | |||
| 605 | # mlkem_unittest | ||
| 606 | TESTS += mlkem_unittest | ||
| 607 | check_PROGRAMS += mlkem_unittest | ||
| 608 | mlkem_unittest_SOURCES = mlkem_unittest.c mlkem_tests_util.c | ||
| 503 | 609 | ||
| 504 | # objectstest | 610 | # objectstest |
| 505 | TESTS += objectstest | 611 | TESTS += objectstest |
| @@ -578,11 +684,9 @@ EXTRA_DIST += policy_root2.pem | |||
| 578 | EXTRA_DIST += policy_root_cross_inhibit_mapping.pem | 684 | EXTRA_DIST += policy_root_cross_inhibit_mapping.pem |
| 579 | 685 | ||
| 580 | # pq_test | 686 | # pq_test |
| 581 | TESTS += pq_test.sh | 687 | TESTS += pq_test |
| 582 | check_PROGRAMS += pq_test | 688 | check_PROGRAMS += pq_test |
| 583 | pq_test_SOURCES = pq_test.c | 689 | pq_test_SOURCES = pq_test.c |
| 584 | EXTRA_DIST += pq_test.sh pq_test.bat | ||
| 585 | EXTRA_DIST += pq_expected.txt | ||
| 586 | 690 | ||
| 587 | # quictest | 691 | # quictest |
| 588 | TESTS += quictest.sh | 692 | TESTS += quictest.sh |
| @@ -615,6 +719,12 @@ TESTS += record_layer_test | |||
| 615 | check_PROGRAMS += record_layer_test | 719 | check_PROGRAMS += record_layer_test |
| 616 | record_layer_test_SOURCES = record_layer_test.c | 720 | record_layer_test_SOURCES = record_layer_test.c |
| 617 | 721 | ||
| 722 | # renegotiation_test | ||
| 723 | TESTS += renegotiation_test.sh | ||
| 724 | check_PROGRAMS += renegotiation_test | ||
| 725 | renegotiation_test_SOURCES = renegotiation_test.c | ||
| 726 | EXTRA_DIST += renegotiation_test.sh renegotiation_test.bat | ||
| 727 | |||
| 618 | # rfc3779 | 728 | # rfc3779 |
| 619 | TESTS += rfc3779 | 729 | TESTS += rfc3779 |
| 620 | rfc3779_CPPFLAGS = $(AM_CPPFLAGS) | 730 | rfc3779_CPPFLAGS = $(AM_CPPFLAGS) |
| @@ -637,6 +747,11 @@ TESTS += rmd_test | |||
| 637 | check_PROGRAMS += rmd_test | 747 | check_PROGRAMS += rmd_test |
| 638 | rmd_test_SOURCES = rmd_test.c | 748 | rmd_test_SOURCES = rmd_test.c |
| 639 | 749 | ||
| 750 | # rsa_method_test | ||
| 751 | TESTS += rsa_method_test | ||
| 752 | check_PROGRAMS += rsa_method_test | ||
| 753 | rsa_method_test_SOURCES = rsa_method_test.c | ||
| 754 | |||
| 640 | # rsa_padding_test | 755 | # rsa_padding_test |
| 641 | TESTS += rsa_padding_test | 756 | TESTS += rsa_padding_test |
| 642 | check_PROGRAMS += rsa_padding_test | 757 | check_PROGRAMS += rsa_padding_test |
| @@ -658,7 +773,7 @@ EXTRA_DIST += servertest.sh servertest.bat | |||
| 658 | # sha_test | 773 | # sha_test |
| 659 | TESTS += sha_test | 774 | TESTS += sha_test |
| 660 | check_PROGRAMS += sha_test | 775 | check_PROGRAMS += sha_test |
| 661 | sha_test_SOURCES = sha_test.c | 776 | sha_test_SOURCES = sha_test.c $(TEST_HELPER_SRC) |
| 662 | 777 | ||
| 663 | # shutdowntest | 778 | # shutdowntest |
| 664 | TESTS += shutdowntest.sh | 779 | TESTS += shutdowntest.sh |
| @@ -795,11 +910,6 @@ TESTS += verifytest | |||
| 795 | check_PROGRAMS += verifytest | 910 | check_PROGRAMS += verifytest |
| 796 | verifytest_SOURCES = verifytest.c | 911 | verifytest_SOURCES = verifytest.c |
| 797 | 912 | ||
| 798 | # whirlpool | ||
| 799 | TESTS += whirlpool_test | ||
| 800 | check_PROGRAMS += whirlpool_test | ||
| 801 | whirlpool_test_SOURCES = whirlpool_test.c | ||
| 802 | |||
| 803 | # x25519test | 913 | # x25519test |
| 804 | TESTS += x25519test | 914 | TESTS += x25519test |
| 805 | check_PROGRAMS += x25519test | 915 | check_PROGRAMS += x25519test |
| @@ -830,10 +940,10 @@ TESTS += x509_info | |||
| 830 | check_PROGRAMS += x509_info | 940 | check_PROGRAMS += x509_info |
| 831 | x509_info_SOURCES = x509_info.c | 941 | x509_info_SOURCES = x509_info.c |
| 832 | 942 | ||
| 833 | # x509name | 943 | # x509_name_test |
| 834 | TESTS += x509name | 944 | TESTS += x509_name_test |
| 835 | check_PROGRAMS += x509name | 945 | check_PROGRAMS += x509_name_test |
| 836 | x509name_SOURCES = x509name.c | 946 | x509_name_test_SOURCES = x509_name_test.c |
| 837 | 947 | ||
| 838 | # x509req_ext | 948 | # x509req_ext |
| 839 | TESTS += x509req_ext | 949 | TESTS += x509req_ext |
diff --git a/tests/aeadtest.sh b/tests/aeadtest.sh index 212e354..bb09df2 100755 --- a/tests/aeadtest.sh +++ b/tests/aeadtest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2014 Brent Cook | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | TEST=./aeadtest | 18 | TEST=./aeadtest |
| 4 | if [ -e ./aeadtest.exe ]; then | 19 | if [ -e ./aeadtest.exe ]; then |
diff --git a/tests/arc4randomforktest.sh b/tests/arc4randomforktest.sh index fe03068..bbe7641 100755 --- a/tests/arc4randomforktest.sh +++ b/tests/arc4randomforktest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2014 Brent Cook | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | ./arc4randomforktest | 18 | ./arc4randomforktest |
| 4 | ./arc4randomforktest -b | 19 | ./arc4randomforktest -b |
diff --git a/tests/cmake/CMakeLists.txt b/tests/cmake/CMakeLists.txt index 956fbfd..c3b7c4f 100644 --- a/tests/cmake/CMakeLists.txt +++ b/tests/cmake/CMakeLists.txt | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | # | ||
| 2 | # Copyright (c) 2023 Pierre Wendling | ||
| 3 | # | ||
| 4 | # Permission to use, copy, modify, and distribute this software for any | ||
| 5 | # purpose with or without fee is hereby granted, provided that the above | ||
| 6 | # copyright notice and this permission notice appear in all copies. | ||
| 7 | # | ||
| 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | |||
| 1 | cmake_minimum_required(VERSION 3.5) | 16 | cmake_minimum_required(VERSION 3.5) |
| 2 | 17 | ||
| 3 | project(LibreSSL_Consumer LANGUAGES C) | 18 | project(LibreSSL_Consumer LANGUAGES C) |
diff --git a/tests/compat/mkstemp.c b/tests/compat/mkstemp.c new file mode 100644 index 0000000..fe3d15a --- /dev/null +++ b/tests/compat/mkstemp.c | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* | ||
| 2 | musl as a whole is licensed under the following standard MIT license: | ||
| 3 | |||
| 4 | ---------------------------------------------------------------------- | ||
| 5 | Copyright © 2005-2020 Rich Felker, et al. | ||
| 6 | |||
| 7 | Permission is hereby granted, free of charge, to any person obtaining | ||
| 8 | a copy of this software and associated documentation files (the | ||
| 9 | "Software"), to deal in the Software without restriction, including | ||
| 10 | without limitation the rights to use, copy, modify, merge, publish, | ||
| 11 | distribute, sublicense, and/or sell copies of the Software, and to | ||
| 12 | permit persons to whom the Software is furnished to do so, subject to | ||
| 13 | the following conditions: | ||
| 14 | |||
| 15 | The above copyright notice and this permission notice shall be | ||
| 16 | included in all copies or substantial portions of the Software. | ||
| 17 | |||
| 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
| 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
| 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
| 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
| 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 25 | ---------------------------------------------------------------------- | ||
| 26 | */ | ||
| 27 | |||
| 28 | #include <string.h> | ||
| 29 | #include <stdio.h> | ||
| 30 | #include <stdlib.h> | ||
| 31 | #include <fcntl.h> | ||
| 32 | #include <unistd.h> | ||
| 33 | #include <limits.h> | ||
| 34 | #include <errno.h> | ||
| 35 | |||
| 36 | #include <io.h> | ||
| 37 | |||
| 38 | int mkstemp(char *template) | ||
| 39 | { | ||
| 40 | int fd; | ||
| 41 | retry: | ||
| 42 | if (!_mktemp(template)) return -1; | ||
| 43 | fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600); | ||
| 44 | if (fd >= 0) return fd; | ||
| 45 | if (errno == EEXIST) { | ||
| 46 | /* this is safe because mktemp verified | ||
| 47 | * that we have a valid template string */ | ||
| 48 | strcpy(template+strlen(template)-6, "XXXXXX"); | ||
| 49 | goto retry; | ||
| 50 | } | ||
| 51 | return -1; | ||
| 52 | } | ||
diff --git a/tests/compat/pipe2.c b/tests/compat/pipe2.c index c27a858..d7b4062 100644 --- a/tests/compat/pipe2.c +++ b/tests/compat/pipe2.c | |||
| @@ -42,7 +42,7 @@ static int setfl(int fd, int flag) | |||
| 42 | static void create_issue_1069_sentinels(int socket_vector[2]) | 42 | static void create_issue_1069_sentinels(int socket_vector[2]) |
| 43 | { | 43 | { |
| 44 | int fd = open("CONIN$", O_RDONLY); | 44 | int fd = open("CONIN$", O_RDONLY); |
| 45 | if (fd == -1 || fd > socket_vector[0] && fd > socket_vector[1]) { | 45 | if (fd == -1 || (fd > socket_vector[0] && fd > socket_vector[1])) { |
| 46 | return; | 46 | return; |
| 47 | } | 47 | } |
| 48 | create_issue_1069_sentinels(socket_vector); | 48 | create_issue_1069_sentinels(socket_vector); |
diff --git a/tests/dtlstest.sh b/tests/dtlstest.sh index 8f9b229..f0b7161 100755 --- a/tests/dtlstest.sh +++ b/tests/dtlstest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2021 Kinichiro Inoguchi | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | 18 | ||
| 4 | dtlstest_bin=./dtlstest | 19 | dtlstest_bin=./dtlstest |
diff --git a/tests/evptest.sh b/tests/evptest.sh index ba44d75..ddd7445 100755 --- a/tests/evptest.sh +++ b/tests/evptest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2014 Brent Cook | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | TEST=./evptest | 18 | TEST=./evptest |
| 4 | if [ -e ./evptest.exe ]; then | 19 | if [ -e ./evptest.exe ]; then |
diff --git a/tests/keypairtest.sh b/tests/keypairtest.sh index 8bb7d9f..f2c20c4 100755 --- a/tests/keypairtest.sh +++ b/tests/keypairtest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2018 Kinichiro Inoguchi | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | TEST=./keypairtest | 18 | TEST=./keypairtest |
| 4 | if [ -e ./keypairtest.exe ]; then | 19 | if [ -e ./keypairtest.exe ]; then |
diff --git a/tests/mlkem_tests.bat b/tests/mlkem_tests.bat new file mode 100644 index 0000000..618c9e0 --- /dev/null +++ b/tests/mlkem_tests.bat | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | @echo off | ||
| 2 | setlocal enabledelayedexpansion | ||
| 3 | |||
| 4 | :: Copyright (c) 2025 Theo Beuhler | ||
| 5 | :: | ||
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 17 | |||
| 18 | set mlkem_tests_bin=%1 | ||
| 19 | set mlkem_tests_bin=%mlkem_tests_bin:/=\% | ||
| 20 | if not exist %mlkem_tests_bin% exit /b 1 | ||
| 21 | |||
| 22 | %mlkem_tests_bin% mlkem768_decap_tests %srcdir%\mlkem768_decap_tests.txt | ||
| 23 | if !errorlevel! neq 0 ( | ||
| 24 | exit /b 1 | ||
| 25 | ) | ||
| 26 | %mlkem_tests_bin% mlkem768_encap_tests %srcdir%\mlkem768_encap_tests.txt | ||
| 27 | if !errorlevel! neq 0 ( | ||
| 28 | exit /b 1 | ||
| 29 | ) | ||
| 30 | %mlkem_tests_bin% mlkem768_keygen_tests %srcdir%\mlkem768_keygen_tests.txt | ||
| 31 | if !errorlevel! neq 0 ( | ||
| 32 | exit /b 1 | ||
| 33 | ) | ||
| 34 | %mlkem_tests_bin% mlkem768_nist_decap_tests %srcdir%\mlkem768_nist_decap_tests.txt | ||
| 35 | if !errorlevel! neq 0 ( | ||
| 36 | exit /b 1 | ||
| 37 | ) | ||
| 38 | %mlkem_tests_bin% mlkem768_nist_keygen_tests %srcdir%\mlkem768_nist_keygen_tests.txt | ||
| 39 | if !errorlevel! neq 0 ( | ||
| 40 | exit /b 1 | ||
| 41 | ) | ||
| 42 | %mlkem_tests_bin% mlkem1024_decap_tests %srcdir%\mlkem1024_decap_tests.txt | ||
| 43 | if !errorlevel! neq 0 ( | ||
| 44 | exit /b 1 | ||
| 45 | ) | ||
| 46 | %mlkem_tests_bin% mlkem1024_encap_tests %srcdir%\mlkem1024_encap_tests.txt | ||
| 47 | if !errorlevel! neq 0 ( | ||
| 48 | exit /b 1 | ||
| 49 | ) | ||
| 50 | %mlkem_tests_bin% mlkem1024_keygen_tests %srcdir%\mlkem1024_keygen_tests.txt | ||
| 51 | if !errorlevel! neq 0 ( | ||
| 52 | exit /b 1 | ||
| 53 | ) | ||
| 54 | %mlkem_tests_bin% mlkem1024_nist_decap_tests %srcdir%\mlkem1024_nist_decap_tests.txt | ||
| 55 | if !errorlevel! neq 0 ( | ||
| 56 | exit /b 1 | ||
| 57 | ) | ||
| 58 | %mlkem_tests_bin% mlkem1024_nist_keygen_tests %srcdir%\mlkem1024_nist_keygen_tests.txt | ||
| 59 | if !errorlevel! neq 0 ( | ||
| 60 | exit /b 1 | ||
| 61 | ) | ||
| 62 | |||
| 63 | endlocal | ||
diff --git a/tests/mlkem_tests.sh b/tests/mlkem_tests.sh new file mode 100755 index 0000000..cbc0f0b --- /dev/null +++ b/tests/mlkem_tests.sh | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # Copyright (c) 2024 Theo Buehler | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 17 | set -e | ||
| 18 | |||
| 19 | TEST=./mlkem_tests | ||
| 20 | if [ -e ./mlkem_tests.exe ]; then | ||
| 21 | TEST=./mlkem_tests.exe | ||
| 22 | elif [ -e ./mlkem_tests.js ]; then | ||
| 23 | TEST="node ./mlkem_tests.js" | ||
| 24 | fi | ||
| 25 | |||
| 26 | if [ -z $srcdir ]; then | ||
| 27 | srcdir=. | ||
| 28 | fi | ||
| 29 | |||
| 30 | $TEST mlkem768_decap_tests $srcdir/mlkem768_decap_tests.txt | ||
| 31 | $TEST mlkem768_encap_tests $srcdir/mlkem768_encap_tests.txt | ||
| 32 | $TEST mlkem768_keygen_tests $srcdir/mlkem768_keygen_tests.txt | ||
| 33 | $TEST mlkem768_nist_decap_tests $srcdir/mlkem768_nist_decap_tests.txt | ||
| 34 | $TEST mlkem768_nist_keygen_tests $srcdir/mlkem768_nist_keygen_tests.txt | ||
| 35 | $TEST mlkem1024_decap_tests $srcdir/mlkem1024_decap_tests.txt | ||
| 36 | $TEST mlkem1024_encap_tests $srcdir/mlkem1024_encap_tests.txt | ||
| 37 | $TEST mlkem1024_keygen_tests $srcdir/mlkem1024_keygen_tests.txt | ||
| 38 | $TEST mlkem1024_nist_decap_tests $srcdir/mlkem1024_nist_decap_tests.txt | ||
| 39 | $TEST mlkem1024_nist_keygen_tests $srcdir/mlkem1024_nist_keygen_tests.txt | ||
diff --git a/tests/ocsptest.bat b/tests/ocsptest.bat index 2b6b66b..8d44ee0 100644 --- a/tests/ocsptest.bat +++ b/tests/ocsptest.bat | |||
| @@ -1,6 +1,19 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM ocspocsp_test_bin.bat | 3 | |
| 4 | :: Copyright (c) 2016 Kinichiro Inoguchi | ||
| 5 | :: | ||
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 4 | 17 | ||
| 5 | set ocsp_test_bin=%1 | 18 | set ocsp_test_bin=%1 |
| 6 | set ocsp_test_bin=%ocsp_test_bin:/=\% | 19 | set ocsp_test_bin=%ocsp_test_bin:/=\% |
diff --git a/tests/ocsptest.sh b/tests/ocsptest.sh index a1c266d..71c975e 100755 --- a/tests/ocsptest.sh +++ b/tests/ocsptest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2016 Brent Cook | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | TEST=./ocsp_test | 18 | TEST=./ocsp_test |
| 4 | if [ -e ./ocsp_test.exe ]; then | 19 | if [ -e ./ocsp_test.exe ]; then |
diff --git a/tests/pidwraptest.sh b/tests/pidwraptest.sh index 04fb5c4..d5a2f71 100755 --- a/tests/pidwraptest.sh +++ b/tests/pidwraptest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2014 Brent Cook | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | ./pidwraptest > pidwraptest.txt | 17 | ./pidwraptest > pidwraptest.txt |
| 3 | while read a b; | 18 | while read a b; |
| 4 | do | 19 | do |
diff --git a/tests/pq_test.bat b/tests/pq_test.bat deleted file mode 100644 index 084f06d..0000000 --- a/tests/pq_test.bat +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | @echo off | ||
| 2 | setlocal enabledelayedexpansion | ||
| 3 | REM pq_test.bat | ||
| 4 | |||
| 5 | set pq_test_bin=%1 | ||
| 6 | set pq_test_bin=%pq_test_bin:/=\% | ||
| 7 | if not exist %pq_test_bin% exit /b 1 | ||
| 8 | |||
| 9 | set pq_output=pq_output.txt | ||
| 10 | if exist %pq_output% del %pq_output% | ||
| 11 | |||
| 12 | %pq_test_bin% > %pq_output% | ||
| 13 | fc /b %pq_output% %srcdir%\pq_expected.txt | ||
| 14 | |||
| 15 | endlocal | ||
diff --git a/tests/pq_test.sh b/tests/pq_test.sh deleted file mode 100755 index eab6f3c..0000000 --- a/tests/pq_test.sh +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | set -e | ||
| 3 | TEST=./pq_test | ||
| 4 | if [ -e ./pq_test.exe ]; then | ||
| 5 | TEST=./pq_test.exe | ||
| 6 | elif [ -e ./pq_test.js ]; then | ||
| 7 | TEST="node ./pq_test.js" | ||
| 8 | fi | ||
| 9 | $TEST | diff -b $srcdir/pq_expected.txt - | ||
diff --git a/tests/quictest.bat b/tests/quictest.bat index 645fc2f..be731c8 100644 --- a/tests/quictest.bat +++ b/tests/quictest.bat | |||
| @@ -1,6 +1,19 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM quictest.bat | 3 | |
| 4 | :: Copyright (c) 2022 Brent Cook | ||
| 5 | :: | ||
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 4 | 17 | ||
| 5 | set quictest_bin=%1 | 18 | set quictest_bin=%1 |
| 6 | set quictest_bin=%quictest_bin:/=\% | 19 | set quictest_bin=%quictest_bin:/=\% |
diff --git a/tests/quictest.sh b/tests/quictest.sh index 23561ad..407a66b 100755 --- a/tests/quictest.sh +++ b/tests/quictest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2022 Brent Cook | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | 18 | ||
| 4 | quictest_bin=./quictest | 19 | quictest_bin=./quictest |
diff --git a/tests/renegotiation_test.bat b/tests/renegotiation_test.bat new file mode 100644 index 0000000..6691a39 --- /dev/null +++ b/tests/renegotiation_test.bat | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | @echo off | ||
| 2 | setlocal enabledelayedexpansion | ||
| 3 | |||
| 4 | :: Copyright (c) 2025 Theo Beuhler | ||
| 5 | :: | ||
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 17 | |||
| 18 | set renegotiation_test_bin=%1 | ||
| 19 | set renegotiation_test_bin=%renegotiation_test_bin:/=\% | ||
| 20 | if not exist %renegotiation_test_bin% exit /b 1 | ||
| 21 | |||
| 22 | %renegotiation_test_bin% %srcdir%\server1-rsa.pem %srcdir%\server1-rsa-chain.pem %srcdir%\ca-root-rsa.pem | ||
| 23 | if !errorlevel! neq 0 ( | ||
| 24 | exit /b 1 | ||
| 25 | ) | ||
| 26 | |||
| 27 | endlocal | ||
diff --git a/tests/renegotiation_test.sh b/tests/renegotiation_test.sh new file mode 100755 index 0000000..8d963a2 --- /dev/null +++ b/tests/renegotiation_test.sh | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # Copyright (c) 2025 Theo Buehler | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 17 | set -e | ||
| 18 | |||
| 19 | renegotiation_test_bin=./renegotiation_test | ||
| 20 | if [ -e ./renegotiation_test.exe ]; then | ||
| 21 | renegotiation_test_bin=./renegotiation_test.exe | ||
| 22 | elif [ -e ./renegotiation_test.js ]; then | ||
| 23 | renegotiation_test_bin="node ./renegotiation_test.js" | ||
| 24 | fi | ||
| 25 | |||
| 26 | if [ -z $srcdir ]; then | ||
| 27 | srcdir=. | ||
| 28 | fi | ||
| 29 | |||
| 30 | $renegotiation_test_bin $srcdir/server1-rsa.pem $srcdir/server1-rsa-chain.pem $srcdir/ca-root-rsa.pem | ||
diff --git a/tests/servertest.bat b/tests/servertest.bat index c0bfaa4..d72d8de 100644 --- a/tests/servertest.bat +++ b/tests/servertest.bat | |||
| @@ -1,6 +1,19 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM servertest.bat | 3 | |
| 4 | :: Copyright (c) 2017 Kinichiro Inoguchi | ||
| 5 | :: | ||
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 4 | 17 | ||
| 5 | set servertest_bin=%1 | 18 | set servertest_bin=%1 |
| 6 | set servertest_bin=%servertest_bin:/=\% | 19 | set servertest_bin=%servertest_bin:/=\% |
diff --git a/tests/servertest.sh b/tests/servertest.sh index 1662332..4770e4b 100755 --- a/tests/servertest.sh +++ b/tests/servertest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2017 Kinichiro Inoguchi | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | 18 | ||
| 4 | servertest_bin=./servertest | 19 | servertest_bin=./servertest |
diff --git a/tests/shutdowntest.bat b/tests/shutdowntest.bat index f087dbb..d722fa0 100644 --- a/tests/shutdowntest.bat +++ b/tests/shutdowntest.bat | |||
| @@ -1,6 +1,19 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM shutdowntest.bat | 3 | |
| 4 | :: Copyright (c) 2024 Theo Beuhler | ||
| 5 | :: | ||
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 4 | 17 | ||
| 5 | set shutdowntest_bin=%1 | 18 | set shutdowntest_bin=%1 |
| 6 | set shutdowntest_bin=%shutdowntest_bin:/=\% | 19 | set shutdowntest_bin=%shutdowntest_bin:/=\% |
diff --git a/tests/shutdowntest.sh b/tests/shutdowntest.sh index d3ae472..b3c98da 100755 --- a/tests/shutdowntest.sh +++ b/tests/shutdowntest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2024 Theo Buehler | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | 18 | ||
| 4 | shutdowntest_bin=./shutdowntest | 19 | shutdowntest_bin=./shutdowntest |
diff --git a/tests/ssltest.bat b/tests/ssltest.bat index 5dda6bc..17f912f 100644 --- a/tests/ssltest.bat +++ b/tests/ssltest.bat | |||
| @@ -1,6 +1,19 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM ssltest.bat | 3 | |
| 4 | :: Copyright (c) 2016 Kinichiro Inoguchi | ||
| 5 | :: | ||
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 4 | 17 | ||
| 5 | set ssltest_bin=%1 | 18 | set ssltest_bin=%1 |
| 6 | set ssltest_bin=%ssltest_bin:/=\% | 19 | set ssltest_bin=%ssltest_bin:/=\% |
diff --git a/tests/ssltest.sh b/tests/ssltest.sh index 29ea0b0..4ec4884 100755 --- a/tests/ssltest.sh +++ b/tests/ssltest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2014 Brent Cook | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | 18 | ||
| 4 | ssltest_bin=./ssltest | 19 | ssltest_bin=./ssltest |
diff --git a/tests/testdsa.bat b/tests/testdsa.bat index 898ded8..df53305 100644 --- a/tests/testdsa.bat +++ b/tests/testdsa.bat | |||
| @@ -1,9 +1,21 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM testdsa.bat | ||
| 4 | 3 | ||
| 5 | 4 | :: Copyright (c) 2016 Kinichiro Inoguchi | |
| 6 | REM # Test DSA certificate generation of openssl | 5 | :: |
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 17 | |||
| 18 | :: Test DSA certificate generation of openssl | ||
| 7 | 19 | ||
| 8 | set openssl_bin=%1 | 20 | set openssl_bin=%1 |
| 9 | set openssl_bin=%openssl_bin:/=\% | 21 | set openssl_bin=%openssl_bin:/=\% |
diff --git a/tests/testdsa.sh b/tests/testdsa.sh index 7ecb8ef..230a1f8 100755 --- a/tests/testdsa.sh +++ b/tests/testdsa.sh | |||
| @@ -1,6 +1,18 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # $OpenBSD: testdsa.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | 2 | # |
| 3 | 3 | # Copyright (c) 2015 Brent Cook | |
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 4 | 16 | ||
| 5 | #Test DSA certificate generation of openssl | 17 | #Test DSA certificate generation of openssl |
| 6 | 18 | ||
diff --git a/tests/testenc.bat b/tests/testenc.bat index 84f48f2..fa14620 100644 --- a/tests/testenc.bat +++ b/tests/testenc.bat | |||
| @@ -1,6 +1,19 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM testenc.bat | 3 | |
| 4 | :: Copyright (c) 2016 Kinichiro Inoguchi | ||
| 5 | :: | ||
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 4 | 17 | ||
| 5 | set test=P | 18 | set test=P |
| 6 | 19 | ||
diff --git a/tests/testenc.sh b/tests/testenc.sh index 63bce34..418e48d 100755 --- a/tests/testenc.sh +++ b/tests/testenc.sh | |||
| @@ -1,5 +1,18 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # $OpenBSD: testenc.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | 2 | # |
| 3 | # Copyright (c) 2015 Brent Cook | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 3 | 16 | ||
| 4 | test=p | 17 | test=p |
| 5 | if [ -d ../apps/openssl ]; then | 18 | if [ -d ../apps/openssl ]; then |
diff --git a/tests/testrsa.bat b/tests/testrsa.bat index 59c3b5d..af59aad 100644 --- a/tests/testrsa.bat +++ b/tests/testrsa.bat | |||
| @@ -1,9 +1,21 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM testrsa.bat | ||
| 4 | 3 | ||
| 5 | 4 | :: Copyright (c) 2016 Kinichiro Inoguchi | |
| 6 | REM # Test RSA certificate generation of openssl | 5 | :: |
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 17 | |||
| 18 | :: Test RSA certificate generation of openssl | ||
| 7 | 19 | ||
| 8 | set openssl_bin=%1 | 20 | set openssl_bin=%1 |
| 9 | set openssl_bin=%openssl_bin:/=\% | 21 | set openssl_bin=%openssl_bin:/=\% |
diff --git a/tests/testrsa.sh b/tests/testrsa.sh index e644999..afbc610 100755 --- a/tests/testrsa.sh +++ b/tests/testrsa.sh | |||
| @@ -1,6 +1,18 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # $OpenBSD: testrsa.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | 2 | # |
| 3 | 3 | # Copyright (c) 2015 Brent Cook | |
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 4 | 16 | ||
| 5 | #Test RSA certificate generation of openssl | 17 | #Test RSA certificate generation of openssl |
| 6 | 18 | ||
diff --git a/tests/testssl.bat b/tests/testssl.bat index c4e6286..35a789a 100644 --- a/tests/testssl.bat +++ b/tests/testssl.bat | |||
| @@ -1,6 +1,19 @@ | |||
| 1 | @echo on | 1 | @echo on |
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM testssl.bat | 3 | |
| 4 | :: Copyright (c) 2016 Kinichiro Inoguchi | ||
| 5 | :: | ||
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 4 | 17 | ||
| 5 | set key=%1 | 18 | set key=%1 |
| 6 | set cert=%2 | 19 | set cert=%2 |
diff --git a/tests/tlstest.bat b/tests/tlstest.bat index 5f5f6a6..204201b 100644 --- a/tests/tlstest.bat +++ b/tests/tlstest.bat | |||
| @@ -1,6 +1,19 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM tlstest.bat | 3 | |
| 4 | :: Copyright (c) 2017 Brent Cook | ||
| 5 | :: | ||
| 6 | :: Permission to use, copy, modify, and distribute this software for any | ||
| 7 | :: purpose with or without fee is hereby granted, provided that the above | ||
| 8 | :: copyright notice and this permission notice appear in all copies. | ||
| 9 | :: | ||
| 10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 4 | 17 | ||
| 5 | set tlstest_bin=%1 | 18 | set tlstest_bin=%1 |
| 6 | set tlstest_bin=%tlstest_bin:/=\% | 19 | set tlstest_bin=%tlstest_bin:/=\% |
diff --git a/tests/tlstest.sh b/tests/tlstest.sh index 4024007..4a5aff6 100755 --- a/tests/tlstest.sh +++ b/tests/tlstest.sh | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | # Copyright (c) 2015 Brent Cook | ||
| 4 | # | ||
| 5 | # Permission to use, copy, modify, and distribute this software for any | ||
| 6 | # purpose with or without fee is hereby granted, provided that the above | ||
| 7 | # copyright notice and this permission notice appear in all copies. | ||
| 8 | # | ||
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | |||
| 2 | set -e | 17 | set -e |
| 3 | 18 | ||
| 4 | tlstest_bin=./tlstest | 19 | tlstest_bin=./tlstest |
