-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Support additional friendly names on OID #36362
Conversation
The first commit only changes the dictionary initializer to the cctor builder. The second commit adds additional friendly names. |
@@ -237,29 +121,155 @@ internal static partial class OidLookup | |||
{ "1.3.14.7.2.3.1", "md2RSA" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new ones should just be added in this dictionary...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's already a second dictionary for "this is not the preferred return value for the OID", it should be used instead of a refactoring.
@bartonjs I'm not sure I understand. That dictionary doesn't get used for FriendlyName -> OID. It's used in As far as I can tell, the purpose of that dictionary is to allow going from Oid -> FriendlyName, but not FriendlyName -> Oid. For example, on Linux this fails:
But this will print RSA_KEYX:
|
Ah. OK, then I guess the refactor makes sense. That one does seem to be for when there's more than one OID that points to the same friendly name (on Windows), not more than one friendly name that points to the same OID. So it supported 1:m, not m:m. Hmm. |
Fixes #36342
Adds the ability for OIDs to support mapping multiple friendly names on non-Windows platforms.
The previous design assumed there was a 1:1 for friendly name <-> OID. I'm not sure if this breaks assumptions elsewhere in the framework.