]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/tls: use time(), not Time().
authorAdam Langley <agl@golang.org>
Mon, 25 Apr 2011 14:27:36 +0000 (10:27 -0400)
committerAdam Langley <agl@golang.org>
Mon, 25 Apr 2011 14:27:36 +0000 (10:27 -0400)
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

src/pkg/crypto/tls/handshake_client.go

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