summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJörg Sommer <joerg@jo-so.de>2023-06-15 18:16:49 +0200
committerTomas Mraz <tomas@openssl.org>2023-06-28 11:05:51 +0200
commitf41c7125f76ddfbb656aaf982ffbaf726cb5fd29 (patch)
tree2c5b7f509c36b150fdb21c927feb37459bf7c5db /apps
parent0dee3b0421047354abd0b70cedd4c1bceaf323b0 (diff)
openssl speed -multi -evp prints wrong algorithm name
When running `openssl speed -evp md5` the result shows `md5` as algorithm name. But when adding the option `-multi 2` it gives `evp` as algorithm name. Signed-off-by: Jörg Sommer <joerg@jo-so.de> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21216) (cherry picked from commit 33c09341bb081682535be0450ff6032df47ea141)
Diffstat (limited to 'apps')
-rw-r--r--apps/speed.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/speed.c b/apps/speed.c
index cace25eda1..bac393e316 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -3179,12 +3179,22 @@ skip_hmac:
}
for (k = 0; k < ALGOR_NUM; k++) {
+ const char *alg_name = names[k];
+
if (!doit[k])
continue;
+
+ if (k == D_EVP) {
+ if (evp_cipher == NULL)
+ alg_name = evp_md_name;
+ else if ((alg_name = EVP_CIPHER_get0_name(evp_cipher)) == NULL)
+ app_bail_out("failed to get name of cipher '%s'\n", evp_cipher);
+ }
+
if (mr)
- printf("+F:%u:%s", k, names[k]);
+ printf("+F:%u:%s", k, alg_name);
else
- printf("%-13s", names[k]);
+ printf("%-13s", alg_name);
for (testnum = 0; testnum < size_num; testnum++) {
if (results[k][testnum] > 10000 && !mr)
printf(" %11.2fk", results[k][testnum] / 1e3);