From: Billy Brumley Date: Wed, 27 Jan 2016 15:29:32 +0000 (+0200) Subject: Test all built-in curves and let the library choose the EC_METHOD X-Git-Tag: OpenSSL_1_1_0-pre3~400 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=920ed8c81d9f6ff76564add0cd4605ac0ff86c88;p=thirdparty%2Fopenssl.git Test all built-in curves and let the library choose the EC_METHOD Reviewed-by: Rich Salz Reviewed-by: Richard Levitte --- diff --git a/test/ectest.c b/test/ectest.c index a8d0b55bf4e..f17b8b04e1a 100644 --- a/test/ectest.c +++ b/test/ectest.c @@ -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; }