Skip to content

Commit

Permalink
[DO NOT MERGE] Try to diagnose dotnet#57416
Browse files Browse the repository at this point in the history
Supposedly, this will tell us whether the crypto bridge into LSASS is broken.  It may require multiple runs.
  • Loading branch information
amcasey committed Aug 19, 2024
1 parent 987dbfb commit 453988b
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

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

public class EncryptedXmlDecryptorTests
{
[Fact]
public void Diagnose57416_ShouldWork()
{
RSA.Create().SignData(new byte[] { 1, 2, 3 }, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
}

[Fact]
public void Diagnose57416_ShouldFail()
{
RSACng.Create().SignData(new byte[] { 1, 2, 3 }, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
}

[Fact]
public void ThrowsIfCannotDecrypt()
{
Expand Down

0 comments on commit 453988b

Please sign in to comment.