1
0
mirror of https://github.com/golang/go synced 2024-11-25 09:57:57 -07:00

crypto/tls: use time(), not Time().

The unexported version returns a sensible default when the user hasn't
set a value. The exported version crashes in that case.

R=bradfitzgo, rsc1
CC=golang-dev
https://golang.org/cl/4435070
This commit is contained in:
Adam Langley 2011-04-25 10:27:36 -04:00
parent b6cb4f9bf4
commit a9a6c90104

View File

@ -102,7 +102,7 @@ func (c *Conn) clientHandshake() os.Error {
if c.config.RootCAs != nil { if c.config.RootCAs != nil {
opts := x509.VerifyOptions{ opts := x509.VerifyOptions{
Roots: c.config.RootCAs, Roots: c.config.RootCAs,
CurrentTime: c.config.Time(), CurrentTime: c.config.time(),
DNSName: c.config.ServerName, DNSName: c.config.ServerName,
Intermediates: x509.NewCertPool(), Intermediates: x509.NewCertPool(),
} }