From 8cdf17a620a2d0909c1785717d5b3d8cff1248fd Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Tue, 11 Oct 2016 10:04:53 -0400 Subject: Introduce a grpc-exp ALPN protocol identifier. This patch introduces an additional ALPN protocol, grpc-exp, intended to take preference to h2 and indicate to the server that the connection contains only gRPC traffic. This allows servers and intermediate boxes to distinguish gRPC from other HTTP/2 traffic. The choice of grpc-exp as a protocol identifier indicates that this scheme is currently experimental and should not be relied upon. The protocol is not in the IANA TLS registry. This patch also introduces client/server handshake tests that validate the preferential treatment of grpc-exp in an end-to-end manner. --- CMakeLists.txt | 62 +++++++ Makefile | 68 ++++++- build.yaml | 22 +++ src/core/ext/transport/chttp2/alpn/alpn.c | 2 +- test/core/handshake/client_ssl.c | 292 ++++++++++++++++++++++++++++++ test/core/handshake/server_ssl.c | 264 +++++++++++++++++++++++++++ test/core/transport/chttp2/alpn_test.c | 19 ++ tools/run_tests/sources_and_headers.json | 34 ++++ tools/run_tests/tests.json | 38 ++++ vsprojects/buildtests_c.sln | 54 ++++++ vsprojects/grpc.sln | 54 ++++++ 11 files changed, 907 insertions(+), 2 deletions(-) create mode 100644 test/core/handshake/client_ssl.c create mode 100644 test/core/handshake/server_ssl.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f352aa73e..567af2c276 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1665,6 +1665,68 @@ if (gRPC_INSTALL) endif() +add_executable(handshake_client + test/core/handshake/client_ssl.c +) + +target_include_directories(handshake_client + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(handshake_client + ${_gRPC_SSL_LIBRARIES} + grpc_test_util + grpc + gpr_test_util + gpr +) + + +if (gRPC_INSTALL) + install(TARGETS handshake_client EXPORT gRPCTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +endif() + + +add_executable(handshake_server + test/core/handshake/server_ssl.c +) + +target_include_directories(handshake_server + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(handshake_server + ${_gRPC_SSL_LIBRARIES} + grpc_test_util + grpc + gpr_test_util + gpr +) + + +if (gRPC_INSTALL) + install(TARGETS handshake_server EXPORT gRPCTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +endif() + + add_executable(grpc_cpp_plugin src/compiler/cpp_plugin.cc ) diff --git a/Makefile b/Makefile index 2729e3ba8e..e634c1a16e 100644 --- a/Makefile +++ b/Makefile @@ -969,6 +969,8 @@ grpc_jwt_verifier_test: $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test grpc_print_google_default_creds_token: $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token grpc_security_connector_test: $(BINDIR)/$(CONFIG)/grpc_security_connector_test grpc_verify_jwt: $(BINDIR)/$(CONFIG)/grpc_verify_jwt +handshake_client: $(BINDIR)/$(CONFIG)/handshake_client +handshake_server: $(BINDIR)/$(CONFIG)/handshake_server hpack_parser_fuzzer_test: $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test hpack_parser_test: $(BINDIR)/$(CONFIG)/hpack_parser_test hpack_table_test: $(BINDIR)/$(CONFIG)/hpack_table_test @@ -1864,7 +1866,7 @@ test_python: static_c tools: tools_c tools_cxx -tools_c: privatelibs_c $(BINDIR)/$(CONFIG)/gen_hpack_tables $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters $(BINDIR)/$(CONFIG)/gen_percent_encoding_tables $(BINDIR)/$(CONFIG)/grpc_create_jwt $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token $(BINDIR)/$(CONFIG)/grpc_verify_jwt +tools_c: privatelibs_c $(BINDIR)/$(CONFIG)/gen_hpack_tables $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters $(BINDIR)/$(CONFIG)/gen_percent_encoding_tables $(BINDIR)/$(CONFIG)/grpc_create_jwt $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token $(BINDIR)/$(CONFIG)/grpc_verify_jwt $(BINDIR)/$(CONFIG)/handshake_client $(BINDIR)/$(CONFIG)/handshake_server tools_cxx: privatelibs_cxx @@ -9034,6 +9036,70 @@ endif endif +HANDSHAKE_CLIENT_SRC = \ + test/core/handshake/client_ssl.c \ + +HANDSHAKE_CLIENT_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HANDSHAKE_CLIENT_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/handshake_client: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/handshake_client: $(HANDSHAKE_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(HANDSHAKE_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/handshake_client + +endif + +$(OBJDIR)/$(CONFIG)/test/core/handshake/client_ssl.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_handshake_client: $(HANDSHAKE_CLIENT_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(HANDSHAKE_CLIENT_OBJS:.o=.dep) +endif +endif + + +HANDSHAKE_SERVER_SRC = \ + test/core/handshake/server_ssl.c \ + +HANDSHAKE_SERVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HANDSHAKE_SERVER_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/handshake_server: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/handshake_server: $(HANDSHAKE_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(HANDSHAKE_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/handshake_server + +endif + +$(OBJDIR)/$(CONFIG)/test/core/handshake/server_ssl.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_handshake_server: $(HANDSHAKE_SERVER_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(HANDSHAKE_SERVER_OBJS:.o=.dep) +endif +endif + + HPACK_PARSER_FUZZER_TEST_SRC = \ test/core/transport/chttp2/hpack_parser_fuzzer_test.c \ diff --git a/build.yaml b/build.yaml index 8594380658..1ac6e51d4d 100644 --- a/build.yaml +++ b/build.yaml @@ -1968,6 +1968,28 @@ targets: deps: - grpc - gpr +- name: handshake_client + build: tool + language: c + src: + - test/core/handshake/client_ssl.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr + secure: true +- name: handshake_server + build: tool + language: c + src: + - test/core/handshake/server_ssl.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr + secure: true - name: hpack_parser_fuzzer_test build: fuzzer language: c diff --git a/src/core/ext/transport/chttp2/alpn/alpn.c b/src/core/ext/transport/chttp2/alpn/alpn.c index 48b0217265..55710dc5ae 100644 --- a/src/core/ext/transport/chttp2/alpn/alpn.c +++ b/src/core/ext/transport/chttp2/alpn/alpn.c @@ -36,7 +36,7 @@ #include /* in order of preference */ -static const char *const supported_versions[] = {"h2"}; +static const char *const supported_versions[] = {"grpc-exp", "h2"}; int grpc_chttp2_is_alpn_version_supported(const char *version, size_t size) { size_t i; diff --git a/test/core/handshake/client_ssl.c b/test/core/handshake/client_ssl.c new file mode 100644 index 0000000000..7cce77fb97 --- /dev/null +++ b/test/core/handshake/client_ssl.c @@ -0,0 +1,292 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include "src/core/lib/iomgr/load_file.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +#define SSL_CERT_PATH "src/core/lib/tsi/test_creds/server1.pem" +#define SSL_KEY_PATH "src/core/lib/tsi/test_creds/server1.key" +#define SSL_CA_PATH "src/core/lib/tsi/test_creds/ca.pem" + +// Arguments for TLS server thread. +typedef struct { + int port; + char *alpn_preferred; +} server_args; + +// From https://wiki.openssl.org/index.php/Simple_TLS_Server. +int create_socket(int port) { + int s; + struct sockaddr_in addr; + + addr.sin_family = AF_INET; + addr.sin_port = htons((uint16_t)port); + addr.sin_addr.s_addr = htonl(INADDR_ANY); + + s = socket(AF_INET, SOCK_STREAM, 0); + if (s < 0) { + perror("Unable to create socket"); + abort(); + } + + if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) { + perror("Unable to bind"); + abort(); + } + + if (listen(s, 1) < 0) { + perror("Unable to listen"); + abort(); + } + + return s; +} + +// Server callback during ALPN negotiation. See man page for +// SSL_CTX_set_alpn_select_cb. +static int alpn_select_cb(SSL *ssl, const uint8_t **out, uint8_t *out_len, + const uint8_t *in, unsigned in_len, void *arg) { + const uint8_t *alpn_preferred = (const uint8_t *)arg; + + *out = alpn_preferred; + *out_len = (uint8_t)strlen((char *)alpn_preferred); + + // Validate that the ALPN list includes "h2" and "grpc-exp", that "grpc-exp" + // precedes "h2". + bool grpc_exp_seen = false; + bool h2_seen = false; + const char *inp = (const char *)in; + for (int i = 0; i < (int)in_len; ++i) { + const size_t length = (size_t)*inp++; + if (length == strlen("grpc-exp") && strncmp(inp, "grpc-exp", length) == 0) { + grpc_exp_seen = true; + GPR_ASSERT(!h2_seen); + } + if (length == strlen("h2") && strncmp(inp, "h2", length) == 0) { + h2_seen = true; + GPR_ASSERT(grpc_exp_seen); + } + inp += length; + } + + GPR_ASSERT(grpc_exp_seen); + GPR_ASSERT(h2_seen); + + return SSL_TLSEXT_ERR_OK; +} + +// Minimal TLS server. This is largely based on the example at +// https://wiki.openssl.org/index.php/Simple_TLS_Server and the gRPC core +// internals in src/core/lib/tsi/ssl_transport_security.c. +static void server_thread(void *arg) { + const server_args *args = (server_args *)arg; + + SSL_load_error_strings(); + OpenSSL_add_ssl_algorithms(); + + const SSL_METHOD *method = TLSv1_2_server_method(); + SSL_CTX *ctx = SSL_CTX_new(method); + if (!ctx) { + perror("Unable to create SSL context"); + ERR_print_errors_fp(stderr); + abort(); + } + + // Load key pair. + if (SSL_CTX_use_certificate_file(ctx, SSL_CERT_PATH, SSL_FILETYPE_PEM) < 0) { + ERR_print_errors_fp(stderr); + abort(); + } + if (SSL_CTX_use_PrivateKey_file(ctx, SSL_KEY_PATH, SSL_FILETYPE_PEM) < 0) { + ERR_print_errors_fp(stderr); + abort(); + } + + // Set the cipher list to match the one expressed in + // src/core/lib/tsi/ssl_transport_security.c. + const char *cipher_list = + "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-" + "SHA384:ECDHE-RSA-AES256-GCM-SHA384"; + if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) { + ERR_print_errors_fp(stderr); + gpr_log(GPR_ERROR, "Couldn't set server cipher list."); + abort(); + } + + // Register the ALPN selection callback. + SSL_CTX_set_alpn_select_cb(ctx, alpn_select_cb, args->alpn_preferred); + + // bind/list/accept at TCP layer. + const int sock = create_socket(args->port); + gpr_log(GPR_INFO, "Server listening on port %d", args->port); + struct sockaddr_in addr; + socklen_t len = sizeof(addr); + const int client = accept(sock, (struct sockaddr *)&addr, &len); + if (client < 0) { + perror("Unable to accept"); + abort(); + } + + // Establish a SSL* and accept at SSL layer. + SSL *ssl = SSL_new(ctx); + GPR_ASSERT(ssl); + SSL_set_fd(ssl, client); + if (SSL_accept(ssl) <= 0) { + ERR_print_errors_fp(stderr); + gpr_log(GPR_ERROR, "Handshake failed."); + } else { + gpr_log(GPR_INFO, "Handshake successful."); + } + + // Wait until the client drops its connection. + char buf; + while (SSL_read(ssl, &buf, sizeof(buf)) > 0); + + SSL_free(ssl); + close(client); + close(sock); + SSL_CTX_free(ctx); + EVP_cleanup(); +} + +// This test launches a minimal TLS server on a separate thread and then +// establishes a TLS handshake via the core library to the server. The TLS +// server validates ALPN aspects of the handshake and supplies the protocol +// specified in the server_alpn_preferred argument to the client. +static bool client_ssl_test(char *server_alpn_preferred) { + bool success = true; + + grpc_init(); + const int port = grpc_pick_unused_port_or_die(); + + // Launch the TLS server thread. + gpr_thd_options thdopt = gpr_thd_options_default(); + gpr_thd_id thdid; + gpr_thd_options_set_joinable(&thdopt); + server_args args = { .port = port, .alpn_preferred = server_alpn_preferred }; + GPR_ASSERT(gpr_thd_new(&thdid, server_thread, &args, &thdopt)); + + // Load key pair and establish client SSL credentials. + grpc_ssl_pem_key_cert_pair pem_key_cert_pair; + gpr_slice ca_slice, cert_slice, key_slice; + GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(SSL_CA_PATH, 1, &ca_slice))); + GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(SSL_CERT_PATH, 1, &cert_slice))); + GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(SSL_KEY_PATH, 1, &key_slice))); + const char *ca_cert = (const char*)GPR_SLICE_START_PTR(ca_slice); + pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice); + pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice); + grpc_channel_credentials *ssl_creds = + grpc_ssl_credentials_create(ca_cert, &pem_key_cert_pair, NULL); + + // Establish a channel pointing at the TLS server. Since the gRPC runtime is + // lazy, this won't necessarily establish a connection yet. + char *target; + gpr_asprintf(&target, "127.0.0.1:%d", port); + grpc_arg ssl_name_override = {GRPC_ARG_STRING, + GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, + {"foo.test.google.fr"}}; + grpc_channel_args grpc_args; + grpc_args.num_args = 1; + grpc_args.args = &ssl_name_override; + grpc_channel *channel = grpc_secure_channel_create(ssl_creds, target, &grpc_args, NULL); + GPR_ASSERT(channel); + gpr_free(target); + + // Initially the channel will be idle, the + // grpc_channel_check_connectivity_state triggers an attempt to connect. + GPR_ASSERT(grpc_channel_check_connectivity_state( + channel, 1 /* try_to_connect */) == GRPC_CHANNEL_IDLE); + + // Wait a bounded number of times for the channel to be ready. When the + // channel is ready, the initial TLS handshake will have successfully + // completed and we know that the client's ALPN list satisfied the server. + int retries = 10; + grpc_connectivity_state state = GRPC_CHANNEL_IDLE; + grpc_completion_queue *cq = grpc_completion_queue_create(NULL); + while (state != GRPC_CHANNEL_READY && retries-- > 0) { + grpc_channel_watch_connectivity_state( + channel, state, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), cq, NULL); + gpr_timespec cq_deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5); + grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, NULL); + GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); + state = + grpc_channel_check_connectivity_state(channel, 0 /* try_to_connect */); + } + grpc_completion_queue_destroy(cq); + if (retries < 0) { + success = false; + } + + grpc_channel_destroy(channel); + grpc_channel_credentials_release(ssl_creds); + gpr_slice_unref(cert_slice); + gpr_slice_unref(key_slice); + gpr_slice_unref(ca_slice); + + gpr_thd_join(thdid); + + grpc_shutdown(); + + return success; +} + +int main(int argc, char *argv[]) { + // Handshake succeeeds when the server has grpc-exp as the ALPN preference. + GPR_ASSERT(client_ssl_test("grpc-exp")); + // Handshake succeeeds when the server has h2 as the ALPN preference. This + // covers legacy gRPC servers which don't support grpc-exp. + GPR_ASSERT(client_ssl_test("h2")); + // Handshake fails when the server uses a fake protocol as its ALPN + // preference. This validates the client is correctly validating ALPN returns + // and sanity checks the client_ssl_test. + GPR_ASSERT(!client_ssl_test("foo")); + return 0; +} diff --git a/test/core/handshake/server_ssl.c b/test/core/handshake/server_ssl.c new file mode 100644 index 0000000000..b05d168a93 --- /dev/null +++ b/test/core/handshake/server_ssl.c @@ -0,0 +1,264 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include "src/core/lib/iomgr/load_file.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +#define SSL_CERT_PATH "src/core/lib/tsi/test_creds/server1.pem" +#define SSL_KEY_PATH "src/core/lib/tsi/test_creds/server1.key" +#define SSL_CA_PATH "src/core/lib/tsi/test_creds/ca.pem" + +// Handshake completed signal to server thread. +static bool client_handshake_complete = false; + +static int create_socket(int port) { + int s; + struct sockaddr_in addr; + + addr.sin_family = AF_INET; + addr.sin_port = htons((uint16_t)port); + addr.sin_addr.s_addr = htonl(INADDR_ANY); + + s = socket(AF_INET, SOCK_STREAM, 0); + if (s < 0) { + perror("Unable to create socket"); + return -1; + } + + if (connect(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) { + perror("Unable to connect"); + return -1; + } + + return s; +} + +// Simple gRPC server. This listens until client_handshake_complete occurs. +static void server_thread(void *arg) { + const int port = *(int *)arg; + + // Load key pair and establish server SSL credentials. + grpc_ssl_pem_key_cert_pair pem_key_cert_pair; + gpr_slice ca_slice, cert_slice, key_slice; + GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(SSL_CA_PATH, 1, &ca_slice))); + GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(SSL_CERT_PATH, 1, &cert_slice))); + GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(SSL_KEY_PATH, 1, &key_slice))); + const char *ca_cert = (const char *)GPR_SLICE_START_PTR(ca_slice); + pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice); + pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice); + grpc_server_credentials *ssl_creds = grpc_ssl_server_credentials_create( + ca_cert, &pem_key_cert_pair, 1, 0, NULL); + + // Start server listening on local port. + char *addr; + gpr_asprintf(&addr, "127.0.0.1:%d", port); + grpc_server *server = grpc_server_create(NULL, NULL); + GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, ssl_creds)); + + grpc_completion_queue *cq = grpc_completion_queue_create(NULL); + + grpc_server_register_completion_queue(server, cq, NULL); + grpc_server_start(server); + + // Wait a bounded number of time until client_handshake_complete is set, + // sleeping between polls. + int retries = 10; + while (!client_handshake_complete && retries-- > 0) { + const gpr_timespec cq_deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1); + grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, NULL); + GPR_ASSERT(ev.type == GRPC_QUEUE_TIMEOUT); + } + + gpr_log(GPR_INFO, "Shutting down server"); + grpc_server_shutdown_and_notify(server, cq, NULL); + grpc_completion_queue_shutdown(cq); + + const gpr_timespec cq_deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5); + grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, NULL); + GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); + + grpc_completion_queue_destroy(cq); + grpc_server_credentials_release(ssl_creds); + gpr_slice_unref(cert_slice); + gpr_slice_unref(key_slice); + gpr_slice_unref(ca_slice); +} + +// This test launches a gRPC server on a separate thread and then establishes a +// TLS handshake via a minimal TLS client. The TLS client has configurable (via +// alpn_list) ALPN settings and can probe at the supported ALPN preferences +// using this (via alpn_expected). +static bool server_ssl_test(const char *alpn_list[], unsigned int alpn_list_len, + const char *alpn_expected) { + bool success = true; + + grpc_init(); + int port = grpc_pick_unused_port_or_die(); + client_handshake_complete = false; + + // Launch the gRPC server thread. + gpr_thd_options thdopt = gpr_thd_options_default(); + gpr_thd_id thdid; + gpr_thd_options_set_joinable(&thdopt); + GPR_ASSERT(gpr_thd_new(&thdid, server_thread, &port, &thdopt)); + + SSL_load_error_strings(); + OpenSSL_add_ssl_algorithms(); + + const SSL_METHOD *method = TLSv1_2_client_method(); + SSL_CTX *ctx = SSL_CTX_new(method); + if (!ctx) { + perror("Unable to create SSL context"); + ERR_print_errors_fp(stderr); + abort(); + } + + // Load key pair. + if (SSL_CTX_use_certificate_file(ctx, SSL_CERT_PATH, SSL_FILETYPE_PEM) < 0) { + ERR_print_errors_fp(stderr); + abort(); + } + if (SSL_CTX_use_PrivateKey_file(ctx, SSL_KEY_PATH, SSL_FILETYPE_PEM) < 0) { + ERR_print_errors_fp(stderr); + abort(); + } + + // Set the cipher list to match the one expressed in + // src/core/lib/tsi/ssl_transport_security.c. + const char *cipher_list = + "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-" + "SHA384:ECDHE-RSA-AES256-GCM-SHA384"; + if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) { + ERR_print_errors_fp(stderr); + gpr_log(GPR_ERROR, "Couldn't set server cipher list."); + abort(); + } + + // Configure ALPN list the client will send to the server. This must match the + // wire format, see documentation for SSL_CTX_set_alpn_protos. + unsigned int alpn_protos_len = alpn_list_len; + for (unsigned int i = 0; i < alpn_list_len; ++i) { + alpn_protos_len += (unsigned int)strlen(alpn_list[i]); + } + unsigned char *alpn_protos = gpr_malloc(alpn_protos_len); + unsigned char *p = alpn_protos; + for (unsigned int i = 0; i < alpn_list_len; ++i) { + const uint8_t len = (uint8_t)strlen(alpn_list[i]); + *p++ = len; + memcpy(p, alpn_list[i], len); + p += len; + } + GPR_ASSERT(SSL_CTX_set_alpn_protos(ctx, alpn_protos, alpn_protos_len) == 0); + + // Try and connect to server. We allow a bounded number of retries as we might + // be racing with the server setup on its separate thread. + int retries = 10; + int sock = -1; + while (sock == -1 && retries-- > 0) { + sock = create_socket(port); + if (sock < 0) { + sleep(1); + } + } + GPR_ASSERT(sock > 0); + gpr_log(GPR_INFO, "Connected to server on port %d", port); + + // Establish a SSL* and connect at SSL layer. + SSL *ssl = SSL_new(ctx); + GPR_ASSERT(ssl); + SSL_set_fd(ssl, sock); + if (SSL_connect(ssl) <= 0) { + ERR_print_errors_fp(stderr); + gpr_log(GPR_ERROR, "Handshake failed."); + success = false; + } else { + gpr_log(GPR_INFO, "Handshake successful."); + // Validate ALPN preferred by server matches alpn_expected. + const unsigned char *alpn_selected; + unsigned int alpn_selected_len; + SSL_get0_alpn_selected(ssl, &alpn_selected, &alpn_selected_len); + if (strlen(alpn_expected) != alpn_selected_len || + strncmp((const char *)alpn_selected, alpn_expected, alpn_selected_len) != 0) { + gpr_log(GPR_ERROR, "Unexpected ALPN protocol preference"); + success = false; + } + } + client_handshake_complete = true; + + gpr_free(alpn_protos); + SSL_CTX_free(ctx); + EVP_cleanup(); + + gpr_thd_join(thdid); + + grpc_shutdown(); + + return success; +} + +int main(int argc, char *argv[]) { + // Handshake succeeeds when the client supplies the standard ALPN list. + const char *full_alpn_list[] = {"grpc-exp", "h2"}; + GPR_ASSERT(server_ssl_test(full_alpn_list, 2, "grpc-exp")); + // Handshake succeeeds when the client supplies only h2 as the ALPN list. This + // covers legacy gRPC clients which don't support grpc-exp. + const char *h2_only_alpn_list[] = {"h2"}; + GPR_ASSERT(server_ssl_test(h2_only_alpn_list, 1, "h2")); + // Handshake succeeds when the client supplies superfluous ALPN entries and + // also when h2 precedes gprc-exp. + const char *extra_alpn_list[] = {"foo", "h2", "bar", "grpc-exp"}; + GPR_ASSERT(server_ssl_test(extra_alpn_list, 4, "h2")); + // Handshake fails when the client uses a fake protocol as its only ALPN + // preference. This validates the server is correctly validating ALPN + // and sanity checks the server_ssl_test. + const char *fake_alpn_list[] = {"foo"}; + GPR_ASSERT(!server_ssl_test(fake_alpn_list, 1, "foo")); + return 0; +} diff --git a/test/core/transport/chttp2/alpn_test.c b/test/core/transport/chttp2/alpn_test.c index 48064ec9b3..cde891cd5d 100644 --- a/test/core/transport/chttp2/alpn_test.c +++ b/test/core/transport/chttp2/alpn_test.c @@ -38,6 +38,7 @@ static void test_alpn_success(void) { GPR_ASSERT(grpc_chttp2_is_alpn_version_supported("h2", 2)); + GPR_ASSERT(grpc_chttp2_is_alpn_version_supported("grpc-exp", 8)); } static void test_alpn_failure(void) { @@ -45,9 +46,27 @@ static void test_alpn_failure(void) { GPR_ASSERT(!grpc_chttp2_is_alpn_version_supported("h1-15", 5)); } +// First index in ALPN supported version list of a given protocol. Returns a +// value one beyond the last valid element index if not found. +static size_t alpn_version_index(const char *version, size_t size) { + size_t i; + for (i = 0; i < grpc_chttp2_num_alpn_versions(); ++i) { + if (!strncmp(version, grpc_chttp2_get_alpn_version_index(i), size)) { + return i; + } + } + return i; +} + +static void test_alpn_grpc_before_h2(void) { + // grpc-exp is preferred over h2. + GPR_ASSERT(alpn_version_index("grpc-exp", 8) < alpn_version_index("h2", 2)); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); test_alpn_success(); test_alpn_failure(); + test_alpn_grpc_before_h2(); return 0; } diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 5e8290ad90..e8e17c5356 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1130,6 +1130,40 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "handshake_client", + "src": [ + "test/core/handshake/client_ssl.c" + ], + "third_party": false, + "type": "target" + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "handshake_server", + "src": [ + "test/core/handshake/server_ssl.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 938aa2edde..6b231f0dcb 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1220,6 +1220,44 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "handshake_client", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "handshake_server", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 339b42f9d7..2d70e65f6c 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1031,6 +1031,28 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_test", "vcxproj\test {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_client", "vcxproj\.\handshake_client\handshake_client.vcxproj", "{C3F19761-48E0-AE1F-1155-CF4CEB143B6A}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_server", "vcxproj\.\handshake_server\handshake_server.vcxproj", "{BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "head_of_line_blocking_bad_client_test", "vcxproj\test\head_of_line_blocking_bad_client_test\head_of_line_blocking_bad_client_test.vcxproj", "{23DF0572-DBF1-08DA-8EAD-8508354C90A4}" ProjectSection(myProperties) = preProject lib = "False" @@ -3122,6 +3144,38 @@ Global {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|Win32.Build.0 = Release|Win32 {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|x64.ActiveCfg = Release|x64 {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|x64.Build.0 = Release|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|x64.ActiveCfg = Debug|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|Win32.ActiveCfg = Release|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|x64.ActiveCfg = Release|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|Win32.Build.0 = Debug|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|x64.Build.0 = Debug|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|Win32.Build.0 = Release|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|x64.Build.0 = Release|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|x64.Build.0 = Debug|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|Win32.Build.0 = Release|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|x64.ActiveCfg = Release|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|x64.Build.0 = Release|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|Win32.ActiveCfg = Debug|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|x64.ActiveCfg = Debug|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|Win32.ActiveCfg = Release|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|x64.ActiveCfg = Release|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|Win32.Build.0 = Debug|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|x64.Build.0 = Debug|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|Win32.Build.0 = Release|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|x64.Build.0 = Release|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|x64.Build.0 = Debug|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|Win32.Build.0 = Release|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|x64.ActiveCfg = Release|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|x64.Build.0 = Release|x64 {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug|Win32.ActiveCfg = Debug|Win32 {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug|x64.ActiveCfg = Debug|x64 {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 63be171c6e..12e7f1f2b4 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -138,6 +138,28 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_verify_jwt", "vcxproj\ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_client", "vcxproj\.\handshake_client\handshake_client.vcxproj", "{C3F19761-48E0-AE1F-1155-CF4CEB143B6A}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_server", "vcxproj\.\handshake_server\handshake_server.vcxproj", "{BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reconnect_server", "vcxproj\.\reconnect_server\reconnect_server.vcxproj", "{929C90AE-483F-AC80-EF93-226199F9E428}" ProjectSection(myProperties) = preProject lib = "True" @@ -450,6 +472,38 @@ Global {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|Win32.Build.0 = Release|Win32 {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.ActiveCfg = Release|x64 {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.Build.0 = Release|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|x64.ActiveCfg = Debug|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|Win32.ActiveCfg = Release|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|x64.ActiveCfg = Release|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|Win32.Build.0 = Debug|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|x64.Build.0 = Debug|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|Win32.Build.0 = Release|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|x64.Build.0 = Release|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|x64.Build.0 = Debug|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|Win32.Build.0 = Release|Win32 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|x64.ActiveCfg = Release|x64 + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|x64.Build.0 = Release|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|Win32.ActiveCfg = Debug|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|x64.ActiveCfg = Debug|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|Win32.ActiveCfg = Release|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|x64.ActiveCfg = Release|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|Win32.Build.0 = Debug|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|x64.Build.0 = Debug|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|Win32.Build.0 = Release|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|x64.Build.0 = Release|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|x64.Build.0 = Debug|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|Win32.Build.0 = Release|Win32 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|x64.ActiveCfg = Release|x64 + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|x64.Build.0 = Release|x64 {929C90AE-483F-AC80-EF93-226199F9E428}.Debug|Win32.ActiveCfg = Debug|Win32 {929C90AE-483F-AC80-EF93-226199F9E428}.Debug|x64.ActiveCfg = Debug|x64 {929C90AE-483F-AC80-EF93-226199F9E428}.Release|Win32.ActiveCfg = Release|Win32 -- cgit v1.2.3 From 27c876ecbec0d17e5b03c582d48a05145d1aa25a Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Fri, 21 Oct 2016 09:59:20 -0400 Subject: Fix memory leak detected by ASAN and clang-format variance. --- test/core/handshake/client_ssl.c | 16 +++++++++------- test/core/handshake/server_ssl.c | 6 +++++- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/test/core/handshake/client_ssl.c b/test/core/handshake/client_ssl.c index 7cce77fb97..3184ff125a 100644 --- a/test/core/handshake/client_ssl.c +++ b/test/core/handshake/client_ssl.c @@ -34,9 +34,9 @@ #include #include #include -#include #include #include +#include #include #include @@ -50,8 +50,8 @@ #include "test/core/util/test_config.h" #define SSL_CERT_PATH "src/core/lib/tsi/test_creds/server1.pem" -#define SSL_KEY_PATH "src/core/lib/tsi/test_creds/server1.key" -#define SSL_CA_PATH "src/core/lib/tsi/test_creds/ca.pem" +#define SSL_KEY_PATH "src/core/lib/tsi/test_creds/server1.key" +#define SSL_CA_PATH "src/core/lib/tsi/test_creds/ca.pem" // Arguments for TLS server thread. typedef struct { @@ -185,7 +185,8 @@ static void server_thread(void *arg) { // Wait until the client drops its connection. char buf; - while (SSL_read(ssl, &buf, sizeof(buf)) > 0); + while (SSL_read(ssl, &buf, sizeof(buf)) > 0) + ; SSL_free(ssl); close(client); @@ -208,7 +209,7 @@ static bool client_ssl_test(char *server_alpn_preferred) { gpr_thd_options thdopt = gpr_thd_options_default(); gpr_thd_id thdid; gpr_thd_options_set_joinable(&thdopt); - server_args args = { .port = port, .alpn_preferred = server_alpn_preferred }; + server_args args = {.port = port, .alpn_preferred = server_alpn_preferred}; GPR_ASSERT(gpr_thd_new(&thdid, server_thread, &args, &thdopt)); // Load key pair and establish client SSL credentials. @@ -220,7 +221,7 @@ static bool client_ssl_test(char *server_alpn_preferred) { grpc_load_file(SSL_CERT_PATH, 1, &cert_slice))); GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", grpc_load_file(SSL_KEY_PATH, 1, &key_slice))); - const char *ca_cert = (const char*)GPR_SLICE_START_PTR(ca_slice); + const char *ca_cert = (const char *)GPR_SLICE_START_PTR(ca_slice); pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice); pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice); grpc_channel_credentials *ssl_creds = @@ -236,7 +237,8 @@ static bool client_ssl_test(char *server_alpn_preferred) { grpc_channel_args grpc_args; grpc_args.num_args = 1; grpc_args.args = &ssl_name_override; - grpc_channel *channel = grpc_secure_channel_create(ssl_creds, target, &grpc_args, NULL); + grpc_channel *channel = + grpc_secure_channel_create(ssl_creds, target, &grpc_args, NULL); GPR_ASSERT(channel); gpr_free(target); diff --git a/test/core/handshake/server_ssl.c b/test/core/handshake/server_ssl.c index b05d168a93..5c21eea476 100644 --- a/test/core/handshake/server_ssl.c +++ b/test/core/handshake/server_ssl.c @@ -101,6 +101,7 @@ static void server_thread(void *arg) { gpr_asprintf(&addr, "127.0.0.1:%d", port); grpc_server *server = grpc_server_create(NULL, NULL); GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, ssl_creds)); + free(addr); grpc_completion_queue *cq = grpc_completion_queue_create(NULL); @@ -124,6 +125,7 @@ static void server_thread(void *arg) { grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, NULL); GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); + grpc_server_destroy(server); grpc_completion_queue_destroy(cq); grpc_server_credentials_release(ssl_creds); gpr_slice_unref(cert_slice); @@ -225,13 +227,15 @@ static bool server_ssl_test(const char *alpn_list[], unsigned int alpn_list_len, unsigned int alpn_selected_len; SSL_get0_alpn_selected(ssl, &alpn_selected, &alpn_selected_len); if (strlen(alpn_expected) != alpn_selected_len || - strncmp((const char *)alpn_selected, alpn_expected, alpn_selected_len) != 0) { + strncmp((const char *)alpn_selected, alpn_expected, + alpn_selected_len) != 0) { gpr_log(GPR_ERROR, "Unexpected ALPN protocol preference"); success = false; } } client_handshake_complete = true; + SSL_free(ssl); gpr_free(alpn_protos); SSL_CTX_free(ctx); EVP_cleanup(); -- cgit v1.2.3 From a92a13c4066f99e68f4911503232e716bf87c88a Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Fri, 21 Oct 2016 17:56:54 -0400 Subject: Fix server_ssl.c thread race exposed by tsan by using gpr_event. --- test/core/handshake/server_ssl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/core/handshake/server_ssl.c b/test/core/handshake/server_ssl.c index 5c21eea476..bcfdf7524a 100644 --- a/test/core/handshake/server_ssl.c +++ b/test/core/handshake/server_ssl.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include "src/core/lib/iomgr/load_file.h" #include "test/core/util/port.h" @@ -53,7 +54,7 @@ #define SSL_CA_PATH "src/core/lib/tsi/test_creds/ca.pem" // Handshake completed signal to server thread. -static bool client_handshake_complete = false; +static gpr_event client_handshake_complete; static int create_socket(int port) { int s; @@ -111,7 +112,7 @@ static void server_thread(void *arg) { // Wait a bounded number of time until client_handshake_complete is set, // sleeping between polls. int retries = 10; - while (!client_handshake_complete && retries-- > 0) { + while (!gpr_event_get(&client_handshake_complete) && retries-- > 0) { const gpr_timespec cq_deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1); grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, NULL); GPR_ASSERT(ev.type == GRPC_QUEUE_TIMEOUT); @@ -143,7 +144,7 @@ static bool server_ssl_test(const char *alpn_list[], unsigned int alpn_list_len, grpc_init(); int port = grpc_pick_unused_port_or_die(); - client_handshake_complete = false; + gpr_event_init(&client_handshake_complete); // Launch the gRPC server thread. gpr_thd_options thdopt = gpr_thd_options_default(); @@ -233,7 +234,7 @@ static bool server_ssl_test(const char *alpn_list[], unsigned int alpn_list_len, success = false; } } - client_handshake_complete = true; + gpr_event_set(&client_handshake_complete, &client_handshake_complete); SSL_free(ssl); gpr_free(alpn_protos); -- cgit v1.2.3 From 62b2a9051cb6c077334658a68d46ccc97a63dd97 Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Mon, 24 Oct 2016 09:39:41 -0400 Subject: Fix handshake_client bind flakes and build issues. * Add port picking retries to handshake_client. * Track vsprojects for new tests. * Place tests in 'test' build target. --- CMakeLists.txt | 62 ------- Makefile | 8 +- build.yaml | 4 +- test/core/handshake/client_ssl.c | 37 ++-- test/core/handshake/server_ssl.c | 1 + tools/run_tests/tests.json | 12 +- vsprojects/buildtests_c.sln | 4 +- vsprojects/grpc.sln | 54 ------ .../test/handshake_client/handshake_client.vcxproj | 199 +++++++++++++++++++++ .../handshake_client.vcxproj.filters | 21 +++ .../test/handshake_server/handshake_server.vcxproj | 199 +++++++++++++++++++++ .../handshake_server.vcxproj.filters | 21 +++ 12 files changed, 487 insertions(+), 135 deletions(-) create mode 100644 vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj create mode 100644 vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj create mode 100644 vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj.filters diff --git a/CMakeLists.txt b/CMakeLists.txt index 567af2c276..8f352aa73e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1665,68 +1665,6 @@ if (gRPC_INSTALL) endif() -add_executable(handshake_client - test/core/handshake/client_ssl.c -) - -target_include_directories(handshake_client - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include - PRIVATE ${BORINGSSL_ROOT_DIR}/include - PRIVATE ${PROTOBUF_ROOT_DIR}/src - PRIVATE ${ZLIB_ROOT_DIR} - PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib -) - -target_link_libraries(handshake_client - ${_gRPC_SSL_LIBRARIES} - grpc_test_util - grpc - gpr_test_util - gpr -) - - -if (gRPC_INSTALL) - install(TARGETS handshake_client EXPORT gRPCTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -endif() - - -add_executable(handshake_server - test/core/handshake/server_ssl.c -) - -target_include_directories(handshake_server - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include - PRIVATE ${BORINGSSL_ROOT_DIR}/include - PRIVATE ${PROTOBUF_ROOT_DIR}/src - PRIVATE ${ZLIB_ROOT_DIR} - PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib -) - -target_link_libraries(handshake_server - ${_gRPC_SSL_LIBRARIES} - grpc_test_util - grpc - gpr_test_util - gpr -) - - -if (gRPC_INSTALL) - install(TARGETS handshake_server EXPORT gRPCTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -endif() - - add_executable(grpc_cpp_plugin src/compiler/cpp_plugin.cc ) diff --git a/Makefile b/Makefile index e634c1a16e..9d8206015c 100644 --- a/Makefile +++ b/Makefile @@ -1301,6 +1301,8 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/grpc_json_token_test \ $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test \ $(BINDIR)/$(CONFIG)/grpc_security_connector_test \ + $(BINDIR)/$(CONFIG)/handshake_client \ + $(BINDIR)/$(CONFIG)/handshake_server \ $(BINDIR)/$(CONFIG)/hpack_parser_test \ $(BINDIR)/$(CONFIG)/hpack_table_test \ $(BINDIR)/$(CONFIG)/http_parser_test \ @@ -1671,6 +1673,10 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test || ( echo test grpc_jwt_verifier_test failed ; exit 1 ) $(E) "[RUN] Testing grpc_security_connector_test" $(Q) $(BINDIR)/$(CONFIG)/grpc_security_connector_test || ( echo test grpc_security_connector_test failed ; exit 1 ) + $(E) "[RUN] Testing handshake_client" + $(Q) $(BINDIR)/$(CONFIG)/handshake_client || ( echo test handshake_client failed ; exit 1 ) + $(E) "[RUN] Testing handshake_server" + $(Q) $(BINDIR)/$(CONFIG)/handshake_server || ( echo test handshake_server failed ; exit 1 ) $(E) "[RUN] Testing hpack_parser_test" $(Q) $(BINDIR)/$(CONFIG)/hpack_parser_test || ( echo test hpack_parser_test failed ; exit 1 ) $(E) "[RUN] Testing hpack_table_test" @@ -1866,7 +1872,7 @@ test_python: static_c tools: tools_c tools_cxx -tools_c: privatelibs_c $(BINDIR)/$(CONFIG)/gen_hpack_tables $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters $(BINDIR)/$(CONFIG)/gen_percent_encoding_tables $(BINDIR)/$(CONFIG)/grpc_create_jwt $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token $(BINDIR)/$(CONFIG)/grpc_verify_jwt $(BINDIR)/$(CONFIG)/handshake_client $(BINDIR)/$(CONFIG)/handshake_server +tools_c: privatelibs_c $(BINDIR)/$(CONFIG)/gen_hpack_tables $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters $(BINDIR)/$(CONFIG)/gen_percent_encoding_tables $(BINDIR)/$(CONFIG)/grpc_create_jwt $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token $(BINDIR)/$(CONFIG)/grpc_verify_jwt tools_cxx: privatelibs_cxx diff --git a/build.yaml b/build.yaml index 1ac6e51d4d..e4b6b24e1a 100644 --- a/build.yaml +++ b/build.yaml @@ -1969,7 +1969,7 @@ targets: - grpc - gpr - name: handshake_client - build: tool + build: test language: c src: - test/core/handshake/client_ssl.c @@ -1980,7 +1980,7 @@ targets: - gpr secure: true - name: handshake_server - build: tool + build: test language: c src: - test/core/handshake/server_ssl.c diff --git a/test/core/handshake/client_ssl.c b/test/core/handshake/client_ssl.c index 3184ff125a..ee90f0b0bc 100644 --- a/test/core/handshake/client_ssl.c +++ b/test/core/handshake/client_ssl.c @@ -55,12 +55,12 @@ // Arguments for TLS server thread. typedef struct { - int port; + int socket; char *alpn_preferred; } server_args; // From https://wiki.openssl.org/index.php/Simple_TLS_Server. -int create_socket(int port) { +static int create_socket(int port) { int s; struct sockaddr_in addr; @@ -71,17 +71,20 @@ int create_socket(int port) { s = socket(AF_INET, SOCK_STREAM, 0); if (s < 0) { perror("Unable to create socket"); - abort(); + return -1; } if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) { perror("Unable to bind"); - abort(); + gpr_log(GPR_ERROR, "Unable to bind to %d", port); + close(s); + return -1; } if (listen(s, 1) < 0) { perror("Unable to listen"); - abort(); + close(s); + return -1; } return s; @@ -161,9 +164,9 @@ static void server_thread(void *arg) { // Register the ALPN selection callback. SSL_CTX_set_alpn_select_cb(ctx, alpn_select_cb, args->alpn_preferred); - // bind/list/accept at TCP layer. - const int sock = create_socket(args->port); - gpr_log(GPR_INFO, "Server listening on port %d", args->port); + // bind/listen/accept at TCP layer. + const int sock = args->socket; + gpr_log(GPR_INFO, "Server listening"); struct sockaddr_in addr; socklen_t len = sizeof(addr); const int client = accept(sock, (struct sockaddr *)&addr, &len); @@ -203,13 +206,27 @@ static bool client_ssl_test(char *server_alpn_preferred) { bool success = true; grpc_init(); - const int port = grpc_pick_unused_port_or_die(); + + // Find a port we can bind to. Retries added to handle flakes in port server + // and port picking. + int port = -1; + int server_socket = -1; + int socket_retries = 10; + while (server_socket == -1 && socket_retries-- > 0) { + port = grpc_pick_unused_port_or_die(); + server_socket = create_socket(port); + if (server_socket == -1) { + sleep(1); + } + } + GPR_ASSERT(server_socket > 0); // Launch the TLS server thread. gpr_thd_options thdopt = gpr_thd_options_default(); gpr_thd_id thdid; gpr_thd_options_set_joinable(&thdopt); - server_args args = {.port = port, .alpn_preferred = server_alpn_preferred}; + server_args args = {.socket = server_socket, + .alpn_preferred = server_alpn_preferred}; GPR_ASSERT(gpr_thd_new(&thdid, server_thread, &args, &thdopt)); // Load key pair and establish client SSL credentials. diff --git a/test/core/handshake/server_ssl.c b/test/core/handshake/server_ssl.c index bcfdf7524a..3e89f8e265 100644 --- a/test/core/handshake/server_ssl.c +++ b/test/core/handshake/server_ssl.c @@ -240,6 +240,7 @@ static bool server_ssl_test(const char *alpn_list[], unsigned int alpn_list_len, gpr_free(alpn_protos); SSL_CTX_free(ctx); EVP_cleanup(); + close(sock); gpr_thd_join(thdid); diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 6b231f0dcb..c603c7dce8 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1225,7 +1225,8 @@ "ci_platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ], "cpu_cost": 1.0, "exclude_configs": [], @@ -1236,7 +1237,8 @@ "platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ] }, { @@ -1244,7 +1246,8 @@ "ci_platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ], "cpu_cost": 1.0, "exclude_configs": [], @@ -1255,7 +1258,8 @@ "platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ] }, { diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 2d70e65f6c..eda6795ab7 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1031,7 +1031,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_test", "vcxproj\test {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_client", "vcxproj\.\handshake_client\handshake_client.vcxproj", "{C3F19761-48E0-AE1F-1155-CF4CEB143B6A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_client", "vcxproj\test\handshake_client\handshake_client.vcxproj", "{C3F19761-48E0-AE1F-1155-CF4CEB143B6A}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -1042,7 +1042,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_client", "vcxproj {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_server", "vcxproj\.\handshake_server\handshake_server.vcxproj", "{BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_server", "vcxproj\test\handshake_server\handshake_server.vcxproj", "{BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 12e7f1f2b4..63be171c6e 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -138,28 +138,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_verify_jwt", "vcxproj\ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_client", "vcxproj\.\handshake_client\handshake_client.vcxproj", "{C3F19761-48E0-AE1F-1155-CF4CEB143B6A}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_server", "vcxproj\.\handshake_server\handshake_server.vcxproj", "{BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reconnect_server", "vcxproj\.\reconnect_server\reconnect_server.vcxproj", "{929C90AE-483F-AC80-EF93-226199F9E428}" ProjectSection(myProperties) = preProject lib = "True" @@ -472,38 +450,6 @@ Global {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|Win32.Build.0 = Release|Win32 {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.ActiveCfg = Release|x64 {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.Build.0 = Release|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|x64.ActiveCfg = Debug|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|Win32.ActiveCfg = Release|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|x64.ActiveCfg = Release|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|Win32.Build.0 = Debug|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|x64.Build.0 = Debug|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|Win32.Build.0 = Release|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|x64.Build.0 = Release|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|x64.Build.0 = Debug|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|Win32.Build.0 = Release|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|x64.ActiveCfg = Release|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|x64.Build.0 = Release|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|Win32.ActiveCfg = Debug|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|x64.ActiveCfg = Debug|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|Win32.ActiveCfg = Release|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|x64.ActiveCfg = Release|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|Win32.Build.0 = Debug|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|x64.Build.0 = Debug|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|Win32.Build.0 = Release|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|x64.Build.0 = Release|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|x64.Build.0 = Debug|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|Win32.Build.0 = Release|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|x64.ActiveCfg = Release|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|x64.Build.0 = Release|x64 {929C90AE-483F-AC80-EF93-226199F9E428}.Debug|Win32.ActiveCfg = Debug|Win32 {929C90AE-483F-AC80-EF93-226199F9E428}.Debug|x64.ActiveCfg = Debug|x64 {929C90AE-483F-AC80-EF93-226199F9E428}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj b/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj new file mode 100644 index 0000000000..53994184b4 --- /dev/null +++ b/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C3F19761-48E0-AE1F-1155-CF4CEB143B6A} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + handshake_client + static + Debug + static + Debug + + + handshake_client + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj.filters b/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj.filters new file mode 100644 index 0000000000..5ab9d55834 --- /dev/null +++ b/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\handshake + + + + + + {12736a84-5ad0-99e6-e337-c0fad767ce45} + + + {532702cb-b33d-9aa1-67d0-8bd5d9992edf} + + + {62ea9f20-390c-5c3e-97fc-054ca3d45f15} + + + + diff --git a/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj b/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj new file mode 100644 index 0000000000..379a34f93a --- /dev/null +++ b/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + handshake_server + static + Debug + static + Debug + + + handshake_server + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj.filters b/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj.filters new file mode 100644 index 0000000000..954066bede --- /dev/null +++ b/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\handshake + + + + + + {1cb218e5-cff0-6347-00f6-5910714d39ce} + + + {869e7645-9441-8315-dd44-3ea0d6916adb} + + + {ba4cba39-097b-d31e-bdfb-13df801b07bf} + + + + -- cgit v1.2.3 From 7be1322b869243d02ec4983ff5c8027761c3ff61 Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Mon, 24 Oct 2016 15:00:49 -0400 Subject: Restrict handshake_{client,server} to linux platform. --- build.yaml | 4 + tools/run_tests/tests.json | 20 +-- vsprojects/buildtests_c.sln | 54 ------ .../test/handshake_client/handshake_client.vcxproj | 199 --------------------- .../handshake_client.vcxproj.filters | 21 --- .../test/handshake_server/handshake_server.vcxproj | 199 --------------------- .../handshake_server.vcxproj.filters | 21 --- 7 files changed, 8 insertions(+), 510 deletions(-) delete mode 100644 vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj delete mode 100644 vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj delete mode 100644 vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj.filters diff --git a/build.yaml b/build.yaml index e4b6b24e1a..6ddeb5e402 100644 --- a/build.yaml +++ b/build.yaml @@ -1978,6 +1978,8 @@ targets: - grpc - gpr_test_util - gpr + platforms: + - linux secure: true - name: handshake_server build: test @@ -1989,6 +1991,8 @@ targets: - grpc - gpr_test_util - gpr + platforms: + - linux secure: true - name: hpack_parser_fuzzer_test build: fuzzer diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index c603c7dce8..4c9832706e 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1223,10 +1223,7 @@ { "args": [], "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], @@ -1235,19 +1232,13 @@ "language": "c", "name": "handshake_client", "platforms": [ - "linux", - "mac", - "posix", - "windows" + "linux" ] }, { "args": [], "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], @@ -1256,10 +1247,7 @@ "language": "c", "name": "handshake_server", "platforms": [ - "linux", - "mac", - "posix", - "windows" + "linux" ] }, { diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index eda6795ab7..339b42f9d7 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1031,28 +1031,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_test", "vcxproj\test {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_client", "vcxproj\test\handshake_client\handshake_client.vcxproj", "{C3F19761-48E0-AE1F-1155-CF4CEB143B6A}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handshake_server", "vcxproj\test\handshake_server\handshake_server.vcxproj", "{BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "head_of_line_blocking_bad_client_test", "vcxproj\test\head_of_line_blocking_bad_client_test\head_of_line_blocking_bad_client_test.vcxproj", "{23DF0572-DBF1-08DA-8EAD-8508354C90A4}" ProjectSection(myProperties) = preProject lib = "False" @@ -3144,38 +3122,6 @@ Global {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|Win32.Build.0 = Release|Win32 {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|x64.ActiveCfg = Release|x64 {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|x64.Build.0 = Release|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|x64.ActiveCfg = Debug|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|Win32.ActiveCfg = Release|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|x64.ActiveCfg = Release|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|Win32.Build.0 = Debug|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug|x64.Build.0 = Debug|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|Win32.Build.0 = Release|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release|x64.Build.0 = Release|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Debug-DLL|x64.Build.0 = Debug|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|Win32.Build.0 = Release|Win32 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|x64.ActiveCfg = Release|x64 - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A}.Release-DLL|x64.Build.0 = Release|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|Win32.ActiveCfg = Debug|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|x64.ActiveCfg = Debug|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|Win32.ActiveCfg = Release|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|x64.ActiveCfg = Release|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|Win32.Build.0 = Debug|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug|x64.Build.0 = Debug|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|Win32.Build.0 = Release|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release|x64.Build.0 = Release|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Debug-DLL|x64.Build.0 = Debug|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|Win32.Build.0 = Release|Win32 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|x64.ActiveCfg = Release|x64 - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1}.Release-DLL|x64.Build.0 = Release|x64 {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug|Win32.ActiveCfg = Debug|Win32 {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug|x64.ActiveCfg = Debug|x64 {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj b/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj deleted file mode 100644 index 53994184b4..0000000000 --- a/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C3F19761-48E0-AE1F-1155-CF4CEB143B6A} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - handshake_client - static - Debug - static - Debug - - - handshake_client - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj.filters b/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj.filters deleted file mode 100644 index 5ab9d55834..0000000000 --- a/vsprojects/vcxproj/test/handshake_client/handshake_client.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\handshake - - - - - - {12736a84-5ad0-99e6-e337-c0fad767ce45} - - - {532702cb-b33d-9aa1-67d0-8bd5d9992edf} - - - {62ea9f20-390c-5c3e-97fc-054ca3d45f15} - - - - diff --git a/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj b/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj deleted file mode 100644 index 379a34f93a..0000000000 --- a/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {BABC32EE-A852-0303-70EC-5C9E3AD6AEF1} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - handshake_server - static - Debug - static - Debug - - - handshake_server - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj.filters b/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj.filters deleted file mode 100644 index 954066bede..0000000000 --- a/vsprojects/vcxproj/test/handshake_server/handshake_server.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\handshake - - - - - - {1cb218e5-cff0-6347-00f6-5910714d39ce} - - - {869e7645-9441-8315-dd44-3ea0d6916adb} - - - {ba4cba39-097b-d31e-bdfb-13df801b07bf} - - - - -- cgit v1.2.3