Open baynes opened 3 years ago
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.
@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
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.