mirror of https://github.com/grpc/grpc.git
commit
d65172ca4b
97 changed files with 2233 additions and 557 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,45 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2017, 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. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPC_CORE_LIB_SUPPORT_ATOMIC_H |
||||
#define GRPC_CORE_LIB_SUPPORT_ATOMIC_H |
||||
|
||||
#include <grpc/support/port_platform.h> |
||||
|
||||
#ifdef GPR_HAS_CXX11_ATOMIC |
||||
#include "src/core/lib/support/atomic_with_std.h" |
||||
#else |
||||
#include "src/core/lib/support/atomic_with_atm.h" |
||||
#endif |
||||
|
||||
#endif /* GRPC_CORE_LIB_SUPPORT_ATOMIC_H */ |
@ -0,0 +1,70 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2017, 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. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPC_CORE_LIB_SUPPORT_ATOMIC_WITH_ATM_H |
||||
#define GRPC_CORE_LIB_SUPPORT_ATOMIC_WITH_ATM_H |
||||
|
||||
#include <grpc/support/atm.h> |
||||
|
||||
namespace grpc_core { |
||||
|
||||
enum MemoryOrderRelaxed { memory_order_relaxed }; |
||||
|
||||
template <class T> |
||||
class atomic; |
||||
|
||||
template <> |
||||
class atomic<bool> { |
||||
public: |
||||
atomic() { gpr_atm_no_barrier_store(&x_, static_cast<gpr_atm>(false)); } |
||||
explicit atomic(bool x) { |
||||
gpr_atm_no_barrier_store(&x_, static_cast<gpr_atm>(x)); |
||||
} |
||||
|
||||
bool compare_exchange_strong(bool& expected, bool update, MemoryOrderRelaxed, |
||||
MemoryOrderRelaxed) { |
||||
if (!gpr_atm_no_barrier_cas(&x_, static_cast<gpr_atm>(expected), |
||||
static_cast<gpr_atm>(update))) { |
||||
expected = gpr_atm_no_barrier_load(&x_) != 0; |
||||
return false; |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
private: |
||||
gpr_atm x_; |
||||
}; |
||||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif /* GRPC_CORE_LIB_SUPPORT_ATOMIC_WITH_ATM_H */ |
@ -0,0 +1,48 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2017, 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. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPC_CORE_LIB_SUPPORT_ATOMIC_WITH_STD_H |
||||
#define GRPC_CORE_LIB_SUPPORT_ATOMIC_WITH_STD_H |
||||
|
||||
#include <atomic> |
||||
|
||||
namespace grpc_core { |
||||
|
||||
template <class T> |
||||
using atomic = std::atomic<T>; |
||||
|
||||
typedef std::memory_order memory_order; |
||||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif /* GRPC_CORE_LIB_SUPPORT_ATOMIC_WITH_STD_H */ |
@ -0,0 +1,74 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2017, 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. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPC_CORE_LIB_SUPPORT_MEMORY_H |
||||
#define GRPC_CORE_LIB_SUPPORT_MEMORY_H |
||||
|
||||
#include <grpc/support/alloc.h> |
||||
|
||||
#include <memory> |
||||
#include <utility> |
||||
|
||||
namespace grpc_core { |
||||
|
||||
// Alternative to new, since we cannot use it (for fear of libstdc++)
|
||||
template <typename T, typename... Args> |
||||
inline T* New(Args&&... args) { |
||||
void* p = gpr_malloc(sizeof(T)); |
||||
return new (p) T(std::forward<Args>(args)...); |
||||
} |
||||
|
||||
// Alternative to delete, since we cannot use it (for fear of libstdc++)
|
||||
template <typename T> |
||||
inline void Delete(T* p) { |
||||
p->~T(); |
||||
gpr_free(p); |
||||
} |
||||
|
||||
template <typename T> |
||||
class DefaultDelete { |
||||
public: |
||||
void operator()(T* p) { Delete(p); } |
||||
}; |
||||
|
||||
template <typename T, typename Deleter = DefaultDelete<T>> |
||||
using UniquePtr = std::unique_ptr<T, Deleter>; |
||||
|
||||
template <typename T, typename... Args> |
||||
inline UniquePtr<T> MakeUnique(Args&&... args) { |
||||
return UniquePtr<T>(New<T>(std::forward<Args>(args)...)); |
||||
} |
||||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif /* GRPC_CORE_LIB_SUPPORT_MEMORY_H */ |
@ -0,0 +1,236 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2017, 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 "src/core/tsi/transport_security_adapter.h" |
||||
|
||||
#include <string.h> |
||||
|
||||
#include <grpc/support/alloc.h> |
||||
#include <grpc/support/log.h> |
||||
#include "src/core/tsi/transport_security.h" |
||||
|
||||
#define TSI_ADAPTER_INITIAL_BUFFER_SIZE 256 |
||||
|
||||
/* --- tsi_adapter_handshaker_result implementation ---*/ |
||||
|
||||
typedef struct { |
||||
tsi_handshaker_result base; |
||||
tsi_handshaker *wrapped; |
||||
unsigned char *unused_bytes; |
||||
size_t unused_bytes_size; |
||||
} tsi_adapter_handshaker_result; |
||||
|
||||
static tsi_result adapter_result_extract_peer(const tsi_handshaker_result *self, |
||||
tsi_peer *peer) { |
||||
tsi_adapter_handshaker_result *impl = (tsi_adapter_handshaker_result *)self; |
||||
return tsi_handshaker_extract_peer(impl->wrapped, peer); |
||||
} |
||||
|
||||
static tsi_result adapter_result_create_frame_protector( |
||||
const tsi_handshaker_result *self, size_t *max_output_protected_frame_size, |
||||
tsi_frame_protector **protector) { |
||||
tsi_adapter_handshaker_result *impl = (tsi_adapter_handshaker_result *)self; |
||||
return tsi_handshaker_create_frame_protector( |
||||
impl->wrapped, max_output_protected_frame_size, protector); |
||||
} |
||||
|
||||
static tsi_result adapter_result_get_unused_bytes( |
||||
const tsi_handshaker_result *self, unsigned char **bytes, |
||||
size_t *byte_size) { |
||||
tsi_adapter_handshaker_result *impl = (tsi_adapter_handshaker_result *)self; |
||||
*bytes = impl->unused_bytes; |
||||
*byte_size = impl->unused_bytes_size; |
||||
return TSI_OK; |
||||
} |
||||
|
||||
static void adapter_result_destroy(tsi_handshaker_result *self) { |
||||
tsi_adapter_handshaker_result *impl = (tsi_adapter_handshaker_result *)self; |
||||
tsi_handshaker_destroy(impl->wrapped); |
||||
gpr_free(impl->unused_bytes); |
||||
gpr_free(self); |
||||
} |
||||
|
||||
static const tsi_handshaker_result_vtable result_vtable = { |
||||
adapter_result_extract_peer, adapter_result_create_frame_protector, |
||||
adapter_result_get_unused_bytes, adapter_result_destroy, |
||||
}; |
||||
|
||||
/* Ownership of wrapped tsi_handshaker is transferred to the result object. */ |
||||
static tsi_result tsi_adapter_create_handshaker_result( |
||||
tsi_handshaker *wrapped, const unsigned char *unused_bytes, |
||||
size_t unused_bytes_size, tsi_handshaker_result **handshaker_result) { |
||||
if (wrapped == NULL || (unused_bytes_size > 0 && unused_bytes == NULL)) { |
||||
return TSI_INVALID_ARGUMENT; |
||||
} |
||||
tsi_adapter_handshaker_result *impl = gpr_zalloc(sizeof(*impl)); |
||||
impl->base.vtable = &result_vtable; |
||||
impl->wrapped = wrapped; |
||||
impl->unused_bytes_size = unused_bytes_size; |
||||
if (unused_bytes_size > 0) { |
||||
impl->unused_bytes = gpr_malloc(unused_bytes_size); |
||||
memcpy(impl->unused_bytes, unused_bytes, unused_bytes_size); |
||||
} else { |
||||
impl->unused_bytes = NULL; |
||||
} |
||||
*handshaker_result = &impl->base; |
||||
return TSI_OK; |
||||
} |
||||
|
||||
/* --- tsi_adapter_handshaker implementation ---*/ |
||||
|
||||
typedef struct { |
||||
tsi_handshaker base; |
||||
tsi_handshaker *wrapped; |
||||
unsigned char *adapter_buffer; |
||||
size_t adapter_buffer_size; |
||||
} tsi_adapter_handshaker; |
||||
|
||||
static tsi_result adapter_get_bytes_to_send_to_peer(tsi_handshaker *self, |
||||
unsigned char *bytes, |
||||
size_t *bytes_size) { |
||||
return tsi_handshaker_get_bytes_to_send_to_peer( |
||||
tsi_adapter_handshaker_get_wrapped(self), bytes, bytes_size); |
||||
} |
||||
|
||||
static tsi_result adapter_process_bytes_from_peer(tsi_handshaker *self, |
||||
const unsigned char *bytes, |
||||
size_t *bytes_size) { |
||||
return tsi_handshaker_process_bytes_from_peer( |
||||
tsi_adapter_handshaker_get_wrapped(self), bytes, bytes_size); |
||||
} |
||||
|
||||
static tsi_result adapter_get_result(tsi_handshaker *self) { |
||||
return tsi_handshaker_get_result(tsi_adapter_handshaker_get_wrapped(self)); |
||||
} |
||||
|
||||
static tsi_result adapter_extract_peer(tsi_handshaker *self, tsi_peer *peer) { |
||||
return tsi_handshaker_extract_peer(tsi_adapter_handshaker_get_wrapped(self), |
||||
peer); |
||||
} |
||||
|
||||
static tsi_result adapter_create_frame_protector( |
||||
tsi_handshaker *self, size_t *max_protected_frame_size, |
||||
tsi_frame_protector **protector) { |
||||
return tsi_handshaker_create_frame_protector( |
||||
tsi_adapter_handshaker_get_wrapped(self), max_protected_frame_size, |
||||
protector); |
||||
} |
||||
|
||||
static void adapter_destroy(tsi_handshaker *self) { |
||||
tsi_adapter_handshaker *impl = (tsi_adapter_handshaker *)self; |
||||
tsi_handshaker_destroy(impl->wrapped); |
||||
gpr_free(impl->adapter_buffer); |
||||
gpr_free(self); |
||||
} |
||||
|
||||
static tsi_result adapter_next( |
||||
tsi_handshaker *self, const unsigned char *received_bytes, |
||||
size_t received_bytes_size, unsigned char **bytes_to_send, |
||||
size_t *bytes_to_send_size, tsi_handshaker_result **handshaker_result, |
||||
tsi_handshaker_on_next_done_cb cb, void *user_data) { |
||||
/* Input sanity check. */ |
||||
if ((received_bytes_size > 0 && received_bytes == NULL) || |
||||
bytes_to_send == NULL || bytes_to_send_size == NULL || |
||||
handshaker_result == NULL) { |
||||
return TSI_INVALID_ARGUMENT; |
||||
} |
||||
|
||||
/* If there are received bytes, process them first. */ |
||||
tsi_adapter_handshaker *impl = (tsi_adapter_handshaker *)self; |
||||
tsi_result status = TSI_OK; |
||||
size_t bytes_consumed = received_bytes_size; |
||||
if (received_bytes_size > 0) { |
||||
status = tsi_handshaker_process_bytes_from_peer( |
||||
impl->wrapped, received_bytes, &bytes_consumed); |
||||
if (status != TSI_OK) return status; |
||||
} |
||||
|
||||
/* Get bytes to send to the peer, if available. */ |
||||
size_t offset = 0; |
||||
do { |
||||
size_t to_send_size = impl->adapter_buffer_size - offset; |
||||
status = tsi_handshaker_get_bytes_to_send_to_peer( |
||||
impl->wrapped, impl->adapter_buffer + offset, &to_send_size); |
||||
offset += to_send_size; |
||||
if (status == TSI_INCOMPLETE_DATA) { |
||||
impl->adapter_buffer_size *= 2; |
||||
impl->adapter_buffer = |
||||
gpr_realloc(impl->adapter_buffer, impl->adapter_buffer_size); |
||||
} |
||||
} while (status == TSI_INCOMPLETE_DATA); |
||||
if (status != TSI_OK) return status; |
||||
*bytes_to_send = impl->adapter_buffer; |
||||
*bytes_to_send_size = offset; |
||||
|
||||
/* If handshake completes, create tsi_handshaker_result. */ |
||||
if (tsi_handshaker_is_in_progress(impl->wrapped)) { |
||||
*handshaker_result = NULL; |
||||
} else { |
||||
size_t unused_bytes_size = received_bytes_size - bytes_consumed; |
||||
const unsigned char *unused_bytes = |
||||
unused_bytes_size == 0 ? NULL : received_bytes + bytes_consumed; |
||||
status = tsi_adapter_create_handshaker_result( |
||||
impl->wrapped, unused_bytes, unused_bytes_size, handshaker_result); |
||||
if (status == TSI_OK) { |
||||
impl->base.handshaker_result_created = true; |
||||
impl->wrapped = NULL; |
||||
} |
||||
} |
||||
return status; |
||||
} |
||||
|
||||
static const tsi_handshaker_vtable handshaker_vtable = { |
||||
adapter_get_bytes_to_send_to_peer, |
||||
adapter_process_bytes_from_peer, |
||||
adapter_get_result, |
||||
adapter_extract_peer, |
||||
adapter_create_frame_protector, |
||||
adapter_destroy, |
||||
adapter_next, |
||||
}; |
||||
|
||||
tsi_handshaker *tsi_create_adapter_handshaker(tsi_handshaker *wrapped) { |
||||
GPR_ASSERT(wrapped != NULL); |
||||
tsi_adapter_handshaker *impl = gpr_zalloc(sizeof(*impl)); |
||||
impl->base.vtable = &handshaker_vtable; |
||||
impl->wrapped = wrapped; |
||||
impl->adapter_buffer_size = TSI_ADAPTER_INITIAL_BUFFER_SIZE; |
||||
impl->adapter_buffer = gpr_malloc(impl->adapter_buffer_size); |
||||
return &impl->base; |
||||
} |
||||
|
||||
tsi_handshaker *tsi_adapter_handshaker_get_wrapped(tsi_handshaker *adapter) { |
||||
if (adapter == NULL) return NULL; |
||||
tsi_adapter_handshaker *impl = (tsi_adapter_handshaker *)adapter; |
||||
return impl->wrapped; |
||||
} |
@ -0,0 +1,62 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2017, 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. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPC_CORE_TSI_TRANSPORT_SECURITY_ADAPTER_H |
||||
#define GRPC_CORE_TSI_TRANSPORT_SECURITY_ADAPTER_H |
||||
|
||||
#include "src/core/tsi/transport_security_interface.h" |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
/* Create a tsi handshaker that takes an implementation of old interface and
|
||||
converts into an implementation of new interface. In the old interface, |
||||
there are get_bytes_to_send_to_peer, process_bytes_from_peer, get_result, |
||||
extract_peer, and create_frame_protector. In the new interface, only next |
||||
method is needed. See transport_security_interface.h for details. Note that |
||||
this tsi adapter handshaker is temporary. It will be removed once TSI has |
||||
been fully migrated to the new interface. |
||||
Ownership of input tsi_handshaker is transferred to this new adapter. */ |
||||
tsi_handshaker *tsi_create_adapter_handshaker(tsi_handshaker *wrapped); |
||||
|
||||
/* Given a tsi adapter handshaker, return the original wrapped handshaker. The
|
||||
adapter still owns the wrapped handshaker which should not be destroyed by |
||||
the caller. */ |
||||
tsi_handshaker *tsi_adapter_handshaker_get_wrapped(tsi_handshaker *adapter); |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif /* GRPC_CORE_TSI_TRANSPORT_SECURITY_ADAPTER_H */ |
@ -0,0 +1,89 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2017, 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 "src/core/lib/support/memory.h" |
||||
#include <gtest/gtest.h> |
||||
#include "test/core/util/test_config.h" |
||||
|
||||
namespace grpc_core { |
||||
namespace testing { |
||||
|
||||
struct Foo { |
||||
Foo(int p, int q) : a(p), b(q) {} |
||||
int a; |
||||
int b; |
||||
}; |
||||
|
||||
TEST(MemoryTest, NewDeleteTest) { Delete(New<int>()); } |
||||
|
||||
TEST(MemoryTest, NewDeleteWithArgTest) { |
||||
int* i = New<int>(42); |
||||
EXPECT_EQ(42, *i); |
||||
Delete(i); |
||||
} |
||||
|
||||
TEST(MemoryTest, NewDeleteWithArgsTest) { |
||||
Foo* p = New<Foo>(1, 2); |
||||
EXPECT_EQ(1, p->a); |
||||
EXPECT_EQ(2, p->b); |
||||
Delete(p); |
||||
} |
||||
|
||||
TEST(MemoryTest, MakeUniqueTest) { MakeUnique<int>(); } |
||||
|
||||
TEST(MemoryTest, MakeUniqueWithArgTest) { |
||||
auto i = MakeUnique<int>(42); |
||||
EXPECT_EQ(42, *i); |
||||
} |
||||
|
||||
TEST(MemoryTest, UniquePtrWithCustomDeleter) { |
||||
int n = 0; |
||||
class IncrementingDeleter { |
||||
public: |
||||
void operator()(int* p) { ++*p; } |
||||
}; |
||||
{ |
||||
UniquePtr<int, IncrementingDeleter> p(&n); |
||||
EXPECT_EQ(0, n); |
||||
} |
||||
EXPECT_EQ(1, n); |
||||
} |
||||
|
||||
} // namespace testing
|
||||
} // namespace grpc_core
|
||||
|
||||
int main(int argc, char** argv) { |
||||
grpc_test_init(argc, argv); |
||||
::testing::InitGoogleTest(&argc, argv); |
||||
return RUN_ALL_TESTS(); |
||||
} |
@ -0,0 +1,204 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" /> |
||||
<ItemGroup Label="ProjectConfigurations"> |
||||
<ProjectConfiguration Include="Debug|Win32"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Debug|x64"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|Win32"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|x64"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
</ItemGroup> |
||||
<PropertyGroup Label="Globals"> |
||||
<ProjectGuid>{0B674E04-7F49-A76B-3FF6-989D751B9AA4}</ProjectGuid> |
||||
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected> |
||||
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration"> |
||||
<PlatformToolset>v100</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration"> |
||||
<PlatformToolset>v110</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration"> |
||||
<PlatformToolset>v120</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration"> |
||||
<PlatformToolset>v140</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>true</UseDebugLibraries> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>false</UseDebugLibraries> |
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||
<ImportGroup Label="ExtensionSettings"> |
||||
</ImportGroup> |
||||
<ImportGroup Label="PropertySheets"> |
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\cpptest.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\global.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\openssl.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\protobuf.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" /> |
||||
</ImportGroup> |
||||
<PropertyGroup Label="UserMacros" /> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> |
||||
<TargetName>memory_test</TargetName> |
||||
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib> |
||||
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl> |
||||
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'"> |
||||
<TargetName>memory_test</TargetName> |
||||
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib> |
||||
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl> |
||||
<Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl> |
||||
</PropertyGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\test\core\support\memory_test.cc"> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_test_util\grpc_test_util.vcxproj"> |
||||
<Project>{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj"> |
||||
<Project>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc\grpc.vcxproj"> |
||||
<Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr_test_util\gpr_test_util.vcxproj"> |
||||
<Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj"> |
||||
<Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project> |
||||
</ProjectReference> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<None Include="packages.config" /> |
||||
</ItemGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||
<ImportGroup Label="ExtensionTargets"> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||
</ImportGroup> |
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
||||
<PropertyGroup> |
||||
<ErrorText>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}.</ErrorText> |
||||
</PropertyGroup> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" /> |
||||
</Target> |
||||
</Project> |
||||
|
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\test\core\support\memory_test.cc"> |
||||
<Filter>test\core\support</Filter> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
|
||||
<ItemGroup> |
||||
<Filter Include="test"> |
||||
<UniqueIdentifier>{80245c10-56a8-a6ec-0abc-8125f4271d38}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core"> |
||||
<UniqueIdentifier>{eb61342c-1b95-756a-8b70-42aeb2a55f59}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core\support"> |
||||
<UniqueIdentifier>{8c8dfaee-c0b7-e843-c50e-427448fe1eb9}</UniqueIdentifier> |
||||
</Filter> |
||||
</ItemGroup> |
||||
</Project> |
||||
|
Loading…
Reference in new issue