Add PKCS#11 startup self-test health reporting
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
using System.Threading;
|
||||
|
||||
namespace EnvelopeGenerator.Infrastructure.Crypt.Services;
|
||||
|
||||
internal sealed class Pkcs11SelfTestStatusStore : IPkcs11SelfTestStatusProvider
|
||||
{
|
||||
private Pkcs11SelfTestStatusDto _status = new(
|
||||
Completed: false,
|
||||
Success: false,
|
||||
Mode: "pending",
|
||||
Summary: "PKCS#11 startup self-test has not run yet.",
|
||||
CheckedAtUtc: null,
|
||||
InteropError: null,
|
||||
ToolError: null);
|
||||
|
||||
public Pkcs11SelfTestStatusDto GetStatus() => Volatile.Read(ref _status);
|
||||
|
||||
public void SetStatus(Pkcs11SelfTestStatusDto status)
|
||||
{
|
||||
Volatile.Write(ref _status, status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user