Commit Graph

470 Commits

Author SHA1 Message Date
Marten Seemann
d067fe4156 bump Go version in go.mod, stop testing on Go 1.21 (#4633)
* bump Go version in go.mod, stop testing on Go 1.21

* ci: update golangci-lint to v1.60.1

* ignore Go 1.23 0-RTT events in exhaustive linter
2024-08-17 00:30:03 -07:00
Marten Seemann
f5ceb73171 handshake: generate CRYPTO_ERRORs for internal_error TLS alerts (#4601)
* handshake: generate CRYPTO_ERRORs for internal_error TLS alerts

* remove stray comment
2024-08-03 17:04:03 -07:00
Marten Seemann
87f2894af5 handshake: remove gomock tls.ClientSessionCache implementation (#4619) 2024-08-03 16:43:30 -07:00
Marten Seemann
82b275212c handshake: remove unneeded tokenProtector interface (#4585) 2024-07-19 21:45:20 -07:00
Marten Seemann
7825250d3f ci: use Go 1.23rc2 for unit and integration tests (#4571)
* ci: use Go 1.23rc1 for unit and integration tests

* handshake: avoid using linkname to access crypto/tls.cipherSuiteTLS13ByID

* ci: use use Go 1.23rc2
2024-07-18 10:20:54 -07:00
Marten Seemann
7379f1fd5e handshake: ignore unknown QUIC events from crypto/tls (#4577) 2024-06-28 06:24:50 -07:00
Marten Seemann
459a6f3df9 fix the server's 0-RTT rejection logic when using GetConfigForClient (#4550) 2024-06-03 03:42:58 -07:00
Marten Seemann
dea2eafd1d remove unused function parameter from qtls.SetupConfigForServer (#4549) 2024-06-03 00:12:12 -07:00
Marten Seemann
0d1e27d77c introduce Transport.ConnContext, use client's context on the connection (#4507)
* introduce Transport.ConnContext, use client's context on the connection

* panic if ConnContext returns nil
2024-05-26 21:30:19 -07:00
Marten Seemann
4f4da0423f ci: disable exhaustive linter for test files (#4499) 2024-05-06 21:36:22 -07:00
Marten Seemann
1514095afb wire: use quicvarint.Parse to when parsing transport parameters (#4482)
* wire: add a benchmark for parsing of transport parameters

* wire: use quicvarint.Parse to when parsing transport parameters
2024-05-05 04:26:51 -07:00
Marten Seemann
71f5ae5ecb handshake: optimize AEAD handling for long header sealers and openers (#4323) 2024-03-03 04:33:10 -08:00
Marten Seemann
f856163f1e handshake: embed the mask as an array into the aesHeaderProtector (#4324) 2024-03-03 04:32:32 -08:00
Marten Seemann
02e4506c3b handshake: add benchmarks for the Initial AEAD (#4320) 2024-02-08 23:56:46 -08:00
Marten Seemann
c22a3c8e6f handshake: validate HKDF-Expand-Label against crypto/tls implementation (#4311)
* handshake: validate HKDF-Expand-Label against crypto/tls implementation

* handshake: add a benchmark for HKDF-Expand-Label
2024-02-04 21:27:21 -08:00
Marten Seemann
fbaa941ea1 protocol: rename VersionNumber to Version (#4295) 2024-01-31 21:57:33 -08:00
putyWang
bda5b7e6dc handshake: fix documentation for updatableAEAD.SetWriteKey (#4256) 2024-01-22 19:30:50 -08:00
Marten Seemann
4407c60f04 handshake: unexport Set{Read,Write}Key methods on the cryptoSetup (#4254)
No functional change expected.
These methods were exported since they were passed to the old qtls API.
2024-01-19 20:44:09 -08:00
Marten Seemann
1083d1fb8f handshake: remove unneeded mutex in cryptoSetup (#4227) 2024-01-01 23:52:08 -08:00
Marten Seemann
d6e3f3229f qtls: remove unneeded type alias for the tls.QUICEncryptionLevel (#4220)
* qtls: remove unneeded type alias for the tls.QUICEncryptionLevel

* handshake: make cryptoSetup.WriteRecord private
2023-12-28 18:59:56 -08:00
Marten Seemann
22411e16d5 utils: switch to standard library min and max functions (#4218)
These functions were added in Go 1.21.
2023-12-27 21:19:13 -08:00
Marten Seemann
d795250479 drop support for Go 1.20, build on Go 1.22rc1 on CI (#4195)
* drop support for Go 1.20

* ci: udpate CircleCI to Go 1.21

* qtls: remove unnecessary type aliases

* ci: build using Go 1.22rc1
2023-12-27 20:31:58 -08:00
Marten Seemann
d234d62d52 qtls: only attempt 0-RTT resumption for 0-RTT enabled session tickets (#4183) 2023-12-09 06:17:47 -08:00
Marten Seemann
ef800d6f71 handshake: set MinVersion on the Config returned by GetConfigForClient (#4134) 2023-10-26 22:35:07 -07:00
Marten Seemann
d309060cde handshake: clone the tls.Config returned by GetConfigForClient (#4133)
We modify this tls.Config, so we should clone it first. Otherwise, this could
cause conflicts with how the application is using that config.
2023-10-26 22:22:20 -07:00
Marten Seemann
746290b78a never allow 0-RTT when using Dial, even if the session ticket allows it (#4125)
When resuming a TLS session using Dial (and not DialEarly), 0-RTT should
be disabled at the TLS layer, even if the session ticket allows for
0-RTT resumption.

This bug is not critical, since Dial doesn't return an EarlyConnection,
so the client wouldn't be able to actually send 0-RTT data in practice.
2023-10-25 08:20:23 -07:00
Marten Seemann
1affe38703 move MaxTokenAge configuration option to the Transport (#4084) 2023-09-16 05:10:20 -07:00
Marten Seemann
9b82196578 make the logging.Tracer and logging.ConnectionTracer a struct (#4082) 2023-09-16 04:58:51 -07:00
Marten Seemann
862e64c7b9 add a Transport config option for the key used to encrypt tokens (#4066)
* add a Transport config option for the key used to encrypt tokens

* handshake: remove unused error return values
2023-09-15 18:33:57 +07:00
Ameagari
d1f6ea997c save the RTT in non-0-RTT session tickets (#4042)
* also send session ticket when 0-RTT is disabled for go1.21

* allow session ticket without transport parameters

* do not include transport parameters for non-0RTT session ticket

* remove the test assertion because it is not supported for go1.20

* Update internal/handshake/session_ticket.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* add a 0-RTT argument to unmarshaling session tickets

* bump sessionTicketRevision to 4

* check if non-0-RTT session ticket has expected length

* change parameter order

* add test checks

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-09-11 08:05:31 -07:00
Marten Seemann
2797f85fc0 switch from unmaintained golang/mock to go.uber.org/mock (#4050) 2023-08-28 02:23:55 -07:00
Ameagari
6880f88089 save the max_datagram_frame_size transport parameter in the session ticket (#4013)
* Add MaxDatagramFrameSize parameter in session ticket

* fix gofumpt issues

* Update integrationtests/self/zero_rtt_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* fix: correct comparsion of max_datagram_frame_size

* test: use constant MaxDatagramFrameSize for session ticket test

* fix grammar

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-08-18 19:16:16 -07:00
Marten Seemann
501cc21c4b expose crypto/tls errors on the TransportError (#4015) 2023-08-18 03:01:49 -07:00
Marten Seemann
bda01bc489 handshake: use the correct hash function for TLS_AES_256_GCM_SHA384 (#4031) 2023-08-15 20:09:01 -07:00
Marten Seemann
1d848392bc ignore QUICConn.SendSessionTicket error if session tickets are disabled (#4030) 2023-08-15 19:53:41 -07:00
elagergren-spideroak
571d3adef4 fix compatibility with API breaking change in Go 1.21 (#4020)
* add Go 1.21 compatibility

Signed-off-by: Eric Lagergren <elagergren@spideroak-inc.com>

* refactor for Go 1.20

Signed-off-by: Eric Lagergren <elagergren@spideroak-inc.com>

---------

Signed-off-by: Eric Lagergren <elagergren@spideroak-inc.com>
2023-08-09 05:22:30 -07:00
Marten Seemann
95ab7bdc9a add tls.ClientHelloInfo.Conn for recursive GetConfigForClient calls (#4016) 2023-08-05 13:00:11 -07:00
Marten Seemann
18d3846d4f set a net.Conn for tls.ClientHelloInfo.Conn used by GetCertificate (#4014) 2023-08-03 20:33:19 -04:00
Marten Seemann
f3a0ce1599 set a net.Conn with the correct addresses on the tls.ClientHelloInfo (#4001) 2023-07-31 13:32:10 -07:00
Marten Seemann
469a6153b6 use a synchronous API for the crypto setup (#3939) 2023-07-21 10:00:42 -07:00
Marten Seemann
0662afba63 stop using math/rand.Seed and Read in tests, bump go.mod version to 1.20 (#3936) 2023-07-01 11:29:41 -07:00
Marten Seemann
3d89e545d3 use the new crypto/tls QUIC Transport (#3860) 2023-07-01 11:15:00 -07:00
Marten Seemann
21388c86bb drop support for draft-29 (#3903) 2023-06-21 04:06:44 -07:00
Marten Seemann
7a0ef5f867 make Config.Allow0RTT a bool, not a callback 2023-05-02 15:56:49 +02:00
Marten Seemann
c9a2f79b1c simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
Marten Seemann
379e7ec848 Merge pull request #3745 from quic-go/aggressive-key-updates
initiate the first key update after sending / receiving 100 packets
2023-04-19 16:28:33 +02:00
Marten Seemann
1f57d4e789 protocol: remove VersionTLS, used during the gQUIC -> TLS 1.3 transition (#3764) 2023-04-19 07:24:34 -07:00
Marten Seemann
b03585160f handshake: initiate the first key update after 100 packets 2023-03-31 18:20:49 +09:00
Marten Seemann
1ebd359b20 handshake: remove unnecessary member variable from updatableAEAD 2023-03-28 22:50:21 +09:00
Marten Seemann
af6c19617c handshake: add benchmark tests for packet sealing, opening and rolling keys 2023-03-28 22:46:57 +09:00