search and ai stabilization work, localization stablized.
This commit is contained in:
@@ -5,6 +5,7 @@ using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Cryptography;
|
||||
using StellaOps.Cryptography.PluginLoader;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Cryptography.DependencyInjection;
|
||||
|
||||
@@ -32,8 +33,7 @@ internal sealed class CryptoPluginProviderList : IReadOnlyList<ICryptoProvider>
|
||||
|
||||
if (_providers.Count == 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"No crypto providers were loaded. Check plugin configuration and manifest.");
|
||||
throw new InvalidOperationException(_t("crypto.di.no_plugins_loaded"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Cryptography.DependencyInjection;
|
||||
|
||||
@@ -46,18 +47,18 @@ public static partial class CryptoProviderRegistryValidator
|
||||
var resolved = options.ResolvePreferredProviders();
|
||||
if (resolved.Count == 0)
|
||||
{
|
||||
throw new InvalidOperationException("Crypto provider registry cannot be empty. Configure at least one provider for RU deployments.");
|
||||
throw new InvalidOperationException(_t("crypto.di.registry_empty"));
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsLinux() && enableOpenSsl &&
|
||||
!resolved.Contains("ru.openssl.gost", _ordinalIgnoreCase))
|
||||
{
|
||||
throw new InvalidOperationException("Linux RU baseline requires provider 'ru.openssl.gost' (set STELLAOPS_CRYPTO_ENABLE_RU_OPENSSL=0 to override explicitly).");
|
||||
throw new InvalidOperationException(_t("crypto.di.ru_openssl_required"));
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsLinux() && !enableOpenSsl && !enablePkcs11)
|
||||
{
|
||||
throw new InvalidOperationException("RU Linux baseline is misconfigured: both ru.openssl.gost and ru.pkcs11 are disabled via environment. Enable at least one provider.");
|
||||
throw new InvalidOperationException(_t("crypto.di.ru_provider_required"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\StellaOps.Cryptography\StellaOps.Cryptography.csproj" />
|
||||
<ProjectReference Include="..\StellaOps.Localization\StellaOps.Localization.csproj" />
|
||||
<ProjectReference Include="..\StellaOps.Cryptography.PluginLoader\StellaOps.Cryptography.PluginLoader.csproj" />
|
||||
<ProjectReference Include="..\StellaOps.Cryptography.Plugin.Pkcs11Gost\StellaOps.Cryptography.Plugin.Pkcs11Gost.csproj" />
|
||||
<ProjectReference Include="..\StellaOps.Cryptography.Plugin.OpenSslGost\StellaOps.Cryptography.Plugin.OpenSslGost.csproj" />
|
||||
|
||||
Reference in New Issue
Block a user