Commit Graph

143 Commits

Author SHA1 Message Date
Mark Spanbroek a5f5e39cae Implement new connection id callback using randomConnectionId() 2020-10-12 16:18:10 +02:00
Mark Spanbroek 0f5e788a9c Use ConnectionId instead of ngtcp2_cid for generating random id 2020-10-12 16:18:10 +02:00
Mark Spanbroek ca8ad04af0 Remove ngtcp2_path from public API 2020-10-12 16:18:10 +02:00
Mark Spanbroek aa544f7369 Fix: ensure that setting socketaddress family works on macOS
On macOS sa_family is uint8.
2020-10-12 16:18:10 +02:00
Mark Spanbroek a69e5a16a8 Update to newer version of nim-ngtcp2
It no longer has the SocketAddress object, but uses the objects
from nativesockets instead.
2020-10-12 16:18:10 +02:00
Mark Spanbroek 5209a18476 Remove ngtcp_pkt_info from public API
Replaced by type ExplicitCongestionNotification (ECN).
2020-10-12 16:18:10 +02:00
Mark Spanbroek ee2e02f7be Promote Connection from test helper to public API 2020-10-12 16:18:10 +02:00
Mark Spanbroek 366c00c900 Cleanup: create random ids inside of the setup procs 2020-10-08 14:31:15 +02:00
Mark Spanbroek ed2662eb0c Cleanup: add path to Connection object 2020-10-08 14:31:15 +02:00
Mark Spanbroek 57d113999b Cleanup: simplify test 2020-10-08 14:31:15 +02:00
Mark Spanbroek 9ca3fa3e8d Cleanup: introduce Connection.isHandshakeCompleted 2020-10-08 14:31:15 +02:00
Mark Spanbroek 2ed74d0709 Cleanup: introduce Connection object to ensure cleanup 2020-10-08 14:31:15 +02:00
Mark Spanbroek 5bc4c8442a Cleanup: extract datagram reading and writing procs 2020-10-08 14:31:15 +02:00
Mark Spanbroek 3e79774af1 Cleanup: rename packet -> datagram
This is more in line with QUIC terminology,
where a UDP datagram can contain multiple QUIC packets.
2020-10-08 14:31:15 +02:00
Mark Spanbroek c0f843a6b5 Cleanup: extraction of ids from datagram moves to separate proc 2020-10-08 14:31:15 +02:00
Mark Spanbroek fc50ef8e13 Cleanup: extract proc that handles incoming crypto data 2020-10-08 14:31:15 +02:00
Mark Spanbroek f450408d1c Cleanup: remove workaround for random destination id
Communicate (random) original destination id through transport
parameters instead of using a global variable.
2020-10-08 14:31:15 +02:00
Mark Spanbroek 1ab050ee72 Cleanup: setup parameters are passed by value 2020-10-08 14:31:15 +02:00
Mark Spanbroek 81cfe64137 Communicate transport parameters via encrypted payload 2020-10-08 14:31:15 +02:00
Mark Spanbroek 20d3b009dc Cleanup: simplify 2020-10-08 14:31:15 +02:00
Mark Spanbroek b5601fe076 Cleanup: remove fake AEAD overhead for encryption 2020-10-08 14:31:15 +02:00
Mark Spanbroek 4fccf3a9d0 Cleanup: remove unnecessary callbacks 2020-10-08 14:31:15 +02:00
Mark Spanbroek 27f33188fa Cleanup: extract procs to install keys for 0-RTT, handshake and 1-RTT 2020-10-08 14:31:15 +02:00
Mark Spanbroek f0f136c271 Cleanup: remove unnecessary retry logic 2020-10-08 14:31:15 +02:00
Mark Spanbroek 35d1220777 Cleanup: install 1-RTT keys for client at the right moment 2020-10-08 14:31:15 +02:00
Mark Spanbroek c01fd25764 Cleanup: remove unnecessary callbacks from server 2020-10-08 14:31:15 +02:00
Mark Spanbroek 9db83e629a Cleanup: install 1-RTT keys for server at the right moment 2020-10-08 14:31:15 +02:00
Mark Spanbroek 8c135eae81 Cleanup: install initial key for server at the right moment 2020-10-08 14:31:15 +02:00
Mark Spanbroek 4bdd74d9b6 Cleanup: remove unneccessary early key 2020-10-08 14:31:15 +02:00
Mark Spanbroek f4a116a25b Cleanup: install handshake keys for server at the right moment 2020-10-08 14:31:15 +02:00
Mark Spanbroek 8e1a5ede7c Cleanup: install handshake keys for client at the right moment 2020-10-08 14:31:15 +02:00
Mark Spanbroek a3cc283abf Cleanup: Install initial key for client at the right moment 2020-10-08 14:31:15 +02:00
Mark Spanbroek 85631ba47c Cleanup: remove debug output from callbacks 2020-10-08 14:31:15 +02:00
Mark Spanbroek 840eb7d8ff Cleanup: use Key type in server setup 2020-10-08 14:31:15 +02:00
Mark Spanbroek fae113f9b4 Cleanup: simplify 2020-10-08 14:31:15 +02:00
Mark Spanbroek fba55457c8 Cleanup: remove unnecessary path setup 2020-10-08 14:31:15 +02:00
Mark Spanbroek c6e329dcee Cleanup: consolidate various types into type "Key" 2020-10-08 14:31:15 +02:00
Mark Spanbroek 542d5acd79 Cleanup: remove unnecessary settings 2020-10-08 14:31:15 +02:00
Mark Spanbroek 0fe6bbe665 Complete handshake 2020-10-08 14:31:15 +02:00
Mark Spanbroek ceebcbd690 Provide larger buffer (for CRYPTO frames) 2020-10-08 14:31:15 +02:00
Mark Spanbroek 0aae5aaa4d Set client handshake keys 2020-10-08 14:31:15 +02:00
Mark Spanbroek c8b333d72b Install rx and tx keys at the appropriate moment 2020-10-08 14:31:15 +02:00
Mark Spanbroek 32ace45629 Ensure that various fake key material uses separate memory locations 2020-10-08 14:31:15 +02:00
Mark Spanbroek af58d18401 Fake transport settings being exchanged via TLS 2020-10-08 14:31:15 +02:00
Mark Spanbroek 7ea33ce19d Move client and server settings into separate file 2020-10-08 14:31:15 +02:00
Mark Spanbroek 89eb18d3b4 Use our own code to parse and echo the first packet from ngtcp2 2020-10-08 14:31:15 +02:00
Mark Spanbroek fbd8fde818 Fix indentation 2020-10-08 14:31:15 +02:00
Mark Spanbroek 1b5f5c8a25 check initial packet 2020-10-08 14:31:15 +02:00
Mark Spanbroek 0296d4a1c7 Set different IP addresses and ports for client and server 2020-10-08 14:31:15 +02:00
Mark Spanbroek d7c5628131 Signal handshake complete 2020-10-08 14:31:15 +02:00