diff options
Diffstat (limited to 'src/usr.bin/openssl')
| -rw-r--r-- | src/usr.bin/openssl/openssl.c | 5 | ||||
| -rw-r--r-- | src/usr.bin/openssl/speed.c | 48 |
2 files changed, 12 insertions, 41 deletions
diff --git a/src/usr.bin/openssl/openssl.c b/src/usr.bin/openssl/openssl.c index 75a0e4d266..a1ef139009 100644 --- a/src/usr.bin/openssl/openssl.c +++ b/src/usr.bin/openssl/openssl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: openssl.c,v 1.39 2025/01/02 13:10:03 tb Exp $ */ | 1 | /* $OpenBSD: openssl.c,v 1.40 2025/05/25 04:54:41 joshua Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -235,9 +235,6 @@ FUNCTION functions[] = { | |||
| 235 | { FUNC_TYPE_MD, "sm3", dgst_main }, | 235 | { FUNC_TYPE_MD, "sm3", dgst_main }, |
| 236 | { FUNC_TYPE_MD, "sm3WithRSAEncryption", dgst_main }, | 236 | { FUNC_TYPE_MD, "sm3WithRSAEncryption", dgst_main }, |
| 237 | #endif | 237 | #endif |
| 238 | #ifndef OPENSSL_NO_WHIRLPOOL | ||
| 239 | { FUNC_TYPE_MD, "whirlpool", dgst_main }, | ||
| 240 | #endif | ||
| 241 | 238 | ||
| 242 | /* Ciphers. */ | 239 | /* Ciphers. */ |
| 243 | { FUNC_TYPE_CIPHER, "base64", enc_main }, | 240 | { FUNC_TYPE_CIPHER, "base64", enc_main }, |
diff --git a/src/usr.bin/openssl/speed.c b/src/usr.bin/openssl/speed.c index 3be0cc2ab1..2b44662170 100644 --- a/src/usr.bin/openssl/speed.c +++ b/src/usr.bin/openssl/speed.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: speed.c,v 1.44 2025/05/24 09:25:38 joshua Exp $ */ | 1 | /* $OpenBSD: speed.c,v 1.45 2025/05/25 04:54:41 joshua Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -142,9 +142,6 @@ | |||
| 142 | #ifndef OPENSSL_NO_SHA | 142 | #ifndef OPENSSL_NO_SHA |
| 143 | #include <openssl/sha.h> | 143 | #include <openssl/sha.h> |
| 144 | #endif | 144 | #endif |
| 145 | #ifndef OPENSSL_NO_WHIRLPOOL | ||
| 146 | #include <openssl/whrlpool.h> | ||
| 147 | #endif | ||
| 148 | 145 | ||
| 149 | #define BUFSIZE (1024*8+64) | 146 | #define BUFSIZE (1024*8+64) |
| 150 | volatile sig_atomic_t run; | 147 | volatile sig_atomic_t run; |
| @@ -160,7 +157,7 @@ pkey_print_message(const char *str, const char *str2, | |||
| 160 | static void print_result(int alg, int run_no, int count, double time_used); | 157 | static void print_result(int alg, int run_no, int count, double time_used); |
| 161 | static int do_multi(int multi); | 158 | static int do_multi(int multi); |
| 162 | 159 | ||
| 163 | #define ALGOR_NUM 32 | 160 | #define ALGOR_NUM 31 |
| 164 | #define SIZE_NUM 5 | 161 | #define SIZE_NUM 5 |
| 165 | #define RSA_NUM 4 | 162 | #define RSA_NUM 4 |
| 166 | #define DSA_NUM 3 | 163 | #define DSA_NUM 3 |
| @@ -174,7 +171,7 @@ static const char *names[ALGOR_NUM] = { | |||
| 174 | "rc2 cbc", "rc5-32/12 cbc", "blowfish cbc", "cast cbc", | 171 | "rc2 cbc", "rc5-32/12 cbc", "blowfish cbc", "cast cbc", |
| 175 | "aes-128 cbc", "aes-192 cbc", "aes-256 cbc", | 172 | "aes-128 cbc", "aes-192 cbc", "aes-256 cbc", |
| 176 | "camellia-128 cbc", "camellia-192 cbc", "camellia-256 cbc", | 173 | "camellia-128 cbc", "camellia-192 cbc", "camellia-256 cbc", |
| 177 | "evp", "sha256", "sha512", "whirlpool", | 174 | "evp", "sha256", "sha512", |
| 178 | "aes-128 ige", "aes-192 ige", "aes-256 ige", "ghash", | 175 | "aes-128 ige", "aes-192 ige", "aes-256 ige", "ghash", |
| 179 | "aes-128 gcm", "aes-256 gcm", "chacha20 poly1305", | 176 | "aes-128 gcm", "aes-256 gcm", "chacha20 poly1305", |
| 180 | }; | 177 | }; |
| @@ -1014,14 +1011,13 @@ speed_main(int argc, char **argv) | |||
| 1014 | #define D_EVP 21 | 1011 | #define D_EVP 21 |
| 1015 | #define D_SHA256 22 | 1012 | #define D_SHA256 22 |
| 1016 | #define D_SHA512 23 | 1013 | #define D_SHA512 23 |
| 1017 | #define D_WHIRLPOOL 24 | 1014 | #define D_IGE_128_AES 24 |
| 1018 | #define D_IGE_128_AES 25 | 1015 | #define D_IGE_192_AES 25 |
| 1019 | #define D_IGE_192_AES 26 | 1016 | #define D_IGE_256_AES 26 |
| 1020 | #define D_IGE_256_AES 27 | 1017 | #define D_GHASH 27 |
| 1021 | #define D_GHASH 28 | 1018 | #define D_AES_128_GCM 28 |
| 1022 | #define D_AES_128_GCM 29 | 1019 | #define D_AES_256_GCM 29 |
| 1023 | #define D_AES_256_GCM 30 | 1020 | #define D_CHACHA20_POLY1305 30 |
| 1024 | #define D_CHACHA20_POLY1305 31 | ||
| 1025 | double d = 0.0; | 1021 | double d = 0.0; |
| 1026 | long c[ALGOR_NUM][SIZE_NUM]; | 1022 | long c[ALGOR_NUM][SIZE_NUM]; |
| 1027 | #define R_DSA_512 0 | 1023 | #define R_DSA_512 0 |
| @@ -1240,11 +1236,6 @@ speed_main(int argc, char **argv) | |||
| 1240 | else | 1236 | else |
| 1241 | #endif | 1237 | #endif |
| 1242 | #endif | 1238 | #endif |
| 1243 | #ifndef OPENSSL_NO_WHIRLPOOL | ||
| 1244 | if (strcmp(*argv, "whirlpool") == 0) | ||
| 1245 | doit[D_WHIRLPOOL] = 1; | ||
| 1246 | else | ||
| 1247 | #endif | ||
| 1248 | #ifndef OPENSSL_NO_RIPEMD | 1239 | #ifndef OPENSSL_NO_RIPEMD |
| 1249 | if (strcmp(*argv, "ripemd") == 0) | 1240 | if (strcmp(*argv, "ripemd") == 0) |
| 1250 | doit[D_RMD160] = 1; | 1241 | doit[D_RMD160] = 1; |
| @@ -1427,16 +1418,12 @@ speed_main(int argc, char **argv) | |||
| 1427 | #ifndef OPENSSL_NO_SHA512 | 1418 | #ifndef OPENSSL_NO_SHA512 |
| 1428 | BIO_printf(bio_err, "sha512 "); | 1419 | BIO_printf(bio_err, "sha512 "); |
| 1429 | #endif | 1420 | #endif |
| 1430 | #ifndef OPENSSL_NO_WHIRLPOOL | ||
| 1431 | BIO_printf(bio_err, "whirlpool"); | ||
| 1432 | #endif | ||
| 1433 | #ifndef OPENSSL_NO_RIPEMD160 | 1421 | #ifndef OPENSSL_NO_RIPEMD160 |
| 1434 | BIO_printf(bio_err, "rmd160"); | 1422 | BIO_printf(bio_err, "rmd160"); |
| 1435 | #endif | 1423 | #endif |
| 1436 | #if !defined(OPENSSL_NO_MD2) || \ | 1424 | #if !defined(OPENSSL_NO_MD2) || \ |
| 1437 | !defined(OPENSSL_NO_MD4) || !defined(OPENSSL_NO_MD5) || \ | 1425 | !defined(OPENSSL_NO_MD4) || !defined(OPENSSL_NO_MD5) || \ |
| 1438 | !defined(OPENSSL_NO_SHA1) || !defined(OPENSSL_NO_RIPEMD160) || \ | 1426 | !defined(OPENSSL_NO_SHA1) || !defined(OPENSSL_NO_RIPEMD160) |
| 1439 | !defined(OPENSSL_NO_WHIRLPOOL) | ||
| 1440 | BIO_printf(bio_err, "\n"); | 1427 | BIO_printf(bio_err, "\n"); |
| 1441 | #endif | 1428 | #endif |
| 1442 | 1429 | ||
| @@ -1694,19 +1681,6 @@ speed_main(int argc, char **argv) | |||
| 1694 | #endif | 1681 | #endif |
| 1695 | #endif | 1682 | #endif |
| 1696 | 1683 | ||
| 1697 | #ifndef OPENSSL_NO_WHIRLPOOL | ||
| 1698 | if (doit[D_WHIRLPOOL]) { | ||
| 1699 | for (j = 0; j < SIZE_NUM; j++) { | ||
| 1700 | print_message(names[D_WHIRLPOOL], c[D_WHIRLPOOL][j], lengths[j]); | ||
| 1701 | Time_F(START); | ||
| 1702 | for (count = 0, run = 1; COND(c[D_WHIRLPOOL][j]); count++) | ||
| 1703 | WHIRLPOOL(buf, lengths[j], md); | ||
| 1704 | d = Time_F(STOP); | ||
| 1705 | print_result(D_WHIRLPOOL, j, count, d); | ||
| 1706 | } | ||
| 1707 | } | ||
| 1708 | #endif | ||
| 1709 | |||
| 1710 | #ifndef OPENSSL_NO_RIPEMD | 1684 | #ifndef OPENSSL_NO_RIPEMD |
| 1711 | if (doit[D_RMD160]) { | 1685 | if (doit[D_RMD160]) { |
| 1712 | for (j = 0; j < SIZE_NUM; j++) { | 1686 | for (j = 0; j < SIZE_NUM; j++) { |
