mirror of
https://github.com/FabInfra/S22.Sasl.git
synced 2025-03-11 14:21:44 +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
|
||||
.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-384", typeof(SHA384Managed) },
|
||||
{ "SHA-512", typeof(SHA512Managed) },
|
||||
{ "RIPEMD-160", typeof(RIPEMD160Managed) },
|
||||
//{ "RIPEMD-160", typeof(RIPEMD160Managed) },
|
||||
{ "MD5", typeof(MD5CryptoServiceProvider) }
|
||||
};
|
||||
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 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')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B860646A-13A2-47D9-9790-4719A91BF35B}</ProjectGuid>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>S22.Sasl</RootNamespace>
|
||||
<AssemblyName>S22.Sasl</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
<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>
|
||||
</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>
|
||||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Compile Remove="SaslConfiguration.cs" />
|
||||
<Compile Remove="Tests\CramMd5Test.cs" />
|
||||
<Compile Remove="Tests\DigestMd5Test.cs" />
|
||||
<Compile Remove="Tests\NtlmTest.cs" />
|
||||
<Compile Remove="Tests\OAuth2Test.cs" />
|
||||
<Compile Remove="Tests\PlainTest.cs" />
|
||||
<Compile Remove="Tests\ScramSha1Test.cs" />
|
||||
<Compile Remove="Tests\SrpTest.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Extensions.cs" />
|
||||
<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" />
|
||||
<Folder Include="Tests\" />
|
||||
</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>
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
//using System.Configuration;
|
||||
|
||||
namespace S22.Sasl {
|
||||
/// <summary>
|
||||
@ -90,13 +90,13 @@ public static class SaslFactory {
|
||||
{ "Srp", typeof(Mechanisms.SaslSrp) }
|
||||
};
|
||||
// Register any custom mechanisms configured in the app.config.
|
||||
var configSection = ConfigurationManager.GetSection("saslConfigSection")
|
||||
as SaslConfigurationSection;
|
||||
if (configSection != null) {
|
||||
foreach(SaslProvider provider in configSection.SaslProviders) {
|
||||
mechanisms.Add(provider.Name, Type.GetType(provider.Type));
|
||||
}
|
||||
}
|
||||
//var configSection = ConfigurationManager.GetSection("saslConfigSection")
|
||||
// as SaslConfigurationSection;
|
||||
//if (configSection != null) {
|
||||
// foreach(SaslProvider provider in configSection.SaslProviders) {
|
||||
// mechanisms.Add(provider.Name, Type.GetType(provider.Type));
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user