yuhan6665
46ce351564
crypto/tls: improved 0-RTT QUIC API
...
Add synchronous management of stored sessions to QUICConn.
This adds QUICStoreSession and QUICResumeSession events,
permitting a QUIC implementation to handle session resumption
as part of its regular event loop processing.
Fixes #63691
Change-Id: I9fe16207cc1986eac084869675bc36e227cbf3f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/536935
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Marten Seemann <martenseemann@gmail.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2024-09-09 11:32:16 -04:00
yuhan6665
933c289fd1
crypto: add available godoc link
...
Change-Id: Ifc669399dde7d6229c6ccdbe29611ed1f8698fb1
Reviewed-on: https://go-review.googlesource.com/c/go/+/534778
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: shuang cui <imcusg@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2023-11-12 12:08:30 -05:00
yuhan6665
f2a3b26319
crypto/tls: QUIC: fix panics when processing post-handshake messages
...
The check for fragmentary post-handshake messages in QUICConn.HandleData
was reversed, resulting in a potential panic when HandleData receives
a partial message.
In addition, HandleData wasn't checking the size of buffered
post-handshake messages. Produce an error when a post-handshake
message is larger than maxHandshake.
TestQUICConnectionState was using an onHandleCryptoData hook
in runTestQUICConnection that was never being called.
(I think it was inadvertently removed at some point while
the CL was in review.) Fix this test while making the hook
more general.
Fixes #62266
Change-Id: I210b70634e50beb456ab3977eb11272b8724c241
Reviewed-on: https://go-review.googlesource.com/c/go/+/522595
Run-TryBot: Damien Neil <dneil@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Marten Seemann <martenseemann@gmail.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
2023-11-12 12:08:30 -05:00
yuhan6665
6fd44f977d
crypto/tls: change SendSessionTicket to take an options struct
...
To allow for future evolution of the API, make
QUICConn.SendSessionTicket take a QUICSessionTicketOptions
rather than a single bool.
For #60107
Change-Id: I798fd0feec5c7581e3c3574e2de99611c81df47f
Reviewed-on: https://go-review.googlesource.com/c/go/+/514997
Reviewed-by: Roland Shoemaker <roland@golang.org >
Run-TryBot: Damien Neil <dneil@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Marten Seemann <martenseemann@gmail.com >
2023-11-12 12:08:30 -05:00
yuhan6665
aa68126eeb
crypto/tls: add QUIC 0-RTT APIs
...
Fixes #60107
Change-Id: I158b1c2d80d8ebb5ed7a8e6f313f69060754e220
Reviewed-on: https://go-review.googlesource.com/c/go/+/496995
Reviewed-by: Damien Neil <dneil@google.com >
Reviewed-by: Roland Shoemaker <roland@golang.org >
Run-TryBot: Filippo Valsorda <filippo@golang.org >
Auto-Submit: Filippo Valsorda <filippo@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-11-12 12:08:30 -05:00
yuhan6665
8bde0136fd
crypto/tls: support QUIC as a transport
...
Add a QUICConn type for use by QUIC implementations.
A QUICConn provides unencrypted handshake bytes and connection
secrets to the QUIC layer, and receives handshake bytes.
For #44886
Change-Id: I859dda4cc6d466a1df2fb863a69d3a2a069110d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/493655
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Run-TryBot: Damien Neil <dneil@google.com >
Reviewed-by: Matthew Dempsky <mdempsky@google.com >
Reviewed-by: Marten Seemann <martenseemann@gmail.com >
2023-11-12 12:08:30 -05:00