Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/TraceEvent/Symbols/NativeSymbolModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,14 @@ private void TryInitializeManagedChecksum(NativeSymbolModule module)
{
_hashAlgorithm = System.Security.Cryptography.SHA256.Create();
}
else if (srcFormat.Header.algorithmId == guidSHA384)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmat do these new GUIDs apply to native PDBs (Windows) or just portable PDBs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both native and portable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Thanks. We'll get this merged.

{
_hashAlgorithm = System.Security.Cryptography.SHA384.Create();
}
else if (srcFormat.Header.algorithmId == guidSHA512)
{
_hashAlgorithm = System.Security.Cryptography.SHA512.Create();
}

if (_hashAlgorithm != null)
{
Expand Down Expand Up @@ -1546,6 +1554,8 @@ struct SrcFormat
private static readonly Guid guidMD5 = new Guid("406ea660-64cf-4c82-b6f0-42d48172a799");
private static readonly Guid guidSHA1 = new Guid("ff1816ec-aa5e-4d10-87f7-6f4963833460");
private static readonly Guid guidSHA256 = new Guid("8829d00f-11b8-4213-878b-770e8597ac16");
private static readonly Guid guidSHA384 = new Guid("d99cfeb1-8c43-444a-8a6c-b61269d2a0bf");
private static readonly Guid guidSHA512 = new Guid("ef2d1afc-6550-46d6-b14b-d70afe9a5566");

#endregion
}
Expand Down
10 changes: 10 additions & 0 deletions src/TraceEvent/Symbols/PortableSymbolModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ internal PortablePdbSourceFile(DocumentHandle documentHandle, PortableSymbolModu
{
_hashAlgorithm = System.Security.Cryptography.SHA256.Create();
}
else if (hashAlgorithmGuid == HashAlgorithmSha384)
{
_hashAlgorithm = System.Security.Cryptography.SHA384.Create();
}
else if (hashAlgorithmGuid == HashAlgorithmSha512)
{
_hashAlgorithm = System.Security.Cryptography.SHA512.Create();
}

if (_hashAlgorithm != null)
{
Expand All @@ -141,6 +149,8 @@ internal PortablePdbSourceFile(DocumentHandle documentHandle, PortableSymbolModu
#region private
private static readonly Guid HashAlgorithmSha1 = Guid.Parse("ff1816ec-aa5e-4d10-87f7-6f4963833460");
private static readonly Guid HashAlgorithmSha256 = Guid.Parse("8829d00f-11b8-4213-878b-770e8597ac16");
private static readonly Guid HashAlgorithmSha384 = Guid.Parse("d99cfeb1-8c43-444a-8a6c-b61269d2a0bf");
private static readonly Guid HashAlgorithmSha512 = Guid.Parse("ef2d1afc-6550-46d6-b14b-d70afe9a5566");
#endregion
} // Class PortablePdbSourceFile

Expand Down
8 changes: 8 additions & 0 deletions src/TraceEvent/Symbols/SymbolReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,14 @@ public string ChecksumAlgorithm
{
return "MD5";
}
else if (_hashAlgorithm is SHA384)
{
return "SHA384";
}
else if (_hashAlgorithm is SHA512)
{
return "SHA512";
}
else
{
Debug.Fail("Missing case in get_ChecksumAlgorithm");
Expand Down