Skip to content

Commit 7107f70

Browse files
committed
We now use System.Security.Cryptography.Primitives on our UAP 10.0 assembly as well.
ifdef out tests that verify TransformBlock/TransformFinalBlock on UAP 10.0.
1 parent 6351369 commit 7107f70

File tree

7 files changed

+14
-10
lines changed

7 files changed

+14
-10
lines changed

build/nuget/SshNet.Security.Cryptography.nuspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ For all other target frameworks, these methods/properties were already public.
4040
<dependency id="System.IO" version="4.1.0" />
4141
<dependency id="System.Security.Cryptography.Primitives" version="4.0.0" />
4242
</group>
43-
<group targetFramework=".NETPortable0.0-Profile111" />
43+
<group targetFramework=".NETPortable,Version=v4.5,Profile=Profile111" />
4444
<group targetFramework="Silverlight4.0" />
4545
<group targetFramework="Silverlight5.0" />
4646
<group targetFramework="UAP10.0">
4747
<dependency id="System.IO" version="4.1.0" />
48+
<dependency id="System.Security.Cryptography.Primitives" version="4.0.0" />
4849
</group>
4950
<group targetFramework="WindowsPhone7.1" />
5051
<group targetFramework="WindowsPhone8.0" />

src/SshNet.Security.Cryptography.UAP10/SshNet.Security.Cryptography.UAP10.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<DebugType>full</DebugType>
2424
<Optimize>false</Optimize>
2525
<OutputPath>bin\Debug\</OutputPath>
26-
<DefineConstants>TRACE;DEBUG</DefineConstants>
26+
<DefineConstants>TRACE;DEBUG;FEATURE_CRYPTO_HASHALGORITHM</DefineConstants>
2727
<ErrorReport>prompt</ErrorReport>
2828
<WarningLevel>4</WarningLevel>
2929
<DocumentationFile>bin\Debug\SshNet.Security.Cryptography.xml</DocumentationFile>
@@ -34,7 +34,7 @@
3434
<DebugType>pdbonly</DebugType>
3535
<Optimize>true</Optimize>
3636
<OutputPath>bin\Release\</OutputPath>
37-
<DefineConstants>TRACE</DefineConstants>
37+
<DefineConstants>TRACE;FEATURE_CRYPTO_HASHALGORITHM</DefineConstants>
3838
<ErrorReport>prompt</ErrorReport>
3939
<WarningLevel>4</WarningLevel>
4040
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

src/SshNet.Security.Cryptography.UAP10/project.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"dependencies": {
3-
"System.IO": "4.1.0"
3+
"System.IO": "4.1.0",
4+
"System.Security.Cryptography.Primitives": "4.0.0"
45
},
56
"frameworks": {
67
"uap10.0": {}

test/SshNet.Security.Cryptography.NET20.Tests/SshNet.Security.Cryptography.NET20.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
<DebugType>full</DebugType>
1919
<Optimize>false</Optimize>
2020
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<DefineConstants>TRACE;DEBUG;FEATURE_HASHALGORITHM_TRANSFORM</DefineConstants>
2222
<ErrorReport>prompt</ErrorReport>
2323
<WarningLevel>4</WarningLevel>
2424
</PropertyGroup>
2525
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2626
<DebugType>pdbonly</DebugType>
2727
<Optimize>true</Optimize>
2828
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
29+
<DefineConstants>TRACE;FEATURE_HASHALGORITHM_TRANSFORM</DefineConstants>
3030
<ErrorReport>prompt</ErrorReport>
3131
<WarningLevel>4</WarningLevel>
3232
</PropertyGroup>

test/SshNet.Security.Cryptography.NET40.Tests/SshNet.Security.Cryptography.NET40.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
<DebugType>full</DebugType>
1919
<Optimize>false</Optimize>
2020
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<DefineConstants>TRACE;DEBUG;FEATURE_HASHALGORITHM_TRANSFORM</DefineConstants>
2222
<ErrorReport>prompt</ErrorReport>
2323
<WarningLevel>4</WarningLevel>
2424
</PropertyGroup>
2525
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2626
<DebugType>pdbonly</DebugType>
2727
<Optimize>true</Optimize>
2828
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
29+
<DefineConstants>TRACE;FEATURE_HASHALGORITHM_TRANSFORM</DefineConstants>
3030
<ErrorReport>prompt</ErrorReport>
3131
<WarningLevel>4</WarningLevel>
3232
</PropertyGroup>

test/SshNet.Security.Cryptography.NET45+Win8+WPA81.Tests/SshNet.Security.Cryptography.NET45+Win8+WPA81.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
<DebugType>full</DebugType>
2525
<Optimize>false</Optimize>
2626
<OutputPath>bin\Debug\</OutputPath>
27-
<DefineConstants>DEBUG;TRACE</DefineConstants>
27+
<DefineConstants>TRACE;DEBUG;FEATURE_HASHALGORITHM_TRANSFORM</DefineConstants>
2828
<ErrorReport>prompt</ErrorReport>
2929
<WarningLevel>4</WarningLevel>
3030
</PropertyGroup>
3131
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3232
<DebugType>pdbonly</DebugType>
3333
<Optimize>true</Optimize>
3434
<OutputPath>bin\Release\</OutputPath>
35-
<DefineConstants>TRACE</DefineConstants>
35+
<DefineConstants>TRACE;FEATURE_HASHALGORITHM_TRANSFORM</DefineConstants>
3636
<ErrorReport>prompt</ErrorReport>
3737
<WarningLevel>4</WarningLevel>
3838
</PropertyGroup>

test/SshNet.Security.Cryptography.Shared.Tests/SHA1Test.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public void Rfc3174_4()
6060
Assert.Equal(expectedHash, actualHash);
6161
}
6262

63+
#if FEATURE_HASHALGORITHM_TRANSFORM
6364
[Fact]
6465
public void TransformFinalBlock_InputCountLessThanBlockSize()
6566
{
@@ -165,5 +166,6 @@ public void TransformFinalBlockShouldAddBlockWhenThereIsNoRoomForMessageLength()
165166
Assert.Equal(data, actual);
166167
Assert.Equal(expectedHash, _hashAlgorithm.Hash);
167168
}
169+
#endif // FEATURE_HASHALGORITHM_TRANSFORM
168170
}
169171
}

0 commit comments

Comments
 (0)