golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.61k stars 17.61k forks source link

crypto/tls: cleanup handshake state #39406

Open FiloSottile opened 4 years ago

FiloSottile commented 4 years ago

We should refactor where and when the hs and Conn state is accessed and modified during the handshake. For example checkForResumption should probably be side-effect free.

SparrowLii commented 4 years ago

I checked the checkForResumption() function and found that SessinState and hs.suite will be rewritten even if the function return false.

gopherbot commented 4 years ago

Change https://golang.org/cl/245160 mentions this issue: crypto/tls: make checkForResumption side-effect free

gopherbot commented 4 years ago

Change https://golang.org/cl/246038 mentions this issue: crypto/tls: simplify the process of cipher suites checking.

gopherbot commented 4 years ago

Change https://golang.org/cl/245837 mentions this issue: crypto/tls: supprtedVersions:return rightly for nil pointer parameter and plainer

gopherbot commented 4 years ago

Change https://golang.org/cl/246263 mentions this issue: crypto/tls: delete one useless judge statement.

odeke-em commented 3 years ago

@FiloSottile, a couple of CLs were mailed during Go1.16 -- thanks @SparrowLii. However, we didn't land any of them during Go1.16, and thus I shall punt this issue to Go1.17. Please feel free to change priorities though as you please. Also kindly cc-ing @katiehockman @rolandshoemaker.

ianlancetaylor commented 3 years ago

Is this still going to be done during 1.17? Thanks.

mknyszek commented 3 years ago

Since there was no response, I'm kicking this to the backlog to clean up the milestone. Please let me know if that's wrong. Thanks!