Skip to content

Conversation

vcsjones
Copy link
Member

@vcsjones vcsjones commented Oct 9, 2024

Summary

The Thumbprint property on X509Certificate2 always uses SHA-1 as the hash algorithm. I added a remark to the property indicating that to get the thumbprint using a different algorithm, such as SHA-256, they should use GetCertHashString. It is not always obvious to some people that the thumbprint of the cert and its hash are the same thing.

@vcsjones vcsjones requested a review from a team as a code owner October 9, 2024 16:54
@ghost ghost added the area-System.Security Issues related to security practices for .NET developers. label Oct 9, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones

Copy link

Learn Build status updates of commit bb8b050:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Security.Cryptography.X509Certificates/X509Certificate2.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@gewarren gewarren merged commit 6f43697 into dotnet:main Oct 9, 2024
4 checks passed
@vcsjones vcsjones deleted the thumbprint-alt-hash branch October 9, 2024 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Security Issues related to security practices for .NET developers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants