handshake.cc
Go to the documentation of this file.
1 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
2  * All rights reserved.
3  *
4  * This package is an SSL implementation written
5  * by Eric Young (eay@cryptsoft.com).
6  * The implementation was written so as to conform with Netscapes SSL.
7  *
8  * This library is free for commercial and non-commercial use as long as
9  * the following conditions are aheared to. The following conditions
10  * apply to all code found in this distribution, be it the RC4, RSA,
11  * lhash, DES, etc., code; not just the SSL code. The SSL documentation
12  * included with this distribution is covered by the same copyright terms
13  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14  *
15  * Copyright remains Eric Young's, and as such any Copyright notices in
16  * the code are not to be removed.
17  * If this package is used in a product, Eric Young should be given attribution
18  * as the author of the parts of the library used.
19  * This can be in the form of a textual message at program startup or
20  * in documentation (online or textual) provided with the package.
21  *
22  * Redistribution and use in source and binary forms, with or without
23  * modification, are permitted provided that the following conditions
24  * are met:
25  * 1. Redistributions of source code must retain the copyright
26  * notice, this list of conditions and the following disclaimer.
27  * 2. Redistributions in binary form must reproduce the above copyright
28  * notice, this list of conditions and the following disclaimer in the
29  * documentation and/or other materials provided with the distribution.
30  * 3. All advertising materials mentioning features or use of this software
31  * must display the following acknowledgement:
32  * "This product includes cryptographic software written by
33  * Eric Young (eay@cryptsoft.com)"
34  * The word 'cryptographic' can be left out if the rouines from the library
35  * being used are not cryptographic related :-).
36  * 4. If you include any Windows specific code (or a derivative thereof) from
37  * the apps directory (application code) you must include an acknowledgement:
38  * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
39  *
40  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
41  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
44  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50  * SUCH DAMAGE.
51  *
52  * The licence and distribution terms for any publically available version or
53  * derivative of this code cannot be changed. i.e. this code cannot simply be
54  * copied and put under another distribution licence
55  * [including the GNU Public Licence.]
56  */
57 /* ====================================================================
58  * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
59  *
60  * Redistribution and use in source and binary forms, with or without
61  * modification, are permitted provided that the following conditions
62  * are met:
63  *
64  * 1. Redistributions of source code must retain the above copyright
65  * notice, this list of conditions and the following disclaimer.
66  *
67  * 2. Redistributions in binary form must reproduce the above copyright
68  * notice, this list of conditions and the following disclaimer in
69  * the documentation and/or other materials provided with the
70  * distribution.
71  *
72  * 3. All advertising materials mentioning features or use of this
73  * software must display the following acknowledgment:
74  * "This product includes software developed by the OpenSSL Project
75  * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
76  *
77  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
78  * endorse or promote products derived from this software without
79  * prior written permission. For written permission, please contact
80  * openssl-core@openssl.org.
81  *
82  * 5. Products derived from this software may not be called "OpenSSL"
83  * nor may "OpenSSL" appear in their names without prior written
84  * permission of the OpenSSL Project.
85  *
86  * 6. Redistributions of any form whatsoever must retain the following
87  * acknowledgment:
88  * "This product includes software developed by the OpenSSL Project
89  * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
90  *
91  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
92  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
93  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
94  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
95  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
96  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
97  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
98  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
99  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
100  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
101  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
102  * OF THE POSSIBILITY OF SUCH DAMAGE.
103  * ====================================================================
104  *
105  * This product includes cryptographic software written by Eric Young
106  * (eay@cryptsoft.com). This product includes software written by Tim
107  * Hudson (tjh@cryptsoft.com). */
108 /* ====================================================================
109  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
110  * ECC cipher suite support in OpenSSL originally developed by
111  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. */
112 
113 #include <openssl/ssl.h>
114 
115 #include <assert.h>
116 
117 #include <utility>
118 
119 #include <openssl/rand.h>
120 
121 #include "../crypto/internal.h"
122 #include "internal.h"
123 
124 
126 
128  : ssl(ssl_arg),
129  ech_is_inner(false),
130  ech_authenticated_reject(false),
131  scts_requested(false),
132  handshake_finalized(false),
133  accept_psk_mode(false),
134  cert_request(false),
135  certificate_status_expected(false),
136  ocsp_stapling_requested(false),
137  delegated_credential_requested(false),
138  should_ack_sni(false),
139  in_false_start(false),
140  in_early_data(false),
141  early_data_offered(false),
142  can_early_read(false),
143  can_early_write(false),
144  next_proto_neg_seen(false),
145  ticket_expected(false),
146  extended_master_secret(false),
147  pending_private_key_op(false),
148  handback(false),
149  hints_requested(false),
150  cert_compression_negotiated(false),
151  apply_jdk11_workaround(false),
152  can_release_private_key(false),
153  channel_id_negotiated(false) {
154  assert(ssl);
155 
156  // Draw entropy for all GREASE values at once. This avoids calling
157  // |RAND_bytes| repeatedly and makes the values consistent within a
158  // connection. The latter is so the second ClientHello matches after
159  // HelloRetryRequest and so supported_groups and key_shares are consistent.
161 }
162 
164  ssl->ctx->x509_method->hs_flush_cached_ca_names(this);
165 }
166 
167 void SSL_HANDSHAKE::ResizeSecrets(size_t hash_len) {
168  if (hash_len > SSL_MAX_MD_SIZE) {
169  abort();
170  }
171  hash_len_ = hash_len;
172 }
173 
175  SSL_CLIENT_HELLO *out_client_hello) {
176  if (!ech_client_hello_buf.empty()) {
177  // If the backing buffer is non-empty, the ClientHelloInner has been set.
178  out_msg->is_v2_hello = false;
179  out_msg->type = SSL3_MT_CLIENT_HELLO;
180  out_msg->raw = CBS(ech_client_hello_buf);
181  out_msg->body = MakeConstSpan(ech_client_hello_buf).subspan(4);
182  } else if (!ssl->method->get_message(ssl, out_msg)) {
183  // The message has already been read, so this cannot fail.
185  return false;
186  }
187 
188  if (!ssl_client_hello_init(ssl, out_client_hello, out_msg->body)) {
191  return false;
192  }
193  return true;
194 }
195 
196 UniquePtr<SSL_HANDSHAKE> ssl_handshake_new(SSL *ssl) {
197  UniquePtr<SSL_HANDSHAKE> hs = MakeUnique<SSL_HANDSHAKE>(ssl);
198  if (!hs || !hs->transcript.Init()) {
199  return nullptr;
200  }
201  hs->config = ssl->config.get();
202  if (!hs->config) {
203  assert(hs->config);
204  return nullptr;
205  }
206  return hs;
207 }
208 
209 bool ssl_check_message_type(SSL *ssl, const SSLMessage &msg, int type) {
210  if (msg.type != type) {
213  ERR_add_error_dataf("got type %d, wanted type %d", msg.type, type);
214  return false;
215  }
216 
217  return true;
218 }
219 
220 bool ssl_add_message_cbb(SSL *ssl, CBB *cbb) {
222  if (!ssl->method->finish_message(ssl, cbb, &msg) ||
223  !ssl->method->add_message(ssl, std::move(msg))) {
224  return false;
225  }
226 
227  return true;
228 }
229 
230 size_t ssl_max_handshake_message_len(const SSL *ssl) {
231  // kMaxMessageLen is the default maximum message size for handshakes which do
232  // not accept peer certificate chains.
233  static const size_t kMaxMessageLen = 16384;
234 
235  if (SSL_in_init(ssl)) {
236  SSL_CONFIG *config = ssl->config.get(); // SSL_in_init() implies not NULL.
237  if ((!ssl->server || (config->verify_mode & SSL_VERIFY_PEER)) &&
238  kMaxMessageLen < ssl->max_cert_list) {
239  return ssl->max_cert_list;
240  }
241  return kMaxMessageLen;
242  }
243 
245  // In TLS 1.2 and below, the largest acceptable post-handshake message is
246  // a HelloRequest.
247  return 0;
248  }
249 
250  if (ssl->server) {
251  // The largest acceptable post-handshake message for a server is a
252  // KeyUpdate. We will never initiate post-handshake auth.
253  return 1;
254  }
255 
256  // Clients must accept NewSessionTicket, so allow the default size.
257  return kMaxMessageLen;
258 }
259 
261  // V2ClientHello messages are pre-hashed.
262  if (msg.is_v2_hello) {
263  return true;
264  }
265 
266  return hs->transcript.Update(msg.raw);
267 }
268 
269 bool ssl_parse_extensions(const CBS *cbs, uint8_t *out_alert,
270  std::initializer_list<SSLExtension *> extensions,
271  bool ignore_unknown) {
272  // Reset everything.
273  for (SSLExtension *ext : extensions) {
274  ext->present = false;
275  CBS_init(&ext->data, nullptr, 0);
276  if (!ext->allowed) {
277  assert(!ignore_unknown);
278  }
279  }
280 
281  CBS copy = *cbs;
282  while (CBS_len(&copy) != 0) {
283  uint16_t type;
284  CBS data;
285  if (!CBS_get_u16(&copy, &type) ||
288  *out_alert = SSL_AD_DECODE_ERROR;
289  return false;
290  }
291 
292  SSLExtension *found = nullptr;
293  for (SSLExtension *ext : extensions) {
294  if (type == ext->type && ext->allowed) {
295  found = ext;
296  break;
297  }
298  }
299 
300  if (found == nullptr) {
301  if (ignore_unknown) {
302  continue;
303  }
305  *out_alert = SSL_AD_UNSUPPORTED_EXTENSION;
306  return false;
307  }
308 
309  // Duplicate ext_types are forbidden.
310  if (found->present) {
312  *out_alert = SSL_AD_ILLEGAL_PARAMETER;
313  return false;
314  }
315 
316  found->present = true;
317  found->data = data;
318  }
319 
320  return true;
321 }
322 
323 enum ssl_verify_result_t ssl_verify_peer_cert(SSL_HANDSHAKE *hs) {
324  SSL *const ssl = hs->ssl;
325  const SSL_SESSION *prev_session = ssl->s3->established_session.get();
326  if (prev_session != NULL) {
327  // If renegotiating, the server must not change the server certificate. See
328  // https://mitls.org/pages/attacks/3SHAKE. We never resume on renegotiation,
329  // so this check is sufficient to ensure the reported peer certificate never
330  // changes on renegotiation.
331  assert(!ssl->server);
332  if (sk_CRYPTO_BUFFER_num(prev_session->certs.get()) !=
333  sk_CRYPTO_BUFFER_num(hs->new_session->certs.get())) {
336  return ssl_verify_invalid;
337  }
338 
339  for (size_t i = 0; i < sk_CRYPTO_BUFFER_num(hs->new_session->certs.get());
340  i++) {
341  const CRYPTO_BUFFER *old_cert =
342  sk_CRYPTO_BUFFER_value(prev_session->certs.get(), i);
343  const CRYPTO_BUFFER *new_cert =
344  sk_CRYPTO_BUFFER_value(hs->new_session->certs.get(), i);
345  if (CRYPTO_BUFFER_len(old_cert) != CRYPTO_BUFFER_len(new_cert) ||
347  CRYPTO_BUFFER_data(new_cert),
348  CRYPTO_BUFFER_len(old_cert)) != 0) {
351  return ssl_verify_invalid;
352  }
353  }
354 
355  // The certificate is identical, so we may skip re-verifying the
356  // certificate. Since we only authenticated the previous one, copy other
357  // authentication from the established session and ignore what was newly
358  // received.
359  hs->new_session->ocsp_response = UpRef(prev_session->ocsp_response);
360  hs->new_session->signed_cert_timestamp_list =
361  UpRef(prev_session->signed_cert_timestamp_list);
362  hs->new_session->verify_result = prev_session->verify_result;
363  return ssl_verify_ok;
364  }
365 
367  enum ssl_verify_result_t ret;
368  if (hs->config->custom_verify_callback != nullptr) {
369  ret = hs->config->custom_verify_callback(ssl, &alert);
370  switch (ret) {
371  case ssl_verify_ok:
372  hs->new_session->verify_result = X509_V_OK;
373  break;
374  case ssl_verify_invalid:
375  // If |SSL_VERIFY_NONE|, the error is non-fatal, but we keep the result.
376  if (hs->config->verify_mode == SSL_VERIFY_NONE) {
377  ERR_clear_error();
378  ret = ssl_verify_ok;
379  }
381  break;
382  case ssl_verify_retry:
383  break;
384  }
385  } else {
386  ret = ssl->ctx->x509_method->session_verify_cert_chain(
387  hs->new_session.get(), hs, &alert)
388  ? ssl_verify_ok
390  }
391 
392  if (ret == ssl_verify_invalid) {
394  ssl_send_alert(ssl, SSL3_AL_FATAL, alert);
395  }
396 
397  // Emulate OpenSSL's client OCSP callback. OpenSSL verifies certificates
398  // before it receives the OCSP, so it needs a second callback for OCSP.
399  if (ret == ssl_verify_ok && !ssl->server &&
401  ssl->ctx->legacy_ocsp_callback != nullptr) {
402  int cb_ret =
403  ssl->ctx->legacy_ocsp_callback(ssl, ssl->ctx->legacy_ocsp_callback_arg);
404  if (cb_ret <= 0) {
410  }
411  }
412 
413  return ret;
414 }
415 
416 // Verifies a stored certificate when resuming a session. A few things are
417 // different from verify_peer_cert:
418 // 1. We can't be renegotiating if we're resuming a session.
419 // 2. The session is immutable, so we don't support verify_mode ==
420 // SSL_VERIFY_NONE
421 // 3. We don't call the OCSP callback.
422 // 4. We only support custom verify callbacks.
423 enum ssl_verify_result_t ssl_reverify_peer_cert(SSL_HANDSHAKE *hs,
424  bool send_alert) {
425  SSL *const ssl = hs->ssl;
426  assert(ssl->s3->established_session == nullptr);
427  assert(hs->config->verify_mode != SSL_VERIFY_NONE);
428 
430  enum ssl_verify_result_t ret = ssl_verify_invalid;
431  if (hs->config->custom_verify_callback != nullptr) {
432  ret = hs->config->custom_verify_callback(ssl, &alert);
433  }
434 
435  if (ret == ssl_verify_invalid) {
437  if (send_alert) {
438  ssl_send_alert(ssl, SSL3_AL_FATAL, alert);
439  }
440  }
441 
442  return ret;
443 }
444 
446  enum ssl_grease_index_t index) {
447  // This generates a random value of the form 0xωaωa, for all 0 ≤ ω < 16.
448  uint16_t ret = hs->grease_seed[index];
449  ret = (ret & 0xf0) | 0x0a;
450  ret |= ret << 8;
451  return ret;
452 }
453 
455  enum ssl_grease_index_t index) {
457  if (index == ssl_grease_extension2 &&
459  // The two fake extensions must not have the same value. GREASE values are
460  // of the form 0x1a1a, 0x2a2a, 0x3a3a, etc., so XOR to generate a different
461  // one.
462  ret ^= 0x1010;
463  }
464  return ret;
465 }
466 
468  SSL *const ssl = hs->ssl;
469  SSLMessage msg;
470  if (!ssl->method->get_message(ssl, &msg)) {
471  return ssl_hs_read_message;
472  }
473 
475  return ssl_hs_error;
476  }
477 
478  // Snapshot the finished hash before incorporating the new message.
479  uint8_t finished[EVP_MAX_MD_SIZE];
480  size_t finished_len;
481  if (!hs->transcript.GetFinishedMAC(finished, &finished_len,
482  ssl_handshake_session(hs), !ssl->server) ||
483  !ssl_hash_message(hs, msg)) {
484  return ssl_hs_error;
485  }
486 
487  int finished_ok = CBS_mem_equal(&msg.body, finished, finished_len);
488 #if defined(BORINGSSL_UNSAFE_FUZZER_MODE)
489  finished_ok = 1;
490 #endif
491  if (!finished_ok) {
494  return ssl_hs_error;
495  }
496 
497  // Copy the Finished so we can use it for renegotiation checks.
498  if (finished_len > sizeof(ssl->s3->previous_client_finished) ||
499  finished_len > sizeof(ssl->s3->previous_server_finished)) {
501  return ssl_hs_error;
502  }
503 
504  if (ssl->server) {
505  OPENSSL_memcpy(ssl->s3->previous_client_finished, finished, finished_len);
506  ssl->s3->previous_client_finished_len = finished_len;
507  } else {
508  OPENSSL_memcpy(ssl->s3->previous_server_finished, finished, finished_len);
509  ssl->s3->previous_server_finished_len = finished_len;
510  }
511 
512  // The Finished message should be the end of a flight.
513  if (ssl->method->has_unprocessed_handshake_data(ssl)) {
516  return ssl_hs_error;
517  }
518 
519  ssl->method->next_message(ssl);
520  return ssl_hs_ok;
521 }
522 
524  SSL *const ssl = hs->ssl;
525  const SSL_SESSION *session = ssl_handshake_session(hs);
526 
527  uint8_t finished[EVP_MAX_MD_SIZE];
528  size_t finished_len;
529  if (!hs->transcript.GetFinishedMAC(finished, &finished_len, session,
530  ssl->server)) {
531  return 0;
532  }
533 
534  // Log the master secret, if logging is enabled.
535  if (!ssl_log_secret(ssl, "CLIENT_RANDOM",
536  MakeConstSpan(session->secret, session->secret_length))) {
537  return 0;
538  }
539 
540  // Copy the Finished so we can use it for renegotiation checks.
541  if (finished_len > sizeof(ssl->s3->previous_client_finished) ||
542  finished_len > sizeof(ssl->s3->previous_server_finished)) {
544  return 0;
545  }
546 
547  if (ssl->server) {
548  OPENSSL_memcpy(ssl->s3->previous_server_finished, finished, finished_len);
549  ssl->s3->previous_server_finished_len = finished_len;
550  } else {
551  OPENSSL_memcpy(ssl->s3->previous_client_finished, finished, finished_len);
552  ssl->s3->previous_client_finished_len = finished_len;
553  }
554 
555  ScopedCBB cbb;
556  CBB body;
557  if (!ssl->method->init_message(ssl, cbb.get(), &body, SSL3_MT_FINISHED) ||
558  !CBB_add_bytes(&body, finished, finished_len) ||
559  !ssl_add_message_cbb(ssl, cbb.get())) {
561  return 0;
562  }
563 
564  return 1;
565 }
566 
568  ScopedCBB cbb;
569  CBB body;
570  if (!hs->ssl->method->init_message(hs->ssl, cbb.get(), &body,
572  !ssl_add_cert_chain(hs, &body) ||
573  !ssl_add_message_cbb(hs->ssl, cbb.get())) {
575  return false;
576  }
577 
578  return true;
579 }
580 
582  if (hs->new_session) {
583  return hs->new_session.get();
584  }
585  return hs->ssl->session.get();
586 }
587 
588 int ssl_run_handshake(SSL_HANDSHAKE *hs, bool *out_early_return) {
589  SSL *const ssl = hs->ssl;
590  for (;;) {
591  // Resolve the operation the handshake was waiting on. Each condition may
592  // halt the handshake by returning, or continue executing if the handshake
593  // may immediately proceed. Cases which halt the handshake can clear
594  // |hs->wait| to re-enter the state machine on the next iteration, or leave
595  // it set to keep the condition sticky.
596  switch (hs->wait) {
597  case ssl_hs_error:
598  ERR_restore_state(hs->error.get());
599  return -1;
600 
601  case ssl_hs_flush: {
602  int ret = ssl->method->flush_flight(ssl);
603  if (ret <= 0) {
604  return ret;
605  }
606  break;
607  }
608 
610  case ssl_hs_read_message:
612  if (ssl->quic_method) {
613  // QUIC has no ChangeCipherSpec messages.
614  assert(hs->wait != ssl_hs_read_change_cipher_spec);
615  // The caller should call |SSL_provide_quic_data|. Clear |hs->wait| so
616  // the handshake can check if there is sufficient data next iteration.
617  ssl->s3->rwstate = SSL_ERROR_WANT_READ;
618  hs->wait = ssl_hs_ok;
619  return -1;
620  }
621 
623  size_t consumed = 0;
626  ret = ssl_open_change_cipher_spec(ssl, &consumed, &alert,
627  ssl->s3->read_buffer.span());
628  } else {
629  ret = ssl_open_handshake(ssl, &consumed, &alert,
630  ssl->s3->read_buffer.span());
631  }
632  if (ret == ssl_open_record_error &&
635  if (ERR_GET_LIB(err) == ERR_LIB_SSL &&
637  // Add a dedicated error code to the queue for a handshake_failure
638  // alert in response to ClientHello. This matches NSS's client
639  // behavior and gives a better error on a (probable) failure to
640  // negotiate initial parameters. Note: this error code comes after
641  // the original one.
642  //
643  // See https://crbug.com/446505.
645  }
646  }
647  bool retry;
648  int bio_ret = ssl_handle_open_record(ssl, &retry, ret, consumed, alert);
649  if (bio_ret <= 0) {
650  return bio_ret;
651  }
652  if (retry) {
653  continue;
654  }
655  ssl->s3->read_buffer.DiscardConsumed();
656  break;
657  }
658 
660  if (ssl->s3->hs->can_early_read) {
661  // While we are processing early data, the handshake returns early.
662  *out_early_return = true;
663  return 1;
664  }
665  hs->wait = ssl_hs_ok;
666  break;
667  }
668 
670  ssl->s3->rwstate = SSL_ERROR_PENDING_CERTIFICATE;
671  hs->wait = ssl_hs_ok;
672  return -1;
673 
674  case ssl_hs_handoff:
675  ssl->s3->rwstate = SSL_ERROR_HANDOFF;
676  hs->wait = ssl_hs_ok;
677  return -1;
678 
679  case ssl_hs_handback: {
680  int ret = ssl->method->flush_flight(ssl);
681  if (ret <= 0) {
682  return ret;
683  }
684  ssl->s3->rwstate = SSL_ERROR_HANDBACK;
685  hs->wait = ssl_hs_handback;
686  return -1;
687  }
688 
689  // The following cases are associated with callback APIs which expect to
690  // be called each time the state machine runs. Thus they set |hs->wait|
691  // to |ssl_hs_ok| so that, next time, we re-enter the state machine and
692  // call the callback again.
693  case ssl_hs_x509_lookup:
694  ssl->s3->rwstate = SSL_ERROR_WANT_X509_LOOKUP;
695  hs->wait = ssl_hs_ok;
696  return -1;
699  hs->wait = ssl_hs_ok;
700  return -1;
702  ssl->s3->rwstate = SSL_ERROR_PENDING_SESSION;
703  hs->wait = ssl_hs_ok;
704  return -1;
706  ssl->s3->rwstate = SSL_ERROR_PENDING_TICKET;
707  hs->wait = ssl_hs_ok;
708  return -1;
710  ssl->s3->rwstate = SSL_ERROR_WANT_CERTIFICATE_VERIFY;
711  hs->wait = ssl_hs_ok;
712  return -1;
713 
715  assert(ssl->s3->early_data_reason != ssl_early_data_unknown);
716  assert(!hs->can_early_write);
717  ssl->s3->rwstate = SSL_ERROR_EARLY_DATA_REJECTED;
718  return -1;
719 
720  case ssl_hs_early_return:
721  if (!ssl->server) {
722  // On ECH reject, the handshake should never complete.
723  assert(ssl->s3->ech_status != ssl_ech_rejected);
724  }
725  *out_early_return = true;
726  hs->wait = ssl_hs_ok;
727  return 1;
728 
729  case ssl_hs_hints_ready:
730  ssl->s3->rwstate = SSL_ERROR_HANDSHAKE_HINTS_READY;
731  return -1;
732 
733  case ssl_hs_ok:
734  break;
735  }
736 
737  // Run the state machine again.
738  hs->wait = ssl->do_handshake(hs);
739  if (hs->wait == ssl_hs_error) {
740  hs->error.reset(ERR_save_state());
741  return -1;
742  }
743  if (hs->wait == ssl_hs_ok) {
744  if (!ssl->server) {
745  // On ECH reject, the handshake should never complete.
746  assert(ssl->s3->ech_status != ssl_ech_rejected);
747  }
748  // The handshake has completed.
749  *out_early_return = false;
750  return 1;
751  }
752 
753  // Otherwise, loop to the beginning and resolve what was blocking the
754  // handshake.
755  }
756 }
757 
ssl_send_alert
void ssl_send_alert(SSL *ssl, int level, int desc)
Definition: s3_pkt.cc:379
ssl_hs_read_change_cipher_spec
@ ssl_hs_read_change_cipher_spec
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1625
ssl_st::server
bool server
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3777
ssl_hs_hints_ready
@ ssl_hs_hints_ready
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1627
SSL_AD_UNEXPECTED_MESSAGE
#define SSL_AD_UNEXPECTED_MESSAGE
Definition: ssl.h:3795
ssl_hs_handoff
@ ssl_hs_handoff
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1616
SSL3_MT_FINISHED
#define SSL3_MT_FINISHED
Definition: ssl3.h:310
ssl_handle_open_record
int ssl_handle_open_record(SSL *ssl, bool *out_retry, ssl_open_record_t ret, size_t consumed, uint8_t alert)
Definition: ssl_buffer.cc:207
RAND_bytes
#define RAND_bytes
Definition: boringssl_prefix_symbols.h:2060
CBS_get_u16
#define CBS_get_u16
Definition: boringssl_prefix_symbols.h:1073
cbs_st
Definition: bytestring.h:39
ERR_save_state
#define ERR_save_state
Definition: boringssl_prefix_symbols.h:1443
OPENSSL_memcmp
static int OPENSSL_memcmp(const void *s1, const void *s2, size_t n)
Definition: third_party/boringssl-with-bazel/src/crypto/internal.h:811
ssl_grease_extension1
@ ssl_grease_extension1
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1633
ssl_send_finished
bool ssl_send_finished(SSL_HANDSHAKE *hs)
Definition: handshake.cc:523
SSL_HANDSHAKE::ech_client_hello_buf
Array< uint8_t > ech_client_hello_buf
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1845
ssl_verify_ok
ssl_verify_ok
Definition: ssl.h:2412
false
#define false
Definition: setup_once.h:323
uint16_t
unsigned short uint16_t
Definition: stdint-msvc2008.h:79
ssl_hs_certificate_selection_pending
@ ssl_hs_certificate_selection_pending
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1615
SSL_MAX_MD_SIZE
#define SSL_MAX_MD_SIZE
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:576
SSL_R_CLIENTHELLO_PARSE_FAILED
#define SSL_R_CLIENTHELLO_PARSE_FAILED
Definition: ssl.h:5399
ssl_hs_early_return
@ ssl_hs_early_return
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1622
ssl_grease_extension2
@ ssl_grease_extension2
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1634
SSL_ERROR_WANT_READ
#define SSL_ERROR_WANT_READ
Definition: ssl.h:494
SSL_R_PARSE_TLSEXT
#define SSL_R_PARSE_TLSEXT
Definition: ssl.h:5457
OPENSSL_PUT_ERROR
#define OPENSSL_PUT_ERROR(library, reason)
Definition: err.h:423
internal.h
ext
void * ext
Definition: x509v3.h:87
ssl_output_cert_chain
bool ssl_output_cert_chain(SSL_HANDSHAKE *hs)
Definition: handshake.cc:567
SSL_VERIFY_NONE
#define SSL_VERIFY_NONE
Definition: ssl.h:2373
copy
static int copy(grpc_slice_buffer *input, grpc_slice_buffer *output)
Definition: message_compress.cc:145
SSL_AD_CERTIFICATE_UNKNOWN
#define SSL_AD_CERTIFICATE_UNKNOWN
Definition: ssl.h:3806
SSL_R_CERTIFICATE_VERIFY_FAILED
#define SSL_R_CERTIFICATE_VERIFY_FAILED
Definition: ssl.h:5393
ssl_st::config
bssl::UniquePtr< bssl::SSL_CONFIG > config
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3712
SSL_HANDSHAKE::ssl
SSL * ssl
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1726
ssl_hs_x509_lookup
@ ssl_hs_x509_lookup
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1618
CBS_mem_equal
#define CBS_mem_equal
Definition: boringssl_prefix_symbols.h:1090
SSL_AD_INTERNAL_ERROR
#define SSL_AD_INTERNAL_ERROR
Definition: ssl.h:3815
SSL_R_EXCESS_HANDSHAKE_DATA
#define SSL_R_EXCESS_HANDSHAKE_DATA
Definition: ssl.h:5522
CRYPTO_BUFFER_len
#define CRYPTO_BUFFER_len
Definition: boringssl_prefix_symbols.h:1118
ssl_verify_retry
ssl_verify_retry
Definition: ssl.h:2414
ssl_st::do_handshake
bssl::ssl_hs_wait_t(* do_handshake)(bssl::SSL_HANDSHAKE *hs)
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3728
ssl_hs_ok
@ ssl_hs_ok
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1611
error_ref_leak.err
err
Definition: error_ref_leak.py:35
CBS_len
#define CBS_len
Definition: boringssl_prefix_symbols.h:1089
SSLMessage::body
CBS body
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1143
SSL_HANDSHAKE::hash_len_
size_t hash_len_
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1752
crypto_buffer_st
Definition: third_party/boringssl-with-bazel/src/crypto/pool/internal.h:31
SSL3_MT_CERTIFICATE
#define SSL3_MT_CERTIFICATE
Definition: ssl3.h:304
cbs
const CBS * cbs
Definition: third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h:107
SSL_AD_ILLEGAL_PARAMETER
#define SSL_AD_ILLEGAL_PARAMETER
Definition: ssl.h:3807
SSL_HANDSHAKE::new_session
UniquePtr< SSL_SESSION > new_session
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1916
X509_V_OK
#define X509_V_OK
Definition: x509.h:1918
CBS_init
#define CBS_init
Definition: boringssl_prefix_symbols.h:1085
SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE
#define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE
Definition: ssl.h:5595
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
SSLTranscript::GetFinishedMAC
bool GetFinishedMAC(uint8_t *out, size_t *out_len, const SSL_SESSION *session, bool from_server) const
Definition: ssl_transcript.cc:246
ssl_handshake_session
const SSL_SESSION * ssl_handshake_session(const SSL_HANDSHAKE *hs)
Definition: handshake.cc:581
grease_index_to_value
static uint16_t grease_index_to_value(const SSL_HANDSHAKE *hs, enum ssl_grease_index_t index)
Definition: handshake.cc:445
SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE
#define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE
Definition: ssl.h:3823
SSL3_MT_CLIENT_HELLO
#define SSL3_MT_CLIENT_HELLO
Definition: ssl3.h:299
ssl_session_st::secret_length
int secret_length
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3809
ssl_st::quic_method
const SSL_QUIC_METHOD * quic_method
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3769
SSL_ERROR_WANT_PRIVATE_KEY_OPERATION
#define SSL_ERROR_WANT_PRIVATE_KEY_OPERATION
Definition: ssl.h:558
SSLExtension
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2222
ssl_max_handshake_message_len
size_t ssl_max_handshake_message_len(const SSL *ssl)
Definition: handshake.cc:230
ssl_st::session
bssl::UniquePtr< SSL_SESSION > session
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3750
ssl_session_st::verify_result
long verify_result
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3846
SSL_R_UNEXPECTED_MESSAGE
#define SSL_R_UNEXPECTED_MESSAGE
Definition: ssl.h:5490
SSL_HANDSHAKE::can_early_write
bool can_early_write
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2000
SSL_AD_UNSUPPORTED_EXTENSION
#define SSL_AD_UNSUPPORTED_EXTENSION
Definition: ssl.h:3820
retry
void retry(grpc_end2end_test_config config)
Definition: retry.cc:319
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
Array::empty
bool empty() const
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:277
ssl_handshake_new
UniquePtr< SSL_HANDSHAKE > ssl_handshake_new(SSL *ssl)
Definition: handshake.cc:196
SSLMessage::type
uint8_t type
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1142
SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO
#define SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO
Definition: ssl.h:5422
ssl_hs_read_server_hello
@ ssl_hs_read_server_hello
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1612
ERR_LIB_SSL
@ ERR_LIB_SSL
Definition: err.h:307
SSL_R_DIGEST_CHECK_FAILED
#define SSL_R_DIGEST_CHECK_FAILED
Definition: ssl.h:5410
ERR_GET_REASON
#define ERR_GET_REASON(packed_error)
Definition: err.h:171
SSL_HANDSHAKE
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1720
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
Array< uint8_t >
ssl_hash_message
bool ssl_hash_message(SSL_HANDSHAKE *hs, const SSLMessage &msg)
Definition: handshake.cc:260
ssl_hs_read_end_of_early_data
@ ssl_hs_read_end_of_early_data
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1624
gen_stats_data.found
bool found
Definition: gen_stats_data.py:61
X509_V_ERR_APPLICATION_VERIFICATION
#define X509_V_ERR_APPLICATION_VERIFICATION
Definition: x509.h:1974
ssl_hs_certificate_verify
@ ssl_hs_certificate_verify
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1626
ssl_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3698
ERR_add_error_dataf
#define ERR_add_error_dataf
Definition: boringssl_prefix_symbols.h:1412
ssl_early_callback_ctx
Definition: ssl.h:4186
ssl_hs_wait_t
ssl_hs_wait_t
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1609
CBS
struct cbs_st CBS
Definition: base.h:388
ERR_peek_error
#define ERR_peek_error
Definition: boringssl_prefix_symbols.h:1428
SSLMessage::raw
CBS raw
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1146
ssl_get_grease_value
uint16_t ssl_get_grease_value(const SSL_HANDSHAKE *hs, enum ssl_grease_index_t index)
Definition: handshake.cc:454
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
ERR_GET_LIB
#define ERR_GET_LIB(packed_error)
Definition: err.h:166
BSSL_NAMESPACE_END
#define BSSL_NAMESPACE_END
Definition: base.h:480
SSL_HANDSHAKE::SSL_HANDSHAKE
SSL_HANDSHAKE(SSL *ssl)
Definition: handshake.cc:127
ssl_verify_invalid
ssl_verify_invalid
Definition: ssl.h:2413
ERR_R_INTERNAL_ERROR
#define ERR_R_INTERNAL_ERROR
Definition: err.h:374
ssl_protocol_version
uint16_t ssl_protocol_version(const SSL *ssl)
Definition: ssl_versions.cc:251
ssl_hs_early_data_rejected
@ ssl_hs_early_data_rejected
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1623
SSL_ERROR_HANDBACK
#define SSL_ERROR_HANDBACK
Definition: ssl.h:580
SSL_VERIFY_PEER
#define SSL_VERIFY_PEER
Definition: ssl.h:2379
SSL_R_DUPLICATE_EXTENSION
#define SSL_R_DUPLICATE_EXTENSION
Definition: ssl.h:5524
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
ssl_hs_pending_ticket
@ ssl_hs_pending_ticket
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1621
conf.extensions
list extensions
Definition: doc/python/sphinx/conf.py:54
SSL_CONFIG::ocsp_stapling_enabled
bool ocsp_stapling_enabled
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3055
SSL_HANDSHAKE::transcript
SSLTranscript transcript
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1821
ssl_hs_read_message
@ ssl_hs_read_message
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1613
msg
std::string msg
Definition: client_interceptors_end2end_test.cc:372
SSL3_AL_FATAL
#define SSL3_AL_FATAL
Definition: ssl3.h:280
SSL_CONFIG::verify_mode
uint8_t verify_mode
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3044
SSL_HANDSHAKE::error
UniquePtr< ERR_SAVE_STATE > error
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1813
ssl_hs_handback
@ ssl_hs_handback
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1617
SSL_ERROR_HANDSHAKE_HINTS_READY
#define SSL_ERROR_HANDSHAKE_HINTS_READY
Definition: ssl.h:592
SSL_CONFIG::custom_verify_callback
enum ssl_verify_result_t(* custom_verify_callback)(SSL *ssl, uint8_t *out_alert)
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2992
ssl_client_hello_init
bool ssl_client_hello_init(const SSL *ssl, SSL_CLIENT_HELLO *out, Span< const uint8_t > body)
Definition: extensions.cc:211
ssl.h
SSL_HANDSHAKE::GetClientHello
bool GetClientHello(SSLMessage *out_msg, SSL_CLIENT_HELLO *out_client_hello)
Definition: handshake.cc:174
ssl_open_record_t
ssl_open_record_t
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:933
ERR_restore_state
#define ERR_restore_state
Definition: boringssl_prefix_symbols.h:1442
SSLMessage
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1140
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
sk_CRYPTO_BUFFER_value
#define sk_CRYPTO_BUFFER_value
Definition: boringssl_prefix_symbols.h:561
ssl_early_data_unknown
ssl_early_data_unknown
Definition: ssl.h:3555
CBB_add_bytes
#define CBB_add_bytes
Definition: boringssl_prefix_symbols.h:1025
BSSL_NAMESPACE_BEGIN
Definition: trust_token_test.cc:45
ssl_st::s3
bssl::SSL3_STATE * s3
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3730
rand.h
ssl_hs_flush
@ ssl_hs_flush
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1614
SSL_in_init
#define SSL_in_init
Definition: boringssl_prefix_symbols.h:401
SSL_ERROR_PENDING_SESSION
#define SSL_ERROR_PENDING_SESSION
Definition: ssl.h:543
SSL_HANDSHAKE::config
SSL_CONFIG * config
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1729
ssl_reverify_peer_cert
enum ssl_verify_result_t ssl_reverify_peer_cert(SSL_HANDSHAKE *hs, bool send_alert)
Definition: handshake.cc:423
ssl_st::max_cert_list
uint32_t max_cert_list
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3765
SSL_R_UNEXPECTED_EXTENSION
#define SSL_R_UNEXPECTED_EXTENSION
Definition: ssl.h:5489
SSL_HANDSHAKE::grease_seed
uint8_t grease_seed[ssl_grease_last_index+1]
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2062
SSL_HANDSHAKE::ResizeSecrets
void ResizeSecrets(size_t hash_len)
Definition: handshake.cc:167
ssl_hs_private_key_operation
@ ssl_hs_private_key_operation
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1619
SSL_AD_DECODE_ERROR
#define SSL_AD_DECODE_ERROR
Definition: ssl.h:3810
SSL_R_SERVER_CERT_CHANGED
#define SSL_R_SERVER_CERT_CHANGED
Definition: ssl.h:5540
index
int index
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:1184
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
CBS_get_u16_length_prefixed
#define CBS_get_u16_length_prefixed
Definition: boringssl_prefix_symbols.h:1074
ssl_open_change_cipher_spec
ssl_open_record_t ssl_open_change_cipher_spec(SSL *ssl, size_t *out_consumed, uint8_t *out_alert, Span< uint8_t > in)
Definition: ssl_lib.cc:244
SSLMessage::is_v2_hello
bool is_v2_hello
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1141
SSLTranscript::Update
bool Update(Span< const uint8_t > in)
Definition: ssl_transcript.cc:220
ssl_check_message_type
bool ssl_check_message_type(SSL *ssl, const SSLMessage &msg, int type)
Definition: handshake.cc:209
ssl_session_st::signed_cert_timestamp_list
bssl::UniquePtr< CRYPTO_BUFFER > signed_cert_timestamp_list
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3870
EVP_MAX_MD_SIZE
#define EVP_MAX_MD_SIZE
Definition: digest.h:156
ssl_open_record_error
@ ssl_open_record_error
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:938
ssl_add_message_cbb
bool ssl_add_message_cbb(SSL *ssl, CBB *cbb)
Definition: handshake.cc:220
ERR_clear_error
#define ERR_clear_error
Definition: boringssl_prefix_symbols.h:1413
ssl_ech_rejected
@ ssl_ech_rejected
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2616
ssl_st::method
const bssl::SSL_PROTOCOL_METHOD * method
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3706
config_s
Definition: bloaty/third_party/zlib/deflate.c:120
ssl_get_finished
enum ssl_hs_wait_t ssl_get_finished(SSL_HANDSHAKE *hs)
Definition: handshake.cc:467
ssl_hs_pending_session
@ ssl_hs_pending_session
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1620
ssl_parse_extensions
bool ssl_parse_extensions(const CBS *cbs, uint8_t *out_alert, std::initializer_list< SSLExtension * > extensions, bool ignore_unknown)
Definition: handshake.cc:269
ssl_session_st::ocsp_response
bssl::UniquePtr< CRYPTO_BUFFER > ocsp_response
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3873
SSL_ERROR_EARLY_DATA_REJECTED
#define SSL_ERROR_EARLY_DATA_REJECTED
Definition: ssl.h:570
ssl_verify_peer_cert
enum ssl_verify_result_t ssl_verify_peer_cert(SSL_HANDSHAKE *hs)
Definition: handshake.cc:323
SSL_CONFIG
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2960
SSL_ERROR_WANT_X509_LOOKUP
#define SSL_ERROR_WANT_X509_LOOKUP
Definition: ssl.h:507
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
ssl_grease_index_t
ssl_grease_index_t
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1630
SSL_R_OCSP_CB_ERROR
#define SSL_R_OCSP_CB_ERROR
Definition: ssl.h:5556
ssl_hs_error
@ ssl_hs_error
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1610
ssl_run_handshake
int ssl_run_handshake(SSL_HANDSHAKE *hs, bool *out_early_return)
Definition: handshake.cc:588
ssl_open_handshake
ssl_open_record_t ssl_open_handshake(SSL *ssl, size_t *out_consumed, uint8_t *out_alert, Span< uint8_t > in)
Definition: ssl_lib.cc:230
SSL_ERROR_PENDING_CERTIFICATE
#define SSL_ERROR_PENDING_CERTIFICATE
Definition: ssl.h:550
ssl_add_cert_chain
bool ssl_add_cert_chain(SSL_HANDSHAKE *hs, CBB *cbb)
Definition: ssl_cert.cc:410
ssl_session_st::certs
bssl::UniquePtr< STACK_OF(CRYPTO_BUFFER)> certs
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3825
ssl_st::ctx
bssl::UniquePtr< SSL_CTX > ctx
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3754
SSL_AD_DECRYPT_ERROR
#define SSL_AD_DECRYPT_ERROR
Definition: ssl.h:3811
sk_CRYPTO_BUFFER_num
#define sk_CRYPTO_BUFFER_num
Definition: boringssl_prefix_symbols.h:558
ssl_session_st::secret
uint8_t secret[SSL_MAX_MASTER_KEY_LENGTH]
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3810
SSL_ERROR_WANT_CERTIFICATE_VERIFY
#define SSL_ERROR_WANT_CERTIFICATE_VERIFY
Definition: ssl.h:577
SSL_HANDSHAKE::~SSL_HANDSHAKE
~SSL_HANDSHAKE()
Definition: handshake.cc:163
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
CRYPTO_BUFFER_data
#define CRYPTO_BUFFER_data
Definition: boringssl_prefix_symbols.h:1115
ssl_log_secret
bool ssl_log_secret(const SSL *ssl, const char *label, Span< const uint8_t > secret)
Definition: ssl_lib.cc:291
SSL_HANDSHAKE::wait
enum ssl_hs_wait_t wait
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1733
absl::MakeConstSpan
constexpr Span< const T > MakeConstSpan(T *ptr, size_t size) noexcept
Definition: abseil-cpp/absl/types/span.h:707
cbb_st
Definition: bytestring.h:375
SSL_ERROR_PENDING_TICKET
#define SSL_ERROR_PENDING_TICKET
Definition: ssl.h:564
SSL_ERROR_HANDOFF
#define SSL_ERROR_HANDOFF
Definition: ssl.h:579


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:00