mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
crypto/tls: better error messages.
LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/60580046
This commit is contained in:
parent
5e711b473c
commit
6b29f7bfbe
6 changed files with 90 additions and 49 deletions
|
|
@ -9,6 +9,7 @@ import (
|
|||
"crypto"
|
||||
"crypto/rand"
|
||||
"crypto/x509"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/big"
|
||||
"strings"
|
||||
|
|
@ -540,3 +541,7 @@ func initDefaultCipherSuites() {
|
|||
varDefaultCipherSuites[i] = suite.id
|
||||
}
|
||||
}
|
||||
|
||||
func unexpectedMessageError(wanted, got interface{}) error {
|
||||
return fmt.Errorf("tls: received unexpected handshake message of type %T when waiting for %T", got, wanted)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue