summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2021-06-10 11:27:31 +1000
committerPauli <pauli@openssl.org>2021-06-15 18:26:47 +1000
commit4d574312dbeba89f3bf874aabbbd67a25b1cdf87 (patch)
tree8e89ffc5e425ec37d0ffaafb930f22b804810a5e /apps
parentf147fa3e7def18076d158783d9c566619151878e (diff)
speed: use the app's libctx and property query when searching for algorithms
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15687)
Diffstat (limited to 'apps')
-rw-r--r--apps/speed.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 6822b83db6..c85d99a8eb 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -1804,11 +1804,13 @@ int speed_main(int argc, char **argv)
if (!have_cipher(names[i]))
doit[i] = 0;
}
- if ((mac = EVP_MAC_fetch(NULL, "GMAC", NULL)) != NULL)
+ if ((mac = EVP_MAC_fetch(app_get0_libctx(), "GMAC",
+ app_get0_propq())) != NULL)
EVP_MAC_free(mac);
else
doit[D_GHASH] = 0;
- if ((mac = EVP_MAC_fetch(NULL, "HMAC", NULL)) != NULL)
+ if ((mac = EVP_MAC_fetch(app_get0_libctx(), "HMAC",
+ app_get0_propq())) != NULL)
EVP_MAC_free(mac);
else
doit[D_HMAC] = 0;
@@ -1958,7 +1960,8 @@ int speed_main(int argc, char **argv)
if (doit[D_HMAC]) {
static const char hmac_key[] = "This is a key...";
int len = strlen(hmac_key);
- EVP_MAC *mac = EVP_MAC_fetch(NULL, "HMAC", NULL);
+ EVP_MAC *mac = EVP_MAC_fetch(app_get0_libctx(), "HMAC",
+ app_get0_propq());
OSSL_PARAM params[3];
if (mac == NULL || evp_mac_mdname == NULL)
@@ -2121,7 +2124,8 @@ int speed_main(int argc, char **argv)
}
if (doit[D_GHASH]) {
static const char gmac_iv[] = "0123456789ab";
- EVP_MAC *mac = EVP_MAC_fetch(NULL, "GMAC", NULL);
+ EVP_MAC *mac = EVP_MAC_fetch(app_get0_libctx(), "GMAC",
+ app_get0_propq());
OSSL_PARAM params[3];
if (mac == NULL)
@@ -2252,7 +2256,8 @@ int speed_main(int argc, char **argv)
}
if (doit[D_EVP_CMAC]) {
- EVP_MAC *mac = EVP_MAC_fetch(NULL, "CMAC", NULL);
+ EVP_MAC *mac = EVP_MAC_fetch(app_get0_libctx(), "CMAC",
+ app_get0_propq());
OSSL_PARAM params[3];
EVP_CIPHER *cipher = NULL;