Skip to content

Commit

Permalink
openssl speed -multi -evp prints wrong algorithm name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jo-so committed Jun 25, 2023
1 parent a9e6100 commit 2475eeb
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions apps/speed.c
Original file line number Diff line number Diff line change
Expand Up @@ -3950,12 +3950,24 @@ int speed_main(int argc, char **argv)
}

for (k = 0; k < ALGOR_NUM; k++) {
const char *alg_name;

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);
} else {
alg_name = names[k];
}

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);
Expand Down

0 comments on commit 2475eeb

Please sign in to comment.