stabilize tests

This commit is contained in:
master
2026-02-01 21:37:40 +02:00
parent 55744f6a39
commit 5d5e80b2e4
6435 changed files with 33984 additions and 13802 deletions

View File

@@ -1,11 +1,12 @@
namespace StellaOps.Cryptography.Plugin.Hsm;
using System.Security.Cryptography;
using StellaOps.Plugin.Abstractions;
using StellaOps.Plugin.Abstractions.Context;
using StellaOps.Plugin.Abstractions.Capabilities;
using StellaOps.Plugin.Abstractions.Context;
using StellaOps.Plugin.Abstractions.Health;
using StellaOps.Plugin.Abstractions.Lifecycle;
using System.Security.Cryptography;
namespace StellaOps.Cryptography.Plugin.Hsm;
/// <summary>
/// Hardware Security Module (HSM) cryptography plugin.

View File

@@ -3,10 +3,11 @@
// Sprint: SPRINT_20260112_017_CRYPTO_pkcs11_hsm_implementation
// Tasks: HSM-002, HSM-003, HSM-004, HSM-005, HSM-006, HSM-007
using System.Collections.Concurrent;
using Net.Pkcs11Interop.Common;
using Net.Pkcs11Interop.HighLevelAPI;
using StellaOps.Plugin.Abstractions.Context;
using System.Collections.Concurrent;
namespace StellaOps.Cryptography.Plugin.Hsm;
@@ -555,19 +556,23 @@ public sealed class Pkcs11HsmClientImpl : IHsmClient, IDisposable
/// <summary>
/// Helper factory for creating mechanisms.
/// Uses Lazy&lt;T&gt; to defer native PKCS#11 library probing until first use,
/// preventing test runner hangs when SoftHSM2 is not installed (Q4 quirk).
/// </summary>
private static class MechanismFactory
{
private static readonly Pkcs11InteropFactories Factories = new();
private static readonly Lazy<Pkcs11InteropFactories> LazyFactories = new(
() => new Pkcs11InteropFactories(),
LazyThreadSafetyMode.ExecutionAndPublication);
public static IMechanism Create(CKM mechanism)
{
return Factories.MechanismFactory.Create(mechanism);
return LazyFactories.Value.MechanismFactory.Create(mechanism);
}
public static IMechanism Create(CKM mechanism, byte[] parameter)
{
return Factories.MechanismFactory.Create(mechanism, parameter);
return LazyFactories.Value.MechanismFactory.Create(mechanism, parameter);
}
}
}

View File

@@ -0,0 +1,8 @@
# StellaOps.Cryptography.Plugin.Hsm Task Board
This board mirrors active sprint tasks for this module.
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
| Task ID | Status | Notes |
| --- | --- | --- |
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Cryptography/StellaOps.Cryptography.Plugin.Hsm/StellaOps.Cryptography.Plugin.Hsm.md. |
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |