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: x509: invalid certificate policies #53773

Closed
akshaykanawat opened this issue Jul 10, 2022 · 2 comments
Closed

x/crypto: x509: invalid certificate policies #53773

akshaykanawat opened this issue Jul 10, 2022 · 2 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@akshaykanawat
Copy link

akshaykanawat commented Jul 10, 2022

certBlock, _ := pem.Decode([]byte(publicKey))
certificate, err = x509.ParseCertificate(certBlock.Bytes)
if err != nil {
    fmt.Println("Unable to parse certificate ", err)
    return
}

I am getting below error while trying to Parse a pem file
"x509: invalid certificate policies"

I am able to Parse the same certificate in Python using OpenSSL package.

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

$ go version
go1.17.10 darwin/arm64

Does this issue reproduce with the latest release?

No

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

go env Output
$ go env
GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/xyz/Library/Caches/go-build"
GOENV="/Users/xyz/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/xyz/Go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/xyz/Go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go@1.17/1.17.10/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go@1.17/1.17.10/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.17.10"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/xyz/bitbucket/panverification-nsdl/go.mod"
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 arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2m/hnqlmbbn65304zdfqp3gvrt80000gp/T/go-build1656833850=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

What did you expect to see?

I am expecting successful parsing of certificate

What did you see instead?

Getting error: x509: invalid certificate policies

@gopherbot gopherbot added this to the Unreleased milestone Jul 10, 2022
@seankhliao
Copy link
Member

Without a reproducer (certificate that triggers the problem), this issue is inactionable.

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jul 10, 2022
@gopherbot
Copy link
Contributor

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants