From 6e1436294082bd7412839b5d6796c105298be006 Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Mon, 23 Mar 2015 02:12:01 -0400 Subject: [PATCH 1/8] build: Add DLL configurations to wolfssl64.sln and all vcxproj files - Remove extern from declspec in WOLFSSL_API macro. - Add a property file to *.vcxproj so that $(DefaultPlatformToolset) is available. - Remove the specified platform toolset (VS 2012) in *.vcxproj. This change allows the projects to use $(DefaultPlatformToolset) so that they will be built using the default platform toolset for whatever version of Visual Studio 2010+ that loads them. - Add DLL Release and DLL Debug configurations to *.vcxproj except for sslSniffer.vcxproj. The sniffer uses internal library components that aren't exposed in the wolfSSL DLL so it can only be built by linking to CyaSSL's static lib. - Change intermediate output directory of obj files to \obj\. The purpose of this change is to separate the output files from the intermediate files because sometimes they can end up in the same dir. --- examples/client/client.vcxproj | 160 +++++++++++++++++- examples/client/client.vcxproj.props | 44 +++++ examples/echoclient/echoclient.vcxproj | 160 +++++++++++++++++- examples/echoclient/echoclient.vcxproj.props | 44 +++++ examples/echoserver/echoserver.vcxproj | 160 +++++++++++++++++- examples/echoserver/echoserver.vcxproj.props | 44 +++++ examples/server/server.vcxproj | 160 +++++++++++++++++- examples/server/server.vcxproj.props | 44 +++++ sslSniffer/sslSniffer.vcxproj | 15 +- sslSniffer/sslSniffer.vcxproj.props | 44 +++++ testsuite/testsuite.vcxproj | 160 +++++++++++++++++- testsuite/testsuite.vcxproj.props | 44 +++++ wolfssl.vcxproj | 167 +++++++++++++++++-- wolfssl.vcxproj.props | 44 +++++ wolfssl/wolfcrypt/visibility.h | 4 +- wolfssl64.sln | 58 ++++++- 16 files changed, 1300 insertions(+), 52 deletions(-) create mode 100644 examples/client/client.vcxproj.props create mode 100644 examples/echoclient/echoclient.vcxproj.props create mode 100644 examples/echoserver/echoserver.vcxproj.props create mode 100644 examples/server/server.vcxproj.props create mode 100644 sslSniffer/sslSniffer.vcxproj.props create mode 100644 testsuite/testsuite.vcxproj.props create mode 100644 wolfssl.vcxproj.props diff --git a/examples/client/client.vcxproj b/examples/client/client.vcxproj index 4442c56fd..eed2b0f81 100644 --- a/examples/client/client.vcxproj +++ b/examples/client/client.vcxproj @@ -9,6 +9,22 @@ Debug x64 + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + Release Win32 @@ -24,26 +40,41 @@ Win32Proj + Application - v110 + Unicode + true + + + Application Unicode true Application - v110 + Unicode + true + + + Application Unicode true Application - v110 + Unicode + + + Application Unicode Application - v110 + Unicode + + + Application Unicode @@ -52,34 +83,70 @@ + + + + + + + + + + + + <_ProjectFileVersion>11.0.61030.0 $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ true true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + false + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ false false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ @@ -101,6 +168,26 @@ false + + + Disabled + ../../;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + MachineX86 + + Disabled @@ -119,6 +206,24 @@ Console + + + Disabled + ../../;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + + MaxSpeed @@ -141,6 +246,28 @@ false + + + MaxSpeed + true + ../../;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + true + true + MachineX86 + + MaxSpeed @@ -162,6 +289,27 @@ true + + + MaxSpeed + true + ../../;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + true + true + + diff --git a/examples/client/client.vcxproj.props b/examples/client/client.vcxproj.props new file mode 100644 index 000000000..97cb4c2ec --- /dev/null +++ b/examples/client/client.vcxproj.props @@ -0,0 +1,44 @@ + + + + + + v100 + + $(DefaultPlatformToolset) + + diff --git a/examples/echoclient/echoclient.vcxproj b/examples/echoclient/echoclient.vcxproj index 342bb9ca5..5ca5d43ad 100644 --- a/examples/echoclient/echoclient.vcxproj +++ b/examples/echoclient/echoclient.vcxproj @@ -9,6 +9,22 @@ Debug x64 + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + Release Win32 @@ -24,26 +40,41 @@ Win32Proj + Application - v110 + Unicode + true + + + Application Unicode true Application - v110 + Unicode + true + + + Application Unicode true Application - v110 + Unicode + + + Application Unicode Application - v110 + Unicode + + + Application Unicode @@ -52,34 +83,70 @@ + + + + + + + + + + + + <_ProjectFileVersion>11.0.61030.0 $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ true true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + false + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ false false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ @@ -102,6 +169,26 @@ + + + Disabled + ../../;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + MachineX86 + + Disabled @@ -120,6 +207,24 @@ Console + + + Disabled + ../../;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + + MaxSpeed @@ -143,6 +248,28 @@ + + + MaxSpeed + true + ../../;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + true + true + MachineX86 + + MaxSpeed @@ -164,6 +291,27 @@ true + + + MaxSpeed + true + ../../;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + true + true + + diff --git a/examples/echoclient/echoclient.vcxproj.props b/examples/echoclient/echoclient.vcxproj.props new file mode 100644 index 000000000..97cb4c2ec --- /dev/null +++ b/examples/echoclient/echoclient.vcxproj.props @@ -0,0 +1,44 @@ + + + + + + v100 + + $(DefaultPlatformToolset) + + diff --git a/examples/echoserver/echoserver.vcxproj b/examples/echoserver/echoserver.vcxproj index a9c210cbd..09381a8f6 100644 --- a/examples/echoserver/echoserver.vcxproj +++ b/examples/echoserver/echoserver.vcxproj @@ -9,6 +9,22 @@ Debug x64 + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + Release Win32 @@ -24,26 +40,41 @@ Win32Proj + Application - v110 + Unicode + true + + + Application Unicode true Application - v110 + Unicode + true + + + Application Unicode true Application - v110 + Unicode + + + Application Unicode Application - v110 + Unicode + + + Application Unicode @@ -52,34 +83,70 @@ + + + + + + + + + + + + <_ProjectFileVersion>11.0.61030.0 $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ true true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + false + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ false false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ @@ -102,6 +169,26 @@ + + + Disabled + ../../;%(AdditionalIncludeDirectories) + USE_ANY_ADDR;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + MachineX86 + + Disabled @@ -120,6 +207,24 @@ Console + + + Disabled + ../../;%(AdditionalIncludeDirectories) + USE_ANY_ADDR;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + + MaxSpeed @@ -142,6 +247,28 @@ false + + + MaxSpeed + true + ../../;%(AdditionalIncludeDirectories) + USE_ANY_ADDR;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + true + true + MachineX86 + + MaxSpeed @@ -163,6 +290,27 @@ true + + + MaxSpeed + true + ../../;%(AdditionalIncludeDirectories) + USE_ANY_ADDR;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + true + true + + diff --git a/examples/echoserver/echoserver.vcxproj.props b/examples/echoserver/echoserver.vcxproj.props new file mode 100644 index 000000000..97cb4c2ec --- /dev/null +++ b/examples/echoserver/echoserver.vcxproj.props @@ -0,0 +1,44 @@ + + + + + + v100 + + $(DefaultPlatformToolset) + + diff --git a/examples/server/server.vcxproj b/examples/server/server.vcxproj index dc31fd672..6581aece5 100644 --- a/examples/server/server.vcxproj +++ b/examples/server/server.vcxproj @@ -9,6 +9,22 @@ Debug x64 + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + Release Win32 @@ -24,26 +40,41 @@ Win32Proj + Application - v110 + Unicode + true + + + Application Unicode true Application - v110 + Unicode + true + + + Application Unicode true Application - v110 + Unicode + + + Application Unicode Application - v110 + Unicode + + + Application Unicode @@ -52,34 +83,70 @@ + + + + + + + + + + + + <_ProjectFileVersion>11.0.61030.0 $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ true true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + false + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ false false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ @@ -102,6 +169,26 @@ + + + Disabled + ../../;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + MachineX86 + + Disabled @@ -120,6 +207,24 @@ Console + + + Disabled + ../../;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + + MaxSpeed @@ -143,6 +248,28 @@ + + + MaxSpeed + true + ../../;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + true + true + MachineX86 + + MaxSpeed @@ -164,6 +291,27 @@ true + + + MaxSpeed + true + ../../;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + true + true + + diff --git a/examples/server/server.vcxproj.props b/examples/server/server.vcxproj.props new file mode 100644 index 000000000..97cb4c2ec --- /dev/null +++ b/examples/server/server.vcxproj.props @@ -0,0 +1,44 @@ + + + + + + v100 + + $(DefaultPlatformToolset) + + diff --git a/sslSniffer/sslSniffer.vcxproj b/sslSniffer/sslSniffer.vcxproj index 7419737c1..f00bf8e4b 100644 --- a/sslSniffer/sslSniffer.vcxproj +++ b/sslSniffer/sslSniffer.vcxproj @@ -24,26 +24,23 @@ Win32Proj + DynamicLibrary - v110 Unicode true DynamicLibrary - v110 Unicode true DynamicLibrary - v110 Unicode DynamicLibrary - v110 Unicode @@ -67,19 +64,23 @@ $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ true true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ false false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ @@ -166,7 +167,7 @@ - + diff --git a/sslSniffer/sslSniffer.vcxproj.props b/sslSniffer/sslSniffer.vcxproj.props new file mode 100644 index 000000000..97cb4c2ec --- /dev/null +++ b/sslSniffer/sslSniffer.vcxproj.props @@ -0,0 +1,44 @@ + + + + + + v100 + + $(DefaultPlatformToolset) + + diff --git a/testsuite/testsuite.vcxproj b/testsuite/testsuite.vcxproj index f7d5f16b5..a8c748918 100644 --- a/testsuite/testsuite.vcxproj +++ b/testsuite/testsuite.vcxproj @@ -9,6 +9,22 @@ Debug x64 + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + Release Win32 @@ -24,26 +40,41 @@ Win32Proj + Application - v110 + Unicode + true + + + Application Unicode true Application - v110 + Unicode + true + + + Application Unicode true Application - v110 + Unicode + + + Application Unicode Application - v110 + Unicode + + + Application Unicode @@ -52,34 +83,70 @@ + + + + + + + + + + + + <_ProjectFileVersion>11.0.61030.0 $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ true true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + false + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ false false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ @@ -101,6 +168,26 @@ false + + + Disabled + ../;%(AdditionalIncludeDirectories) + NO_MAIN_DRIVER;WOLFSSL_RIPEMD;WOLFSSL_SHA512;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + MachineX86 + + Disabled @@ -119,6 +206,24 @@ Console + + + Disabled + ../;%(AdditionalIncludeDirectories) + NO_MAIN_DRIVER;WOLFSSL_RIPEMD;WOLFSSL_SHA512;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + + MaxSpeed @@ -141,6 +246,28 @@ false + + + MaxSpeed + true + ../;%(AdditionalIncludeDirectories) + NO_MAIN_DRIVER;WOLFSSL_RIPEMD;WOLFSSL_SHA512;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + true + true + MachineX86 + + MaxSpeed @@ -162,6 +289,27 @@ true + + + MaxSpeed + true + ../;%(AdditionalIncludeDirectories) + NO_MAIN_DRIVER;WOLFSSL_RIPEMD;WOLFSSL_SHA512;OPENSSL_EXTRA;NO_PSK;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + Ws2_32.lib;%(AdditionalDependencies) + true + Console + true + true + + diff --git a/testsuite/testsuite.vcxproj.props b/testsuite/testsuite.vcxproj.props new file mode 100644 index 000000000..97cb4c2ec --- /dev/null +++ b/testsuite/testsuite.vcxproj.props @@ -0,0 +1,44 @@ + + + + + + v100 + + $(DefaultPlatformToolset) + + diff --git a/wolfssl.vcxproj b/wolfssl.vcxproj index cf057198a..c4b6840a3 100644 --- a/wolfssl.vcxproj +++ b/wolfssl.vcxproj @@ -9,6 +9,22 @@ Debug x64 + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + Release Win32 @@ -24,26 +40,41 @@ Win32Proj + StaticLibrary - v110 + Unicode + true + + + DynamicLibrary Unicode true StaticLibrary - v110 + Unicode + true + + + DynamicLibrary Unicode true StaticLibrary - v110 + Unicode + + + DynamicLibrary Unicode StaticLibrary - v110 + Unicode + + + DynamicLibrary Unicode @@ -52,29 +83,60 @@ + + + + + + + + + + + + - - <_ProjectFileVersion>11.0.61030.0 + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ - - + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + $(SolutionDir)$(Configuration)\ - $(Configuration)\ + $(Configuration)\obj\ + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\obj\ + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\obj\ - Disabled @@ -89,6 +151,26 @@ 4206;4214;4706;%(DisableSpecificWarnings) + + + Disabled + ./;%(AdditionalIncludeDirectories) + OPENSSL_EXTRA;WOLFSSL_RIPEMD;WOLFSSL_SHA512;NO_PSK;BUILDING_WOLFSSL;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + EditAndContinue + 4206;4214;4706;%(DisableSpecificWarnings) + + + ws2_32.lib;%(AdditionalDependencies) + false + true + + Disabled @@ -103,6 +185,25 @@ 4206;4214;4706;%(DisableSpecificWarnings) + + + Disabled + ./;%(AdditionalIncludeDirectories) + OPENSSL_EXTRA;WOLFSSL_RIPEMD;WOLFSSL_SHA512;NO_PSK;BUILDING_WOLFSSL;WOLFSSL_DLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + ProgramDatabase + 4206;4214;4706;%(DisableSpecificWarnings) + + + ws2_32.lib;%(AdditionalDependencies) + false + true + + MaxSpeed @@ -116,6 +217,24 @@ ProgramDatabase + + + MaxSpeed + true + ./;%(AdditionalIncludeDirectories) + OPENSSL_EXTRA;WOLFSSL_RIPEMD;WOLFSSL_SHA512;NO_PSK;BUILDING_WOLFSSL;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + ws2_32.lib;%(AdditionalDependencies) + true + + MaxSpeed @@ -130,6 +249,24 @@ ProgramDatabase + + + MaxSpeed + true + ./;%(AdditionalIncludeDirectories) + OPENSSL_EXTRA;WOLFSSL_RIPEMD;WOLFSSL_SHA512;NO_PSK;BUILDING_WOLFSSL;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + ws2_32.lib;%(AdditionalDependencies) + true + + @@ -169,14 +306,20 @@ false + false ml64.exe /c /Zi /Fo"$(OutDir)%(Filename).obj" %(Identity) + ml64.exe /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) $(OutDir)%(Filename).obj + $(IntDir)%(Filename).obj false + false ml64.exe /c /Zi /Fo"$(OutDir)%(Filename).obj" %(Identity) + ml64.exe /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) $(OutDir)%(Filename).obj + $(IntDir)%(Filename).obj - + \ No newline at end of file diff --git a/wolfssl.vcxproj.props b/wolfssl.vcxproj.props new file mode 100644 index 000000000..97cb4c2ec --- /dev/null +++ b/wolfssl.vcxproj.props @@ -0,0 +1,44 @@ + + + + + + v100 + + $(DefaultPlatformToolset) + + diff --git a/wolfssl/wolfcrypt/visibility.h b/wolfssl/wolfcrypt/visibility.h index 05fd4754b..6e41d238f 100644 --- a/wolfssl/wolfcrypt/visibility.h +++ b/wolfssl/wolfcrypt/visibility.h @@ -47,7 +47,7 @@ #define WOLFSSL_LOCAL __hidden #elif defined(_MSC_VER) #ifdef WOLFSSL_DLL - #define WOLFSSL_API extern __declspec(dllexport) + #define WOLFSSL_API __declspec(dllexport) #else #define WOLFSSL_API #endif @@ -59,7 +59,7 @@ #else /* BUILDING_WOLFSSL */ #if defined(_MSC_VER) #ifdef WOLFSSL_DLL - #define WOLFSSL_API extern __declspec(dllimport) + #define WOLFSSL_API __declspec(dllimport) #else #define WOLFSSL_API #endif diff --git a/wolfssl64.sln b/wolfssl64.sln index 223ad75da..5e17787dc 100644 --- a/wolfssl64.sln +++ b/wolfssl64.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2012 for Windows Desktop +# Visual Studio 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolfssl", "wolfssl.vcxproj", "{73973223-5EE8-41CA-8E88-1D60E89A237B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsuite", "testsuite\testsuite.vcxproj", "{611E8971-46E0-4D0A-B5A1-632C3B00CB80}" @@ -19,6 +19,10 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Debug|x64 = DLL Debug|x64 + DLL Release|Win32 = DLL Release|Win32 + DLL Release|x64 = DLL Release|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection @@ -27,6 +31,14 @@ Global {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|Win32.Build.0 = Debug|Win32 {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|x64.ActiveCfg = Debug|x64 {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|x64.Build.0 = Debug|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Release|x64.Build.0 = DLL Release|x64 {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|Win32.ActiveCfg = Release|Win32 {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|Win32.Build.0 = Release|Win32 {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|x64.ActiveCfg = Release|x64 @@ -35,6 +47,14 @@ Global {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Debug|Win32.Build.0 = Debug|Win32 {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Debug|x64.ActiveCfg = Debug|x64 {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Debug|x64.Build.0 = Debug|x64 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.DLL Release|x64.Build.0 = DLL Release|x64 {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Release|Win32.ActiveCfg = Release|Win32 {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Release|Win32.Build.0 = Release|Win32 {611E8971-46E0-4D0A-B5A1-632C3B00CB80}.Release|x64.ActiveCfg = Release|x64 @@ -43,6 +63,10 @@ Global {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Debug|Win32.Build.0 = Debug|Win32 {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Debug|x64.ActiveCfg = Debug|x64 {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Debug|x64.Build.0 = Debug|x64 + {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.DLL Debug|x64.ActiveCfg = Debug|x64 + {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.DLL Release|Win32.ActiveCfg = Release|Win32 + {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.DLL Release|x64.ActiveCfg = Release|x64 {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Release|Win32.ActiveCfg = Release|Win32 {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Release|Win32.Build.0 = Release|Win32 {34FAE5A6-2B0F-4B55-86FE-0C43E4810F4D}.Release|x64.ActiveCfg = Release|x64 @@ -51,6 +75,14 @@ Global {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Debug|Win32.Build.0 = Debug|Win32 {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Debug|x64.ActiveCfg = Debug|x64 {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Debug|x64.Build.0 = Debug|x64 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {07D97C48-E08F-4E34-9F67-3064039FF2CB}.DLL Release|x64.Build.0 = DLL Release|x64 {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Release|Win32.ActiveCfg = Release|Win32 {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Release|Win32.Build.0 = Release|Win32 {07D97C48-E08F-4E34-9F67-3064039FF2CB}.Release|x64.ActiveCfg = Release|x64 @@ -59,6 +91,14 @@ Global {8362A816-C5DC-4E22-B5C5-9E6806387073}.Debug|Win32.Build.0 = Debug|Win32 {8362A816-C5DC-4E22-B5C5-9E6806387073}.Debug|x64.ActiveCfg = Debug|x64 {8362A816-C5DC-4E22-B5C5-9E6806387073}.Debug|x64.Build.0 = Debug|x64 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {8362A816-C5DC-4E22-B5C5-9E6806387073}.DLL Release|x64.Build.0 = DLL Release|x64 {8362A816-C5DC-4E22-B5C5-9E6806387073}.Release|Win32.ActiveCfg = Release|Win32 {8362A816-C5DC-4E22-B5C5-9E6806387073}.Release|Win32.Build.0 = Release|Win32 {8362A816-C5DC-4E22-B5C5-9E6806387073}.Release|x64.ActiveCfg = Release|x64 @@ -67,6 +107,14 @@ Global {3ADE9549-582D-4D8E-9826-B172197A7959}.Debug|Win32.Build.0 = Debug|Win32 {3ADE9549-582D-4D8E-9826-B172197A7959}.Debug|x64.ActiveCfg = Debug|x64 {3ADE9549-582D-4D8E-9826-B172197A7959}.Debug|x64.Build.0 = Debug|x64 + {3ADE9549-582D-4D8E-9826-B172197A7959}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3ADE9549-582D-4D8E-9826-B172197A7959}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3ADE9549-582D-4D8E-9826-B172197A7959}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {3ADE9549-582D-4D8E-9826-B172197A7959}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {3ADE9549-582D-4D8E-9826-B172197A7959}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3ADE9549-582D-4D8E-9826-B172197A7959}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3ADE9549-582D-4D8E-9826-B172197A7959}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {3ADE9549-582D-4D8E-9826-B172197A7959}.DLL Release|x64.Build.0 = DLL Release|x64 {3ADE9549-582D-4D8E-9826-B172197A7959}.Release|Win32.ActiveCfg = Release|Win32 {3ADE9549-582D-4D8E-9826-B172197A7959}.Release|Win32.Build.0 = Release|Win32 {3ADE9549-582D-4D8E-9826-B172197A7959}.Release|x64.ActiveCfg = Release|x64 @@ -75,6 +123,14 @@ Global {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Debug|Win32.Build.0 = Debug|Win32 {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Debug|x64.ActiveCfg = Debug|x64 {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Debug|x64.Build.0 = Debug|x64 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.DLL Release|x64.Build.0 = DLL Release|x64 {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Release|Win32.ActiveCfg = Release|Win32 {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Release|Win32.Build.0 = Release|Win32 {E9FB0BA5-BA46-4A59-A953-39C18CD1DCB1}.Release|x64.ActiveCfg = Release|x64 From b8b13ad9e9d7d0e5c55635e85e0d4bb4db38a660 Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Wed, 1 Apr 2015 02:05:15 -0400 Subject: [PATCH 2/8] build: Revert using MSBuild property files to auto-detect platform toolset Prior to this change I had added a .props file for each .vcxproj to use MSBuild's $(DefaultPlatformToolset) as the the default for $(PlatformToolset). Typically that configuration allows for the appropriate toolset to be used no matter which version of VS2010+ the wolfssl64.sln and project files are opened in. Problem is when an MSBuild was used from the command line to build the solution it got the $(DefaultPlatformToolset) from a property file based on the solution header (currently "Format Version 12.00" which maps to Visual Studio 2012) instead. Another side effect was it set the VisualStudioVersion to 11.0 (n - 1; n in this case 12.0) which was incorrect. To remedy the above this change reverts back to the old PlatformToolset method where the v110 toolset (Visual Studio 2012) is specified in every configuration in every vcxproj. The user will have to specify explicitly a different toolset to override it (either via command line or the GUI) if they are not using VS2012. VS2010 example: msbuild -p:Configuration="Debug" wolfssl64.sln -p:PlatformToolset=v100 --- examples/client/client.vcxproj | 9 +++- examples/client/client.vcxproj.props | 44 -------------------- examples/echoclient/echoclient.vcxproj | 9 +++- examples/echoclient/echoclient.vcxproj.props | 44 -------------------- examples/echoserver/echoserver.vcxproj | 9 +++- examples/echoserver/echoserver.vcxproj.props | 44 -------------------- examples/server/server.vcxproj | 9 +++- examples/server/server.vcxproj.props | 44 -------------------- sslSniffer/sslSniffer.vcxproj | 5 ++- sslSniffer/sslSniffer.vcxproj.props | 44 -------------------- testsuite/testsuite.vcxproj | 9 +++- testsuite/testsuite.vcxproj.props | 44 -------------------- wolfssl.vcxproj | 9 +++- wolfssl.vcxproj.props | 44 -------------------- 14 files changed, 52 insertions(+), 315 deletions(-) delete mode 100644 examples/client/client.vcxproj.props delete mode 100644 examples/echoclient/echoclient.vcxproj.props delete mode 100644 examples/echoserver/echoserver.vcxproj.props delete mode 100644 examples/server/server.vcxproj.props delete mode 100644 sslSniffer/sslSniffer.vcxproj.props delete mode 100644 testsuite/testsuite.vcxproj.props delete mode 100644 wolfssl.vcxproj.props diff --git a/examples/client/client.vcxproj b/examples/client/client.vcxproj index eed2b0f81..dec191d7a 100644 --- a/examples/client/client.vcxproj +++ b/examples/client/client.vcxproj @@ -40,41 +40,48 @@ Win32Proj - Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode Application + v110 Unicode Application + v110 Unicode Application + v110 Unicode diff --git a/examples/client/client.vcxproj.props b/examples/client/client.vcxproj.props deleted file mode 100644 index 97cb4c2ec..000000000 --- a/examples/client/client.vcxproj.props +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - v100 - - $(DefaultPlatformToolset) - - diff --git a/examples/echoclient/echoclient.vcxproj b/examples/echoclient/echoclient.vcxproj index 5ca5d43ad..a3a60545a 100644 --- a/examples/echoclient/echoclient.vcxproj +++ b/examples/echoclient/echoclient.vcxproj @@ -40,41 +40,48 @@ Win32Proj - Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode Application + v110 Unicode Application + v110 Unicode Application + v110 Unicode diff --git a/examples/echoclient/echoclient.vcxproj.props b/examples/echoclient/echoclient.vcxproj.props deleted file mode 100644 index 97cb4c2ec..000000000 --- a/examples/echoclient/echoclient.vcxproj.props +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - v100 - - $(DefaultPlatformToolset) - - diff --git a/examples/echoserver/echoserver.vcxproj b/examples/echoserver/echoserver.vcxproj index 09381a8f6..096ba75c6 100644 --- a/examples/echoserver/echoserver.vcxproj +++ b/examples/echoserver/echoserver.vcxproj @@ -40,41 +40,48 @@ Win32Proj - Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode Application + v110 Unicode Application + v110 Unicode Application + v110 Unicode diff --git a/examples/echoserver/echoserver.vcxproj.props b/examples/echoserver/echoserver.vcxproj.props deleted file mode 100644 index 97cb4c2ec..000000000 --- a/examples/echoserver/echoserver.vcxproj.props +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - v100 - - $(DefaultPlatformToolset) - - diff --git a/examples/server/server.vcxproj b/examples/server/server.vcxproj index 6581aece5..f6b53fc57 100644 --- a/examples/server/server.vcxproj +++ b/examples/server/server.vcxproj @@ -40,41 +40,48 @@ Win32Proj - Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode Application + v110 Unicode Application + v110 Unicode Application + v110 Unicode diff --git a/examples/server/server.vcxproj.props b/examples/server/server.vcxproj.props deleted file mode 100644 index 97cb4c2ec..000000000 --- a/examples/server/server.vcxproj.props +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - v100 - - $(DefaultPlatformToolset) - - diff --git a/sslSniffer/sslSniffer.vcxproj b/sslSniffer/sslSniffer.vcxproj index f00bf8e4b..56404e997 100644 --- a/sslSniffer/sslSniffer.vcxproj +++ b/sslSniffer/sslSniffer.vcxproj @@ -24,23 +24,26 @@ Win32Proj - DynamicLibrary + v110 Unicode true DynamicLibrary + v110 Unicode true DynamicLibrary + v110 Unicode DynamicLibrary + v110 Unicode diff --git a/sslSniffer/sslSniffer.vcxproj.props b/sslSniffer/sslSniffer.vcxproj.props deleted file mode 100644 index 97cb4c2ec..000000000 --- a/sslSniffer/sslSniffer.vcxproj.props +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - v100 - - $(DefaultPlatformToolset) - - diff --git a/testsuite/testsuite.vcxproj b/testsuite/testsuite.vcxproj index a8c748918..484a87584 100644 --- a/testsuite/testsuite.vcxproj +++ b/testsuite/testsuite.vcxproj @@ -40,41 +40,48 @@ Win32Proj - Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode true Application + v110 Unicode Application + v110 Unicode Application + v110 Unicode Application + v110 Unicode diff --git a/testsuite/testsuite.vcxproj.props b/testsuite/testsuite.vcxproj.props deleted file mode 100644 index 97cb4c2ec..000000000 --- a/testsuite/testsuite.vcxproj.props +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - v100 - - $(DefaultPlatformToolset) - - diff --git a/wolfssl.vcxproj b/wolfssl.vcxproj index c4b6840a3..8a95297e1 100644 --- a/wolfssl.vcxproj +++ b/wolfssl.vcxproj @@ -40,41 +40,48 @@ Win32Proj - StaticLibrary + v110 Unicode true DynamicLibrary + v110 Unicode true StaticLibrary + v110 Unicode true DynamicLibrary + v110 Unicode true StaticLibrary + v110 Unicode DynamicLibrary + v110 Unicode StaticLibrary + v110 Unicode DynamicLibrary + v110 Unicode diff --git a/wolfssl.vcxproj.props b/wolfssl.vcxproj.props deleted file mode 100644 index 97cb4c2ec..000000000 --- a/wolfssl.vcxproj.props +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - v100 - - $(DefaultPlatformToolset) - - From 0519085c69c12b706588a88b34a1c78cdd49fdab Mon Sep 17 00:00:00 2001 From: toddouska Date: Mon, 6 Apr 2015 11:40:51 -0700 Subject: [PATCH 3/8] add SOCKET_PEER_CLOSED_E vs general SOCKET_E for case where peer closes underlying transport w/o close notify --- src/internal.c | 8 ++++++++ wolfssl/error-ssl.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/internal.c b/src/internal.c index 4f644fd2f..39e3beb90 100644 --- a/src/internal.c +++ b/src/internal.c @@ -7589,6 +7589,8 @@ startScr: if (ssl->error == SOCKET_ERROR_E) { if (ssl->options.connReset || ssl->options.isClosed) { WOLFSSL_MSG("Peer reset or closed, connection done"); + ssl->error = SOCKET_PEER_CLOSED_E; + WOLFSSL_ERROR(ssl->error); return 0; /* peer reset or closed */ } } @@ -8002,6 +8004,12 @@ const char* wolfSSL_ERR_reason_error_string(unsigned long e) case DUPLICATE_MSG_E: return "Duplicate HandShake message Error"; + case SNI_UNSUPPORTED: + return "Protocol version does not support SNI Error"; + + case SOCKET_PEER_CLOSED_E: + return "Peer closed underlying transport Error"; + default : return "unknown error number"; } diff --git a/wolfssl/error-ssl.h b/wolfssl/error-ssl.h index 732240382..0df2edb6e 100644 --- a/wolfssl/error-ssl.h +++ b/wolfssl/error-ssl.h @@ -127,6 +127,7 @@ enum wolfSSL_ErrorCodes { SANITY_MSG_E = -394, /* Sanity check on msg order error */ DUPLICATE_MSG_E = -395, /* Duplicate message error */ SNI_UNSUPPORTED = -396, /* SSL 3.0 does not support SNI */ + SOCKET_PEER_CLOSED_E = -397, /* Underlying transport closed */ /* add strings to SetErrorString !!!!! */ From aef879dc206ac5c0a171c6dfe43614b3ad963859 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Mon, 6 Apr 2015 15:06:56 -0700 Subject: [PATCH 4/8] Updated iOS FIPS project, bump version --- IDE/iOS/README.md | 3 +++ IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj | 2 ++ README | 15 ++++++++++++++- README.md | 13 +++++++++++++ configure.ac | 2 +- support/wolfssl.pc | 2 +- wolfssl/version.h | 4 ++-- 7 files changed, 36 insertions(+), 5 deletions(-) diff --git a/IDE/iOS/README.md b/IDE/iOS/README.md index e9e781b49..a81152fb0 100644 --- a/IDE/iOS/README.md +++ b/IDE/iOS/README.md @@ -67,6 +67,9 @@ for "Preprocessor Macros" and add the following under both `Release` and * `WOLFSSL_SHA512` * `WOLFSSL_SHA384` +The approved FIPS source files are from the CyaSSL project v3.4.8.fips. The FIPS +and FIPS-TEST files are from our FIPS project v3.4.8.fips. For the wolfCAVP test +the wolfSSL version used is v3.4.8. # Using the FIPS library diff --git a/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj b/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj index 001bdf155..be5f32085 100644 --- a/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj +++ b/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj @@ -917,6 +917,7 @@ $SRCROOT, $PROJECT_DIR/../.., ); + IPHONEOS_DEPLOYMENT_TARGET = 8.1; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = wolfssl; @@ -947,6 +948,7 @@ $SRCROOT, $PROJECT_DIR/../.., ); + IPHONEOS_DEPLOYMENT_TARGET = 8.1; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = wolfssl; diff --git a/README b/README index d9e982f38..f5c77acc5 100644 --- a/README +++ b/README @@ -37,7 +37,20 @@ before calling wolfSSL_new(); Though it's not recommended. - GNU Binutils 2.24 ld has problems with some debug builds, to fix an ld error add -fdebug-types-section to C_EXTRA_FLAGS -wolfSSL (Formerly CyaSSL) Release 3.4.6 (03/30/2015) +wolfSSL (Formerly CyaSSL) Release 3.4.8 (04/06/2015) + +Release 3.4.8 of wolfSSL has bug fixes and new features including: + +- FIPS version submitted for iOS. +- Max Strength build that only allows TLSv1.2, AEAD ciphers, and PFS. +- Improvements to usage of time code. +- Improvements to VS solution files. + +See INSTALL file for build instructions. +More info can be found on-line at //http://wolfssl.com/yaSSL/Docs.html + + + *****************wolfSSL (Formerly CyaSSL) Release 3.4.6 (03/30/2015) Release 3.4.6 of wolfSSL has bug fixes and new features including: diff --git a/README.md b/README.md index 59c77e37c..a490ac2ff 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,19 @@ before calling wolfSSL_new(); Though it's not recommended. - GNU Binutils 2.24 ld has problems with some debug builds, to fix an ld error add -fdebug-types-section to C_EXTRA_FLAGS +#wolfSSL (Formerly CyaSSL) Release 3.4.8 (04/06/2015) + +##Release 3.4.8 of wolfSSL has bug fixes and new features including: + +- FIPS version submitted for iOS. +- Max Strength build that only allows TLSv1.2, AEAD ciphers, and PFS. +- Improvements to usage of time code. +- Improvements to VS solution files. + +See INSTALL file for build instructions. +More info can be found on-line at //http://wolfssl.com/yaSSL/Docs.html + + #wolfSSL (Formerly CyaSSL) Release 3.4.6 (03/30/2015) ##Release 3.4.6 of wolfSSL has bug fixes and new features including: diff --git a/configure.ac b/configure.ac index 45a687368..cdad2c153 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ # # -AC_INIT([wolfssl],[3.4.7],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[http://www.wolfssl.com]) +AC_INIT([wolfssl],[3.4.8],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[http://www.wolfssl.com]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/support/wolfssl.pc b/support/wolfssl.pc index 1265e7ce0..c07ae3ea2 100644 --- a/support/wolfssl.pc +++ b/support/wolfssl.pc @@ -5,6 +5,6 @@ includedir=${prefix}/include Name: wolfssl Description: wolfssl C library. -Version: 3.4.7 +Version: 3.4.8 Libs: -L${libdir} -lwolfssl Cflags: -I${includedir} diff --git a/wolfssl/version.h b/wolfssl/version.h index 54e92ffc0..c76e07613 100644 --- a/wolfssl/version.h +++ b/wolfssl/version.h @@ -26,8 +26,8 @@ extern "C" { #endif -#define LIBWOLFSSL_VERSION_STRING "3.4.7" -#define LIBWOLFSSL_VERSION_HEX 0x03004007 +#define LIBWOLFSSL_VERSION_STRING "3.4.8" +#define LIBWOLFSSL_VERSION_HEX 0x03004008 #ifdef __cplusplus } From e17d452f9b70fc6718c03c0362dffc1cd96725f4 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Mon, 6 Apr 2015 16:12:50 -0700 Subject: [PATCH 5/8] Updated Xcode projects for missing headers --- IDE/iOS/README.md | 11 ++++------- IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj | 2 +- IDE/iOS/wolfssl.xcodeproj/project.pbxproj | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/IDE/iOS/README.md b/IDE/iOS/README.md index a81152fb0..519520e56 100644 --- a/IDE/iOS/README.md +++ b/IDE/iOS/README.md @@ -28,13 +28,10 @@ order. # Building libwolfssl.a -## Debug build - -## Release build - -A release build requires an Apple Developer account, as far as I can tell. I -have not tried this yet. +There are several options of builds. You can make a simulator build, or a +device build. Both are debug builds. +You can make an archive for a device, as well. That is a release build. # Installing libwolfssl.a @@ -68,7 +65,7 @@ for "Preprocessor Macros" and add the following under both `Release` and * `WOLFSSL_SHA384` The approved FIPS source files are from the CyaSSL project v3.4.8.fips. The FIPS -and FIPS-TEST files are from our FIPS project v3.4.8.fips. For the wolfCAVP test +and FIPS-TEST files are from our FIPS project v3.4.8. For the wolfCAVP test the wolfSSL version used is v3.4.8. # Using the FIPS library diff --git a/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj b/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj index be5f32085..1f14345f9 100644 --- a/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj +++ b/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj @@ -295,7 +295,7 @@ isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = include/wolfssl; - dstSubfolderSpec = 16; + dstSubfolderSpec = 7; files = ( 521646C41A8A7FE10062516A /* callbacks.h in CopyFiles */, 521646C51A8A7FE10062516A /* certs_test.h in CopyFiles */, diff --git a/IDE/iOS/wolfssl.xcodeproj/project.pbxproj b/IDE/iOS/wolfssl.xcodeproj/project.pbxproj index 14fd4e4d6..0de405b73 100644 --- a/IDE/iOS/wolfssl.xcodeproj/project.pbxproj +++ b/IDE/iOS/wolfssl.xcodeproj/project.pbxproj @@ -283,7 +283,7 @@ isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = include/wolfssl; - dstSubfolderSpec = 16; + dstSubfolderSpec = 7; files = ( 521646C41A8A7FE10062516A /* callbacks.h in CopyFiles */, 521646C51A8A7FE10062516A /* certs_test.h in CopyFiles */, From 875ad2dc8ef33eb13090e46a82b37609945e66df Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 7 Apr 2015 13:41:29 -0700 Subject: [PATCH 6/8] forced iphone os deployment version to 8.1 in FIPS project --- IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj b/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj index 1f14345f9..d903641b8 100644 --- a/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj +++ b/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj @@ -865,7 +865,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; USER_HEADER_SEARCH_PATHS = "wolfssl/wolfcrypt wolfssl include"; @@ -888,7 +888,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; SDKROOT = iphoneos; USER_HEADER_SEARCH_PATHS = "wolfssl/wolfcrypt wolfssl include"; VALIDATE_PRODUCT = NO; From cf95bc23bb7db590bdc9accbb0444d8b4dd0f37a Mon Sep 17 00:00:00 2001 From: toddouska Date: Tue, 7 Apr 2015 14:57:40 -0700 Subject: [PATCH 7/8] on process server_key_exchange only do hash(es) required --- src/internal.c | 194 ++++++++++++++++++++++++++++++++------------ wolfcrypt/src/asn.c | 5 +- 2 files changed, 143 insertions(+), 56 deletions(-) diff --git a/src/internal.c b/src/internal.c index 39e3beb90..ab13a56a5 100644 --- a/src/internal.c +++ b/src/internal.c @@ -9977,6 +9977,20 @@ static void PickHashSigAlgo(WOLFSSL* ssl, byte sigAlgo = ssl->specs.sig_algo; word16 verifySz = (word16) (*inOutIdx - begin); +#ifndef NO_OLD_TLS + byte doMd5 = 0; + byte doSha = 0; +#endif +#ifndef NO_SHA256 + byte doSha256 = 0; +#endif +#ifdef WOLFSSL_SHA384 + byte doSha384 = 0; +#endif +#ifdef WOLFSSL_SHA512 + byte doSha512 = 0; +#endif + (void)hash; (void)sigAlgo; (void)hashAlgo; @@ -9995,11 +10009,60 @@ static void PickHashSigAlgo(WOLFSSL* ssl, XMEMCPY(messageVerify, input + begin, verifySz); if (IsAtLeastTLSv1_2(ssl)) { + byte setHash = 0; if ((*inOutIdx - begin) + ENUM_LEN + ENUM_LEN > size) ERROR_OUT(BUFFER_ERROR, done); hashAlgo = input[(*inOutIdx)++]; sigAlgo = input[(*inOutIdx)++]; + + switch (hashAlgo) { + case sha512_mac: + #ifdef WOLFSSL_SHA512 + doSha512 = 1; + setHash = 1; + #endif + break; + + case sha384_mac: + #ifdef WOLFSSL_SHA384 + doSha384 = 1; + setHash = 1; + #endif + break; + + case sha256_mac: + #ifndef NO_SHA256 + doSha256 = 1; + setHash = 1; + #endif + break; + + case sha_mac: + #ifndef NO_OLD_TLS + doSha = 1; + setHash = 1; + #endif + break; + + default: + ERROR_OUT(ALGO_ID_E, done); + } + + if (setHash == 0) { + ERROR_OUT(ALGO_ID_E, done); + } + + } else { + /* only using sha and md5 for rsa */ + #ifndef NO_OLD_TLS + doSha = 1; + if (sigAlgo == rsa_sa_algo) { + doMd5 = 1; + } + #else + ERROR_OUT(ALGO_ID_E, done); + #endif } /* signature */ @@ -10024,83 +10087,104 @@ static void PickHashSigAlgo(WOLFSSL* ssl, #ifndef NO_OLD_TLS /* md5 */ #ifdef WOLFSSL_SMALL_STACK - md5 = (Md5*)XMALLOC(sizeof(Md5), NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (md5 == NULL) - ERROR_OUT(MEMORY_E, done); + if (doMd5) { + md5 = (Md5*)XMALLOC(sizeof(Md5), NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (md5 == NULL) + ERROR_OUT(MEMORY_E, done); + } #endif - wc_InitMd5(md5); - wc_Md5Update(md5, ssl->arrays->clientRandom, RAN_LEN); - wc_Md5Update(md5, ssl->arrays->serverRandom, RAN_LEN); - wc_Md5Update(md5, messageVerify, verifySz); - wc_Md5Final(md5, hash); - + if (doMd5) { + wc_InitMd5(md5); + wc_Md5Update(md5, ssl->arrays->clientRandom, RAN_LEN); + wc_Md5Update(md5, ssl->arrays->serverRandom, RAN_LEN); + wc_Md5Update(md5, messageVerify, verifySz); + wc_Md5Final(md5, hash); + } /* sha */ #ifdef WOLFSSL_SMALL_STACK - sha = (Sha*)XMALLOC(sizeof(Sha), NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (sha == NULL) - ERROR_OUT(MEMORY_E, done); + if (doSha) { + sha = (Sha*)XMALLOC(sizeof(Sha), NULL, DYNAMIC_TYPE_TMP_BUFFER); + if (sha == NULL) + ERROR_OUT(MEMORY_E, done); + } #endif - ret = wc_InitSha(sha); - if (ret != 0) - goto done; - wc_ShaUpdate(sha, ssl->arrays->clientRandom, RAN_LEN); - wc_ShaUpdate(sha, ssl->arrays->serverRandom, RAN_LEN); - wc_ShaUpdate(sha, messageVerify, verifySz); - wc_ShaFinal(sha, hash + MD5_DIGEST_SIZE); + if (doSha) { + ret = wc_InitSha(sha); + if (ret != 0) goto done; + wc_ShaUpdate(sha, ssl->arrays->clientRandom, RAN_LEN); + wc_ShaUpdate(sha, ssl->arrays->serverRandom, RAN_LEN); + wc_ShaUpdate(sha, messageVerify, verifySz); + wc_ShaFinal(sha, hash + MD5_DIGEST_SIZE); + } #endif #ifndef NO_SHA256 #ifdef WOLFSSL_SMALL_STACK - sha256 = (Sha256*)XMALLOC(sizeof(Sha256), NULL, + if (doSha256) { + sha256 = (Sha256*)XMALLOC(sizeof(Sha256), NULL, DYNAMIC_TYPE_TMP_BUFFER); - hash256 = (byte*)XMALLOC(SHA256_DIGEST_SIZE, NULL, + hash256 = (byte*)XMALLOC(SHA256_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (sha256 == NULL || hash256 == NULL) - ERROR_OUT(MEMORY_E, done); + if (sha256 == NULL || hash256 == NULL) + ERROR_OUT(MEMORY_E, done); + } #endif - if (!(ret = wc_InitSha256(sha256)) - && !(ret = wc_Sha256Update(sha256, ssl->arrays->clientRandom, RAN_LEN)) - && !(ret = wc_Sha256Update(sha256, ssl->arrays->serverRandom, RAN_LEN)) - && !(ret = wc_Sha256Update(sha256, messageVerify, verifySz))) - ret = wc_Sha256Final(sha256, hash256); - if (ret != 0) - goto done; + if (doSha256) { + if (!(ret = wc_InitSha256(sha256)) + && !(ret = wc_Sha256Update(sha256, ssl->arrays->clientRandom, + RAN_LEN)) + && !(ret = wc_Sha256Update(sha256, ssl->arrays->serverRandom, + RAN_LEN)) + && !(ret = wc_Sha256Update(sha256, messageVerify, verifySz))) + ret = wc_Sha256Final(sha256, hash256); + if (ret != 0) goto done; + } #endif #ifdef WOLFSSL_SHA384 #ifdef WOLFSSL_SMALL_STACK - sha384 = (Sha384*)XMALLOC(sizeof(Sha384), NULL, + if (doSha384) { + sha384 = (Sha384*)XMALLOC(sizeof(Sha384), NULL, DYNAMIC_TYPE_TMP_BUFFER); - hash384 = (byte*)XMALLOC(SHA384_DIGEST_SIZE, NULL, + hash384 = (byte*)XMALLOC(SHA384_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (sha384 == NULL || hash384 == NULL) - ERROR_OUT(MEMORY_E, done); + if (sha384 == NULL || hash384 == NULL) + ERROR_OUT(MEMORY_E, done); + } #endif - if (!(ret = wc_InitSha384(sha384)) - && !(ret = wc_Sha384Update(sha384, ssl->arrays->clientRandom, RAN_LEN)) - && !(ret = wc_Sha384Update(sha384, ssl->arrays->serverRandom, RAN_LEN)) - && !(ret = wc_Sha384Update(sha384, messageVerify, verifySz))) - ret = wc_Sha384Final(sha384, hash384); - if (ret != 0) - goto done; + if (doSha384) { + if (!(ret = wc_InitSha384(sha384)) + && !(ret = wc_Sha384Update(sha384, ssl->arrays->clientRandom, + RAN_LEN)) + && !(ret = wc_Sha384Update(sha384, ssl->arrays->serverRandom, + RAN_LEN)) + && !(ret = wc_Sha384Update(sha384, messageVerify, verifySz))) + ret = wc_Sha384Final(sha384, hash384); + if (ret != 0) goto done; + } #endif #ifdef WOLFSSL_SHA512 #ifdef WOLFSSL_SMALL_STACK - sha512 = (Sha512*)XMALLOC(sizeof(Sha512), NULL, + if (doSha512) { + sha512 = (Sha512*)XMALLOC(sizeof(Sha512), NULL, DYNAMIC_TYPE_TMP_BUFFER); - hash512 = (byte*)XMALLOC(SHA512_DIGEST_SIZE, NULL, + hash512 = (byte*)XMALLOC(SHA512_DIGEST_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); - if (sha512 == NULL || hash512 == NULL) - ERROR_OUT(MEMORY_E, done); + if (sha512 == NULL || hash512 == NULL) + ERROR_OUT(MEMORY_E, done); + } #endif - if (!(ret = wc_InitSha512(sha512)) - && !(ret = wc_Sha512Update(sha512, ssl->arrays->clientRandom, RAN_LEN)) - && !(ret = wc_Sha512Update(sha512, ssl->arrays->serverRandom, RAN_LEN)) - && !(ret = wc_Sha512Update(sha512, messageVerify, verifySz))) - ret = wc_Sha512Final(sha512, hash512); - if (ret != 0) - goto done; + if (doSha512) { + if (!(ret = wc_InitSha512(sha512)) + && !(ret = wc_Sha512Update(sha512, ssl->arrays->clientRandom, + RAN_LEN)) + && !(ret = wc_Sha512Update(sha512, ssl->arrays->serverRandom, + RAN_LEN)) + && !(ret = wc_Sha512Update(sha512, messageVerify, verifySz))) + ret = wc_Sha512Final(sha512, hash512); + if (ret != 0) goto done; + } #endif #ifndef NO_RSA @@ -10186,8 +10270,10 @@ static void PickHashSigAlgo(WOLFSSL* ssl, ERROR_OUT(MEMORY_E, done); #endif - encSigSz = wc_EncodeSignature(encodedSig, digest, digestSz, typeH); - + if (digest == NULL) + ERROR_OUT(ALGO_ID_E, done); + encSigSz = wc_EncodeSignature(encodedSig, digest, digestSz, + typeH); if (encSigSz != verifiedSz || !out || XMEMCMP(out, encodedSig, min(encSigSz, MAX_ENCODED_SIG_SZ)) != 0) ret = VERIFY_SIGN_ERROR; diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 399753ab3..634623bee 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -2931,12 +2931,13 @@ WOLFSSL_LOCAL word32 SetAlgoID(int algoOID, byte* output, int type, int curveSz) } -word32 wc_EncodeSignature(byte* out, const byte* digest, word32 digSz, int hashOID) +word32 wc_EncodeSignature(byte* out, const byte* digest, word32 digSz, + int hashOID) { byte digArray[MAX_ENCODED_DIG_SZ]; byte algoArray[MAX_ALGO_SZ]; byte seqArray[MAX_SEQ_SZ]; - word32 encDigSz, algoSz, seqSz; + word32 encDigSz, algoSz, seqSz; encDigSz = SetDigest(digest, digSz, digArray); algoSz = SetAlgoID(hashOID, algoArray, hashType, 0); From ea585e9b1989643259dc9b738015e07a361913a0 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 7 Apr 2015 16:00:12 -0700 Subject: [PATCH 8/8] Updated iOS readme. Turned off unused wolfCrypt options in iOS FIPS build. --- IDE/iOS/README.md | 19 ++++++++++++------- .../wolfssl-FIPS.xcodeproj/project.pbxproj | 8 ++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/IDE/iOS/README.md b/IDE/iOS/README.md index 519520e56..f4525176c 100644 --- a/IDE/iOS/README.md +++ b/IDE/iOS/README.md @@ -63,10 +63,15 @@ for "Preprocessor Macros" and add the following under both `Release` and * `HAVE_AESGCM` * `WOLFSSL_SHA512` * `WOLFSSL_SHA384` +* `NO_MD4` +* `NO_HC128` +* `NO_RABBIT` +* `NO_DSA` +* `NO_PWDBASED` -The approved FIPS source files are from the CyaSSL project v3.4.8.fips. The FIPS -and FIPS-TEST files are from our FIPS project v3.4.8. For the wolfCAVP test -the wolfSSL version used is v3.4.8. +The approved FIPS source files are from the CyaSSL project tag v3.4.8.fips. The +files fips.c and fips_test.c, and the wolfCAVP test app are from the FIPS +project tag v3.4.8a. The wolfSSL/wolfCrypt files are from tag v3.4.8. # Using the FIPS library @@ -80,7 +85,7 @@ Every time the application is changed, the FIPS checksum will change, because the FIPS library's position in the executable may change. You need to add something to your application that will output the verifyCore -value to be used. The verifyCore in fips_test.c will need to be updated with this -value, the library rebuilt, and relinked into your application. The application -should not be changed during this process or the verifyCore check will fail again. - +value to be used. The verifyCore in fips_test.c will need to be updated with +this value, the library rebuilt, and relinked into your application. The +application should not be changed during this process or the verifyCore check +will fail again. diff --git a/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj b/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj index d903641b8..06011aecd 100644 --- a/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj +++ b/IDE/iOS/wolfssl-FIPS.xcodeproj/project.pbxproj @@ -911,6 +911,10 @@ HAVE_AESGCM, WOLFSSL_SHA512, WOLFSSL_SHA384, + NO_MD4, + NO_HC128, + NO_RABBIT, + NO_DSA, NO_PWDBASED, ); HEADER_SEARCH_PATHS = ( @@ -942,6 +946,10 @@ HAVE_AESGCM, WOLFSSL_SHA512, WOLFSSL_SHA384, + NO_MD4, + NO_HC128, + NO_RABBIT, + NO_DSA, NO_PWDBASED, ); HEADER_SEARCH_PATHS = (