summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-04-03Fixed computing nonce again, by properly shifting packet number.Sergey Kandaurov1-4/+4
2020-04-03Fixed missing propagation of need_ack flag from frames to packet.Vladimir Homutov1-0/+4
2020-04-02Fixed excessive push timer firing.Vladimir Homutov1-4/+0
The timer is set when an output frame is generated; there is no need to arm it after it was fired.
2020-04-02Fixed computing nonce by xoring all packet number bytes.Sergey Kandaurov1-9/+14
Previously, the stub worked only with pnl=0.
2020-04-01Output buffering.Vladimir Homutov1-3/+39
Currently, the output is called periodically, each 200 ms to invoke ngx_quic_output() that will push all pending frames into packets. TODO: implement flags a-là Nagle & co (NO_DELAY/NO_PUSH...)
2020-04-01Implemented retransmission and retransmit queue.Vladimir Homutov3-74/+356
All frames collected to packet are moved into a per-namespace send queue. QUIC connection has a timer which fires on the closest max_ack_delay time. The frame is deleted from the queue when a corresponding packet is acknowledged. The NGX_QUIC_MAX_RETRANSMISSION is a timeout that defines maximum length of retransmission of a frame.
2020-04-01Introduced packet namespace in QUIC connection.Vladimir Homutov4-18/+37
The structure contains all data that is related to the namespace: packet number and output queue (next patch).
2020-04-01Refactored QUIC secrets storage.Vladimir Homutov3-85/+87
The quic->keys[4] array now contains secrets related to the corresponding encryption level. All protection-level functions get proper keys and do not need to switch manually between levels.
2020-04-01Added missing debug description.Vladimir Homutov1-0/+1
2020-04-01TLS Early Data support.Sergey Kandaurov1-12/+98
2020-04-01TLS Early Data key derivation support.Sergey Kandaurov3-1/+11
2020-04-01Sending HANDSHAKE_DONE just once with BoringSSL.Sergey Kandaurov1-1/+1
If early data is accepted, SSL_do_handshake() completes as soon as ClientHello is processed. SSL_in_init() will report the handshake is still in progress.
2020-04-01QUIC packet padding to fulfil header protection sample demands.Sergey Kandaurov1-0/+5
2020-04-01Improved SSL_do_handshake() error handling in QUIC.Sergey Kandaurov1-1/+7
It can either return a recoverable SSL_ERROR_WANT_READ or fatal errors.
2020-04-01Style.Sergey Kandaurov2-5/+4
2020-03-31Removed unused field from ngx_quic_header_t.Vladimir Homutov1-1/+0
2020-03-28HTTP/3: http3 variable.Sergey Kandaurov1-0/+24
2020-03-28HTTP/3: static table cleanup.Sergey Kandaurov1-7/+8
2020-03-27Parsing HTTP/3 request body.Roman Arutyunyan8-10/+167
2020-03-27Fixed handling QUIC stream eof.Roman Arutyunyan1-2/+7
Set r->pending_eof flag for a new QUIC stream with the fin bit. Also, keep r->ready set when r->pending_eof is set and buffer is empty.
2020-03-27Push QUIC stream frames in send() and cleanup handler.Roman Arutyunyan1-0/+4
2020-03-27Chunked response body in HTTP/3.Roman Arutyunyan3-18/+76
2020-03-27Fixed buffer overflow.Roman Arutyunyan1-1/+1
2020-03-27Unbreak sending CONNECTION_CLOSE from the send_alert callback.Sergey Kandaurov1-4/+0
2020-03-26Merged ngx_quic_send_packet() into ngx_quic_send_frames().Vladimir Homutov1-45/+22
This allows to avoid extra allocation and use two static buffers instead. Adjusted maximum paket size calculation: need to account a tag.
2020-03-26Got rid of memory allocation in decryption.Vladimir Homutov4-29/+34
Static buffers are used instead in functions where decryption takes place. The pkt->plaintext points to the beginning of a static buffer. The pkt->payload.data points to decrypted data actual start.
2020-03-26Logging cleanup.Vladimir Homutov1-18/+13
pool->log is replaced with pkt->log or explicit argument passing where possible.
2020-03-25QUIC frames reuse.Roman Arutyunyan2-25/+95
2020-03-26Removed memory allocations from encryption code.Vladimir Homutov5-118/+101
+ ngx_quic_encrypt(): - no longer accepts pool as argument - pkt is 1st arg - payload is passed as pkt->payload - performs encryption to the specified static buffer + ngx_quic_create_long/short_packet() functions: - single buffer for everything, allocated by caller - buffer layout is: [ ad | payload | TAG ] the result is in the beginning of buffer with proper length - nonce is calculated on stack - log is passed explicitly, pkt is 1st arg - no more allocations inside + ngx_quic_create_long_header(): - args changed: no need to pass str_t + added ngx_quic_create_short_header()
2020-03-25Fixed QUIC stream insert and find.Roman Arutyunyan1-24/+10
2020-03-25Simplifed handling HTTP/3 streams.Roman Arutyunyan2-178/+86
2020-03-25Safe QUIC stream creation.Roman Arutyunyan2-56/+54
2020-03-24When closing a QUIC connection, wait for all streams to finish.Roman Arutyunyan2-10/+97
Additionally, streams are now removed from the tree in cleanup handler.
2020-03-24Removed ngx_quic_stream_node_t.Roman Arutyunyan3-97/+59
Now ngx_quic_stream_t is directly inserted into the tree.
2020-03-24Implemented eof in QUIC streams.Roman Arutyunyan1-3/+19
2020-03-25Fixed log initialization.Vladimir Homutov1-2/+1
Should be done after memzero.
2020-03-24Advertise our max_idle_timeout in transport parameters.Sergey Kandaurov1-0/+6
So we can easily tune how soon client would decide to close a connection.
2020-03-24QUIC streams don't need filter_need_in_memory after 7f0981be07c4.Sergey Kandaurov1-1/+0
Now they inherit c->ssl always enabled from the main connection, which makes r->main_filter_need_in_memory set for them.
2020-03-24Logging cleanup.Vladimir Homutov2-61/+71
+ Client-related errors (i.e. parsing) are done at INFO level + c->log->action is updated through the process of receiving, parsing. handling packet/payload and generating frames/output.
2020-03-24Added QUIC version check for sending HANDSHAKE_DONE frame.Vladimir Homutov1-1/+6
2020-03-24Implemented sending HANDSHAKE_DONE frame after handshake.Vladimir Homutov3-6/+43
This makes it possible to switch to draft 27 by default.
2020-03-23Fixed client certificate verification.Sergey Kandaurov3-0/+7
For ngx_http_process_request() part to work, this required to set both r->http_connection->ssl and c->ssl on a QUIC stream. To avoid damaging global SSL object, ngx_ssl_shutdown() is managed to ignore QUIC streams.
2020-03-23Respect QUIC max_idle_timeout.Roman Arutyunyan4-14/+27
2020-03-23Allow ngx_queue_frame() to insert frame in the front.Roman Arutyunyan1-10/+5
Previously a frame could only be inserted after the first element of the list.
2020-03-23Support for HTTP/3 ALPN.Roman Arutyunyan4-11/+22
This is required by Chrome.
2020-03-23Put zero in 'First ACK Range' when acknowledging one packet.Roman Arutyunyan1-2/+2
This fixes Chrome CONNECTION_ID_LIMIT_ERROR with the reason: "Underflow with first ack block length 2 largest acked is 1".
2020-03-23Avoid using QUIC connection after CONNECTION_CLOSE.Roman Arutyunyan1-4/+3
2020-03-23Better flow control and buffering for QUIC streams.Roman Arutyunyan2-9/+114
2020-03-23Limit output QUIC packets with client max_packet_size.Roman Arutyunyan4-15/+37
Additionally, receive larger packets than 512 bytes.
2020-03-23Fixed received ACK fields order in debug logging.Sergey Kandaurov1-3/+3