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

x509.name.build without sorting #212

Open
baynes opened this issue Jun 15, 2021 · 2 comments
Open

x509.name.build without sorting #212

baynes opened this issue Jun 15, 2021 · 2 comments

Comments

@baynes
Copy link

baynes commented Jun 15, 2021

It would be useful for asn1crypto.x509.Name.build()` to have an option to turn off the sorting the relative names into its preferred order and keep the input order. Some specifications require their own specific order.

@wbond
Copy link
Owner

wbond commented Aug 7, 2021

You don't have to use build if you don't want that behavior.

If you've got an idea of an enhancement, also feel free to propose via a PR.

@adiroiban
Copy link

@wbond thanks for this nice library. Brilliant work!

@baynes do you know which specifications require a specific order?

I still think that this feature is useful to work around some legacy/buggy libraries or external API.

I found this issue with the IBM Data Power Gateway.

I went with a simple patch. If name_dict is already an OrderedDict, don't sort it.

I am not sure if this is the best general solution.

I am not a fan of flag arguments, but maybe Name.build(name_dict, sort=False) can also do the job.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants