Replaces native argon2 with ref argon2 (#158)

This commit is contained in:
Kamron Batman 2020-05-29 23:02:18 -07:00 committed by GitHub
parent 4f1825152c
commit 050d6b5fa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 117 additions and 7957 deletions

View file

@ -37,7 +37,7 @@ jobs:
${{ github.workspace }}/Projects/*/obj/project.assets.json ${{ github.workspace }}/Projects/*/obj/project.assets.json
${{ github.workspace }}/Projects/*/obj/project.nuget.cache ${{ github.workspace }}/Projects/*/obj/project.nuget.cache
${{ github.workspace }}/Projects/*/obj/*.csproj.nuget.* ${{ 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: | restore-keys: |
${{ matrix.os }}-nuget-cache-v3 ${{ matrix.os }}-nuget-cache-v3
- name: Argon2 Library Cache - name: Argon2 Library Cache
@ -48,7 +48,7 @@ jobs:
~/.nuget/packages/argon2.bindings ~/.nuget/packages/argon2.bindings
${{ github.workspace }}/Projects/Argon2/** ${{ github.workspace }}/Projects/Argon2/**
${{ github.workspace }}/packages/Argon2.Bindings*.nupkg ${{ 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: | restore-keys: |
${{ matrix.os }}-argon2-cache-v4 ${{ matrix.os }}-argon2-cache-v4
- name: ZLib Library Cache - name: ZLib Library Cache
@ -59,7 +59,7 @@ jobs:
~/.nuget/packages/zlib.bindings ~/.nuget/packages/zlib.bindings
${{ github.workspace }}/Projects/ZLib/** ${{ github.workspace }}/Projects/ZLib/**
${{ github.workspace }}/packages/ZLib.Bindings*.nupkg ${{ 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: | restore-keys: |
${{ matrix.os }}-zlib-cache-v4 ${{ matrix.os }}-zlib-cache-v4
- name: Build ZLib - name: Build ZLib
@ -79,5 +79,7 @@ jobs:
run: dotnet build -c Release --no-restore Projects/Server/Server.csproj run: dotnet build -c Release --no-restore Projects/Server/Server.csproj
- name: Build UO Content - name: Build UO Content
run: dotnet build -c Release --no-restore Projects/UOContent/UOContent.csproj run: dotnet build -c Release --no-restore Projects/UOContent/UOContent.csproj
- name: Test - name: Test Server
run: dotnet test -r ${{ matrix.rid }} --no-restore --verbosity normal 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

View file

@ -5,13 +5,9 @@
<Company>ModernUO</Company> <Company>ModernUO</Company>
<Copyright>2019-2020</Copyright> <Copyright>2019-2020</Copyright>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<UseNETCoreGenerator>true</UseNETCoreGenerator>
<Platforms>x64</Platforms> <Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants Condition="$(RuntimeIdentifier.StartsWith('win'))">WINDOWS</DefineConstants> <DefineConstants Condition="$(RuntimeIdentifier.StartsWith('win'))">WINDOWS</DefineConstants>
<DefineConstants Condition="$(RuntimeIdentifier.StartsWith(`win`)) != true">UNIX</DefineConstants> <DefineConstants Condition="$(RuntimeIdentifier.StartsWith(`win`)) != true">UNIX</DefineConstants>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
@ -19,6 +15,5 @@
<RestoreLockedMode>true</RestoreLockedMode> <RestoreLockedMode>true</RestoreLockedMode>
<NoWarn>NU1603</NoWarn> <NoWarn>NU1603</NoWarn>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder> <DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View file

@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<PackageVersion>1.2.7</PackageVersion> <PackageVersion>1.2.7</PackageVersion>
<RootNamespace>System.Security.Cryptography</RootNamespace> <RootNamespace>System.Security.Cryptography</RootNamespace>
<AssemblyName>Argon2.Bindings</AssemblyName> <AssemblyName>Argon2.Bindings</AssemblyName>
@ -13,17 +14,17 @@
<Content Include="runtimes\win-x64\native\libargon2.dll"> <Content Include="runtimes\win-x64\native\libargon2.dll">
<Pack>true</Pack> <Pack>true</Pack>
<PackagePath>runtimes/win-x64/native</PackagePath> <PackagePath>runtimes/win-x64/native</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="runtimes\osx-x64\native\libargon2.dylib"> <Content Include="runtimes\osx-x64\native\libargon2.dylib">
<Pack>true</Pack> <Pack>true</Pack>
<PackagePath>runtimes/osx-x64/native</PackagePath> <PackagePath>runtimes/osx-x64/native</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="runtimes\linux-x64\native\libargon2.so"> <Content Include="runtimes\linux-x64\native\libargon2.so">
<Pack>true</Pack> <Pack>true</Pack>
<PackagePath>runtimes/linux-x64/native</PackagePath> <PackagePath>runtimes/linux-x64/native</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -7,9 +7,6 @@
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="coverlet.collector" Version="1.2.1" /> <PackageReference Include="coverlet.collector" Version="1.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Server\Server.csproj" /> <ProjectReference Include="..\Server\Server.csproj" />
<ProjectReference Include="..\UOContent\UOContent.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -1,5 +1,5 @@
using System; using System;
using Server.Misc; // using Server.Misc;
namespace Server.Tests namespace Server.Tests
{ {
@ -13,7 +13,7 @@ namespace Server.Tests
ServerConfiguration.Load(true); ServerConfiguration.Load(true);
// Configure / Initialize // Configure / Initialize
MapDefinitions.Configure(); TestMapDefinitions.ConfigureTestMapDefinitions();
// Load the world // Load the world
World.Load(); World.Load();

View 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

View file

@ -11,6 +11,11 @@
<PublishDir>..\..\Distribution</PublishDir> <PublishDir>..\..\Distribution</PublishDir>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Configurations>Debug;Release;Analyze</Configurations> <Configurations>Debug;Release;Analyze</Configurations>
<UseNETCoreGenerator>true</UseNETCoreGenerator>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup> </PropertyGroup>
<Target Name="CleanPub" AfterTargets="Clean"> <Target Name="CleanPub" AfterTargets="Clean">
<Message Text="Removing distribution files..." /> <Message Text="Removing distribution files..." />
@ -40,14 +45,6 @@
<Delete Files="..\..\Distribution\$(AssemblyName).runtimeconfig.json" ContinueOnError="true" /> <Delete Files="..\..\Distribution\$(AssemblyName).runtimeconfig.json" ContinueOnError="true" />
<Delete Files="..\..\Distribution\System.IO.Pipelines.dll" ContinueOnError="true" /> <Delete Files="..\..\Distribution\System.IO.Pipelines.dll" ContinueOnError="true" />
</Target> </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'"> <PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<Optimize>false</Optimize> <Optimize>false</Optimize>
@ -61,6 +58,12 @@
<CodeAnalysisRuleSet>..\..\Rules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>..\..\Rules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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.Connections.Abstractions" Version="3.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" 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" /> <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.4" />

View file

@ -110,54 +110,6 @@
"resolved": "1.0.1", "resolved": "1.0.1",
"contentHash": "2G6OjjJzwBfNOO8myRV/nFrbTw5iA+DEm0N+qUqhrOmaVtn4pC77h38I1jsXGw5VH55+dPfQsqHD0We9sCl9FQ==" "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"
}
}
} }
} }
} }

View file

@ -1,15 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<RootNamespace>Scripts.Tests</RootNamespace> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="coverlet.collector" Version="1.2.1" /> <PackageReference Include="coverlet.collector" Version="1.2.1" />
</ItemGroup> <ProjectReference Include="..\Server\Server.csproj" />
<ItemGroup> <ProjectReference Include="..\UOContent\UOContent.csproj" />
<ProjectReference Include="..\Server\Server.csproj" /> </ItemGroup>
<ProjectReference Include="..\UOContent\UOContent.csproj" />
</ItemGroup>
</Project> </Project>

File diff suppressed because it is too large Load diff

View file

@ -6,6 +6,11 @@
<Product>ModernUO Content</Product> <Product>ModernUO Content</Product>
<PublishDir>..\..\Distribution\Assemblies</PublishDir> <PublishDir>..\..\Distribution\Assemblies</PublishDir>
<Configurations>Debug;Release;Analyze</Configurations> <Configurations>Debug;Release;Analyze</Configurations>
<UseNETCoreGenerator>true</UseNETCoreGenerator>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup> </PropertyGroup>
<Target Name="CleanPub" AfterTargets="Clean"> <Target Name="CleanPub" AfterTargets="Clean">
<Message Text="Removing distribution assemblies..." /> <Message Text="Removing distribution assemblies..." />
@ -33,14 +38,6 @@
<Delete Files="..\..\Distribution\Assemblies\libz.so" ContinueOnError="true" /> <Delete Files="..\..\Distribution\Assemblies\libz.so" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\ZLib.Bindings.dll" ContinueOnError="true" /> <Delete Files="..\..\Distribution\Assemblies\ZLib.Bindings.dll" ContinueOnError="true" />
</Target> </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'"> <PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>TRACE;DEBUG;$(DefineConstants)</DefineConstants> <DefineConstants>TRACE;DEBUG;$(DefineConstants)</DefineConstants>
<Optimize>false</Optimize> <Optimize>false</Optimize>
@ -55,13 +52,15 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="SpecialSystems\README.TXT" /> <Content Include="SpecialSystems\README.TXT" />
</ItemGroup> <AdditionalFiles Include="..\..\Rules.ruleset">
<ItemGroup> <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"> <ProjectReference Include="..\Server\Server.csproj" Private="false" PrivateAssets="All" IncludeAssets="None">
<IncludeInPackage>false</IncludeInPackage> <IncludeInPackage>false</IncludeInPackage>
</ProjectReference> </ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MailKit" Version="2.6.0" /> <PackageReference Include="MailKit" Version="2.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.4" /> <PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.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

View file

@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<PackageVersion>1.0.2</PackageVersion> <PackageVersion>1.0.2</PackageVersion>
<RootNamespace>Server</RootNamespace> <RootNamespace>Server</RootNamespace>
<AssemblyName>ZLib.Bindings</AssemblyName> <AssemblyName>ZLib.Bindings</AssemblyName>
@ -8,6 +9,7 @@
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Configurations>Debug;Release;Analyze</Configurations> <Configurations>Debug;Release;Analyze</Configurations>
<AssemblyVersion>1.0.2</AssemblyVersion> <AssemblyVersion>1.0.2</AssemblyVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="runtimes\win-x64\native\zlib.dll"> <Content Include="runtimes\win-x64\native\zlib.dll">