summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-06-18 10:26:22 +0200
committerRichard Levitte <levitte@openssl.org>2020-07-16 14:21:07 +0200
commit865adf97c9b8271788ee7293ecde9e8a643a1c45 (patch)
treed4fe29fa8c0587aa4316dc550d57526559f6f6f3 /test
parentAdd latest changes and news in CHANGES.md and NEWS.md (diff)
downloadopenssl-865adf97c9b8271788ee7293ecde9e8a643a1c45.tar.xz
openssl-865adf97c9b8271788ee7293ecde9e8a643a1c45.zip
Revert "The EVP_MAC functions have been renamed for consistency. The EVP_MAC_CTX_*"
The commit claimed to make things more consistent. In fact it makes it less so. Revert back to the previous namig convention. This reverts commit d9c2fd51e2e278bc3f7793a104ff7b4879f6d63a. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12186)
Diffstat (limited to 'test')
-rw-r--r--test/bad_dtls_test.c6
-rw-r--r--test/evp_test.c6
-rw-r--r--test/sslapitest.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/test/bad_dtls_test.c b/test/bad_dtls_test.c
index d2d6a6b426..bfbaa7953a 100644
--- a/test/bad_dtls_test.c
+++ b/test/bad_dtls_test.c
@@ -305,14 +305,14 @@ static int send_record(BIO *rbio, unsigned char type, uint64_t seqnr,
/* Append HMAC to data */
hmac = EVP_MAC_fetch(NULL, "HMAC", NULL);
- ctx = EVP_MAC_new_ctx(hmac);
+ ctx = EVP_MAC_CTX_new(hmac);
EVP_MAC_free(hmac);
params[0] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST,
"SHA1", 0);
params[1] = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY,
mac_key, 20);
params[2] = OSSL_PARAM_construct_end();
- EVP_MAC_set_ctx_params(ctx, params);
+ EVP_MAC_CTX_set_params(ctx, params);
EVP_MAC_init(ctx);
EVP_MAC_update(ctx, epoch, 2);
EVP_MAC_update(ctx, seq, 6);
@@ -323,7 +323,7 @@ static int send_record(BIO *rbio, unsigned char type, uint64_t seqnr,
EVP_MAC_update(ctx, lenbytes, 2); /* Length */
EVP_MAC_update(ctx, enc, len); /* Finally the data itself */
EVP_MAC_final(ctx, enc + len, NULL, SHA_DIGEST_LENGTH);
- EVP_MAC_free_ctx(ctx);
+ EVP_MAC_CTX_free(ctx);
/* Append padding bytes */
len += SHA_DIGEST_LENGTH;
diff --git a/test/evp_test.c b/test/evp_test.c
index 7e93b41f32..b9cbefd81e 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -1341,12 +1341,12 @@ static int mac_test_run_mac(EVP_TEST *t)
}
params[params_n] = OSSL_PARAM_construct_end();
- if ((ctx = EVP_MAC_new_ctx(expected->mac)) == NULL) {
+ if ((ctx = EVP_MAC_CTX_new(expected->mac)) == NULL) {
t->err = "MAC_CREATE_ERROR";
goto err;
}
- if (!EVP_MAC_set_ctx_params(ctx, params)) {
+ if (!EVP_MAC_CTX_set_params(ctx, params)) {
t->err = "MAC_BAD_PARAMS";
goto err;
}
@@ -1378,7 +1378,7 @@ static int mac_test_run_mac(EVP_TEST *t)
while (params_n-- > params_n_allocstart) {
OPENSSL_free(params[params_n].data);
}
- EVP_MAC_free_ctx(ctx);
+ EVP_MAC_CTX_free(ctx);
OPENSSL_free(got);
return 1;
}
diff --git a/test/sslapitest.c b/test/sslapitest.c
index 1a91f96fb9..ccee736592 100644
--- a/test/sslapitest.c
+++ b/test/sslapitest.c
@@ -7044,7 +7044,7 @@ static int tick_key_evp_cb(SSL *s, unsigned char key_name[16],
params[2] = OSSL_PARAM_construct_end();
if (aes128cbc == NULL
|| !EVP_CipherInit_ex(ctx, aes128cbc, NULL, tick_aes_key, iv, enc)
- || !EVP_MAC_set_ctx_params(hctx, params)
+ || !EVP_MAC_CTX_set_params(hctx, params)
|| !EVP_MAC_init(hctx))
ret = -1;
else