[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Mon Jan 22 10:33:03 UTC 2018


The branch master has been updated
       via  da1a1b5ac417c4e38f7717082d69cb5f0ceda6b9 (commit)
      from  1e05c6d07ff963107286d028f6778d2ccc863a9a (commit)


- Log -----------------------------------------------------------------
commit da1a1b5ac417c4e38f7717082d69cb5f0ceda6b9
Author: Matt Caswell <matt at openssl.org>
Date:   Wed Jan 17 10:33:18 2018 +0000

    Don't attempt to use X25519 for ECDSA in speed
    
    Fixes #5090
    
    Reviewed-by: Ben Kaduk <kaduk at mit.edu>
    (Merged from https://github.com/openssl/openssl/pull/5097)

-----------------------------------------------------------------------

Summary of changes:
 apps/speed.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/apps/speed.c b/apps/speed.c
index f41acfb..df59ca6 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -1277,6 +1277,7 @@ int speed_main(int argc, char **argv)
     || !defined(OPENSSL_NO_EC)
     long rsa_count = 1;
 #endif
+    size_t loop;
 
     /* What follows are the buffers and key material. */
 #ifndef OPENSSL_NO_RC5
@@ -1561,8 +1562,8 @@ int speed_main(int argc, char **argv)
 #endif
 #ifndef OPENSSL_NO_EC
         if (strcmp(*argv, "ecdsa") == 0) {
-            for (i = 0; i < EC_NUM; i++)
-                ecdsa_doit[i] = 1;
+            for (loop = 0; loop < OSSL_NELEM(ecdsa_choices); loop++)
+                ecdsa_doit[ecdsa_choices[loop].retval] = 1;
             continue;
         }
         if (found(*argv, ecdsa_choices, &i)) {
@@ -1570,8 +1571,8 @@ int speed_main(int argc, char **argv)
             continue;
         }
         if (strcmp(*argv, "ecdh") == 0) {
-            for (i = 0; i < EC_NUM; i++)
-                ecdh_doit[i] = 1;
+            for (loop = 0; loop < OSSL_NELEM(ecdh_choices); loop++)
+                ecdh_doit[ecdh_choices[loop].retval] = 1;
             continue;
         }
         if (found(*argv, ecdh_choices, &i)) {
@@ -1643,10 +1644,10 @@ int speed_main(int argc, char **argv)
             dsa_doit[i] = 1;
 #endif
 #ifndef OPENSSL_NO_EC
-        for (i = 0; i < EC_NUM; i++)
-            ecdsa_doit[i] = 1;
-        for (i = 0; i < EC_NUM; i++)
-            ecdh_doit[i] = 1;
+        for (loop = 0; loop < OSSL_NELEM(ecdsa_choices); loop++)
+            ecdsa_doit[ecdsa_choices[loop].retval] = 1;
+        for (loop = 0; loop < OSSL_NELEM(ecdh_choices); loop++)
+            ecdh_doit[ecdh_choices[loop].retval] = 1;
 #endif
     }
     for (i = 0; i < ALGOR_NUM; i++)


More information about the openssl-commits mailing list