Blame SOURCES/openssl-1.0.1e-ecc-suiteb.patch

a5ef24
diff -up openssl-1.0.1e/apps/speed.c.suiteb openssl-1.0.1e/apps/speed.c
a5ef24
--- openssl-1.0.1e/apps/speed.c.suiteb	2013-11-08 18:02:53.815229706 +0100
a5ef24
+++ openssl-1.0.1e/apps/speed.c	2013-11-08 18:04:47.016724297 +0100
a5ef24
@@ -966,49 +966,23 @@ int MAIN(int argc, char **argv)
a5ef24
 		else
a5ef24
 #endif
a5ef24
 #ifndef OPENSSL_NO_ECDSA
a5ef24
-		     if (strcmp(*argv,"ecdsap160") == 0) ecdsa_doit[R_EC_P160]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsap192") == 0) ecdsa_doit[R_EC_P192]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsap224") == 0) ecdsa_doit[R_EC_P224]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsap256") == 0) ecdsa_doit[R_EC_P256]=2;
a5ef24
+		if (strcmp(*argv,"ecdsap256") == 0) ecdsa_doit[R_EC_P256]=2;
a5ef24
 		else if (strcmp(*argv,"ecdsap384") == 0) ecdsa_doit[R_EC_P384]=2;
a5ef24
 		else if (strcmp(*argv,"ecdsap521") == 0) ecdsa_doit[R_EC_P521]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsak163") == 0) ecdsa_doit[R_EC_K163]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsak233") == 0) ecdsa_doit[R_EC_K233]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsak283") == 0) ecdsa_doit[R_EC_K283]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsak409") == 0) ecdsa_doit[R_EC_K409]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsak571") == 0) ecdsa_doit[R_EC_K571]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsab163") == 0) ecdsa_doit[R_EC_B163]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsab233") == 0) ecdsa_doit[R_EC_B233]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsab283") == 0) ecdsa_doit[R_EC_B283]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsab409") == 0) ecdsa_doit[R_EC_B409]=2;
a5ef24
-		else if (strcmp(*argv,"ecdsab571") == 0) ecdsa_doit[R_EC_B571]=2;
a5ef24
 		else if (strcmp(*argv,"ecdsa") == 0)
a5ef24
 			{
a5ef24
-			for (i=0; i < EC_NUM; i++)
a5ef24
+			for (i=R_EC_P256; i <= R_EC_P521; i++)
a5ef24
 				ecdsa_doit[i]=1;
a5ef24
 			}
a5ef24
 		else
a5ef24
 #endif
a5ef24
 #ifndef OPENSSL_NO_ECDH
a5ef24
-		     if (strcmp(*argv,"ecdhp160") == 0) ecdh_doit[R_EC_P160]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhp192") == 0) ecdh_doit[R_EC_P192]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhp224") == 0) ecdh_doit[R_EC_P224]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhp256") == 0) ecdh_doit[R_EC_P256]=2;
a5ef24
+		if (strcmp(*argv,"ecdhp256") == 0) ecdh_doit[R_EC_P256]=2;
a5ef24
 		else if (strcmp(*argv,"ecdhp384") == 0) ecdh_doit[R_EC_P384]=2;
a5ef24
 		else if (strcmp(*argv,"ecdhp521") == 0) ecdh_doit[R_EC_P521]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhk163") == 0) ecdh_doit[R_EC_K163]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhk233") == 0) ecdh_doit[R_EC_K233]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhk283") == 0) ecdh_doit[R_EC_K283]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhk409") == 0) ecdh_doit[R_EC_K409]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhk571") == 0) ecdh_doit[R_EC_K571]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhb163") == 0) ecdh_doit[R_EC_B163]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhb233") == 0) ecdh_doit[R_EC_B233]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhb283") == 0) ecdh_doit[R_EC_B283]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhb409") == 0) ecdh_doit[R_EC_B409]=2;
a5ef24
-		else if (strcmp(*argv,"ecdhb571") == 0) ecdh_doit[R_EC_B571]=2;
a5ef24
 		else if (strcmp(*argv,"ecdh") == 0)
a5ef24
 			{
a5ef24
-			for (i=0; i < EC_NUM; i++)
a5ef24
+			for (i=R_EC_P256; i <= R_EC_P521; i++)
a5ef24
 				ecdh_doit[i]=1;
a5ef24
 			}
a5ef24
 		else
a5ef24
@@ -1097,15 +1071,11 @@ int MAIN(int argc, char **argv)
a5ef24
 			BIO_printf(bio_err,"dsa512   dsa1024  dsa2048\n");
a5ef24
 #endif
a5ef24
 #ifndef OPENSSL_NO_ECDSA
a5ef24
-			BIO_printf(bio_err,"ecdsap160 ecdsap192 ecdsap224 ecdsap256 ecdsap384 ecdsap521\n");
a5ef24
-			BIO_printf(bio_err,"ecdsak163 ecdsak233 ecdsak283 ecdsak409 ecdsak571\n");
a5ef24
-			BIO_printf(bio_err,"ecdsab163 ecdsab233 ecdsab283 ecdsab409 ecdsab571\n");
a5ef24
+			BIO_printf(bio_err,"ecdsap256 ecdsap384 ecdsap521\n");
a5ef24
 			BIO_printf(bio_err,"ecdsa\n");
a5ef24
 #endif
a5ef24
 #ifndef OPENSSL_NO_ECDH
a5ef24
-			BIO_printf(bio_err,"ecdhp160  ecdhp192  ecdhp224  ecdhp256  ecdhp384  ecdhp521\n");
a5ef24
-			BIO_printf(bio_err,"ecdhk163  ecdhk233  ecdhk283  ecdhk409  ecdhk571\n");
a5ef24
-			BIO_printf(bio_err,"ecdhb163  ecdhb233  ecdhb283  ecdhb409  ecdhb571\n");
a5ef24
+			BIO_printf(bio_err,"ecdhp256  ecdhp384 ecdhp521\n");
a5ef24
 			BIO_printf(bio_err,"ecdh\n");
a5ef24
 #endif
a5ef24
 
a5ef24
@@ -1184,11 +1154,11 @@ int MAIN(int argc, char **argv)
a5ef24
 		    if (!FIPS_mode() || i != R_DSA_512)
a5ef24
 			dsa_doit[i]=1;
a5ef24
 #ifndef OPENSSL_NO_ECDSA
a5ef24
-		for (i=0; i
a5ef24
+		for (i=R_EC_P256; i <= R_EC_P521; i++)
a5ef24
 			ecdsa_doit[i]=1;
a5ef24
 #endif
a5ef24
 #ifndef OPENSSL_NO_ECDH
a5ef24
-		for (i=0; i
a5ef24
+		for (i=R_EC_P256; i <= R_EC_P521; i++)
a5ef24
 			ecdh_doit[i]=1;
a5ef24
 #endif
a5ef24
 		}
a5ef24
diff -up openssl-1.0.1e/ssl/t1_lib.c.suiteb openssl-1.0.1e/ssl/t1_lib.c
a5ef24
--- openssl-1.0.1e/ssl/t1_lib.c.suiteb	2013-02-11 16:26:04.000000000 +0100
a5ef24
+++ openssl-1.0.1e/ssl/t1_lib.c	2013-11-08 18:05:27.551617554 +0100
a5ef24
@@ -204,31 +204,9 @@ static int nid_list[] =
a5ef24
 
a5ef24
 static int pref_list[] =
a5ef24
 	{
a5ef24
-		NID_sect571r1, /* sect571r1 (14) */ 
a5ef24
-		NID_sect571k1, /* sect571k1 (13) */ 
a5ef24
 		NID_secp521r1, /* secp521r1 (25) */	
a5ef24
-		NID_sect409k1, /* sect409k1 (11) */ 
a5ef24
-		NID_sect409r1, /* sect409r1 (12) */
a5ef24
 		NID_secp384r1, /* secp384r1 (24) */
a5ef24
-		NID_sect283k1, /* sect283k1 (9) */
a5ef24
-		NID_sect283r1, /* sect283r1 (10) */ 
a5ef24
-		NID_secp256k1, /* secp256k1 (22) */ 
a5ef24
 		NID_X9_62_prime256v1, /* secp256r1 (23) */ 
a5ef24
-		NID_sect239k1, /* sect239k1 (8) */ 
a5ef24
-		NID_sect233k1, /* sect233k1 (6) */
a5ef24
-		NID_sect233r1, /* sect233r1 (7) */ 
a5ef24
-		NID_secp224k1, /* secp224k1 (20) */ 
a5ef24
-		NID_secp224r1, /* secp224r1 (21) */
a5ef24
-		NID_sect193r1, /* sect193r1 (4) */ 
a5ef24
-		NID_sect193r2, /* sect193r2 (5) */ 
a5ef24
-		NID_secp192k1, /* secp192k1 (18) */
a5ef24
-		NID_X9_62_prime192v1, /* secp192r1 (19) */ 
a5ef24
-		NID_sect163k1, /* sect163k1 (1) */
a5ef24
-		NID_sect163r1, /* sect163r1 (2) */
a5ef24
-		NID_sect163r2, /* sect163r2 (3) */
a5ef24
-		NID_secp160k1, /* secp160k1 (15) */
a5ef24
-		NID_secp160r1, /* secp160r1 (16) */ 
a5ef24
-		NID_secp160r2, /* secp160r2 (17) */ 
a5ef24
 	};
a5ef24
 
a5ef24
 int tls1_ec_curve_id2nid(int curve_id)