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

proposal: encoding/asn1: timeParsing functions impose static formats #29069

Open
ChrisPortman opened this issue Dec 3, 2018 · 2 comments
Open
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Milestone

Comments

@ChrisPortman
Copy link

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
Copy link
Contributor

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 NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. Proposal-Crypto Proposal related to crypto packages or other security issues labels Dec 3, 2018
@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
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.

@rsc rsc changed the title encoding/asn1: timeParsing functions impose static formats proposal: encoding/asn1: timeParsing functions impose static formats Jun 22, 2022
@gopherbot gopherbot removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jun 22, 2022
@rsc rsc moved this to Incoming in Proposals Aug 10, 2022
@rsc rsc added this to Proposals Aug 10, 2022
@julieqiu julieqiu removed this from Go Security Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Projects
Status: Incoming
Development

Successfully merging a pull request may close this issue.

4 participants