FAQ
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com),

I'd like you to review this change to
https://go.googlecode.com/hg/


Description:
crypto/x509: always write validity times in UTC.

RFC 5280 section 4.1.2.5.1 says so.

Please review this at http://codereview.appspot.com/6775068/

Affected files:
M src/pkg/crypto/x509/x509.go


Index: src/pkg/crypto/x509/x509.go
===================================================================
--- a/src/pkg/crypto/x509/x509.go
+++ b/src/pkg/crypto/x509/x509.go
@@ -1224,7 +1224,7 @@
SerialNumber: template.SerialNumber,
SignatureAlgorithm: signatureAlgorithm,
Issuer: asn1.RawValue{FullBytes: asn1Issuer},
- Validity: validity{template.NotBefore, template.NotAfter},
+ Validity: validity{template.NotBefore.UTC(),
template.NotAfter.UTC()},
Subject: asn1.RawValue{FullBytes: asn1Subject},
PublicKey: publicKeyInfo{nil, publicKeyAlgorithm,
encodedPublicKey},
Extensions: extensions,
@@ -1314,8 +1314,8 @@
Algorithm: oidSignatureSHA1WithRSA,
},
Issuer: c.Subject.ToRDNSequence(),
- ThisUpdate: now,
- NextUpdate: expiry,
+ ThisUpdate: now.UTC(),
+ NextUpdate: expiry.UTC(),
RevokedCertificates: revokedCerts,
}

Search Discussions

  • Brad Fitzpatrick at Oct 29, 2012 at 2:48 pm
    LGTM
    On Mon, Oct 29, 2012 at 3:17 PM, wrote:

    Reviewers: golang-dev_googlegroups.com,

    Message:
    Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com),

    I'd like you to review this change to
    https://go.googlecode.com/hg/


    Description:
    crypto/x509: always write validity times in UTC.

    RFC 5280 section 4.1.2.5.1 says so.

    Please review this at http://codereview.appspot.com/**6775068/<http://codereview.appspot.com/6775068/>

    Affected files:
    M src/pkg/crypto/x509/x509.go


    Index: src/pkg/crypto/x509/x509.go
    ==============================**==============================**=======
    --- a/src/pkg/crypto/x509/x509.go
    +++ b/src/pkg/crypto/x509/x509.go
    @@ -1224,7 +1224,7 @@
    SerialNumber: template.SerialNumber,
    SignatureAlgorithm: signatureAlgorithm,
    Issuer: asn1.RawValue{FullBytes: asn1Issuer},
    - Validity: validity{template.NotBefore,
    template.NotAfter},
    + Validity: validity{template.NotBefore.**UTC(),
    template.NotAfter.UTC()},
    Subject: asn1.RawValue{FullBytes: asn1Subject},
    PublicKey: publicKeyInfo{nil, publicKeyAlgorithm,
    encodedPublicKey},
    Extensions: extensions,
    @@ -1314,8 +1314,8 @@
    Algorithm: oidSignatureSHA1WithRSA,
    },
    Issuer: c.Subject.ToRDNSequence(),
    - ThisUpdate: now,
    - NextUpdate: expiry,
    + ThisUpdate: now.UTC(),
    + NextUpdate: expiry.UTC(),
    RevokedCertificates: revokedCerts,
    }


  • Agl at Oct 29, 2012 at 3:17 pm
    *** Submitted as
    http://code.google.com/p/go/source/detail?r=4fa98cce4290 ***

    crypto/x509: always write validity times in UTC.

    RFC 5280 section 4.1.2.5.1 says so.

    R=golang-dev, bradfitz
    CC=golang-dev
    http://codereview.appspot.com/6775068


    http://codereview.appspot.com/6775068/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 29, '12 at 2:17p
activeOct 29, '12 at 3:17p
posts3
users2
websitegolang.org

2 users in discussion

Agl: 2 posts Brad Fitzpatrick: 1 post

People

Translate

site design / logo © 2022 Grokbase