Blame SOURCES/gnutls-3.3.29-fips140-fix-ecdsa-kat-selftest.patch

74125d
--- a/lib/crypto-selftests-pk.c	2019-02-06 14:49:44.807422315 +0100
74125d
+++ b/lib/crypto-selftests-pk.c	2019-02-06 14:56:40.311049707 +0100
74125d
@@ -731,30 +731,9 @@
74125d
 			goto cleanup;
74125d
 		}
74125d
 
74125d
-		if (all == 0)
74125d
-			return 0;
74125d
 #endif
74125d
 
74125d
 		/* Test ECDSA */
74125d
-#ifdef ENABLE_NON_SUITEB_CURVES
74125d
-		PK_KNOWN_TEST(GNUTLS_PK_EC, 0,
74125d
-			      GNUTLS_CURVE_TO_BITS
74125d
-			      (GNUTLS_ECC_CURVE_SECP192R1),
74125d
-			      GNUTLS_DIG_SHA256, ecdsa_secp192r1_privkey,
74125d
-			      ecdsa_secp192r1_sig);
74125d
-		PK_TEST(GNUTLS_PK_EC, test_sig,
74125d
-			GNUTLS_CURVE_TO_BITS(GNUTLS_ECC_CURVE_SECP192R1),
74125d
-			GNUTLS_DIG_SHA256);
74125d
-
74125d
-		PK_KNOWN_TEST(GNUTLS_PK_EC, 0,
74125d
-			      GNUTLS_CURVE_TO_BITS
74125d
-			      (GNUTLS_ECC_CURVE_SECP224R1),
74125d
-			      GNUTLS_DIG_SHA256, ecdsa_secp224r1_privkey,
74125d
-			      ecdsa_secp224r1_sig);
74125d
-		PK_TEST(GNUTLS_PK_EC, test_sig,
74125d
-			GNUTLS_CURVE_TO_BITS(GNUTLS_ECC_CURVE_SECP224R1),
74125d
-			GNUTLS_DIG_SHA256);
74125d
-#endif
74125d
 		PK_KNOWN_TEST(GNUTLS_PK_EC, 0,
74125d
 			      GNUTLS_CURVE_TO_BITS
74125d
 			      (GNUTLS_ECC_CURVE_SECP256R1),
74125d
@@ -764,6 +743,9 @@
74125d
 			GNUTLS_CURVE_TO_BITS(GNUTLS_ECC_CURVE_SECP256R1),
74125d
 			GNUTLS_DIG_SHA256);
74125d
 
74125d
+		if (all == 0)
74125d
+			return 0;
74125d
+
74125d
 		PK_KNOWN_TEST(GNUTLS_PK_EC, 0,
74125d
 			      GNUTLS_CURVE_TO_BITS
74125d
 			      (GNUTLS_ECC_CURVE_SECP384R1),
74125d
@@ -782,6 +764,26 @@
74125d
 			GNUTLS_CURVE_TO_BITS(GNUTLS_ECC_CURVE_SECP521R1),
74125d
 			GNUTLS_DIG_SHA512);
74125d
 
74125d
+#ifdef ENABLE_NON_SUITEB_CURVES
74125d
+		PK_KNOWN_TEST(GNUTLS_PK_EC, 0,
74125d
+			      GNUTLS_CURVE_TO_BITS
74125d
+			      (GNUTLS_ECC_CURVE_SECP192R1),
74125d
+			      GNUTLS_DIG_SHA256, ecdsa_secp192r1_privkey,
74125d
+			      ecdsa_secp192r1_sig);
74125d
+		PK_TEST(GNUTLS_PK_EC, test_sig,
74125d
+			GNUTLS_CURVE_TO_BITS(GNUTLS_ECC_CURVE_SECP192R1),
74125d
+			GNUTLS_DIG_SHA256);
74125d
+
74125d
+		PK_KNOWN_TEST(GNUTLS_PK_EC, 0,
74125d
+			      GNUTLS_CURVE_TO_BITS
74125d
+			      (GNUTLS_ECC_CURVE_SECP224R1),
74125d
+			      GNUTLS_DIG_SHA256, ecdsa_secp224r1_privkey,
74125d
+			      ecdsa_secp224r1_sig);
74125d
+		PK_TEST(GNUTLS_PK_EC, test_sig,
74125d
+			GNUTLS_CURVE_TO_BITS(GNUTLS_ECC_CURVE_SECP224R1),
74125d
+			GNUTLS_DIG_SHA256);
74125d
+#endif
74125d
+
74125d
 		break;
74125d
 
74125d
 	default: