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

crypto/x509: cert from google fails to parse #8387

Closed
gopherbot opened this issue Jul 17, 2014 · 2 comments
Closed

crypto/x509: cert from google fails to parse #8387

gopherbot opened this issue Jul 17, 2014 · 2 comments
Milestone

Comments

@gopherbot
Copy link

by mo.dejong@dena.jp:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

> go version
go version go1.3 darwin/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. http://play.golang.org/p/MM0F8aYf99
2. See error "asn1: structure error: tags don't match (16 vs {class:0 tag:13
length:45 isCompound:true}) {optional:false explicit:false application:false
defaultValue:<nil> tag:<nil> stringType:0 set:false omitEmpty:false}
certificate @2"

What happened?

Go fails to parse the google cert (it is in pem format)

What should have happened instead?

It should have parsed the cert.

Please provide any additional information below.

Note that this exact same cert works properly with the google provided Ruby Gem :
https://rubygems.org/gems/google-id-token

Attachments:

  1. x509_test.go (1201 bytes)
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added repo-main, release-go1.4.

@agl
Copy link
Contributor

agl commented Jul 17, 2014

Comment 2:

You need to use encoding/pem to unwrap the base64 encoding first.

Status changed to Invalid.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants