diff --git a/build/build.cmd b/build/build.cmd
new file mode 100644
index 000000000..146c26fbc
--- /dev/null
+++ b/build/build.cmd
@@ -0,0 +1,12 @@
+@echo off
+
+set MSBUILD14_EXE=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe
+set MSBUILD15_EXE=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\\MSBuild\15.0\bin\MSBuild.exe
+
+call "%MSBUILD14_EXE%" build.proj /t:Clean
+call "%MSBUILD15_EXE%" build.proj /t:Clean
+
+call "%MSBUILD14_EXE%" build.proj /t:Build
+call "%MSBUILD15_EXE%" build.proj /t:Build
+
+call "%MSBUILD15_EXE%" build.proj /t:Package /p:ReleaseVersion=%1
\ No newline at end of file
diff --git a/build/build.proj b/build/build.proj
index 065a00707..5b08e751e 100644
--- a/build/build.proj
+++ b/build/build.proj
@@ -9,16 +9,6 @@
1.5.0.214
-
- $(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2012.sln
- 14.0
- 14.0
-
-
- $(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2015.sln
- 14.0
- 14.0
-
$(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2017.sln
15.0
@@ -26,42 +16,10 @@
-
- Renci.SshNet.NET35\bin\$(Configuration)
- net35
-
-
- Renci.SshNet\bin\$(Configuration)
- net40
-
-
- Renci.SshNet.NETCore\bin\$(Configuration)\netstandard1.3
- netstandard1.3
-
Renci.SshNet.NETCore\bin\$(Configuration)\netstandard2.0
netstandard2.0
-
- Renci.SshNet.WindowsPhone\bin\$(Configuration)
- wp71
-
-
- Renci.SshNet.WindowsPhone8\bin\$(Configuration)
- wp8
-
-
- Renci.SshNet.Silverlight\bin\$(Configuration)
- sl4
-
-
- Renci.SshNet.Silverlight5\bin\$(Configuration)
- sl5
-
-
- Renci.SshNet.UAP10\bin\$(Configuration)
- uap10
-
diff --git a/build/nuget/SSH.NET.nuspec b/build/nuget/SSH.NET.nuspec
index a3520842a..0c96adfe4 100644
--- a/build/nuget/SSH.NET.nuspec
+++ b/build/nuget/SSH.NET.nuspec
@@ -2,14 +2,14 @@
SSH.NET
- 2017.0.0-beta1
+ 2017.1.1
SSH.NET
- Renci
+ Softheon
olegkap,drieseng
- https://github.com/sshnet/SSH.NET/blob/master/LICENSE
- https://github.com/sshnet/SSH.NET/
+ https://github.com/Softheon/SSH.NET/blob/master/LICENSE
+ https://github.com/Softheon/SSH.NET
false
- SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism and with broad framework support.
+ SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism and with broad framework support. Updated to support FIPS cryptography restrictions.
https://github.com/sshnet/SSH.NET/releases/tag/2017.0.0-beta1
A Secure Shell (SSH) library for .NET, optimized for parallelism.
2012-2017, RENCI
diff --git a/src/Renci.SshNet.NETCore/Renci.SshNet.NETCore.csproj b/src/Renci.SshNet.NETCore/Renci.SshNet.NETCore.csproj
index ba1c5b855..6c378b180 100644
--- a/src/Renci.SshNet.NETCore/Renci.SshNet.NETCore.csproj
+++ b/src/Renci.SshNet.NETCore/Renci.SshNet.NETCore.csproj
@@ -1,6 +1,6 @@

- netstandard1.3;netstandard2.0
+ netstandard2.0
true
true
false
@@ -8,6 +8,19 @@
../Renci.SshNet.snk
5
true
+ true
+ Softheon
+ SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism and with broad framework support. Updated to support FIPS cryptography restrictions.
+
+ https://github.com/Softheon/SSH.NET
+ https://github.com/Softheon/SSH.NET
+ Git
+ ssh scp sftp
+ Updated to FIPS compliant cryptography providers
+ LICENSE
+ 2017.1.1
+ SSH.NET
+ SSH.NET
@@ -28,9 +41,12 @@
-
- FEATURE_ENCODING_ASCII;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_DIRECTORYINFO_ENUMERATEFILES;FEATURE_MEMORYSTREAM_TRYGETBUFFER;FEATURE_REFLECTION_TYPEINFO;FEATURE_RNG_CREATE;FEATURE_SOCKET_TAP;FEATURE_SOCKET_EAP;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_SETSOCKETOPTION;FEATURE_SOCKET_SELECT;FEATURE_SOCKET_POLL;FEATURE_SOCKET_DISPOSE;FEATURE_DNS_TAP;FEATURE_STREAM_TAP;FEATURE_THREAD_COUNTDOWNEVENT;FEATURE_THREAD_TAP;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_WAITHANDLE_DISPOSE;FEATURE_HASH_MD5;FEATURE_HASH_SHA1_CREATE;FEATURE_HASH_SHA256_CREATE;FEATURE_HASH_SHA384_CREATE;FEATURE_HASH_SHA512_CREATE;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512
-
+
+
+ True
+
+
+
FEATURE_ENCODING_ASCII;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_DIRECTORYINFO_ENUMERATEFILES;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_MEMORYSTREAM_TRYGETBUFFER;FEATURE_RNG_CREATE;FEATURE_SOCKET_TAP;FEATURE_SOCKET_APM;FEATURE_SOCKET_EAP;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_SETSOCKETOPTION;FEATURE_SOCKET_SELECT;FEATURE_SOCKET_POLL;FEATURE_SOCKET_DISPOSE;FEATURE_DNS_SYNC;FEATURE_DNS_APM;FEATURE_DNS_TAP;FEATURE_STREAM_APM;FEATURE_STREAM_TAP;FEATURE_THREAD_COUNTDOWNEVENT;FEATURE_THREAD_TAP;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_WAITHANDLE_DISPOSE;FEATURE_HASH_MD5;FEATURE_HASH_SHA1_CREATE;FEATURE_HASH_SHA256_CREATE;FEATURE_HASH_SHA384_CREATE;FEATURE_HASH_SHA512_CREATE;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512
diff --git a/src/Renci.SshNet/Abstractions/CryptoAbstraction.cs b/src/Renci.SshNet/Abstractions/CryptoAbstraction.cs
index ff9e50a52..9f6b3076e 100644
--- a/src/Renci.SshNet/Abstractions/CryptoAbstraction.cs
+++ b/src/Renci.SshNet/Abstractions/CryptoAbstraction.cs
@@ -56,12 +56,16 @@ public static System.Security.Cryptography.RandomNumberGenerator CreateRandomNum
#endif // FEATURE_RNG_CREATE || FEATURE_RNG_CSP
#if FEATURE_HASH_MD5
- public static System.Security.Cryptography.MD5 CreateMD5()
+ public static System.Security.Cryptography.HashAlgorithm CreateMD5()
{
- return System.Security.Cryptography.MD5.Create();
+ // NOT FIPS
+ // return System.Security.Cryptography.MD5.Create();
+
+ // FIPS
+ return new System.Security.Cryptography.SHA1CryptoServiceProvider();
}
#else
- public static global::SshNet.Security.Cryptography.MD5 CreateMD5()
+ public static global::SshNet.Security.Cryptography.MD5 CreateMD5()
{
return new global::SshNet.Security.Cryptography.MD5();
}
@@ -71,7 +75,11 @@ public static System.Security.Cryptography.MD5 CreateMD5()
public static System.Security.Cryptography.SHA1 CreateSHA1()
{
#if FEATURE_HASH_SHA1_CREATE
- return System.Security.Cryptography.SHA1.Create();
+ // NOT FIPS
+ // return System.Security.Cryptography.SHA1.Create();
+
+ // FIPS
+ return new System.Security.Cryptography.SHA1CryptoServiceProvider();
#elif FEATURE_HASH_SHA1_MANAGED
return new System.Security.Cryptography.SHA1Managed();
#endif
@@ -87,7 +95,11 @@ public static System.Security.Cryptography.SHA1 CreateSHA1()
public static System.Security.Cryptography.SHA256 CreateSHA256()
{
#if FEATURE_HASH_SHA256_CREATE
- return System.Security.Cryptography.SHA256.Create();
+ // NOT FIPS
+ // return System.Security.Cryptography.SHA256.Create();
+
+ // FIPS
+ return new System.Security.Cryptography.SHA256CryptoServiceProvider();
#elif FEATURE_HASH_SHA256_MANAGED
return new System.Security.Cryptography.SHA256Managed();
#endif
@@ -103,7 +115,11 @@ public static System.Security.Cryptography.SHA256 CreateSHA256()
public static System.Security.Cryptography.SHA384 CreateSHA384()
{
#if FEATURE_HASH_SHA384_CREATE
- return System.Security.Cryptography.SHA384.Create();
+ // NOT FIPS
+ // return System.Security.Cryptography.SHA384.Create();
+
+ // FIPS
+ return new System.Security.Cryptography.SHA384CryptoServiceProvider();
#elif FEATURE_HASH_SHA384_MANAGED
return new System.Security.Cryptography.SHA384Managed();
#endif
@@ -119,7 +135,11 @@ public static System.Security.Cryptography.SHA384 CreateSHA384()
public static System.Security.Cryptography.SHA512 CreateSHA512()
{
#if FEATURE_HASH_SHA512_CREATE
- return System.Security.Cryptography.SHA512.Create();
+ // NOT FIPS
+ // return System.Security.Cryptography.SHA512.Create();
+
+ // FIPS
+ return new System.Security.Cryptography.SHA512CryptoServiceProvider();
#elif FEATURE_HASH_SHA512_MANAGED
return new System.Security.Cryptography.SHA512Managed();
#endif
diff --git a/src/Renci.SshNet/ConnectionInfo.cs b/src/Renci.SshNet/ConnectionInfo.cs
index f9b872d3c..6b3861d19 100644
--- a/src/Renci.SshNet/ConnectionInfo.cs
+++ b/src/Renci.SshNet/ConnectionInfo.cs
@@ -361,8 +361,11 @@ public ConnectionInfo(string host, int port, string username, ProxyTypes proxyTy
HmacAlgorithms = new Dictionary
{
- {"hmac-md5", new HashInfo(16*8, CryptoAbstraction.CreateHMACMD5)},
- {"hmac-md5-96", new HashInfo(16*8, key => CryptoAbstraction.CreateHMACMD5(key, 96))},
+ // NOT FIPS
+ //{"hmac-md5", new HashInfo(16*8, CryptoAbstraction.CreateHMACMD5)},
+ //{"hmac-md5-96", new HashInfo(16*8, key => CryptoAbstraction.CreateHMACMD5(key, 96))},
+
+ // FIPS
{"hmac-sha1", new HashInfo(20*8, CryptoAbstraction.CreateHMACSHA1)},
{"hmac-sha1-96", new HashInfo(20*8, key => CryptoAbstraction.CreateHMACSHA1(key, 96))},
{"hmac-sha2-256", new HashInfo(32*8, CryptoAbstraction.CreateHMACSHA256)},
diff --git a/src/Renci.SshNet/Properties/CommonAssemblyInfo.cs b/src/Renci.SshNet/Properties/CommonAssemblyInfo.cs
index 0425d1fba..e48bd598d 100644
--- a/src/Renci.SshNet/Properties/CommonAssemblyInfo.cs
+++ b/src/Renci.SshNet/Properties/CommonAssemblyInfo.cs
@@ -2,16 +2,16 @@
using System.Reflection;
using System.Runtime.InteropServices;
-[assembly: AssemblyDescription("SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism.")]
+[assembly: AssemblyDescription("SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism and with broad framework support. Updated to support FIPS cryptography restrictions.")]
[assembly: AssemblyCompany("Renci")]
[assembly: AssemblyProduct("SSH.NET")]
[assembly: AssemblyCopyright("Copyright © Renci 2010-2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("2017.0.0")]
-[assembly: AssemblyFileVersion("2017.0.0")]
-[assembly: AssemblyInformationalVersion("2017.0.0-beta1")]
+[assembly: AssemblyVersion("2017.1.0")]
+[assembly: AssemblyFileVersion("2017.1.0")]
+[assembly: AssemblyInformationalVersion("2017.1.0")]
[assembly: CLSCompliant(false)]
// Setting ComVisible to false makes the types in this assembly not visible