From 620c6ad3125d7631f08c37033d1cb4302aef819a Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sun, 31 Jul 2016 11:42:04 +0100 Subject: Fix various no-*s. Reviewed-by: Rich Salz --- test/ssl_test_ctx_test.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ssl_test_ctx_test.c') diff --git a/test/ssl_test_ctx_test.c b/test/ssl_test_ctx_test.c index 6366e0ad59..52691f094a 100644 --- a/test/ssl_test_ctx_test.c +++ b/test/ssl_test_ctx_test.c @@ -89,6 +89,7 @@ static int SSL_TEST_CTX_equal(SSL_TEST_CTX *ctx, SSL_TEST_CTX *ctx2) ssl_session_ticket_name(ctx2->session_ticket_expected)); return 0; } +#ifndef OPENSSL_NO_NEXTPROTONEG if (!strings_equal("ClientNPNProtocols", ctx->client_npn_protocols, ctx2->client_npn_protocols)) return 0; @@ -120,6 +121,7 @@ static int SSL_TEST_CTX_equal(SSL_TEST_CTX *ctx, SSL_TEST_CTX *ctx2) if (!strings_equal("ExpectedALPNProtocol", ctx->expected_alpn_protocol, ctx2->expected_alpn_protocol)) return 0; +#endif if (ctx->handshake_mode != ctx2->handshake_mode) { fprintf(stderr, "HandshakeMode mismatch: %s vs %s.\n", ssl_handshake_mode_name(ctx->handshake_mode), @@ -214,10 +216,12 @@ static int test_good_configuration() SSL_TEST_SERVERNAME_IGNORE_MISMATCH; fixture.expected_ctx->session_ticket_expected = SSL_TEST_SESSION_TICKET_YES; fixture.expected_ctx->method = SSL_TEST_METHOD_DTLS; +#ifndef OPENSSL_NO_NEXTPROTONEG fixture.expected_ctx->client_npn_protocols = OPENSSL_strdup("foo,bar"); fixture.expected_ctx->server2_alpn_protocols = OPENSSL_strdup("baz"); OPENSSL_assert(fixture.expected_ctx->client_npn_protocols != NULL); OPENSSL_assert(fixture.expected_ctx->server2_alpn_protocols != NULL); +#endif fixture.expected_ctx->handshake_mode = SSL_TEST_HANDSHAKE_RESUME; fixture.expected_ctx->resumption_expected = 1; EXECUTE_SSL_TEST_CTX_TEST(); -- cgit v1.2.3