summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-04-11 11:41:19 +0100
committerMatt Caswell <matt@openssl.org>2016-04-11 14:22:43 +0100
commit1595ca029cbc1f76971843d89ed06b6ffbf17c84 (patch)
tree73fc2ea13d48087fdffaa67d01f46a1809bb73c2
parent2d897ae4d8af83d7920ac4c52d0cab32739d671b (diff)
Fix the no-nextprotoneg option
Misc fixes to get no-nextprotoneg config option working again. Reviewed-by: Rich Salz <rsalz@openssl.org>
-rw-r--r--apps/s_client.c2
-rw-r--r--ssl/t1_ext.c2
-rw-r--r--test/recipes/80-test_ssl_old.t2
-rw-r--r--test/ssltest_old.c4
4 files changed, 10 insertions, 0 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index b2f10c82fc..d658e04994 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -1362,7 +1362,9 @@ int s_client_main(int argc, char **argv)
}
break;
case OPT_NEXTPROTONEG:
+#ifndef OPENSSL_NO_NEXTPROTONEG
next_proto_neg_in = opt_arg();
+#endif
break;
case OPT_ALPN:
alpn_in = opt_arg();
diff --git a/ssl/t1_ext.c b/ssl/t1_ext.c
index e9933976cf..3bbe1fd826 100644
--- a/ssl/t1_ext.c
+++ b/ssl/t1_ext.c
@@ -293,7 +293,9 @@ int SSL_extension_supported(unsigned int ext_type)
case TLSEXT_TYPE_ec_point_formats:
case TLSEXT_TYPE_elliptic_curves:
case TLSEXT_TYPE_heartbeat:
+#ifndef OPENSSL_NO_NEXTPROTONEG
case TLSEXT_TYPE_next_proto_neg:
+#endif
case TLSEXT_TYPE_padding:
case TLSEXT_TYPE_renegotiate:
case TLSEXT_TYPE_server_name:
diff --git a/test/recipes/80-test_ssl_old.t b/test/recipes/80-test_ssl_old.t
index 13fcfbe6df..67564e7970 100644
--- a/test/recipes/80-test_ssl_old.t
+++ b/test/recipes/80-test_ssl_old.t
@@ -568,6 +568,8 @@ sub testssl {
SKIP: {
skip "TLSv1.0 is not supported by this OpenSSL build", 7
if $no_tls1;
+ skip "Next Protocol Negotiation is not supported by this OpenSSL build", 7
+ if disabled("nextprotoneg");
ok(run(test([@ssltest, "-bio_pair", "-tls1", "-npn_client"])));
ok(run(test([@ssltest, "-bio_pair", "-tls1", "-npn_server"])));
diff --git a/test/ssltest_old.c b/test/ssltest_old.c
index 2cc25db018..0dae90fb20 100644
--- a/test/ssltest_old.c
+++ b/test/ssltest_old.c
@@ -2348,7 +2348,9 @@ int doit_localhost(SSL *s_ssl, SSL *c_ssl, int family, long count,
goto err;
}
+# ifndef OPENSSL_NO_NEXTPROTONEG
end:
+# endif
ret = 0;
err:
@@ -2729,7 +2731,9 @@ int doit_biopair(SSL *s_ssl, SSL *c_ssl, long count,
goto err;
}
+#ifndef OPENSSL_NO_NEXTPROTONEG
end:
+#endif
ret = 0;
err: