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

x/crypto/ocsp: Response.ProducedAt field not honored in CreateResponse func #52976

Open
benburkert opened this issue May 18, 2022 · 3 comments
Open
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@benburkert
Copy link
Contributor

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

$ go version
go version go1.18.2 darwin/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
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/benburkert/Library/Caches/go-build"
GOENV="/Users/benburkert/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/benburkert/pkg/mod"
GONOPROXY="github.com/benburkert/*"
GONOSUMDB="github.com/benburkert/*"
GOOS="darwin"
GOPATH="/Users/benburkert"
GOPRIVATE="github.com/benburkert/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.18.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.18.2/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/3q/b_j95bxn6_n4z99hyl_8r41r0000gn/T/go-build384942112=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.18.2 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.18.2
uname -v: Darwin Kernel Version 20.6.0: Tue Feb 22 21:10:41 PST 2022; root:xnu-7195.141.26~1/RELEASE_X86_64
ProductName:	macOS
ProductVersion:	11.6.5
BuildVersion:	20G527
lldb --version: lldb-1300.0.42.3
Swift version 5.5.2-dev

What did you do?

https://go.dev/play/p/lP9QCQ6Pg1a

What did you expect to see?

exit 0

What did you see instead?

2009/11/10 23:00:00 resp.ProducedAt: got 2009-11-10 23:00:00 +0000 UTC, want 2009-11-10 22:50:00 +0000 UTC

@gopherbot gopherbot added this to the Unreleased milestone May 18, 2022
@benburkert
Copy link
Contributor Author

The ProducedAt value is currently hard coded to time.Now().Truncate(time.Minute).UTC(), using the value of template.ProducedAt when it is non-zero would allow the value to be set deterministically.

@gopherbot
Copy link

Change https://go.dev/cl/406995 mentions this issue: ocsp: use produced at timestamp of template when creating a response

@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 18, 2022
@mknyszek
Copy link
Contributor

CC @golang/security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants