aboutsummaryrefslogtreecommitdiffstats
path: root/main/openssl/0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/openssl/0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch')
-rw-r--r--main/openssl/0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch29
1 files changed, 15 insertions, 14 deletions
diff --git a/main/openssl/0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch b/main/openssl/0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch
index a74c116267..1f6d9c3f90 100644
--- a/main/openssl/0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch
+++ b/main/openssl/0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch
@@ -1,7 +1,8 @@
-From 711ae63d2c715a34b15262b4dd4a48b09f02a400 Mon Sep 17 00:00:00 2001
+From 942f1af93b1cafbb4439aec0018da099af09a934 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Thu, 3 Jun 2010 09:02:13 +0300
-Subject: [PATCH 2/3] apps/speed: fix digest speed measurement and add hmac-sha1 test
+Subject: [PATCH 2/3] apps/speed: fix digest speed measurement and add
+ hmac-sha1 test
Merge the common code of testing digest speed, and make it reuse
existing context. Context creation can be heavy operation, and it's
@@ -11,11 +12,11 @@ like hmac tests do.
This also adds test for hmac-sha1 speed.
---
- apps/speed.c | 232 ++++++++++++++++++++++------------------------------------
- 1 files changed, 87 insertions(+), 145 deletions(-)
+ apps/speed.c | 232 ++++++++++++++++++++++-------------------------------------
+ 1 file changed, 87 insertions(+), 145 deletions(-)
diff --git a/apps/speed.c b/apps/speed.c
-index 393a7ba..6e375c6 100644
+index 84ce35d..116cf82 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -285,7 +285,7 @@ static void print_result(int alg,int run_no,int count,double time_used);
@@ -107,7 +108,7 @@ index 393a7ba..6e375c6 100644
#ifndef OPENSSL_NO_ECDH
static const int KDF1_SHA1_len = 20;
-@@ -503,7 +565,6 @@ int MAIN(int argc, char **argv)
+@@ -500,7 +562,6 @@ int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
@@ -115,7 +116,7 @@ index 393a7ba..6e375c6 100644
int mret=1;
long count=0,save_count=0;
int i,j,k;
-@@ -514,31 +575,6 @@ int MAIN(int argc, char **argv)
+@@ -511,31 +572,6 @@ int MAIN(int argc, char **argv)
unsigned rsa_num;
#endif
unsigned char md[EVP_MAX_MD_SIZE];
@@ -147,7 +148,7 @@ index 393a7ba..6e375c6 100644
#ifndef OPENSSL_NO_RC4
RC4_KEY rc4_ks;
#endif
-@@ -635,8 +671,8 @@ int MAIN(int argc, char **argv)
+@@ -631,8 +667,8 @@ int MAIN(int argc, char **argv)
#define D_IGE_128_AES 25
#define D_IGE_192_AES 26
#define D_IGE_256_AES 27
@@ -157,7 +158,7 @@ index 393a7ba..6e375c6 100644
#define R_DSA_512 0
#define R_DSA_1024 1
#define R_DSA_2048 2
-@@ -945,6 +981,8 @@ int MAIN(int argc, char **argv)
+@@ -938,6 +974,8 @@ int MAIN(int argc, char **argv)
doit[D_SHA256]=1,
doit[D_SHA512]=1;
else
@@ -166,7 +167,7 @@ index 393a7ba..6e375c6 100644
#ifndef OPENSSL_NO_SHA256
if (strcmp(*argv,"sha256") == 0) doit[D_SHA256]=1;
else
-@@ -1158,6 +1196,9 @@ int MAIN(int argc, char **argv)
+@@ -1151,6 +1189,9 @@ int MAIN(int argc, char **argv)
#endif
#ifndef OPENSSL_NO_SHA1
BIO_printf(bio_err,"sha1 ");
@@ -176,7 +177,7 @@ index 393a7ba..6e375c6 100644
#endif
#ifndef OPENSSL_NO_SHA256
BIO_printf(bio_err,"sha256 ");
-@@ -1420,6 +1461,7 @@ int MAIN(int argc, char **argv)
+@@ -1414,6 +1455,7 @@ int MAIN(int argc, char **argv)
c[D_IGE_128_AES][0]=count;
c[D_IGE_192_AES][0]=count;
c[D_IGE_256_AES][0]=count;
@@ -184,7 +185,7 @@ index 393a7ba..6e375c6 100644
for (i=1; i<SIZE_NUM; i++)
{
-@@ -1432,6 +1474,7 @@ int MAIN(int argc, char **argv)
+@@ -1426,6 +1468,7 @@ int MAIN(int argc, char **argv)
c[D_RMD160][i]=c[D_RMD160][0]*4*lengths[0]/lengths[i];
c[D_SHA256][i]=c[D_SHA256][0]*4*lengths[0]/lengths[i];
c[D_SHA512][i]=c[D_SHA512][0]*4*lengths[0]/lengths[i];
@@ -192,7 +193,7 @@ index 393a7ba..6e375c6 100644
}
for (i=1; i<SIZE_NUM; i++)
{
-@@ -1606,160 +1649,59 @@ int MAIN(int argc, char **argv)
+@@ -1600,160 +1643,59 @@ int MAIN(int argc, char **argv)
}
#endif
@@ -369,5 +370,5 @@ index 393a7ba..6e375c6 100644
#ifndef OPENSSL_NO_RC4
if (doit[D_RC4])
--
-1.7.0.4
+1.7.11.3