summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2014-12-14 14:48:00 +0000
committerjsing <>2014-12-14 14:48:00 +0000
commited32ef15371eb9622d8d20b1e10c0844574467da (patch)
tree44c7c12a306e2102c1ba4fe781e73d40a23a8e77 /src
parenta7291f40f745eb67bcb73b937f5c7bf57b9c87ce (diff)
downloadopenbsd-ed32ef15371eb9622d8d20b1e10c0844574467da.tar.gz
openbsd-ed32ef15371eb9622d8d20b1e10c0844574467da.tar.bz2
openbsd-ed32ef15371eb9622d8d20b1e10c0844574467da.zip
unifdef OPENSSL_NO_NEXTPROTONEG
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libssl/ssl/ssltest.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/regress/lib/libssl/ssl/ssltest.c b/src/regress/lib/libssl/ssl/ssltest.c
index fa869d0f24..91956a1322 100644
--- a/src/regress/lib/libssl/ssl/ssltest.c
+++ b/src/regress/lib/libssl/ssl/ssltest.c
@@ -201,7 +201,6 @@ static DH *get_dh1024dsa(void);
201static BIO *bio_err = NULL; 201static BIO *bio_err = NULL;
202static BIO *bio_stdout = NULL; 202static BIO *bio_stdout = NULL;
203 203
204#ifndef OPENSSL_NO_NEXTPROTONEG
205/* Note that this code assumes that this is only a one element list: */ 204/* Note that this code assumes that this is only a one element list: */
206static const char NEXT_PROTO_STRING[] = "\x09testproto"; 205static const char NEXT_PROTO_STRING[] = "\x09testproto";
207int npn_client = 0; 206int npn_client = 0;
@@ -282,7 +281,6 @@ verify_npn(SSL *client, SSL *server)
282 281
283 return (0); 282 return (0);
284} 283}
285#endif
286 284
287static const char *alpn_client; 285static const char *alpn_client;
288static const char *alpn_server; 286static const char *alpn_server;
@@ -451,11 +449,9 @@ sv_usage(void)
451 " Use \"openssl ecparam -list_curves\" for all names\n" \ 449 " Use \"openssl ecparam -list_curves\" for all names\n" \
452 " (default is sect163r2).\n"); 450 " (default is sect163r2).\n");
453 fprintf(stderr, " -test_cipherlist - verifies the order of the ssl cipher lists\n"); 451 fprintf(stderr, " -test_cipherlist - verifies the order of the ssl cipher lists\n");
454#ifndef OPENSSL_NO_NEXTPROTONEG
455 fprintf(stderr, " -npn_client - have client side offer NPN\n"); 452 fprintf(stderr, " -npn_client - have client side offer NPN\n");
456 fprintf(stderr, " -npn_server - have server side offer NPN\n"); 453 fprintf(stderr, " -npn_server - have server side offer NPN\n");
457 fprintf(stderr, " -npn_server_reject - have server reject NPN\n"); 454 fprintf(stderr, " -npn_server_reject - have server reject NPN\n");
458#endif
459 fprintf(stderr, " -alpn_client <string> - have client side offer ALPN\n"); 455 fprintf(stderr, " -alpn_client <string> - have client side offer ALPN\n");
460 fprintf(stderr, " -alpn_server <string> - have server side offer ALPN\n"); 456 fprintf(stderr, " -alpn_server <string> - have server side offer ALPN\n");
461 fprintf(stderr, " -alpn_expected <string> - the ALPN protocol that should be negotiated\n"); 457 fprintf(stderr, " -alpn_expected <string> - the ALPN protocol that should be negotiated\n");
@@ -700,7 +696,6 @@ main(int argc, char *argv[])
700 } else if (strcmp(*argv, "-test_cipherlist") == 0) { 696 } else if (strcmp(*argv, "-test_cipherlist") == 0) {
701 test_cipherlist = 1; 697 test_cipherlist = 1;
702 } 698 }
703#ifndef OPENSSL_NO_NEXTPROTONEG
704 else if (strcmp(*argv, "-npn_client") == 0) { 699 else if (strcmp(*argv, "-npn_client") == 0) {
705 npn_client = 1; 700 npn_client = 1;
706 } else if (strcmp(*argv, "-npn_server") == 0) { 701 } else if (strcmp(*argv, "-npn_server") == 0) {
@@ -708,7 +703,6 @@ main(int argc, char *argv[])
708 } else if (strcmp(*argv, "-npn_server_reject") == 0) { 703 } else if (strcmp(*argv, "-npn_server_reject") == 0) {
709 npn_server_reject = 1; 704 npn_server_reject = 1;
710 } 705 }
711#endif
712 else if (strcmp(*argv, "-alpn_client") == 0) { 706 else if (strcmp(*argv, "-alpn_client") == 0) {
713 if (--argc < 1) 707 if (--argc < 1)
714 goto bad; 708 goto bad;
@@ -878,7 +872,6 @@ bad:
878 (void *)&session_id_context, sizeof(session_id_context)); 872 (void *)&session_id_context, sizeof(session_id_context));
879 } 873 }
880 874
881#ifndef OPENSSL_NO_NEXTPROTONEG
882 if (npn_client) 875 if (npn_client)
883 SSL_CTX_set_next_proto_select_cb(c_ctx, cb_client_npn, NULL); 876 SSL_CTX_set_next_proto_select_cb(c_ctx, cb_client_npn, NULL);
884 if (npn_server) { 877 if (npn_server) {
@@ -894,7 +887,6 @@ bad:
894 SSL_CTX_set_next_protos_advertised_cb(s_ctx, 887 SSL_CTX_set_next_protos_advertised_cb(s_ctx,
895 cb_server_rejects_npn, NULL); 888 cb_server_rejects_npn, NULL);
896 } 889 }
897#endif
898 890
899 if (alpn_server != NULL) 891 if (alpn_server != NULL)
900 SSL_CTX_set_alpn_select_cb(s_ctx, cb_server_alpn, NULL); 892 SSL_CTX_set_alpn_select_cb(s_ctx, cb_server_alpn, NULL);
@@ -1309,12 +1301,10 @@ doit_biopair(SSL *s_ssl, SSL *c_ssl, long count, clock_t *s_time,
1309 if (verbose) 1301 if (verbose)
1310 print_details(c_ssl, "DONE via BIO pair: "); 1302 print_details(c_ssl, "DONE via BIO pair: ");
1311 1303
1312#ifndef OPENSSL_NO_NEXTPROTONEG
1313 if (verify_npn(c_ssl, s_ssl) < 0) { 1304 if (verify_npn(c_ssl, s_ssl) < 0) {
1314 ret = 1; 1305 ret = 1;
1315 goto err; 1306 goto err;
1316 } 1307 }
1317#endif
1318 if (verify_alpn(c_ssl, s_ssl) < 0) { 1308 if (verify_alpn(c_ssl, s_ssl) < 0) {
1319 ret = 1; 1309 ret = 1;
1320 goto err; 1310 goto err;
@@ -1566,12 +1556,10 @@ doit(SSL *s_ssl, SSL *c_ssl, long count)
1566 if (verbose) 1556 if (verbose)
1567 print_details(c_ssl, "DONE: "); 1557 print_details(c_ssl, "DONE: ");
1568 1558
1569#ifndef OPENSSL_NO_NEXTPROTONEG
1570 if (verify_npn(c_ssl, s_ssl) < 0) { 1559 if (verify_npn(c_ssl, s_ssl) < 0) {
1571 ret = 1; 1560 ret = 1;
1572 goto err; 1561 goto err;
1573 } 1562 }
1574#endif
1575 if (verify_alpn(c_ssl, s_ssl) < 0) { 1563 if (verify_alpn(c_ssl, s_ssl) < 0) {
1576 ret = 1; 1564 ret = 1;
1577 goto err; 1565 goto err;