summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2021-07-03 16:04:29 +0000
committerjsing <>2021-07-03 16:04:29 +0000
commite79eb28078c0d90b4c659f0698359ae69f15f007 (patch)
treece5fe5aef9fc6fc04faa4a1dd67942d90f9f32f6
parentb109ab19721cd800c089654efad1a02b3692e495 (diff)
downloadopenbsd-e79eb28078c0d90b4c659f0698359ae69f15f007.tar.gz
openbsd-e79eb28078c0d90b4c659f0698359ae69f15f007.tar.bz2
openbsd-e79eb28078c0d90b4c659f0698359ae69f15f007.zip
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).
-rw-r--r--src/regress/lib/libssl/ssl/ssltest.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/regress/lib/libssl/ssl/ssltest.c b/src/regress/lib/libssl/ssl/ssltest.c
index 9d64cfbada..97caf523ac 100644
--- a/src/regress/lib/libssl/ssl/ssltest.c
+++ b/src/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,
327 clock_t *c_time); 327 clock_t *c_time);
328int doit(SSL *s_ssl, SSL *c_ssl, long bytes); 328int doit(SSL *s_ssl, SSL *c_ssl, long bytes);
329 329
330#if 0
331static int do_test_cipherlist(void);
332#endif
333
334static void 330static void
335sv_usage(void) 331sv_usage(void)
336{ 332{
@@ -365,7 +361,6 @@ sv_usage(void)
365 fprintf(stderr, " -named_curve arg - Elliptic curve name to use for ephemeral ECDH keys.\n" \ 361 fprintf(stderr, " -named_curve arg - Elliptic curve name to use for ephemeral ECDH keys.\n" \
366 " Use \"openssl ecparam -list_curves\" for all names\n" \ 362 " Use \"openssl ecparam -list_curves\" for all names\n" \
367 " (default is sect163r2).\n"); 363 " (default is sect163r2).\n");
368 fprintf(stderr, " -test_cipherlist - verifies the order of the ssl cipher lists\n");
369 fprintf(stderr, " -alpn_client <string> - have client side offer ALPN\n"); 364 fprintf(stderr, " -alpn_client <string> - have client side offer ALPN\n");
370 fprintf(stderr, " -alpn_server <string> - have server side offer ALPN\n"); 365 fprintf(stderr, " -alpn_server <string> - have server side offer ALPN\n");
371 fprintf(stderr, " -alpn_expected <string> - the ALPN protocol that should be negotiated\n"); 366 fprintf(stderr, " -alpn_expected <string> - the ALPN protocol that should be negotiated\n");
@@ -435,7 +430,6 @@ main(int argc, char *argv[])
435 int no_ecdhe = 0; 430 int no_ecdhe = 0;
436 int print_time = 0; 431 int print_time = 0;
437 clock_t s_time = 0, c_time = 0; 432 clock_t s_time = 0, c_time = 0;
438 int test_cipherlist = 0;
439 433
440 verbose = 0; 434 verbose = 0;
441 debug = 0; 435 debug = 0;
@@ -549,8 +543,6 @@ main(int argc, char *argv[])
549 app_verify_arg.app_verify = 1; 543 app_verify_arg.app_verify = 1;
550 } else if (strcmp(*argv, "-proxy") == 0) { 544 } else if (strcmp(*argv, "-proxy") == 0) {
551 app_verify_arg.allow_proxy_certs = 1; 545 app_verify_arg.allow_proxy_certs = 1;
552 } else if (strcmp(*argv, "-test_cipherlist") == 0) {
553 test_cipherlist = 1;
554 } else if (strcmp(*argv, "-alpn_client") == 0) { 546 } else if (strcmp(*argv, "-alpn_client") == 0) {
555 if (--argc < 1) 547 if (--argc < 1)
556 goto bad; 548 goto bad;
@@ -577,16 +569,6 @@ bad:
577 goto end; 569 goto end;
578 } 570 }
579 571
580#if 0
581 if (test_cipherlist == 1) {
582 /* ensure that the cipher list are correctly sorted and exit */
583 if (do_test_cipherlist() == 0)
584 exit(1);
585 ret = 0;
586 goto end;
587 }
588#endif
589
590 if (!dtls1 && !tls1 && !tls1_2 && number > 1 && !reuse && !force) { 572 if (!dtls1 && !tls1 && !tls1_2 && number > 1 && !reuse && !force) {
591 fprintf(stderr, 573 fprintf(stderr,
592 "This case cannot work. Use -f to perform " 574 "This case cannot work. Use -f to perform "
@@ -1927,30 +1909,3 @@ get_dh1024dsa()
1927 dh->length = 160; 1909 dh->length = 160;
1928 return (dh); 1910 return (dh);
1929} 1911}
1930
1931#if 0
1932static int
1933do_test_cipherlist(void)
1934{
1935 int i = 0;
1936 const SSL_METHOD *meth;
1937 const SSL_CIPHER *ci, *tci = NULL;
1938
1939 fprintf(stderr, "testing TLSv1 cipher list order: ");
1940 meth = TLSv1_method();
1941 tci = NULL;
1942 while ((ci = meth->get_cipher(i++)) != NULL) {
1943 if (tci != NULL) {
1944 if (ci->id >= tci->id) {
1945 fprintf(stderr,
1946 "failed %lx vs. %lx\n", ci->id, tci->id);
1947 return 0;
1948 }
1949 }
1950 tci = ci;
1951 }
1952 fprintf(stderr, "ok\n");
1953
1954 return 1;
1955}
1956#endif