Skip to content
Merged
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
2 changes: 1 addition & 1 deletion CoseIndirectSignature.Tests/CoseHashEnvelopeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void SignatureMatchesRejectsLegacyDigestAlgorithms(string hashSuffix)
CoseSign1MessageFactory factory = new();
byte[] payload = Encoding.UTF8.GetBytes("payload-to-verify");

using HashAlgorithm legacyHasher = hashSuffix == "md5" ? MD5.Create() : SHA1.Create();
using HashAlgorithm legacyHasher = hashSuffix == "md5" ? MD5.Create() : SHA1.Create(); // CodeQL [SM02196] Negative test: MD5/SHA1 are intentional inputs verifying the library rejects legacy digest algorithms.
byte[] payloadHash = legacyHasher.ComputeHash(payload);

CoseSign1Message message = factory.CreateCoseSign1Message(
Expand Down
Loading