Skip to content

encoding/asn1: valid GeneralizedTime not parsed #15842

@ggeorgiev

Description

@ggeorgiev

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/.../golang"
    GORACE=""
    GOROOT="/usr/local/go"
    GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
    GO15VENDOREXPERIMENT="1"
    CC="/usr/local/bin/gcc-5"
    GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fno-common"
    CXX="/usr/local/bin/c++-5"
    CGO_ENABLED="1"
  3. What did you do?
    I Unmarshall 3rdparty asn1 data
  4. What did you expect to see?
    It to be unmarshalled successfully it is correct.
  5. What did you see instead?
    asn1: time did not serialize back to the original value and may be invalid: given "20160525195606.36Z", but serialized as "20160525195606Z"

Note that the data is 3rdparty, I have no control over it. I see that golang asn1 disclames limited support. I am curious what are my options to workaround the issue - is it just a fork of the original library or there are other ways to hook my own parser for the GeneralizedTime?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions