diff options
author | Richard Levitte <levitte@openssl.org> | 2019-08-15 12:39:20 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-08-19 08:10:16 +0200 |
commit | 81ff9eebbcf15ce04b52cc4257b265617ba412eb (patch) | |
tree | 41a8d094bed2e3bfaa2b5f323134ca63241ee72b /test | |
parent | faee6b21048623a422d537cdbad24f50c5c21937 (diff) | |
download | openssl-81ff9eebbcf15ce04b52cc4257b265617ba412eb.tar.gz |
Use macros internally for algorithm names
The macros are defined in include/openssl/core_names.h and follow the
naming standard OSSL_{OPNAME}_NAME_{ALGONAME}, where {OPNAME} is the
name of the operation (such as MAC) and {ALGONAME} is the name of the
algorithm. Example: OSSL_MAC_NAME_HMAC
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9635)
Diffstat (limited to 'test')
-rw-r--r-- | test/evp_kdf_test.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/evp_kdf_test.c b/test/evp_kdf_test.c index b3d1648c0d..1a131a7995 100644 --- a/test/evp_kdf_test.c +++ b/test/evp_kdf_test.c @@ -15,6 +15,7 @@ #include <openssl/evp.h> #include <openssl/kdf.h> +#include <openssl/core_names.h> #include "testutil.h" static int test_kdf_tls1_prf(void) @@ -278,7 +279,8 @@ static int test_kdf_ss_hmac(void) ret = TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_SS)) - && TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MAC, "HMAC"), 0) + && TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MAC, + OSSL_MAC_NAME_HMAC), 0) && TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MD, EVP_sha256()), 0) && TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_KEY, z, sizeof(z)), 0) && TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SSKDF_INFO, other, @@ -317,7 +319,8 @@ static int test_kdf_ss_kmac(void) ret = TEST_ptr(kctx = EVP_KDF_CTX_new_id(EVP_KDF_SS)) - && TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MAC, "KMAC128"), 0) + && TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_MAC, + OSSL_MAC_NAME_KMAC128), 0) && TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_KEY, z, sizeof(z)), 0) && TEST_int_gt(EVP_KDF_ctrl(kctx, EVP_KDF_CTRL_SET_SSKDF_INFO, other, |