Replaced PKCS#11-based cryptographic operations with a new DocumentService API integration. Removed all PKCS#11-related code, configurations, and dependencies, including options, self-test status, and signing logic. Updated `FinalizeEnvelopeCommand` to include a notification service and added base64 conversion for documents. Updated `ServiceCollectionExtensions` to register the new DocumentService client. Removed outdated documentation and diagrams related to PKCS#11. Updated project files and configurations to reflect these changes and incremented the version number. Added a comment in `EnvelopeFinalizationWorker` for future RabbitMQ integration.
24 lines
915 B
C#
24 lines
915 B
C#
using DocumentService.Client.Configuration;
|
|
using DocumentService.Client.Extensions;
|
|
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
|
using EnvelopeGenerator.Infrastructure.Crypt.Services;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace EnvelopeGenerator.Infrastructure.Crypt.DependencyInjection;
|
|
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddCryptInfrastructure(this IServiceCollection services, IConfiguration configuration)
|
|
{
|
|
var baseUrl = configuration["DocumentService:BaseUrl"]
|
|
?? throw new InvalidOperationException("DocumentService:BaseUrl is not configured.");
|
|
|
|
services.AddDocumentServiceClients(options => options.BaseUrl = baseUrl);
|
|
|
|
services.AddSingleton<IPdfDigitalSignatureService, PdfDigitalSignatureService>();
|
|
|
|
return services;
|
|
}
|
|
}
|