diff --git a/Obsidian.ConsoleApp/Obsidian.ConsoleApp.csproj b/Obsidian.ConsoleApp/Obsidian.ConsoleApp.csproj index b3ccf86e..42dd3201 100644 --- a/Obsidian.ConsoleApp/Obsidian.ConsoleApp.csproj +++ b/Obsidian.ConsoleApp/Obsidian.ConsoleApp.csproj @@ -9,6 +9,12 @@ en + + + + + + @@ -18,7 +24,9 @@ - + + PreserveNewest + diff --git a/Obsidian/Plugins/PluginProviders/PackedPluginProvider.cs b/Obsidian/Plugins/PluginProviders/PackedPluginProvider.cs index b2e148a6..daf2e97a 100644 --- a/Obsidian/Plugins/PluginProviders/PackedPluginProvider.cs +++ b/Obsidian/Plugins/PluginProviders/PackedPluginProvider.cs @@ -1,9 +1,6 @@ using Microsoft.Extensions.Logging; using Obsidian.API.Plugins; using Org.BouncyCastle.Crypto; -using Org.BouncyCastle.Crypto.Utilities; -using Org.BouncyCastle.Pqc.Crypto.SphincsPlus; -using Org.BouncyCastle.Security; using System.Collections.Frozen; using System.IO; using System.Reflection; @@ -13,9 +10,6 @@ namespace Obsidian.Plugins.PluginProviders; public sealed class PackedPluginProvider(PluginManager pluginManager, ILogger logger) { - private const int SignatureLength = 384; - private const int HashLength = 20; - private readonly PluginManager pluginManager = pluginManager; private readonly ILogger logger = logger; @@ -31,8 +25,8 @@ public sealed class PackedPluginProvider(PluginManager pluginManager, ILogger lo //TODO save api version somewhere var apiVersion = reader.ReadString(); - var hash = reader.ReadBytes(HashLength); - var signature = reader.ReadBytes(SignatureLength); + var hash = reader.ReadBytes(SHA384.HashSizeInBytes); + var signature = reader.ReadBytes(SHA384.HashSizeInBits); var dataLength = reader.ReadInt32(); var curPos = fs.Position; diff --git a/Obsidian/Utilities/ServerConfiguration.cs b/Obsidian/Utilities/ServerConfiguration.cs index 5d9ad9d1..6cc49c0f 100644 --- a/Obsidian/Utilities/ServerConfiguration.cs +++ b/Obsidian/Utilities/ServerConfiguration.cs @@ -19,7 +19,7 @@ public sealed class ServerConfiguration : IServerConfiguration public bool AllowOperatorRequests { get; set; } = true; - public bool AllowUntrustedPlugins { get; set; } = true; + public bool AllowUntrustedPlugins { get; set; } /// /// If true, each login/client gets a random username where multiple connections from the same host will be allowed. diff --git a/SamplePlugin/SamplePlugin.csproj b/SamplePlugin/SamplePlugin.csproj index f72d4311..74c2718a 100644 --- a/SamplePlugin/SamplePlugin.csproj +++ b/SamplePlugin/SamplePlugin.csproj @@ -21,7 +21,7 @@ runtime - +