Refactor code structure and optimize performance across multiple modules

This commit is contained in:
StellaOps Bot
2025-12-26 20:03:22 +02:00
parent c786faae84
commit b4fc66feb6
3353 changed files with 88254 additions and 1590657 deletions

View File

@@ -6,11 +6,14 @@ using Microsoft.IdentityModel.Tokens;
using StellaOps.Cryptography;
using StellaOps.Cryptography.Kms;
using StellaOps.TestKit;
namespace StellaOps.Cryptography.Kms.Tests;
public sealed class CloudKmsClientTests
{
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task AwsClient_Signs_Verifies_And_Exports_Metadata()
{
using var fixture = new EcdsaFixture();
@@ -53,7 +56,8 @@ public sealed class CloudKmsClientTests
Assert.Equal(fixture.Parameters.Q.Y, exported.Qy);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task GcpClient_Uses_Primary_When_Version_Not_Specified()
{
using var fixture = new EcdsaFixture();
@@ -90,7 +94,8 @@ public sealed class CloudKmsClientTests
Assert.Equal(fixture.Parameters.Q.Y, exported.Qy);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void KmsCryptoProvider_Skips_NonExportable_Keys()
{
using var fixture = new EcdsaFixture();
@@ -113,7 +118,8 @@ public sealed class CloudKmsClientTests
Assert.Empty(keys);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task Pkcs11Client_Signs_Verifies_And_Exports()
{
using var fixture = new EcdsaFixture();
@@ -150,7 +156,8 @@ public sealed class CloudKmsClientTests
Assert.Equal(fixture.Parameters.Q.Y, exported.Qy);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task Fido2Client_Signs_Verifies_And_Exports()
{
using var fixture = new EcdsaFixture();

View File

@@ -1,6 +1,8 @@
using System.Security.Cryptography;
using StellaOps.Cryptography.Kms;
using StellaOps.TestKit;
namespace StellaOps.Cryptography.Kms.Tests;
public sealed class FileKmsClientTests : IDisposable
@@ -12,7 +14,8 @@ public sealed class FileKmsClientTests : IDisposable
_rootPath = Path.Combine(Path.GetTempPath(), $"kms-tests-{Guid.NewGuid():N}");
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task RotateSignVerifyLifecycle_Works()
{
using var client = CreateClient();
@@ -49,7 +52,8 @@ public sealed class FileKmsClientTests : IDisposable
Assert.True(await client.VerifyAsync(keyId, previousVersion.VersionId, firstData, firstSignature.Signature));
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task RevokePreventsSigning()
{
using var client = CreateClient();
@@ -66,7 +70,8 @@ public sealed class FileKmsClientTests : IDisposable
await Assert.ThrowsAsync<InvalidOperationException>(() => client.SignAsync(keyId, null, data));
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task ExportAsync_ReturnsKeyMaterial()
{
using var client = CreateClient();

View File

@@ -16,5 +16,6 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../../StellaOps.Cryptography.Kms/StellaOps.Cryptography.Kms.csproj" />
<ProjectReference Include="../../StellaOps.TestKit/StellaOps.TestKit.csproj" />
</ItemGroup>
</Project>