mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-03 20:17:36 +03:00
crypto/tls,regexp: remove always-nil error results
These were harmless, but added unnecessary verbosity to the code. This can happen as a result of refactors: for example, the method sessionState used to return errors in some cases. Change-Id: I4e6dacc01ae6a49b528c672979f95cbb86795a85 Reviewed-on: https://go-review.googlesource.com/c/go/+/528995 Reviewed-by: Leo Isla <islaleo93@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Olivier Mengué <olivier.mengue@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: qiulaidongfeng <2645477756@qq.com> Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
This commit is contained in:
parent
0cb1694084
commit
8d53a491d1
5 changed files with 9 additions and 21 deletions
|
@ -810,10 +810,7 @@ func (hs *serverHandshakeState) sendSessionTicket() error {
|
|||
c := hs.c
|
||||
m := new(newSessionTicketMsg)
|
||||
|
||||
state, err := c.sessionState()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
state := c.sessionState()
|
||||
state.secret = hs.masterSecret
|
||||
if hs.sessionState != nil {
|
||||
// If this is re-wrapping an old key, then keep
|
||||
|
@ -821,6 +818,7 @@ func (hs *serverHandshakeState) sendSessionTicket() error {
|
|||
state.createdAt = hs.sessionState.createdAt
|
||||
}
|
||||
if c.config.WrapSession != nil {
|
||||
var err error
|
||||
m.ticket, err = c.config.WrapSession(c.connectionStateLocked(), state)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue