summaryrefslogtreecommitdiffstats
path: root/libgo/go/crypto/tls/common.go
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-13 19:16:27 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-13 19:16:27 +0000
commit43eb1b72e5730064410a2d81e3f8d78ab62776cb (patch)
treec5132538d5da85ed816c7e1f9d93c4a503b838ab /libgo/go/crypto/tls/common.go
parente27d80f7754f29f038c29ddcb2decd894d3e4aa4 (diff)
downloadppe42-gcc-43eb1b72e5730064410a2d81e3f8d78ab62776cb.tar.gz
ppe42-gcc-43eb1b72e5730064410a2d81e3f8d78ab62776cb.zip
libgo: Update to weekly.2011-12-02.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/crypto/tls/common.go')
-rw-r--r--libgo/go/crypto/tls/common.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/libgo/go/crypto/tls/common.go b/libgo/go/crypto/tls/common.go
index ea520859b82..f57d932a98f 100644
--- a/libgo/go/crypto/tls/common.go
+++ b/libgo/go/crypto/tls/common.go
@@ -121,7 +121,7 @@ type Config struct {
// Time returns the current time as the number of seconds since the epoch.
// If Time is nil, TLS uses the system time.Seconds.
- Time func() int64
+ Time func() time.Time
// Certificates contains one or more certificate chains
// to present to the other side of the connection.
@@ -175,10 +175,10 @@ func (c *Config) rand() io.Reader {
return r
}
-func (c *Config) time() int64 {
+func (c *Config) time() time.Time {
t := c.Time
if t == nil {
- t = time.Seconds
+ t = time.Now
}
return t()
}
@@ -315,9 +315,7 @@ var (
func initDefaultCipherSuites() {
varDefaultCipherSuites = make([]uint16, len(cipherSuites))
- i := 0
- for id := range cipherSuites {
- varDefaultCipherSuites[i] = id
- i++
+ for i, suite := range cipherSuites {
+ varDefaultCipherSuites[i] = suite.id
}
}
OpenPOWER on IntegriCloud