Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Tides committed Mar 5, 2024
1 parent 47cad05 commit ff18da2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
10 changes: 9 additions & 1 deletion Obsidian.ConsoleApp/Obsidian.ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Logging\**" />
<EmbeddedResource Remove="Logging\**" />
<None Remove="Logging\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>
Expand All @@ -18,7 +24,9 @@
</ItemGroup>

<ItemGroup>
<Folder Include="Logging\" />
<None Update="accepted_keys\obsidian.pub.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
10 changes: 2 additions & 8 deletions Obsidian/Plugins/PluginProviders/PackedPluginProvider.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;

Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Obsidian/Utilities/ServerConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

/// <summary>
/// If true, each login/client gets a random username where multiple connections from the same host will be allowed.
Expand Down
2 changes: 1 addition & 1 deletion SamplePlugin/SamplePlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Obsidian.MSBuild" Version="1.0.0-nightly-11" />
<PackageReference Include="Obsidian.MSBuild" Version="1.0.0-nightly-14" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit ff18da2

Please sign in to comment.