Skip to content

Commit 453988b

Browse files
committed
[DO NOT MERGE] Try to diagnose dotnet#57416
Supposedly, this will tell us whether the crypto bridge into LSASS is broken. It may require multiple runs.
1 parent 987dbfb commit 453988b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests/XmlEncryption/EncryptedXmlDecryptorTests.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Security.Cryptography;
@@ -12,6 +12,18 @@ namespace Microsoft.AspNetCore.DataProtection.Test.XmlEncryption;
1212

1313
public class EncryptedXmlDecryptorTests
1414
{
15+
[Fact]
16+
public void Diagnose57416_ShouldWork()
17+
{
18+
RSA.Create().SignData(new byte[] { 1, 2, 3 }, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
19+
}
20+
21+
[Fact]
22+
public void Diagnose57416_ShouldFail()
23+
{
24+
RSACng.Create().SignData(new byte[] { 1, 2, 3 }, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
25+
}
26+
1527
[Fact]
1628
public void ThrowsIfCannotDecrypt()
1729
{

0 commit comments

Comments
 (0)