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: timeParsing functions impose static formats #29069

Open
ChrisPortman opened this Issue Dec 3, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@ChrisPortman
Copy link

ChrisPortman commented Dec 3, 2018

What version of Go are you using (go version)?

$ go version
go version go1.11.2 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/chris/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/chris/Optus/Git/gorims"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build723180761=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Attempt to unmarshal generalized time received from a 3rd party system that used a format other than the one hard coded in the parseGeneralizedTime([]byte) (time.Time, error) function.

What did you expect to see?

A way to nominate the time format to be used

What did you see instead?

That the time format is hardcoded as a const within the time parsing funcs.

@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Dec 3, 2018

Change https://golang.org/cl/152117 mentions this issue: encoding/asn1: allow the user to specify the time format used to unmarshal

@bradfitz bradfitz added this to the Unplanned milestone Dec 3, 2018

ChrisPortman added a commit to ChrisPortman/go that referenced this issue Dec 3, 2018

@robpike robpike added the Proposal label Dec 4, 2018

@robpike

This comment has been minimized.

Copy link
Contributor

robpike commented Dec 4, 2018

Wrong CL listed above; it should be https://go-review.googlesource.com/c/go/+/152117/

Meanwhile, there are questions about this idea, including whether it should happen at all. I have added the Proposal label to trigger a discussion about the role of this package vs. the crypto on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.