diff --git a/src/TraceEvent/Symbols/NativeSymbolModule.cs b/src/TraceEvent/Symbols/NativeSymbolModule.cs index e516be93a..c26b753b8 100644 --- a/src/TraceEvent/Symbols/NativeSymbolModule.cs +++ b/src/TraceEvent/Symbols/NativeSymbolModule.cs @@ -747,6 +747,14 @@ private void TryInitializeManagedChecksum(NativeSymbolModule module) { _hashAlgorithm = System.Security.Cryptography.SHA256.Create(); } + else if (srcFormat.Header.algorithmId == guidSHA384) + { + _hashAlgorithm = System.Security.Cryptography.SHA384.Create(); + } + else if (srcFormat.Header.algorithmId == guidSHA512) + { + _hashAlgorithm = System.Security.Cryptography.SHA512.Create(); + } if (_hashAlgorithm != null) { @@ -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 } diff --git a/src/TraceEvent/Symbols/PortableSymbolModule.cs b/src/TraceEvent/Symbols/PortableSymbolModule.cs index 395029c38..09e54e0f9 100644 --- a/src/TraceEvent/Symbols/PortableSymbolModule.cs +++ b/src/TraceEvent/Symbols/PortableSymbolModule.cs @@ -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) { @@ -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 diff --git a/src/TraceEvent/Symbols/SymbolReader.cs b/src/TraceEvent/Symbols/SymbolReader.cs index e107c22b4..7f354b2b4 100644 --- a/src/TraceEvent/Symbols/SymbolReader.cs +++ b/src/TraceEvent/Symbols/SymbolReader.cs @@ -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");