Commit Graph

273 Commits

Author SHA1 Message Date
Ludovic Orban 29b2f8fa8a add a way to build a connection id object from a cid array
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban e1ceffe25a make onClose overridable and null-safe
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 4908b0676a do not close when QuicConnection gets an exception as it is shared by multiple quic connections
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 56d5a6a101 fix checkstyle
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban ecfffe5f66 make quic token minting and validation pluggable
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 44606d94be rename connectors
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 0ab056238b force selector count to 1
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 2e5ff2ddc3 remove unneeded parameter
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban a2cb2a69e6 make server use common classes
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 8315ba5815 make client use common classes
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 7d303b14c8 better align client and server quic sessions
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban a1b4eafc73 better align client and server quic connections
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban e8376a1a21 cleanup
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 669ae8ff1b move datagram endpoint to common module
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban ca4562ca8e cleanup SelectorManager accept FSM
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 3c1f1d3fe0 rename client datagram connector
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban c562262768 cleanup SelectorManager connect FSM
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 16cbcc0e4f HttpDestination can now be told to use cleartext even when the scheme is secure
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban c19988af28 create stream 0 when client connection is set up
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 6b3ad74ae6 fix NPE during dispose
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban c8e66daefe kinda sorta done the piping work up to Session.process()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban c8d7bf01e1 better align client and server impls
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 2fcaad0cd8 add big file download test
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban e6cd0bae64 start quic client plumbing
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 17d28ea0c4 fix lifecycle on unrecoverable network error
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 6267089b4f replace InetSocketAddress decoding/encoding with side-stack argument passing
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban ee900b1a8d replace InetSocketAddress decoding/encoding with side-stack argument passing
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 62eed58afb improve pkcs12 -> pem convertor
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 6ae2fcde13 code alignment
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban eec497e0a9 move the execution strategy from connection to session
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 6b07965b9a minor refactoring
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban bfed7a5dfb add comment
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 6d0f7b6077 change test logs to INFO
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 22cf07dea8 improvements about how tasks are dispatched
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 90fbd977d7 add protection against using a freed quiche connection
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 69b7fe2887 force loading libquiche early
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 5a5ffd65e8 fix buffers clearing and releasing on looping
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 14c6143cdb fix a couple connection closing bugs
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 432eddf583 dispatch session readable events to EWYK
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 55657e3ea1 fix default value of _currentInterestOps
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 36e72019c9 improve flush() logging and impl
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 4b20324418 remove unneeded fillable flag
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 23c476cef6 fill can actually return -1
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban fc25540331 align ServerDatagramEndPoint with SocketChannelEndPoint
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban aaf0239911 handle filling and writing with proper NIO
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban a8a26706ab add debug log
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 36c0f79a94 factor out address decoding and encoding
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 44eb359d57 fix and document cipher buffers handling + add debug logs
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban e35b480afd fix closing of session
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 25ee5e35ac handle quiche connections timeouts
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban f0725d09d0 make QuicStreamEndPoint extend from AbstractEndPoint and handle finished streams
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban d12550f88a fix buffer too short exception
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Simone Bordet 81e3546b14 Pair programming session with Ludovic.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-12-20 09:33:38 +01:00
Ludovic Orban 60b660cf04 fix buffer fill/flush modes
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban c2d8688feb run request handling + flush cipher text to socket
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban dfcb673425 stop concatenating debug strings
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban f3c96690db code alignment
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 9065d52ccd unneeded class
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 03fd0d5fef slight fill interest cleanup
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 9d0b7f71ac add licenses + fix checkstyle + modularize
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 53dd781744 addition of stream endpoints
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban e370f5e0ba misc cleanups and improvements
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban add0c8b605 fill now expects a fillable buffer + resets the buffer's position when nothing is read
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban ed49749897 negotiate now keeps the output buffer in flushable mode
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban e347074975 now capable of accepting a quic connection
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 1f588d719d add quiche native lib
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban bd2ed99550 refactorings
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban e1cd6956f4 encode address into buffers
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 340eb46b43 cleanups
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban ae330cb05f capable of serving one small http request over udp
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 24dbb4c084 fill kinda works
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 45e45e6cf2 kinda sorta working datagram connector
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban ccfe4ec90f no-op datagram connector
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00