Skip to content

Commit 0cc5856

Browse files
committed
go1.21: document crypto/tls additions
For #60105 For #44886 Change-Id: I8f6cfc4490535979ee8c0d8381c03b03c9c7b9a0 Reviewed-on: https://go-review.googlesource.com/c/go/+/501303 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]> Run-TryBot: Damien Neil <[email protected]>
1 parent bff4b0e commit 0cc5856

File tree

1 file changed

+45
-32
lines changed

1 file changed

+45
-32
lines changed

doc/go1.21.html

+45-32
Original file line numberDiff line numberDiff line change
@@ -536,44 +536,57 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
536536

537537
<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
538538
<dd>
539-
<p><!-- https://go.dev/issue/46308 -->
540-
TODO: <a href="https://go.dev/issue/46308">https://go.dev/issue/46308</a>: add VersionName function to return a string version of the TLS Version
541-
</p>
542-
543-
<p><!-- https://go.dev/issue/60107 -->
544-
TODO: <a href="https://go.dev/issue/60107">https://go.dev/issue/60107</a>: QUIC 0-RTT APIs
545-
</p>
546-
547-
<p><!-- CL 493655 -->
548-
TODO: <a href="https://go.dev/cl/493655">https://go.dev/cl/493655</a>: crypto/tls: support QUIC as a transport; modified api/next/44886.txt
549-
</p>
550-
551-
<p><!-- CL 496818 -->
552-
TODO: <a href="https://go.dev/cl/496818">https://go.dev/cl/496818</a>: crypto/tls: add SessionState and use it on the server side; modified api/next/60105.txt
553-
</p>
554-
555-
<p><!-- CL 496820 -->
556-
TODO: <a href="https://go.dev/cl/496820">https://go.dev/cl/496820</a>: crypto/tls: add ClientSessionState.ResumptionState and NewResumptionState; modified api/next/60105.txt
557-
</p>
558-
559-
<p><!-- CL 496821 -->
560-
TODO: <a href="https://go.dev/cl/496821">https://go.dev/cl/496821</a>: crypto/tls: add WrapSession and UnwrapSession; modified api/next/60105.txt
561-
</p>
562-
563-
<p><!-- CL 496822 -->
564-
TODO: <a href="https://go.dev/cl/496822">https://go.dev/cl/496822</a>: crypto/tls: add SessionState.Extra; modified api/next/60105.txt
539+
<p><!-- https://go.dev/issue/60105 -->
540+
Applications can now control the content of session tickets.
541+
<ul>
542+
<li>
543+
The new <a href="/pkg/crypto/tls/#SessionState"><code>SessionState</code></a> type
544+
describes a resumable session.
545+
</li>
546+
<li>
547+
The <a href="/pkg/crypto/tls/#SessionState.Bytes"><code>SessionState.Bytes</code></a>
548+
method and <a href="/pkg/crypto/tls/#ParseSessionState"><code>ParseSessionState</code></a>
549+
function serialize and deserialize a <code>SessionState</code>.
550+
</li>
551+
<li>
552+
The <a href="/pkg/crypto/tls/#Config.WrapSession"><code>Config.WrapSession</code></a> and
553+
<a href="/pkg/crypto/tls/#Config.UnwrapSession"><code>Config.UnwrapSession</code></a>
554+
hooks convert a <code>SessionState</code> to and from a ticket.
555+
</li>
556+
<li>
557+
The <a href="/pkg/crypto/tls/#Config.EncryptTicket"><code>Config.EncryptTicket</code></a>
558+
and <a href="/pkg/crypto/tls/#Config.DecryptTicket"><code>Config.DecryptTicket</code></a>
559+
methods provide a default implementation of <code>WrapSession</code> and
560+
<code>UnwrapSession</code>.
561+
</li>
562+
<li>
563+
The <a href="/pkg/crypto/tls/#ClientSessionState.ResumptionState"><code>ClientSessionState.ResumptionState</code></a> method and
564+
<a href="/pkg/crypto/tls/#NewResumptionState"><code>NewResumptionState</code></a> function
565+
may be used by a <code>ClientSessionCache</code> implementation to store and
566+
resume sessions.
567+
</li>
568+
</ul>
565569
</p>
566570

567-
<p><!-- CL 496995 -->
568-
TODO: <a href="https://go.dev/cl/496995">https://go.dev/cl/496995</a>: crypto/tls: add QUIC 0-RTT APIs; modified api/next/44886.txt, api/next/60107.txt
571+
<p><!-- CL 497376 -->
572+
The package now supports the extended master secret extension (RFC 7627),
573+
and enables it by default. Additionally, the deprecation of
574+
<a href="/pkg/crypto/tls/#ConnectionState.TLSUnique"><code>ConnectionState.TLSUnique</code></a>
575+
has been reverted, and it is populated when a connection which uses
576+
extended master secret is resumed. Session tickets produced by
577+
Go pre-1.21 are not interoperable with Go 1.21, meaning connections
578+
resumed across versions will fall back to full handshakes.
569579
</p>
570580

571-
<p><!-- CL 497376 -->
572-
TODO: <a href="https://go.dev/cl/497376">https://go.dev/cl/497376</a>: crypto/tls: implement Extended Master Secret; modified api/except.txt
581+
<p><!-- https://go.dev/issue/44886, https://go.dev/issue/60107 -->
582+
The new <a href="/pkg/crypto/tls/#QUICConn"><code>QUICConn</code></a> type
583+
provides support for QUIC implementations. Note that this is not itself
584+
a QUIC implementation.
573585
</p>
574586

575-
<p><!-- CL 497377 -->
576-
TODO: <a href="https://go.dev/cl/497377">https://go.dev/cl/497377</a>: crypto/tls: add VersionName; modified api/next/46308.txt
587+
<p><!-- https://go.dev/issue/46308 -->
588+
The new <a href="/pkg/crypto/tls/#VersionName"></code>VersionName</code></a> function
589+
returns the name for a TLS version number.
577590
</p>
578591
</dd>
579592
</dl><!-- crypto/tls -->

0 commit comments

Comments
 (0)