Closed alanssitis closed 2 months ago
Hi @alanssitis and thanks for bringing this to our attention. Using the the globally unique Oid.Value
over the Oid.FriendlyName
should make the codebase more reliable when run across different platforms. Unless @GregDomzalski has more historical context?
I'm inclined to merge this PR as is, but I don't have an Ubuntu machine close by to test it, will get to it as quickly as I can.
I might as well ask you if you discovered similar oversights anywhere else in codebase and if so are you able to test and report your findings? It would be much appreciated. Have a good weekend!
Nope. Probably just an oversight. I agree comparing with OID seems like the better thing to do.
It looks like we have a trailing .
at the end of Value.
- I am assuming that should probably not be there?
Thanks for the contribution @alanssitis!
Description
Certificate OID friendly name is not cross-platform. The certificate on Windows is of type ECDsaCng while on Ubuntu it is of type ECDsaOpenSsl.
This causes the friendly names to differ, where it's
nistP256
with ECDsaCng andECDSA_P256
with ECDsaOpenSsl. The OID value is the same with both.Type of change
Please delete options that are not relevant.
How has this been tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test configuration: Encountered when running MakeCredential on a Linux machine. You can verify the friendly name issue with the following code snippet:
Checklist:
dotnet format
to format my code