feat: disable key persistence for RSA in DebugWebsocketSink and simplify config loading warning message

This commit is contained in:
Neil Dorin 2026-05-07 11:01:10 -06:00
parent 2530003a58
commit c050bb4eb3
2 changed files with 2 additions and 1 deletions

View file

@ -273,6 +273,7 @@ namespace PepperDash.Core
var rsaParams = DotNetUtilities.ToRSAParameters( var rsaParams = DotNetUtilities.ToRSAParameters(
(RsaPrivateCrtKeyParameters)keyEntry.Key); (RsaPrivateCrtKeyParameters)keyEntry.Key);
var rsa = new RSACryptoServiceProvider(); var rsa = new RSACryptoServiceProvider();
rsa.PersistKeyInCsp = false;
rsa.ImportParameters(rsaParams); rsa.ImportParameters(rsaParams);
cert.PrivateKey = rsa; cert.PrivateKey = rsa;

View file

@ -276,7 +276,7 @@ namespace PepperDash.Essentials
Debug.LogMessage(LogEventLevel.Information, "Folder structure verified. Loading config..."); Debug.LogMessage(LogEventLevel.Information, "Folder structure verified. Loading config...");
if (!ConfigReader.LoadConfig2() || ConfigReader.ConfigObject == null) if (!ConfigReader.LoadConfig2() || ConfigReader.ConfigObject == null)
{ {
Debug.LogMessage(LogEventLevel.Warning, "Unable to load config file. Please ensure a valid config file is present and restart the program."); Debug.LogMessage(LogEventLevel.Warning, "Unable to load config file.");
} }
Load(); Load();