Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/asn1: ASN1 UTC Time support should accept Time in "YYMMDDhhmm[ss](+|-)hhmm" format #15732

Closed
sthorne opened this issue May 18, 2016 · 2 comments
Milestone

Comments

@sthorne
Copy link

@sthorne sthorne commented May 18, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version go1.6.2 darwin/amd64
  2. What operating system and processor architecture are you using (go env)?
    GOARCH="amd64"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="darwin"
    GOOS="darwin"
    GOPATH="/Users/sthorne/go"
    GORACE=""
    GOROOT="/usr/local/go"
    GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
    GO15VENDOREXPERIMENT="1"
    CC="clang"
    GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
    CXX="clang++"
    CGO_ENABLED="1"
  3. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.

encoding/asn1 does not support both known ASN1 UtcTime formats as described here: http://www.obj-sys.com/asn1tutorial/node15.html.

asn1.parseUTCTime

Currently, only "YYMMDDhhmm[ss]Z" is supported.

  1. What did you expect to see?
    Support for "YYMMDDhhmm[ss]Z" or "YYMMDDhhmmsshhmm"
  2. What did you see instead?
    When using a server with the second format this is the error.

Error : Get https://ovirt.example.com/: tls: failed to parse certificate from server: asn1: time did not serialize back to the original value and may be invalid: given "141020123326+0000", but serialized as "141020123326Z"response Status:

@ianlancetaylor ianlancetaylor changed the title ASN1 UTC Time support should accept Time in "YYMMDDhhmm[ss](+|-)hhmm" format encoding/asn1: ASN1 UTC Time support should accept Time in "YYMMDDhhmm[ss](+|-)hhmm" format May 18, 2016
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 18, 2016

CC @agl

@ianlancetaylor ianlancetaylor added this to the Go1.8Maybe milestone May 18, 2016
@agl
Copy link
Contributor

@agl agl commented May 18, 2016

UTCTime values MUST be expressed in Greenwich Mean Time (Zulu) and MUST include seconds (i.e., times are YYMMDDHHMMSSZ)

(From RFC 5280.)

If the certificate is issued by a public CA please include it and I'll complain to the CA.

@agl agl closed this May 18, 2016
@golang golang locked and limited conversation to collaborators May 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.