annotate src/event/quic/ngx_event_quic_socket.h @ 9157:daf8f5ba23d8

QUIC: removed use of SSL_quic_read_level and SSL_quic_write_level. As explained in BoringSSL change[1], levels were introduced in the original QUIC API to draw a line between when keys are released and when are active. In the new QUIC API they are released in separate calls when it's needed. BoringSSL has then a consideration to remove levels API, hence the change. If not available e.g. from a QUIC packet header, levels can be taken based on keys availability. The only real use of levels is to prevent using app keys before they are active in QuicTLS that provides the old BoringSSL QUIC API, it is replaced with an equivalent check of c->ssl->handshaked. This change also removes OpenSSL compat shims since they are no longer used. The only exception left is caching write level from the keylog callback in the internal field which is a handy equivalent of checking keys availability. [1] https://boringssl.googlesource.com/boringssl/+/1e859054
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 01 Sep 2023 20:31:46 +0400
parents c389200e10a2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8763
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
1
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
2 /*
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
3 * Copyright (C) Nginx, Inc.
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
4 */
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
5
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
6
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
7 #ifndef _NGX_EVENT_QUIC_SOCKET_H_INCLUDED_
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
8 #define _NGX_EVENT_QUIC_SOCKET_H_INCLUDED_
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
9
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
10
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
11 #include <ngx_config.h>
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
12 #include <ngx_core.h>
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
13
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
14
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
15 ngx_int_t ngx_quic_open_sockets(ngx_connection_t *c,
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
16 ngx_quic_connection_t *qc, ngx_quic_header_t *pkt);
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
17 void ngx_quic_close_sockets(ngx_connection_t *c);
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
18
8955
32daba3aabb2 QUIC: got rid of ngx_quic_create_temp_socket().
Vladimir Homutov <vl@nginx.com>
parents: 8911
diff changeset
19 ngx_quic_socket_t *ngx_quic_create_socket(ngx_connection_t *c,
8763
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
20 ngx_quic_connection_t *qc);
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
21 ngx_int_t ngx_quic_listen(ngx_connection_t *c, ngx_quic_connection_t *qc,
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
22 ngx_quic_socket_t *qsock);
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
23 void ngx_quic_close_socket(ngx_connection_t *c, ngx_quic_socket_t *qsock);
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
24
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
25 ngx_quic_socket_t *ngx_quic_find_socket(ngx_connection_t *c, uint64_t seqnum);
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
26
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
27
4117aa7fa38e QUIC: connection migration.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
28 #endif /* _NGX_EVENT_QUIC_SOCKET_H_INCLUDED_ */