diff --git a/crypto/evp/CMakeLists.txt b/crypto/evp/CMakeLists.txt index 43e351a7..dc1734c9 100644 --- a/crypto/evp/CMakeLists.txt +++ b/crypto/evp/CMakeLists.txt @@ -23,9 +23,9 @@ add_library( add_executable( - example_sign + evp_test - example_sign.c + evp_test.c ) -target_link_libraries(example_sign crypto) +target_link_libraries(evp_test crypto) diff --git a/crypto/evp/example_sign.c b/crypto/evp/evp_test.c similarity index 98% rename from crypto/evp/example_sign.c rename to crypto/evp/evp_test.c index 616fc34d..670df37e 100644 --- a/crypto/evp/example_sign.c +++ b/crypto/evp/evp_test.c @@ -258,7 +258,7 @@ out: return ret; } -static int example_EVP_DigestSignInit(void) { +static int test_EVP_DigestSignInit(void) { int ret = 0; EVP_PKEY *pkey = NULL; uint8_t *sig = NULL; @@ -315,7 +315,7 @@ out: return ret; } -static int example_EVP_DigestVerifyInit(void) { +static int test_EVP_DigestVerifyInit(void) { int ret = 0; EVP_PKEY *pkey = NULL; EVP_MD_CTX md_ctx; @@ -449,7 +449,7 @@ out: return ret; } -static int example_EVP_DigestVerifyInitFromAlgorithm(void) { +static int test_EVP_DigestVerifyInitFromAlgorithm(void) { int ret = 0; CBS cert, cert_body, tbs_cert, algorithm, signature; uint8_t padding; @@ -543,12 +543,12 @@ int main(void) { CRYPTO_library_init(); ERR_load_crypto_strings(); - if (!example_EVP_DigestSignInit()) { + if (!test_EVP_DigestSignInit()) { fprintf(stderr, "EVP_DigestSignInit failed\n"); return 1; } - if (!example_EVP_DigestVerifyInit()) { + if (!test_EVP_DigestVerifyInit()) { fprintf(stderr, "EVP_DigestVerifyInit failed\n"); return 1; } @@ -558,7 +558,7 @@ int main(void) { return 1; } - if (!example_EVP_DigestVerifyInitFromAlgorithm()) { + if (!test_EVP_DigestVerifyInitFromAlgorithm()) { fprintf(stderr, "EVP_DigestVerifyInitFromAlgorithm failed\n"); return 1; } diff --git a/util/all_tests.sh b/util/all_tests.sh index de6800f8..f6188d1b 100644 --- a/util/all_tests.sh +++ b/util/all_tests.sh @@ -36,7 +36,7 @@ TESTS=" ./crypto/ec/example_mul ./crypto/ecdsa/ecdsa_test ./crypto/err/err_test -./crypto/evp/example_sign +./crypto/evp/evp_test ./crypto/hmac/hmac_test ./crypto/lhash/lhash_test ./crypto/md5/md5_test