diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md index 9497fc7b692d18..2d168532317584 100644 --- a/docs/project/list-of-diagnostics.md +++ b/docs/project/list-of-diagnostics.md @@ -83,6 +83,8 @@ The PR that reveals the implementation of the `(() => h.ProduceLegacyHmacValues = true); +#pragma warning restore SYSLIB0029 } } diff --git a/src/libraries/System.Security.Cryptography.Algorithms/tests/HmacSha512Tests.cs b/src/libraries/System.Security.Cryptography.Algorithms/tests/HmacSha512Tests.cs index 4da18847fd993e..c9f52a982c0ddd 100644 --- a/src/libraries/System.Security.Cryptography.Algorithms/tests/HmacSha512Tests.cs +++ b/src/libraries/System.Security.Cryptography.Algorithms/tests/HmacSha512Tests.cs @@ -48,9 +48,11 @@ public void ProduceLegacyHmacValues() { using (var h = new HMACSHA512()) { +#pragma warning disable SYSLIB0029 // ProduceLegacyHmacValues is obsolete Assert.False(h.ProduceLegacyHmacValues); h.ProduceLegacyHmacValues = false; // doesn't throw Assert.Throws(() => h.ProduceLegacyHmacValues = true); +#pragma warning restore SYSLIB0029 } }