third_party/boringssl-with-bazel/src/tool/client.cc
Go to the documentation of this file.
1 /* Copyright (c) 2014, Google Inc.
2  *
3  * Permission to use, copy, modify, and/or distribute this software for any
4  * purpose with or without fee is hereby granted, provided that the above
5  * copyright notice and this permission notice appear in all copies.
6  *
7  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
10  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
12  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
13  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
14 
15 #include <openssl/base.h>
16 
17 #include <stdio.h>
18 
19 #if !defined(OPENSSL_WINDOWS)
20 #include <sys/select.h>
21 #else
23 #include <winsock2.h>
25 #endif
26 
27 #include <openssl/err.h>
28 #include <openssl/pem.h>
29 #include <openssl/ssl.h>
30 
31 #include "../crypto/internal.h"
32 #include "internal.h"
33 #include "transport_common.h"
34 
35 
36 static const struct argument kArguments[] = {
37  {
38  "-connect", kRequiredArgument,
39  "The hostname and port of the server to connect to, e.g. foo.com:443",
40  },
41  {
42  "-cipher", kOptionalArgument,
43  "An OpenSSL-style cipher suite string that configures the offered "
44  "ciphers",
45  },
46  {
47  "-curves", kOptionalArgument,
48  "An OpenSSL-style ECDH curves list that configures the offered curves",
49  },
50  {
51  "-sigalgs", kOptionalArgument,
52  "An OpenSSL-style signature algorithms list that configures the "
53  "signature algorithm preferences",
54  },
55  {
56  "-max-version", kOptionalArgument,
57  "The maximum acceptable protocol version",
58  },
59  {
60  "-min-version", kOptionalArgument,
61  "The minimum acceptable protocol version",
62  },
63  {
64  "-server-name", kOptionalArgument, "The server name to advertise",
65  },
66  {
67  "-ech-grease", kBooleanArgument, "Enable ECH GREASE",
68  },
69  {
70  "-ech-config-list", kOptionalArgument,
71  "Path to file containing serialized ECHConfigs",
72  },
73  {
74  "-select-next-proto", kOptionalArgument,
75  "An NPN protocol to select if the server supports NPN",
76  },
77  {
78  "-alpn-protos", kOptionalArgument,
79  "A comma-separated list of ALPN protocols to advertise",
80  },
81  {
82  "-fallback-scsv", kBooleanArgument, "Enable FALLBACK_SCSV",
83  },
84  {
85  "-ocsp-stapling", kBooleanArgument,
86  "Advertise support for OCSP stabling",
87  },
88  {
89  "-signed-certificate-timestamps", kBooleanArgument,
90  "Advertise support for signed certificate timestamps",
91  },
92  {
93  "-channel-id-key", kOptionalArgument,
94  "The key to use for signing a channel ID",
95  },
96  {
97  "-false-start", kBooleanArgument, "Enable False Start",
98  },
99  {
100  "-session-in", kOptionalArgument,
101  "A file containing a session to resume.",
102  },
103  {
104  "-session-out", kOptionalArgument,
105  "A file to write the negotiated session to.",
106  },
107  {
108  "-key", kOptionalArgument,
109  "PEM-encoded file containing the private key.",
110  },
111  {
112  "-cert", kOptionalArgument,
113  "PEM-encoded file containing the leaf certificate and optional "
114  "certificate chain. This is taken from the -key argument if this "
115  "argument is not provided.",
116  },
117  {
118  "-starttls", kOptionalArgument,
119  "A STARTTLS mini-protocol to run before the TLS handshake. Supported"
120  " values: 'smtp'",
121  },
122  {
123  "-grease", kBooleanArgument, "Enable GREASE",
124  },
125  {
126  "-permute-extensions",
128  "Permute extensions in handshake messages",
129  },
130  {
131  "-test-resumption", kBooleanArgument,
132  "Connect to the server twice. The first connection is closed once a "
133  "session is established. The second connection offers it.",
134  },
135  {
136  "-root-certs", kOptionalArgument,
137  "A filename containing one or more PEM root certificates. Implies that "
138  "verification is required.",
139  },
140  {
141  "-root-cert-dir", kOptionalArgument,
142  "A directory containing one or more root certificate PEM files in "
143  "OpenSSL's hashed-directory format. Implies that verification is "
144  "required.",
145  },
146  {
147  "-early-data", kOptionalArgument, "Enable early data. The argument to "
148  "this flag is the early data to send or if it starts with '@', the "
149  "file to read from for early data.",
150  },
151  {
152  "-http-tunnel", kOptionalArgument,
153  "An HTTP proxy server to tunnel the TCP connection through",
154  },
155  {
156  "-renegotiate-freely", kBooleanArgument,
157  "Allow renegotiations from the peer.",
158  },
159  {
160  "-debug", kBooleanArgument,
161  "Print debug information about the handshake",
162  },
163  {
164  "", kOptionalArgument, "",
165  },
166 };
167 
168 static bssl::UniquePtr<EVP_PKEY> LoadPrivateKey(const std::string &file) {
169  bssl::UniquePtr<BIO> bio(BIO_new(BIO_s_file()));
170  if (!bio || !BIO_read_filename(bio.get(), file.c_str())) {
171  return nullptr;
172  }
173  bssl::UniquePtr<EVP_PKEY> pkey(PEM_read_bio_PrivateKey(bio.get(), nullptr,
174  nullptr, nullptr));
175  return pkey;
176 }
177 
178 static int NextProtoSelectCallback(SSL* ssl, uint8_t** out, uint8_t* outlen,
179  const uint8_t* in, unsigned inlen, void* arg) {
180  *out = reinterpret_cast<uint8_t *>(arg);
181  *outlen = strlen(reinterpret_cast<const char *>(arg));
182  return SSL_TLSEXT_ERR_OK;
183 }
184 
185 static FILE *g_keylog_file = nullptr;
186 
187 static void KeyLogCallback(const SSL *ssl, const char *line) {
188  fprintf(g_keylog_file, "%s\n", line);
189  fflush(g_keylog_file);
190 }
191 
192 static bssl::UniquePtr<BIO> session_out;
193 static bssl::UniquePtr<SSL_SESSION> resume_session;
194 
195 static int NewSessionCallback(SSL *ssl, SSL_SESSION *session) {
196  if (session_out) {
197  if (!PEM_write_bio_SSL_SESSION(session_out.get(), session) ||
198  BIO_flush(session_out.get()) <= 0) {
199  fprintf(stderr, "Error while saving session:\n");
201  return 0;
202  }
203  }
204  resume_session = bssl::UniquePtr<SSL_SESSION>(session);
205  return 1;
206 }
207 
208 static bool WaitForSession(SSL *ssl, int sock) {
209  fd_set read_fds;
210  FD_ZERO(&read_fds);
211 
212  if (!SocketSetNonBlocking(sock, true)) {
213  return false;
214  }
215 
216  while (!resume_session) {
217 #if defined(OPENSSL_WINDOWS)
218  // Windows sockets are really of type SOCKET, not int, but everything here
219  // casts them to ints. Clang gets unhappy about signed values as a result.
220  //
221  // TODO(davidben): Keep everything as the appropriate platform type.
222  FD_SET(static_cast<SOCKET>(sock), &read_fds);
223 #else
224  FD_SET(sock, &read_fds);
225 #endif
226  int ret = select(sock + 1, &read_fds, NULL, NULL, NULL);
227  if (ret <= 0) {
228  perror("select");
229  return false;
230  }
231 
232  uint8_t buffer[512];
233  int ssl_ret = SSL_read(ssl, buffer, sizeof(buffer));
234 
235  if (ssl_ret <= 0) {
236  int ssl_err = SSL_get_error(ssl, ssl_ret);
237  if (ssl_err == SSL_ERROR_WANT_READ) {
238  continue;
239  }
240  PrintSSLError(stderr, "Error while reading", ssl_err, ssl_ret);
241  return false;
242  }
243  }
244 
245  return true;
246 }
247 
248 static bool DoConnection(SSL_CTX *ctx,
249  std::map<std::string, std::string> args_map,
250  bool (*cb)(SSL *ssl, int sock)) {
251  int sock = -1;
252  if (args_map.count("-http-tunnel") != 0) {
253  if (!Connect(&sock, args_map["-http-tunnel"]) ||
254  !DoHTTPTunnel(sock, args_map["-connect"])) {
255  return false;
256  }
257  } else if (!Connect(&sock, args_map["-connect"])) {
258  return false;
259  }
260 
261  if (args_map.count("-starttls") != 0) {
262  const std::string& starttls = args_map["-starttls"];
263  if (starttls == "smtp") {
264  if (!DoSMTPStartTLS(sock)) {
265  return false;
266  }
267  } else {
268  fprintf(stderr, "Unknown value for -starttls: %s\n", starttls.c_str());
269  return false;
270  }
271  }
272 
273  bssl::UniquePtr<BIO> bio(BIO_new_socket(sock, BIO_CLOSE));
274  bssl::UniquePtr<SSL> ssl(SSL_new(ctx));
275 
276  if (args_map.count("-server-name") != 0) {
277  SSL_set_tlsext_host_name(ssl.get(), args_map["-server-name"].c_str());
278  }
279 
280  if (args_map.count("-ech-grease") != 0) {
281  SSL_set_enable_ech_grease(ssl.get(), 1);
282  }
283 
284  if (args_map.count("-ech-config-list") != 0) {
285  const char *filename = args_map["-ech-config-list"].c_str();
286  ScopedFILE f(fopen(filename, "rb"));
287  std::vector<uint8_t> data;
288  if (f == nullptr || !ReadAll(&data, f.get())) {
289  fprintf(stderr, "Error reading %s.\n", filename);
290  return false;
291  }
292  if (!SSL_set1_ech_config_list(ssl.get(), data.data(), data.size())) {
293  fprintf(stderr, "Error setting ECHConfigList\n");
294  return false;
295  }
296  }
297 
298  if (args_map.count("-session-in") != 0) {
299  bssl::UniquePtr<BIO> in(BIO_new_file(args_map["-session-in"].c_str(),
300  "rb"));
301  if (!in) {
302  fprintf(stderr, "Error reading session\n");
304  return false;
305  }
306  bssl::UniquePtr<SSL_SESSION> session(PEM_read_bio_SSL_SESSION(in.get(),
307  nullptr, nullptr, nullptr));
308  if (!session) {
309  fprintf(stderr, "Error reading session\n");
311  return false;
312  }
313  SSL_set_session(ssl.get(), session.get());
314  }
315 
316  if (args_map.count("-renegotiate-freely") != 0) {
318  }
319 
320  if (resume_session) {
321  SSL_set_session(ssl.get(), resume_session.get());
322  }
323 
324  SSL_set_bio(ssl.get(), bio.get(), bio.get());
325  bio.release();
326 
327  int ret = SSL_connect(ssl.get());
328  if (ret != 1) {
329  int ssl_err = SSL_get_error(ssl.get(), ret);
330  PrintSSLError(stderr, "Error while connecting", ssl_err, ret);
331  return false;
332  }
333 
334  if (args_map.count("-early-data") != 0 && SSL_in_early_data(ssl.get())) {
335  std::string early_data = args_map["-early-data"];
336  if (early_data.size() > 0 && early_data[0] == '@') {
337  const char *filename = early_data.c_str() + 1;
338  std::vector<uint8_t> data;
339  ScopedFILE f(fopen(filename, "rb"));
340  if (f == nullptr || !ReadAll(&data, f.get())) {
341  fprintf(stderr, "Error reading %s.\n", filename);
342  return false;
343  }
344  early_data = std::string(data.begin(), data.end());
345  }
346  if (!early_data.empty()) {
347  int ed_size = early_data.size();
348  int ssl_ret = SSL_write(ssl.get(), early_data.data(), ed_size);
349  if (ssl_ret <= 0) {
350  int ssl_err = SSL_get_error(ssl.get(), ssl_ret);
351  PrintSSLError(stderr, "Error while writing", ssl_err, ssl_ret);
352  return false;
353  } else if (ssl_ret != ed_size) {
354  fprintf(stderr, "Short write from SSL_write.\n");
355  return false;
356  }
357  }
358  }
359 
360  fprintf(stderr, "Connected.\n");
361  bssl::UniquePtr<BIO> bio_stderr(BIO_new_fp(stderr, BIO_NOCLOSE));
362  PrintConnectionInfo(bio_stderr.get(), ssl.get());
363 
364  return cb(ssl.get(), sock);
365 }
366 
367 static void InfoCallback(const SSL *ssl, int type, int value) {
368  switch (type) {
370  fprintf(stderr, "Handshake started.\n");
371  break;
373  fprintf(stderr, "Handshake done.\n");
374  break;
375  case SSL_CB_CONNECT_LOOP:
376  fprintf(stderr, "Handshake progress: %s\n", SSL_state_string_long(ssl));
377  break;
378  }
379 }
380 
381 bool Client(const std::vector<std::string> &args) {
382  if (!InitSocketLibrary()) {
383  return false;
384  }
385 
386  std::map<std::string, std::string> args_map;
387 
388  if (!ParseKeyValueArguments(&args_map, args, kArguments)) {
390  return false;
391  }
392 
393  bssl::UniquePtr<SSL_CTX> ctx(SSL_CTX_new(TLS_method()));
394 
395  const char *keylog_file = getenv("SSLKEYLOGFILE");
396  if (keylog_file) {
397  g_keylog_file = fopen(keylog_file, "a");
398  if (g_keylog_file == nullptr) {
399  perror("fopen");
400  return false;
401  }
403  }
404 
405  if (args_map.count("-cipher") != 0 &&
406  !SSL_CTX_set_strict_cipher_list(ctx.get(), args_map["-cipher"].c_str())) {
407  fprintf(stderr, "Failed setting cipher list\n");
408  return false;
409  }
410 
411  if (args_map.count("-curves") != 0 &&
412  !SSL_CTX_set1_curves_list(ctx.get(), args_map["-curves"].c_str())) {
413  fprintf(stderr, "Failed setting curves list\n");
414  return false;
415  }
416 
417  if (args_map.count("-sigalgs") != 0 &&
418  !SSL_CTX_set1_sigalgs_list(ctx.get(), args_map["-sigalgs"].c_str())) {
419  fprintf(stderr, "Failed setting signature algorithms list\n");
420  return false;
421  }
422 
423  uint16_t max_version = TLS1_3_VERSION;
424  if (args_map.count("-max-version") != 0 &&
425  !VersionFromString(&max_version, args_map["-max-version"])) {
426  fprintf(stderr, "Unknown protocol version: '%s'\n",
427  args_map["-max-version"].c_str());
428  return false;
429  }
430 
431  if (!SSL_CTX_set_max_proto_version(ctx.get(), max_version)) {
432  return false;
433  }
434 
435  if (args_map.count("-min-version") != 0) {
437  if (!VersionFromString(&version, args_map["-min-version"])) {
438  fprintf(stderr, "Unknown protocol version: '%s'\n",
439  args_map["-min-version"].c_str());
440  return false;
441  }
443  return false;
444  }
445  }
446 
447  if (args_map.count("-select-next-proto") != 0) {
448  const std::string &proto = args_map["-select-next-proto"];
449  if (proto.size() > 255) {
450  fprintf(stderr, "Bad NPN protocol: '%s'\n", proto.c_str());
451  return false;
452  }
453  // |SSL_CTX_set_next_proto_select_cb| is not const-correct.
455  const_cast<char *>(proto.c_str()));
456  }
457 
458  if (args_map.count("-alpn-protos") != 0) {
459  const std::string &alpn_protos = args_map["-alpn-protos"];
460  std::vector<uint8_t> wire;
461  size_t i = 0;
462  while (i <= alpn_protos.size()) {
463  size_t j = alpn_protos.find(',', i);
464  if (j == std::string::npos) {
465  j = alpn_protos.size();
466  }
467  size_t len = j - i;
468  if (len > 255) {
469  fprintf(stderr, "Invalid ALPN protocols: '%s'\n", alpn_protos.c_str());
470  return false;
471  }
472  wire.push_back(static_cast<uint8_t>(len));
473  wire.resize(wire.size() + len);
474  OPENSSL_memcpy(wire.data() + wire.size() - len, alpn_protos.data() + i,
475  len);
476  i = j + 1;
477  }
478  if (SSL_CTX_set_alpn_protos(ctx.get(), wire.data(), wire.size()) != 0) {
479  return false;
480  }
481  }
482 
483  if (args_map.count("-fallback-scsv") != 0) {
485  }
486 
487  if (args_map.count("-ocsp-stapling") != 0) {
489  }
490 
491  if (args_map.count("-signed-certificate-timestamps") != 0) {
493  }
494 
495  if (args_map.count("-channel-id-key") != 0) {
496  bssl::UniquePtr<EVP_PKEY> pkey =
497  LoadPrivateKey(args_map["-channel-id-key"]);
498  if (!pkey || !SSL_CTX_set1_tls_channel_id(ctx.get(), pkey.get())) {
499  return false;
500  }
501  }
502 
503  if (args_map.count("-false-start") != 0) {
505  }
506 
507  if (args_map.count("-key") != 0) {
508  const std::string &key = args_map["-key"];
509  if (!SSL_CTX_use_PrivateKey_file(ctx.get(), key.c_str(),
510  SSL_FILETYPE_PEM)) {
511  fprintf(stderr, "Failed to load private key: %s\n", key.c_str());
512  return false;
513  }
514  const std::string &cert =
515  args_map.count("-cert") != 0 ? args_map["-cert"] : key;
516  if (!SSL_CTX_use_certificate_chain_file(ctx.get(), cert.c_str())) {
517  fprintf(stderr, "Failed to load cert chain: %s\n", cert.c_str());
518  return false;
519  }
520  }
521 
524 
525  if (args_map.count("-session-out") != 0) {
526  session_out.reset(BIO_new_file(args_map["-session-out"].c_str(), "wb"));
527  if (!session_out) {
528  fprintf(stderr, "Error while opening %s:\n",
529  args_map["-session-out"].c_str());
531  return false;
532  }
533  }
534 
535  if (args_map.count("-grease") != 0) {
537  }
538 
539  if (args_map.count("-permute-extensions") != 0) {
541  }
542 
543  if (args_map.count("-root-certs") != 0) {
545  ctx.get(), args_map["-root-certs"].c_str(), nullptr)) {
546  fprintf(stderr, "Failed to load root certificates.\n");
548  return false;
549  }
550  SSL_CTX_set_verify(ctx.get(), SSL_VERIFY_PEER, nullptr);
551  }
552 
553  if (args_map.count("-root-cert-dir") != 0) {
555  ctx.get(), nullptr, args_map["-root-cert-dir"].c_str())) {
556  fprintf(stderr, "Failed to load root certificates.\n");
558  return false;
559  }
560  SSL_CTX_set_verify(ctx.get(), SSL_VERIFY_PEER, nullptr);
561  }
562 
563  if (args_map.count("-early-data") != 0) {
565  }
566 
567  if (args_map.count("-debug") != 0) {
569  }
570 
571  if (args_map.count("-test-resumption") != 0) {
572  if (args_map.count("-session-in") != 0) {
573  fprintf(stderr,
574  "Flags -session-in and -test-resumption are incompatible.\n");
575  return false;
576  }
577 
578  if (!DoConnection(ctx.get(), args_map, &WaitForSession)) {
579  return false;
580  }
581  }
582 
583  return DoConnection(ctx.get(), args_map, &TransferData);
584 }
SSL_CB_HANDSHAKE_START
#define SSL_CB_HANDSHAKE_START
Definition: ssl.h:4291
ParseKeyValueArguments
bool ParseKeyValueArguments(std::map< std::string, std::string > *out_args, const std::vector< std::string > &args, const struct argument *templates)
Definition: args.cc:27
BIO_new_fp
#define BIO_new_fp
Definition: boringssl_prefix_symbols.h:819
SSL_CTX_set_verify
#define SSL_CTX_set_verify
Definition: boringssl_prefix_symbols.h:218
filename
const char * filename
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:135
gen_build_yaml.out
dictionary out
Definition: src/benchmark/gen_build_yaml.py:24
SSL_connect
#define SSL_connect
Definition: boringssl_prefix_symbols.h:294
ctx
Definition: benchmark-async.c:30
Connect
static int Connect(uint16_t port)
Definition: bssl_shim.cc:98
SSL_CTX_set_strict_cipher_list
#define SSL_CTX_set_strict_cipher_list
Definition: boringssl_prefix_symbols.h:201
SSL_CB_CONNECT_LOOP
#define SSL_CB_CONNECT_LOOP
Definition: ssl.h:4289
SSL_CB_HANDSHAKE_DONE
#define SSL_CB_HANDSHAKE_DONE
Definition: ssl.h:4292
uint16_t
unsigned short uint16_t
Definition: stdint-msvc2008.h:79
NextProtoSelectCallback
static int NextProtoSelectCallback(SSL *ssl, uint8_t **out, uint8_t *outlen, const uint8_t *in, unsigned inlen, void *arg)
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:178
check_version.warning
string warning
Definition: check_version.py:46
SSL_ERROR_WANT_READ
#define SSL_ERROR_WANT_READ
Definition: ssl.h:494
kRequiredArgument
@ kRequiredArgument
Definition: third_party/boringssl-with-bazel/src/tool/internal.h:103
SSL_set_session
#define SSL_set_session
Definition: boringssl_prefix_symbols.h:491
internal.h
Client
bool Client(const std::vector< std::string > &args)
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:381
SSL_TLSEXT_ERR_OK
#define SSL_TLSEXT_ERR_OK
Definition: ssl.h:2755
VersionFromString
bool VersionFromString(uint16_t *out_version, const std::string &version)
Definition: transport_common.cc:267
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
SSL_CTX_sess_set_new_cb
#define SSL_CTX_sess_set_new_cb
Definition: boringssl_prefix_symbols.h:134
SSL_MODE_ENABLE_FALSE_START
#define SSL_MODE_ENABLE_FALSE_START
Definition: ssl.h:787
SSL_CTX_set_session_cache_mode
#define SSL_CTX_set_session_cache_mode
Definition: boringssl_prefix_symbols.h:195
file
Definition: bloaty/third_party/zlib/examples/gzappend.c:170
SSL_set_bio
#define SSL_set_bio
Definition: boringssl_prefix_symbols.h:452
pem.h
ctx
static struct test_ctx ctx
Definition: test-ipc-send-recv.c:65
KeyLogCallback
static void KeyLogCallback(const SSL *ssl, const char *line)
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:187
version
Definition: version.py:1
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
ssl_ctx_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3404
SSL_CTX_load_verify_locations
#define SSL_CTX_load_verify_locations
Definition: boringssl_prefix_symbols.h:113
PEM_read_bio_PrivateKey
EVP_PKEY * PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u)
Definition: pem_pkey.c:71
base.h
SSL_CTX_set_max_proto_version
#define SSL_CTX_set_max_proto_version
Definition: boringssl_prefix_symbols.h:173
python_utils.port_server.stderr
stderr
Definition: port_server.py:51
SSL_CTX_set_permute_extensions
#define SSL_CTX_set_permute_extensions
Definition: boringssl_prefix_symbols.h:183
SSL_CTX_set1_curves_list
#define SSL_CTX_set1_curves_list
Definition: boringssl_prefix_symbols.h:143
PrintSSLError
void PrintSSLError(FILE *file, const char *msg, int ssl_err, int ret)
Definition: transport_common.cc:659
in
const char * in
Definition: third_party/abseil-cpp/absl/strings/internal/str_format/parser_test.cc:391
SSL_CTX_set1_sigalgs_list
#define SSL_CTX_set1_sigalgs_list
Definition: boringssl_prefix_symbols.h:147
transport_common.h
autogen_x86imm.f
f
Definition: autogen_x86imm.py:9
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
SSL_get_error
#define SSL_get_error
Definition: boringssl_prefix_symbols.h:340
SSL_CTX_new
#define SSL_CTX_new
Definition: boringssl_prefix_symbols.h:115
SSL_set1_ech_config_list
#define SSL_set1_ech_config_list
Definition: boringssl_prefix_symbols.h:443
DoHTTPTunnel
bool DoHTTPTunnel(int sock, const std::string &hostname_and_port)
Definition: transport_common.cc:958
gen_stats_data.c_str
def c_str(s, encoding='ascii')
Definition: gen_stats_data.py:38
ssl_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3698
BIO_new_socket
#define BIO_new_socket
Definition: boringssl_prefix_symbols.h:821
DoSMTPStartTLS
bool DoSMTPStartTLS(int sock)
Definition: transport_common.cc:901
kArguments
static const struct argument kArguments[]
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:36
session_out
static bssl::UniquePtr< BIO > session_out
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:192
conf.version
string version
Definition: doc/python/sphinx/conf.py:36
argument
Definition: third_party/boringssl-with-bazel/src/tool/internal.h:108
OPENSSL_memcpy
static void * OPENSSL_memcpy(void *dst, const void *src, size_t n)
Definition: third_party/boringssl-with-bazel/src/crypto/internal.h:819
SSL_CTX_set1_tls_channel_id
#define SSL_CTX_set1_tls_channel_id
Definition: boringssl_prefix_symbols.h:148
SSL_CTX_enable_ocsp_stapling
#define SSL_CTX_enable_ocsp_stapling
Definition: boringssl_prefix_symbols.h:80
err.h
arg
Definition: cmdline.cc:40
SSL_CTX_enable_signed_cert_timestamps
#define SSL_CTX_enable_signed_cert_timestamps
Definition: boringssl_prefix_symbols.h:81
SSL_CTX_set_keylog_callback
#define SSL_CTX_set_keylog_callback
Definition: boringssl_prefix_symbols.h:171
OPENSSL_MSVC_PRAGMA
OPENSSL_MSVC_PRAGMA(warning(disable:4702))
Definition: e_aes.c:69
SSL_VERIFY_PEER
#define SSL_VERIFY_PEER
Definition: ssl.h:2379
SSL_set_tlsext_host_name
#define SSL_set_tlsext_host_name
Definition: boringssl_prefix_symbols.h:501
BIO_new_file
#define BIO_new_file
Definition: boringssl_prefix_symbols.h:818
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
kBooleanArgument
@ kBooleanArgument
Definition: third_party/boringssl-with-bazel/src/tool/internal.h:105
BIO_new
#define BIO_new
Definition: boringssl_prefix_symbols.h:814
buffer
char buffer[1024]
Definition: libuv/docs/code/idle-compute/main.c:8
SSL_SESS_CACHE_CLIENT
#define SSL_SESS_CACHE_CLIENT
Definition: ssl.h:1937
PEM_read_bio_SSL_SESSION
#define PEM_read_bio_SSL_SESSION
Definition: boringssl_prefix_symbols.h:40
ssl.h
SSL_CTX_set_info_callback
#define SSL_CTX_set_info_callback
Definition: boringssl_prefix_symbols.h:170
PrintUsage
void PrintUsage(const struct argument *templates)
Definition: args.cc:75
WaitForSession
static bool WaitForSession(SSL *ssl, int sock)
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:208
push
int push(void *desc, unsigned char *buf, unsigned len)
Definition: bloaty/third_party/zlib/test/infcover.c:463
SSL_CTX_set_early_data_enabled
#define SSL_CTX_set_early_data_enabled
Definition: boringssl_prefix_symbols.h:166
DoConnection
static bool DoConnection(SSL_CTX *ctx, std::map< std::string, std::string > args_map, bool(*cb)(SSL *ssl, int sock))
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:248
value
const char * value
Definition: hpack_parser_table.cc:165
SSL_set_enable_ech_grease
#define SSL_set_enable_ech_grease
Definition: boringssl_prefix_symbols.h:460
LoadPrivateKey
static bssl::UniquePtr< EVP_PKEY > LoadPrivateKey(const std::string &file)
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:168
TLS1_3_VERSION
#define TLS1_3_VERSION
Definition: ssl.h:653
ssl_session_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3787
SSL_CTX_use_certificate_chain_file
#define SSL_CTX_use_certificate_chain_file
Definition: boringssl_prefix_symbols.h:230
PrintConnectionInfo
void PrintConnectionInfo(BIO *bio, const SSL *ssl)
Definition: transport_common.cc:284
BIO_read_filename
#define BIO_read_filename
Definition: boringssl_prefix_symbols.h:833
ScopedFILE
std::unique_ptr< FILE, FileCloser > ScopedFILE
Definition: third_party/boringssl-with-bazel/src/tool/internal.h:39
TLS_method
#define TLS_method
Definition: boringssl_prefix_symbols.h:538
key
const char * key
Definition: hpack_parser_table.cc:164
benchmark.FILE
FILE
Definition: benchmark.py:21
PEM_write_bio_SSL_SESSION
#define PEM_write_bio_SSL_SESSION
Definition: boringssl_prefix_symbols.h:42
SSL_MODE_SEND_FALLBACK_SCSV
#define SSL_MODE_SEND_FALLBACK_SCSV
Definition: ssl.h:806
resume_session
static bssl::UniquePtr< SSL_SESSION > resume_session
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:193
ReadAll
bool ReadAll(std::vector< uint8_t > *out, FILE *file)
Definition: boringssl-with-bazel/src/tool/file.cc:27
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
regen-readme.line
line
Definition: regen-readme.py:30
arg
struct arg arg
kOptionalArgument
@ kOptionalArgument
Definition: third_party/boringssl-with-bazel/src/tool/internal.h:104
SSL_CTX_set_mode
#define SSL_CTX_set_mode
Definition: boringssl_prefix_symbols.h:176
SSL_CTX_use_PrivateKey_file
#define SSL_CTX_use_PrivateKey_file
Definition: boringssl_prefix_symbols.h:224
SSL_CTX_set_alpn_protos
#define SSL_CTX_set_alpn_protos
Definition: boringssl_prefix_symbols.h:151
BIO_NOCLOSE
#define BIO_NOCLOSE
Definition: bio.h:373
SSL_new
#define SSL_new
Definition: boringssl_prefix_symbols.h:414
SSL_set_renegotiate_mode
#define SSL_set_renegotiate_mode
Definition: boringssl_prefix_symbols.h:488
SSL_CTX_set_next_proto_select_cb
#define SSL_CTX_set_next_proto_select_cb
Definition: boringssl_prefix_symbols.h:179
BIO_s_file
#define BIO_s_file
Definition: boringssl_prefix_symbols.h:838
SSL_write
#define SSL_write
Definition: boringssl_prefix_symbols.h:533
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
SSL_in_early_data
#define SSL_in_early_data
Definition: boringssl_prefix_symbols.h:399
BIO_flush
#define BIO_flush
Definition: boringssl_prefix_symbols.h:786
SSL_CTX_set_min_proto_version
#define SSL_CTX_set_min_proto_version
Definition: boringssl_prefix_symbols.h:175
InfoCallback
static void InfoCallback(const SSL *ssl, int type, int value)
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:367
SocketSetNonBlocking
bool SocketSetNonBlocking(int sock, bool is_non_blocking)
Definition: transport_common.cc:354
SSL_state_string_long
#define SSL_state_string_long
Definition: boringssl_prefix_symbols.h:518
getenv
#define getenv(ptr)
Definition: ares_private.h:106
InitSocketLibrary
bool InitSocketLibrary()
Definition: transport_common.cc:79
BIO_CLOSE
#define BIO_CLOSE
Definition: bio.h:374
TransferData
bool TransferData(SSL *ssl, int sock)
Definition: transport_common.cc:682
cb
OPENSSL_EXPORT pem_password_cb * cb
Definition: pem.h:351
SSL_read
#define SSL_read
Definition: boringssl_prefix_symbols.h:424
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
SSL_FILETYPE_PEM
#define SSL_FILETYPE_PEM
Definition: ssl.h:1185
g_keylog_file
static FILE * g_keylog_file
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:185
NewSessionCallback
static int NewSessionCallback(SSL *ssl, SSL_SESSION *session)
Definition: third_party/boringssl-with-bazel/src/tool/client.cc:195
SSL_CTX_set_grease_enabled
#define SSL_CTX_set_grease_enabled
Definition: boringssl_prefix_symbols.h:169
ssl_renegotiate_freely
ssl_renegotiate_freely
Definition: ssl.h:4092


grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:54