s3_pkt.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 #include <openssl/ssl.h>
110 
111 #include <assert.h>
112 #include <limits.h>
113 #include <string.h>
114 
115 #include <algorithm>
116 
117 #include <openssl/err.h>
118 #include <openssl/evp.h>
119 #include <openssl/mem.h>
120 #include <openssl/rand.h>
121 
122 #include "../crypto/err/internal.h"
123 #include "../crypto/internal.h"
124 #include "internal.h"
125 
126 
128 
129 static int do_tls_write(SSL *ssl, int type, const uint8_t *in, unsigned len);
130 
131 int tls_write_app_data(SSL *ssl, bool *out_needs_handshake, const uint8_t *in,
132  int len) {
133  assert(ssl_can_write(ssl));
134  assert(!ssl->s3->aead_write_ctx->is_null_cipher());
135 
136  *out_needs_handshake = false;
137 
138  if (ssl->s3->write_shutdown != ssl_shutdown_none) {
140  return -1;
141  }
142 
143  // TODO(davidben): Switch this logic to |size_t| and |bssl::Span|.
144  assert(ssl->s3->wnum <= INT_MAX);
145  unsigned tot = ssl->s3->wnum;
146  ssl->s3->wnum = 0;
147 
148  // Ensure that if we end up with a smaller value of data to write out than
149  // the the original len from a write which didn't complete for non-blocking
150  // I/O and also somehow ended up avoiding the check for this in
151  // tls_write_pending/SSL_R_BAD_WRITE_RETRY as it must never be possible to
152  // end up with (len-tot) as a large number that will then promptly send
153  // beyond the end of the users buffer ... so we trap and report the error in
154  // a way the user will notice.
155  if (len < 0 || (size_t)len < tot) {
157  return -1;
158  }
159 
160  const int is_early_data_write =
161  !ssl->server && SSL_in_early_data(ssl) && ssl->s3->hs->can_early_write;
162 
163  unsigned n = len - tot;
164  for (;;) {
165  size_t max_send_fragment = ssl->max_send_fragment;
166  if (is_early_data_write) {
167  SSL_HANDSHAKE *hs = ssl->s3->hs.get();
168  if (hs->early_data_written >= hs->early_session->ticket_max_early_data) {
169  ssl->s3->wnum = tot;
170  hs->can_early_write = false;
171  *out_needs_handshake = true;
172  return -1;
173  }
174  max_send_fragment = std::min(
175  max_send_fragment, size_t{hs->early_session->ticket_max_early_data -
176  hs->early_data_written});
177  }
178 
179  const size_t nw = std::min(max_send_fragment, size_t{n});
180  int ret = do_tls_write(ssl, SSL3_RT_APPLICATION_DATA, &in[tot], nw);
181  if (ret <= 0) {
182  ssl->s3->wnum = tot;
183  return ret;
184  }
185 
186  if (is_early_data_write) {
187  ssl->s3->hs->early_data_written += ret;
188  }
189 
190  if (ret == (int)n || (ssl->mode & SSL_MODE_ENABLE_PARTIAL_WRITE)) {
191  return tot + ret;
192  }
193 
194  n -= ret;
195  tot += ret;
196  }
197 }
198 
199 static int tls_write_pending(SSL *ssl, int type, const uint8_t *in,
200  unsigned int len) {
201  if (ssl->s3->wpend_tot > (int)len ||
203  ssl->s3->wpend_buf != in) ||
204  ssl->s3->wpend_type != type) {
206  return -1;
207  }
208 
209  int ret = ssl_write_buffer_flush(ssl);
210  if (ret <= 0) {
211  return ret;
212  }
213  ssl->s3->wpend_pending = false;
214  return ssl->s3->wpend_ret;
215 }
216 
217 // do_tls_write writes an SSL record of the given type.
218 static int do_tls_write(SSL *ssl, int type, const uint8_t *in, unsigned len) {
219  // If there is still data from the previous record, flush it.
220  if (ssl->s3->wpend_pending) {
221  return tls_write_pending(ssl, type, in, len);
222  }
223 
224  SSLBuffer *buf = &ssl->s3->write_buffer;
225  if (len > SSL3_RT_MAX_PLAIN_LENGTH || buf->size() > 0) {
227  return -1;
228  }
229 
230  if (!tls_flush_pending_hs_data(ssl)) {
231  return -1;
232  }
233 
234  size_t flight_len = 0;
235  if (ssl->s3->pending_flight != nullptr) {
236  flight_len =
237  ssl->s3->pending_flight->length - ssl->s3->pending_flight_offset;
238  }
239 
240  size_t max_out = flight_len;
241  if (len > 0) {
242  const size_t max_ciphertext_len = len + SSL_max_seal_overhead(ssl);
243  if (max_ciphertext_len < len || max_out + max_ciphertext_len < max_out) {
245  return -1;
246  }
247  max_out += max_ciphertext_len;
248  }
249 
250  if (max_out == 0) {
251  return 0;
252  }
253 
254  if (!buf->EnsureCap(flight_len + ssl_seal_align_prefix_len(ssl), max_out)) {
255  return -1;
256  }
257 
258  // Add any unflushed handshake data as a prefix. This may be a KeyUpdate
259  // acknowledgment or 0-RTT key change messages. |pending_flight| must be clear
260  // when data is added to |write_buffer| or it will be written in the wrong
261  // order.
262  if (ssl->s3->pending_flight != nullptr) {
264  buf->remaining().data(),
265  ssl->s3->pending_flight->data + ssl->s3->pending_flight_offset,
266  flight_len);
267  ssl->s3->pending_flight.reset();
268  ssl->s3->pending_flight_offset = 0;
269  buf->DidWrite(flight_len);
270  }
271 
272  if (len > 0) {
273  size_t ciphertext_len;
274  if (!tls_seal_record(ssl, buf->remaining().data(), &ciphertext_len,
275  buf->remaining().size(), type, in, len)) {
276  return -1;
277  }
278  buf->DidWrite(ciphertext_len);
279  }
280 
281  // Now that we've made progress on the connection, uncork KeyUpdate
282  // acknowledgments.
283  ssl->s3->key_update_pending = false;
284 
285  // Memorize arguments so that tls_write_pending can detect bad write retries
286  // later.
287  ssl->s3->wpend_tot = len;
288  ssl->s3->wpend_buf = in;
289  ssl->s3->wpend_type = type;
290  ssl->s3->wpend_ret = len;
291  ssl->s3->wpend_pending = true;
292 
293  // We now just need to write the buffer.
294  return tls_write_pending(ssl, type, in, len);
295 }
296 
298  size_t *out_consumed, uint8_t *out_alert,
299  Span<uint8_t> in) {
300  assert(ssl_can_read(ssl));
301  assert(!ssl->s3->aead_read_ctx->is_null_cipher());
302 
303  uint8_t type;
304  Span<uint8_t> body;
305  auto ret = tls_open_record(ssl, &type, &body, out_consumed, out_alert, in);
306  if (ret != ssl_open_record_success) {
307  return ret;
308  }
309 
310  const bool is_early_data_read = ssl->server && SSL_in_early_data(ssl);
311 
312  if (type == SSL3_RT_HANDSHAKE) {
313  // Post-handshake data prior to TLS 1.3 is always renegotiation, which we
314  // never accept as a server. Otherwise |tls_get_message| will send
315  // |SSL_R_EXCESSIVE_MESSAGE_SIZE|.
316  if (ssl->server && ssl_protocol_version(ssl) < TLS1_3_VERSION) {
318  *out_alert = SSL_AD_NO_RENEGOTIATION;
319  return ssl_open_record_error;
320  }
321 
322  if (!tls_append_handshake_data(ssl, body)) {
323  *out_alert = SSL_AD_INTERNAL_ERROR;
324  return ssl_open_record_error;
325  }
327  }
328 
331  *out_alert = SSL_AD_UNEXPECTED_MESSAGE;
332  return ssl_open_record_error;
333  }
334 
335  if (is_early_data_read) {
336  if (body.size() > kMaxEarlyDataAccepted - ssl->s3->hs->early_data_read) {
338  *out_alert = SSL3_AD_UNEXPECTED_MESSAGE;
339  return ssl_open_record_error;
340  }
341 
342  ssl->s3->hs->early_data_read += body.size();
343  }
344 
345  if (body.empty()) {
347  }
348 
349  *out = body;
351 }
352 
354  uint8_t *out_alert,
355  Span<uint8_t> in) {
356  uint8_t type;
357  Span<uint8_t> body;
358  auto ret = tls_open_record(ssl, &type, &body, out_consumed, out_alert, in);
359  if (ret != ssl_open_record_success) {
360  return ret;
361  }
362 
365  *out_alert = SSL_AD_UNEXPECTED_MESSAGE;
366  return ssl_open_record_error;
367  }
368 
369  if (body.size() != 1 || body[0] != SSL3_MT_CCS) {
371  *out_alert = SSL_AD_ILLEGAL_PARAMETER;
372  return ssl_open_record_error;
373  }
374 
375  ssl_do_msg_callback(ssl, 0 /* read */, SSL3_RT_CHANGE_CIPHER_SPEC, body);
377 }
378 
379 void ssl_send_alert(SSL *ssl, int level, int desc) {
380  // This function is called in response to a fatal error from the peer. Ignore
381  // any failures writing the alert and report only the original error. In
382  // particular, if the transport uses |SSL_write|, our existing error will be
383  // clobbered so we must save and restore the error queue. See
384  // https://crbug.com/959305.
385  //
386  // TODO(davidben): Return the alert out of the handshake, rather than calling
387  // this function internally everywhere.
388  //
389  // TODO(davidben): This does not allow retrying if the alert hit EAGAIN. See
390  // https://crbug.com/boringssl/130.
391  UniquePtr<ERR_SAVE_STATE> err_state(ERR_save_state());
393  ERR_restore_state(err_state.get());
394 }
395 
396 int ssl_send_alert_impl(SSL *ssl, int level, int desc) {
397  // It is illegal to send an alert when we've already sent a closing one.
398  if (ssl->s3->write_shutdown != ssl_shutdown_none) {
400  return -1;
401  }
402 
404  ssl->s3->write_shutdown = ssl_shutdown_close_notify;
405  } else {
406  assert(level == SSL3_AL_FATAL);
407  assert(desc != SSL_AD_CLOSE_NOTIFY);
408  ssl->s3->write_shutdown = ssl_shutdown_error;
409  }
410 
411  ssl->s3->alert_dispatch = true;
412  ssl->s3->send_alert[0] = level;
413  ssl->s3->send_alert[1] = desc;
414  if (ssl->s3->write_buffer.empty()) {
415  // Nothing is being written out, so the alert may be dispatched
416  // immediately.
417  return ssl->method->dispatch_alert(ssl);
418  }
419 
420  // The alert will be dispatched later.
421  return -1;
422 }
423 
425  if (ssl->quic_method) {
426  if (!ssl->quic_method->send_alert(ssl, ssl->s3->write_level,
427  ssl->s3->send_alert[1])) {
429  return 0;
430  }
431  } else {
432  int ret = do_tls_write(ssl, SSL3_RT_ALERT, &ssl->s3->send_alert[0], 2);
433  if (ret <= 0) {
434  return ret;
435  }
436  }
437 
438  ssl->s3->alert_dispatch = false;
439 
440  // If the alert is fatal, flush the BIO now.
441  if (ssl->s3->send_alert[0] == SSL3_AL_FATAL) {
442  BIO_flush(ssl->wbio.get());
443  }
444 
445  ssl_do_msg_callback(ssl, 1 /* write */, SSL3_RT_ALERT, ssl->s3->send_alert);
446 
447  int alert = (ssl->s3->send_alert[0] << 8) | ssl->s3->send_alert[1];
449 
450  return 1;
451 }
452 
ssl_send_alert_impl
int ssl_send_alert_impl(SSL *ssl, int level, int desc)
Definition: s3_pkt.cc:396
ssl_st::server
bool server
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3777
SSL3_AL_WARNING
#define SSL3_AL_WARNING
Definition: ssl3.h:279
SSL3_AD_UNEXPECTED_MESSAGE
#define SSL3_AD_UNEXPECTED_MESSAGE
Definition: ssl3.h:283
SSL_AD_UNEXPECTED_MESSAGE
#define SSL_AD_UNEXPECTED_MESSAGE
Definition: ssl.h:3795
gen_build_yaml.out
dictionary out
Definition: src/benchmark/gen_build_yaml.py:24
Span::size
size_t size() const
Definition: boringssl-with-bazel/src/include/openssl/span.h:133
ERR_save_state
#define ERR_save_state
Definition: boringssl_prefix_symbols.h:1443
tot
big_t tot
Definition: zlib/examples/enough.c:229
evp.h
tls_open_record
enum ssl_open_record_t tls_open_record(SSL *ssl, uint8_t *out_type, Span< uint8_t > *out, size_t *out_consumed, uint8_t *out_alert, Span< uint8_t > in)
Definition: tls_record.cc:206
SSL3_RT_ALERT
#define SSL3_RT_ALERT
Definition: ssl3.h:272
OPENSSL_PUT_ERROR
#define OPENSSL_PUT_ERROR(library, reason)
Definition: err.h:423
string.h
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
SSL_R_QUIC_INTERNAL_ERROR
#define SSL_R_QUIC_INTERNAL_ERROR
Definition: ssl.h:5565
SSL_AD_INTERNAL_ERROR
#define SSL_AD_INTERNAL_ERROR
Definition: ssl.h:3815
SSL_max_seal_overhead
#define SSL_max_seal_overhead
Definition: boringssl_prefix_symbols.h:412
SSL_HANDSHAKE::early_session
UniquePtr< SSL_SESSION > early_session
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1920
tls_open_app_data
ssl_open_record_t tls_open_app_data(SSL *ssl, Span< uint8_t > *out, size_t *out_consumed, uint8_t *out_alert, Span< uint8_t > in)
Definition: s3_pkt.cc:297
SSL_AD_ILLEGAL_PARAMETER
#define SSL_AD_ILLEGAL_PARAMETER
Definition: ssl.h:3807
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
internal.h
ssl_shutdown_none
@ ssl_shutdown_none
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2604
ssl_st::mode
uint32_t mode
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3764
ssl_st::quic_method
const SSL_QUIC_METHOD * quic_method
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3769
SSL_HANDSHAKE::can_early_write
bool can_early_write
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2000
tls_write_pending
static int tls_write_pending(SSL *ssl, int type, const uint8_t *in, unsigned int len)
Definition: s3_pkt.cc:199
ssl_do_msg_callback
void ssl_do_msg_callback(const SSL *ssl, int is_write, int content_type, Span< const uint8_t > in)
Definition: ssl_lib.cc:329
ssl_shutdown_error
@ ssl_shutdown_error
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2606
SSL_CB_WRITE_ALERT
#define SSL_CB_WRITE_ALERT
Definition: ssl.h:4286
in
const char * in
Definition: third_party/abseil-cpp/absl/strings/internal/str_format/parser_test.cc:391
SSL3_RT_MAX_PLAIN_LENGTH
#define SSL3_RT_MAX_PLAIN_LENGTH
Definition: ssl3.h:235
SSL_HANDSHAKE
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1720
SSL_R_BAD_CHANGE_CIPHER_SPEC
#define SSL_R_BAD_CHANGE_CIPHER_SPEC
Definition: ssl.h:5371
ssl_open_record_discard
@ ssl_open_record_discard
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:935
Span::empty
bool empty() const
Definition: boringssl-with-bazel/src/include/openssl/span.h:134
ssl_st
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3698
tls_dispatch_alert
int tls_dispatch_alert(SSL *ssl)
Definition: s3_pkt.cc:424
SSL_R_UNEXPECTED_RECORD
#define SSL_R_UNEXPECTED_RECORD
Definition: ssl.h:5492
tls_open_change_cipher_spec
ssl_open_record_t tls_open_change_cipher_spec(SSL *ssl, size_t *out_consumed, uint8_t *out_alert, Span< uint8_t > in)
Definition: s3_pkt.cc:353
ssl_st::wbio
bssl::UniquePtr< BIO > wbio
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3723
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
BSSL_NAMESPACE_END
#define BSSL_NAMESPACE_END
Definition: base.h:480
err.h
ssl_can_write
bool ssl_can_write(const SSL *ssl)
Definition: ssl_lib.cc:222
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_AD_NO_RENEGOTIATION
#define SSL_AD_NO_RENEGOTIATION
Definition: ssl.h:3818
ssl_can_read
bool ssl_can_read(const SSL *ssl)
Definition: ssl_lib.cc:226
tls_seal_record
bool tls_seal_record(SSL *ssl, uint8_t *out, size_t *out_len, size_t max_out, uint8_t type, const uint8_t *in, size_t in_len)
Definition: tls_record.cc:514
SSL3_MT_CCS
#define SSL3_MT_CCS
Definition: ssl3.h:326
SSL_R_BAD_LENGTH
#define SSL_R_BAD_LENGTH
Definition: ssl.h:5379
SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER
#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER
Definition: ssl.h:769
SSL_R_BAD_WRITE_RETRY
#define SSL_R_BAD_WRITE_RETRY
Definition: ssl.h:5386
min
#define min(a, b)
Definition: qsort.h:83
Span< uint8_t >
n
int n
Definition: abseil-cpp/absl/container/btree_test.cc:1080
ssl_seal_align_prefix_len
size_t ssl_seal_align_prefix_len(const SSL *ssl)
Definition: tls_record.cc:176
ERR_R_OVERFLOW
#define ERR_R_OVERFLOW
Definition: err.h:375
SSL3_AL_FATAL
#define SSL3_AL_FATAL
Definition: ssl3.h:280
tls_write_app_data
int tls_write_app_data(SSL *ssl, bool *out_needs_handshake, const uint8_t *in, int len)
Definition: s3_pkt.cc:131
ssl.h
SSL_AD_CLOSE_NOTIFY
#define SSL_AD_CLOSE_NOTIFY
Definition: ssl.h:3794
kMaxEarlyDataAccepted
static const size_t kMaxEarlyDataAccepted
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3099
SSL_HANDSHAKE::early_data_written
uint16_t early_data_written
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2052
SSL3_RT_HANDSHAKE
#define SSL3_RT_HANDSHAKE
Definition: ssl3.h:273
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
TLS1_3_VERSION
#define TLS1_3_VERSION
Definition: ssl.h:653
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
SSL3_RT_CHANGE_CIPHER_SPEC
#define SSL3_RT_CHANGE_CIPHER_SPEC
Definition: ssl3.h:271
rand.h
ssl_open_record_success
@ ssl_open_record_success
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:934
SSL_MODE_ENABLE_PARTIAL_WRITE
#define SSL_MODE_ENABLE_PARTIAL_WRITE
Definition: ssl.h:762
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
ssl_st::max_send_fragment
uint16_t max_send_fragment
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3717
ssl_open_record_error
@ ssl_open_record_error
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:938
desc
#define desc
Definition: bloaty/third_party/protobuf/src/google/protobuf/extension_set.h:338
ssl_st::method
const bssl::SSL_PROTOCOL_METHOD * method
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:3706
ssl_shutdown_close_notify
@ ssl_shutdown_close_notify
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:2605
ssl_write_buffer_flush
int ssl_write_buffer_flush(SSL *ssl)
Definition: ssl_buffer.cc:293
mem.h
ssl_do_info_callback
void ssl_do_info_callback(const SSL *ssl, int type, int value)
Definition: ssl_lib.cc:316
ssl_quic_method_st::send_alert
int(* send_alert)(SSL *ssl, enum ssl_encryption_level_t level, uint8_t alert)
Definition: ssl.h:3356
client.level
level
Definition: examples/python/async_streaming/client.py:118
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
SSL_in_early_data
#define SSL_in_early_data
Definition: boringssl_prefix_symbols.h:399
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
BIO_flush
#define BIO_flush
Definition: boringssl_prefix_symbols.h:786
SSL_R_TOO_MUCH_READ_EARLY_DATA
#define SSL_R_TOO_MUCH_READ_EARLY_DATA
Definition: ssl.h:5567
tls_flush_pending_hs_data
bool tls_flush_pending_hs_data(SSL *ssl)
Definition: s3_both.cc:244
SSL3_RT_APPLICATION_DATA
#define SSL3_RT_APPLICATION_DATA
Definition: ssl3.h:274
ssl_send_alert
void ssl_send_alert(SSL *ssl, int level, int desc)
Definition: s3_pkt.cc:379
do_tls_write
static BSSL_NAMESPACE_BEGIN int do_tls_write(SSL *ssl, int type, const uint8_t *in, unsigned len)
Definition: s3_pkt.cc:218
tls_append_handshake_data
bool tls_append_handshake_data(SSL *ssl, Span< const uint8_t > data)
Definition: s3_both.cc:552
SSLBuffer
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:1213
SSL_R_NO_RENEGOTIATION
#define SSL_R_NO_RENEGOTIATION
Definition: ssl.h:5449
SSL_R_PROTOCOL_IS_SHUTDOWN
#define SSL_R_PROTOCOL_IS_SHUTDOWN
Definition: ssl.h:5461


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:09