pki: Preserve ordering of submitted SAN names #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed upstream, this preserves ordering of the DNS SANs submitted by the caller, giving them control over the ordering on the final certificate. Previously, these were sorted: this resulted in stable ordering (independent of request ordering), but can sometimes result in unexpected behavior if a SAN is unsupported by the browser.
While this is a breaking change (insofar as this can change SAN ordering, which in turn means that there is a potential for newly issued leaf certificates to behave differently when reissued via the same API call), this change also gives more control to the caller to resolve any issues they may currently be running into due to the automated re-ordering.
Thus, on balance, this change is a net benefit to users.
See also: https://bugzilla.mozilla.org/show_bug.cgi?id=1757758
See also: https://bugzilla.mozilla.org/show_bug.cgi?id=1196364
Resolves: #49