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: Unmarshaling NumericString (ASN.1 Tag 18) unsupported #22396

Closed
vkuzenkov opened this issue Oct 23, 2017 · 4 comments
Closed

encoding/asn1: Unmarshaling NumericString (ASN.1 Tag 18) unsupported #22396

vkuzenkov opened this issue Oct 23, 2017 · 4 comments

Comments

@vkuzenkov
Copy link

@vkuzenkov vkuzenkov commented Oct 23, 2017

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

1.9

Does this issue reproduce with the latest release?

Yes

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

GOARCH=amd64
GOHOSTARCH=amd64
GOHOSTOS=windows

What did you do?

I'm trying to unmarshal certificate IssuerName to pkix.RDNSequence
https://play.golang.org/p/NceOK3kaxA

What did you expect to see?

Value 1024001434049 in OID 1.2.643.100.1
Value 004029017981 in OID 1.2.643.3.131.1.1

What did you see instead?

nil in both oids

@gbbr gbbr changed the title encoding\asn1 Unmarshaling NumericString (ASN.1 Tag 18) unsupported encoding/asn1: Unmarshaling NumericString (ASN.1 Tag 18) unsupported Oct 23, 2017
@vkuzenkov
Copy link
Author

@vkuzenkov vkuzenkov commented Oct 23, 2017

I've tried to solve the problem locally and had some success.
I've just add const TagNumericString = 18 in encoding\asn1\common.go to ASN.1 tags list and add new case to parseField function, using existing parsePrintableString function.

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Oct 23, 2017

CC @agl

@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Oct 23, 2017
@agl agl self-assigned this Oct 27, 2017
@agl
Copy link
Contributor

@agl agl commented Oct 27, 2017

(Request is reasonable. Unclear whether it'll happen before 1.10 though.)

@gopherbot
Copy link

@gopherbot gopherbot commented Nov 18, 2017

Change https://golang.org/cl/78655 mentions this issue: encoding/asn1: support Unmarshaling NumericString

@gopherbot gopherbot closed this in 41d6c89 Nov 25, 2017
@golang golang locked and limited conversation to collaborators Nov 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.