Blame SOURCES/openssl-1.0.2c-ecc-suiteb.patch

cfec1a
diff -up openssl-1.0.2c/apps/speed.c.suiteb openssl-1.0.2c/apps/speed.c
cfec1a
--- openssl-1.0.2c/apps/speed.c.suiteb	2015-06-15 17:37:06.285083685 +0200
cfec1a
+++ openssl-1.0.2c/apps/speed.c	2015-06-15 17:37:06.335084836 +0200
cfec1a
@@ -996,78 +996,26 @@ int MAIN(int argc, char **argv)
cfec1a
         } else
cfec1a
 # endif
cfec1a
 # ifndef OPENSSL_NO_ECDSA
cfec1a
-        if (strcmp(*argv, "ecdsap160") == 0)
cfec1a
-            ecdsa_doit[R_EC_P160] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsap192") == 0)
cfec1a
-            ecdsa_doit[R_EC_P192] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsap224") == 0)
cfec1a
-            ecdsa_doit[R_EC_P224] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsap256") == 0)
cfec1a
+        if (strcmp(*argv, "ecdsap256") == 0)
cfec1a
             ecdsa_doit[R_EC_P256] = 2;
cfec1a
         else if (strcmp(*argv, "ecdsap384") == 0)
cfec1a
             ecdsa_doit[R_EC_P384] = 2;
cfec1a
         else if (strcmp(*argv, "ecdsap521") == 0)
cfec1a
             ecdsa_doit[R_EC_P521] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsak163") == 0)
cfec1a
-            ecdsa_doit[R_EC_K163] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsak233") == 0)
cfec1a
-            ecdsa_doit[R_EC_K233] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsak283") == 0)
cfec1a
-            ecdsa_doit[R_EC_K283] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsak409") == 0)
cfec1a
-            ecdsa_doit[R_EC_K409] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsak571") == 0)
cfec1a
-            ecdsa_doit[R_EC_K571] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsab163") == 0)
cfec1a
-            ecdsa_doit[R_EC_B163] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsab233") == 0)
cfec1a
-            ecdsa_doit[R_EC_B233] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsab283") == 0)
cfec1a
-            ecdsa_doit[R_EC_B283] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsab409") == 0)
cfec1a
-            ecdsa_doit[R_EC_B409] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdsab571") == 0)
cfec1a
-            ecdsa_doit[R_EC_B571] = 2;
cfec1a
         else if (strcmp(*argv, "ecdsa") == 0) {
cfec1a
-            for (i = 0; i < EC_NUM; i++)
cfec1a
+            for (i = R_EC_P256; i <= R_EC_P521; i++)
cfec1a
                 ecdsa_doit[i] = 1;
cfec1a
         } else
cfec1a
 # endif
cfec1a
 # ifndef OPENSSL_NO_ECDH
cfec1a
-        if (strcmp(*argv, "ecdhp160") == 0)
cfec1a
-            ecdh_doit[R_EC_P160] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhp192") == 0)
cfec1a
-            ecdh_doit[R_EC_P192] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhp224") == 0)
cfec1a
-            ecdh_doit[R_EC_P224] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhp256") == 0)
cfec1a
+        if (strcmp(*argv, "ecdhp256") == 0)
cfec1a
             ecdh_doit[R_EC_P256] = 2;
cfec1a
         else if (strcmp(*argv, "ecdhp384") == 0)
cfec1a
             ecdh_doit[R_EC_P384] = 2;
cfec1a
         else if (strcmp(*argv, "ecdhp521") == 0)
cfec1a
             ecdh_doit[R_EC_P521] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhk163") == 0)
cfec1a
-            ecdh_doit[R_EC_K163] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhk233") == 0)
cfec1a
-            ecdh_doit[R_EC_K233] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhk283") == 0)
cfec1a
-            ecdh_doit[R_EC_K283] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhk409") == 0)
cfec1a
-            ecdh_doit[R_EC_K409] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhk571") == 0)
cfec1a
-            ecdh_doit[R_EC_K571] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhb163") == 0)
cfec1a
-            ecdh_doit[R_EC_B163] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhb233") == 0)
cfec1a
-            ecdh_doit[R_EC_B233] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhb283") == 0)
cfec1a
-            ecdh_doit[R_EC_B283] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhb409") == 0)
cfec1a
-            ecdh_doit[R_EC_B409] = 2;
cfec1a
-        else if (strcmp(*argv, "ecdhb571") == 0)
cfec1a
-            ecdh_doit[R_EC_B571] = 2;
cfec1a
         else if (strcmp(*argv, "ecdh") == 0) {
cfec1a
-            for (i = 0; i < EC_NUM; i++)
cfec1a
+            for (i = R_EC_P256; i <= R_EC_P521; i++)
cfec1a
                 ecdh_doit[i] = 1;
cfec1a
         } else
cfec1a
 # endif
cfec1a
@@ -1156,21 +1104,11 @@ int MAIN(int argc, char **argv)
cfec1a
             BIO_printf(bio_err, "dsa512   dsa1024  dsa2048\n");
cfec1a
 # endif
cfec1a
 # ifndef OPENSSL_NO_ECDSA
cfec1a
-            BIO_printf(bio_err, "ecdsap160 ecdsap192 ecdsap224 "
cfec1a
-                       "ecdsap256 ecdsap384 ecdsap521\n");
cfec1a
-            BIO_printf(bio_err,
cfec1a
-                       "ecdsak163 ecdsak233 ecdsak283 ecdsak409 ecdsak571\n");
cfec1a
-            BIO_printf(bio_err,
cfec1a
-                       "ecdsab163 ecdsab233 ecdsab283 ecdsab409 ecdsab571\n");
cfec1a
+            BIO_printf(bio_err, "ecdsap256 ecdsap384 ecdsap521\n");
cfec1a
             BIO_printf(bio_err, "ecdsa\n");
cfec1a
 # endif
cfec1a
 # ifndef OPENSSL_NO_ECDH
cfec1a
-            BIO_printf(bio_err, "ecdhp160  ecdhp192  ecdhp224 "
cfec1a
-                       "ecdhp256  ecdhp384  ecdhp521\n");
cfec1a
-            BIO_printf(bio_err,
cfec1a
-                       "ecdhk163  ecdhk233  ecdhk283  ecdhk409  ecdhk571\n");
cfec1a
-            BIO_printf(bio_err,
cfec1a
-                       "ecdhb163  ecdhb233  ecdhb283  ecdhb409  ecdhb571\n");
cfec1a
+            BIO_printf(bio_err, "ecdhp256  ecdhp384  ecdhp521\n");
cfec1a
             BIO_printf(bio_err, "ecdh\n");
cfec1a
 # endif
cfec1a
 
cfec1a
@@ -1255,11 +1193,11 @@ int MAIN(int argc, char **argv)
cfec1a
             if (!FIPS_mode() || i != R_DSA_512)
cfec1a
                 dsa_doit[i] = 1;
cfec1a
 # ifndef OPENSSL_NO_ECDSA
cfec1a
-        for (i = 0; i < EC_NUM; i++)
cfec1a
+        for (i = R_EC_P256; i <= R_EC_P521; i++)
cfec1a
             ecdsa_doit[i] = 1;
cfec1a
 # endif
cfec1a
 # ifndef OPENSSL_NO_ECDH
cfec1a
-        for (i = 0; i < EC_NUM; i++)
cfec1a
+        for (i = R_EC_P256; i <= R_EC_P521; i++)
cfec1a
             ecdh_doit[i] = 1;
cfec1a
 # endif
cfec1a
     }
cfec1a
diff -up openssl-1.0.2c/ssl/t1_lib.c.suiteb openssl-1.0.2c/ssl/t1_lib.c
cfec1a
--- openssl-1.0.2c/ssl/t1_lib.c.suiteb	2015-06-12 16:51:27.000000000 +0200
cfec1a
+++ openssl-1.0.2c/ssl/t1_lib.c	2015-06-15 17:44:03.578681271 +0200
cfec1a
@@ -268,11 +268,7 @@ static const unsigned char eccurves_auto
cfec1a
     0, 23,                      /* secp256r1 (23) */
cfec1a
     /* Other >= 256-bit prime curves. */
cfec1a
     0, 25,                      /* secp521r1 (25) */
cfec1a
-    0, 28,                      /* brainpool512r1 (28) */
cfec1a
-    0, 27,                      /* brainpoolP384r1 (27) */
cfec1a
     0, 24,                      /* secp384r1 (24) */
cfec1a
-    0, 26,                      /* brainpoolP256r1 (26) */
cfec1a
-    0, 22,                      /* secp256k1 (22) */
cfec1a
 # ifndef OPENSSL_NO_EC2M
cfec1a
     /* >= 256-bit binary curves. */
cfec1a
     0, 14,                      /* sect571r1 (14) */
cfec1a
@@ -289,11 +285,7 @@ static const unsigned char eccurves_all[
cfec1a
     0, 23,                      /* secp256r1 (23) */
cfec1a
     /* Other >= 256-bit prime curves. */
cfec1a
     0, 25,                      /* secp521r1 (25) */
cfec1a
-    0, 28,                      /* brainpool512r1 (28) */
cfec1a
-    0, 27,                      /* brainpoolP384r1 (27) */
cfec1a
     0, 24,                      /* secp384r1 (24) */
cfec1a
-    0, 26,                      /* brainpoolP256r1 (26) */
cfec1a
-    0, 22,                      /* secp256k1 (22) */
cfec1a
 # ifndef OPENSSL_NO_EC2M
cfec1a
     /* >= 256-bit binary curves. */
cfec1a
     0, 14,                      /* sect571r1 (14) */
cfec1a
@@ -307,13 +299,6 @@ static const unsigned char eccurves_all[
cfec1a
      * Remaining curves disabled by default but still permitted if set
cfec1a
      * via an explicit callback or parameters.
cfec1a
      */
cfec1a
-    0, 20,                      /* secp224k1 (20) */
cfec1a
-    0, 21,                      /* secp224r1 (21) */
cfec1a
-    0, 18,                      /* secp192k1 (18) */
cfec1a
-    0, 19,                      /* secp192r1 (19) */
cfec1a
-    0, 15,                      /* secp160k1 (15) */
cfec1a
-    0, 16,                      /* secp160r1 (16) */
cfec1a
-    0, 17,                      /* secp160r2 (17) */
cfec1a
 # ifndef OPENSSL_NO_EC2M
cfec1a
     0, 8,                       /* sect239k1 (8) */
cfec1a
     0, 6,                       /* sect233k1 (6) */
cfec1a
@@ -348,29 +333,21 @@ static const unsigned char fips_curves_d
cfec1a
     0, 9,                       /* sect283k1 (9) */
cfec1a
     0, 10,                      /* sect283r1 (10) */
cfec1a
 #  endif
cfec1a
-    0, 22,                      /* secp256k1 (22) */
cfec1a
     0, 23,                      /* secp256r1 (23) */
cfec1a
 #  ifndef OPENSSL_NO_EC2M
cfec1a
     0, 8,                       /* sect239k1 (8) */
cfec1a
     0, 6,                       /* sect233k1 (6) */
cfec1a
     0, 7,                       /* sect233r1 (7) */
cfec1a
 #  endif
cfec1a
-    0, 20,                      /* secp224k1 (20) */
cfec1a
-    0, 21,                      /* secp224r1 (21) */
cfec1a
 #  ifndef OPENSSL_NO_EC2M
cfec1a
     0, 4,                       /* sect193r1 (4) */
cfec1a
     0, 5,                       /* sect193r2 (5) */
cfec1a
 #  endif
cfec1a
-    0, 18,                      /* secp192k1 (18) */
cfec1a
-    0, 19,                      /* secp192r1 (19) */
cfec1a
 #  ifndef OPENSSL_NO_EC2M
cfec1a
     0, 1,                       /* sect163k1 (1) */
cfec1a
     0, 2,                       /* sect163r1 (2) */
cfec1a
     0, 3,                       /* sect163r2 (3) */
cfec1a
 #  endif
cfec1a
-    0, 15,                      /* secp160k1 (15) */
cfec1a
-    0, 16,                      /* secp160r1 (16) */
cfec1a
-    0, 17,                      /* secp160r2 (17) */
cfec1a
 };
cfec1a
 # endif
cfec1a