Replaces native argon2 with ref argon2 (#158)
This commit is contained in:
parent
4f1825152c
commit
050d6b5fa9
15 changed files with 117 additions and 7957 deletions
12
.github/workflows/dotnet-core.yml
vendored
12
.github/workflows/dotnet-core.yml
vendored
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
${{ github.workspace }}/Projects/*/obj/project.assets.json
|
||||
${{ github.workspace }}/Projects/*/obj/project.nuget.cache
|
||||
${{ github.workspace }}/Projects/*/obj/*.csproj.nuget.*
|
||||
key: ${{ matrix.os }}-nuget-cache-v5-${{ hashFiles('**/packages.lock.json') }}
|
||||
key: ${{ matrix.os }}-nuget-cache-v6-${{ hashFiles('**/packages.lock.json') }}
|
||||
restore-keys: |
|
||||
${{ matrix.os }}-nuget-cache-v3
|
||||
- name: Argon2 Library Cache
|
||||
|
|
@ -48,7 +48,7 @@ jobs:
|
|||
~/.nuget/packages/argon2.bindings
|
||||
${{ github.workspace }}/Projects/Argon2/**
|
||||
${{ github.workspace }}/packages/Argon2.Bindings*.nupkg
|
||||
key: ${{ matrix.os }}-argon2-cache-v5-${{ hashFiles('Projects/Argon2/*') }}
|
||||
key: ${{ matrix.os }}-argon2-cache-v6-${{ hashFiles('Projects/Argon2/*') }}
|
||||
restore-keys: |
|
||||
${{ matrix.os }}-argon2-cache-v4
|
||||
- name: ZLib Library Cache
|
||||
|
|
@ -59,7 +59,7 @@ jobs:
|
|||
~/.nuget/packages/zlib.bindings
|
||||
${{ github.workspace }}/Projects/ZLib/**
|
||||
${{ github.workspace }}/packages/ZLib.Bindings*.nupkg
|
||||
key: ${{ matrix.os }}-zlib-cache-v5-${{ hashFiles('Projects/ZLib/*') }}
|
||||
key: ${{ matrix.os }}-zlib-cache-v6-${{ hashFiles('Projects/ZLib/*') }}
|
||||
restore-keys: |
|
||||
${{ matrix.os }}-zlib-cache-v4
|
||||
- name: Build ZLib
|
||||
|
|
@ -79,5 +79,7 @@ jobs:
|
|||
run: dotnet build -c Release --no-restore Projects/Server/Server.csproj
|
||||
- name: Build UO Content
|
||||
run: dotnet build -c Release --no-restore Projects/UOContent/UOContent.csproj
|
||||
- name: Test
|
||||
run: dotnet test -r ${{ matrix.rid }} --no-restore --verbosity normal
|
||||
- name: Test Server
|
||||
run: dotnet test -r ${{ matrix.rid }} --no-restore Projects/Server.Tests/Server.Tests.csproj
|
||||
- name: Test UOContent
|
||||
run: dotnet test -r ${{ matrix.rid }} --no-restore Projects/UOContent.Tests/UOContent.Tests.csproj
|
||||
|
|
|
|||
|
|
@ -5,13 +5,9 @@
|
|||
<Company>ModernUO</Company>
|
||||
<Copyright>2019-2020</Copyright>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseNETCoreGenerator>true</UseNETCoreGenerator>
|
||||
<Platforms>x64</Platforms>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<WarningsAsErrors />
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DefineConstants Condition="$(RuntimeIdentifier.StartsWith('win'))">WINDOWS</DefineConstants>
|
||||
<DefineConstants Condition="$(RuntimeIdentifier.StartsWith(`win`)) != true">UNIX</DefineConstants>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
|
|
@ -19,6 +15,5 @@
|
|||
<RestoreLockedMode>true</RestoreLockedMode>
|
||||
<NoWarn>NU1603</NoWarn>
|
||||
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
|
||||
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<PackageVersion>1.2.7</PackageVersion>
|
||||
<RootNamespace>System.Security.Cryptography</RootNamespace>
|
||||
<AssemblyName>Argon2.Bindings</AssemblyName>
|
||||
|
|
@ -13,17 +14,17 @@
|
|||
<Content Include="runtimes\win-x64\native\libargon2.dll">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>runtimes/win-x64/native</PackagePath>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="runtimes\osx-x64\native\libargon2.dylib">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>runtimes/osx-x64/native</PackagePath>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="runtimes\linux-x64\native\libargon2.so">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>runtimes/linux-x64/native</PackagePath>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -7,9 +7,6 @@
|
|||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||
<PackageReference Include="coverlet.collector" Version="1.2.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Server\Server.csproj" />
|
||||
<ProjectReference Include="..\UOContent\UOContent.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using Server.Misc;
|
||||
// using Server.Misc;
|
||||
|
||||
namespace Server.Tests
|
||||
{
|
||||
|
|
@ -13,7 +13,7 @@ namespace Server.Tests
|
|||
ServerConfiguration.Load(true);
|
||||
|
||||
// Configure / Initialize
|
||||
MapDefinitions.Configure();
|
||||
TestMapDefinitions.ConfigureTestMapDefinitions();
|
||||
|
||||
// Load the world
|
||||
World.Load();
|
||||
|
|
|
|||
33
Projects/Server.Tests/TestMapDefinitions.cs
Normal file
33
Projects/Server.Tests/TestMapDefinitions.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
namespace Server
|
||||
{
|
||||
public static class TestMapDefinitions
|
||||
{
|
||||
public static void ConfigureTestMapDefinitions()
|
||||
{
|
||||
RegisterMap(0, 0, 0, 7168, 4096, 4, "Felucca", MapRules.FeluccaRules);
|
||||
RegisterMap(1, 1, 1, 7168, 4096, 0, "Trammel", MapRules.TrammelRules);
|
||||
RegisterMap(2, 2, 2, 2304, 1600, 1, "Ilshenar", MapRules.TrammelRules);
|
||||
RegisterMap(3, 3, 3, 2560, 2048, 1, "Malas", MapRules.TrammelRules);
|
||||
RegisterMap(4, 4, 4, 1448, 1448, 1, "Tokuno", MapRules.TrammelRules);
|
||||
RegisterMap(5, 5, 5, 1280, 4096, 1, "TerMur", MapRules.TrammelRules);
|
||||
|
||||
RegisterMap(0x7F, 0x7F, 0x7F, Map.SectorSize, Map.SectorSize, 1, "Internal", MapRules.Internal);
|
||||
}
|
||||
|
||||
private static void RegisterMap(
|
||||
int mapIndex,
|
||||
int mapID,
|
||||
int fileIndex,
|
||||
int width,
|
||||
int height,
|
||||
int season,
|
||||
string name,
|
||||
MapRules rules)
|
||||
{
|
||||
Map newMap = new Map(mapID, mapIndex, fileIndex, width, height, season, name, rules);
|
||||
|
||||
Map.Maps[mapIndex] = newMap;
|
||||
Map.AllMaps.Add(newMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -11,6 +11,11 @@
|
|||
<PublishDir>..\..\Distribution</PublishDir>
|
||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||
<Configurations>Debug;Release;Analyze</Configurations>
|
||||
<UseNETCoreGenerator>true</UseNETCoreGenerator>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<WarningsAsErrors />
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<Target Name="CleanPub" AfterTargets="Clean">
|
||||
<Message Text="Removing distribution files..." />
|
||||
|
|
@ -40,14 +45,6 @@
|
|||
<Delete Files="..\..\Distribution\$(AssemblyName).runtimeconfig.json" ContinueOnError="true" />
|
||||
<Delete Files="..\..\Distribution\System.IO.Pipelines.dll" ContinueOnError="true" />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="..\..\Rules.ruleset">
|
||||
<Link>Rules.rulest</Link>
|
||||
</AdditionalFiles>
|
||||
<AdditionalFiles Include="..\..\stylecop.json">
|
||||
<Link>stylecop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
|
|
@ -61,6 +58,12 @@
|
|||
<CodeAnalysisRuleSet>..\..\Rules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="..\..\Rules.ruleset">
|
||||
<Link>Rules.rulest</Link>
|
||||
</AdditionalFiles>
|
||||
<AdditionalFiles Include="..\..\stylecop.json">
|
||||
<Link>stylecop.json</Link>
|
||||
</AdditionalFiles>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.4" />
|
||||
|
|
|
|||
|
|
@ -110,54 +110,6 @@
|
|||
"resolved": "1.0.1",
|
||||
"contentHash": "2G6OjjJzwBfNOO8myRV/nFrbTw5iA+DEm0N+qUqhrOmaVtn4pC77h38I1jsXGw5VH55+dPfQsqHD0We9sCl9FQ=="
|
||||
}
|
||||
},
|
||||
".NETCoreApp,Version=v3.1/linux-x64": {
|
||||
"ZLib.Bindings": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.0.2, )",
|
||||
"resolved": "1.0.2",
|
||||
"contentHash": "rd7gUFhwKb9Pd5ehhsUUdZiGS/AQQ1v0UItP2J+EYIfKzq7H54yDQ509qcBmbNtr6zTz7AAax4zRUcg3j9mfyQ=="
|
||||
},
|
||||
"Libuv": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.10.0",
|
||||
"contentHash": "GsCf4q+eyaI49rCPlgYxdxa1SQCysXFFdSJWdstrwxytg4+VPYLYrXD4AT2rjHVJ+UF7SSWX9CapWEYaU4ejVQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
".NETCoreApp,Version=v3.1/osx-x64": {
|
||||
"ZLib.Bindings": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.0.2, )",
|
||||
"resolved": "1.0.2",
|
||||
"contentHash": "rd7gUFhwKb9Pd5ehhsUUdZiGS/AQQ1v0UItP2J+EYIfKzq7H54yDQ509qcBmbNtr6zTz7AAax4zRUcg3j9mfyQ=="
|
||||
},
|
||||
"Libuv": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.10.0",
|
||||
"contentHash": "GsCf4q+eyaI49rCPlgYxdxa1SQCysXFFdSJWdstrwxytg4+VPYLYrXD4AT2rjHVJ+UF7SSWX9CapWEYaU4ejVQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
".NETCoreApp,Version=v3.1/win-x64": {
|
||||
"ZLib.Bindings": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.0.2, )",
|
||||
"resolved": "1.0.2",
|
||||
"contentHash": "rd7gUFhwKb9Pd5ehhsUUdZiGS/AQQ1v0UItP2J+EYIfKzq7H54yDQ509qcBmbNtr6zTz7AAax4zRUcg3j9mfyQ=="
|
||||
},
|
||||
"Libuv": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.10.0",
|
||||
"contentHash": "GsCf4q+eyaI49rCPlgYxdxa1SQCysXFFdSJWdstrwxytg4+VPYLYrXD4AT2rjHVJ+UF7SSWX9CapWEYaU4ejVQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Scripts.Tests</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||
<PackageReference Include="coverlet.collector" Version="1.2.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Server\Server.csproj" />
|
||||
<ProjectReference Include="..\UOContent\UOContent.csproj" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||
<PackageReference Include="coverlet.collector" Version="1.2.1" />
|
||||
<ProjectReference Include="..\Server\Server.csproj" />
|
||||
<ProjectReference Include="..\UOContent\UOContent.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -6,6 +6,11 @@
|
|||
<Product>ModernUO Content</Product>
|
||||
<PublishDir>..\..\Distribution\Assemblies</PublishDir>
|
||||
<Configurations>Debug;Release;Analyze</Configurations>
|
||||
<UseNETCoreGenerator>true</UseNETCoreGenerator>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<WarningsAsErrors />
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<Target Name="CleanPub" AfterTargets="Clean">
|
||||
<Message Text="Removing distribution assemblies..." />
|
||||
|
|
@ -33,14 +38,6 @@
|
|||
<Delete Files="..\..\Distribution\Assemblies\libz.so" ContinueOnError="true" />
|
||||
<Delete Files="..\..\Distribution\Assemblies\ZLib.Bindings.dll" ContinueOnError="true" />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="..\..\Rules.ruleset">
|
||||
<Link>Rules.rulest</Link>
|
||||
</AdditionalFiles>
|
||||
<AdditionalFiles Include="..\..\stylecop.json">
|
||||
<Link>stylecop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<DefineConstants>TRACE;DEBUG;$(DefineConstants)</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
|
|
@ -55,13 +52,15 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="SpecialSystems\README.TXT" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="..\..\Rules.ruleset">
|
||||
<Link>Rules.rulest</Link>
|
||||
</AdditionalFiles>
|
||||
<AdditionalFiles Include="..\..\stylecop.json">
|
||||
<Link>stylecop.json</Link>
|
||||
</AdditionalFiles>
|
||||
<ProjectReference Include="..\Server\Server.csproj" Private="false" PrivateAssets="All" IncludeAssets="None">
|
||||
<IncludeInPackage>false</IncludeInPackage>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MailKit" Version="2.6.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.4" />
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<PackageVersion>1.0.2</PackageVersion>
|
||||
<RootNamespace>Server</RootNamespace>
|
||||
<AssemblyName>ZLib.Bindings</AssemblyName>
|
||||
|
|
@ -8,6 +9,7 @@
|
|||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<Configurations>Debug;Release;Analyze</Configurations>
|
||||
<AssemblyVersion>1.0.2</AssemblyVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="runtimes\win-x64\native\zlib.dll">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue