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: add utility function for parsing object-identifier strings #15523

Closed
phayes opened this issue May 3, 2016 · 4 comments
Closed

Comments

@phayes
Copy link

phayes commented May 3, 2016

The asn1 package is fairly narrowly focused on marshaling / unmarshaling DER data.

I would like to propose incrementally improving the asn1 package to be more generally useful for working with all data related to the ASN.1 standard. To start, I have created a new function NewObjectIdentifier to parse the string representation of a ASN.1 Object Identifier.

// NewObjectIdentifier creates an object identifier from it's string representation.
// Supports ASN.1 notation and dot notation. OID-IRI notation is not supported.
func NewObjectIdentifier(oid string) (oi ObjectIdentifier, err error) {

I have created a PR for it here as a preview: https://github.com/phayes/go/pull/1/files

If the go authors are interested in this, I'll roll it into a proper gerrit change-request. If they are not interested, I'll create a new 3rd party package.

@minux
Copy link
Member

minux commented May 3, 2016 via email

@phayes
Copy link
Author

phayes commented May 3, 2016

OK that sounds fine @minux .

I have added the functionality to https://github.com/phayes/cryptoid (package still work-in-progress)

Do you want to close this ticket then?

@minux
Copy link
Member

minux commented May 3, 2016 via email

@phayes
Copy link
Author

phayes commented May 3, 2016

Well, I actually think it's better to integrate into the encoding/asn1 package (or else I wouldn't have filed this issue!). However, having said that, I respect your decision.

Closing this ticket.

@phayes phayes closed this as completed May 3, 2016
@golang golang locked and limited conversation to collaborators May 3, 2017
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

3 participants