mirror of
https://github.com/golang/go
synced 2024-11-21 20:14:52 -07:00
crypto/tls: commit fixes which I hadn't saved.
R=rsc CC=golang-dev https://golang.org/cl/3685041
This commit is contained in:
parent
976e45726c
commit
1a072f4b37
@ -16,7 +16,9 @@ import (
|
||||
// function. All cipher suites currently assume RSA key agreement.
|
||||
type cipherSuite struct {
|
||||
// the lengths, in bytes, of the key material needed for each component.
|
||||
keyLen, macLen, ivLen int
|
||||
keyLen int
|
||||
macLen int
|
||||
ivLen int
|
||||
cipher func(key, iv []byte, isRead bool) interface{}
|
||||
mac func(macKey []byte) hash.Hash
|
||||
}
|
||||
@ -47,7 +49,7 @@ func hmacSHA1(key []byte) hash.Hash {
|
||||
// ciphersuites and the id requested by the peer.
|
||||
func mutualCipherSuite(have []uint16, want uint16) (suite *cipherSuite, id uint16) {
|
||||
for _, id := range have {
|
||||
if want == id {
|
||||
if id == want {
|
||||
return cipherSuites[id], id
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ func (c *Config) rootCAs() *CASet {
|
||||
|
||||
func (c *Config) cipherSuites() []uint16 {
|
||||
s := c.CipherSuites
|
||||
if len(s) == 0 {
|
||||
if s == nil {
|
||||
s = defaultCipherSuites()
|
||||
}
|
||||
return s
|
||||
|
Loading…
Reference in New Issue
Block a user