diff options
Diffstat (limited to 'src/pkg/crypto/tls/handshake_client.go')
-rw-r--r-- | src/pkg/crypto/tls/handshake_client.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/crypto/tls/handshake_client.go b/src/pkg/crypto/tls/handshake_client.go index db9bb8cb3..1c6bd4b81 100644 --- a/src/pkg/crypto/tls/handshake_client.go +++ b/src/pkg/crypto/tls/handshake_client.go @@ -46,7 +46,7 @@ func (h *clientHandshake) loop(writeChan chan<- interface{}, controlChan chan<- hello.random[1] = byte(currentTime >> 16); hello.random[2] = byte(currentTime >> 8); hello.random[3] = byte(currentTime); - _, err := io.ReadFull(config.Rand, hello.random[4:len(hello.random)]); + _, err := io.ReadFull(config.Rand, hello.random[4:]); if err != nil { h.error(alertInternalError); return; @@ -132,7 +132,7 @@ func (h *clientHandshake) loop(writeChan chan<- interface{}, controlChan chan<- // version offered in the ClientHello. preMasterSecret[0] = defaultMajor; preMasterSecret[1] = defaultMinor; - _, err = io.ReadFull(config.Rand, preMasterSecret[2:len(preMasterSecret)]); + _, err = io.ReadFull(config.Rand, preMasterSecret[2:]); if err != nil { h.error(alertInternalError); return; |