diff options
| author | Theo Buehler <tb@openbsd.org> | 2026-03-18 23:10:38 +0100 |
|---|---|---|
| committer | Theo Buehler <tb@openbsd.org> | 2026-03-18 23:10:38 +0100 |
| commit | 979d238b181325b2df6689275d7caf1b051b9689 (patch) | |
| tree | c0117f57b4aef756933fa12ba17d6782075b468f | |
| parent | f08fd7cd65734604598abf8a115ab54de748bb7c (diff) | |
| parent | bbc25e09f1c306a407e8ec6efd97dc1b3da126e8 (diff) | |
| download | portable-979d238b181325b2df6689275d7caf1b051b9689.tar.gz portable-979d238b181325b2df6689275d7caf1b051b9689.tar.bz2 portable-979d238b181325b2df6689275d7caf1b051b9689.zip | |
Land #1242 - update speed patch for ML-KEM
| -rw-r--r-- | patches/speed.c.patch | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/patches/speed.c.patch b/patches/speed.c.patch index 0f29358..b649e8e 100644 --- a/patches/speed.c.patch +++ b/patches/speed.c.patch | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | --- apps/openssl/speed.c.orig Thu Dec 18 07:45:00 2025 | 1 | --- apps/openssl/speed.c.orig 2026-03-18 18:00:10 |
| 2 | +++ apps/openssl/speed.c Thu Dec 18 07:45:12 2025 | 2 | +++ apps/openssl/speed.c 2026-03-18 18:00:28 |
| 3 | @@ -154,7 +154,16 @@ static void | 3 | @@ -156,7 +156,16 @@ static void print_result(int alg, int run_no, int coun |
| 4 | pkey_print_message(const char *str, const char *str2, | 4 | pkey_print_message(const char *str, const char *str2, |
| 5 | int bits, int sec); | 5 | int bits, int sec); |
| 6 | static void print_result(int alg, int run_no, int count, double time_used); | 6 | static void print_result(int alg, int run_no, int count, double time_used); |
| @@ -17,7 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | #define SIZE_NUM 5 | 18 | #define SIZE_NUM 5 |
| 19 | #define MAX_ECDH_SIZE 256 | 19 | #define MAX_ECDH_SIZE 256 |
| 20 | @@ -1089,8 +1098,10 @@ speed_main(int argc, char **argv) | 20 | @@ -1110,8 +1119,10 @@ speed_main(int argc, char **argv) |
| 21 | const EVP_CIPHER *evp_cipher = NULL; | 21 | const EVP_CIPHER *evp_cipher = NULL; |
| 22 | const EVP_MD *evp_md = NULL; | 22 | const EVP_MD *evp_md = NULL; |
| 23 | int decrypt = 0; | 23 | int decrypt = 0; |
| @@ -28,7 +28,7 @@ | |||
| 28 | const char *errstr = NULL; | 28 | const char *errstr = NULL; |
| 29 | 29 | ||
| 30 | if (pledge("stdio proc", NULL) == -1) { | 30 | if (pledge("stdio proc", NULL) == -1) { |
| 31 | @@ -1164,6 +1175,7 @@ speed_main(int argc, char **argv) | 31 | @@ -1187,6 +1198,7 @@ speed_main(int argc, char **argv) |
| 32 | decrypt = 1; | 32 | decrypt = 1; |
| 33 | j--; /* Otherwise, -decrypt gets confused with an | 33 | j--; /* Otherwise, -decrypt gets confused with an |
| 34 | * algorithm. */ | 34 | * algorithm. */ |
| @@ -36,7 +36,7 @@ | |||
| 36 | } else if (argc > 0 && strcmp(*argv, "-multi") == 0) { | 36 | } else if (argc > 0 && strcmp(*argv, "-multi") == 0) { |
| 37 | argc--; | 37 | argc--; |
| 38 | argv++; | 38 | argv++; |
| 39 | @@ -1178,6 +1190,7 @@ speed_main(int argc, char **argv) | 39 | @@ -1201,6 +1213,7 @@ speed_main(int argc, char **argv) |
| 40 | } | 40 | } |
| 41 | j--; /* Otherwise, -multi gets confused with an | 41 | j--; /* Otherwise, -multi gets confused with an |
| 42 | * algorithm. */ | 42 | * algorithm. */ |
| @@ -44,7 +44,7 @@ | |||
| 44 | } else if (argc > 0 && strcmp(*argv, "-unaligned") == 0) { | 44 | } else if (argc > 0 && strcmp(*argv, "-unaligned") == 0) { |
| 45 | argc--; | 45 | argc--; |
| 46 | argv++; | 46 | argv++; |
| 47 | @@ -1492,7 +1505,9 @@ speed_main(int argc, char **argv) | 47 | @@ -1524,7 +1537,9 @@ speed_main(int argc, char **argv) |
| 48 | BIO_printf(bio_err, "-evp e use EVP e.\n"); | 48 | BIO_printf(bio_err, "-evp e use EVP e.\n"); |
| 49 | BIO_printf(bio_err, "-decrypt time decryption instead of encryption (only EVP).\n"); | 49 | BIO_printf(bio_err, "-decrypt time decryption instead of encryption (only EVP).\n"); |
| 50 | BIO_printf(bio_err, "-mr produce machine readable output.\n"); | 50 | BIO_printf(bio_err, "-mr produce machine readable output.\n"); |
| @@ -54,7 +54,7 @@ | |||
| 54 | BIO_printf(bio_err, "-unaligned n use buffers with offset n from proper alignment.\n"); | 54 | BIO_printf(bio_err, "-unaligned n use buffers with offset n from proper alignment.\n"); |
| 55 | goto end; | 55 | goto end; |
| 56 | } | 56 | } |
| 57 | @@ -1501,8 +1516,10 @@ speed_main(int argc, char **argv) | 57 | @@ -1533,8 +1548,10 @@ speed_main(int argc, char **argv) |
| 58 | j++; | 58 | j++; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| @@ -65,7 +65,7 @@ | |||
| 65 | 65 | ||
| 66 | if (j == 0) { | 66 | if (j == 0) { |
| 67 | for (i = 0; i < ALGOR_NUM; i++) { | 67 | for (i = 0; i < ALGOR_NUM; i++) { |
| 68 | @@ -1573,11 +1590,13 @@ speed_main(int argc, char **argv) | 68 | @@ -1607,11 +1624,13 @@ speed_main(int argc, char **argv) |
| 69 | #define COND (run && count<0x7fffffff) | 69 | #define COND (run && count<0x7fffffff) |
| 70 | #define COUNT(d) (count) | 70 | #define COUNT(d) (count) |
| 71 | 71 | ||
| @@ -79,17 +79,17 @@ | |||
| 79 | 79 | ||
| 80 | #ifndef OPENSSL_NO_MD4 | 80 | #ifndef OPENSSL_NO_MD4 |
| 81 | if (doit[D_MD4]) { | 81 | if (doit[D_MD4]) { |
| 82 | @@ -2362,7 +2381,9 @@ speed_main(int argc, char **argv) | 82 | @@ -2513,7 +2532,9 @@ speed_main(int argc, char **argv) |
| 83 | ecdh_doit[j] = 0; | 83 | free(ss); |
| 84 | } | ||
| 85 | } | 84 | } |
| 85 | |||
| 86 | +#ifndef _WIN32 | 86 | +#ifndef _WIN32 |
| 87 | show_res: | 87 | show_res: |
| 88 | +#endif | 88 | +#endif |
| 89 | if (!mr) { | 89 | if (!mr) { |
| 90 | fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_VERSION)); | 90 | fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_VERSION)); |
| 91 | fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_BUILT_ON)); | 91 | fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_BUILT_ON)); |
| 92 | @@ -2518,11 +2539,15 @@ pkey_print_message(const char *str, const char *str2, | 92 | @@ -2695,11 +2716,15 @@ print_result(int alg, int run_no, int count, double ti |
| 93 | static void | 93 | static void |
| 94 | print_result(int alg, int run_no, int count, double time_used) | 94 | print_result(int alg, int run_no, int count, double time_used) |
| 95 | { | 95 | { |
| @@ -105,7 +105,7 @@ | |||
| 105 | static char * | 105 | static char * |
| 106 | sstrsep(char **string, const char *delim) | 106 | sstrsep(char **string, const char *delim) |
| 107 | { | 107 | { |
| 108 | @@ -2723,5 +2748,6 @@ do_multi(int multi) | 108 | @@ -2900,5 +2925,6 @@ do_multi(int multi) |
| 109 | free(fds); | 109 | free(fds); |
| 110 | return 1; | 110 | return 1; |
| 111 | } | 111 | } |
