summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-04-07Fixed build with OpenSSL using old callbacks API.Sergey Kandaurov1-1/+1
2020-04-06ACK ranges processing.Vladimir Homutov3-29/+134
+ since number of ranges in unknown, provide a function to parse them once again in handler to avoid memory allocation + ack handler now processes all ranges, not only the first + ECN counters are parsed and saved into frame if present
2020-04-06Ignore non-yet-implemented frames.Vladimir Homutov1-13/+15
Such frames are grouped together in a switch and just ignored, instead of closing the connection This may improve test coverage. All such frames require acknowledgment.
2020-04-04Added check for SSL_get_current_cipher() results.Vladimir Homutov1-2/+8
The function may return NULL and result need to be checked before use.
2020-04-06Added a bit more debugging in STREAM frame parser.Vladimir Homutov1-1/+2
2020-04-04Do not set timers after the connection is closed.Vladimir Homutov1-2/+6
The qc->closing flag is set when a connection close is initiated for the first time. No timers will be set if the flag is active. TODO: this is a temporary solution to avoid running timer handlers after connection (and it's pool) was destroyed. It looks like currently we have no clear policy of connection closing in regard to timers.
2020-04-06Discarding Handshake packets if no Handshake keys yet.Sergey Kandaurov1-2/+8
Found with a previously received Initial packet with ACK only, which instantiates a new connection but do not produce the handshake keys. This can be triggered by a fairly well behaving client, if the server stands behind a load balancer that stripped Initial packets exchange. Found by F5 test suite.
2020-04-06Rejecting new connections with non-zero Initial packet.Sergey Kandaurov1-0/+6
2020-04-06TLS Key Update in QUIC.Sergey Kandaurov4-11/+156
Old keys retention is yet to be implemented.
2020-04-04Removed excessive debugging in QUIC packet creation.Sergey Kandaurov1-12/+6
While here, eliminated further difference in between.
2020-04-04Logging of packet numbers in QUIC packet creation.Sergey Kandaurov1-0/+8
2020-04-03Removed unneccesary milliseconds conversion.Vladimir Homutov1-1/+1
2020-04-03Proper handling of packet number in header.Vladimir Homutov4-14/+96
- fixed setting of largest received packet number. - sending properly truncated packet number - added support for multi-byte packet number
2020-04-03Advertizing MAX_STREAMS (0x12) credit in advance.Sergey Kandaurov1-1/+52
This makes sending large number of bidirectional stream work within ngtcp2, which doesn't bother sending optional STREAMS_BLOCKED when exhausted. This also introduces tracking currently opened and maximum allowed streams.
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.