summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-06-18 09:26:22 +0100
committerRichard Levitte <levitte@openssl.org>2020-07-16 14:21:07 +0200
commit865adf97c9b8271788ee7293ecde9e8a643a1c45 (patch)
treed4fe29fa8c0587aa4316dc550d57526559f6f6f3 /apps
parent8dab4de53887639abc1152288fac76506beb87b3 (diff)
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 'apps')
-rw-r--r--apps/fipsinstall.c10
-rw-r--r--apps/lib/s_cb.c4
-rw-r--r--apps/mac.c6
3 files changed, 10 insertions, 10 deletions
diff --git a/apps/fipsinstall.c b/apps/fipsinstall.c
index 7efdd65d46..c8687bec8f 100644
--- a/apps/fipsinstall.c
+++ b/apps/fipsinstall.c
@@ -375,7 +375,7 @@ opthelp:
goto end;
}
- ctx = EVP_MAC_new_ctx(mac);
+ ctx = EVP_MAC_CTX_new(mac);
if (ctx == NULL) {
BIO_printf(bio_err, "Unable to create MAC CTX for module check\n");
goto end;
@@ -389,7 +389,7 @@ opthelp:
if (params == NULL)
goto end;
- if (!EVP_MAC_set_ctx_params(ctx, params)) {
+ if (!EVP_MAC_CTX_set_params(ctx, params)) {
BIO_printf(bio_err, "MAC parameter error\n");
ERR_print_errors(bio_err);
ok = 0;
@@ -399,7 +399,7 @@ opthelp:
goto end;
}
- ctx2 = EVP_MAC_dup_ctx(ctx);
+ ctx2 = EVP_MAC_CTX_dup(ctx);
if (ctx2 == NULL) {
BIO_printf(bio_err, "Unable to create MAC CTX for install indicator\n");
goto end;
@@ -459,8 +459,8 @@ cleanup:
BIO_free(module_bio);
sk_OPENSSL_STRING_free(opts);
EVP_MAC_free(mac);
- EVP_MAC_free_ctx(ctx2);
- EVP_MAC_free_ctx(ctx);
+ EVP_MAC_CTX_free(ctx2);
+ EVP_MAC_CTX_free(ctx);
OPENSSL_free(read_buffer);
free_config_and_unload(conf);
return ret;
diff --git a/apps/lib/s_cb.c b/apps/lib/s_cb.c
index de72bde9ed..ba9ef12afb 100644
--- a/apps/lib/s_cb.c
+++ b/apps/lib/s_cb.c
@@ -788,7 +788,7 @@ int generate_cookie_callback(SSL *ssl, unsigned char *cookie,
BIO_printf(bio_err, "HMAC not found\n");
goto end;
}
- ctx = EVP_MAC_new_ctx(hmac);
+ ctx = EVP_MAC_CTX_new(hmac);
if (ctx == NULL) {
BIO_printf(bio_err, "HMAC context allocation failed\n");
goto end;
@@ -797,7 +797,7 @@ int generate_cookie_callback(SSL *ssl, unsigned char *cookie,
*p++ = OSSL_PARAM_construct_octet_string(OSSL_MAC_PARAM_KEY, cookie_secret,
COOKIE_SECRET_LENGTH);
*p = OSSL_PARAM_construct_end();
- if (!EVP_MAC_set_ctx_params(ctx, params)) {
+ if (!EVP_MAC_CTX_set_params(ctx, params)) {
BIO_printf(bio_err, "HMAC context parameter setting failed\n");
goto end;
}
diff --git a/apps/mac.c b/apps/mac.c
index e84321b83a..30f0daabcc 100644
--- a/apps/mac.c
+++ b/apps/mac.c
@@ -114,7 +114,7 @@ opthelp:
goto opthelp;
}
- ctx = EVP_MAC_new_ctx(mac);
+ ctx = EVP_MAC_CTX_new(mac);
if (ctx == NULL)
goto err;
@@ -126,7 +126,7 @@ opthelp:
if (params == NULL)
goto err;
- if (!EVP_MAC_set_ctx_params(ctx, params)) {
+ if (!EVP_MAC_CTX_set_params(ctx, params)) {
BIO_printf(bio_err, "MAC parameter error\n");
ERR_print_errors(bio_err);
ok = 0;
@@ -199,7 +199,7 @@ err:
sk_OPENSSL_STRING_free(opts);
BIO_free(in);
BIO_free(out);
- EVP_MAC_free_ctx(ctx);
+ EVP_MAC_CTX_free(ctx);
EVP_MAC_free(mac);
return ret;
}