mirror of
https://github.com/FabInfra/S22.Sasl.git
synced 2025-03-12 06:41:52 +01:00
Upgrade netfx45 to netstandard2 & Fixed DIGEST-MD5 issue
1. Support netcore (Upgrade netfx45 to netstandard2) 2. Removed System.Configuration dependency (Netfx legacy) 3. Removed RIPEMD-160 algorithm (Not supported in netcore) 4. Fixed DIGEST-MD5 issue (Please refer to https://github.com/smiley22/S22.Sasl/pull/3) 5. Excluded /Tests folder from project (For building only)
This commit is contained in:
parent
e8ec2d6b49
commit
89f6286151
3
.gitignore
vendored
3
.gitignore
vendored
@ -165,3 +165,6 @@ pip-log.txt
|
|||||||
|
|
||||||
# Mac crap
|
# Mac crap
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.old
|
||||||
|
/.vs/S22.Sasl/v16/Server/sqlite3
|
||||||
|
/.vs/S22.Sasl/DesignTimeBuild
|
||||||
|
@ -274,7 +274,7 @@ internal SaslSrp(string username, string password, byte[] privateKey)
|
|||||||
{ "SHA-256", typeof(SHA256Managed) },
|
{ "SHA-256", typeof(SHA256Managed) },
|
||||||
{ "SHA-384", typeof(SHA384Managed) },
|
{ "SHA-384", typeof(SHA384Managed) },
|
||||||
{ "SHA-512", typeof(SHA512Managed) },
|
{ "SHA-512", typeof(SHA512Managed) },
|
||||||
{ "RIPEMD-160", typeof(RIPEMD160Managed) },
|
//{ "RIPEMD-160", typeof(RIPEMD160Managed) },
|
||||||
{ "MD5", typeof(MD5CryptoServiceProvider) }
|
{ "MD5", typeof(MD5CryptoServiceProvider) }
|
||||||
};
|
};
|
||||||
foreach (KeyValuePair<string, Type> p in l) {
|
foreach (KeyValuePair<string, Type> p in l) {
|
||||||
|
107
S22.Sasl.csproj
107
S22.Sasl.csproj
@ -1,106 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{B860646A-13A2-47D9-9790-4719A91BF35B}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<RootNamespace>S22.Sasl</RootNamespace>
|
|
||||||
<AssemblyName>S22.Sasl</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<DocumentationFile>bin\Debug\S22.Sasl.XML</DocumentationFile>
|
<DocumentationFile>bin\Debug\S22.Sasl.XML</DocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Compile Remove="SaslConfiguration.cs" />
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<Compile Remove="Tests\CramMd5Test.cs" />
|
||||||
<HintPath>..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll</HintPath>
|
<Compile Remove="Tests\DigestMd5Test.cs" />
|
||||||
</Reference>
|
<Compile Remove="Tests\NtlmTest.cs" />
|
||||||
<Reference Include="System" />
|
<Compile Remove="Tests\OAuth2Test.cs" />
|
||||||
<Reference Include="System.Configuration" />
|
<Compile Remove="Tests\PlainTest.cs" />
|
||||||
<Reference Include="System.Core" />
|
<Compile Remove="Tests\ScramSha1Test.cs" />
|
||||||
<Reference Include="System.Numerics" />
|
<Compile Remove="Tests\SrpTest.cs" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Extensions.cs" />
|
<Folder Include="Tests\" />
|
||||||
<Compile Include="Mechanisms\ByteBuilder.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\Extensions.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\Flags.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\Helpers.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\MD4.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\MessageType.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\OSVersion.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\Responses.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\SecurityBuffer.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\Type1Message.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\Type2Message.cs" />
|
|
||||||
<Compile Include="Mechanisms\Ntlm\Type3Message.cs" />
|
|
||||||
<Compile Include="Mechanisms\SaslCramMd5.cs" />
|
|
||||||
<Compile Include="Mechanisms\SaslDigestMd5.cs" />
|
|
||||||
<Compile Include="Mechanisms\SaslNtlm.cs" />
|
|
||||||
<Compile Include="Mechanisms\SaslNtlmv2.cs" />
|
|
||||||
<Compile Include="Mechanisms\SaslOAuth.cs" />
|
|
||||||
<Compile Include="Mechanisms\SaslOAuth2.cs" />
|
|
||||||
<Compile Include="Mechanisms\SaslPlain.cs" />
|
|
||||||
<Compile Include="Mechanisms\SaslScramSha1.cs" />
|
|
||||||
<Compile Include="Mechanisms\SaslSrp.cs" />
|
|
||||||
<Compile Include="Mechanisms\Srp\ClientMessage1.cs" />
|
|
||||||
<Compile Include="Mechanisms\Srp\ClientMessage2.cs" />
|
|
||||||
<Compile Include="Mechanisms\Srp\Extensions.cs" />
|
|
||||||
<Compile Include="Mechanisms\Srp\Helper.cs" />
|
|
||||||
<Compile Include="Mechanisms\Srp\Mpi.cs" />
|
|
||||||
<Compile Include="Mechanisms\Srp\OctetSequence.cs" />
|
|
||||||
<Compile Include="Mechanisms\Srp\ServerMessage1.cs" />
|
|
||||||
<Compile Include="Mechanisms\Srp\ServerMessage2.cs" />
|
|
||||||
<Compile Include="Mechanisms\Srp\Utf8String.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="SaslConfiguration.cs" />
|
|
||||||
<Compile Include="SaslException.cs" />
|
|
||||||
<Compile Include="SaslFactory.cs" />
|
|
||||||
<Compile Include="SaslMechanism.cs" />
|
|
||||||
<Compile Include="Tests\CramMd5Test.cs" />
|
|
||||||
<Compile Include="Tests\DigestMd5Test.cs" />
|
|
||||||
<Compile Include="Tests\NtlmTest.cs" />
|
|
||||||
<Compile Include="Tests\OAuth2Test.cs" />
|
|
||||||
<Compile Include="Tests\PlainTest.cs" />
|
|
||||||
<Compile Include="Tests\ScramSha1Test.cs" />
|
|
||||||
<Compile Include="Tests\SrpTest.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="License.md" />
|
|
||||||
<None Include="Readme.md" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup />
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
</Project>
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
//using System.Configuration;
|
||||||
|
|
||||||
namespace S22.Sasl {
|
namespace S22.Sasl {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -90,13 +90,13 @@ public static class SaslFactory {
|
|||||||
{ "Srp", typeof(Mechanisms.SaslSrp) }
|
{ "Srp", typeof(Mechanisms.SaslSrp) }
|
||||||
};
|
};
|
||||||
// Register any custom mechanisms configured in the app.config.
|
// Register any custom mechanisms configured in the app.config.
|
||||||
var configSection = ConfigurationManager.GetSection("saslConfigSection")
|
//var configSection = ConfigurationManager.GetSection("saslConfigSection")
|
||||||
as SaslConfigurationSection;
|
// as SaslConfigurationSection;
|
||||||
if (configSection != null) {
|
//if (configSection != null) {
|
||||||
foreach(SaslProvider provider in configSection.SaslProviders) {
|
// foreach(SaslProvider provider in configSection.SaslProviders) {
|
||||||
mechanisms.Add(provider.Name, Type.GetType(provider.Type));
|
// mechanisms.Add(provider.Name, Type.GetType(provider.Type));
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user