@@ -440,66 +440,60 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
440440< dl id ="crypto/hmac "> < dt > < a href ="/pkg/crypto/hmac/ "> crypto/hmac</ a > </ dt >
441441 < dd >
442442 < p > <!-- CL 261960 -->
443- < a href ="/pkg/crypto/hmac/#New "> New</ a > will now panic if separate calls to
444- the hash generation function fail to return new values. Previously, the
445- behavior was undefined and invalid outputs were sometimes generated.
443+ < a href ="/pkg/crypto/hmac/#New "> < code > New</ code > </ a > will now panic if
444+ separate calls to the hash generation function fail to return new values.
445+ Previously, the behavior was undefined and invalid outputs were sometimes
446+ generated.
446447 </ p >
447448 </ dd >
448449</ dl > <!-- crypto/hmac -->
449450
450451< dl id ="crypto/tls "> < dt > < a href ="/pkg/crypto/tls/ "> crypto/tls</ a > </ dt >
451452 < dd >
452453 < p > <!-- CL 256897 -->
453- I/O operations on closing or closed TLS connections can now be detected using
454- the new < a href ="/pkg/net/#ErrClosed "> ErrClosed</ a > error. A typical use
455- would be < code > errors.Is(err, net.ErrClosed)</ code > . In earlier releases
456- the only way to reliably detect this case was to match the string returned
457- by the < code > Error</ code > method with < code > "tls: use of closed connection"</ code > .
454+ I/O operations on closing or closed TLS connections can now be detected
455+ using the new < a href ="/pkg/net/#ErrClosed "> < code > net.ErrClosed</ code > </ a >
456+ error. A typical use would be < code > errors.Is(err, net.ErrClosed)</ code > .
458457 </ p >
459458
460459 < p > <!-- CL 266037 -->
461- A default deadline is set in < a href ="/pkg/crypto/tls/#Conn.Close "> Close</ a >
462- before sending the close notify alert, in order to prevent blocking
460+ A default write deadline is now set in
461+ < a href ="/pkg/crypto/tls/#Conn.Close "> < code > Conn.Close</ code > </ a >
462+ before sending the "close notify" alert, in order to prevent blocking
463463 indefinitely.
464464 </ p >
465465
466466 < p > <!-- CL 246338 -->
467- < a href ="/pkg/crypto/tls#Conn.HandshakeContext "> (*Conn).HandshakeContext</ a > was added to
468- allow the user to control cancellation of an in-progress TLS Handshake.
469- The context provided is propagated into the
470- < a href ="/pkg/crypto/tls#ClientHelloInfo "> ClientHelloInfo</ a >
471- and < a href ="/pkg/crypto/tls#CertificateRequestInfo "> CertificateRequestInfo</ a >
472- structs and accessible through the new
473- < a href ="/pkg/crypto/tls#ClientHelloInfo.Context "> (*ClientHelloInfo).Context</ a >
474- and
475- < a href ="/pkg/crypto/tls#CertificateRequestInfo.Context ">
476- (*CertificateRequestInfo).Context
477- </ a > methods respectively. Canceling the context after the handshake has finished
478- has no effect.
467+ The new < a href ="/pkg/crypto/tls#Conn.HandshakeContext "> < code > Conn.HandshakeContext</ code > </ a >
468+ method allows cancellation of an in-progress handshake. The provided
469+ context is accessible through the new
470+ < a href ="/pkg/crypto/tls#ClientHelloInfo.Context "> < code > ClientHelloInfo.Context</ code > </ a >
471+ and < a href ="/pkg/crypto/tls#CertificateRequestInfo.Context ">
472+ < code > CertificateRequestInfo.Context</ code > </ a > methods. Canceling the
473+ context after the handshake has finished has no effect.
479474 </ p >
480475
481476 < p > <!-- CL 239748 -->
482- Clients now ensure that the server selects
477+ Clients now return a handshake error if the server selects
483478 < a href ="/pkg/crypto/tls/#ConnectionState.NegotiatedProtocol ">
484- an ALPN protocol</ a > from
479+ an ALPN protocol</ a > that was not in
485480 < a href ="/pkg/crypto/tls/#Config.NextProtos ">
486481 the list advertised by the client</ a > .
487482 </ p >
488483
489484 < p > <!-- CL 262857 -->
490- TLS servers will now prefer other AEAD cipher suites (such as ChaCha20Poly1305)
485+ Servers will now prefer other available AEAD cipher suites (such as ChaCha20Poly1305)
491486 over AES-GCM cipher suites if either the client or server doesn't have AES hardware
492- support, unless the application set both
493- < a href =" /pkg/crypto/tls/#Config.PreferServerCipherSuites " > < code > Config.PreferServerCipherSuites</ code > </ a >
487+ support, unless both < a href =" /pkg/crypto/tls/#Config.PreferServerCipherSuites " >
488+ < code > Config.PreferServerCipherSuites</ code > </ a >
494489 and < a href ="/pkg/crypto/tls/#Config.CipherSuites "> < code > Config.CipherSuites</ code > </ a >
495- or there are no other AEAD cipher suites supported.
496- The client is assumed not to have AES hardware support if it does not signal a
497- preference for AES-GCM cipher suites.
490+ are set. The client is assumed not to have AES hardware support if it does
491+ not signal a preference for AES-GCM cipher suites.
498492 </ p >
499493
500494 < p > <!-- CL 246637 -->
501- < a href ="/pkg/crypto/tls/#Config.Clone "> < code > Config.Clone</ code > </ a > now returns
502- a nil < code > *Config </ code > if the source is nil, rather than panicking.
495+ < a href ="/pkg/crypto/tls/#Config.Clone "> < code > Config.Clone</ code > </ a > now
496+ returns nil if the receiver is nil, rather than panicking.
503497 </ p >
504498 </ dd >
505499</ dl > <!-- crypto/tls -->
@@ -514,25 +508,26 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
514508 </ p >
515509
516510 < p > <!-- CL 235078 -->
517- < a href ="/pkg/crypto/x509/#ParseCertificate "> ParseCertificate</ a > and
518- < a href ="/pkg/crypto/x509/#CreateCertificate "> CreateCertificate</ a > both
519- now enforce string encoding restrictions for the fields < code > DNSNames</ code > ,
520- < code > EmailAddresses</ code > , and < code > URIs</ code > . These fields can only
521- contain strings with characters within the ASCII range.
511+ < a href ="/pkg/crypto/x509/#ParseCertificate "> < code > ParseCertificate</ code > </ a > and
512+ < a href ="/pkg/crypto/x509/#CreateCertificate "> < code > CreateCertificate</ code > </ a >
513+ now enforce string encoding restrictions for the < code > DNSNames</ code > ,
514+ < code > EmailAddresses</ code > , and < code > URIs</ code > fields . These fields
515+ can only contain strings with characters within the ASCII range.
522516 </ p >
523517
524518 < p > <!-- CL 259697 -->
525- < a href ="/pkg/crypto/x509/#CreateCertificate "> CreateCertificate</ a > now
526- verifies the generated certificate's signature using the signer's
527- public key. If the signature is invalid, an error is returned, instead
528- of a malformed certificate.
519+ < a href ="/pkg/crypto/x509/#CreateCertificate "> < code > CreateCertificate</ code > </ a >
520+ now verifies the generated certificate's signature using the signer's
521+ public key. If the signature is invalid, an error is returned, instead of
522+ a malformed certificate.
529523 </ p >
530524
531525 < p > <!-- CL 233163 -->
532526 A number of additional fields have been added to the
533- < a href ="/pkg/crypto/x509/#CertificateRequest "> CertificateRequest</ a > type.
534- These fields are now parsed in < a href ="/pkg/crypto/x509/#ParseCertificateRequest "> ParseCertificateRequest</ a >
535- and marshalled in < a href ="/pkg/crypto/x509/#CreateCertificateRequest "> CreateCertificateRequest</ a > .
527+ < a href ="/pkg/crypto/x509/#CertificateRequest "> < code > CertificateRequest</ code > </ a > type.
528+ These fields are now parsed in < a href ="/pkg/crypto/x509/#ParseCertificateRequest ">
529+ < code > ParseCertificateRequest</ code > </ a > and marshalled in
530+ < a href ="/pkg/crypto/x509/#CreateCertificateRequest "> < code > CreateCertificateRequest</ code > </ a > .
536531 </ p >
537532
538533 < p > <!-- CL 257939 -->
@@ -548,19 +543,21 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
548543 </ p >
549544
550545 < p > <!-- CL 262343 -->
551- TODO: < a href ="https://golang.org/cl/262343 "> https://golang.org/cl/262343</ a > : add Unwrap to SystemRootsError
546+ The new < a href ="/pkg/crypto/x509/#SystemRootsError.Unwrap "> < code > SystemRootsError.Unwrap</ code > </ a >
547+ method allows accessing the < a href ="/pkg/crypto/x509/#SystemRootsError.Err "> < code > Err</ code > </ a >
548+ field through the < a href ="/pkg/errors "> < code > errors</ code > </ a > package functions.
552549 </ p >
553550 </ dd >
554551</ dl > <!-- crypto/x509 -->
555552
556553< dl id ="encoding/asn1 "> < dt > < a href ="/pkg/encoding/asn1 "> encoding/asn1</ a > </ dt >
557554 < dd >
558555 < p > <!-- CL 255881 -->
559- < a href ="/pkg/encoding/asn1/#Unmarshal "> Unmarshal</ a > and
560- < a href ="/pkg/encoding/asn1/#UnmarshalWithParams "> UnmarshalWithParams</ a >
561- now return an error instead of panic when the argument is not
556+ < a href ="/pkg/encoding/asn1/#Unmarshal "> < code > Unmarshal</ code > </ a > and
557+ < a href ="/pkg/encoding/asn1/#UnmarshalWithParams "> < code > UnmarshalWithParams</ code > </ a >
558+ now return an error instead of panicking when the argument is not
562559 a pointer or is nil. This change matches the behavior of other
563- encoding packages such as < a href ="/pkg/encoding/json "> encoding/json</ a > .
560+ encoding packages such as < a href ="/pkg/encoding/json "> < code > encoding/json</ code > </ a > .
564561 </ p >
565562 </ dd >
566563</ dl >
@@ -693,15 +690,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
693690 </ p >
694691
695692 < p > <!-- CL 256498, golang.org/issue/36990 -->
696- Cookies set with < code > SameSiteDefaultMode</ code > now behave according to the current
697- spec (no attribute is set) instead of generating a SameSite key without a value.
693+ Cookies set with < a href ="/pkg/net/http/#SameSiteDefaultMode "> < code > SameSiteDefaultMode</ code > </ a >
694+ now behave according to the current spec (no attribute is set) instead of
695+ generating a SameSite key without a value.
698696 </ p >
699697
700698 < p > <!-- CL 246338 -->
701- The < a href ="/pkg/net/http/ "> < code > net/http</ code > </ a > package now uses the new
702- < a href ="/pkg/crypto/tls#Conn.HandshakeContext "> < code > (*tls.Conn).HandshakeContext </ code > </ a >
703- with the < a href ="/pkg/net/http/#Request "> < code > Request </ code > </ a > context
704- when performing TLS handshakes in the client or server .
699+ The < a href ="/pkg/net/http/ "> < code > net/http</ code > </ a > package now passes the
700+ < a href ="/pkg/net/http/#Request.Context "> < code > Request </ code > context </ a > to
701+ < a href ="/pkg/crypto/tls#Conn.HandshakeContext "> < code > tls.Conn.HandshakeContext </ code > </ a >
702+ when performing TLS handshakes.
705703 </ p >
706704
707705 < p > <!-- CL 250039 -->
0 commit comments