Fix various no-*s.
[openssl.git] / test / ssl_test_ctx_test.c
index 6366e0a..52691f0 100644 (file)
@@ -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();