From: jsing Date: Sat, 3 Jul 2021 16:04:29 +0000 (+0000) Subject: Garbage collect do_test_cipherlist(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5155b370e4723353cdd830b74ed0dea2220ef72a;p=openbsd Garbage collect do_test_cipherlist(). This code no longer compiles and the equivalent test coverage has been added to regress/lib/libssl/ciphers (and is actually run). --- diff --git a/regress/lib/libssl/ssl/ssltest.c b/regress/lib/libssl/ssl/ssltest.c index 9d64cfbada5..97caf523acb 100644 --- a/regress/lib/libssl/ssl/ssltest.c +++ b/regress/lib/libssl/ssl/ssltest.c @@ -327,10 +327,6 @@ int doit_biopair(SSL *s_ssl, SSL *c_ssl, long bytes, clock_t *s_time, clock_t *c_time); int doit(SSL *s_ssl, SSL *c_ssl, long bytes); -#if 0 -static int do_test_cipherlist(void); -#endif - static void sv_usage(void) { @@ -365,7 +361,6 @@ sv_usage(void) fprintf(stderr, " -named_curve arg - Elliptic curve name to use for ephemeral ECDH keys.\n" \ " Use \"openssl ecparam -list_curves\" for all names\n" \ " (default is sect163r2).\n"); - fprintf(stderr, " -test_cipherlist - verifies the order of the ssl cipher lists\n"); fprintf(stderr, " -alpn_client - have client side offer ALPN\n"); fprintf(stderr, " -alpn_server - have server side offer ALPN\n"); fprintf(stderr, " -alpn_expected - the ALPN protocol that should be negotiated\n"); @@ -435,7 +430,6 @@ main(int argc, char *argv[]) int no_ecdhe = 0; int print_time = 0; clock_t s_time = 0, c_time = 0; - int test_cipherlist = 0; verbose = 0; debug = 0; @@ -549,8 +543,6 @@ main(int argc, char *argv[]) app_verify_arg.app_verify = 1; } else if (strcmp(*argv, "-proxy") == 0) { app_verify_arg.allow_proxy_certs = 1; - } else if (strcmp(*argv, "-test_cipherlist") == 0) { - test_cipherlist = 1; } else if (strcmp(*argv, "-alpn_client") == 0) { if (--argc < 1) goto bad; @@ -577,16 +569,6 @@ bad: goto end; } -#if 0 - if (test_cipherlist == 1) { - /* ensure that the cipher list are correctly sorted and exit */ - if (do_test_cipherlist() == 0) - exit(1); - ret = 0; - goto end; - } -#endif - if (!dtls1 && !tls1 && !tls1_2 && number > 1 && !reuse && !force) { fprintf(stderr, "This case cannot work. Use -f to perform " @@ -1927,30 +1909,3 @@ get_dh1024dsa() dh->length = 160; return (dh); } - -#if 0 -static int -do_test_cipherlist(void) -{ - int i = 0; - const SSL_METHOD *meth; - const SSL_CIPHER *ci, *tci = NULL; - - fprintf(stderr, "testing TLSv1 cipher list order: "); - meth = TLSv1_method(); - tci = NULL; - while ((ci = meth->get_cipher(i++)) != NULL) { - if (tci != NULL) { - if (ci->id >= tci->id) { - fprintf(stderr, - "failed %lx vs. %lx\n", ci->id, tci->id); - return 0; - } - } - tci = ci; - } - fprintf(stderr, "ok\n"); - - return 1; -} -#endif