~themue/juju-core/006-state-retry-delay

« back to all changes in this revision

Viewing changes to cert/cert.go

  • Committer: Roger Peppe
  • Date: 2012-11-28 17:14:38 UTC
  • mfrom: (755.1.4 174-fix-cert-times)
  • Revision ID: roger.peppe@canonical.com-20121128171438-2p1rbd9daa6d6ugc
cert: fix expiry for non-UTC time zones

A bug in the Go x509 package (fixed in tip)
means that non-UTC time zones don't round-trip
correctly.

R=fwereade
CC=
https://codereview.appspot.com/6858090

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
                        Organization: []string{"juju"},
92
92
                },
93
93
                NotBefore:             now.UTC().Add(-5 * time.Minute),
94
 
                NotAfter:              expiry,
 
94
                NotAfter:              expiry.UTC(),
95
95
                SubjectKeyId:          bigIntHash(key.N),
96
96
                KeyUsage:              x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
97
97
                BasicConstraintsValid: true,
148
148
                        Organization: []string{"juju"},
149
149
                },
150
150
                NotBefore: now.UTC().Add(-5 * time.Minute),
151
 
                NotAfter:  expiry,
 
151
                NotAfter:  expiry.UTC(),
152
152
 
153
153
                SubjectKeyId: bigIntHash(key.N),
154
154
                KeyUsage:     x509.KeyUsageDataEncipherment,