Test all built-in curves and let the library choose the EC_METHOD
authorBilly Brumley <bbrumley@gmail.com>
Wed, 27 Jan 2016 15:29:32 +0000 (17:29 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 27 Jan 2016 17:49:09 +0000 (18:49 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
test/ectest.c

index a8d0b55..f17b8b0 100644 (file)
@@ -1397,6 +1397,20 @@ static void internal_curve_test(void)
         fprintf(stdout, " failed\n\n");
         ABORT;
     }
+
+    /* Test all built-in curves and let the library choose the EC_METHOD */
+    for (n = 0; n < crv_len; n++) {
+        EC_GROUP *group = NULL;
+        int nid = curves[n].nid;
+        fprintf(stdout, "%s:\n", OBJ_nid2sn(nid));
+        fflush(stdout);
+        if ((group = EC_GROUP_new_by_curve_name(nid)) == NULL) {
+            ABORT;
+        }
+        group_order_tests(group);
+        EC_GROUP_free(group);
+    }
+
     OPENSSL_free(curves);
     return;
 }