client_ssl.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2016 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
20 
21 // This test won't work except with posix sockets enabled
22 #ifdef GRPC_POSIX_SOCKET_TCP
23 
24 #include <arpa/inet.h>
25 #include <stdlib.h>
26 #include <string.h>
27 #include <sys/socket.h>
28 #include <unistd.h>
29 
30 #include <string>
31 
32 #include <openssl/err.h>
33 #include <openssl/ssl.h>
34 
35 #include "absl/strings/str_cat.h"
36 
37 #include <grpc/grpc.h>
38 #include <grpc/grpc_security.h>
39 #include <grpc/support/alloc.h>
40 #include <grpc/support/log.h>
41 
44 #include "src/core/lib/gprpp/thd.h"
46 #include "test/core/util/port.h"
48 
49 #define SSL_CERT_PATH "src/core/tsi/test_creds/server1.pem"
50 #define SSL_KEY_PATH "src/core/tsi/test_creds/server1.key"
51 #define SSL_CA_PATH "src/core/tsi/test_creds/ca.pem"
52 
53 grpc_core::TraceFlag client_ssl_tsi_tracing_enabled(false, "tsi");
54 
55 class SslLibraryInfo {
56  public:
57  SslLibraryInfo() {}
58 
59  void Notify() {
61  ready_ = true;
62  cv_.Signal();
63  }
64 
65  void Await() {
67  while (!ready_) {
68  cv_.Wait(&mu_);
69  }
70  }
71 
72  private:
75  bool ready_ ABSL_GUARDED_BY(mu_) = false;
76 };
77 
78 // Arguments for TLS server thread.
79 typedef struct {
80  int socket;
81  char* alpn_preferred;
82  SslLibraryInfo* ssl_library_info;
83 } server_args;
84 
85 // Based on https://wiki.openssl.org/index.php/Simple_TLS_Server.
86 // Pick an arbitrary unused port and return it in *out_port. Return
87 // an fd>=0 on success.
88 static int create_socket(int* out_port) {
89  int s;
90  struct sockaddr_in addr;
91  socklen_t addr_len;
92  *out_port = -1;
93 
94  addr.sin_family = AF_INET;
95  addr.sin_port = 0;
96  addr.sin_addr.s_addr = htonl(INADDR_ANY);
97 
98  s = socket(AF_INET, SOCK_STREAM, 0);
99  if (s < 0) {
100  perror("Unable to create socket");
101  return -1;
102  }
103 
104  if (bind(s, reinterpret_cast<struct sockaddr*>(&addr), sizeof(addr)) < 0) {
105  perror("Unable to bind");
106  gpr_log(GPR_ERROR, "%s", "Unable to bind to any port");
107  close(s);
108  return -1;
109  }
110 
111  if (listen(s, 1) < 0) {
112  perror("Unable to listen");
113  close(s);
114  return -1;
115  }
116 
117  addr_len = sizeof(addr);
118  if (getsockname(s, reinterpret_cast<struct sockaddr*>(&addr), &addr_len) !=
119  0 ||
120  addr_len > sizeof(addr)) {
121  perror("getsockname");
122  gpr_log(GPR_ERROR, "%s", "Unable to get socket local address");
123  close(s);
124  return -1;
125  }
126 
127  *out_port = ntohs(addr.sin_port);
128  return s;
129 }
130 
131 // Server callback during ALPN negotiation. See man page for
132 // SSL_CTX_set_alpn_select_cb.
133 static int alpn_select_cb(SSL* /*ssl*/, const uint8_t** out, uint8_t* out_len,
134  const uint8_t* in, unsigned in_len, void* arg) {
135  const uint8_t* alpn_preferred = static_cast<const uint8_t*>(arg);
136 
137  *out = alpn_preferred;
138  *out_len = static_cast<uint8_t>(
139  strlen(reinterpret_cast<const char*>(alpn_preferred)));
140 
141  // Validate that the ALPN list includes "h2" and "grpc-exp", that "grpc-exp"
142  // precedes "h2".
143  bool grpc_exp_seen = false;
144  bool h2_seen = false;
145  const char* inp = reinterpret_cast<const char*>(in);
146  const char* in_end = inp + in_len;
147  while (inp < in_end) {
148  const size_t length = static_cast<size_t>(*inp++);
149  if (length == strlen("grpc-exp") && strncmp(inp, "grpc-exp", length) == 0) {
150  grpc_exp_seen = true;
151  GPR_ASSERT(!h2_seen);
152  }
153  if (length == strlen("h2") && strncmp(inp, "h2", length) == 0) {
154  h2_seen = true;
155  GPR_ASSERT(grpc_exp_seen);
156  }
157  inp += length;
158  }
159 
160  GPR_ASSERT(inp == in_end);
161  GPR_ASSERT(grpc_exp_seen);
162  GPR_ASSERT(h2_seen);
163 
164  return SSL_TLSEXT_ERR_OK;
165 }
166 
167 static void ssl_log_where_info(const SSL* ssl, int where, int flag,
168  const char* msg) {
169  if ((where & flag) &&
170  GRPC_TRACE_FLAG_ENABLED(client_ssl_tsi_tracing_enabled)) {
171  gpr_log(GPR_INFO, "%20.20s - %30.30s - %5.10s", msg,
173  }
174 }
175 
176 static void ssl_server_info_callback(const SSL* ssl, int where, int ret) {
177  if (ret == 0) {
178  gpr_log(GPR_ERROR, "ssl_server_info_callback: error occurred.\n");
179  return;
180  }
181 
182  ssl_log_where_info(ssl, where, SSL_CB_LOOP, "Server: LOOP");
184  "Server: HANDSHAKE START");
186  "Server: HANDSHAKE DONE");
187 }
188 
189 // Minimal TLS server. This is largely based on the example at
190 // https://wiki.openssl.org/index.php/Simple_TLS_Server and the gRPC core
191 // internals in src/core/tsi/ssl_transport_security.c.
192 static void server_thread(void* arg) {
193  const server_args* args = static_cast<server_args*>(arg);
194 
197  args->ssl_library_info->Notify();
198 
201  if (!ctx) {
202  perror("Unable to create SSL context");
204  abort();
205  }
206 
207  // Load key pair.
209  perror("Unable to use certificate file.");
211  abort();
212  }
214  perror("Unable to use private key file.");
216  abort();
217  }
218  if (SSL_CTX_check_private_key(ctx) != 1) {
219  perror("Check private key failed.");
221  abort();
222  }
223 
224  // Set the cipher list to match the one expressed in
225  // src/core/tsi/ssl_transport_security.cc.
226  const char* cipher_list =
227  "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-"
228  "SHA384:ECDHE-RSA-AES256-GCM-SHA384";
229  if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) {
231  gpr_log(GPR_ERROR, "Couldn't set server cipher list.");
232  abort();
233  }
234 
235  // Enable automatic curve selection. This is a NO-OP when using OpenSSL
236  // versions > 1.0.2.
237  if (!SSL_CTX_set_ecdh_auto(ctx, /*onoff=*/1)) {
239  gpr_log(GPR_ERROR, "Couldn't set automatic curve selection.");
240  abort();
241  }
242 
243  // Register the ALPN selection callback.
244  SSL_CTX_set_alpn_select_cb(ctx, alpn_select_cb, args->alpn_preferred);
245 
246  // bind/listen/accept at TCP layer.
247  const int sock = args->socket;
248  gpr_log(GPR_INFO, "Server listening");
249  struct sockaddr_in addr;
250  socklen_t len = sizeof(addr);
251  const int client =
252  accept(sock, reinterpret_cast<struct sockaddr*>(&addr), &len);
253  if (client < 0) {
254  perror("Unable to accept");
255  abort();
256  }
257 
258  // Establish a SSL* and accept at SSL layer.
259  SSL* ssl = SSL_new(ctx);
260  SSL_set_info_callback(ssl, ssl_server_info_callback);
261  GPR_ASSERT(ssl);
262  SSL_set_fd(ssl, client);
263  if (SSL_accept(ssl) <= 0) {
265  gpr_log(GPR_ERROR, "Handshake failed.");
266  } else {
267  gpr_log(GPR_INFO, "Handshake successful.");
268  }
269 
270  // Send out the settings frame.
271  const char settings_frame[] = "\x00\x00\x00\x04\x00\x00\x00\x00\x00";
272  SSL_write(ssl, settings_frame, sizeof(settings_frame) - 1);
273 
274  // Wait until the client drops its connection.
275  char buf;
276  while (SSL_read(ssl, &buf, sizeof(buf)) > 0) {
277  }
278 
279  SSL_free(ssl);
280  close(client);
281  close(sock);
282  SSL_CTX_free(ctx);
283 }
284 
285 // This test launches a minimal TLS server on a separate thread and then
286 // establishes a TLS handshake via the core library to the server. The TLS
287 // server validates ALPN aspects of the handshake and supplies the protocol
288 // specified in the server_alpn_preferred argument to the client.
289 static bool client_ssl_test(char* server_alpn_preferred) {
290  bool success = true;
291 
292  grpc_init();
293 
294  // Find a port we can bind to. Retries added to handle flakes in port server
295  // and port picking.
296  int port = -1;
297  int server_socket = -1;
298  int socket_retries = 30;
299  while (server_socket == -1 && socket_retries-- > 0) {
300  server_socket = create_socket(&port);
301  if (server_socket == -1) {
302  sleep(1);
303  }
304  }
305  GPR_ASSERT(server_socket > 0 && port > 0);
306 
307  // Launch the TLS server thread.
308  SslLibraryInfo ssl_library_info;
309  server_args args = {server_socket, server_alpn_preferred, &ssl_library_info};
310  bool ok;
311  grpc_core::Thread thd("grpc_client_ssl_test", server_thread, &args, &ok);
312  GPR_ASSERT(ok);
313  thd.Start();
314  ssl_library_info.Await();
315 
316  // Load key pair and establish client SSL credentials.
317  grpc_ssl_pem_key_cert_pair pem_key_cert_pair;
318  grpc_slice ca_slice, cert_slice, key_slice;
319  GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file",
320  grpc_load_file(SSL_CA_PATH, 1, &ca_slice)));
321  GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file",
322  grpc_load_file(SSL_CERT_PATH, 1, &cert_slice)));
323  GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file",
324  grpc_load_file(SSL_KEY_PATH, 1, &key_slice)));
325  const char* ca_cert =
326  reinterpret_cast<const char*> GRPC_SLICE_START_PTR(ca_slice);
327  pem_key_cert_pair.private_key =
328  reinterpret_cast<const char*> GRPC_SLICE_START_PTR(key_slice);
329  pem_key_cert_pair.cert_chain =
330  reinterpret_cast<const char*> GRPC_SLICE_START_PTR(cert_slice);
332  ca_cert, &pem_key_cert_pair, nullptr, nullptr);
333 
334  // Establish a channel pointing at the TLS server. Since the gRPC runtime is
335  // lazy, this won't necessarily establish a connection yet.
336  std::string target = absl::StrCat("127.0.0.1:", port);
337  grpc_arg ssl_name_override = {
339  const_cast<char*>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
340  {const_cast<char*>("foo.test.google.fr")}};
341  grpc_channel_args grpc_args;
342  grpc_args.num_args = 1;
343  grpc_args.args = &ssl_name_override;
345  grpc_channel_create(target.c_str(), ssl_creds, &grpc_args);
347 
348  // Initially the channel will be idle, the
349  // grpc_channel_check_connectivity_state triggers an attempt to connect.
351  channel, 1 /* try_to_connect */) == GRPC_CHANNEL_IDLE);
352 
353  // Wait a bounded number of times for the channel to be ready. When the
354  // channel is ready, the initial TLS handshake will have successfully
355  // completed and we know that the client's ALPN list satisfied the server.
356  int retries = 10;
359 
360  while (state != GRPC_CHANNEL_READY && retries-- > 0) {
364  grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, nullptr);
366  state =
367  grpc_channel_check_connectivity_state(channel, 0 /* try_to_connect */);
368  }
370  if (retries < 0) {
371  success = false;
372  }
373 
376  grpc_slice_unref(cert_slice);
377  grpc_slice_unref(key_slice);
378  grpc_slice_unref(ca_slice);
379 
380  thd.Join();
381 
382  grpc_shutdown();
383 
384  return success;
385 }
386 
387 int main(int argc, char* argv[]) {
388  grpc::testing::TestEnvironment env(&argc, argv);
389  // Handshake succeeeds when the server has grpc-exp as the ALPN preference.
390  GPR_ASSERT(client_ssl_test(const_cast<char*>("grpc-exp")));
391  // Handshake succeeeds when the server has h2 as the ALPN preference. This
392  // covers legacy gRPC servers which don't support grpc-exp.
393  GPR_ASSERT(client_ssl_test(const_cast<char*>("h2")));
394  // Handshake fails when the server uses a fake protocol as its ALPN
395  // preference. This validates the client is correctly validating ALPN returns
396  // and sanity checks the client_ssl_test.
397  GPR_ASSERT(!client_ssl_test(const_cast<char*>("foo")));
398  // Clean up the SSL libraries.
399  EVP_cleanup();
400  return 0;
401 }
402 
403 #else /* GRPC_POSIX_SOCKET_TCP */
404 
405 int main(int argc, char** argv) { return 1; }
406 
407 #endif /* GRPC_POSIX_SOCKET_TCP */
SSL_CB_HANDSHAKE_START
#define SSL_CB_HANDSHAKE_START
Definition: ssl.h:4291
grpc_arg
Definition: grpc_types.h:103
trace.h
grpc_slice_unref
GPRAPI void grpc_slice_unref(grpc_slice s)
Definition: slice_api.cc:32
flag
uint32_t flag
Definition: ssl_versions.cc:162
GPR_INFO
#define GPR_INFO
Definition: include/grpc/impl/codegen/log.h:56
GRPC_CHANNEL_READY
@ GRPC_CHANNEL_READY
Definition: include/grpc/impl/codegen/connectivity_state.h:36
gen_build_yaml.out
dictionary out
Definition: src/benchmark/gen_build_yaml.py:24
grpc_core::CondVar
Definition: src/core/lib/gprpp/sync.h:126
grpc_timeout_seconds_to_deadline
gpr_timespec grpc_timeout_seconds_to_deadline(int64_t time_s)
Definition: test/core/util/test_config.cc:81
log.h
port.h
ctx
Definition: benchmark-async.c:30
grpc_load_file
grpc_error_handle grpc_load_file(const char *filename, int add_null_terminator, grpc_slice *output)
Definition: load_file.cc:33
generate.env
env
Definition: generate.py:37
absl::StrCat
std::string StrCat(const AlphaNum &a, const AlphaNum &b)
Definition: abseil-cpp/absl/strings/str_cat.cc:98
SSL_CTX_set_ecdh_auto
#define SSL_CTX_set_ecdh_auto(ctx, onoff)
Definition: ssl.h:4953
load_file.h
grpc_ssl_pem_key_cert_pair::private_key
const char * private_key
Definition: grpc_security.h:176
GRPC_ARG_STRING
@ GRPC_ARG_STRING
Definition: grpc_types.h:80
cv_
std::condition_variable cv_
Definition: client_callback_end2end_test.cc:733
SSL_CB_HANDSHAKE_DONE
#define SSL_CB_HANDSHAKE_DONE
Definition: ssl.h:4292
regen-readme.inp
inp
Definition: regen-readme.py:11
client
Definition: examples/python/async_streaming/client.py:1
grpc_core::MutexLock
Definition: src/core/lib/gprpp/sync.h:88
server_thread
void server_thread(void *vargs)
Definition: concurrent_connectivity_test.cc:107
SSL_KEY_PATH
#define SSL_KEY_PATH
Definition: server_ssl_common.cc:46
string.h
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
grpc_channel_check_connectivity_state
GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state(grpc_channel *channel, int try_to_connect)
Definition: channel_connectivity.cc:56
SSL_TLSEXT_ERR_OK
#define SSL_TLSEXT_ERR_OK
Definition: ssl.h:2755
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
ERR_print_errors_fp
#define ERR_print_errors_fp
Definition: boringssl_prefix_symbols.h:1437
GRPC_OP_COMPLETE
@ GRPC_OP_COMPLETE
Definition: grpc_types.h:558
ABSL_GUARDED_BY
#define ABSL_GUARDED_BY(x)
Definition: abseil-cpp/absl/base/thread_annotations.h:62
absl::FormatConversionChar::s
@ s
GRPC_LOG_IF_ERROR
#define GRPC_LOG_IF_ERROR(what, error)
Definition: error.h:398
grpc_security.h
SSL_load_error_strings
#define SSL_load_error_strings
Definition: boringssl_prefix_symbols.h:409
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
TLSv1_2_server_method
#define TLSv1_2_server_method
Definition: boringssl_prefix_symbols.h:546
grpc_ssl_pem_key_cert_pair::cert_chain
const char * cert_chain
Definition: grpc_security.h:180
ssl_ctx_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3404
grpc_channel_args
Definition: grpc_types.h:132
GRPC_TRACE_FLAG_ENABLED
#define GRPC_TRACE_FLAG_ENABLED(f)
Definition: debug/trace.h:114
gen_build_yaml.struct
def struct(**kwargs)
Definition: test/core/end2end/gen_build_yaml.py:30
mu_
Mutex mu_
Definition: oob_backend_metric.cc:115
OpenSSL_add_ssl_algorithms
#define OpenSSL_add_ssl_algorithms()
Definition: ssl.h:4726
grpc_connectivity_state
grpc_connectivity_state
Definition: include/grpc/impl/codegen/connectivity_state.h:30
grpc_ssl_credentials_create
GRPCAPI grpc_channel_credentials * grpc_ssl_credentials_create(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, const verify_peer_options *verify_options, void *reserved)
Definition: ssl_credentials.cc:132
python_utils.port_server.stderr
stderr
Definition: port_server.py:51
SSL_CTX_free
#define SSL_CTX_free
Definition: boringssl_prefix_symbols.h:84
in
const char * in
Definition: third_party/abseil-cpp/absl/strings/internal/str_format/parser_test.cc:391
channel
wrapped_grpc_channel * channel
Definition: src/php/ext/grpc/call.h:33
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
SSL_CTX_new
#define SSL_CTX_new
Definition: boringssl_prefix_symbols.h:115
GPR_ASSERT
#define GPR_ASSERT(x)
Definition: include/grpc/impl/codegen/log.h:94
GRPC_SSL_TARGET_NAME_OVERRIDE_ARG
#define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG
Definition: grpc_types.h:278
ssl_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3698
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
grpc_event
Definition: grpc_types.h:564
grpc_completion_queue
Definition: completion_queue.cc:347
SSL_accept
#define SSL_accept
Definition: boringssl_prefix_symbols.h:275
main
int main(int argc, char **argv)
Definition: client_ssl.cc:405
grpc.h
GRPC_SLICE_START_PTR
#define GRPC_SLICE_START_PTR(slice)
Definition: include/grpc/impl/codegen/slice.h:101
err.h
GRPC_CHANNEL_IDLE
@ GRPC_CHANNEL_IDLE
Definition: include/grpc/impl/codegen/connectivity_state.h:32
grpc_channel_args::num_args
size_t num_args
Definition: grpc_types.h:133
arg
Definition: cmdline.cc:40
create_socket
int create_socket(const char *socket_type, fd_pair *client_fds, fd_pair *server_fds)
Definition: low_level_ping_pong.cc:560
grpc_slice
Definition: include/grpc/impl/codegen/slice.h:65
close
#define close
Definition: test-fs.c:48
GPR_ERROR
#define GPR_ERROR
Definition: include/grpc/impl/codegen/log.h:57
msg
std::string msg
Definition: client_interceptors_end2end_test.cc:372
ssl.h
grpc_core::TraceFlag
Definition: debug/trace.h:63
tests.unit._exit_scenarios.port
port
Definition: _exit_scenarios.py:179
SSL_set_info_callback
#define SSL_set_info_callback
Definition: boringssl_prefix_symbols.h:465
test_config.h
SSL_CTX_use_certificate_file
#define SSL_CTX_use_certificate_file
Definition: boringssl_prefix_symbols.h:231
grpc_channel_credentials_release
GRPCAPI void grpc_channel_credentials_release(grpc_channel_credentials *creds)
Definition: credentials.cc:36
SSL_CA_PATH
#define SSL_CA_PATH
Definition: server_ssl_common.cc:47
SSL_CTX_set_cipher_list
#define SSL_CTX_set_cipher_list
Definition: boringssl_prefix_symbols.h:157
SSL_free
#define SSL_free
Definition: boringssl_prefix_symbols.h:308
SSL_state_string
#define SSL_state_string
Definition: boringssl_prefix_symbols.h:517
grpc_core::Mutex
Definition: src/core/lib/gprpp/sync.h:61
grpc_channel_create
GRPCAPI grpc_channel * grpc_channel_create(const char *target, grpc_channel_credentials *creds, const grpc_channel_args *args)
Definition: chttp2_connector.cc:366
SSL_CERT_PATH
#define SSL_CERT_PATH
Definition: server_ssl_common.cc:45
grpc_completion_queue_destroy
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq)
Definition: completion_queue.cc:1424
port.h
http2_test_server.listen
def listen(endpoint, test_case)
Definition: http2_test_server.py:87
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
alloc.h
grpc::testing::TestEnvironment
Definition: test/core/util/test_config.h:54
thd.h
EVP_cleanup
#define EVP_cleanup
Definition: boringssl_prefix_symbols.h:1715
ssl_method_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3392
grpc_completion_queue_next
GRPCAPI grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved)
Definition: completion_queue.cc:1133
ok
bool ok
Definition: async_end2end_test.cc:197
arg
struct arg arg
grpc_channel_destroy
GRPCAPI void grpc_channel_destroy(grpc_channel *channel)
Definition: channel.cc:437
state
Definition: bloaty/third_party/zlib/contrib/blast/blast.c:41
grpc_core::Thread
Definition: thd.h:43
SSL_CTX_use_PrivateKey_file
#define SSL_CTX_use_PrivateKey_file
Definition: boringssl_prefix_symbols.h:224
grpc_channel
struct grpc_channel grpc_channel
Definition: grpc_types.h:62
grpc_channel_watch_connectivity_state
GRPCAPI void grpc_channel_watch_connectivity_state(grpc_channel *channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue *cq, void *tag)
Definition: channel_connectivity.cc:227
SSL_new
#define SSL_new
Definition: boringssl_prefix_symbols.h:414
SSL_CTX_check_private_key
#define SSL_CTX_check_private_key
Definition: boringssl_prefix_symbols.h:74
test_server.socket
socket
Definition: test_server.py:65
grpc_completion_queue_create_for_next
GRPCAPI grpc_completion_queue * grpc_completion_queue_create_for_next(void *reserved)
Definition: completion_queue_factory.cc:62
SSL_write
#define SSL_write
Definition: boringssl_prefix_symbols.h:533
profile_analyzer.thd
thd
Definition: profile_analyzer.py:168
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
gpr_timespec
Definition: gpr_types.h:50
grpc_event::type
grpc_completion_type type
Definition: grpc_types.h:566
grpc_init
GRPCAPI void grpc_init(void)
Definition: init.cc:146
ssl_log_where_info
static void ssl_log_where_info(const SSL *ssl, int where, int flag, const char *msg)
Definition: ssl_transport_security.cc:223
length
std::size_t length
Definition: abseil-cpp/absl/time/internal/test_util.cc:57
method
NSString * method
Definition: ProtoMethod.h:28
SSL_set_fd
#define SSL_set_fd
Definition: boringssl_prefix_symbols.h:463
SSL_state_string_long
#define SSL_state_string_long
Definition: boringssl_prefix_symbols.h:518
grpc_channel_args::args
grpc_arg * args
Definition: grpc_types.h:134
SSL_CTX_set_alpn_select_cb
#define SSL_CTX_set_alpn_select_cb
Definition: boringssl_prefix_symbols.h:152
SSL_CB_LOOP
#define SSL_CB_LOOP
Definition: ssl.h:4280
grpc_shutdown
GRPCAPI void grpc_shutdown(void)
Definition: init.cc:209
setup.target
target
Definition: third_party/bloaty/third_party/protobuf/python/setup.py:179
grpc_ssl_pem_key_cert_pair
Definition: grpc_security.h:173
grpc_channel_credentials
Definition: src/core/lib/security/credentials/credentials.h:96
addr
struct sockaddr_in addr
Definition: libuv/docs/code/tcp-echo-server/main.c:10
cq
static grpc_completion_queue * cq
Definition: test/core/fling/client.cc:37
sync.h
SSL_read
#define SSL_read
Definition: boringssl_prefix_symbols.h:424
SSL_FILETYPE_PEM
#define SSL_FILETYPE_PEM
Definition: ssl.h:1185


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:47