docs re-org, audit fixes, build fixes
This commit is contained in:
@@ -35,10 +35,12 @@ internal sealed class Pkcs11InteropFacade : IPkcs11Facade
|
||||
private readonly IPkcs11Library _library;
|
||||
private readonly ISlot _slot;
|
||||
private readonly ConcurrentDictionary<string, IObjectAttribute[]> _attributeCache = new(StringComparer.Ordinal);
|
||||
private readonly TimeProvider _timeProvider;
|
||||
|
||||
public Pkcs11InteropFacade(Pkcs11Options options)
|
||||
public Pkcs11InteropFacade(Pkcs11Options options, TimeProvider? timeProvider = null)
|
||||
{
|
||||
_options = options ?? throw new ArgumentNullException(nameof(options));
|
||||
_timeProvider = timeProvider ?? TimeProvider.System;
|
||||
if (string.IsNullOrWhiteSpace(_options.LibraryPath))
|
||||
{
|
||||
throw new ArgumentException("PKCS#11 library path must be provided.", nameof(options));
|
||||
@@ -66,7 +68,7 @@ internal sealed class Pkcs11InteropFacade : IPkcs11Facade
|
||||
return new Pkcs11KeyDescriptor(
|
||||
KeyId: label ?? privateHandle.ObjectId.ToString(),
|
||||
Label: label,
|
||||
CreatedAt: DateTimeOffset.UtcNow);
|
||||
CreatedAt: _timeProvider.GetUtcNow());
|
||||
}
|
||||
|
||||
public async Task<Pkcs11PublicKeyMaterial> GetPublicKeyAsync(CancellationToken cancellationToken)
|
||||
|
||||
Reference in New Issue
Block a user