diff --git a/.github/workflows/freertos_plus_demos.yml b/.github/workflows/freertos_plus_demos.yml
index a3b4b7007b..79fee021b6 100644
--- a/.github/workflows/freertos_plus_demos.yml
+++ b/.github/workflows/freertos_plus_demos.yml
@@ -733,10 +733,6 @@ jobs:
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator
run: msbuild FreeRTOS_Plus_UDP_with_CLI.sln -t:rebuild -property:Configuration=Debug -m
- - name: Build FreeRTOS+WolfSSL FIPS Demo
- working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator
- run: msbuild FreeRTOS_Plus_WolfSSL.sln -t:rebuild -property:Configuration=Debug -m
-
- name: Build FreeRTOS+TCP IPv6 Demo
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_IPv6_Demo/IPv6_Multi_WinSim_demo
run: msbuild FreeRTOS_Plus_TCP_IPv6_Multi.sln -t:rebuild -property:Configuration=Debug -m
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/FreeRTOS_Plus_WolfSSL.sln b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/FreeRTOS_Plus_WolfSSL.sln
deleted file mode 100644
index 95cc5103f5..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/FreeRTOS_Plus_WolfSSL.sln
+++ /dev/null
@@ -1,86 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.32929.386
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeRTOS_Plus_WolfSSL", "FreeRTOS_Plus_WolfSSL.vcxproj", "{60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeRTOS+TCP", "..\..\VisualStudio_StaticProjects\FreeRTOS+TCP\FreeRTOS+TCP.vcxproj", "{C90E6CC5-818B-4C97-8876-0986D989387C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeRTOS-Kernel", "..\..\VisualStudio_StaticProjects\FreeRTOS-Kernel\FreeRTOS-Kernel.vcxproj", "{72C209C4-49A4-4942-A201-44706C9D77EC}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Logging", "..\..\VisualStudio_StaticProjects\Logging\Logging.vcxproj", "{BE362AC0-B10B-4276-B84E-6304652BA228}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Statically Linked Libraries", "Statically Linked Libraries", "{47B3A148-EE71-4F1C-A12A-F9710200C254}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Debug|Win32.ActiveCfg = Debug|Win32
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Debug|Win32.Build.0 = Debug|Win32
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Debug|x64.ActiveCfg = Debug|x64
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Debug|x64.Build.0 = Debug|x64
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Debug|x86.ActiveCfg = Debug|Win32
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Debug|x86.Build.0 = Debug|Win32
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Release|Win32.ActiveCfg = Release|Win32
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Release|Win32.Build.0 = Release|Win32
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Release|x64.ActiveCfg = Release|x64
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Release|x64.Build.0 = Release|x64
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Release|x86.ActiveCfg = Release|Win32
- {60C50F90-C5B6-46E1-B41B-5C7B7C17BE82}.Release|x86.Build.0 = Release|Win32
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Debug|Win32.ActiveCfg = Debug|Win32
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Debug|Win32.Build.0 = Debug|Win32
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Debug|x64.ActiveCfg = Debug|x64
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Debug|x64.Build.0 = Debug|x64
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Debug|x86.ActiveCfg = Debug|Win32
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Debug|x86.Build.0 = Debug|Win32
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Release|Win32.ActiveCfg = Release|Win32
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Release|Win32.Build.0 = Release|Win32
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Release|x64.ActiveCfg = Release|x64
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Release|x64.Build.0 = Release|x64
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Release|x86.ActiveCfg = Release|Win32
- {C90E6CC5-818B-4C97-8876-0986D989387C}.Release|x86.Build.0 = Release|Win32
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Debug|Win32.ActiveCfg = Debug|Win32
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Debug|Win32.Build.0 = Debug|Win32
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Debug|x64.ActiveCfg = Debug|x64
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Debug|x64.Build.0 = Debug|x64
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Debug|x86.ActiveCfg = Debug|Win32
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Debug|x86.Build.0 = Debug|Win32
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Release|Win32.ActiveCfg = Release|Win32
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Release|Win32.Build.0 = Release|Win32
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Release|x64.ActiveCfg = Release|x64
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Release|x64.Build.0 = Release|x64
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Release|x86.ActiveCfg = Release|Win32
- {72C209C4-49A4-4942-A201-44706C9D77EC}.Release|x86.Build.0 = Release|Win32
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Debug|Win32.ActiveCfg = Debug|Win32
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Debug|Win32.Build.0 = Debug|Win32
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Debug|x64.ActiveCfg = Debug|x64
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Debug|x64.Build.0 = Debug|x64
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Debug|x86.ActiveCfg = Debug|Win32
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Debug|x86.Build.0 = Debug|Win32
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Release|Win32.ActiveCfg = Release|Win32
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Release|Win32.Build.0 = Release|Win32
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Release|x64.ActiveCfg = Release|x64
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Release|x64.Build.0 = Release|x64
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Release|x86.ActiveCfg = Release|Win32
- {BE362AC0-B10B-4276-B84E-6304652BA228}.Release|x86.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {C90E6CC5-818B-4C97-8876-0986D989387C} = {47B3A148-EE71-4F1C-A12A-F9710200C254}
- {72C209C4-49A4-4942-A201-44706C9D77EC} = {47B3A148-EE71-4F1C-A12A-F9710200C254}
- {BE362AC0-B10B-4276-B84E-6304652BA228} = {47B3A148-EE71-4F1C-A12A-F9710200C254}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {A7B4BB00-8925-4FDA-B434-783DE200DAB4}
- EndGlobalSection
-EndGlobal
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/FreeRTOS_Plus_WolfSSL.vcxproj b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/FreeRTOS_Plus_WolfSSL.vcxproj
deleted file mode 100644
index c7aef42d4a..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/FreeRTOS_Plus_WolfSSL.vcxproj
+++ /dev/null
@@ -1,301 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {c90e6cc5-818b-4c97-8876-0986d989387c}
-
-
- {72c209c4-49a4-4942-a201-44706c9d77ec}
-
-
- {be362ac0-b10b-4276-b84e-6304652ba228}
-
-
-
- 16.0
- Win32Proj
- {60c50f90-c5b6-46e1-b41b-5c7b7c17be82}
- FreeRTOSPlusWolfSSL
- 10.0
-
-
-
- Application
- true
- v142
- Unicode
-
-
- Application
- false
- v142
- true
- Unicode
-
-
- Application
- true
- v142
- Unicode
-
-
- Application
- false
- v142
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
- false
-
-
- true
-
-
- false
-
-
-
- Level3
- true
- WOLFSSL_USER_SETTINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WOLFSSL_IGNORE_FILE_WARN
- true
- ..\..\ThirdParty\WolfSSL-FIPS-Ready;.;%(AdditionalIncludeDirectories)
-
-
- Console
- true
-
-
-
-
- Level3
- true
- true
- true
- WOLFSSL_USER_SETTINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WOLFSSL_IGNORE_FILE_WARN
- true
- ..\..\ThirdParty\WolfSSL-FIPS-Ready;.;%(AdditionalIncludeDirectories)
-
-
- Console
- true
- true
- true
-
-
-
-
- Level3
- true
- WOLFSSL_USER_SETTINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WOLFSSL_IGNORE_FILE_WARN
- true
- ..\..\ThirdParty\WolfSSL-FIPS-Ready;.;%(AdditionalIncludeDirectories)
-
-
- Console
- true
-
-
-
-
- Level3
- true
- true
- true
- WOLFSSL_USER_SETTINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WOLFSSL_IGNORE_FILE_WARN
- true
- ..\..\ThirdParty\WolfSSL-FIPS-Ready;.;%(AdditionalIncludeDirectories)
-
-
- Console
- true
- true
- true
-
-
-
-
-
-
\ No newline at end of file
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/FreeRTOS_Plus_WolfSSL.vcxproj.filters b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/FreeRTOS_Plus_WolfSSL.vcxproj.filters
deleted file mode 100644
index aeb53f5e6e..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/FreeRTOS_Plus_WolfSSL.vcxproj.filters
+++ /dev/null
@@ -1,437 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
- {56c6548d-8e4e-4531-b6d4-9bc1815c433b}
-
-
- {fc2c3fac-3ef3-4c68-be08-7dbf181b41c2}
-
-
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL
-
-
- wolfSSL
-
-
- wolfSSL
-
-
- wolfSSL
-
-
- wolfSSL
-
-
- wolfSSL
-
-
- wolfSSL
-
-
- wolfSSL
-
-
- wolfSSL
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- wolfSSL\wolfcrypt
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Header Files
-
-
-
\ No newline at end of file
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/README_wolfSSL_FIPS_ready.md b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/README_wolfSSL_FIPS_ready.md
deleted file mode 100644
index fcf3313b90..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/README_wolfSSL_FIPS_ready.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# wolfSSL FIPS-Ready
-
-# Overview
-Federal Information Processing Standards (FIPS) 140-2 specifies the security requirements that will be satisfied by a cryptographic module. It specifies that a cryptographic module should set a cryptographic boundary and mandates certain power-on selftest requirements such as an integrity check and cryptographic known answer tests.
-
-wolfSSL FIPS Ready includes FIPS-enabled cryptography layer code along with the wolfSSL source code. It is not associated with a FIPS certificate, but allows applications to include the same FIPS-specific code (default entry point, power on self test) and best practices used by and required in FIPS-validated modules. If your project may need to get a FIPS certificate in the future, using the wolfSSL FIPS-Ready version now will accelerate future validation times. It makes your project FIPS-Ready and helps ensure best practices.
-
-Next to this folder you will see another demo folder named "FreeRTOS_Plus_WolfSSL_Windows_Simulator". The demo uses regular (non-FIPS-Ready) wolfSSL. If you compare both demos, you will notice that there are no changes to the client code, and will also notice that some additional tests run prior to your main program in this FIPS-Ready demo.
-
-This demo shows that wolfSSL FIPS Ready provides a FIPS compliant cryptographic module with minimal impact on client code.
-
-# What does FIPS 140-2 specify?
-
-FIPS 140-2 enforces cryptographic modules to follow best practices, including:
-
-1. Removal of insecure algorithms (such as MD5 and DES)
-2. Include a default entry point
-3. Perform a Power On Self Test (POST)
-
-wolfSSL FIPS Ready fulfils these requirements. The third requirement means that the POST should run automatically whenever the application using the FIPS code starts up. For wolfSSL FIPS Ready, the POST consits of two tests:
-
-- In-Core Integrity Check (HMAC-SHA256 over cryptographic algorithm object files)
-- Known Answer Tests (KATs)
-
-The in-core integrity check performs an HMAC-SHA256 operation over the object files included in the FIPS-compliant algorithm boundary. The cryptographic boundary is the FIPS-specific code and its related static data in the memory of the program. In the integrity check process, the calculated hash value is compared with the expexted pre-calculated value in the memory. Failure of this check means that compiled boundary code was modified after it was compiled. If either the integrity check or KAT fails, the module enters an error state.
-
-The KAT (Known Answer Tests) run algorithm test cases using pre-computed NIST test vectors, thus verifying that the algorithms are working successfully. The KAT code and test vectors are inside the cryptographic boundary and are also checked as part of the in-core integrity check.
-
-# How to build and run the Demo application
-
-By double-clicking the solution file named "FreeRTOS_Plus_WolfSSL_FIPS_Ready.sln" included in this folder, Visual Studio starts and shows you a project in its solution explorer. It is named "RTOSDemo" and provides a console application program which runs on windows.
-
-All required settings have been set in the user_settings.h header file included in the RTOSDemo/FreeRTOS+/wolfSSL folder in the solution explorer pane. The next step is to build the RTOSDemo application:
-
-1. Build the RTOSDemo project
-2. Run the RTOSDemo.exe
-
-You will see a console that pops up, and it shows output like the following:
-
-# Self Test Explanation
-```
-Starting Power On Self Test
-In core integrity check error: hash = C66491A040D5B9686BAA7A75A280290D91B49...
-```
-
-Do not worry about this result, an error is expected at this point. Error number "-203" means In-Core-integrity-check failed. The check is identical to the "In Core Integrity Test" listed in the previous section. And the subsequent KAT also failed due to the first error. Once FIPS Ready has failed POST, it enters an error state and never allows subsequent cryptographic operations until the device is restarted and the tests can complete successfully.
-
-The in-core integrity check requires a pre-calculated hash value to be stored in the fips_test.c source file. Remember that you did not yet set this pre-calculated value during the build process. Because the hash does not match the stored value is the reason why this first run will fail.
-
-# Update Pre-calculated hash value
-
-1. Let us go back to the messages in the console shown in the previous section. You may see "hash = C66491A040..." in the message. **The charactor sequence is the value for the pre-calculated hash value.** Please copy this charactor sequece and store it in a temporary location for reference in the next step.
-
-2. Find and open the file named "**fips_test.c**" under the RTOSDemo/FreeRTOS+/wolfSSL/wolfcrypt folder in the Visual Studio solution explorer pane. Or you can reach the file by traversing "../../ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/fips_test.c" starting from the folder where this README is included.
-
-3. In the fips_test.c, find the following statement:
-
- ```
- static const char verifyCore[] =
- "903B291C50C8F0BAB8D2C632853C6D827A9022A4B12260C3A14F4BEBD101228";
- ```
-
- Replace "903b291C..." with the character sequecece(C66491A040... ) you have stored in your temporary location from above. Save fips_test.c and build the application.
-
-4. Run the application.
-
- This time, you should see:
-
- ```
- Starting Power On Self Test
- Power On Self Test SUCCESS
- Waiting for new connection
- Connection established
- Received by the secure server: Message number 0
-
- Received by the secure server: Message number 1
-
- ...
-
- Received by the secure server: Message number 9
-
- Connection closed, back to start
- Waiting for new connection
- ```
-
- This time, the in-core integrity check and KAT finished successfully, and Demo application was allowed to continue and perform its own tasks.
-
- # When is the hash value update needed?
-
-Whenever the FIPS boundary files have had changes made to them, such as options, location in the application, hash value, code, etc. the verifyHash value in fips_test.c will need to be updated. Even you just add or remove your code in your application, it may shift the FIPS boundary code in the memory, thus requiring a new hash value to be computed and updated.
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/READ_ME.url b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/READ_ME.url
deleted file mode 100644
index 4b773e3487..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/READ_ME.url
+++ /dev/null
@@ -1,5 +0,0 @@
-[InternetShortcut]
-URL=http://www.freertos.org/FreeRTOS-Plus/WolfSSL/FreeRTOS_WolfSSL_Example.shtml
-IDList=
-[{000214A0-0000-0000-C000-000000000046}]
-Prop3=19,2
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/SecureTCPClientTask.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/SecureTCPClientTask.c
deleted file mode 100644
index e82c4f2e44..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/SecureTCPClientTask.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * FreeRTOS V202212.00
- * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * https://www.FreeRTOS.org
- * https://github.com/FreeRTOS
- *
- */
-
-#pragma comment( lib, "ws2_32.lib" )
-
-/* Win32 includes. */
-#include
-
-/* wolfSSL includes. */
-#include "wolfssl/ssl.h"
-
-/* Standard includes. */
-#include
-#include
-
-/* FreeRTOS includes. */
-#include "FreeRTOS.h"
-#include "task.h"
-
-/*-----------------------------------------------------------*/
-
-/* The wolfSSL context for the client. */
-static WOLFSSL_CTX* xWolfSSL_ClientContext = NULL;
-
-/*-----------------------------------------------------------*/
-
-/* See the comments at the top of main.c. */
-void vSecureTCPClientTask( void *pvParameters )
-{
-SOCKET xClientSocket;
-struct sockaddr_in xConnection;
-WOLFSSL* xWolfSSL_Object;
-WORD wVersionRequested;
-WSADATA xWSAData;
-char cString[ 50 ];
-BaseType_t lReturned;
-uint32_t ulCount = 0UL;
-
- /* Remove compiler warning about unused parameters. */
- ( void ) pvParameters;
-
- /* Prepare to use WinSock. */
- wVersionRequested = MAKEWORD( 2, 2 );
- configASSERT( WSAStartup( wVersionRequested, &xWSAData ) == 0 );
-
- /* Set family and port for client socket. */
- memset( ( void * ) &xConnection, 0x00, sizeof( struct sockaddr_in ) );
- xConnection.sin_family = AF_INET;
- xConnection.sin_addr.s_addr = inet_addr("127.0.0.1");
- xConnection.sin_port = htons( configTCP_PORT_NUMBER );
-
- /* Attempt to create a context that uses the TLS 1.3 server protocol. */
- xWolfSSL_ClientContext = wolfSSL_CTX_new( wolfTLSv1_3_client_method() );
- configASSERT( xWolfSSL_ClientContext );
-
- /* Load the CA certificate. */
- lReturned = wolfSSL_CTX_load_verify_locations( xWolfSSL_ClientContext, "ca-cert.pem", 0 );
- configASSERT( lReturned == SSL_SUCCESS );
-
- for( ;; )
- {
- /* Create the socket. */
- xClientSocket = socket( AF_INET, SOCK_STREAM, 0 );
- configASSERT( xClientSocket != INVALID_SOCKET );
-
- /* Connect to the secure server. */
- if( connect( xClientSocket, ( SOCKADDR * ) &xConnection, sizeof( xConnection ) ) == 0 )
- {
- /* The connect was successful. Create a wolfSSL object to associate
- with this connection. */
- xWolfSSL_Object = wolfSSL_new( xWolfSSL_ClientContext );
-
- if( xWolfSSL_Object != NULL )
- {
- /* Associate the created wolfSSL object with the connected
- socket. */
- lReturned = wolfSSL_set_fd( xWolfSSL_Object, xClientSocket );
- configASSERT( lReturned == SSL_SUCCESS );
-
- /* The count is used to differentiate between messages sent to
- the server, and to break out of the do while loop below. */
- ulCount = 0UL;
-
- do
- {
- /* Create the string that is sent to the secure server. */
- sprintf( cString, "Message number %lu\r\n", ulCount );
-
- /* The next line is the secure equivalent of the standard
- sockets call:
- lReturned = send( xClientSocket, cString, strlen( cString ) + 1, 0 ); */
- lReturned = wolfSSL_write( xWolfSSL_Object, cString, strlen( cString ) + 1 );
-
-
- /* Short delay to prevent the messages streaming up the
- console too quickly. */
- vTaskDelay( 50 );
- ulCount++;
-
- } while( ( lReturned != SOCKET_ERROR ) && ( ulCount < 10UL ) );
- }
-
- wolfSSL_free( xWolfSSL_Object );
- closesocket( xClientSocket );
-
- /* Delay for a short time before starting over. */
- vTaskDelay( 250 );
- }
- }
-}
-/*-----------------------------------------------------------*/
-
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/SecureTCPServerTask.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/SecureTCPServerTask.c
deleted file mode 100644
index f4953fa11b..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/SecureTCPServerTask.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * FreeRTOS V202212.00
- * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * https://www.FreeRTOS.org
- * https://github.com/FreeRTOS
- *
- */
-
-#pragma comment( lib, "ws2_32.lib" )
-
-/* Win32 includes. */
-#include
-
-/* wolfSSL includes. */
-#include "wolfssl/ssl.h"
-
-/* Standard includes. */
-#include
-#include
-
-/* FreeRTOS includes. */
-#include "FreeRTOS.h"
-#include "task.h"
-
-/* This application is using the FreeRTOS Windows simulator, which uses the
-FreeRTOS scheduler to schedule FreeRTOS task within the Windows environment.
-The Windows envrionment must not be allowed to block any Windows threads that
-are running FreeRTOS tasks, unless the FreeRTOS task is running at the FreeRTOS
-idle priority. For simplicity, this demo uses the Windows TCP/IP stack, the
-API for which can cause Windows threads to block. Therefore, any FreeRTOS task
-that makes calls to the Windows TCP/IP stack must be assigned the idle prioity.
-Note this is only a restriction of the simulated Windows environment - real
-FreeRTOS ports do not have this restriction. */
-#define sstSECURE_CLIENT_TASK_PRIORITY ( tskIDLE_PRIORITY )
-
-/*-----------------------------------------------------------*/
-
-/*
- * Open, configures and binds the server's TCP socket.
- */
-static SOCKET prvOpenServerSocket( void );
-
-/*
- * Prepare the wolfSSL library for use.
- */
-static void prvInitialiseWolfSSL( void );
-
-/*
- * The task that implements the client side of the connection.
- */
-extern void vSecureTCPClientTask( void *pvParameters );
-
-/*-----------------------------------------------------------*/
-
-/* The wolfSSL context for the server. */
-static WOLFSSL_CTX* xWolfSSL_ServerContext = NULL;
-
-/*-----------------------------------------------------------*/
-
-/* See the comments at the top of main.c. */
-void vSecureTCPServerTask( void *pvParameters )
-{
-BaseType_t xReturned;
-long lBytes;
-uint8_t cReceivedString[ 60 ];
-struct sockaddr_in xClient;
-int xClientAddressLength = sizeof( struct sockaddr_in );
-SOCKET xListeningSocket, xConnectedSocket;
-WOLFSSL* xWolfSSL_Object; /* Only one connection is accepted at a time, so only one object is needed at a time. */
-
- /* Just to prevent compiler warnings. */
- ( void ) pvParameters;
-
- /* Perform the initialisation necessary before wolfSSL can be used. */
- prvInitialiseWolfSSL();
- configASSERT( xWolfSSL_ServerContext );
-
- /* Attempt to open the socket. */
- xListeningSocket = prvOpenServerSocket();
-
- /* Now the server socket has been created and the wolfSSL library has been
- initialised, the task that implements the client side can be created. */
- xTaskCreate( vSecureTCPClientTask, "Client", configMINIMAL_STACK_SIZE, NULL, sstSECURE_CLIENT_TASK_PRIORITY, NULL );
-
- if( xListeningSocket != INVALID_SOCKET )
- {
- for( ;; )
- {
- /* Wait until the client connects. */
- printf( "Waiting for new connection\r\n" );
- xConnectedSocket = accept( xListeningSocket, ( struct sockaddr * ) &xClient, &xClientAddressLength );
-
- if( xConnectedSocket != INVALID_SOCKET )
- {
- printf( "Connection established\r\n" );
-
- /* A connection has been accepted by the server. Create a
- wolfSSL object for use with the newly connected socket. */
- xWolfSSL_Object = NULL;
- xWolfSSL_Object = wolfSSL_new( xWolfSSL_ServerContext );
-
- if( xWolfSSL_Object != NULL )
- {
- /* Associate the created wolfSSL object with the connected
- socket. */
- xReturned = wolfSSL_set_fd( xWolfSSL_Object, xConnectedSocket );
- configASSERT( xReturned == SSL_SUCCESS );
-
- do
- {
- /* The next line is the secure equivalent to the
- standard sockets call:
- lBytes = recv( xConnectedSocket, cReceivedString, 50, 0 ); */
- lBytes = wolfSSL_read( xWolfSSL_Object, cReceivedString, sizeof( cReceivedString ) );
-
- /* Print the received characters. */
- if( lBytes > 0 )
- {
- printf( "Received by the secure server: %s\r\n", cReceivedString );
- }
-
- } while ( lBytes > 0 );
-
- /* The connection was closed, close the socket and free the
- wolfSSL object. */
- closesocket( xConnectedSocket );
- wolfSSL_free( xWolfSSL_Object );
- printf( "Connection closed, back to start\r\n\r\n" );
- }
- }
- }
- }
- else
- {
- /* The socket could not be opened. */
- vTaskDelete( NULL );
- }
-}
-/*-----------------------------------------------------------*/
-
-static SOCKET prvOpenServerSocket( void )
-{
-WSADATA xWSAData;
-WORD wVersionRequested;
-struct sockaddr_in xConnection;
-SOCKET xSocket = INVALID_SOCKET;
-
- wVersionRequested = MAKEWORD( 2, 2 );
-
- /* Prepare to use WinSock. */
- if( WSAStartup( wVersionRequested, &xWSAData ) != 0 )
- {
- fprintf( stderr, "Could not open Windows connection.\n" );
- }
- else
- {
- xSocket = socket( AF_INET, SOCK_STREAM, 0 );
- if( xSocket == INVALID_SOCKET)
- {
- fprintf( stderr, "Could not create socket.\n" );
- WSACleanup();
- }
- else
- {
- /* Zero out the server structure. */
- memset( ( void * ) &xConnection, 0x00, sizeof( struct sockaddr_in ) );
-
- xConnection.sin_family = AF_INET;
- xConnection.sin_addr.s_addr = inet_addr("127.0.0.1");
- xConnection.sin_port = htons( configTCP_PORT_NUMBER );
-
- /* Bind the address to the socket. */
- if( bind( xSocket, ( struct sockaddr * ) &xConnection, sizeof( struct sockaddr_in ) ) == -1 )
- {
- fprintf( stderr, "Could not socket to port %d.\n", configTCP_PORT_NUMBER );
- closesocket( xSocket );
- xSocket = INVALID_SOCKET;
- WSACleanup();
- }
-
- if( listen( xSocket, 20 ) != 0 )
- {
- closesocket( xSocket );
- xSocket = INVALID_SOCKET;
- WSACleanup();
- }
- }
- }
-
- return xSocket;
-}
-/*-----------------------------------------------------------*/
-
-static void prvInitialiseWolfSSL( void )
-{
-int32_t iReturn;
-
- #ifdef DEBUG_WOLFSSL
- {
- wolfSSL_Debugging_ON();
- }
- #endif
-
- /* Initialise wolfSSL. This must be done before any other wolfSSL functions
- are called. */
- wolfSSL_Init();
-
- /* Attempt to create a context that uses the TLS 1.3 server protocol. */
- xWolfSSL_ServerContext = wolfSSL_CTX_new( wolfTLSv1_3_server_method() );
-
- if( xWolfSSL_ServerContext != NULL )
- {
- /* Load the CA certificate. Real applications should ensure that
- wolfSSL_CTX_load_verify_locations() returns SSL_SUCCESS before
- proceeding. */
- iReturn = wolfSSL_CTX_load_verify_locations( xWolfSSL_ServerContext, "ca-cert.pem", 0 );
- configASSERT( iReturn == SSL_SUCCESS );
-
- iReturn = wolfSSL_CTX_use_certificate_file( xWolfSSL_ServerContext, "server-cert.pem", SSL_FILETYPE_PEM );
- configASSERT( iReturn == SSL_SUCCESS );
-
- iReturn = wolfSSL_CTX_use_PrivateKey_file( xWolfSSL_ServerContext, "server-key.pem", SSL_FILETYPE_PEM );
- configASSERT( iReturn == SSL_SUCCESS );
- }
-}
-
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/ca-cert.pem b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/ca-cert.pem
deleted file mode 100644
index a72435e0f8..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/ca-cert.pem
+++ /dev/null
@@ -1,93 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number:
- 5e:ba:a4:f4:b1:f7:48:25:e3:5f:9b:da:a1:13:ed:d5:2b:03:67:15
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C = US, ST = Montana, L = Bozeman, O = Sawtooth, OU = Consulting, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Validity
- Not Before: Jun 19 13:23:41 2020 GMT
- Not After : Mar 16 13:23:41 2023 GMT
- Subject: C = US, ST = Montana, L = Bozeman, O = Sawtooth, OU = Consulting, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public-Key: (2048 bit)
- Modulus:
- 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a:
- f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac:
- de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98:
- 21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77:
- 32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1:
- 8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3:
- a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed:
- a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95:
- 82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c:
- 3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db:
- 76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc:
- 73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98:
- de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68:
- cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2:
- b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3:
- 13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98:
- ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed:
- 36:79
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
- X509v3 Authority Key Identifier:
- keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
- DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- serial:5E:BA:A4:F4:B1:F7:48:25:E3:5F:9B:DA:A1:13:ED:D5:2B:03:67:15
-
- X509v3 Basic Constraints:
- CA:TRUE
- X509v3 Subject Alternative Name:
- DNS:example.com, IP Address:127.0.0.1
- X509v3 Extended Key Usage:
- TLS Web Server Authentication, TLS Web Client Authentication
- Signature Algorithm: sha256WithRSAEncryption
- b9:ed:94:3e:00:73:2d:a5:d1:04:b3:fb:dc:f0:b7:0d:3d:ad:
- 96:74:4c:92:67:ad:6d:7c:e2:99:6a:33:ca:b2:0f:04:5a:a5:
- 67:f8:e3:0b:3d:f5:d0:5b:1e:20:52:12:92:28:ea:31:a3:51:
- 9e:8b:d2:39:e4:25:ea:61:61:41:16:2d:54:50:d3:fb:d0:34:
- 00:10:f1:7b:bc:f0:08:a7:f5:27:5e:7e:40:9d:99:b0:d3:31:
- 11:c3:9d:a9:51:a0:17:cf:83:2c:55:84:e0:d5:92:a0:05:3a:
- 9f:b8:75:f8:1b:e5:f7:a4:6c:e9:aa:25:8b:19:93:46:1f:3f:
- 33:af:47:29:cf:7b:8b:59:27:eb:d7:4f:cb:33:19:fa:5f:ee:
- d8:13:e9:0c:07:ad:3b:c0:7f:10:d7:e4:ed:e8:db:16:e1:1f:
- a4:7f:16:3c:bd:d7:11:f2:d4:3a:a9:9b:95:e1:39:51:99:eb:
- 5b:65:46:ef:63:84:73:95:23:b8:bf:b5:f6:4d:12:71:f7:ff:
- 33:aa:4a:8c:65:73:73:89:69:df:a6:dc:a4:91:ff:ae:c7:28:
- 93:b5:1a:de:a9:8f:2b:30:85:83:8b:99:82:ca:b3:7c:11:10:
- 88:9d:8e:6c:2c:f3:05:6f:cb:80:85:16:b7:ed:e4:68:fb:b6:
- b6:31:8a:7d
------BEGIN CERTIFICATE-----
-MIIE/zCCA+egAwIBAgIUXrqk9LH3SCXjX5vaoRPt1SsDZxUwDQYJKoZIhvcNAQEL
-BQAwgZQxCzAJBgNVBAYTAlVTMRAwDgYDVQQIDAdNb250YW5hMRAwDgYDVQQHDAdC
-b3plbWFuMREwDwYDVQQKDAhTYXd0b290aDETMBEGA1UECwwKQ29uc3VsdGluZzEY
-MBYGA1UEAwwPd3d3LndvbGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdv
-bGZzc2wuY29tMB4XDTIwMDYxOTEzMjM0MVoXDTIzMDMxNjEzMjM0MVowgZQxCzAJ
-BgNVBAYTAlVTMRAwDgYDVQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMREw
-DwYDVQQKDAhTYXd0b290aDETMBEGA1UECwwKQ29uc3VsdGluZzEYMBYGA1UEAwwP
-d3d3LndvbGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29t
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvwzKLRSyHoRCW804H0ry
-TXUQ8bY1n9/KfQOY06zeA2buKvHYsH1uB1QLEJghTYDLEiDnzE/eRX3Jcncy6sqQ
-u2lSEAMvqPOVxfGLYlYb72dvpBBBla0Km+OlwLDScHZQMFuo6AgsfO2nonqNOCkc
-rMft8nyVsJWCfUlcOM13Je+9gHVTlDw9ymNbnxW10x0TLxnRPNt2Osy4fcnlwtfa
-QG/YIdxzG0ItU5z+Gvx9q3o2P5jehHwFZ85qFDiHqfGMtWjLaH9xICv1oGP1Vi+j
-JtK3b7FaF9c4mQj+k1hv/sMTSQgWC6dNZwBSMWcjTpjtUUUduQTZC+zYKLNLve02
-eQIDAQABo4IBRTCCAUEwHQYDVR0OBBYEFCeOZxF0wyYdP+0zY7Ok2B0w5ejVMIHU
-BgNVHSMEgcwwgcmAFCeOZxF0wyYdP+0zY7Ok2B0w5ejVoYGapIGXMIGUMQswCQYD
-VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8G
-A1UECgwIU2F3dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3
-dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbYIU
-Xrqk9LH3SCXjX5vaoRPt1SsDZxUwDAYDVR0TBAUwAwEB/zAcBgNVHREEFTATggtl
-eGFtcGxlLmNvbYcEfwAAATAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw
-DQYJKoZIhvcNAQELBQADggEBALntlD4Acy2l0QSz+9zwtw09rZZ0TJJnrW184plq
-M8qyDwRapWf44ws99dBbHiBSEpIo6jGjUZ6L0jnkJephYUEWLVRQ0/vQNAAQ8Xu8
-8Ain9SdefkCdmbDTMRHDnalRoBfPgyxVhODVkqAFOp+4dfgb5fekbOmqJYsZk0Yf
-PzOvRynPe4tZJ+vXT8szGfpf7tgT6QwHrTvAfxDX5O3o2xbhH6R/Fjy91xHy1Dqp
-m5XhOVGZ61tlRu9jhHOVI7i/tfZNEnH3/zOqSoxlc3OJad+m3KSR/67HKJO1Gt6p
-jyswhYOLmYLKs3wREIidjmws8wVvy4CFFrft5Gj7trYxin0=
------END CERTIFICATE-----
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/main.c
deleted file mode 100644
index 8fd27e0f2d..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/main.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * FreeRTOS V202212.00
- * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * https://www.FreeRTOS.org
- * https://github.com/FreeRTOS
- *
- */
-
-/* Standard includes. */
-#include
-#include
-
-/* FreeRTOS includes. */
-#include
-#include "task.h"
-
-/* This application is using the FreeRTOS Windows simulator, which uses the
-FreeRTOS scheduler to schedule FreeRTOS task within the Windows environment.
-The Windows environment must not be allowed to block any Windows threads that
-are running FreeRTOS tasks, unless the FreeRTOS task is running at the FreeRTOS
-idle priority. For simplicity, this demo uses the Windows TCP/IP stack, the
-API for which can cause Windows threads to block. Therefore, any FreeRTOS task
-that makes calls to the Windows TCP/IP stack must be assigned the idle priority.
-Note this is only a restriction of the simulated Windows environment - real
-FreeRTOS ports do not have this restriction. */
-#define mainSECURE_SERVER_TASK_PRIORITY ( tskIDLE_PRIORITY )
-
-
-/*-----------------------------------------------------------*/
-
-/*
- * The task that implements the server side.
- */
-extern void vSecureTCPServerTask( void *pvParameters );
-
-/*-----------------------------------------------------------*/
-
-/*
- *! It is necessary to update the build hash before running this project for the
- *! time. Ensure to read README_wolfSSL_FIPS_ready.md in the directory that contains
- *! this Visual Studio project for instructions.
- */
-int main( void )
-{
-const uint32_t ulLongTime_ms = 250UL;
-
- /* Create the TCP server task. This will itself create the client task
- once it has completed the wolfSSL initialisation. */
- xTaskCreate( vSecureTCPServerTask, "Server", configMINIMAL_STACK_SIZE, NULL, mainSECURE_SERVER_TASK_PRIORITY, NULL );
-
- /* Start the task running. */
- vTaskStartScheduler();
-
- /* If all is well, the scheduler will now be running, and the following
- line will never be reached. If the following line does execute, then
- there was insufficient FreeRTOS heap memory available for the idle and/or
- timer tasks to be created. See the memory management section on the
- FreeRTOS web site for more details (this is standard text that is not
- really applicable to the Win32 simulator port). */
- for( ;; )
- {
- Sleep( ulLongTime_ms );
- }
-}
-/*-----------------------------------------------------------*/
-
-void vApplicationIdleHook( void )
-{
-const unsigned long ulMSToSleep = 5;
-
- /* This function is called on each cycle of the idle task if
- configUSE_IDLE_HOOK is set to 1 in FreeRTOSConfig.h. Sleep to reduce CPU
- load. */
- Sleep( ulMSToSleep );
-}
-/*-----------------------------------------------------------*/
-
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/server-cert.pem b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/server-cert.pem
deleted file mode 100644
index bd6715b740..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/server-cert.pem
+++ /dev/null
@@ -1,185 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 1 (0x1)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C = US, ST = Montana, L = Bozeman, O = Sawtooth, OU = Consulting, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Validity
- Not Before: Jun 19 13:23:41 2020 GMT
- Not After : Mar 16 13:23:41 2023 GMT
- Subject: C = US, ST = Montana, L = Bozeman, O = wolfSSL, OU = Support, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public-Key: (2048 bit)
- Modulus:
- 00:c0:95:08:e1:57:41:f2:71:6d:b7:d2:45:41:27:
- 01:65:c6:45:ae:f2:bc:24:30:b8:95:ce:2f:4e:d6:
- f6:1c:88:bc:7c:9f:fb:a8:67:7f:fe:5c:9c:51:75:
- f7:8a:ca:07:e7:35:2f:8f:e1:bd:7b:c0:2f:7c:ab:
- 64:a8:17:fc:ca:5d:7b:ba:e0:21:e5:72:2e:6f:2e:
- 86:d8:95:73:da:ac:1b:53:b9:5f:3f:d7:19:0d:25:
- 4f:e1:63:63:51:8b:0b:64:3f:ad:43:b8:a5:1c:5c:
- 34:b3:ae:00:a0:63:c5:f6:7f:0b:59:68:78:73:a6:
- 8c:18:a9:02:6d:af:c3:19:01:2e:b8:10:e3:c6:cc:
- 40:b4:69:a3:46:33:69:87:6e:c4:bb:17:a6:f3:e8:
- dd:ad:73:bc:7b:2f:21:b5:fd:66:51:0c:bd:54:b3:
- e1:6d:5f:1c:bc:23:73:d1:09:03:89:14:d2:10:b9:
- 64:c3:2a:d0:a1:96:4a:bc:e1:d4:1a:5b:c7:a0:c0:
- c1:63:78:0f:44:37:30:32:96:80:32:23:95:a1:77:
- ba:13:d2:97:73:e2:5d:25:c9:6a:0d:c3:39:60:a4:
- b4:b0:69:42:42:09:e9:d8:08:bc:33:20:b3:58:22:
- a7:aa:eb:c4:e1:e6:61:83:c5:d2:96:df:d9:d0:4f:
- ad:d7
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- B3:11:32:C9:92:98:84:E2:C9:F8:D0:3B:6E:03:42:CA:1F:0E:8E:3C
- X509v3 Authority Key Identifier:
- keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
- DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- serial:5E:BA:A4:F4:B1:F7:48:25:E3:5F:9B:DA:A1:13:ED:D5:2B:03:67:15
-
- X509v3 Basic Constraints:
- CA:TRUE
- X509v3 Subject Alternative Name:
- DNS:example.com, IP Address:127.0.0.1
- X509v3 Extended Key Usage:
- TLS Web Server Authentication, TLS Web Client Authentication
- Signature Algorithm: sha256WithRSAEncryption
- 35:91:e6:72:cc:0b:f1:47:8f:3d:e3:5d:52:2f:83:b8:b1:3b:
- 6d:d6:ac:13:79:74:14:ff:07:8d:ee:74:77:64:ff:b8:83:1d:
- 81:80:84:bb:38:fa:8f:f3:75:29:23:ce:e5:09:a8:13:85:14:
- b6:6a:35:30:2c:1c:c4:0f:23:67:ea:ed:cb:91:c4:05:e3:ec:
- 6b:be:11:bf:d9:9a:ab:93:17:9f:e4:9a:59:d4:e7:cc:ce:dc:
- 83:10:f5:cd:de:d7:35:75:4b:aa:7a:7a:ba:02:a0:b0:b5:c1:
- 8a:6b:b1:72:cf:64:59:4e:d3:a4:a1:6c:64:4b:14:cf:a3:d6:
- 37:0a:e6:f9:5b:21:be:de:0c:c1:cf:43:e1:18:0b:19:13:6b:
- 8e:3d:df:0f:a7:43:fb:35:67:4a:50:e8:09:46:34:bd:f4:ab:
- 1a:8f:bd:4d:1c:6b:20:be:1c:8c:ca:66:98:ba:03:67:f2:1c:
- 3c:1e:01:f0:4d:c6:85:82:6f:a9:49:f7:1b:7d:6b:db:76:84:
- 73:bb:16:c5:6e:74:ab:7b:fb:1c:e9:91:bb:29:73:1c:de:27:
- b4:67:3b:10:51:f4:17:eb:b8:38:a0:9a:eb:37:5b:76:8f:39:
- 12:39:35:d1:ca:fe:c0:26:fb:73:50:1e:2d:b9:d2:ba:e5:4c:
- 35:bd:ed:7b
------BEGIN CERTIFICATE-----
-MIIE6DCCA9CgAwIBAgIBATANBgkqhkiG9w0BAQsFADCBlDELMAkGA1UEBhMCVVMx
-EDAOBgNVBAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNh
-d3Rvb3RoMRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNz
-bC5jb20xHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20wHhcNMjAwNjE5
-MTMyMzQxWhcNMjMwMzE2MTMyMzQxWjCBkDELMAkGA1UEBhMCVVMxEDAOBgNVBAgM
-B01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xEDAOBgNVBAoMB3dvbGZTU0wxEDAO
-BgNVBAsMB1N1cHBvcnQxGDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqG
-SIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBAMCVCOFXQfJxbbfSRUEnAWXGRa7yvCQwuJXOL07W9hyIvHyf+6hn
-f/5cnFF194rKB+c1L4/hvXvAL3yrZKgX/Mpde7rgIeVyLm8uhtiVc9qsG1O5Xz/X
-GQ0lT+FjY1GLC2Q/rUO4pRxcNLOuAKBjxfZ/C1loeHOmjBipAm2vwxkBLrgQ48bM
-QLRpo0YzaYduxLsXpvPo3a1zvHsvIbX9ZlEMvVSz4W1fHLwjc9EJA4kU0hC5ZMMq
-0KGWSrzh1Bpbx6DAwWN4D0Q3MDKWgDIjlaF3uhPSl3PiXSXJag3DOWCktLBpQkIJ
-6dgIvDMgs1gip6rrxOHmYYPF0pbf2dBPrdcCAwEAAaOCAUUwggFBMB0GA1UdDgQW
-BBSzETLJkpiE4sn40DtuA0LKHw6OPDCB1AYDVR0jBIHMMIHJgBQnjmcRdMMmHT/t
-M2OzpNgdMOXo1aGBmqSBlzCBlDELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB01vbnRh
-bmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNhd3Rvb3RoMRMwEQYDVQQL
-DApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20xHzAdBgkqhkiG
-9w0BCQEWEGluZm9Ad29sZnNzbC5jb22CFF66pPSx90gl41+b2qET7dUrA2cVMAwG
-A1UdEwQFMAMBAf8wHAYDVR0RBBUwE4ILZXhhbXBsZS5jb22HBH8AAAEwHQYDVR0l
-BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IBAQA1keZy
-zAvxR489411SL4O4sTtt1qwTeXQU/weN7nR3ZP+4gx2BgIS7OPqP83UpI87lCagT
-hRS2ajUwLBzEDyNn6u3LkcQF4+xrvhG/2Zqrkxef5JpZ1OfMztyDEPXN3tc1dUuq
-enq6AqCwtcGKa7Fyz2RZTtOkoWxkSxTPo9Y3Cub5WyG+3gzBz0PhGAsZE2uOPd8P
-p0P7NWdKUOgJRjS99Ksaj71NHGsgvhyMymaYugNn8hw8HgHwTcaFgm+pSfcbfWvb
-doRzuxbFbnSre/sc6ZG7KXMc3ie0ZzsQUfQX67g4oJrrN1t2jzkSOTXRyv7AJvtz
-UB4tudK65Uw1ve17
------END CERTIFICATE-----
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number:
- 5e:ba:a4:f4:b1:f7:48:25:e3:5f:9b:da:a1:13:ed:d5:2b:03:67:15
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C = US, ST = Montana, L = Bozeman, O = Sawtooth, OU = Consulting, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Validity
- Not Before: Jun 19 13:23:41 2020 GMT
- Not After : Mar 16 13:23:41 2023 GMT
- Subject: C = US, ST = Montana, L = Bozeman, O = Sawtooth, OU = Consulting, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public-Key: (2048 bit)
- Modulus:
- 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a:
- f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac:
- de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98:
- 21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77:
- 32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1:
- 8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3:
- a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed:
- a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95:
- 82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c:
- 3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db:
- 76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc:
- 73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98:
- de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68:
- cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2:
- b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3:
- 13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98:
- ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed:
- 36:79
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
- X509v3 Authority Key Identifier:
- keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
- DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- serial:5E:BA:A4:F4:B1:F7:48:25:E3:5F:9B:DA:A1:13:ED:D5:2B:03:67:15
-
- X509v3 Basic Constraints:
- CA:TRUE
- X509v3 Subject Alternative Name:
- DNS:example.com, IP Address:127.0.0.1
- X509v3 Extended Key Usage:
- TLS Web Server Authentication, TLS Web Client Authentication
- Signature Algorithm: sha256WithRSAEncryption
- b9:ed:94:3e:00:73:2d:a5:d1:04:b3:fb:dc:f0:b7:0d:3d:ad:
- 96:74:4c:92:67:ad:6d:7c:e2:99:6a:33:ca:b2:0f:04:5a:a5:
- 67:f8:e3:0b:3d:f5:d0:5b:1e:20:52:12:92:28:ea:31:a3:51:
- 9e:8b:d2:39:e4:25:ea:61:61:41:16:2d:54:50:d3:fb:d0:34:
- 00:10:f1:7b:bc:f0:08:a7:f5:27:5e:7e:40:9d:99:b0:d3:31:
- 11:c3:9d:a9:51:a0:17:cf:83:2c:55:84:e0:d5:92:a0:05:3a:
- 9f:b8:75:f8:1b:e5:f7:a4:6c:e9:aa:25:8b:19:93:46:1f:3f:
- 33:af:47:29:cf:7b:8b:59:27:eb:d7:4f:cb:33:19:fa:5f:ee:
- d8:13:e9:0c:07:ad:3b:c0:7f:10:d7:e4:ed:e8:db:16:e1:1f:
- a4:7f:16:3c:bd:d7:11:f2:d4:3a:a9:9b:95:e1:39:51:99:eb:
- 5b:65:46:ef:63:84:73:95:23:b8:bf:b5:f6:4d:12:71:f7:ff:
- 33:aa:4a:8c:65:73:73:89:69:df:a6:dc:a4:91:ff:ae:c7:28:
- 93:b5:1a:de:a9:8f:2b:30:85:83:8b:99:82:ca:b3:7c:11:10:
- 88:9d:8e:6c:2c:f3:05:6f:cb:80:85:16:b7:ed:e4:68:fb:b6:
- b6:31:8a:7d
------BEGIN CERTIFICATE-----
-MIIE/zCCA+egAwIBAgIUXrqk9LH3SCXjX5vaoRPt1SsDZxUwDQYJKoZIhvcNAQEL
-BQAwgZQxCzAJBgNVBAYTAlVTMRAwDgYDVQQIDAdNb250YW5hMRAwDgYDVQQHDAdC
-b3plbWFuMREwDwYDVQQKDAhTYXd0b290aDETMBEGA1UECwwKQ29uc3VsdGluZzEY
-MBYGA1UEAwwPd3d3LndvbGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdv
-bGZzc2wuY29tMB4XDTIwMDYxOTEzMjM0MVoXDTIzMDMxNjEzMjM0MVowgZQxCzAJ
-BgNVBAYTAlVTMRAwDgYDVQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMREw
-DwYDVQQKDAhTYXd0b290aDETMBEGA1UECwwKQ29uc3VsdGluZzEYMBYGA1UEAwwP
-d3d3LndvbGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29t
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvwzKLRSyHoRCW804H0ry
-TXUQ8bY1n9/KfQOY06zeA2buKvHYsH1uB1QLEJghTYDLEiDnzE/eRX3Jcncy6sqQ
-u2lSEAMvqPOVxfGLYlYb72dvpBBBla0Km+OlwLDScHZQMFuo6AgsfO2nonqNOCkc
-rMft8nyVsJWCfUlcOM13Je+9gHVTlDw9ymNbnxW10x0TLxnRPNt2Osy4fcnlwtfa
-QG/YIdxzG0ItU5z+Gvx9q3o2P5jehHwFZ85qFDiHqfGMtWjLaH9xICv1oGP1Vi+j
-JtK3b7FaF9c4mQj+k1hv/sMTSQgWC6dNZwBSMWcjTpjtUUUduQTZC+zYKLNLve02
-eQIDAQABo4IBRTCCAUEwHQYDVR0OBBYEFCeOZxF0wyYdP+0zY7Ok2B0w5ejVMIHU
-BgNVHSMEgcwwgcmAFCeOZxF0wyYdP+0zY7Ok2B0w5ejVoYGapIGXMIGUMQswCQYD
-VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8G
-A1UECgwIU2F3dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3
-dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbYIU
-Xrqk9LH3SCXjX5vaoRPt1SsDZxUwDAYDVR0TBAUwAwEB/zAcBgNVHREEFTATggtl
-eGFtcGxlLmNvbYcEfwAAATAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw
-DQYJKoZIhvcNAQELBQADggEBALntlD4Acy2l0QSz+9zwtw09rZZ0TJJnrW184plq
-M8qyDwRapWf44ws99dBbHiBSEpIo6jGjUZ6L0jnkJephYUEWLVRQ0/vQNAAQ8Xu8
-8Ain9SdefkCdmbDTMRHDnalRoBfPgyxVhODVkqAFOp+4dfgb5fekbOmqJYsZk0Yf
-PzOvRynPe4tZJ+vXT8szGfpf7tgT6QwHrTvAfxDX5O3o2xbhH6R/Fjy91xHy1Dqp
-m5XhOVGZ61tlRu9jhHOVI7i/tfZNEnH3/zOqSoxlc3OJad+m3KSR/67HKJO1Gt6p
-jyswhYOLmYLKs3wREIidjmws8wVvy4CFFrft5Gj7trYxin0=
------END CERTIFICATE-----
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/server-key.pem b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/server-key.pem
deleted file mode 100644
index d1627f4d4a..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/server-key.pem
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEAwJUI4VdB8nFtt9JFQScBZcZFrvK8JDC4lc4vTtb2HIi8fJ/7
-qGd//lycUXX3isoH5zUvj+G9e8AvfKtkqBf8yl17uuAh5XIuby6G2JVz2qwbU7lf
-P9cZDSVP4WNjUYsLZD+tQ7ilHFw0s64AoGPF9n8LWWh4c6aMGKkCba/DGQEuuBDj
-xsxAtGmjRjNph27Euxem8+jdrXO8ey8htf1mUQy9VLPhbV8cvCNz0QkDiRTSELlk
-wyrQoZZKvOHUGlvHoMDBY3gPRDcwMpaAMiOVoXe6E9KXc+JdJclqDcM5YKS0sGlC
-Qgnp2Ai8MyCzWCKnquvE4eZhg8XSlt/Z0E+t1wIDAQABAoIBAQCa0DQPUmIFUAHv
-n+1kbsLE2hryhNeSEEiSxOlq64t1bMZ5OPLJckqGZFSVd8vDmp231B2kAMieTuTd
-x7pnFsF0vKnWlI8rMBr77d8hBSPZSjm9mGtlmrjcxH3upkMVLj2+HSJgKnMw1T7Y
-oqyGQy7E9WReP4l1DxHYUSVOn9iqo85gs+KK2X4b8GTKmlsFC1uqy+XjP24yIgXz
-0PrvdFKB4l90073/MYNFdfpjepcu1rYZxpIm5CgGUFAOeC6peA0Ul7QS2DFAq6EB
-QcIw+AdfFuRhd9Jg8p+N6PS662PeKpeB70xs5lU0USsoNPRTHMRYCj+7r7X3SoVD
-LTzxWFiBAoGBAPIsVHY5I2PJEDK3k62vvhl1loFk5rW4iUJB0W3QHBv4G6xpyzY8
-ZH3c9Bm4w2CxV0hfUk9ZOlV/MsAZQ1A/rs5vF/MOn0DKTq0VO8l56cBZOHNwnAp8
-yTpIMqfYSXUKhcLC/RVz2pkJKmmanwpxv7AEpox6Wm9IWlQ7xrFTF9/nAoGBAMuT
-3ncVXbdcXHzYkKmYLdZpDmOzo9ymzItqpKISjI57SCyySzfcBhh96v52odSh6T8N
-zRtfr1+elltbD6F8r7ObkNtXczrtsCNErkFPHwdCEyNMy/r0FKTV9542fFufqDzB
-hV900jkt/9CE3/uzIHoumxeu5roLrl9TpFLtG8SRAoGBAOyY2rvV/vlSSn0CVUlv
-VW5SL4SjK7OGYrNU0mNS2uOIdqDvixWl0xgUcndex6MEH54ZYrUbG57D8rUy+UzB
-qusMJn3UX0pRXKRFBnBEp1bA1CIUdp7YY1CJkNPiv4GVkjFBhzkaQwsYpVMfORpf
-H0O8h2rfbtMiAP4imHBOGhkpAoGBAIpBVihRnl/Ungs7mKNU8mxW1KrpaTOFJAza
-1AwtxL9PAmk4fNTm3Ezt1xYRwz4A58MmwFEC3rt1nG9WnHrzju/PisUr0toGakTJ
-c/5umYf4W77xfOZltU9s8MnF/xbKixsX4lg9ojerAby/QM5TjI7t7+5ZneBj5nxe
-9Y5L8TvBAoGATUX5QIzFW/QqGoq08hysa+kMVja3TnKW1eWK0uL/8fEYEz2GCbjY
-dqfJHHFSlDBD4PF4dP1hG0wJzOZoKnGtHN9DvFbbpaS+NXCkXs9P/ABVmTo9I89n
-WvUi+LUp0EQR6zUuRr79jhiyX6i/GTKh9dwD5nyaHwx8qbAOITc78bA=
------END RSA PRIVATE KEY-----
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/user_settings.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/user_settings.h
deleted file mode 100644
index 7c7b4e20ca..0000000000
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator/user_settings.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * FreeRTOS V202212.00
- * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * https://www.FreeRTOS.org
- * https://github.com/FreeRTOS
- *
- */
-
-#ifndef USER_SETTINGS_H_
-#define USER_SETTINGS_H_
-/*-- Cipher related definitions -----------------------------------------------
- *
- *
- *----------------------------------------------------------------------------*/
-
-#define HAVE_FIPS
-#define HAVE_FIPS_VERSION 3
-#define WOLFSSL_TLS13
-#define HAVE_TLS_EXTENSIONS
-
-#define HAVE_SUPPORTED_CURVES
-#define HAVE_FFDHE_2048
-
-#ifndef WOLFSSL_OPTIONS_IGNORE_SYS
-#undef _POSIX_THREADS
-#define _POSIX_THREADS
-#endif
-
-#define HAVE_THREAD_LS
-#define TFM_TIMING_RESISTANT
-#define ECC_TIMING_RESISTANT
-#define WC_RSA_BLINDING
-#define HAVE_AESGCM
-#define WOLFSSL_SHA512
-#define WOLFSSL_SHA384
-#define HAVE_HKDF
-#define NO_DSA
-#define HAVE_ECC
-#define TFM_ECC256
-#define ECC_SHAMIR
-#define WC_RSA_PSS
-#define WOLFSSL_BASE64_ENCODE
-#define NO_RC4
-#define NO_HC128
-#define NO_RABBIT
-#define WOLFSSL_KEY_GEN
-#define WOLFSSL_SHA224
-#define WOLFSSL_AES_DIRECT
-#define HAVE_AES_ECB
-#define HAVE_ECC_CDH
-#define WC_RSA_NO_PADDING
-#define WOLFSSL_VALIDATE_FFC_IMPORT
-#define HAVE_FFDHE_Q
-#define WOLFSSL_NO_SHAKE256
-#define HAVE_AESCCM
-#define WOLFSSL_VALIDATE_ECC_IMPORT
-#define WOLFSSL_AES_COUNTER
-#define WOLFSSL_CMAC
-#define WOLFSSL_SHA224
-#define WOLFSSL_SHA3
-#define WOLFSSL_SHAKE256
-#define HAVE_HASHDRBG
-#define HAVE_TLS_EXTENSIONS
-#define HAVE_SUPPORTED_CURVES
-#define HAVE_EXTENDED_MASTER
-#define NO_RC4
-#define HAVE_ENCRYPT_THEN_MAC
-#define NO_PSK
-#define NO_MD4
-#define NO_PWDBASED
-#define USE_FAST_MATH
-#define WOLFSSL_X86_64_BUILD
-#define WC_NO_ASYNC_THREADING
-#define HAVE_DH_DEFAULT_PARAMS
-#define HAVE___UINT128_T 1
-
-
-
-/*-- Debugging options ------------------------------------------------------
- *
- * "DEBUG_WOLFSSL" definition enables log to output into stdout.
- * Note: wolfSSL_Debugging_ON() must be called just after wolfSSL_Init().
- *----------------------------------------------------------------------------*/
-
-/*#define DEBUG_WOLFSSL*/
-
-/* The TCP port used by both the secure client and the secure server. */
-#define configTCP_PORT_NUMBER 5001
-
-#endif /* ifndef USER_SETTINGS_H_ */
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/AUTHORS b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/AUTHORS
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/COPYING b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/COPYING
deleted file mode 100644
index d159169d10..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/COPYING
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- , 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/ChangeLog.md b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/ChangeLog.md
deleted file mode 100644
index 31b3a3ab48..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/ChangeLog.md
+++ /dev/null
@@ -1,2684 +0,0 @@
-# wolfSSL Release 4.5.0 (August 19, 2020)
-
-If you have questions about this release, feel free to contact us on our
-info@ address.
-
-Release 4.5.0 of wolfSSL embedded TLS has bug fixes and new features including:
-
-## New Feature Additions
-
-* Added Xilinx Vitis 2019.2 example and README updates
-* TLS v1.3 is now enabled by default
-* Building FIPS 140-2 code and test on Solaris
-* Secure renegotiation with DTLS 1.2
-* Update RSA calls for hardware acceleration with Xilsecure
-* Additional OpenSSL compatibility layer functions added
-* Cypress PSoC6 wolfCrypt driver added
-* Added STM32CubeIDE support
-* Added certificate parsing and inspection to C# wrapper layer
-* TLS v1.3 sniffer support added
-* TSIP v1.09 for target board GR-ROSE support added
-* Added support for the "X72N Envision Kit" evaluation board
-* Support for ECC nonblocking using the configure options
- "--enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS=-DWOLFSSL_PUBLIC_MP"
-* Added wc_curve25519_make_pub function to generate a public key given the
- private one
-
-## Fixes
-
-* PIC32MZ hardware cache and large hashes fix
-* AES-GCM use with EVP layer in compatibility layer code
-* Fix for RSA_LOW_MEM with ARM build of SP code
-* Sanity check on tag length with AES-CCM to conform with RFC 3610
-* Fixes for 32 and 64 bit software implementations of SP code when
- WOLFSSL_SP_CACHE_RESISTANT is defined
-* GCC warning fixes for GCC 9 and later
-* Sanity check on HKDF expand length to conform with RFC 5869
-* Fixes for STM32 CubeMX HAL with AES-GCM
-* Fixed point cache look up table (LUT) implementation fixes
-* Fix for ARM 32bit SP code when calling div word
-* Fix for potential out of bounds read when parsing CRLs
-* Fix for potential out of bounds read with RSA unpadding
-* AES-CCM optimized counter fix
-* Updates to Xcode projects for new files and features
-* Fix for adding CRL’s to a WOLFSSL_X509_STORE structure
-* FIPSv2 build with opensslall build fixes
-* Fixes for CryptoCell use with ECC and signature wrappers
-* Fix for mod calculation with SP code dealing with 3072 bit keys
-* Fix for handling certificates with multiple OU’s in name
-* Fix for SP math implementation of sp_add_d and add a sanity check on
- rshb range
-* Fix for sanity check on padding with DES3 conversion of PEM to DER
-* Sanity check for potential out of bounds read with fp_read_radix_16
-* Additional checking of ECC scalars.
-* Fixing the FIPS Ready build w.r.t. ecc.c.
-* When processing certificate names with OpenSSL compatibility layer
- enabled, unknown name item types were getting handled as having NID 0,
- and failing. Added a couple more items to what is handled correctly,
- and ignoring anything that is an unknown type.
-
-## Improvements/Optimizations
-
-* TLS 1.3 certificate verify update to handle 8192 bit RSA keys
-* wpa_supplicant support with reduced code size option
-* TLS 1.3 alerts encrypted when possible
-* Many minor coverity fixes added
-* Error checking when parsing PKCS12 DER
-* IAR warning in test.c resolved
-* ATECC608A improvements for use with Harmony 3 and PIC32 MZ
-* Support for AES-GCM and wc_SignatureVerifyHash with static memory and no
- malloc’s
-* Enable SNI by default with JNI/JSSE builds
-* NetBSD GCC compiler warnings resolved
-* Additional test cases and code coverage added including curve25519 and
- curve448 tests
-* Option for user defined mutexes with WOLFSSL_USER_MUTEX
-* Sniffer API’s for loading buffer directly
-* Fixes and improvements from going through the DO-178 process were added
-* Doxygen updates and fixes for auto documentation generation
-* Changed the configure option for FIPS Ready builds to be
- `--enable-fips=ready`.
-
-## This release of wolfSSL includes fixes for 6 security vulnerabilities.
-
-wolfSSL version 4.5.0 contains 6 vulnerability fixes: 2 fixes for TLS 1.3,
-2 side channel attack mitigations, 1 fix for a potential private key leak
-in a specific use case, 1 fix for DTLS.
-
-* In earlier versions of wolfSSL there exists a potential man in the middle
- attack on TLS 1.3 clients. Malicious attackers with a privileged network
- position can impersonate TLS 1.3 servers and bypass authentication. Users
- that have applications with client side code and have TLS 1.3 turned on,
- should update to the latest version of wolfSSL. Users that do not have
- TLS 1.3 turned on, or that are server side only, are NOT affected by this
- report. Thanks to Gerald Doussot from NCC group for the report.
-* Denial of service attack on TLS 1.3 servers from repetitively sending
- ChangeCipherSpecs messages. This denial of service results from the
- relatively low effort of sending a ChangeCipherSpecs message versus the
- effort of the server to process that message. Users with TLS 1.3 servers are
- recommended to update to the most recent version of wolfSSL which limits the
- number of TLS 1.3 ChangeCipherSpecs that can be received in order to avoid
- this DoS attack. CVE-2020-12457 was reserved for the report. Thanks to
- Lenny Wang of Tencent Security Xuanwu LAB.
-* Potential cache timing attacks on public key operations in builds that are
- not using SP (single precision). Users that have a system where malicious
- agents could execute code on the system, are not using the SP build with
- wolfSSL, and are doing private key operations on the system (such as signing
- with a private key) are recommended to regenerate private keys and update to
- the most recent version of wolfSSL. CVE-2020-15309 is reserved for this
- issue. Thanks to Ida Bruhns from Universität zu Lübeck for the report.
-* When using SGX with EC scalar multiplication the possibility of side-channel
- attacks are present. To mitigate the risk of side channel attacks wolfSSL’s
- single precision EC operations should be used instead. Release 4.5.0 turns
- this on be default now with SGX builds and in previous versions of wolfSSL
- this can be turned on by using the WOLFSSL_SP macros. Thank you to
- Alejandro Cabrera Aldaya, Cesar Pereida García and Billy Bob Brumley from
- the Network and Information Security Group (NISEC) at Tampere University for
- the report.
-* Leak of private key in the case that PEM format private keys are bundled in
- with PEM certificates into a single file. This is due to the
- misclassification of certificate type versus private key type when parsing
- through the PEM file. To be affected, wolfSSL would need to have been built
- with OPENSSL_EXTRA (--enable-opensslextra). Some build variants such as
- --enable-all and --enable-opensslall also turn on this code path, checking
- wolfssl/options.h for OPENSSL_EXTRA will show if the macro was used with the
- build. If having built with the opensslextra enable option and having placed
- PEM certificates with PEM private keys in the same file when loading up the
- certificate file, then we recommend updating wolfSSL for this use case and
- also recommend regenerating any private keys in the file.
-* During the handshake, clear application_data messages in epoch 0 are
- processed and returned to the application. Fixed by dropping received
- application_data messages in epoch 0. Thank you to Paul Fiterau of Uppsala
- University and Robert Merget of Ruhr-University Bochum for the report.
-
-For additional vulnerability information visit the vulnerability page at
-https://www.wolfssl.com/docs/security-vulnerabilities/
-
-See INSTALL file for build instructions.
-More info can be found on-line at https://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL Release 4.4.0 (04/22/2020)
-
-If you have questions about this release, then feel free to contact us on our
-info@ address.
-
-Release 4.4.0 of wolfSSL embedded TLS has bug fixes and new features including:
-
-## New Feature Additions
-
-* Hexagon support.
-* DSP builds to offload ECC verify operations.
-* Certificate Manager callback support.
-* New APIs for running updates to ChaCha20/Poly1305 AEAD.
-* Support for use with Apache.
-* Add support for IBM s390x.
-* PKCS8 support for ED25519.
-* OpenVPN support.
-* Add P384 curve support to SP.
-* Add BIO and EVP API.
-* Add AES-OFB mode.
-* Add AES-CFB mode.
-* Add Curve448, X448, and Ed448.
-* Add Renesas Synergy S7G2 build and hardware acceleration.
-
-## Fixes
-
-* Fix for RSA public encrypt / private sign with RSA key sizes over 2048-bit.
-* Correct misspellings.
-* Secure renegotiation fix.
-* Fix memory leak when using ATECC and non-SECP256R1 curves for sign, verify,
- or shared secret.
-* Fix for K64 MMCAU with `WOLFSSL_SMALL_STACK_CACHE`.
-* Fix the RSA verify only build.
-* Fix in SP C implementation for small stack.
-* Fix using the auth key id extension is set, hash might not be present.
-* Fix when flattening certificate structure to include the subject alt names.
-* Fixes for building with ECC sign/verify only.
-* Fix for ECC and no cache resistance.
-* Fix memory leak in DSA.
-* Fix build on minGW.
-* Fix `PemToDer()` call in `ProcessBuffer()` to set more than ECC.
-* Fix for using RSA without SHA-512.
-* Add some close tags to the echoserver HTTP example output.
-* Miscellaneous fixes and updates for static analysis reports.
-* Fixes for time structure support.
-* Fixes for VxWorks support.
-* Fixes for Async crypto support.
-* Fix cache resist compile to work with SP C code.
-* Fixes for Curve25519 x64 asm.
-* Fix for SP x64 div.
-* Fix for DTLS edge case where CCS and Finished come out of order and the
- retransmit pool gets flushed.
-* Fix for infinite loop in SHA-1 with small inputs. Thanks to Peter W.
-* Fix for FIPS Hmac where `wc_HmacInit()` isn't used. `wc_HmacSetKey()` needs
- to initialize the Hmac structure. Type is set to NONE, and checked against
- NONE, not 0.
-* Fixes for SP RSA private operations.
-* Fixes for Xilinx SDK and Zynq UltraScale+ MPSoC
-* Fix leak when building with HAVE_AESGCM and NO_AES_DECRYPT. Thanks G.G.
-* Fixes for building ECC without ASN.
-* Fix for async TLSv1.3 issues.
-* Fix `wc_KeyPemToDer()` with PKCS1 and empty key.
-* Omit `-fomit-frame-pointer` from CFLAGS in configure.ac.
-
-## Improvements/Optimizations
-
-* Qt 5.12 and 5.13 support.
-* Added more digest types to Cryptocell RSA sign/verify.
-* Some memory usage improvements.
-* Speed improvements for mp_rand.
-* Improvements to CRL and OCSP support.
-* Refactor Poly1305 AEAD/MAC to reduce duplicate code.
-* Add blinding to RSA key gen.
-* Improvements to blinding.
-* Improvement and expansion of OpenSSL Compatibility Layer.
-* Improvements to ChaCha20.
-* Improvements to X.509 processing.
-* Improvements to ECC support.
-* Improvement in detecting 64-bit support.
-* Refactor to combine duplicate ECC parameter parsing code.
-* Improve keyFormat to be set by algId and let later key parsing produce fail.
-* Add test cases for 3072-bit and 4096-bit RSA keys.
-* Improve signature wrapper and DH test cases.
-* Improvements to the configure.ac script.
-* Added constant time RSA q modinv p.
-* Improve performance of SP Intel 64-bit asm.
-* Added a few more functions to the ABI list.
-* Improve TLS bidirectional shutdown behavior.
-* OpenSSH 8.1 support.
-* Improve performance of RSA/DH operations on x64.
-* Add support for PKCS7/CMS Enveloped data with fragmented encrypted content.
-* Example linker description for FIPS builds to enforce object ordering.
-* C# wrapper improvements. Added TLS client example and TLSv1.3 methods.
-* Allow setting MTU in DTLS.
-* Improve PKCS12 create for outputting encrypted bundles.
-* Constant time EC map to affine for private operations.
-* Improve performance of RSA public key ops with TFM.
-* Smaller table version of AES encrypt/decrypt.
-* Support IAR with position independent code (ROPI).
-* Improve speed of AArch64 assembly.
-* Support AES-CTR on esp32.
-* Add a no malloc option for small SP math.
-
-## This release of wolfSSL includes fixes for 2 security vulnerabilities.
-
-* For fast math, use a constant time modular inverse when mapping to affine
- when operation involves a private key - keygen, calc shared secret, sign.
- Thank you to Alejandro Cabrera Aldaya, Cesar Pereida García and
- Billy Bob Brumley from the Network and Information Security Group (NISEC)
- at Tampere University for the report.
-
-* Change constant time and cache resistant ECC mulmod. Ensure points being
- operated on change to make constant time. Thank you to Pietro Borrello at
- Sapienza University of Rome.
-
-For additional vulnerability information visit the vulnerability page at
-https://www.wolfssl.com/docs/security-vulnerabilities/
-
-See INSTALL file for build instructions.
-More info can be found on-line at https://wolfssl.com/wolfSSL/Docs.html
-
-
-
-# wolfSSL Release 4.3.0 (12/20/2019)
-
-If you have questions about this release, then feel free to contact us on our info@ address.
-
-Release 4.3.0 of wolfSSL embedded TLS has bug fixes and new features including:
-
-##### New Feature Additions
-* Add --enable-libwebsockets option for support of libwebsockets build
-* Updated support for NGINX 1.15.0 and added support for 1.16.1
-* Add wc_scrypt_ex API which can take in iterations rather than cost
-* Updates to RSA-PSS salt lengths. Macro WOLFSSL_PSS_SALT_LEN_DISCOVER allows for discovering the salt length. Passing RSA_PSS_SALT_LEN_DISCOVER value into wc_RsaPSS_Verify_ex attempts to discover salt length and can use larger salt lengths
-* Additional OpenSSL compatibility API wolfSSL_CertManagerGetCerts and wolfSSL_X509_STORE_GetCerts for retrieving certificates
-* Add support for 4096-bit RSA/DH operations to SP (single precision) build
-* Update support for Google WebRTC to branch m79
-* Adds new FREESCALE_MQX_5_0 macro for MQX 5.0 support
-* Adds a CMS/PKCS#7 callback for signing SignedData raw digests enabled with macro HAVE_PKCS7_RSA_RAW_SIGN_CALLBACK and call to function wc_PKCS7_SetRsaSignRawDigestCb
-* Add --disable-errorqueue feature to disable adding debug nodes to queue with --enable-opensslextra build
-* After defining WOLFSSL_SHUTDOWNONCE macro the function wolfSSL_shutdown will return a specific error code of SSL_SHUTDOWN_ALREADY_DONE_E, to indicate to the application that the shutdown has already occurred
-* Add AES-CCM decryption to benchmarking app bundled with wolfSSL
-
-
-##### Fixes
-* Fixes IAR warnings with IAR-EWARM 7.50.2
-* Alignment fixes for mmCAU with AES and hashing algorithms
-* Fix check for plaintext length when using Encrypt-Then-MAC
-* Fix for unit tests with NGINX and debug mode
-* Fix for macro names in test cases (WOLFSSL_PUBLIC_MP) and pkcs7.c (HAVE_AESCCM)
-* Fix for Apache want read case with BIO retry flag
-* Fix for PKCS7 streaming mode that would error rather than verify bundle
-* Fix for freeing mutex for X509 and wolfSSL_EVP_PKEY_free, applies to OPENSSL_EXTRA / --enable-opensslextra builds
-* Fix for encrypt then MAC when re-handshaking, encrypted handshakes change over to ETM now
-* Fix for curve25519 assembly optimizations with GCC + AVX2
-* Fix to hang onto certificate for retrieval if using secure renegotiation and session resumption
-* Fixes case where the heap hint is created before WOLFSSL_CTX, when calling wc_LoadStaticMemory instead of wolfSSL_CTX_load_static_memory
-* Fix for setting correct return value in PKCS12 parse error case
-* Reset certificate extension policy count
-* Fix for memcpy with TLS I/O buffers when using staticmemory pools and loading memory as WOLFMEM_IO_POOL_FIXED
-* Fixes and updates for STM32 port, including additional mutex protection, AES-GCM decrypt auth tag, AES-CTR mode with CubeMX, update to OpenSTM32 project
-* Fix for EVP CipherUpdate decrypt and add a test case
-* DTLS fixes including; some DTLS sequence number issues in general where the sequence was incremented twice for each record and some offset values in the DTLS window checking
-* Fix sp_add to handle carries properly (--enable-sp-math build)
-* Additional sanity check on OCSP response decoder
-* Fix for vasprintf with Solaris and AIX builds
-* Fix for missing variable declaration with --enable-scep --with-libz build
-* Fix for certificate date check with async build
-* Sanity check on “out” length with Base64_Decode added
-* Decode X.509 name - check input length for jurisdiction
-* Additional sanity check on variable out index with DecodePolicyOID
-* Fix for PKCS#12 PBKDF buffer size for buffer overflow
-* TLS supported curve extension check curve name is in range before checking for disabled
-* Sanity check for non TLS 1.3 cipher suite with TLS 1.3 connection
-* Poly1305 AVX2 assembly optimization fix for carry with large input values
-* Fixes for coverity report including null termination of test case strings and initialization of PKCS7 variables
-* Fix for API visibility of wc_ed25519_check_key which resolves a wolfcrypt-py install issue
-* Sanity check on max ALPN length accepted
-* Additional sanity check when parsing CRL’s for copying the structure, fix for bounds checking
-* Additional checks on error string length for debug mode and check for null termination
-* ProcessPeerCerts allocating memory for exts with OPENSSL_EXTRA properly
-* Clear the top bit when generating a serial number
-* Sanity check that ASN date characters are valid ASCII characters
-* Fix to add deterministic ECDSA and fix corner cases for add point.
-* When getting the DH public key, initialize the P, G, and Pub pointers to NULL, then set that we own the DH parameters flag. This allows FreeSSL to correctly clean up the DH key.
-
-##### Improvements/Optimizations
-* Added configure error report with using invalid build of --enable-opensslextra and --enable-opensslcoexist together
-* Update PKCS11 for determining key type given the private key type
-* Update DoVerifyCallback to check verify param hostName and ipasc (--enable-opensslextra builds)
-* additional null sanity checks on input arguments with QSH and Cryptocell builds
-* Additional checks on RSA key added to the function wc_CheckRsaKey
-* Updates for EBSNET support, including fseek, revised macros in settings.h, and realloc support
-* MISRA-C updates for SP math code
-* Update to allow compiling for pwdbased/PBKDF2 with having NO_ASN defined
-* Modify KeyShare and PreSharedKey TLS 1.3 extension linked list advancement to be easier for compilers to handle
-* Optimization to parsing certificate extension name strings
-* Adjustment to example server -x runtime behavior when encountering an unrecoverable error case
-* Remove Blake2b support from HMAC
-* Adds new hash wrapper init wc_HashInit_ex and Adds new PBKDF2 API wc_PBKDF2_ex for using heap hints for custom memory pools
-* Adding script to cleanup generated test files, scripts/cleanup_testfiles.sh
-* Support 20-byte serial numbers and disallow 0
-* sp_div improved to handle when a has less digits than d (--enable-sp-math build)
-* When decoding a policy OID and turning it into a human readable string use snprintf()
-* set the IV length of EVP AES GCM to 96-bits by default
-* Allow adding CAs for root CA's over the wire that do not have the extended key usage cert_sign set
-* Added logging messages for SendAlert call and update to send alert after verify certificate callback
-* updates for synchronous OCTEON support in the Sniffer
-* Rework BER to DER functions to not be recursive
-* Updates to find CRL by AuthKeyId
-* Add a check for subject name hash after matching AKID
-* Enhancement to mp_invmod/fp_exptmod/sp_exptmod to handle more inputs
-* Remove requirement for macro NO_SKID when CRL use is enabled
-* Improvements on XFTELL return code and MAX_WOLFSSL_FILE_SIZE checking
-* When checking if value is prime return NO in the case of the value 1
-* Improve Cortex-M RSA/DH assembly code performance
-* Additional sanity checks on arrays and buffers with OCSP
-
-
-##### This release of wolfSSL includes a fix for 6 security vulnerabilities.
-
-
-A fix for having an additional sanity check when parsing certificate domain names was added. This fix checks that the domain name location index is not past the maximum value before setting it. The reported issue affects users that are parsing certificates and have --enable-opensslextra (macro OPENSSL_EXTRA), or build options that turn this on such as --enable-all, when building wolfSSL. The CVE associated with the fix is CVE-2019-18840.
-
-Fix to set a limit on the maximum size of DTLS handshake messages. By default the RFC allows for handshake message sizes of up to 2^24-1 bytes long but in typical field use cases the handshake messages are not this large. Setting a maximum size limit on the handshake message helps avoid a potential DoS attack due to memory being malloc’d. The new default max size is set to handle a certificate chain length of approximately 9, 2048 bit RSA certificates. This only effects builds that have DTLS turned on and have applications that are using DTLS.
-
-Fix for a potential hang when ECC caching is enabled (off by default) and --enable-fastmath is used. ECC caching is off by default and is turned on in builds that are using --enable-all or --enable-fpecc. This issue does not affect builds that are using the macro WOLFSSL_VALIDATE_ECC_IMPORT which turns on validating all ECC keys that are imported. To fix this potential hang case a sanity check on the input values to the internal invmod function was added.
-
-
-To fix a potential fault injection attack on a wrapper function for wolfCrypt RSA signature generations an additional sanity check verifying the signature after it’s creation was added. This check is already done automatically in current versions of wolfSSL with TLS connections (internal function call of VerifyRsaSign during TLS state machine). The report only affects users making calls to the wolfCrypt function wc_SignatureGenerateHash and does not affect current TLS use cases. Thanks to Daniel Moghimi (@danielmgmi) from Worcester Polytechnic Institute for the report.
-
-
-Blinding was added for DSA signing operations. The DSA signing uses the BEEA algorithm during modular inversion of the nonce which can potentially leak the nonce through side channels such as cache and power fluctuations. The fix of adding in blinding makes the DSA signing operation more resistant to side channel attacks. Users who have turned on DSA (disabled by default) and are performing signing operations should update. Note that DSA is not used in any TLS connections. Thanks to Daniel Moghimi (@danielmgmi) from Worcester Polytechnic Institute for the report.
-
-
-Fix to add additional side channel cache attack resistance to the internal ECC function wc_ecc_mulmod_ex. This function by default is used with ECDSA signing operations. Users should update if performing ECDSA singing operations (server side ECC TLS connections, mutual authentication on client side) or calling wolfCrypt ECC sign functions and have the potential for outside users to perform sophisticated monitoring of the cache.Thanks to Daniel Moghimi (@danielmgmi) from Worcester Polytechnic Institute for the report.
-
-
-For additional vulnerability information visit the vulnerability page at https://www.wolfssl.com/docs/security-vulnerabilities/
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL Release 4.2.0 (10/22/2019)
-
-If you have questions about this release, then feel free to contact us on our info@ address.
-
-Release 4.2.0 of wolfSSL embedded TLS has bug fixes and new features including:
-
-
-##### New Feature Additions
-* Over 198 OpenSSL compatibility API’s added
-* Apache port added for compiling with wolfSSL using --enable-apachehttpd
-* Port for using wolfSSL with OpenVSwitch
-* Port for Renesas TSIP added
-* Visual Studio Solution for Azure Sphere Devices (MT3620 and MT3620-mini) added to the directory IDE/VS-AZURE-SPHERE
-* Addition of Coldfire MCF5441X NetBurner example to the directory IDE/M68K/
-* Added support for prime checking to SP math build
-* Addition of DYNAMIC_TYPE_BIGINT type for tracking mp_int allocations
-* Addition of wc_ecc_get_curve_params API for getting ecc_set_type params for a curve
-* Adding in TLS_SHA256_SHA256 and TLS_SHA384_SHA384 TLS1.3 cipher suites (null ciphers)
-* Added in PKCS7 decryption callbacks for CMS operations
-* Added handling for optional ECC parameters with PKCS7 KARI
-* Addition to configure.ac for FIPS wolfRand builds
-* Adding the flag WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY for ignoring certificate date checks with the functions wolfSSL_CTX_load_verify_buffer_ex and wolfSSL_CTX_load_verify_locations_ex
-* Support for PKCS8 keys added to the function wolfSSL_CTX_use_PrivateKey_buffer
-* Support for KECCAK hashing. Build with macro WOLFSSL_HASH_FLAGS and call wc_Sha3_SetFlags(&sha, WC_HASH_SHA3_KECCAK256) before the first SHA3 update
-* Addition of setting secure renegotiation at CTX level
-* Addition of KDS (NXP Kinetis Design Studio) example project to directory IDE/KDS/
-* Support for Encrypt-Then-MAC to TLS 1.2 and below
-* Added a new build option for a TITAN session cache that can hold just over 2 million session entries (--enable-titancache)
-* Synchronous Quick Assist Support for Sniffer
-* Added Support for SiFive HiFive Unleashed board
-* Support for Google WebRTC added in to compatibility layer build
-* Additional Sniffer features; IPv6 sniffer support, Fragment chain input, Data store callback, Various statistics tweaks and other Sniffer fixes
-
-
-##### Fixes
-* Addition of internal content digest checks for PKCS7 SignedData message types that also have signed attributes present. Users could previously check the content digest against the messageDigest attribute, but this adds a default internal check. It’s advised that if users are not doing their own checks that they update wolfSSL version.
-* A fix for BIO and base64 encoding/decoding
-* A fix for memory management of CTX / WOLFSSL_METHOD pointer with staticmemory build
-* A fix for detection of AES-NI support to read bit 25 from ECX
-* A fix a DTLS handshake message retransmit bug corner case
-* Additional fixes to coding style and uninitialized values using cppcheck tool
-* Fixes for failing IAR builds, thanks to Joseph C. for the report
-* Fixes for ARMv8 Poly1305 inline assembly code to compile with clang 3.5
-* Fixes for esp-idf build warnings
-* A fix for XSNPRINTF with mingw32 builds
-* Fixes for strncpy warnings when compiling with newer versions of GCC
-* A fix for using IV of all 0’s as default case with AES-NI when no IV passed in
-* Fixes for types with 16 bit systems, thanks to Ralf Schlatterbeck
-* Fixes for build with devcrypto/afalg and aesccm, thanks to GitHub user cotequeiroz for the report
-* Fixes for addressing handling of pathLen constraint when parsing certificate chains
-* A DTLS fix for alert packet injection at end of handshake
-* Fixes for Poly1305 AArch64 assembly code
-* A fix for memory management in error cases when adding a CA, this resolves a coverity report
-* A fix for SP math for precomputation tables to not include infinity field
-* Fixes for checks on defines with AVX2 and Poly1305 build
-* Fixes for CubeMX HAL v1.15 with STM32F7
-* A fix for TLS 1.3 to always send Key Share extension
-* A fix for a potential buffer over read in TLS 1.3 DoTls13SupportedVersions, thanks to Artem for the report
-
-
-##### Improvements/Optimizations
-* Optimization to SP math, changing variables to const where possible. Thanks to Yair Poleg (yair.poleg@ayyeka.com) of Ayyeka for proposing static declaration of global constant variables in SP code
-* Additional fuzz testing and fixes for TLS 1.3 use, including additional TLS 1.3 alert messages (PR#2440 for more information)
-* Additional sanity check that ciphersuite from client hello is used in server hello response (check can be removed with the macro WOLFSSL_NO_STRICT_CIPHER_SUITE)
-* Improved MMCAU performance: SHA-1 by 35%, SHA-256 by 20% and MD5 by 78%
-* By default, disallow SHA-2 cipher suites from being used in TLS 1.0 and 1.1 handshakes (can be ignored with macro WOLFSSL_OLDTLS_SHA2_CIPHERSUITES)
-* Optimization of export session buffer size with enable option --enable-sessionexport=nopeer
-* Spelling fixes in comments and some cast warnings resolved
-* Updates to abstract atoi to XATOI when used, this allows for better portability when making calls to the system function atoi for converting strings to integers
-* Improvements to the STSAFE-A100 error code handling, providing better debug information
-* Adding a sanity check on TLS 1.3 ticket encrypt callback
-* Specialized implementations of mod exp when base is 2
-
-
-
-##### This release of wolfSSL includes a fix for 5 security vulnerabilities.
-
-Fix for sanity check on reading TLS 1.3 pre-shared key extension. This fixes a potential for an invalid read when TLS 1.3 and pre-shared keys is enabled. Users without TLS 1.3 enabled are unaffected. Users with TLS 1.3 enabled and HAVE_SESSION_TICKET defined or NO_PSK not defined should update wolfSSL versions. Thanks to Robert Hoerr for the report.
-
-Fix for potential program hang when ocspstapling2 is enabled. This is a moderate level fix that affects users who have ocspstapling2 enabled(off by default) and are on the server side. In parsing a CSR2 (Certificate Status Request v2 ) on the server side, there was the potential for a malformed extension to cause a program hang. Thanks to Robert Hoerr for the report.
-
-Two moderate level fixes involving an ASN.1 over read by one byte. CVE-2019-15651 is for a fix that is due to a potential one byte over read when decoding certificate extensions. CVE-2019-16748 is for a fix on a potential one byte overread with checking certificate signatures. This affects builds that do certificate parsing and do not have the macro NO_SKID defined.Thanks to Yan Jia and the researcher team from Institute of Software, Chinese Academy of Sciences for the report.
-
-High level fix for DSA operations involving an attack on recovering DSA private keys. This fix affects users that have DSA enabled and are performing DSA operations (off by default). All users that have DSA enabled and are using DSA keys are advised to regenerate DSA keys and update wolfSSL version. ECDSA is NOT affected by this and TLS code is NOT affected by this issue. Thanks to Ján Jančár for the report.
-
-
-For additional vulnerability information visit the vulnerability page at https://www.wolfssl.com/docs/security-vulnerabilities/
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-
-# wolfSSL Release 4.1.0 (07/22/2019)
-
-Release 4.1.0 of wolfSSL embedded TLS has bug fixes and new features including:
-
-* A fix for the check on return value when verifying PKCS7 bundle signatures, all users with applications using the function wc_PKCS7_VerifySignedData should update
-* Adding the function wc_PKCS7_GetSignerSID for PKCS7 firmware bundles as a getter function for the signers SID
-* PKCS7 callback functions for unwrapping of CEK and for decryption
-* Adding the error value PKCS7_SIGNEEDS_CHECK when no certificates are available in a PKCS7 bundle to verify the signature
-* TLS 1.3 fixes including if major version is TLS Draft then it is now ignored and if version negotiation occurs but none were matched then an alert is now sent
-* Addition of the WOLFSSL_PSK_ONE_ID macro for indicating that only one identity in TLS 1.3 PSK is available and will be cached
-* Adding sanity checks on length of PSK identity from a TLS 1.3 pre-shared key extension
-* Additional sanity checks and alert messages added for TLS 1.3
-* Adding XTIME_MS macro to simplify the tls13.c time requirement
-* Improvements and refactoring of code related to parsing and creating TLS 1.3 client hello packets
-* TLS 1.3 version renegotiation now happens before interpreting ClientHello message
-* Chacha20 algorithm optimizations on the ARM architecture for performance increase
-* Poly1305 algorithm performance enhancements for the ARM architecture using the SIMD NEON extension
-* Curve25519 and Ed25519 optimized for ARM architecture for performance increase
-* SHA-512/384 optimizations for performance with ARM architecture using the SIMD NEON extension
-* Sniffer updates including adding support for the null cipher and static ECDH key exchange and new SSLWatchCb callback
-* Cipher suite TLS_RSA_WITH_NULL_MD5 for use with the sniffer (off by default)
-* Sniffer statistic print outs with the macro WOLFSSL_SNIFFER_STATS defined
-* A fix for wolfSSL_DH_generate_key when WOLFSSL_SMALL_STACK is defined
-* wolfSSL_BN_Init implementation for opensslextra builds
-* Updates to the function wolfSSL_i2d_RSAPrivateKey and additional automated tests
-* Fixes for EVP_CipherFinal edge cases to match behavior desired
-* Check for appropriate private vs public flag with ECC key decode in wolfSSL_EC_KEY_LoadDer_ex, thanks to Eric Miller for the report
-* Implementation of the function wolfSSL_PEM_write_DHparams
-* wolfSSL_RAND_seed is called in wolfSSL_Init now when opensslextra is enabled
-* CryptoCell-310 support on nRF52840 added
-* Fixes for atmel_ecc_create_pms to free the used slot.
-* Fixes for building ATECC with ATCAPRINTF or WOLFSSL_PUBLIC_MP
-* Cortex-M code changes to support IAR compiler
-* Improvements to STM32 AES-GCM performance
-* Fixes for 16-bit systems including PK callbacks, ATECC and LowResTimer function ptoto.
-* IAR-EWARM compiler warning fix
-* Clean up of user_settings for CS+ port
-* Updating Renesas example projects to the latest version
-* Micrium updates adjusting STATIC macro name and added inline flag
-* Fixes for building with WOLFSSL_CUSTOM_CURVES on Windows
-* Updates and refactor to the default build settings with Arduino
-* Fixes for visibility tags with Cygwin build
-* STSAFE Improvements to support wolfSSL Crypto Callbacks
-* Improvements to NetBSD builds and mutex use in test case
-* Updating TI hardware offload with WOLFSSL_TI_CRYPT build
-* Maintaining Xilinx FreeRTOS port by adjusting time.h include in wolfSSL
-* SiFive HiFive E31 RISC‐V core family port
-* Port for Telit IoT AppZone SDK
-* OCSP Response signed by issuer with identical SKID fix
-* Fix for sending revoked certificate with OCSP
-* Honor the status sent over connection with peers and do not perform an internal OCSP lookup
-* Adding the build flag `--enable-ecccustcurves=all` to enable all curve types
-* Support add for Ed25519ctx and Ed25519ph sign/verify algorithms as per RFC 8032
-* Addition of the macro WOLFSSL_NO_SIGALG to disable signature algorithms extension
-* wc_AesCtrEncrypt in place addition, where input and output buffer can be the same buffer
-* Single shot API added for SHA3; wc_Sha3_224Hash, wc_Sha3_256Hash, wc_Sha3_384Hash, wc_Sha3_512Hash
-* Function additions for JSSE support some of which are wolfSSL_get_ciphers_iana and wolfSSL_X509_verify along with expansion of the --enable-jni option
-* Macro guards for more modular SHA3 build (i.e. support for 384 size only)
-* Benchmarking -thread argument support for asynchronous crypto
-* Blake2s support (--enable-blake2s), which provides 32-bit Blake2 support
-* Macro SHA256_MANY_REGISTERS addition to potentially speed up SHA256 depending on architecture
-* Additional TLS alert messages sent with the macro WOLFSSL_EXTRA_ALERTS defined
-* Feature to fail resumption of a session if the session’s cipher suite is not in the client’s list, this can be overridden by defining the macro NO_RESUME_SUITE_CHECK
-* Fallback SCSV (Signaling Cipher Suite Value) support on Server only (--enable-fallback-scsv)
-* DTLS export state only (wolfSSL_dtls_export_state_only) which is a subset of the information exported from previous DTLS export function
-* Function wc_DhCheckPubValue added to perform simple validity checks on DH keys
-* Support for RSA SHA-224 signatures with TLS added
-* Additional option “-print” to the benchmark app for printing out a brief summary after benchmarks are complete
-* Adding (--disable-pkcs12) option and improvements for disabled sections in pwdbased.c, asn.c, rsa.c, pkcs12.c and wc_encrypt
-* Added DES3 support to the wolfSSL crypto callbacks
-* Compile time fixes for build case with SP math and RSA only
-* Fixes for Coverity static analysis report including explicit initialization of reported stack variables some additional Coverity fixes added thanks to Martin
-* Fixes for scan build warnings (i.e possible null dereference in ecc.c)
-* Resetting verify send value with a call to wolfSSL_clear function
-* Fix for extern with sp_ModExp_2048 when building with --cpp option
-* Fix for typo issue with --enable-sp=cortexm
-* Adding #pragma warning disable 4127 for tfm.c when building with Visual Studio
-* Improvements to the maximum ECC signature calculations
-* Improvements to TLS write handling in error cases which helps user application not go through with a wolfSSL_write attempt after a wolfSSL_read failure
-* Fix for read directory functions with Windows (wc_ReadDirFirst and wc_ReadDirNext)
-* Sanity check on index before accessing domain component buffer in call to wolfSSL_X509_NAME_get_entry
-* Sending fatal alert from client side on version error
-* Fix for static RSA cipher suite with PK callback and no loaded private key
-* Fix for potential memory leak in error case with the function wc_DsaKeyToDer, thanks to Chris H. for the report
-* Adjusting STRING_USER macro to remove includes of standard lib or
-* Bug fix for checking wrong allocation assignment in the function wc_PBKDF2 and handling potential leak on allocation failure. This case is only hit when the specific call to malloc fails in the function wc_PBKDF2. Thanks to Robert Altnoeder (Linbit) for the report
-* Improved length checks when parsing ASN.1 certificates
-* extern "C" additions to header files that were missing them
-* Improved checking of return values with TLS extension functions and error codes
-* Removing redundant calls to the generate function when instantiating and reseeding DRBG
-* Refactoring and improvements to autoconf code with consolidating AM_CONDITIONAL statements
-* Improvements for handling error return codes when reading input from transport layer
-* Improvements to efficiency of SNI extension parsing and error checking with ALPN parsing
-* Macro WOLFSSL_DEBUG_TLS addition for printing out extension data being parsed during a TLS connection
-* Adjustment of prime testing with --disable-fastmath builds
-
-
-This release of wolfSSL includes a fix for 2 security vulnerabilities.
-
-There is a fix for a potential buffer overflow case with the TLSv1.3 PSK extension parsing. This affects users that are enabling TLSv1.3 (--enable-tls13). Thanks to Robert Hoerr for the report. The CVE associated with the report is CVE-2019-11873.
-
-There is a fix for the potential leak of nonce sizes when performing ECDSA signing operations. The leak is considered to be difficult to exploit but it could potentially be used maliciously to perform a lattice based timing attack against previous wolfSSL versions. ECC operations with --enable-sp and --enable-sp-asm are not affected, users with private ECC keys in other builds that are performing ECDSA signing operations should update versions of wolfSSL along with private ECC keys. Thanks to Ján Jančár from Masaryk University for the report.
-
-
-# wolfSSL Release 4.0.0 (03/20/2019)
-
-Release 4.0.0 of wolfSSL embedded TLS has bug fixes and new features including:
-
-* Support for wolfCrypt FIPS v4.0.0, certificate #3389
-* FIPS Ready Initiative
-* Compatibility fixes for secure renegotiation with Chrome
-* Better size check for TLS record fragment reassembly
-* Improvements to non-blocking and handshake message retry support for DTLS
-* Improvements to OCSP with ECDSA signers
-* Added TLS server side secure renegotiation
-* Added TLS Trusted CA extension
-* Add support for the Deos Safety Critical RTOS
-* OCSP fixes for memory management and initializations
-* Fixes for EVP Cipher decryption padding checks
-* Removal of null terminators on `wolfSSL_X509_print` substrings
-* `wolfSSL_sk_ASN1_OBJCET_pop` function renamed to `wolfSSL_sk_ASN1_OBJECT_pop`
-* Adjustment to include path in compatibility layer for evp.h and objects.h
-* Fixes for decoding BER encoded PKCS7 contents
-* TLS handshake now supports using PKCS #11 for private keys
-* PKCS #11 support of HMAC, AES-CBC and random seeding/generation
-* Support for named FFDHE parameters in TLS 1.2 (RFC 7919)
-* Port to Zephyr Project
-* Move the TLS PRF to wolfCrypt.
-* Update to CMS KARI support
-* Added ESP32 WROOM support
-* Fixes and additions to the OpenSSL compatibility layer
-* Added WICED Studio Support
-* MDK CMSIS RTOS v2
-* Xcode project file update
-* Fixes for ATECC508A/ATECC608A
-* Fixes issue with CA path length for self signed root CA's
-* Fixes for Single Precision (SP) ASM when building sources directly
-* Fixes for STM32 AES GCM
-* Fixes for ECC sign with hardware to ensure the input is truncated
-* Fixes for proper detection of PKCS7 buffer overflow case
-* Fixes to handle degenerate PKCS 7 with BER encoding
-* Fixes for TLS v1.3 handling of 6144 and 8192 bit keys
-* Fixes for possible build issues with SafeRTOS
-* Added `ECC_PUBLICKEY_TYPE` to the support PEM header types
-* Added strict checking of the ECDSA signature DER encoding length
-* Added ECDSA option to limit sig/algos in client_hello to key size with
- `USE_ECDSA_KEYSZ_HASH_ALGO`
-* Added Cortex-M support for Single Precision (SP) math
-* Added wolfCrypt RSA non-blocking time support
-* Added 16-bit compiler support using --enable-16bit option
-* Improved Arduino sketch example
-* Improved crypto callback features
-* Improved TLS benchmark tool
-* Added new wrapper for snprintf for use with certain Visual Studio builds,
- thanks to David Parnell (Cambridge Consultants)
-
-This release of wolfSSL includes a fix for 1 security vulnerability.
-
-* Fixed a bug in tls_bench.c example test application unrelated to the crypto
- or TLS portions of the library. (CVE-2019-6439)
-
-
-# wolfSSL Release 3.15.7 (12/26/2018)
-
-Release 3.15.7 of wolfSSL embedded TLS has bug fixes and new features including:
-
-* Support for Espressif ESP-IDF development framework
-* Fix for XCode build with iPhone simulator on i386
-* PKCS7 support for generating and verify bundles using a detached signature
-* Fix for build disabling AES-CBC and enabling opensslextra compatibility layer
-* Updates to sniffer for showing session information and handling split messages across records
-* Port update for Micrium uC/OS-III
-* Feature to adjust max fragment size post handshake when compiled with the macro WOLFSSL_ALLOW_MAX_FRAGMENT_ADJUST
-* Adding the macro NO_MULTIBYTE_PRINT for compiling out special characters that embedded devices may have problems with
-* Updates for Doxygen documentation, including PKCS #11 API and more
-* Adding Intel QuickAssist v1.7 driver support for asynchronous crypto
-* Adding Intel QuickAssist RSA key generation and SHA-3 support
-* RSA verify only (--enable-rsavfy) and RSA public only (--enable-rsapub) builds added
-* Enhancements to test cases for increased code coverage
-* Updates to VxWorks port for use with Mongoose, including updates to the OpenSSL compatibility layer
-* Yocto Project ease of use improvements along with many updates and build instructions added to the INSTALL file
-* Maximum ticket nonce size was increased to 8
-* Updating --enable-armasm build for ease of use with autotools
-* Updates to internal code checking TLS 1.3 version with a connection
-* Removing unnecessary extended master secret from ServerHello if using TLS 1.3
-* Fix for TLS v1.3 HelloRetryRequest to be sent immediately and not grouped
-
-
-
-This release of wolfSSL includes a fix for 1 security vulnerability.
-
-Medium level fix for potential cache attack with a variant of Bleichenbacher’s attack. Earlier versions of wolfSSL leaked PKCS #1 v1.5 padding information during private key decryption that could lead to a potential padding oracle attack. It is recommended that users update to the latest version of wolfSSL if they have RSA cipher suites enabled and have the potential for malicious software to be ran on the same system that is performing RSA operations. Users that have only ECC cipher suites enabled and are not performing RSA PKCS #1 v1.5 Decryption operations are not vulnerable. Also users with TLS 1.3 only connections are not vulnerable to this attack. Thanks to Eyal Ronen (Weizmann Institute), Robert Gillham (University of Adelaide), Daniel Genkin (University of Michigan), Adi Shamir (Weizmann Institute), David Wong (NCC Group), and Yuval Yarom (University of Adelaide and Data61) for the report.
-
-The paper for further reading on the attack details can be found at http://cat.eyalro.net/cat.pdf.
-
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL Release 3.15.5 (11/07/2018)
-
-Release 3.15.5 of wolfSSL embedded TLS has bug fixes and new features including:
-
-* Fixes for GCC-8 warnings with strings
-* Additional compatibility API’s added, including functions like wolfSSL_X509_CA_num and wolfSSL_PEM_read_X509_CRL
-* Fixes for OCSP use with NGINX port
-* Renamed the macro INLINE to WC_INLINE for inline functions
-* Doxygen updates and formatting for documentation generation
-* Added support for the STM32L4 with AES/SHA hardware acceleration
-* Adds checking for critical extension with certificate Auth ID and the macro WOLFSSL_ALLOW_CRIT_SKID to override the check
-* Added public key callbacks to ConfirmSignature function to expand public key callback support
-* Added ECC and Curve25519 key generation callback support
-* Fix for memory management with wolfSSL_BN_hex2bn function
-* Added support for dynamic allocation of PKCS7 structure using wc_PKCS7_New and wc_PKCS7_Free
-* Port to apache mynewt added in the directory wolfssl-3.15.5/IDE/mynewt/*
-* OCSP stapling in TLS 1.3 additions
-* Port for ASIO added with --enable-asio configure flag
-* Contiki port added with macro WOLFSSL_CONTIKI
-* Memory free optimizations with adding in earlier free’s where possible
-* Made modifications to the primality testing so that the Miller-Rabin tests check against up to 40 random numbers rather than a fixed list of small primes
-* Certificate validation time generation updated
-* Fixes for MQX classic 4.0 with IAR-EWARM
-* Fix for assembly optimized version of Curve25519
-* Make SOCKET_PEER_CLOSED_E consistent between read and write cases
-* Relocate compatibility layer functions for OpenSSH port update
-* Update to Intel® SGX port, files included by Windows version and macros defined when using WOLFSSL_SGX
-* Updates to Nucleus version supported
-* Stack size reduction with smallstack build
-* Updates to Rowley-Crossworks settings for CMSIS 4
-* Added reference STSAFE-A100 public key callbacks for TLS support
-* Added reference ATECC508A/ATECC608A public key callbacks for TLS support
-* Updated support for latest CryptoAuthLib (10/25/2018)
-* Added a wolfSSL static library project for Atollic TrueSTUDIO
-* Flag to disable AES-CBC and have only AEAD cipher suites with TLS
-* AF_ALG and cryptodev-linux crypto support added
-* Update to IO callbacks with use of WOLFSSL_BIO
-* Additional support for parsing certificate subject OIDs (businessCategory, jurisdiction of incorporation country, and jurisdiction of incorporation state)
-* Added wc_ecc_ecport_ex and wc_export_inti API's for ECC hex string exporting
-* Updates to XCODE build with wolfSSL
-* Fix for guard on when to include sys/time.h header
-* Updates and enhancements to the GCC-ARM example
-* Fix for PKCS8 padding with encryption
-* Updates for wolfcrypt JNI wrapper
-* ALT_ECC_SIZE use with SP math
-* PIC32MZ hardware acceleration buffer alignment fixes
-* Renesas e2studio project files added
-* Renesas RX example project added
-* Fix for DH algorithm when using SP math with ARM assembly
-* Fixes and enhancements for NXP K82 support
-* Benchmark enhancements to print in CSV format and in Japanese
-* Support for PKCS#11 added with --enable-pkcs11
-* Fixes for asynchronous crypto use with TLS 1.3
-* TLS 1.3 only build, allows for disabling TLS 1.2 and earlier protocols
-* Fix for GCC warnings in function wolfSSL_ASN1_TIME_adj
-* Added --enable-asn=nocrypt for certificate only parsing support
-* Added support for parsing PIV format certificates with the function wc_ParseCertPIV and macro WOLFSSL_CERT_PIV
-* Added APIs to support GZIP
-* Updates to support Lighttpd
-* Version resource added for Windows DLL builds
-* Increased code coverage with additional testing
-* Added support for constructed OCTET_STRING with PKCS#7 signed data
-* Added DTLS either (server/client) side initialization setting
-* Minor fixes for building with MINGW32 compiler
-* Added support for generic ECC PEM header/footer with PKCS8 parsing
-* Added Japanese output to example server and client with “-1 1” flag
-* Added USE_ECDSA_KEYSZ_HASH_ALGO macro for building to use digest sizes that match ephemeral key size
-* Expand PKCS#7 CMS support with KEKRI, PWRI and ORI
-* Streaming capability for PKCS#7 decoding and sign verify added
-
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL Release 3.15.3 (6/20/2018)
-
-Release 3.15.3 of wolfSSL embedded TLS has bug fixes and new features including:
-
-* ECDSA blinding added for hardening against side channel attacks
-* Fix for compatibility layer build with no server and no client defined
-* Use of optimized Intel assembly instructions on compatible AMD processor
-* wolfCrypt Nucleus port additions
-* Fix added for MatchDomainName and additional tests added
-* Fixes for building with ‘WOLFSSL_ATECC508A’ defined
-* Fix for verifying a PKCS7 file in BER format with indefinite size
-
-
-This release of wolfSSL fixes 2 security vulnerability fixes.
-
-Medium level fix for PRIME + PROBE attack combined with a variant of Lucky 13. Constant time hardening was done to avoid potential cache-based side channel attacks when verifying the MAC on a TLS packet. CBC cipher suites are susceptible on systems where an attacker could gain access and run a parallel program for inspecting caching. Only wolfSSL users that are using TLS/DTLS CBC cipher suites need to update. Users that have only AEAD and stream cipher suites set, or have built with WOLFSSL_MAX_STRENGTH (--enable-maxstrength), are not vulnerable. Thanks to Eyal Ronen, Kenny Paterson, and Adi Shamir for the report.
-
-Medium level fix for a ECDSA side channel attack. wolfSSL is one of over a dozen vendors mentioned in the recent Technical Advisory “ROHNP” by author Ryan Keegan. Only wolfSSL users with long term ECDSA private keys using our fastmath or normal math libraries on systems where attackers can get access to the machine using the ECDSA key need to update. An attacker gaining access to the system could mount a memory cache side channel attack that could recover the key within a few thousand signatures. wolfSSL users that are not using ECDSA private keys, that are using the single precision math library, or that are using ECDSA offloading do not need to update. (blog with more information https://www.wolfssl.com/wolfssh-and-rohnp/)
-
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-# wolfSSL Release 3.15.0 (06/05/2018)
-
-Release 3.15.0 of wolfSSL embedded TLS has bug fixes and new features including:
-
-* Support for TLS 1.3 Draft versions 23, 26 and 28.
-* Add FIPS SGX support!
-* Single Precision assembly code added for ARM and 64-bit ARM to enhance performance.
-* Improved performance for Single Precision maths on 32-bit.
-* Improved downgrade support for the TLS 1.3 handshake.
-* Improved TLS 1.3 support from interoperability testing.
-* Added option to allow TLS 1.2 to be compiled out to reduce size and enhance security.
-* Added option to support Ed25519 in TLS 1.2 and 1.3.
-* Update wolfSSL_HMAC_Final() so the length parameter is optional.
-* Various fixes for Coverity static analysis reports.
-* Add define to use internal struct timeval (USE_WOLF_TIMEVAL_T).
-* Switch LowResTimer() to call XTIME instead of time(0) for better portability.
-* Expanded OpenSSL compatibility layer with a bevy of new functions.
-* Added Renesas CS+ project files.
-* Align DH support with NIST SP 800-56A, add wc_DhSetKey_ex() for q parameter.
-* Add build option for CAVP self test build (--enable-selftest).
-* Expose mp_toradix() when WOLFSSL_PUBLIC_MP is defined.
-* Example certificate expiration dates and generation script updated.
-* Additional optimizations to trim out unused strings depending on build options.
-* Fix for DN tag strings to have “=” when returning the string value to users.
-* Fix for wolfSSL_ERR_get_error_line_data return value if no more errors are in the queue.
-* Fix for AES-CBC IV value with PIC32 hardware acceleration.
-* Fix for wolfSSL_X509_print with ECC certificates.
-* Fix for strict checking on URI absolute vs relative path.
-* Added crypto device framework to handle PK RSA/ECC operations using callbacks, which adds new build option `./configure --enable-cryptodev` or `WOLF_CRYPTO_DEV`.
-* Added devId support to ECC and PKCS7 for hardware based private key.
-* Fixes in PKCS7 for handling possible memory leak in some error cases.
-* Added test for invalid cert common name when set with `wolfSSL_check_domain_name`.
-* Refactor of the cipher suite names to use single array, which contains internal name, IANA name and cipher suite bytes.
-* Added new function `wolfSSL_get_cipher_name_from_suite` for getting IANA cipher suite name using bytes.
-* Fixes for fsanitize reports.
-* Fix for openssl compatibility function `wolfSSL_RSA_verify` to check returned size.
-* Fixes and improvements for FreeRTOS AWS.
-* Fixes for building openssl compatibility with FreeRTOS.
-* Fix and new test for handling match on domain name that may have a null terminator inside.
-* Cleanup of the socket close code used for examples, CRL/OCSP and BIO to use single macro `CloseSocket`.
-* Refactor of the TLSX code to support returning error codes.
-* Added new signature wrapper functions `wc_SignatureVerifyHash` and `wc_SignatureGenerateHash` to allow direct use of hash.
-* Improvement to GCC-ARM IDE example.
-* Enhancements and cleanups for the ASN date/time code including new API's `wc_GetDateInfo`, `wc_GetCertDates` and `wc_GetDateAsCalendarTime`.
-* Fixes to resolve issues with C99 compliance. Added build option `WOLF_C99` to force C99.
-* Added a new `--enable-opensslall` option to enable all openssl compatibility features.
-* Added new `--enable-webclient` option for enabling a few HTTP API's.
-* Added new `wc_OidGetHash` API for getting the hash type from a hash OID.
-* Moved `wolfSSL_CertPemToDer`, `wolfSSL_KeyPemToDer`, `wolfSSL_PubKeyPemToDer` to asn.c and renamed to `wc_`. Added backwards compatibility macro for old function names.
-* Added new `WC_MAX_SYM_KEY_SIZE` macro for helping determine max key size.
-* Added `--enable-enckeys` or (`WOLFSSL_ENCRYPTED_KEYS`) to enable support for encrypted PEM private keys using password callback without having to use opensslextra.
-* Added ForceZero on the password buffer after done using it.
-* Refactor unique hash types to use same internal values (ex WC_MD5 == WC_HASH_TYPE_MD5).
-* Refactor the Sha3 types to use `wc_` naming, while retaining old names for compatibility.
-* Improvements to `wc_PBKDF1` to support more hash types and the non-standard extra data option.
-* Fix TLS 1.3 with ECC disabled and CURVE25519 enabled.
-* Added new define `NO_DEV_URANDOM` to disable the use of `/dev/urandom`.
-* Added `WC_RNG_BLOCKING` to indicate block w/sleep(0) is okay.
-* Fix for `HAVE_EXT_CACHE` callbacks not being available without `OPENSSL_EXTRA` defined.
-* Fix for ECC max bits `MAX_ECC_BITS` not always calculating correctly due to macro order.
-* Added support for building and using PKCS7 without RSA (assuming ECC is enabled).
-* Fixes and additions for Cavium Nitrox V to support ECC, AES-GCM and HMAC (SHA-224 and SHA3).
-* Enabled ECC, AES-GCM and SHA-512/384 by default in (Linux and Windows)
-* Added `./configure --enable-base16` and `WOLFSSL_BASE16` configuration option to enable Base16 API's.
-* Improvements to ATECC508A support for building without `WOLFSSL_ATMEL` defined.
-* Refactor IO callback function names to use `_CTX_` to eliminate confusion about the first parameter.
-* Added support for not loading a private key for server or client when `HAVE_PK_CALLBACK` is defined and the private PK callback is set.
-* Added new ECC API `wc_ecc_sig_size_calc` to return max signature size for a key size.
-* Cleanup ECC point import/export code and added new API `wc_ecc_import_unsigned`.
-* Fixes for handling OCSP with non-blocking.
-* Added new PK (Primary Key) callbacks for the VerifyRsaSign. The new callbacks API's are `wolfSSL_CTX_SetRsaVerifySignCb` and `wolfSSL_CTX_SetRsaPssVerifySignCb`.
-* Added new ECC API `wc_ecc_rs_raw_to_sig` to take raw unsigned R and S and encodes them into ECDSA signature format.
-* Added support for `WOLFSSL_STM32F1`.
-* Cleanup of the ASN X509 header/footer and XSTRNCPY logic.
-* Add copyright notice to autoconf files. (Thanks Brian Aker!)
-* Updated the M4 files for autotools. (Thanks Brian Aker!)
-* Add support for the cipher suite TLS_DH_anon_WITH_AES256_GCM_SHA384 with test cases. (Thanks Thivya Ashok!)
-* Add the TLS alert message unknown_psk_identity (115) from RFC 4279, section 2. (Thanks Thivya Ashok!)
-* Fix the case when using TCP with timeouts with TLS. wolfSSL shall be agnostic to network socket behavior for TLS. (DTLS is another matter.) The functions `wolfSSL_set_using_nonblock()` and `wolfSSL_get_using_nonblock()` are deprecated.
-* Hush the AR warning when building the static library with autotools.
-* Hush the “-pthread” warning when building in some environments.
-* Added a dist-hook target to the Makefile to reset the default options.h file.
-* Removed the need for the darwin-clang.m4 file with the updates provided by Brian A.
-* Renamed the AES assembly file so GCC on the Mac will build it using the preprocessor.
-* Add a disable option (--disable-optflags) to turn off the default optimization flags so user may supply their own custom flags.
-* Correctly touch the dummy fips.h header.
-
-If you have questions on any of this, then email us at info@wolfssl.com.
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL Release 3.14.0 (03/02/2018)
-
-Release 3.14.0 of wolfSSL embedded TLS has bug fixes and new features including:
-
-* TLS 1.3 draft 22 and 23 support added
-* Additional unit tests for; SHA3, AES-CMAC, Ed25519, ECC, RSA-PSS, AES-GCM
-* Many additions to the OpenSSL compatibility layer were made in this release. Some of these being enhancements to PKCS12, WOLFSSL_X509 use, WOLFSSL_EVP_PKEY, and WOLFSSL_BIO operations
-* AVX1 and AVX2 performance improvements with ChaCha20 and Poly1305
-* Added i.MX CAAM driver support with Integrity OS support
-* Improvements to logging with debugging, including exposing more API calls and adding options to reduce debugging code size
-* Fix for signature type detection with PKCS7 RSA SignedData
-* Public key call back functions added for DH Agree
-* RSA-PSS API added for operating on non inline buffers (separate input and output buffers)
-* API added for importing and exporting raw DSA parameters
-* Updated DSA key generation to be FIPS 186-4 compliant
-* Fix for wolfSSL_check_private_key when comparing ECC keys
-* Support for AES Cipher Feedback(CFB) mode added
-* Updated RSA key generation to be FIPS 186-4 compliant
-* Update added for the ARM CMSIS software pack
-* WOLFSSL_IGNORE_FILE_WARN macro added for avoiding build warnings when not working with autotools
-* Performance improvements for AES-GCM with AVX1 and AVX2
-* Fix for possible memory leak on error case with wc_RsaKeyToDer function
-* Make wc_PKCS7_PadData function available
-* Updates made to building SGX on Linux
-* STM32 hashing algorithm improvements including clock/power optimizations and auto detection of if SHA2 is supported
-* Update static memory feature for FREERTOS use
-* Reverse the order that certificates are compared during PKCS12 parse to account for case where multiple certificates have the same matching private key
-* Update NGINX port to version 1.13.8
-* Support for HMAC-SHA3 added
-* Added stricter ASN checks to enforce RFC 5280 rules. Thanks to the report from Professor Zhenhua Duan, Professor Cong Tian, and Ph.D candidate Chu Chen from Institute of Computing Theory and Technology (ICTT) of Xidian University.
-* Option to have ecc_mul2add function public facing
-* Getter function wc_PKCS7_GetAttributeValue added for PKCS7 attributes
-* Macros NO_AES_128, NO_AES_192, NO_AES_256 added for AES key size selection at compile time
-* Support for writing multiple organizations units (OU) and domain components (DC) with CSR and certificate creation
-* Support for indefinite length BER encodings in PKCS7
-* Added API for additional validation of prime q in a public DH key
-* Added support for RSA encrypt and decrypt without padding
-
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL (Formerly CyaSSL) Release 3.13.0 (12/21/2017)
-
-wolfSSL 3.13.0 includes bug fixes and new features, including support for
-TLS 1.3 Draft 21, performance and footprint optimizations, build fixes,
-updated examples and project files, and one vulnerability fix. The full list
-of changes and additions in this release include:
-
-* Fixes for TLS 1.3, support for Draft 21
-* TLS 1.0 disabled by default, addition of “--enable-tlsv10” configure option
-* New option to reduce SHA-256 code size at expense of performance
- (USE_SLOW_SHA256)
-* New option for memory reduced build (--enable-lowresource)
-* AES-GCM performance improvements on AVX1 (IvyBridge) and AVX2
-* SHA-256 and SHA-512 performance improvements using AVX1/2 ASM
-* SHA-3 size and performance optimizations
-* Fixes for Intel AVX2 builds on Mac/OSX
-* Intel assembly for Curve25519, and Ed25519 performance optimizations
-* New option to force 32-bit mode with “--enable-32bit”
-* New option to disable all inline assembly with “--disable-asm”
-* Ability to override maximum signature algorithms using WOLFSSL_MAX_SIGALGO
-* Fixes for handling of unsupported TLS extensions.
-* Fixes for compiling AES-GCM code with GCC 4.8.*
-* Allow adjusting static I/O buffer size with WOLFMEM_IO_SZ
-* Fixes for building without a filesystem
-* Removes 3DES and SHA1 dependencies from PKCS#7
-* Adds ability to disable PKCS#7 EncryptedData type (NO_PKCS7_ENCRYPTED_DATA)
-* Add ability to get client-side SNI
-* Expanded OpenSSL compatibility layer
-* Fix for logging file names with OpenSSL compatibility layer enabled, with
- WOLFSSL_MAX_ERROR_SZ user-overridable
-* Adds static memory support to the wolfSSL example client
-* Fixes for sniffer to use TLS 1.2 client method
-* Adds option to wolfCrypt benchmark to benchmark individual algorithms
-* Adds option to wolfCrypt benchmark to display benchmarks in powers
- of 10 (-base10)
-* Updated Visual Studio for ARM builds (for ECC supported curves and SHA-384)
-* Updated Texas Instruments TI-RTOS build
-* Updated STM32 CubeMX build with fixes for SHA
-* Updated IAR EWARM project files
-* Updated Apple Xcode projects with the addition of a benchmark example project
-
-This release of wolfSSL fixes 1 security vulnerability.
-
-wolfSSL is cited in the recent ROBOT Attack by Böck, Somorovsky, and Young.
-The paper notes that wolfSSL only gives a weak oracle without a practical
-attack but this is still a flaw. This release contains a fix for this report.
-Please note that wolfSSL has static RSA cipher suites disabled by default as
-of version 3.6.6 because of the lack of perfect forward secrecy. Only users
-who have explicitly enabled static RSA cipher suites with WOLFSSL_STATIC_RSA
-and use those suites on a host are affected. More information will be
-available on our website at:
-
-https://wolfssl.com/wolfSSL/security/vulnerabilities.php
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL (Formerly CyaSSL) Release 3.12.2 (10/23/2017)
-
-## Release 3.12.2 of wolfSSL has bug fixes and new features including:
-
-This release includes many performance improvements with Intel ASM (AVX/AVX2) and AES-NI. New single precision math option to speedup RSA, DH and ECC. Embedded hardware support has been expanded for STM32, PIC32MZ and ATECC508A. AES now supports XTS mode for disk encryption. Certificate improvements for setting serial number, key usage and extended key usage. Refactor of SSL_ and hash types to allow openssl coexistence. Improvements for TLS 1.3. Fixes for OCSP stapling to allow disable and WOLFSSL specific user context for callbacks. Fixes for openssl and MySQL compatibility. Updated Micrium port. Fixes for asynchronous modes.
-
-* Added TLS extension for Supported Point Formats (ec_point_formats)
-* Fix to not send OCSP stapling extensions in client_hello when not enabled
-* Added new API's for disabling OCSP stapling
-* Add check for SIZEOF_LONG with sun and LP64
-* Fixes for various TLS 1.3 disable options (RSA, ECC and ED/Curve 25519).
-* Fix to disallow upgrading to TLS v1.3
-* Fixes for wolfSSL_EVP_CipherFinal() when message size is a round multiple of a block size.
-* Add HMAC benchmark and expanded AES key size benchmarks
-* Added simple GCC ARM Makefile example
-* Add tests for 3072-bit RSA and DH.
-* Fixed DRAFT_18 define and fixed downgrading with TLS v1.3
-* Fixes to allow custom serial number during certificate generation
-* Add method to get WOLFSSL_CTX certificate manager
-* Improvement to `wolfSSL_SetOCSP_Cb` to allow context per WOLFSSL object
-* Alternate certificate chain support `WOLFSSL_ALT_CERT_CHAINS`. Enables checking cert against multiple CA's.
-* Added new `--disable-oldnames` option to allow for using openssl along-side wolfssl headers (without OPENSSL_EXTRA).
-* Refactor SSL_ and hashing types to use wolf specific prefix (WOLFSSL and WC_) to allow openssl coexistence.
-* Fixes for HAVE_INTEL_MULX
-* Cleanup include paths for MySQL cmake build
-* Added configure option for building library for wolfSSH (--enable-wolfssh)
-* Openssl compatibility layer improvements
-* Expanded API unit tests
-* Fixes for STM32 crypto hardware acceleration
-* Added AES XTS mode (--enable-xts)
-* Added ASN Extended Key Usage Support (see wc_SetExtKeyUsage).
-* Math updates and added TFM_MIPS speedup.
-* Fix for creation of the KeyUsage BitString
-* Fix for 8k keys with MySQL compatibility
-* Fixes for ATECC508A.
-* Fixes for PIC32MZ hashing.
-* Fixes and improvements to asynchronous modes for Intel QuickAssist and Cavium Nitrox V.
-* Update HASH_DRBG Reseed mechanism and add test case
-* Rename the file io.h/io.c to wolfio.h/wolfio.c
-* Cleanup the wolfIO_Send function.
-* OpenSSL Compatibility Additions and Fixes
-* Improvements to Visual Studio DLL project/solution.
-* Added function to generate public ECC key from private key
-* Added async blocking support for sniffer tool.
-* Added wolfCrypt hash tests for empty string and large data.
-* Added ability to use of wolf implementation of `strtok` using `USE_WOLF_STRTOK`.
-* Updated Micrium uC/OS-III Port
-* Updated root certs for OCSP scripts
-* New Single Precision math option for RSA, DH and ECC (off by default). See `--enable-sp`.
-* Speedups for AES GCM with AESNI (--enable-aesni)
-* Speedups for SHA2, ChaCha20/Poly1035 using AVX/AVX2
-
-
-# wolfSSL (Formerly CyaSSL) Release 3.12.0 (8/04/2017)
-
-## Release 3.12.0 of wolfSSL has bug fixes and new features including:
-
-- TLS 1.3 with Nginx! TLS 1.3 with ARMv8! TLS 1.3 with Async Crypto! (--enable-tls13)
-- TLS 1.3 0RTT feature added
-- Added port for using Intel SGX with Linux
-- Update and fix PIC32MZ port
-- Additional unit testing for MD5, SHA, SHA224, SHA256, SHA384, SHA512, RipeMd, HMAC, 3DES, IDEA, ChaCha20, ChaCha20Poly1305 AEAD, Camellia, Rabbit, ARC4, AES, RSA, Hc128
-- AVX and AVX2 assembly for improved ChaCha20 performance
-- Intel QAT fixes for when using --disable-fastmath
-- Update how DTLS handles decryption and MAC failures
-- Update DTLS session export version number for --enable-sessionexport feature
-- Add additional input argument sanity checks to ARMv8 assembly port
-- Fix for making PKCS12 dynamic types match
-- Fixes for potential memory leaks when using --enable-fast-rsa
-- Fix for when using custom ECC curves and add BRAINPOOLP256R1 test
-- Update TI-RTOS port for dependency on new wolfSSL source files
-- DTLS multicast feature added, --enable-mcast
-- Fix for Async crypto with GCC 7.1 and HMAC when not using Intel QuickAssist
-- Improvements and enhancements to Intel QuickAssist support
-- Added Xilinx port
-- Added SHA3 Keccak feature, --enable-sha3
-- Expand wolfSSL Python wrapper to now include a client side implementation
-- Adjust example servers to not treat a peer closed error as a hard error
-- Added more sanity checks to fp_read_unsigned_bin function
-- Add SHA224 and AES key wrap to ARMv8 port
-- Update MQX classics and mmCAU ports
-- Fix for potential buffer over read with wolfSSL_CertPemToDer
-- Add PKCS7/CMS decode support for KARI with IssuerAndSerialNumber
-- Fix ThreadX/NetX warning
-- Fixes for OCSP and CRL non blocking sockets and for incomplete cert chain with OCSP
-- Added RSA PSS sign and verify
-- Fix for STM32F4 AES-GCM
-- Added enable all feature (--enable-all)
-- Added trackmemory feature (--enable-trackmemory)
-- Fixes for AES key wrap and PKCS7 on Windows VS
-- Added benchmark block size argument
-- Support use of staticmemory with PKCS7
-- Fix for Blake2b build with GCC 5.4
-- Fixes for compiling wolfSSL with GCC version 7, most dealing with switch statement fall through warnings.
-- Added warning when compiling without hardened math operations
-
-
-Note:
-There is a known issue with using ChaCha20 AVX assembly on versions of GCC earlier than 5.2. This is encountered with using the wolfSSL enable options --enable-intelasm and --enable-chacha. To avoid this issue ChaCha20 can be enabled with --enable-chacha=noasm.
-If using --enable-intelasm and also using --enable-sha224 or --enable-sha256 there is a known issue with trying to use -fsanitize=address.
-
-This release of wolfSSL fixes 1 low level security vulnerability.
-
-Low level fix for a potential DoS attack on a wolfSSL client. Previously a client would accept many warning alert messages without a limit. This fix puts a limit to the number of warning alert messages received and if this limit is reached a fatal error ALERT_COUNT_E is returned. The max number of warning alerts by default is set to 5 and can be adjusted with the macro WOLFSSL_ALERT_COUNT_MAX. Thanks for the report from Tarun Yadav and Koustav Sadhukhan from Defence Research and Development Organization, INDIA.
-
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL (Formerly CyaSSL) Release 3.11.1 (5/11/2017)
-
-## Release 3.11.1 of wolfSSL is a TLS 1.3 BETA release, which includes:
-
-- TLS 1.3 client and server support for TLS 1.3 with Draft 18 support
-
-This is strictly a BETA release, and designed for testing and user feedback.
-Please send any comments, testing results, or feedback to wolfSSL at
-support@wolfssl.com.
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL (Formerly CyaSSL) Release 3.11.0 (5/04/2017)
-
-## Release 3.11.0 of wolfSSL has bug fixes and new features including:
-
-- Code updates for warnings reported by Coverity scans
-- Testing and warning fixes for FreeBSD on PowerPC
-- Updates and refactoring done to ASN1 parsing functions
-- Change max PSK identity buffer to account for an identity length of 128 characters
-- Update Arduino script to handle recent files and additions
-- Added support for PKCS#7 Signed Data with ECDSA
-- Fix for interoperability with ChaCha20-Poly1305 suites using older draft versions
-- DTLS update to allow multiple handshake messages in one DTLS record. Thanks to Eric Samsel over at Welch Allyn for reporting this bug.
-- Intel QuickAssist asynchronous support (PR #715 - https://www.wolfssl.com/wolfSSL/Blog/Entries/2017/1/18_wolfSSL_Asynchronous_Intel_QuickAssist_Support.html)
-- Added support for HAproxy load balancer
-- Added option to allow SHA1 with TLS 1.2 for IIS compatibility (WOLFSSL_ALLOW_TLS_SHA1)
-- Added Curve25519 51-bit Implementation, increasing performance on systems that have 128 bit types
-- Fix to not send session ID on server side if session cache is off unless we're echoing
-session ID as part of session tickets
-- Fixes for ensuring all default ciphers are setup correctly (see PR #830)
-- Added NXP Hexiwear example in `IDE/HEXIWEAR`.
-- Added wolfSSL_write_dup() to create write only WOLFSSL object for concurrent access
-- Fixes for TLS elliptic curve selection on private key import.
-- Fixes for RNG with Intel rdrand and rdseed speedups.
-- Improved performance with Intel rdrand to use full 64-bit output
-- Added new --enable-intelrand option to indicate use of RDRAND preference for RNG source
-- Removed RNG ARC4 support
-- Added ECC helpers to get size and id from curve name.
-- Added ECC Cofactor DH (ECC-CDH) support
-- Added ECC private key only import / export functions.
-- Added PKCS8 create function
-- Improvements to TLS layer CTX handling for switching keys / certs.
-- Added check for duplicate certificate policy OID in certificates.
-- Normal math speed-up to not allocate on mp_int and defer until mp_grow
-- Reduce heap usage with fast math when not using ALT_ECC_SIZE
-- Fixes for building CRL with Windows
-- Added support for inline CRL lookup when HAVE_CRL_IO is defined
-- Added port for tenAsys INtime RTOS
-- Improvements to uTKernel port (WOLFSSL_uTKERNEL2)
-- Updated WPA Supplicant support
-- Added support for Nginx
-- Update stunnel port for version 5.40
-- Fixes for STM32 hardware crypto acceleration
-- Extended test code coverage in bundled test.c
-- Added a sanity check for minimum authentication tag size with AES-GCM. Thanks to Yueh-Hsun Lin and Peng Li at KNOX Security at Samsung Research America for suggesting this.
-- Added a sanity check that subject key identifier is marked as non-critical and a check that no policy OIDS appear more than once in the cert policies extension. Thanks to the report from Professor Zhenhua Duan, Professor Cong Tian, and Ph.D candidate Chu Chen from Institute of Computing Theory and Technology (ICTT) of Xidian University, China. Profs. Zhenhua Duan and Cong Tian are supervisors of Ph.D candidate Chu Chen.
-
-This release of wolfSSL fixes 5 low and 1 medium level security vulnerability.
-
-3 Low level fixes reported by Yueh-Hsun Lin and Peng Li from KNOX Security, Samsung Research America.
-- Fix for out of bounds memory access in wc_DhParamsLoad() when GetLength() returns a zero. Before this fix there is a case where wolfSSL would read out of bounds memory in the function wc_DhParamsLoad.
-- Fix for DH key accepted by wc_DhAgree when the key was malformed.
-- Fix for a double free case when adding CA cert into X509_store.
-
-Low level fix for memory management with static memory feature enabled. By default static memory is disabled. Thanks to GitHub user hajjihraf for reporting this.
-
-
-Low level fix for out of bounds write in the function wolfSSL_X509_NAME_get_text_by_NID. This function is not used by TLS or crypto operations but could result in a buffer out of bounds write by one if called explicitly in an application. Discovered by Aleksandar Nikolic of Cisco Talos. http://talosintelligence.com/vulnerability-reports/
-
-Medium level fix for check on certificate signature. There is a case in release versions 3.9.10, 3.10.0 and 3.10.2 where a corrupted signature on a peer certificate would not be properly flagged. Thanks to Wens Lo, James Tsai, Kenny Chang, and Oscar Yang at Castles Technology.
-
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL (Formerly CyaSSL) Release 3.10.2 (2/10/2017)
-
-## Release 3.10.2 of wolfSSL has bug fixes and new features including:
-
-- Poly1305 Windows macros fix. Thanks to GitHub user Jay Satiro
-- Compatibility layer expanded with multiple functions added
-- Improve fp_copy performance with ALT_ECC_SIZE
-- OCSP updates and improvements
-- Fixes for IAR EWARM 8 compiler warnings
-- Reduce stack usage with ECC_CACHE_CURVE disabled
-- Added ECC export raw for public and private key
-- Fix for NO_ASN_TIME build
-- Supported curves extensions now populated by default
-- Add DTLS build without big integer math
-- Fix for static memory feature with wc_ecc_verify_hash_ex and not SHAMIR
-- Added PSK interoperability testing to script bundled with wolfSSL
-- Fix for Python wrapper random number generation. Compiler optimizations with Python could place the random number in same buffer location each time. Thanks to GitHub user Erik Bray (embray)
-- Fix for tests on unaligned memory with static memory feature
-- Add macro WOLFSSL_NO_OCSP_OPTIONAL_CERTS to skip optional OCSP certificates
-- Sanity checks on NULL arguments added to wolfSSL_set_fd and wolfSSL_DTLS_SetCookieSecret
-- mp_jacobi stack use reduced, thanks to Szabi Tolnai for providing a solution to reduce stack usage
-
-
-This release of wolfSSL fixes 2 low and 1 medium level security vulnerability.
-
-Low level fix of buffer overflow for when loading in a malformed temporary DH file. Thanks to Yueh-Hsun Lin and Peng Li from KNOX Security, Samsung Research America for the report.
-
-Medium level fix for processing of OCSP response. If using OCSP without hard faults enforced and no alternate revocation checks like OCSP stapling then it is recommended to update.
-
-Low level fix for potential cache attack on RSA operations. If using wolfSSL RSA on a server that other users can have access to monitor the cache, then it is recommended to update wolfSSL. Thanks to Andreas Zankl, Johann Heyszl and Georg Sigl at Fraunhofer AISEC for the initial report.
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL (Formerly CyaSSL) Release 3.10.0 (12/21/2016)
-
-## Release 3.10.0 of wolfSSL has bug fixes and new features including:
-
-- Added support for SHA224
-- Added scrypt feature
-- Build for Intel SGX use, added in directory IDE/WIN-SGX
-- Fix for ChaCha20-Poly1305 ECDSA certificate type request
-- Enhance PKCS#7 with ECC enveloped data and AES key wrap support
-- Added support for RIOT OS
-- Add support for parsing PKCS#12 files
-- ECC performance increased with custom curves
-- ARMv8 expanded to AArch32 and performance increased
-- Added ANSI-X9.63-KDF support
-- Port to STM32 F2/F4 CubeMX
-- Port to Atmel ATECC508A board
-- Removed fPIE by default when wolfSSL library is compiled
-- Update to Python wrapper, dropping DES and adding wc_RSASetRNG
-- Added support for NXP K82 hardware acceleration
-- Added SCR client and server verify check
-- Added a disable rng option with autoconf
-- Added more tests vectors to test.c with AES-CTR
-- Updated DTLS session export version number
-- Updated DTLS for 64 bit sequence numbers
-- Fix for memory management with TI and WOLFSSL_SMALL_STACK
-- Hardening RSA CRT to be constant time
-- Fix uninitialized warning with IAR compiler
-- Fix for C# wrapper example IO hang on unexpected connection termination
-
-
-This release of wolfSSL fixes a low level security vulnerability. The vulnerability reported was a potential cache attack on RSA operations. If using wolfSSL RSA on a server that other users can have access to monitor the cache, then it is recommended to update wolfSSL. Thanks to Andreas Zankl, Johann Heyszl and Georg Sigl at Fraunhofer AISEC for the report. More information will be available on our site:
-
-https://wolfssl.com/wolfSSL/security/vulnerabilities.php
-
-See INSTALL file for build instructions.
-More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL (Formerly CyaSSL) Release 3.9.10 (9/23/2016)
-
-## Release 3.9.10 of wolfSSL has bug fixes and new features including:
-
-- Default configure option changes:
- 1. DES3 disabled by default
- 2. ECC Supported Curves Extension enabled by default
- 3. New option Extended Master Secret enabled by default
-- Added checking CA certificate path length, and new test certs
-- Fix to DSA pre padding and sanity check on R/S values
-- Added CTX level RNG for single-threaded builds
-- Intel RDSEED enhancements
-- ARMv8 hardware acceleration support for AES-CBC/CTR/GCM, SHA-256
-- Arduino support updates
-- Added the Extended Master Secret TLS extension
- 1. Enabled by default in configure options, API to disable
- 2. Added support for Extended Master Secret to sniffer
-- OCSP fix with issuer key hash, lookup refactor
-- Added support for Frosted OS
-- Added support for DTLS over SCTP
-- Added support for static memory with wolfCrypt
-- Fix to ECC Custom Curve support
-- Support for asynchronous wolfCrypt RSA and TLS client
-- Added distribution build configure option
-- Update the test certificates
-
-This release of wolfSSL fixes medium level security vulnerabilities. Fixes for
-potential AES, RSA, and ECC side channel leaks is included that a local user
-monitoring the same CPU core cache could exploit. VM users, hyper-threading
-users, and users where potential attackers have access to the CPU cache will
-need to update if they utilize AES, RSA private keys, or ECC private keys.
-Thanks to Gorka Irazoqui Apecechea and Xiaofei Guo from Intel Corporation for
-the report. More information will be available on our site:
-
-https://wolfssl.com/wolfSSL/security/vulnerabilities.php
-
-See INSTALL file for build instructions.
-More info can be found on-line at https://wolfssl.com/wolfSSL/Docs.html
-
-
-# wolfSSL (Formerly CyaSSL) Release 3.9.8 (7/29/2016)
-
-##Release 3.9.8 of wolfSSL has bug fixes and new features including:
-
-- Add support for custom ECC curves.
-- Add cipher suite ECDHE-ECDSA-AES128-CCM.
-- Add compkey enable option. This option is for compressed ECC keys.
-- Add in the option to use test.h without gettimeofday function using the macro
- WOLFSSL_USER_CURRTIME.
-- Add RSA blinding for private key operations. Enable option of harden which is
- on by default. This negates timing attacks.
-- Add ECC and TLS support for all SECP, Koblitz and Brainpool curves.
-- Add helper functions for static memory option to allow getting optimum buffer
- sizes.
-- Update DTLS behavior on bad MAC. DTLS silently drops packets with bad MACs now.
-- Update fp_isprime function from libtom enhancement/cleanup repository.
-- Update sanity checks on inputs and return values for AES-CMAC.
-- Update wolfSSL for use with MYSQL v5.6.30.
-- Update LPCXpresso eclipse project to not include misc.c when not needed.
-- Fix retransmit of last DTLS flight with timeout notification. The last flight
- is no longer retransmitted on timeout.
-- Fixes to some code in math sections for compressed ECC keys. This includes
- edge cases for buffer size on allocation and adjustments for compressed curves
- build. The code and full list can be found on github with pull request #456.
-- Fix function argument mismatch for build with secure renegotiation.
-- X.509 bug fixes for reading in malformed certificates, reported by researchers
- at Columbia University
-- Fix GCC version 6 warning about hard tabs in poly1305.c. This was a warning
- produced by GCC 6 trying to determine the intent of code.
-- Fixes for static memory option. Including avoid potential race conditions with
- counters, decrement handshake counter correctly.
-- Fix anonymous cipher with Diffie Hellman on the server side. Was an issue of a
- possible buffer corruption. For information and code see pull request #481.
-
-
-- One high level security fix that requires an update for use with static RSA
- cipher suites was submitted. This fix was the addition of RSA blinding for
- private RSA operations. We recommend servers who allow static RSA cipher
- suites to also generate new private RSA keys. Static RSA cipher suites are
- turned off by default.
-
-See INSTALL file for build instructions.
-More info can be found on-line at //http://wolfssl.com/wolfSSL/Docs.html
-
-# wolfSSL (Formerly CyaSSL) Release 3.9.6 (6/14/2016)
-
-##Release 3.9.6 of wolfSSL has bug fixes and new features including:
-
-- Add staticmemory feature
-- Add public wc_GetTime API with base64encode feature
-- Add AES CMAC algorithm
-- Add DTLS sessionexport feature
-- Add python wolfCrypt wrapper
-- Add ECC encrypt/decrypt benchmarks
-- Add dynamic session tickets
-- Add eccshamir option
-- Add Whitewood netRandom support --with-wnr
-- Add embOS port
-- Add minimum key size checks for RSA and ECC
-- Add STARTTLS support to examples
-- Add uTasker port
-- Add asynchronous crypto and wolf event support
-- Add compile check for misc.c with inline
-- Add RNG benchmark
-- Add reduction to stack usage with hash-based RNG
-- Update STM32F2_CRYPTO port with additional algorithms supported
-- Update MDK5 projects
-- Update AES-NI
-- Fix for STM32 with STM32F2_HASH defined
-- Fix for building with MinGw
-- Fix ECC math bugs with ALT_ECC_SIZE and key sizes over 256 bit (1)
-- Fix certificate buffers github issue #422
-- Fix decrypt max size with RSA OAEP
-- Fix DTLS sanity check with DTLS timeout notification
-- Fix free of WOLFSSL_METHOD on failure to create CTX
-- Fix memory leak in failure case with wc_RsaFunction (2)
-
-- No high level security fixes that requires an update though we always
-recommend updating to the latest
-- (1) Code changes for ECC fix can be found at pull requests #411, #416, and #428
-- (2) Builds using RSA with using normal math and not RSA_LOW_MEM should update
-
-See INSTALL file for build instructions.
-More info can be found on-line at //http://wolfssl.com/wolfSSL/Docs.html
-
-# wolfSSL (Formerly CyaSSL) Release 3.9.0 (03/18/2016)
-
-##Release 3.9.0 of wolfSSL has bug fixes and new features including:
-
-- Add new leantls configuration
-- Add RSA OAEP padding at wolfCrypt level
-- Add Arduino port and example client
-- Add fixed point DH operation
-- Add CUSTOM_RAND_GENRATE_SEED_OS and CUSTOM_RAND_GENERATE_BLOCK
-- Add ECDHE-PSK cipher suites
-- Add PSK ChaCha20-Poly1305 cipher suites
-- Add option for fail on no peer cert except PSK suites
-- Add port for Nordic nRF51
-- Add additional ECC NIST test vectors for 256, 384 and 521
-- Add more granular ECC, Ed25519/Curve25519 and AES configs
-- Update to ChaCha20-Poly1305
-- Update support for Freescale KSDK 1.3.0
-- Update DER buffer handling code, refactoring and reducing memory
-- Fix to AESNI 192 bit key expansion
-- Fix to C# wrapper character encoding
-- Fix sequence number issue with DTLS epoch 0 messages
-- Fix RNGA with K64 build
-- Fix ASN.1 X509 V3 certificate policy extension parsing
-- Fix potential free of uninitialized RSA key in asn.c
-- Fix potential underflow when using ECC build with FP_ECC
-- Fixes for warnings in Visual Studio 2015 build
-
-- No high level security fixes that requires an update though we always
-recommend updating to the latest
-- FP_ECC is off by default, users with it enabled should update for the zero
-sized hash fix
-
-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.8.0 (12/30/2015)
-
-##Release 3.8.0 of wolfSSL has bug fixes and new features including:
-
-- Example client/server with VxWorks
-- AESNI use with AES-GCM
-- Stunnel compatibility enhancements
-- Single shot hash and signature/verify API added
-- Update cavium nitrox port
-- LPCXpresso IDE support added
-- C# wrapper to support wolfSSL use by a C# program
-- (BETA version)OCSP stapling added
-- Update OpenSSH compatibility
-- Improve DTLS handshake when retransmitting finished message
-- fix idea_mult() for 16 and 32bit systems
-- fix LowResTimer on Microchip ports
-
-- No high level security fixes that requires an update though we always
-recommend updating to the latest
-
-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.7.0 (10/26/2015)
-
-##Release 3.7.0 of wolfSSL has bug fixes and new features including:
-
-- ALPN extension support added for HTTP2 connections with --enable-alpn
-- Change of example/client/client max fragment flag -L -> -F
-- Throughput benchmarking, added scripts/benchmark.test
-- Sniffer API ssl_FreeDecodeBuffer added
-- Addition of AES_GCM to Sniffer
-- Sniffer change to handle unlimited decrypt buffer size
-- New option for the sniffer where it will try to pick up decoding after a
- sequence number acknowldgement fault. Also includes some additional stats.
-- JNI API setter and getter function for jobject added
-- User RSA crypto plugin abstraction. An example placed in wolfcrypt/user-crypto
-- fix to asn configuration bug
-- AES-GCM/CCM fixes.
-- Port for Rowley added
-- Rowley Crossworks bare metal examples added
-- MDK5-ARM project update
-- FreeRTOS support updates.
-- VXWorks support updates.
-- Added the IDEA cipher and support in wolfSSL.
-- Update wolfSSL website CA.
-- CFLAGS is usable when configuring source.
-
-- No high level security fixes that requires an update though we always
-recommend updating to the latest
-
-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.6.8 (09/17/2015)
-
-##Release 3.6.8 of wolfSSL fixes two high severity vulnerabilities.
-##It also includes bug fixes and new features including:
-
-- Two High level security fixes, all users SHOULD update.
- a) If using wolfSSL for DTLS on the server side of a publicly accessible
- machine you MUST update.
- b) If using wolfSSL for TLS on the server side with private RSA keys allowing
- ephemeral key exchange without low memory optimziations you MUST update and
- regenerate the private RSA keys.
-
- Please see https://www.wolfssl.com/wolfSSL/Blog/Blog.html for more details
-
-- No filesystem build fixes for various configurations
-- Certificate generation now supports several extensions including KeyUsage,
- SKID, AKID, and Ceritifcate Policies
-- CRLs can be loaded from buffers as well as files now
-- SHA-512 Ceritifcate Signing generation
-- Fixes for sniffer reassembly processing
-
-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.6.6 (08/20/2015)
-
-##Release 3.6.6 of wolfSSL has bug fixes and new features including:
-
-- OpenSSH compatibility with --enable-openssh
-- stunnel compatibility with --enable-stunnel
-- lighttpd compatibility with --enable-lighty
-- SSLv3 is now disabled by default, can be enabled with --enable-sslv3
-- Ephemeral key cipher suites only are now supported by default
- To enable static ECDH cipher suites define WOLFSSL_STATIC_DH
- To enable static RSA cipher suites define WOLFSSL_STATIC_RSA
- To enable static PSK cipher suites define WOLFSSL_STATIC_PSK
-- Added QSH (quantum-safe handshake) extension with --enable-ntru
-- SRP is now part of wolfCrypt, enable with --enabe-srp
-- Certificate handshake messages can now be sent fragmented if the record
- size is smaller than the total message size, no user action required.
-- DTLS duplicate message fixes
-- Visual Studio project files now support DLL and static builds for 32/64bit.
-- Support for new Freesacle I/O
-- FreeRTOS FIPS support
-
-- No high level security fixes that requires an update though we always
- recommend updating to the latest
-
-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.6.0 (06/19/2015)
-
-##Release 3.6.0 of wolfSSL has bug fixes and new features including:
-
-- Max Strength build that only allows TLSv1.2, AEAD ciphers, and PFS (Perfect
- Forward Secrecy). With --enable-maxstrength
-- Server side session ticket support, the example server and echosever use the
- example callback myTicketEncCb(), see wolfSSL_CTX_set_TicketEncCb()
-- FIPS version submitted for iOS.
-- TI Crypto Hardware Acceleration
-- DTLS fragmentation fixes
-- ECC key check validation with wc_ecc_check_key()
-- 32bit code options to reduce memory for Curve25519 and Ed25519
-- wolfSSL JNI build switch with --enable-jni
-- PicoTCP support improvements
-- DH min ephemeral key size enforcement with wolfSSL_CTX_SetMinDhKey_Sz()
-- KEEP_PEER_CERT and AltNames can now be used together
-- ChaCha20 big endian fix
-- SHA-512 signature algorithm support for key exchange and verify messages
-- ECC make key crash fix on RNG failure, ECC users must update.
-- Improvements to usage of time code.
-- Improvements to VS solution files.
-- GNU Binutils 2.24 ld has problems with some debug builds, to fix an ld error
- add -fdebug-types-section to C_EXTRA_FLAGS
-
-- No high level security fixes that requires an update though we always
- recommend updating to the latest (except note 14, ecc RNG failure)
-
-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.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:
-
-- Intel Assembly Speedups using instructions rdrand, rdseed, aesni, avx1/2,
- rorx, mulx, adox, adcx . They can be enabled with --enable-intelasm.
- These speedup the use of RNG, SHA2, and public key algorithms.
-- Ed25519 support at the crypto level. Turn on with --enable-ed25519. Examples
- in wolcrypt/test/test.c ed25519_test().
-- Post Handshake Memory reductions. wolfSSL can now hold less than 1,000 bytes
- of memory per secure connection including cipher state.
-- wolfSSL API and wolfCrypt API fixes, you can still include the cyassl and
- ctaocrypt headers which will enable the compatibility APIs for the
- foreseeable future
-- INSTALL file to help direct users to build instructions for their environment
-- For ECC users with the normal math library a fix that prevents a crash when
- verify signature fails. Users of 3.4.0 with ECC and the normal math library
- must update
-- RC4 is now disabled by default in autoconf mode
-- AES-GCM and ChaCha20/Poly1305 are now enabled by default to make AEAD ciphers
- available without a switch
-- External ChaCha-Poly AEAD API, thanks to Andrew Burks for the contribution
-- DHE-PSK cipher suites can now be built without ASN or Cert support
-- Fix some NO MD5 build issues with optional features
-- Freescale CodeWarrior project updates
-- ECC curves can be individually turned on/off at build time.
-- Sniffer handles Cert Status message and other minor fixes
-- SetMinVersion() at the wolfSSL Context level instead of just SSL session level
- to allow minimum protocol version allowed at runtime
-- RNG failure resource cleanup fix
-
-- No high level security fixes that requires an update though we always
- recommend updating to the latest (except note 6 use case of ecc/normal math)
-
-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.0 (02/23/2015)
-
-## Release 3.4.0 wolfSSL has bug fixes and new features including:
-
-- wolfSSL API and wolfCrypt API, you can still include the cyassl and ctaocrypt
- headers which will enable the compatibility APIs for the foreseeable future
-- Example use of the wolfCrypt API can be found in wolfcrypt/test/test.c
-- Example use of the wolfSSL API can be found in examples/client/client.c
-- Curve25519 now supported at the wolfCrypt level, wolfSSL layer coming soon
-- Improvements in the build configuration under AIX
-- Microchip Pic32 MZ updates
-- TIRTOS updates
-- PowerPC updates
-- Xcode project update
-- Bidirectional shutdown examples in client/server with -w (wait for full
- shutdown) option
-- Cycle counts on benchmarks for x86_64, more coming soon
-- ALT_ECC_SIZE for reducing ecc heap use with fastmath when also using large RSA
- keys
-- Various compile warnings
-- Scan-build warning fixes
-- Changed a memcpy to memmove in the sniffer (if using sniffer please update)
-- No high level security fixes that requires an update though we always
- recommend updating to the latest
-
-
-# CyaSSL Release 3.3.0 (12/05/2014)
-
-- Countermeasuers for Handshake message duplicates, CHANGE CIPHER without
- FINISHED, and fast forward attempts. Thanks to Karthikeyan Bhargavan from
- the Prosecco team at INRIA Paris-Rocquencourt for the report.
-- FIPS version submitted
-- Removes SSLv2 Client Hello processing, can be enabled with OLD_HELLO_ALLOWED
-- User can set minimum downgrade version with CyaSSL_SetMinVersion()
-- Small stack improvements at TLS/SSL layer
-- TLS Master Secret generation and Key Expansion are now exposed
-- Adds client side Secure Renegotiation, * not recommended *
-- Client side session ticket support, not fully tested with Secure Renegotiation
-- Allows up to 4096bit DHE at TLS Key Exchange layer
-- Handles non standard SessionID sizes in Hello Messages
-- PicoTCP Support
-- Sniffer now supports SNI Virtual Hosts
-- Sniffer now handles non HTTPS protocols using STARTTLS
-- Sniffer can now parse records with multiple messages
-- TI-RTOS updates
-- Fix for ColdFire optimized fp_digit read only in explicit 32bit case
-- ADH Cipher Suite ADH-AES128-SHA for EAP-FAST
-
-The CyaSSL manual is available at:
-http://www.wolfssl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-# CyaSSL Release 3.2.0 (09/10/2014)
-
-#### Release 3.2.0 CyaSSL has bug fixes and new features including:
-
-- ChaCha20 and Poly1305 crypto and suites
-- Small stack improvements for OCSP, CRL, TLS, DTLS
-- NTRU Encrypt and Decrypt benchmarks
-- Updated Visual Studio project files
-- Updated Keil MDK5 project files
-- Fix for DTLS sequence numbers with GCM/CCM
-- Updated HashDRBG with more secure struct declaration
-- TI-RTOS support and example Code Composer Studio project files
-- Ability to get enabled cipher suites, CyaSSL_get_ciphers()
-- AES-GCM/CCM/Direct support for Freescale mmCAU and CAU
-- Sniffer improvement checking for decrypt key setup
-- Support for raw ECC key import
-- Ability to convert ecc_key to DER, EccKeyToDer()
-- Security fix for RSA Padding check vulnerability reported by Intel Security
- Advanced Threat Research team
-
-The CyaSSL manual is available at:
-http://www.wolfssl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-# CyaSSL Release 3.1.0 (07/14/2014)
-
-#### Release 3.1.0 CyaSSL has bug fixes and new features including:
-
-- Fix for older versions of icc without 128-bit type
-- Intel ASM syntax for AES-NI
-- Updated NTRU support, keygen benchmark
-- FIPS check for minimum required HMAC key length
-- Small stack (--enable-smallstack) improvements for PKCS#7, ASN
-- TLS extension support for DTLS
-- Default I/O callbacks external to user
-- Updated example client with bad clock test
-- Ability to set optional ECC context info
-- Ability to enable/disable DH separate from opensslextra
-- Additional test key/cert buffers for CA and server
-- Updated example certificates
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-# CyaSSL Release 3.0.2 (05/30/2014)
-
-#### Release 3.0.2 CyaSSL has bug fixes and new features including:
-
-- Added the following cipher suites:
- * TLS_PSK_WITH_AES_128_GCM_SHA256
- * TLS_PSK_WITH_AES_256_GCM_SHA384
- * TLS_PSK_WITH_AES_256_CBC_SHA384
- * TLS_PSK_WITH_NULL_SHA384
- * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
- * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
- * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
- * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
- * TLS_DHE_PSK_WITH_NULL_SHA256
- * TLS_DHE_PSK_WITH_NULL_SHA384
- * TLS_DHE_PSK_WITH_AES_128_CCM
- * TLS_DHE_PSK_WITH_AES_256_CCM
-- Added AES-NI support for Microsoft Visual Studio builds.
-- Changed small stack build to be disabled by default.
-- Updated the Hash DRBG and provided a configure option to enable.
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-# CyaSSL Release 3.0.0 (04/29/2014)
-
-#### Release 3.0.0 CyaSSL has bug fixes and new features including:
-
-- FIPS release candidate
-- X.509 improvements that address items reported by Suman Jana with security
- researchers at UT Austin and UC Davis
-- Small stack size improvements, --enable-smallstack. Offloads large local
- variables to the heap. (Note this is not complete.)
-- Updated AES-CCM-8 cipher suites to use approved suite numbers.
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-# CyaSSL Release 2.9.4 (04/09/2014)
-
-#### Release 2.9.4 CyaSSL has bug fixes and new features including:
-
-- Security fixes that address items reported by Ivan Fratric of the Google
- Security Team
-- X.509 Unknown critical extensions treated as errors, report by Suman Jana with
- security researchers at UT Austin and UC Davis
-- Sniffer fixes for corrupted packet length and Jumbo frames
-- ARM thumb mode assembly fixes
-- Xcode 5.1 support including new clang
-- PIC32 MZ hardware support
-- CyaSSL Object has enough room to read the Record Header now w/o allocs
-- FIPS wrappers for AES, 3DES, SHA1, SHA256, SHA384, HMAC, and RSA.
-- A sample I/O pool is demonstrated with --enable-iopool to overtake memory
- handling and reduce memory fragmentation on I/O large sizes
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-# CyaSSL Release 2.9.0 (02/07/2014)
-
-#### Release 2.9.0 CyaSSL has bug fixes and new features including:
-- Freescale Kinetis RNGB support
-- Freescale Kinetis mmCAU support
-- TLS Hello extensions
- - ECC
- - Secure Renegotiation (null)
- - Truncated HMAC
-- SCEP support
- - PKCS #7 Enveloped data and signed data
- - PKCS #10 Certificate Signing Request generation
-- DTLS sliding window
-- OCSP Improvements
- - API change to integrate into Certificate Manager
- - IPv4/IPv6 agnostic
- - example client/server support for OCSP
- - OCSP nonces are optional
-- GMAC hashing
-- Windows build additions
-- Windows CYGWIN build fixes
-- Updated test certificates
-- Microchip MPLAB Harmony support
-- Update autoconf scripts
-- Additional X.509 inspection functions
-- ECC encrypt/decrypt primitives
-- ECC Certificate generation
-
-The Freescale Kinetis K53 RNGB documentation can be found in Chapter 33 of the
-K53 Sub-Family Reference Manual:
-http://cache.freescale.com/files/32bit/doc/ref_manual/K53P144M100SF2RM.pdf
-
-Freescale Kinetis K60 mmCAU (AES, DES, 3DES, MD5, SHA, SHA256) documentation
-can be found in the "ColdFire/ColdFire+ CAU and Kinetis mmCAU Software Library
-User Guide":
-http://cache.freescale.com/files/32bit/doc/user_guide/CAUAPIUG.pdf
-
-
-# CyaSSL Release 2.8.0 (8/30/2013)
-
-#### Release 2.8.0 CyaSSL has bug fixes and new features including:
-- AES-GCM and AES-CCM use AES-NI
-- NetX default IO callback handlers
-- IPv6 fixes for DTLS Hello Cookies
-- The ability to unload Certs/Keys after the handshake, CyaSSL_UnloadCertsKeys()
-- SEP certificate extensions
-- Callback getters for easier resource freeing
-- External CYASSL_MAX_ERROR_SZ for correct error buffer sizing
-- MacEncrypt and DecryptVerify Callbacks for User Atomic Record Layer Processing
-- Public Key Callbacks for ECC and RSA
-- Client now sends blank cert upon request if doesn't have one with TLS <= 1.2
-
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-# CyaSSL Release 2.7.0 (6/17/2013)
-
-#### Release 2.7.0 CyaSSL has bug fixes and new features including:
-- SNI support for client and server
-- KEIL MDK-ARM projects
-- Wildcard check to domain name match, and Subject altnames are checked too
-- Better error messages for certificate verification errors
-- Ability to discard session during handshake verify
-- More consistent error returns across all APIs
-- Ability to unload CAs at the CTX or CertManager level
-- Authority subject id support for Certificate matching
-- Persistent session cache functionality
-- Persistent CA cache functionality
-- Client session table lookups to push serverID table to library level
-- Camellia support to sniffer
-- User controllable settings for DTLS timeout values
-- Sniffer fixes for caching long lived sessions
-- DTLS reliability enhancements for the handshake
-- Better ThreadX support
-
-When compiling with Mingw, libtool may give the following warning due to
-path conversion errors:
-
-```
-libtool: link: Could not determine host file name corresponding to **
-libtool: link: Continuing, but uninstalled executables may not work.
-```
-
-If so, examples and testsuite will have problems when run, showing an
-error while loading shared libraries. To resolve, please run "make install".
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-# CyaSSL Release 2.6.0 (04/15/2013)
-
-#### Release 2.6.0 CyaSSL has bug fixes and new features including:
-- DTLS 1.2 support including AEAD ciphers
-- SHA-3 finalist Blake2 support, it's fast and uses little resources
-- SHA-384 cipher suites including ECC ones
-- HMAC now supports SHA-512
-- Track memory use for example client/server with -t option
-- Better IPv6 examples with --enable-ipv6, before if ipv6 examples/tests were
- turned on, localhost only was used. Now link-local (with scope ids) and ipv6
- hosts can be used as well.
-- Xcode v4.6 project for iOS v6.1 update
-- settings.h is now checked in all *.c files for true one file setting detection
-- Better alignment at SSL layer for hardware crypto alignment needs
- * Note, SSL itself isn't friendly to alignment with 5 byte TLS headers and
- 13 bytes DTLS headers, but every effort is now made to align with the
- CYASSL_GENERAL_ALIGNMENT flag which sets desired alignment requirement
-- NO_64BIT flag to turn off 64bit data type accumulators in public key code
- * Note, some systems are faster with 32bit accumulators
-- --enable-stacksize for example client/server stack use
- * Note, modern desktop Operating Systems may add bytes to each stack frame
-- Updated compression/decompression with direct crypto access
-- All ./configure options are now lowercase only for consistency
-- ./configure builds default to fastmath option
- * Note, if on ia32 and building in shared mode this may produce a problem
- with a missing register being available because of PIC, there are at least
- 6 solutions to this:
- 1) --disable-fastmath , don't use fastmath
- 2) --disable-shared, don't build a shared library
- 3) C_EXTRA_FLAGS=-DTFM_NO_ASM , turn off assembly use
- 4) use clang, it just seems to work
- 5) play around with no PIC options to force all registers being open,
- e.g., --without-pic
- 6) if static lib is still a problem try removing fPIE
-- Many new ./configure switches for option enable/disable for example
- * rsa
- * dh
- * dsa
- * md5
- * sha
- * arc4
- * null (allow NULL ciphers)
- * oldtls (only use TLS 1.2)
- * asn (no certs or public keys allowed)
-- ./configure generates cyassl/options.h which allows a header the user can
- include in their app to make sure the same options are set at the app and
- CyaSSL level.
-- autoconf no longer needs serial-tests which lowers version requirements of
- automake to 1.11 and autoconf to 2.63
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-
-# CyaSSL Release 2.5.0 (02/04/2013)
-
-#### Release 2.5.0 CyaSSL has bug fixes and new features including:
-- Fix for TLS CBC padding timing attack identified by Nadhem Alfardan and
- Kenny Paterson: http://www.isg.rhul.ac.uk/tls/
-- Microchip PIC32 (MIPS16, MIPS32) support
-- Microchip MPLAB X example projects for PIC32 Ethernet Starter Kit
-- Updated CTaoCrypt benchmark app for embedded systems
-- 1024-bit test certs/keys and cert/key buffers
-- AES-CCM-8 crypto and cipher suites
-- Camellia crypto and cipher suites
-- Bumped minimum autoconf version to 2.65, automake version to 1.12
-- Addition of OCSP callbacks
-- STM32F2 support with hardware crypto and RNG
-- Cavium NITROX support
-
-CTaoCrypt now has support for the Microchip PIC32 and has been tested with
-the Microchip PIC32 Ethernet Starter Kit, the XC32 compiler and
-MPLAB X IDE in both MIPS16 and MIPS32 instruction set modes. See the README
-located under the /mplabx directory for more details.
-
-To add Cavium NITROX support do:
-
-./configure --with-cavium=/home/user/cavium/software
-
-pointing to your licensed cavium/software directory. Since Cavium doesn't
-build a library we pull in the cavium_common.o file which gives a libtool
-warning about the portability of this. Also, if you're using the github source
-tree you'll need to remove the -Wredundant-decls warning from the generated
-Makefile because the cavium headers don't conform to this warning. Currently
-CyaSSL supports Cavium RNG, AES, 3DES, RC4, HMAC, and RSA directly at the crypto
-layer. Support at the SSL level is partial and currently just does AES, 3DES,
-and RC4. RSA and HMAC are slower until the Cavium calls can be utilized in non
-blocking mode. The example client turns on cavium support as does the crypto
-test and benchmark. Please see the HAVE_CAVIUM define.
-
-CyaSSL is able to use the STM32F2 hardware-based cryptography and random number
-generator through the STM32F2 Standard Peripheral Library. For necessary
-defines, see the CYASSL_STM32F2 define in settings.h. Documentation for the
-STM32F2 Standard Peripheral Library can be found in the following document:
-http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/USER_MANUAL/DM00023896.pdf
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-
-# CyaSSL Release 2.4.6 (12/20/2012)
-
-#### Release 2.4.6 CyaSSL has bug fixes and a few new features including:
-- ECC into main version
-- Lean PSK build (reduced code size, RAM usage, and stack usage)
-- FreeBSD CRL monitor support
-- CyaSSL_peek()
-- CyaSSL_send() and CyaSSL_recv() for I/O flag setting
-- CodeWarrior Support
-- MQX Support
-- Freescale Kinetis support including Hardware RNG
-- autoconf builds use jobserver
-- cyassl-config
-- Sniffer memory reductions
-
-Thanks to Brian Aker for the improved autoconf system, make rpm, cyassl-config,
-warning system, and general good ideas for improving CyaSSL!
-
-The Freescale Kinetis K70 RNGA documentation can be found in Chapter 37 of the
-K70 Sub-Family Reference Manual:
-http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K70P256M150SF3RM.pdf
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-# CyaSSL Release 2.4.0 (10/10/2012)
-
-#### Release 2.4.0 CyaSSL has bug fixes and a few new features including:
-- DTLS reliability
-- Reduced memory usage after handshake
-- Updated build process
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-
-# CyaSSL Release 2.3.0 (8/10/2012)
-
-#### Release 2.3.0 CyaSSL has bug fixes and a few new features including:
-- AES-GCM crypto and cipher suites
-- make test cipher suite checks
-- Subject AltName processing
-- Command line support for client/server examples
-- Sniffer SessionTicket support
-- SHA-384 cipher suites
-- Verify cipher suite validity when user overrides
-- CRL dir monitoring
-- DTLS Cookie support, reliability coming soon
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-
-# CyaSSL Release 2.2.0 (5/18/2012)
-
-#### Release 2.2.0 CyaSSL has bug fixes and a few new features including:
-- Initial CRL support (--enable-crl)
-- Initial OCSP support (--enable-ocsp)
-- Add static ECDH suites
-- SHA-384 support
-- ECC client certificate support
-- Add medium session cache size (1055 sessions)
-- Updated unit tests
-- Protection against mutex reinitialization
-
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-
-# CyaSSL Release 2.0.8 (2/24/2012)
-
-#### Release 2.0.8 CyaSSL has bug fixes and a few new features including:
-- A fix for malicious certificates pointed out by Remi Gacogne (thanks)
- resulting in NULL pointer use.
-- Respond to renegotiation attempt with no_renegoatation alert
-- Add basic path support for load_verify_locations()
-- Add set Temp EC-DHE key size
-- Extra checks on rsa test when porting into
-
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-
-# CyaSSL Release 2.0.6 (1/27/2012)
-
-#### Release 2.0.6 CyaSSL has bug fixes and a few new features including:
-- Fixes for CA basis constraint check
-- CTX reference counting
-- Initial unit test additions
-- Lean and Mean Windows fix
-- ECC benchmarking
-- SSMTP build support
-- Ability to group handshake messages with set_group_messages(ctx/ssl)
-- CA cache addition callback
-- Export Base64_Encode for general use
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-
-# CyaSSL Release 2.0.2 (12/05/2011)
-
-#### Release 2.0.2 CyaSSL has bug fixes and a few new features including:
-- CTaoCrypt Runtime library detection settings when directly using the crypto
- library
-- Default certificate generation now uses SHAwRSA and adds SHA256wRSA generation
-- All test certificates now use 2048bit and SHA-1 for better modern browser
- support
-- Direct AES block access and AES-CTR (counter) mode
-- Microchip pic32 support
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-
-
-# CyaSSL Release 2.0.0rc3 (9/28/2011)
-
-#### Release 2.0.0rc3 for CyaSSL has bug fixes and a few new features including:
-- updated autoconf support
-- better make install and uninstall (uses system directories)
-- make test / make check
-- CyaSSL headers now in
-- CTaocrypt headers now in
-- OpenSSL compatibility headers now in
-- examples and tests all run from home directory so can use certs in ./certs
- (see note 1)
-
-So previous applications that used the OpenSSL compatibility header
- now need to include instead, no other
-changes are required.
-
-Special Thanks to Brian Aker for his autoconf, install, and header patches.
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-# CyaSSL Release 2.0.0rc2 (6/6/2011)
-
-#### Release 2.0.0rc2 for CyaSSL has bug fixes and a few new features including:
-- bug fixes (Alerts, DTLS with DHE)
-- FreeRTOS support
-- lwIP support
-- Wshadow warnings removed
-- asn public header
-- CTaoCrypt public headers now all have ctc_ prefix (the manual is still being
- updated to reflect this change)
-- and more.
-
-This is the 2nd and perhaps final release candidate for version 2.
-Please send any comments or questions to support@yassl.com.
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-# CyaSSL Release 2.0.0rc1 (5/2/2011)
-
-#### Release 2.0.0rc1 for CyaSSL has many new features including:
-- bug fixes
-- SHA-256 cipher suites
-- Root Certificate Verification (instead of needing all certs in the chain)
-- PKCS #8 private key encryption (supports PKCS #5 v1-v2 and PKCS #12)
-- Serial number retrieval for x509
-- PBKDF2 and PKCS #12 PBKDF
-- UID parsing for x509
-- SHA-256 certificate signatures
-- Client and server can send chains (SSL_CTX_use_certificate_chain_file)
-- CA loading can now parse multiple certificates per file
-- Dynamic memory runtime hooks
-- Runtime hooks for logging
-- EDH on server side
-- More informative error codes
-- More informative logging messages
-- Version downgrade more robust (use SSL_v23*)
-- Shared build only by default through ./configure
-- Compiler visibility is now used, internal functions not polluting namespace
-- Single Makefile, no recursion, for faster and simpler building
-- Turn on all warnings possible build option, warning fixes
-- and more.
-
-Because of all the new features and the multiple OS, compiler, feature-set
-options that CyaSSL allows, there may be some configuration fixes needed.
-Please send any comments or questions to support@yassl.com.
-
-The CyaSSL manual is available at:
-http://www.yassl.com/documentation/CyaSSL-Manual.pdf. For build instructions
-and comments about the new features please check the manual.
-
-# CyaSSL Release 1.9.0 (3/2/2011)
-
-Release 1.9.0 for CyaSSL adds bug fixes, improved TLSv1.2 through testing and
-better hash/sig algo ids, --enable-webServer for the yaSSL embedded web server,
-improper AES key setup detection, user cert verify callback improvements, and
-more.
-
-The CyaSSL manual offering is included in the doc/ directory. For build
-instructions and comments about the new features please check the manual.
-
-Please send any comments or questions to support@yassl.com.
-
-# CyaSSL Release 1.8.0 (12/23/2010)
-
-Release 1.8.0 for CyaSSL adds bug fixes, x509 v3 CA signed certificate
-generation, a C standard library abstraction layer, lower memory use, increased
-portability through the os_settings.h file, and the ability to use NTRU cipher
-suites when used in conjunction with an NTRU license and library.
-
-The initial CyaSSL manual offering is included in the doc/ directory. For
-build instructions and comments about the new features please check the manual.
-
-Please send any comments or questions to support@yassl.com.
-
-Happy Holidays.
-
-
-# CyaSSL Release 1.6.5 (9/9/2010)
-
-Release 1.6.5 for CyaSSL adds bug fixes and x509 v3 self signed certificate
-generation.
-
-For general build instructions see doc/Building_CyaSSL.pdf.
-
-To enable certificate generation support add this option to ./configure
-./configure --enable-certgen
-
-An example is included in ctaocrypt/test/test.c and documentation is provided
-in doc/CyaSSL_Extensions_Reference.pdf item 11.
-
-# CyaSSL Release 1.6.0 (8/27/2010)
-
-Release 1.6.0 for CyaSSL adds bug fixes, RIPEMD-160, SHA-512, and RSA key
-generation.
-
-For general build instructions see doc/Building_CyaSSL.pdf.
-
-To add RIPEMD-160 support add this option to ./configure
-./configure --enable-ripemd
-
-To add SHA-512 support add this option to ./configure
-./configure --enable-sha512
-
-To add RSA key generation support add this option to ./configure
-./configure --enable-keygen
-
-Please see ctaocrypt/test/test.c for examples and usage.
-
-For Windows, RIPEMD-160 and SHA-512 are enabled by default but key generation is
-off by default. To turn key generation on add the define CYASSL_KEY_GEN to
-CyaSSL.
-
-
-# CyaSSL Release 1.5.6 (7/28/2010)
-
-Release 1.5.6 for CyaSSL adds bug fixes, compatibility for our JSSE provider,
-and a fix for GCC builds on some systems.
-
-For general build instructions see doc/Building_CyaSSL.pdf.
-
-To add AES-NI support add this option to ./configure
-./configure --enable-aesni
-
-You'll need GCC 4.4.3 or later to make use of the assembly.
-
-# CyaSSL Release 1.5.4 (7/7/2010)
-
-Release 1.5.4 for CyaSSL adds bug fixes, support for AES-NI, SHA1 speed
-improvements from loop unrolling, and support for the Mongoose Web Server.
-
-For general build instructions see doc/Building_CyaSSL.pdf.
-
-To add AES-NI support add this option to ./configure
-./configure --enable-aesni
-
-You'll need GCC 4.4.3 or later to make use of the assembly.
-
-# CyaSSL Release 1.5.0 (5/11/2010)
-
-Release 1.5.0 for CyaSSL adds bug fixes, GoAhead WebServer support, sniffer
-support, and initial swig interface support.
-
-For general build instructions see doc/Building_CyaSSL.pdf.
-
-To add support for GoAhead WebServer either --enable-opensslExtra or if you
-don't want all the features of opensslExtra you can just define GOAHEAD_WS
-instead. GOAHEAD_WS can be added to ./configure with CFLAGS=-DGOAHEAD_WS or
-you can define it yourself.
-
-To look at the sniffer support please see the sniffertest app in
-sslSniffer/sslSnifferTest. Build with --enable-sniffer on *nix or use the
-vcproj files on windows. You'll need to have pcap installed on *nix and
-WinPcap on windows.
-
-A swig interface file is now located in the swig directory for using Python,
-Java, Perl, and others with CyaSSL. This is initial support and experimental,
-please send questions or comments to support@yassl.com.
-
-When doing load testing with CyaSSL, on the echoserver example say, the client
-machine may run out of tcp ephemeral ports, they will end up in the TIME_WAIT
-queue, and can't be reused by default. There are generally two ways to fix
-this.
-
-1. Reduce the length sockets remain on the TIME_WAIT queue OR
-2. Allow items on the TIME_WAIT queue to be reused.
-
-
-To reduce the TIME_WAIT length in OS X to 3 seconds (3000 milliseconds)
-
-`sudo sysctl -w net.inet.tcp.msl=3000`
-
-In Linux
-
-`sudo sysctl -w net.ipv4.tcp_tw_reuse=1`
-
-allows reuse of sockets in TIME_WAIT
-
-`sudo sysctl -w net.ipv4.tcp_tw_recycle=1`
-
-works but seems to remove sockets from TIME_WAIT entirely?
-
-`sudo sysctl -w net.ipv4.tcp_fin_timeout=1`
-
-doesn't control TIME_WAIT, it controls FIN_WAIT(2) contrary to some posts
-
-
-# CyaSSL Release 1.4.0 (2/18/2010)
-
-Release 1.3.0 for CyaSSL adds bug fixes, better multi TLS/SSL version support
-through SSLv23_server_method(), and improved documentation in the doc/ folder.
-
-For general build instructions doc/Building_CyaSSL.pdf.
-
-# CyaSSL Release 1.3.0 (1/21/2010)
-
-Release 1.3.0 for CyaSSL adds bug fixes, a potential security problem fix,
-better porting support, removal of assert()s, and a complete THREADX port.
-
-For general build instructions see rc1 below.
-
-# CyaSSL Release 1.2.0 (11/2/2009)
-
-Release 1.2.0 for CyaSSL adds bug fixes and session negotiation if first use is
-read or write.
-
-For general build instructions see rc1 below.
-
-# CyaSSL Release 1.1.0 (9/2/2009)
-
-Release 1.1.0 for CyaSSL adds bug fixes, a check against malicious session
-cache use, support for lighttpd, and TLS 1.2.
-
-To get TLS 1.2 support please use the client and server functions:
-
-```c
-SSL_METHOD *TLSv1_2_server_method(void);
-SSL_METHOD *TLSv1_2_client_method(void);
-```
-
-CyaSSL was tested against lighttpd 1.4.23. To build CyaSSL for use with
-lighttpd use the following commands from the CyaSSL install dir :
-
-```
-./configure --disable-shared --enable-opensslExtra --enable-fastmath --without-zlib
-
-make
-make openssl-links
-```
-
-Then to build lighttpd with CyaSSL use the following commands from the
-lighttpd install dir:
-
-```
-./configure --with-openssl --with-openssl-includes=/include --with-openssl-libs=/lib LDFLAGS=-lm
-
-make
-```
-
-On some systems you may get a linker error about a duplicate symbol for
-MD5_Init or other MD5 calls. This seems to be caused by the lighttpd src file
-md5.c, which defines MD5_Init(), and is included in liblightcomp_la-md5.o.
-When liblightcomp is linked with the SSL_LIBs the linker may complain about
-the duplicate symbol. This can be fixed by editing the lighttpd src file md5.c
-and adding this line to the beginning of the file:
-
-\#if 0
-
-and this line to the end of the file
-
-\#endif
-
-Then from the lighttpd src dir do a:
-
-```
-make clean
-make
-```
-
-If you get link errors about undefined symbols more than likely the actual
-OpenSSL libraries are found by the linker before the CyaSSL openssl-links that
-point to the CyaSSL library, causing the linker confusion. This can be fixed
-by editing the Makefile in the lighttpd src directory and changing the line:
-
-`SSL_LIB = -lssl -lcrypto`
-
-to
-
-`SSL_LIB = -lcyassl`
-
-Then from the lighttpd src dir do a:
-
-```
-make clean
-make
-```
-
-This should remove any confusion the linker may be having with missing symbols.
-
-For any questions or concerns please contact support@yassl.com .
-
-For general build instructions see rc1 below.
-
-# CyaSSL Release 1.0.6 (8/03/2009)
-
-Release 1.0.6 for CyaSSL adds bug fixes, an improved session cache, and faster
-math with a huge code option.
-
-The session cache now defaults to a client mode, also good for embedded servers.
-For servers not under heavy load (less than 200 new sessions per minute), define
-BIG_SESSION_CACHE. If the server will be under heavy load, define
-HUGE_SESSION_CACHE.
-
-There is now a fasthugemath option for configure. This enables fastmath plus
-even faster math by greatly increasing the code size of the math library. Use
-the benchmark utility to compare public key operations.
-
-
-For general build instructions see rc1 below.
-
-# CyaSSL Release 1.0.3 (5/10/2009)
-
-Release 1.0.3 for CyaSSL adds bug fixes and add increased support for OpenSSL
-compatibility when building other applications.
-
-Release 1.0.3 includes an alpha release of DTLS for both client and servers.
-This is only for testing purposes at this time. Rebroadcast and reordering
-aren't fully implemented at this time but will be for the next release.
-
-For general build instructions see rc1 below.
-
-# CyaSSL Release 1.0.2 (4/3/2009)
-
-Release 1.0.2 for CyaSSL adds bug fixes for a couple I/O issues. Some systems
-will send a SIGPIPE on socket recv() at any time and this should be handled by
-the application by turning off SIGPIPE through setsockopt() or returning from
-the handler.
-
-Release 1.0.2 includes an alpha release of DTLS for both client and servers.
-This is only for testing purposes at this time. Rebroadcast and reordering
-aren't fully implemented at this time but will be for the next release.
-
-For general build instructions see rc1 below.
-
-## CyaSSL Release Candidate 3 rc3-1.0.0 (2/25/2009)
-
-
-Release Candidate 3 for CyaSSL 1.0.0 adds bug fixes and adds a project file for
-iPhone development with Xcode. cyassl-iphone.xcodeproj is located in the root
-directory. This release also includes a fix for supporting other
-implementations that bundle multiple messages at the record layer, this was
-lost when cyassl i/o was re-implemented but is now fixed.
-
-For general build instructions see rc1 below.
-
-## CyaSSL Release Candidate 2 rc2-1.0.0 (1/21/2009)
-
-
-Release Candidate 2 for CyaSSL 1.0.0 adds bug fixes and adds two new stream
-ciphers along with their respective cipher suites. CyaSSL adds support for
-HC-128 and RABBIT stream ciphers. The new suites are:
-
-```
-TLS_RSA_WITH_HC_128_SHA
-TLS_RSA_WITH_RABBIT_SHA
-```
-
-And the corresponding cipher names are
-
-```
-HC128-SHA
-RABBIT-SHA
-```
-
-CyaSSL also adds support for building with devkitPro for PPC by changing the
-library proper to use libogc. The examples haven't been changed yet but if
-there's interest they can be. Here's an example ./configure to build CyaSSL
-for devkitPro:
-
-```
-./configure --disable-shared CC=/pathTo/devkitpro/devkitPPC/bin/powerpc-gekko-gcc --host=ppc --without-zlib --enable-singleThreaded RANLIB=/pathTo/devkitpro/devkitPPC/bin/powerpc-gekko-ranlib CFLAGS="-DDEVKITPRO -DGEKKO"
-```
-
-For linking purposes you'll need
-
-`LDFLAGS="-g -mrvl -mcpu=750 -meabi -mhard-float -Wl,-Map,$(notdir $@).map"`
-
-For general build instructions see rc1 below.
-
-
-## CyaSSL Release Candidate 1 rc1-1.0.0 (12/17/2008)
-
-
-Release Candidate 1 for CyaSSL 1.0.0 contains major internal changes. Several
-areas have optimization improvements, less dynamic memory use, and the I/O
-strategy has been refactored to allow alternate I/O handling or Library use.
-Many thanks to Thierry Fournier for providing these ideas and most of the work.
-
-Because of these changes, this release is only a candidate since some problems
-are probably inevitable on some platform with some I/O use. Please report any
-problems and we'll try to resolve them as soon as possible. You can contact us
-at support@yassl.com or todd@yassl.com.
-
-Using TomsFastMath by passing --enable-fastmath to ./configure now uses assembly
-on some platforms. This is new so please report any problems as every compiler,
-mode, OS combination hasn't been tested. On ia32 all of the registers need to
-be available so be sure to pass these options to CFLAGS:
-
-`CFLAGS="-O3 -fomit-frame-pointer"`
-
-OS X will also need -mdynamic-no-pic added to CFLAGS
-
-Also if you're building in shared mode for ia32 you'll need to pass options to
-LDFLAGS as well on OS X:
-
-`LDFLAGS=-Wl,-read_only_relocs,warning`
-
-This gives warnings for some symbols but seems to work.
-
-
-#### To build on Linux, Solaris, *BSD, Mac OS X, or Cygwin:
-
- ./configure
- make
-
- from the ./testsuite/ directory run ./testsuite
-
-#### To make a debug build:
-
- ./configure --enable-debug --disable-shared
- make
-
-
-
-#### To build on Win32
-
-Choose (Re)Build All from the project workspace
-
-Run the testsuite program
-
-
-
-
-
-# CyaSSL version 0.9.9 (7/25/2008)
-
-This release of CyaSSL adds bug fixes, Pre-Shared Keys, over-rideable memory
-handling, and optionally TomsFastMath. Thanks to Moisés Guimarães for the
-work on TomsFastMath.
-
-To optionally use TomsFastMath pass --enable-fastmath to ./configure
-Or define USE_FAST_MATH in each project from CyaSSL for MSVC.
-
-Please use the benchmark routine before and after to see the performance
-difference, on some platforms the gains will be little but RSA encryption
-always seems to be faster. On x86-64 machines with GCC the normal math library
-may outperform the fast one when using CFLAGS=-m64 because TomsFastMath can't
-yet use -m64 because of GCCs inability to do 128bit division.
-
- *** UPDATE GCC 4.2.1 can now do 128bit division ***
-
-See notes below (0.2.0) for complete build instructions.
-
-
-# CyaSSL version 0.9.8 (5/7/2008)
-
-This release of CyaSSL adds bug fixes, client side Diffie-Hellman, and better
-socket handling.
-
-See notes below (0.2.0) for complete build instructions.
-
-
-# CyaSSL version 0.9.6 (1/31/2008)
-
-This release of CyaSSL adds bug fixes, increased session management, and a fix
-for gnutls.
-
-See notes below (0.2.0) for complete build instructions.
-
-
-# CyaSSL version 0.9.0 (10/15/2007)
-
-This release of CyaSSL adds bug fixes, MSVC 2005 support, GCC 4.2 support,
-IPV6 support and test, and new test certificates.
-
-See notes below (0.2.0) for complete build instructions.
-
-
-# CyaSSL version 0.8.0 (1/10/2007)
-
-This release of CyaSSL adds increased socket support, for non-blocking writes,
-connects, and interrupted system calls.
-
-See notes below (0.2.0) for complete build instructions.
-
-
-# CyaSSL version 0.6.3 (10/30/2006)
-
-This release of CyaSSL adds debug logging to stderr to aid in the debugging of
-CyaSSL on systems that may not provide the best support.
-
-If CyaSSL is built with debugging support then you need to call
-CyaSSL_Debugging_ON() to turn logging on.
-
-On Unix use ./configure --enable-debug
-
-On Windows define DEBUG_CYASSL when building CyaSSL
-
-
-To turn logging back off call CyaSSL_Debugging_OFF()
-
-See notes below (0.2.0) for complete build instructions.
-
-
-# CyaSSL version 0.6.2 (10/29/2006)
-
-This release of CyaSSL adds TLS 1.1.
-
-Note that CyaSSL has certificate verification on by default, unlike OpenSSL.
-To emulate OpenSSL behavior, you must call SSL_CTX_set_verify() with
-SSL_VERIFY_NONE. In order to have full security you should never do this,
-provide CyaSSL with the proper certificates to eliminate impostors and call
-CyaSSL_check_domain_name() to prevent man in the middle attacks.
-
-See notes below (0.2.0) for build instructions.
-
-# CyaSSL version 0.6.0 (10/25/2006)
-
-This release of CyaSSL adds more SSL functions, better autoconf, nonblocking
-I/O for accept, connect, and read. There is now an --enable-small configure
-option that turns off TLS, AES, DES3, HMAC, and ERROR_STRINGS, see configure.in
-for the defines. Note that TLS requires HMAC and AES requires TLS.
-
-See notes below (0.2.0) for build instructions.
-
-
-# CyaSSL version 0.5.5 (09/27/2006)
-
-This mini release of CyaSSL adds better input processing through buffered input
-and big message support. Added SSL_pending() and some sanity checks on user
-settings.
-
-See notes below (0.2.0) for build instructions.
-
-
-# CyaSSL version 0.5.0 (03/27/2006)
-
-This release of CyaSSL adds AES support and minor bug fixes.
-
-See notes below (0.2.0) for build instructions.
-
-
-# CyaSSL version 0.4.0 (03/15/2006)
-
-This release of CyaSSL adds TLSv1 client/server support and libtool.
-
-See notes below for build instructions.
-
-
-# CyaSSL version 0.3.0 (02/26/2006)
-
-This release of CyaSSL adds SSLv3 server support and session resumption.
-
-See notes below for build instructions.
-
-
-# CyaSSL version 0.2.0 (02/19/2006)
-
-
-This is the first release of CyaSSL and its crypt brother, CTaoCrypt. CyaSSL
-is written in ANSI C with the idea of a small code size, footprint, and memory
-usage in mind. CTaoCrypt can be as small as 32K, and the current client
-version of CyaSSL can be as small as 12K.
-
-
-The first release of CTaoCrypt supports MD5, SHA-1, 3DES, ARC4, Big Integer
-Support, RSA, ASN parsing, and basic x509 (en/de)coding.
-
-The first release of CyaSSL supports normal client RSA mode SSLv3 connections
-with support for SHA-1 and MD5 digests. Ciphers include 3DES and RC4.
-
-
-#### To build on Linux, Solaris, *BSD, Mac OS X, or Cygwin:
-
- ./configure
- make
-
- from the ./testsuite/ directory run ./testsuite
-
-#### to make a debug build:
-
- ./configure --enable-debug --disable-shared
- make
-
-
-
-#### To build on Win32
-
-Choose (Re)Build All from the project workspace
-
-Run the testsuite program
-
-
-
-*** The next release of CyaSSL will support a server and more OpenSSL
-compatibility functions.
-
-
-Please send questions or comments to todd@wolfssl.com
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/INSTALL b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/INSTALL
deleted file mode 100644
index 33a983ed7e..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/INSTALL
+++ /dev/null
@@ -1,102 +0,0 @@
-0. Building on *nix from git repository
-
- Run the autogen script to generate configure, then proceed to step 1.
- Prerequisites: You'll need autoconf, automake and libtool installed.
-
- $ ./autogen.sh
-
-1. Building on *nix from a release
-
- $ ./configure
- $ make
- $ make check # (optional, but highly recommended)
- $ sudo make install
-
-2. Building on iOS
-
- Use on the xcode project in IDE/iOS/wolfssl.xcodeproj
- There is a README in IDE/iOS with more information
-
-3. Building on Windows
-
- Use the 32bit Visual Studio Solution wolfssl.sln
- For a 64bit solution please use wolfssl64.sln
-
-4. Building with IAR
-
- Please see the README in IDE/IAR-EWARM for detailed instructions
-
-5. Building with Keil
-
- Please see the Keil Projects in IDE/MDK5-ARM/Projects
-
-6. Building with Microchip tools
-
- Please see the README in mplabx
-
-7. Building with Freescale MQX
-
- Please see the README in mqx
-
-8. Building with Rowley CrossWorks for ARM
-
- Use the CrossWorks project in IDE/ROWLEY-CROSSWORKS-ARM/wolfssl.hzp
- There is a README.md in IDE/ROWLEY-CROSSWORKS-ARM with more information
-
-9. Building with Arduino
-
- Use the script IDE/ARDUINO/wolfssl-arduino.sh to reformat the wolfSSL
- library for compatibility with the Arduino IDE. There is a README.md in
- IDE/ARDUINO for detailed instructions.
-
-10. Building for Android with Visual Studio 2017
-
- Please see the README in IDE/VS-ARM.
- Use the Visual Studio solution IDE/VS-ARM/wolfssl.sln.
-
-11. Building for Yocto Project or OpenEmbedded
-
- Please see the README in the "meta-wolfssl" repository. This repository
- holds wolfSSL's Yocto and OpenEmbedded layer, which contains recipes
- for wolfSSL, wolfSSH, wolfMQTT, wolfTPM, wolfCrypt examples, and OSS
- project bbappend files.
-
- https://github.com/wolfssl/meta-wolfssl
-
- The wolfSSL recipe can also be found in the OpenEmbedded
- "meta-openembedded/meta-networking/recipes-connectivity" layer:
-
- https://github.com/openembedded/meta-openembedded
-
-12. Porting to a new platform
-
- Please see section 2.4 in the manual:
- http://www.wolfssl.com/yaSSL/Docs-cyassl-manual-2-building-cyassl.html
-
-13. Building with CMake
- Note: Primary development uses automake (./configure). The support for CMake is minimal.
-
- Internally cmake is setup to do the following:
- 1. Uses the ./configure generated wolfssl/options.h as the build options by coping it to the build directory as user_settings.h.
- 2. Builds wolfSSL as library.
- 3. Builds the examples.
-
- Build Steps:
- $ mkdir build
- $ cd build
- $ cmake ..
- $ cmake --build .
- $ cmake --install .
-
- To build library only and not build examples and test apps use:
- $ cmake .. -DBUILD_TESTS=NO
-
- To build with debugging use:
- $ cmake .. -DCMAKE_BUILD_TYPE=Debug
-
- Make sure and run the built examples and test from the wolfssl-root to properly find the ./certs directory.
-
- CMake on Windows with Visual Studio
- 1. Open Command Prompt
- 2. Run the Visual Studio batch to setup command line variables: Example: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat
- 3. Then use steps above
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/LICENSING b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/LICENSING
deleted file mode 100644
index cf1d0982bb..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/LICENSING
+++ /dev/null
@@ -1,14 +0,0 @@
-
-wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use
-under the GPLv3 (or at your option any later version) or a standard commercial
-license. For our users who cannot use wolfSSL under GPLv3
-(or any later version), a commercial license to wolfSSL and wolfCrypt is
-available.
-
-Please contact wolfSSL Inc. directly at:
-
-Email: licensing@wolfssl.com
-Phone: +1 425 245-8247
-
-More information can be found on the wolfSSL website at www.wolfssl.com.
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/Makefile.am b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/Makefile.am
deleted file mode 100644
index 60a5a57ae7..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/Makefile.am
+++ /dev/null
@@ -1,265 +0,0 @@
-# includes append to these:
-SUFFIXES =
-TESTS =
-CLEANFILES =
-DISTCLEANFILES =
-bin_PROGRAMS =
-noinst_HEADERS =
-lib_LTLIBRARIES =
-man_MANS =
-noinst_LTLIBRARIES =
-noinst_PROGRAMS =
-include_HEADERS =
-nobase_include_HEADERS =
-check_PROGRAMS =
-EXTRA_HEADERS =
-BUILT_SOURCES=
-EXTRA_DIST=
-dist_doc_DATA=
-dist_noinst_SCRIPTS =
-noinst_SCRIPTS =
-check_SCRIPTS =
-
-#includes additional rules from aminclude.am
-@INC_AMINCLUDE@
-DISTCLEANFILES+= aminclude.am
-
-CLEANFILES+= cert.der \
- cert.pem \
- certecc.der \
- certecc.pem \
- certreq.der \
- certreq.pem \
- key.der \
- key.pem \
- ntru-cert.der \
- ecc-key-pkcs8.der \
- ntru-cert.pem \
- ntru-key.raw \
- othercert.der \
- othercert.pem \
- pkcs7cert.der \
- pkcs7authEnvelopedDataAES128GCM.der \
- pkcs7authEnvelopedDataAES128GCM_ECDH_SHA1KDF.der \
- pkcs7authEnvelopedDataAES128GCM_KEKRI.der \
- pkcs7authEnvelopedDataAES128GCM_ORI.der \
- pkcs7authEnvelopedDataAES128GCM_PWRI.der \
- pkcs7authEnvelopedDataAES192GCM.der \
- pkcs7authEnvelopedDataAES256GCM.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_authAttribs.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_bothAttribs.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_fw_bothAttribs.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_unauthAttribs.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA512KDF.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA512KDF_ukm.der \
- pkcs7authEnvelopedDataAES256GCM_firmwarePkgData.der \
- pkcs7authEnvelopedDataAES256GCM_IANDS.der \
- pkcs7authEnvelopedDataAES256GCM_SKID.der \
- pkcs7compressedData_data_zlib.der \
- pkcs7compressedData_firmwarePkgData_zlib.der \
- pkcs7encryptedDataAES128CBC.der \
- pkcs7encryptedDataAES192CBC.der \
- pkcs7encryptedDataAES256CBC_attribs.der \
- pkcs7encryptedDataAES256CBC.der \
- pkcs7encryptedDataAES256CBC_firmwarePkgData.der \
- pkcs7encryptedDataAES256CBC_multi_attribs.der \
- pkcs7encryptedDataDES3.der \
- pkcs7encryptedDataDES.der \
- pkcs7envelopedDataAES256CBC_ECDH.der \
- pkcs7envelopedDataAES128CBC_ECDH_SHA1KDF.der \
- pkcs7envelopedDataAES256CBC_ECDH_SHA256KDF.der \
- pkcs7envelopedDataAES256CBC_ECDH_SHA512KDF.der \
- pkcs7envelopedDataAES256CBC_ECDH_SHA512KDF_ukm.der \
- pkcs7envelopedDataDES3.der \
- pkcs7envelopedDataAES128CBC.der \
- pkcs7envelopedDataAES128CBC_KEKRI.der \
- pkcs7envelopedDataAES128CBC_PWRI.der \
- pkcs7envelopedDataAES128CBC_ORI.der \
- pkcs7envelopedDataAES192CBC.der \
- pkcs7envelopedDataAES256CBC.der \
- pkcs7envelopedDataAES256CBC_IANDS.der \
- pkcs7envelopedDataAES256CBC_SKID.der \
- pkcs7signedData_RSA_SHA.der \
- pkcs7signedData_RSA_SHA_noattr.der \
- pkcs7signedData_RSA_SHA224.der \
- pkcs7signedData_RSA_SHA256.der \
- pkcs7signedData_RSA_SHA256_firmwarePkgData.der \
- pkcs7signedData_RSA_SHA256_custom_contentType.der \
- pkcs7signedData_RSA_SHA256_with_ca_cert.der \
- pkcs7signedData_RSA_SHA256_SKID.der \
- pkcs7signedData_RSA_SHA256_detachedSig.der \
- pkcs7signedData_RSA_SHA384.der \
- pkcs7signedData_RSA_SHA512.der \
- pkcs7signedData_ECDSA_SHA.der \
- pkcs7signedData_ECDSA_SHA_noattr.der \
- pkcs7signedData_ECDSA_SHA224.der \
- pkcs7signedData_ECDSA_SHA256.der \
- pkcs7signedData_ECDSA_SHA256_firmwarePkgData.der \
- pkcs7signedData_ECDSA_SHA256_custom_contentType.der \
- pkcs7signedData_ECDSA_SHA256_SKID.der \
- pkcs7signedData_ECDSA_SHA384.der \
- pkcs7signedData_ECDSA_SHA512.der \
- pkcs7signedFirmwarePkgData_ECDSA_SHA256.der \
- pkcs7signedFirmwarePkgData_ECDSA_SHA256_SKID.der \
- pkcs7signedFirmwarePkgData_ECDSA_SHA256_noattr.der \
- pkcs7signedFirmwarePkgData_RSA_SHA256.der \
- pkcs7signedFirmwarePkgData_RSA_SHA256_SKID.der \
- pkcs7signedFirmwarePkgData_RSA_SHA256_noattr.der \
- pkcs7signedFirmwarePkgData_RSA_SHA256_with_ca_cert.der \
- pkcs7signedCompressedFirmwarePkgData_ECDSA_SHA256.der \
- pkcs7signedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der \
- pkcs7signedCompressedFirmwarePkgData_RSA_SHA256.der \
- pkcs7signedCompressedFirmwarePkgData_RSA_SHA256_noattr.der \
- pkcs7signedEncryptedFirmwarePkgData_RSA_SHA256.der \
- pkcs7signedEncryptedFirmwarePkgData_RSA_SHA256_noattr.der \
- pkcs7signedEncryptedFirmwarePkgData_ECDSA_SHA256.der \
- pkcs7signedEncryptedFirmwarePkgData_ECDSA_SHA256_noattr.der \
- pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256.der \
- pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der \
- pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256.der \
- pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256_noattr.der \
- tests/test-log-dump-to-file.txt
-
-exampledir = $(docdir)/example
-dist_example_DATA=
-
-ACLOCAL_AMFLAGS= -I m4
-
-EXTRA_DIST+= lib/dummy
-
-EXTRA_DIST+= wolfssl-ntru.vcproj
-EXTRA_DIST+= wolfssl.vcproj
-EXTRA_DIST+= wolfssl.vcxproj
-EXTRA_DIST+= wolfssl-ntru.sln
-EXTRA_DIST+= wolfssl.sln
-EXTRA_DIST+= wolfssl64.sln
-EXTRA_DIST+= valgrind-error.sh
-EXTRA_DIST+= valgrind-bash.supp
-EXTRA_DIST+= fips-hash.sh
-EXTRA_DIST+= gencertbuf.pl
-EXTRA_DIST+= README.md
-EXTRA_DIST+= README
-EXTRA_DIST+= ChangeLog.md
-EXTRA_DIST+= LICENSING
-EXTRA_DIST+= INSTALL
-EXTRA_DIST+= IPP
-EXTRA_DIST+= LPCExpresso.cproject
-EXTRA_DIST+= LPCExpresso.project
-EXTRA_DIST+= resource.h wolfssl.rc
-EXTRA_DIST+= CMakeLists.txt
-
-include wrapper/include.am
-include cyassl/include.am
-include wolfssl/include.am
-include certs/include.am
-include doc/include.am
-include swig/include.am
-
-include src/include.am
-include support/include.am
-include wolfcrypt/user-crypto/include.am
-include wolfcrypt/benchmark/include.am
-include wolfcrypt/src/include.am
-include wolfcrypt/test/include.am
-include examples/include.am
-include testsuite/include.am
-include tests/include.am
-include sslSniffer/sslSnifferTest/include.am
-include rpm/include.am
-
-# Exclude references to non-DFSG sources from build files
-if !BUILD_DISTRO
-include mqx/util_lib/Sources/include.am
-include mqx/wolfcrypt_benchmark/Sources/include.am
-include mqx/wolfcrypt_test/Sources/include.am
-include mqx/wolfssl/include.am
-include mqx/wolfssl_client/Sources/include.am
-include mplabx/include.am
-include mplabx/wolfcrypt_benchmark.X/nbproject/include.am
-include mplabx/wolfcrypt_test.X/nbproject/include.am
-include mplabx/wolfssl.X/nbproject/include.am
-include mcapi/include.am
-include mcapi/wolfcrypt_mcapi.X/nbproject/include.am
-include mcapi/wolfcrypt_test.X/nbproject/include.am
-include mcapi/wolfssl.X/nbproject/include.am
-include mcapi/zlib.X/nbproject/include.am
-include tirtos/include.am
-include IDE/include.am
-endif
-include scripts/include.am
-
-if USE_VALGRIND
-TESTS_ENVIRONMENT=./valgrind-error.sh
-endif
-
-TEST_EXTENSIONS=.test
-TESTS += $(check_PROGRAMS)
-
-check_SCRIPTS+= $(dist_noinst_SCRIPTS)
-TESTS += $(check_SCRIPTS)
-
-test: check
-tests/unit.log: testsuite/testsuite.log
-
-DISTCLEANFILES+= cyassl-config
-DISTCLEANFILES+= wolfssl-config
-
-maintainer-clean-local:
- -rm Makefile.in
- -rm aclocal.m4
- -rm build-aux/compile
- -rm build-aux/config.guess
- -rm build-aux/config.sub
- -rm build-aux/depcomp
- -rm build-aux/install-sh
- -rm build-aux/ltmain.sh
- -rm build-aux/missing
- -rm cyassl-config
- -rmdir build-aux
- -rm configure
- -rm config.log
- -rm config.status
- -rm config.in
- -rm m4/libtool.m4
- -rm m4/ltoptions.m4
- -rm m4/ltsugar.m4
- -rm m4/ltversion.m4
- -rm m4/lt~obsolete.m4
- -rm support/wolfssl.pc
- find . -type f -name '*~' -exec rm -f '{}' \;
- -rm -f @PACKAGE@-*.tar.gz
- -rm -f @PACKAGE@-*.rpm
-
-# !!!! first line of rule has to start with a hard (real) tab, not spaces
-egs:
- $(MAKE) examples/client/client; \
- $(MAKE) examples/echoclient/echoclient;\
- $(MAKE) examples/server/server; \
- $(MAKE) examples/echoserver/echoserver;
-
-wc_egs:
- $(MAKE) wolfcrypt/test/testwolfcrypt; \
- $(MAKE) wolfcrypt/benchmark/benchmark;
-
-install-exec-local: install-generic-config
-
-install-generic-config:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- $(INSTALL_SCRIPT) @GENERIC_CONFIG@ $(DESTDIR)$(bindir)
-
-uninstall-local:
- -rm -f $(DESTDIR)$(bindir)/@GENERIC_CONFIG@
-
-merge-clean:
- @find ./ | $(GREP) \.gcda | xargs rm -f
- @find ./ | $(GREP) \.gcno | xargs rm -f
- @find ./ | $(GREP) \.gz | xargs rm -f
- @find ./ | $(GREP) \.orig | xargs rm -f
- @find ./ | $(GREP) \.rej | xargs rm -f
- @find ./ | $(GREP) \.rpm | xargs rm -f
- @find ./ | $(GREP) \.THIS | xargs rm -f
- @find ./ | $(GREP) \.OTHER | xargs rm -f
- @find ./ | $(GREP) \.BASE | xargs rm -f
- @find ./ | $(GREP) \~$$ | xargs rm -f
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/Makefile.in b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/Makefile.in
deleted file mode 100644
index 2c9cfcba3b..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/Makefile.in
+++ /dev/null
@@ -1,6578 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# All paths should be given relative to the root
-#
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-
-
-
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
- if test -z '$(MAKELEVEL)'; then \
- false; \
- elif test -n '$(MAKE_HOST)'; then \
- true; \
- elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
- true; \
- else \
- false; \
- fi; \
-}
-am__make_running_with_option = \
- case $${target_option-} in \
- ?) ;; \
- *) echo "am__make_running_with_option: internal error: invalid" \
- "target option '$${target_option-}' specified" >&2; \
- exit 1;; \
- esac; \
- has_opt=no; \
- sane_makeflags=$$MAKEFLAGS; \
- if $(am__is_gnu_make); then \
- sane_makeflags=$$MFLAGS; \
- else \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- bs=\\; \
- sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
- | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
- esac; \
- fi; \
- skip_next=no; \
- strip_trailopt () \
- { \
- flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
- }; \
- for flg in $$sane_makeflags; do \
- test $$skip_next = yes && { skip_next=no; continue; }; \
- case $$flg in \
- *=*|--*) continue;; \
- -*I) strip_trailopt 'I'; skip_next=yes;; \
- -*I?*) strip_trailopt 'I';; \
- -*O) strip_trailopt 'O'; skip_next=yes;; \
- -*O?*) strip_trailopt 'O';; \
- -*l) strip_trailopt 'l'; skip_next=yes;; \
- -*l?*) strip_trailopt 'l';; \
- -[dEDm]) skip_next=yes;; \
- -[JT]) skip_next=yes;; \
- esac; \
- case $$flg in \
- *$$target_option*) has_opt=yes; break;; \
- esac; \
- done; \
- test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS =
-noinst_PROGRAMS = $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \
- $(am__EXEEXT_7) $(am__EXEEXT_8) $(am__EXEEXT_9) \
- $(am__EXEEXT_2) $(am__EXEEXT_10) $(am__EXEEXT_3)
-check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3)
-
-# For distro build don't install options.h.
-# It depends on the architecture and conflicts with Multi-Arch.
-@BUILD_DISTRO_TRUE@am__append_1 = cyassl/options.h
-@BUILD_DISTRO_FALSE@am__append_2 = cyassl/options.h
-@BUILD_CRYPTOAUTHLIB_TRUE@am__append_3 = wolfssl/wolfcrypt/port/atmel/atmel.h
-@BUILD_AFALG_TRUE@am__append_4 = \
-@BUILD_AFALG_TRUE@ wolfssl/wolfcrypt/port/af_alg/afalg_hash.h \
-@BUILD_AFALG_TRUE@ wolfssl/wolfcrypt/port/af_alg/wc_afalg.h
-@BUILD_DEVCRYPTO_TRUE@am__append_5 = wolfssl/wolfcrypt/port/devcrypto/wc_devcrypto.h
-@BUILD_ASYNCCRYPT_TRUE@am__append_6 = wolfssl/wolfcrypt/async.h
-@BUILD_PKCS11_TRUE@am__append_7 = wolfssl/wolfcrypt/wc_pkcs11.h \
-@BUILD_PKCS11_TRUE@ wolfssl/wolfcrypt/pkcs11.h
-@BUILD_CAVIUM_TRUE@am__append_8 = wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
-@BUILD_OCTEON_SYNC_TRUE@am__append_9 = wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h
-@BUILD_INTEL_QA_TRUE@am__append_10 = wolfssl/wolfcrypt/port/intel/quickassist.h \
-@BUILD_INTEL_QA_TRUE@ wolfssl/wolfcrypt/port/intel/quickassist_mem.h
-@BUILD_INTEL_QA_SYNC_TRUE@am__append_11 = wolfssl/wolfcrypt/port/intel/quickassist_sync.h
-@BUILD_SP_TRUE@am__append_12 = wolfssl/wolfcrypt/sp.h \
-@BUILD_SP_TRUE@ wolfssl/wolfcrypt/sp_int.h
-@BUILD_SELFTEST_TRUE@am__append_13 = wolfssl/wolfcrypt/selftest.h
-@BUILD_FIPS_V2_TRUE@am__append_14 = wolfssl/wolfcrypt/fips.h
-@BUILD_FIPS_RAND_TRUE@am__append_15 = wolfssl/wolfcrypt/fips.h
-
-# For distro build don't install options.h.
-# It depends on the architecture and conflicts with Multi-Arch.
-@BUILD_DISTRO_TRUE@am__append_16 = wolfssl/options.h
-@BUILD_DISTRO_FALSE@am__append_17 = wolfssl/options.h
-
-# install the packaged IPP libraries
-
-# Link needed IPP libraries
-@BUILD_FAST_RSA_TRUE@am__append_18 = IPP_links
-@BUILD_FAST_RSA_TRUE@am__append_19 = $(IPPHEADERS) \
-@BUILD_FAST_RSA_TRUE@ wolfcrypt/user-crypto/include/user_rsa.h
-
-# fips first file
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@am__append_20 = ctaocrypt/src/wolfcrypt_first.c \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/hmac.c \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/random.c \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/sha256.c
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@@BUILD_RSA_TRUE@am__append_21 = ctaocrypt/src/rsa.c
-@BUILD_AES_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@am__append_22 = ctaocrypt/src/aes.c
-@BUILD_DES3_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@am__append_23 = ctaocrypt/src/des3.c
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@@BUILD_SHA_TRUE@am__append_24 = ctaocrypt/src/sha.c
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@@BUILD_SHA512_TRUE@am__append_25 = ctaocrypt/src/sha512.c
-
-# fips last file
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@am__append_26 = \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/fips.c \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/fips_test.c \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/wolfcrypt_last.c
-
-# FIPSv2 first file
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__append_27 = wolfcrypt/src/wolfcrypt_first.c \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/hmac.c \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/random.c \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/sha256.c
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_RSA_TRUE@am__append_28 = wolfcrypt/src/rsa.c
-@BUILD_ECC_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__append_29 = wolfcrypt/src/ecc.c
-@BUILD_AES_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__append_30 = wolfcrypt/src/aes.c
-@BUILD_AESNI_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__append_31 = wolfcrypt/src/aes_asm.S
-@BUILD_AESNI_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_INTELASM_TRUE@am__append_32 = wolfcrypt/src/aes_gcm_asm.S
-@BUILD_DES3_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__append_33 = wolfcrypt/src/des3.c
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_SHA_TRUE@am__append_34 = wolfcrypt/src/sha.c
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_INTELASM_TRUE@@BUILD_SHA_TRUE@am__append_35 = wolfcrypt/src/sha256_asm.S
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_SHA512_TRUE@am__append_36 = wolfcrypt/src/sha512.c
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_INTELASM_TRUE@@BUILD_SHA512_TRUE@am__append_37 = wolfcrypt/src/sha512_asm.S
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_SHA3_TRUE@am__append_38 = wolfcrypt/src/sha3.c
-@BUILD_DH_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__append_39 = wolfcrypt/src/dh.c
-@BUILD_CMAC_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__append_40 = wolfcrypt/src/cmac.c
-
-# fips last file
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__append_41 = \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/fips.c \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/fips_test.c \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/wolfcrypt_last.c
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@am__append_42 = \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/wolfcrypt_first.c \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/hmac.c \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/random.c \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/sha256.c \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/sha256_asm.S \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/fips.c \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/fips_test.c \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/wolfcrypt_last.c
-
-
-# For wolfRand, exclude everything else.
-
-# For FIPSV2, exclude the wolfCrypt files included above.
-# For wolfRand, exclude just a couple files.
-# For old FIPS, keep the wolfCrypt versions of the
-# CtaoCrypt files included above.
-@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_43 = wolfcrypt/src/hmac.c
-
-# CAVP self test
-@BUILD_FIPS_RAND_FALSE@@BUILD_SELFTEST_TRUE@am__append_44 = wolfcrypt/src/selftest.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_RNG_TRUE@am__append_45 = wolfcrypt/src/random.c
-@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_46 = wolfcrypt/src/port/arm/armv8-sha256.c
-@BUILD_ARMASM_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_47 = wolfcrypt/src/sha256.c
-@BUILD_ARMASM_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_INTELASM_TRUE@am__append_48 = wolfcrypt/src/sha256_asm.S
-@BUILD_AFALG_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_49 = wolfcrypt/src/port/af_alg/afalg_hash.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_WOLFEVENT_TRUE@am__append_50 = wolfcrypt/src/wolfevent.c
-@BUILD_ASYNCCRYPT_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_51 = wolfcrypt/src/async.c
-@BUILD_FAST_RSA_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_RSA_TRUE@@BUILD_USER_RSA_FALSE@am__append_52 = wolfcrypt/user-crypto/src/rsa.c
-@BUILD_FAST_RSA_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_RSA_TRUE@@BUILD_USER_RSA_FALSE@am__append_53 = wolfcrypt/src/rsa.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_C_TRUE@@BUILD_SP_TRUE@am__append_54 = wolfcrypt/src/sp_c32.c \
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_C_TRUE@@BUILD_SP_TRUE@ wolfcrypt/src/sp_c64.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_TRUE@@BUILD_SP_X86_64_TRUE@am__append_55 = wolfcrypt/src/sp_x86_64.c \
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_TRUE@@BUILD_SP_X86_64_TRUE@ wolfcrypt/src/sp_x86_64_asm.S
-@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SP_ARM32_TRUE@@BUILD_SP_TRUE@am__append_56 = wolfcrypt/src/sp_arm32.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_ARM_THUMB_TRUE@@BUILD_SP_TRUE@am__append_57 = wolfcrypt/src/sp_armthumb.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_ARM64_TRUE@@BUILD_SP_TRUE@am__append_58 = wolfcrypt/src/sp_arm64.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_INT_TRUE@@BUILD_SP_TRUE@am__append_59 = wolfcrypt/src/sp_int.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_ARM_CORTEX_TRUE@@BUILD_SP_TRUE@am__append_60 = wolfcrypt/src/sp_cortexm.c
-@BUILD_AES_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_61 = wolfcrypt/src/aes.c
-@BUILD_AES_TRUE@@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_62 = wolfcrypt/src/port/arm/armv8-aes.c
-@BUILD_AES_TRUE@@BUILD_AFALG_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_63 = wolfcrypt/src/port/af_alg/afalg_aes.c
-@BUILD_CMAC_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_64 = wolfcrypt/src/cmac.c
-@BUILD_DES3_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_65 = wolfcrypt/src/des3.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA_TRUE@am__append_66 = wolfcrypt/src/sha.c
-@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA512_TRUE@am__append_67 = wolfcrypt/src/port/arm/armv8-sha512.c \
-@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA512_TRUE@ wolfcrypt/src/port/arm/armv8-sha512-asm.S \
-@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA512_TRUE@ wolfcrypt/src/port/arm/armv8-32-sha512-asm.S
-@BUILD_ARMASM_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA512_TRUE@am__append_68 = wolfcrypt/src/sha512.c
-@BUILD_ARMASM_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_INTELASM_TRUE@@BUILD_SHA512_TRUE@am__append_69 = wolfcrypt/src/sha512_asm.S
-@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA3_TRUE@am__append_70 = wolfcrypt/src/sha3.c
-@BUILD_FIPS_RAND_FALSE@am__append_71 = \
-@BUILD_FIPS_RAND_FALSE@ wolfcrypt/src/wc_encrypt.c \
-@BUILD_FIPS_RAND_FALSE@ wolfcrypt/src/signature.c \
-@BUILD_FIPS_RAND_FALSE@ wolfcrypt/src/wolfmath.c
-
-@BUILD_MEMORY_TRUE@am__append_72 = wolfcrypt/src/memory.c
-@BUILD_DH_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_73 = wolfcrypt/src/dh.c
-@BUILD_ASN_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_74 = wolfcrypt/src/asn.c
-@BUILD_CODING_TRUE@am__append_75 = wolfcrypt/src/coding.c
-@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_POLY1305_TRUE@am__append_76 = wolfcrypt/src/port/arm/armv8-poly1305.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_POLY1305_TRUE@am__append_77 = wolfcrypt/src/poly1305.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_TRUE@@BUILD_POLY1305_TRUE@am__append_78 = wolfcrypt/src/poly1305_asm.S
-@BUILD_FIPS_RAND_FALSE@@BUILD_RC4_TRUE@am__append_79 = wolfcrypt/src/arc4.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_MD4_TRUE@am__append_80 = wolfcrypt/src/md4.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_MD5_TRUE@am__append_81 = wolfcrypt/src/md5.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_PWDBASED_TRUE@am__append_82 = wolfcrypt/src/pwdbased.c \
-@BUILD_FIPS_RAND_FALSE@@BUILD_PWDBASED_TRUE@ wolfcrypt/src/pkcs12.c
-@BUILD_DSA_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_83 = wolfcrypt/src/dsa.c
-@BUILD_AESNI_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_84 = wolfcrypt/src/aes_asm.S \
-@BUILD_AESNI_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@ wolfcrypt/src/aes_gcm_asm.S
-@BUILD_CAMELLIA_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_85 = wolfcrypt/src/camellia.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_MD2_TRUE@am__append_86 = wolfcrypt/src/md2.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_RIPEMD_TRUE@am__append_87 = wolfcrypt/src/ripemd.c
-@BUILD_BLAKE2_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_88 = wolfcrypt/src/blake2b.c
-@BUILD_BLAKE2S_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_89 = wolfcrypt/src/blake2s.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_HC128_TRUE@am__append_90 = wolfcrypt/src/hc128.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_RABBIT_TRUE@am__append_91 = wolfcrypt/src/rabbit.c
-@BUILD_ARMASM_TRUE@@BUILD_CHACHA_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_92 = wolfcrypt/src/port/arm/armv8-chacha.c
-@BUILD_ARMASM_FALSE@@BUILD_CHACHA_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_93 = wolfcrypt/src/chacha.c
-@BUILD_ARMASM_FALSE@@BUILD_CHACHA_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_TRUE@am__append_94 = wolfcrypt/src/chacha_asm.S
-@BUILD_CHACHA_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_POLY1305_TRUE@am__append_95 = wolfcrypt/src/chacha20_poly1305.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_INLINE_FALSE@am__append_96 = wolfcrypt/src/misc.c
-@BUILD_FASTMATH_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_97 = wolfcrypt/src/tfm.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_SLOWMATH_TRUE@am__append_98 = wolfcrypt/src/integer.c
-@BUILD_ECC_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__append_99 = wolfcrypt/src/ecc.c
-@BUILD_CURVE25519_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_100 = wolfcrypt/src/curve25519.c
-@BUILD_ED25519_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_101 = wolfcrypt/src/ed25519.c
-@BUILD_CURVE25519_SMALL_TRUE@@BUILD_FEMATH_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_102 = wolfcrypt/src/fe_low_mem.c
-@BUILD_CURVE25519_SMALL_FALSE@@BUILD_FEMATH_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_TRUE@am__append_103 = wolfcrypt/src/fe_x25519_asm.S
-@BUILD_ARMASM_TRUE@@BUILD_CURVE25519_SMALL_FALSE@@BUILD_FEMATH_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_FALSE@am__append_104 = wolfcrypt/src/port/arm/armv8-32-curve25519.S \
-@BUILD_ARMASM_TRUE@@BUILD_CURVE25519_SMALL_FALSE@@BUILD_FEMATH_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_FALSE@ wolfcrypt/src/port/arm/armv8-curve25519.S
-@BUILD_ARMASM_FALSE@@BUILD_CURVE25519_SMALL_FALSE@@BUILD_FEMATH_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_FALSE@am__append_105 = wolfcrypt/src/fe_operations.c
-@BUILD_ED25519_SMALL_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_GEMATH_TRUE@am__append_106 = wolfcrypt/src/ge_low_mem.c
-@BUILD_ED25519_SMALL_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_GEMATH_TRUE@am__append_107 = wolfcrypt/src/ge_operations.c
-@BUILD_ED25519_SMALL_FALSE@@BUILD_FEMATH_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_GEMATH_TRUE@@BUILD_INTELASM_TRUE@am__append_108 = wolfcrypt/src/fe_x25519_asm.S
-@BUILD_ARMASM_TRUE@@BUILD_ED25519_SMALL_FALSE@@BUILD_FEMATH_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_GEMATH_TRUE@@BUILD_INTELASM_FALSE@am__append_109 = wolfcrypt/src/port/arm/armv8-curve25519.S
-@BUILD_ARMASM_FALSE@@BUILD_ED25519_SMALL_FALSE@@BUILD_FEMATH_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_GEMATH_TRUE@@BUILD_INTELASM_FALSE@am__append_110 = wolfcrypt/src/fe_operations.c
-@BUILD_CURVE448_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_111 = wolfcrypt/src/curve448.c
-@BUILD_ED448_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_112 = wolfcrypt/src/ed448.c
-@BUILD_FE448_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_113 = wolfcrypt/src/fe_448.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_GE448_TRUE@am__append_114 = wolfcrypt/src/ge_448.c
-@BUILD_FE448_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_GE448_TRUE@am__append_115 = wolfcrypt/src/fe_448.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_LIBZ_TRUE@am__append_116 = wolfcrypt/src/compress.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_PKCS7_TRUE@am__append_117 = wolfcrypt/src/pkcs7.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_SRP_TRUE@am__append_118 = wolfcrypt/src/srp.c
-@BUILD_FIPS_RAND_FALSE@@BUILD_IDEA_TRUE@am__append_119 = wolfcrypt/src/idea.c
-@BUILD_AFALG_TRUE@@BUILD_FIPS_RAND_FALSE@am__append_120 = wolfcrypt/src/port/af_alg/wc_afalg.c
-
-# ssl files
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@am__append_121 = \
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@ src/internal.c \
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@ src/wolfio.c \
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@ src/keys.c \
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@ src/ssl.c \
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@ src/tls.c
-
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_TLS13_TRUE@am__append_122 = src/tls13.c
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_OCSP_TRUE@am__append_123 = src/ocsp.c
-@BUILD_CRL_TRUE@@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@am__append_124 = src/crl.c
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_SNIFFER_TRUE@am__append_125 = src/sniffer.c
-@BUILD_WOLFCRYPT_TESTS_TRUE@am__append_126 = \
-@BUILD_WOLFCRYPT_TESTS_TRUE@ wolfcrypt/benchmark/benchmark \
-@BUILD_WOLFCRYPT_TESTS_TRUE@ wolfcrypt/test/testwolfcrypt \
-@BUILD_WOLFCRYPT_TESTS_TRUE@ wolfcrypt/test/testwolfcrypt
-@BUILD_WOLFCRYPT_TESTS_TRUE@am__append_127 = \
-@BUILD_WOLFCRYPT_TESTS_TRUE@ wolfcrypt/benchmark/benchmark.h \
-@BUILD_WOLFCRYPT_TESTS_TRUE@ wolfcrypt/test/test.h
-@BUILD_CRYPTOCB_TRUE@am__append_128 = wolfcrypt/src/cryptocb.c
-@BUILD_PKCS11_TRUE@am__append_129 = wolfcrypt/src/wc_pkcs11.c
-@BUILD_DEVCRYPTO_TRUE@am__append_130 = wolfcrypt/src/port/devcrypto/devcrypto_hash.c \
-@BUILD_DEVCRYPTO_TRUE@ wolfcrypt/src/port/devcrypto/devcrypto_aes.c \
-@BUILD_DEVCRYPTO_TRUE@ wolfcrypt/src/port/devcrypto/wc_devcrypto.c
-@BUILD_CAVIUM_TRUE@am__append_131 = wolfcrypt/src/port/cavium/cavium_nitrox.c
-@BUILD_OCTEON_SYNC_TRUE@am__append_132 = wolfcrypt/src/port/cavium/cavium_octeon_sync.c
-@BUILD_INTEL_QA_TRUE@am__append_133 = \
-@BUILD_INTEL_QA_TRUE@ wolfcrypt/src/port/intel/quickassist.c \
-@BUILD_INTEL_QA_TRUE@ wolfcrypt/src/port/intel/quickassist_mem.c
-@BUILD_INTEL_QA_SYNC_TRUE@am__append_134 = wolfcrypt/src/port/intel/quickassist_sync.c
-@BUILD_CRYPTOAUTHLIB_TRUE@am__append_135 = wolfcrypt/src/port/atmel/atmel.c
-@BUILD_CRYPTONLY_TRUE@@BUILD_WOLFCRYPT_TESTS_TRUE@am__append_136 = wolfcrypt/test/testwolfcrypt
-@BUILD_THREADED_EXAMPLES_TRUE@am__append_137 = examples/benchmark/tls_bench
-@BUILD_THREADED_EXAMPLES_TRUE@am__append_138 = examples/benchmark/tls_bench.h
-@BUILD_EXAMPLE_CLIENTS_TRUE@am__append_139 = examples/client/client \
-@BUILD_EXAMPLE_CLIENTS_TRUE@ examples/echoclient/echoclient
-@BUILD_EXAMPLE_CLIENTS_TRUE@am__append_140 = examples/client/client.h \
-@BUILD_EXAMPLE_CLIENTS_TRUE@ examples/echoclient/echoclient.h
-@BUILD_EXAMPLE_SERVERS_TRUE@am__append_141 = \
-@BUILD_EXAMPLE_SERVERS_TRUE@ examples/echoserver/echoserver \
-@BUILD_EXAMPLE_SERVERS_TRUE@ examples/server/server
-@BUILD_EXAMPLE_SERVERS_TRUE@am__append_142 = \
-@BUILD_EXAMPLE_SERVERS_TRUE@ examples/echoserver/echoserver.h \
-@BUILD_EXAMPLE_SERVERS_TRUE@ examples/server/server.h
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@am__append_143 = \
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@ examples/sctp/sctp-server \
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@ examples/sctp/sctp-server-dtls
-
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@am__append_144 = \
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@ examples/sctp/sctp-client \
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@ examples/sctp/sctp-client-dtls
-
-@BUILD_TESTS_TRUE@am__append_145 = testsuite/testsuite.test \
-@BUILD_TESTS_TRUE@ tests/unit.test
-@BUILD_TESTS_TRUE@am__append_146 = testsuite/testsuite.test \
-@BUILD_TESTS_TRUE@ tests/unit.test
-@BUILD_SNIFFTEST_TRUE@am__append_147 = sslSniffer/sslSnifferTest/snifftest
-@BUILD_DISTRO_FALSE@am__append_148 = mqx/util_lib/.cproject \
-@BUILD_DISTRO_FALSE@ mqx/util_lib/.project \
-@BUILD_DISTRO_FALSE@ mqx/util_lib/Sources/util.c \
-@BUILD_DISTRO_FALSE@ mqx/util_lib/Sources/util.h \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/.cproject \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/.project \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/Debugger/K70FN1M0.mem \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/Debugger/init_kinetis.tcl \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/Debugger/mass_erase_kinetis.tcl \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/ReferencedRSESystems.xml \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/wolfcrypt_benchmark_twrk70f120m_Int_Flash_DDRData_Debug_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/wolfcrypt_benchmark_twrk70f120m_Int_Flash_DDRData_Release_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/wolfcrypt_benchmark_twrk70f120m_Int_Flash_SramData_Debug_JTrace.jlink \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/wolfcrypt_benchmark_twrk70f120m_Int_Flash_SramData_Debug_JTrace.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/wolfcrypt_benchmark_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/wolfcrypt_benchmark_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/Sources/main.c \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_benchmark/Sources/main.h \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/.cproject \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/.project \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/Debugger/K70FN1M0.mem \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/Debugger/init_kinetis.tcl \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/Debugger/mass_erase_kinetis.tcl \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/ReferencedRSESystems.xml \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/wolfcrypt_test_twrk70f120m_Int_Flash_DDRData_Debug_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/wolfcrypt_test_twrk70f120m_Int_Flash_DDRData_Release_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/wolfcrypt_test_twrk70f120m_Int_Flash_SramData_Debug_JTrace.jlink \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/wolfcrypt_test_twrk70f120m_Int_Flash_SramData_Debug_JTrace.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/wolfcrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/wolfcrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/Sources/main.c \
-@BUILD_DISTRO_FALSE@ mqx/wolfcrypt_test/Sources/main.h \
-@BUILD_DISTRO_FALSE@ mqx/README mqx/wolfssl/.cproject \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl/.project \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/.cproject \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/.project \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/Debugger/K70FN1M0.mem \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/Debugger/init_kinetis.tcl \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/Debugger/mass_erase_kinetis.tcl \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/ReferencedRSESystems.xml \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/wolfssl_client_twrk70f120m_Int_Flash_DDRData_Debug_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/wolfssl_client_twrk70f120m_Int_Flash_DDRData_Release_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/wolfssl_client_twrk70f120m_Int_Flash_SramData_Debug_JTrace.jlink \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/wolfssl_client_twrk70f120m_Int_Flash_SramData_Debug_JTrace.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/wolfssl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/wolfssl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launch \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/Sources/main.c \
-@BUILD_DISTRO_FALSE@ mqx/wolfssl_client/Sources/main.h \
-@BUILD_DISTRO_FALSE@ mplabx/README mplabx/benchmark_main.c \
-@BUILD_DISTRO_FALSE@ mplabx/test_main.c mplabx/PIC32MZ-serial.h \
-@BUILD_DISTRO_FALSE@ mplabx/user_settings.h \
-@BUILD_DISTRO_FALSE@ mplabx/wolfcrypt_benchmark.X/Makefile \
-@BUILD_DISTRO_FALSE@ mplabx/wolfcrypt_benchmark.X/nbproject/configurations.xml \
-@BUILD_DISTRO_FALSE@ mplabx/wolfcrypt_benchmark.X/nbproject/project.xml \
-@BUILD_DISTRO_FALSE@ mplabx/wolfcrypt_test.X/Makefile \
-@BUILD_DISTRO_FALSE@ mplabx/wolfcrypt_test.X/nbproject/configurations.xml \
-@BUILD_DISTRO_FALSE@ mplabx/wolfcrypt_test.X/nbproject/project.xml \
-@BUILD_DISTRO_FALSE@ mplabx/wolfssl.X/Makefile \
-@BUILD_DISTRO_FALSE@ mplabx/wolfssl.X/nbproject/configurations.xml \
-@BUILD_DISTRO_FALSE@ mplabx/wolfssl.X/nbproject/project.xml \
-@BUILD_DISTRO_FALSE@ mcapi/README mcapi/PIC32MZ-serial.h \
-@BUILD_DISTRO_FALSE@ mcapi/user_settings.h \
-@BUILD_DISTRO_FALSE@ mcapi/wolfcrypt_mcapi.X/Makefile \
-@BUILD_DISTRO_FALSE@ mcapi/wolfcrypt_mcapi.X/nbproject/configurations.xml \
-@BUILD_DISTRO_FALSE@ mcapi/wolfcrypt_mcapi.X/nbproject/project.xml \
-@BUILD_DISTRO_FALSE@ mcapi/wolfcrypt_test.X/Makefile \
-@BUILD_DISTRO_FALSE@ mcapi/wolfcrypt_test.X/nbproject/configurations.xml \
-@BUILD_DISTRO_FALSE@ mcapi/wolfcrypt_test.X/nbproject/project.xml \
-@BUILD_DISTRO_FALSE@ mcapi/wolfssl.X/Makefile \
-@BUILD_DISTRO_FALSE@ mcapi/wolfssl.X/nbproject/configurations.xml \
-@BUILD_DISTRO_FALSE@ mcapi/wolfssl.X/nbproject/project.xml \
-@BUILD_DISTRO_FALSE@ mcapi/zlib.X/Makefile \
-@BUILD_DISTRO_FALSE@ mcapi/zlib.X/nbproject/configurations.xml \
-@BUILD_DISTRO_FALSE@ mcapi/zlib.X/nbproject/project.xml \
-@BUILD_DISTRO_FALSE@ tirtos/README tirtos/wolfssl.bld \
-@BUILD_DISTRO_FALSE@ tirtos/wolfssl.mak tirtos/products.mak \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/package.bld \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/package.xdc \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/package.xs \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/tests/EK_TM4C1294XL/wolfcrypt/test/package.bld.hide \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/tests/EK_TM4C1294XL/wolfcrypt/test/package.xdc \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/tests/EK_TM4C1294XL/wolfcrypt/test/test.cfg \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/tests/EK_TM4C1294XL/wolfcrypt/test/TM4C1294NC.icf \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/tests/EK_TM4C1294XL/wolfcrypt/test/main.c \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/tests/EK_TM4C1294XL/wolfcrypt/benchmark/package.bld.hide \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/tests/EK_TM4C1294XL/wolfcrypt/benchmark/package.xdc \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/tests/EK_TM4C1294XL/wolfcrypt/benchmark/benchmark.cfg \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/tests/EK_TM4C1294XL/wolfcrypt/benchmark/TM4C1294NC.icf \
-@BUILD_DISTRO_FALSE@ tirtos/packages/ti/net/wolfssl/tests/EK_TM4C1294XL/wolfcrypt/benchmark/main.c \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/README.md \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/wolfssl-FIPS.xcodeproj/project.pbxproj \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/wolfssl.xcodeproj/project.pbxproj \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/wolfssl.xcworkspace \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/wolfssl_testsuite.xcodeproj \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/build-for-i386.sh \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/Benchmark/wolfBench.xcodeproj/project.pbxproj \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/Benchmark/wolfBench/AppDelegate.h \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/Benchmark/wolfBench/AppDelegate.m \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/Benchmark/wolfBench/Info.plist \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/Benchmark/wolfBench/main.m \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/Benchmark/wolfBench/ViewController.h \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/Benchmark/wolfBench/ViewController.m \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/Benchmark/wolfBench/Assets.xcassets/AppIcon.appiconset/Contents.json \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/Benchmark/wolfBench/Base.lproj/LaunchScreen.storyboard \
-@BUILD_DISTRO_FALSE@ IDE/XCODE/Benchmark/wolfBench/Base.lproj/Main.storyboard \
-@BUILD_DISTRO_FALSE@ IDE/WIN/README.txt IDE/WIN/test.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/WIN/wolfssl-fips.sln \
-@BUILD_DISTRO_FALSE@ IDE/WIN/wolfssl-fips.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/WIN/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/WIN10/README.txt \
-@BUILD_DISTRO_FALSE@ IDE/WIN10/test.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/WIN10/wolfssl-fips.sln \
-@BUILD_DISTRO_FALSE@ IDE/WIN10/wolfssl-fips.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/WIN10/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/WIN-SGX/ReadMe.txt \
-@BUILD_DISTRO_FALSE@ IDE/WIN-SGX/wolfSSL_SGX.edl \
-@BUILD_DISTRO_FALSE@ IDE/WIN-SGX/wolfSSL_SGX.sln \
-@BUILD_DISTRO_FALSE@ IDE/WIN-SGX/wolfSSL_SGX.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/WIN-SGX/wolfSSL_SGX.vcxproj.filters \
-@BUILD_DISTRO_FALSE@ IDE/LINUX-SGX/README.md \
-@BUILD_DISTRO_FALSE@ IDE/LINUX-SGX/sgx_t_static.mk \
-@BUILD_DISTRO_FALSE@ IDE/LINUX-SGX/build.sh \
-@BUILD_DISTRO_FALSE@ IDE/LINUX-SGX/clean.sh \
-@BUILD_DISTRO_FALSE@ IDE/WORKBENCH/README.md \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/arm_startup.c \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/benchmark_main.c \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/hw.h \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/kinetis_hw.c \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/Kinetis_FlashPlacement.xml \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/README.md \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/test_main.c \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/retarget.c \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/wolfssl.hzp \
-@BUILD_DISTRO_FALSE@ IDE/ROWLEY-CROSSWORKS-ARM/wolfssl_ltc.hzp \
-@BUILD_DISTRO_FALSE@ IDE/TRUESTUDIO/README \
-@BUILD_DISTRO_FALSE@ IDE/TRUESTUDIO/wolfssl/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/TRUESTUDIO/wolfssl/.project \
-@BUILD_DISTRO_FALSE@ IDE/TRUESTUDIO/wolfssl/.settings/com.atollic.truestudio.debug.hardware_device.prefs \
-@BUILD_DISTRO_FALSE@ IDE/TRUESTUDIO/wolfssl/.settings/language.settings.xml \
-@BUILD_DISTRO_FALSE@ IDE/TRUESTUDIO/wolfssl/.settings/org.eclipse.cdt.managedbuilder.core.prefs \
-@BUILD_DISTRO_FALSE@ IDE/TRUESTUDIO/wolfssl/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/ARDUINO/README.md \
-@BUILD_DISTRO_FALSE@ IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino \
-@BUILD_DISTRO_FALSE@ IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino \
-@BUILD_DISTRO_FALSE@ IDE/ARDUINO/wolfssl-arduino.sh \
-@BUILD_DISTRO_FALSE@ IDE/INTIME-RTOS/README.md \
-@BUILD_DISTRO_FALSE@ IDE/INTIME-RTOS/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/INTIME-RTOS/libwolfssl.c \
-@BUILD_DISTRO_FALSE@ IDE/INTIME-RTOS/libwolfssl.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/INTIME-RTOS/wolfExamples.c \
-@BUILD_DISTRO_FALSE@ IDE/INTIME-RTOS/wolfExamples.h \
-@BUILD_DISTRO_FALSE@ IDE/INTIME-RTOS/wolfExamples.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/INTIME-RTOS/wolfExamples.sln \
-@BUILD_DISTRO_FALSE@ IDE/STM32Cube/README.md \
-@BUILD_DISTRO_FALSE@ IDE/STM32Cube/main.c \
-@BUILD_DISTRO_FALSE@ IDE/STM32Cube/wolfssl_example.c \
-@BUILD_DISTRO_FALSE@ IDE/STM32Cube/wolfSSL.wolfSSL_conf.h \
-@BUILD_DISTRO_FALSE@ IDE/STM32Cube/wolfssl_example.h \
-@BUILD_DISTRO_FALSE@ IDE/STM32Cube/STM32_Benchmarks.md \
-@BUILD_DISTRO_FALSE@ IDE/VS-ARM/README.md \
-@BUILD_DISTRO_FALSE@ IDE/VS-ARM/wolfssl.sln \
-@BUILD_DISTRO_FALSE@ IDE/VS-ARM/wolfssl.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/VS-ARM/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/README.md \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/wolfssl.sln \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/wolfssl.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/client/app_manifest.json \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/client/client.c \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/client/client.h \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/client/client.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/server/app_manifest.json \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/server/server.c \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/server/server.h \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/server/server.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/wolfcrypt_test/app_manifest.json \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/wolfcrypt_test/wolfcrypt_test.vcxproj \
-@BUILD_DISTRO_FALSE@ IDE/VS-AZURE-SPHERE/shared/util.h \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Header/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Source/armtarget.c \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Source/wolf_main.c \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Source/benchmark_main.c \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Source/test_main.c \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Source/tls_client.c \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/linker.ld \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/linker_fips.ld \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Makefile \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Makefile.bench \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Makefile.client \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Makefile.common \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Makefile.test \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/Makefile.static \
-@BUILD_DISTRO_FALSE@ IDE/GCC-ARM/README.md IDE/CSBENCH/.project \
-@BUILD_DISTRO_FALSE@ IDE/CSBENCH/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/CSBENCH/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/DEOS/README.md \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/DEOS/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/DEOS/tls_wolfssl.h \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/DEOS/tls_wolfssl.c \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/DEOS/deos_malloc.c \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/MICRIUM/README.md \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/MICRIUM/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/MICRIUM/client_wolfssl.h \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/MICRIUM/server_wolfssl.h \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/MICRIUM/client_wolfssl.c \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/MICRIUM/server_wolfssl.c \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/MICRIUM/wolfsslRunTests.c \
-@BUILD_DISTRO_FALSE@ IDE/ECLIPSE/SIFIVE/README.md \
-@BUILD_DISTRO_FALSE@ IDE/mynewt/README.md \
-@BUILD_DISTRO_FALSE@ IDE/mynewt/apps.wolfcrypttest.pkg.yml \
-@BUILD_DISTRO_FALSE@ IDE/mynewt/crypto.wolfssl.pkg.yml \
-@BUILD_DISTRO_FALSE@ IDE/mynewt/crypto.wolfssl.syscfg.yml \
-@BUILD_DISTRO_FALSE@ IDE/mynewt/setup.sh \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/README.md \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/wolfssl-template-project/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/wolfssl-template-project/configuration.xml \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/wolfcrypttest-template/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/wolfcrypttest-template/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/wolfcrypttest-template/src/app_entry.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/example_server-template/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/example_server-template/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/example_server-template/src/app_entry.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/benchmark-template/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/benchmark-template/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/DK-S7G2/benchmark-template/src/app_entry.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/README \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/wolfssl_lib/wolfssl_lib.mtpj \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/test/test.mtpj \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/test/test_main.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/common/wolfssl_dummy.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/common/strings.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/common/unistd.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/common/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/t4_demo/README_en.txt \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/t4_demo/README_jp.txt \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/t4_demo/wolf_demo.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/cs+/Projects/t4_demo/t4_demo.mtpj \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/README \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/wolfssl/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/wolfssl/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/test/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/test/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/test/src/test_main.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/test/src/key_data.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/test/src/key_data.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/test/src/wolf_client.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/test/src/wolf_server.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/test/src/wolfssl_demo.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/common/wolfssl_dummy.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/common/strings.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/common/unistd.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/Projects/common/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/src/wolfssl_thread_entry.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/client-wolfssl/src/wolfssl_thread_entry.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/client-wolfssl/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/client-wolfssl/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/client-wolfssl/wolfssl_thread_entry.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/common/ra6m3g/README.md \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/common/src/freertos_tcp_port.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/common/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/common/util.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/server-wolfssl/src/wolfssl_thread_entry.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/server-wolfssl/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/server-wolfssl/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/server-wolfssl/wolfssl_thread_entry.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/src/wolfssl_thread_entry.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/wolfssl/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/wolfssl/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/wolfssl/configuration.xml \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3/README.md \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RA6M3G/README.md \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/README \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/wolfssl/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/wolfssl/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/test/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/test/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/test/test_HardwareDebug.launch \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/test/src/test_main.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_client.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_server.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/test/src/wolfssl_demo.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/common/wolfssl_dummy.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/common/strings.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/common/unistd.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/common/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/smc/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/smc/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/GR-ROSE/smc/smc.scfg \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/README \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/test/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/test/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/test/test_HardwareDebug.launch \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/test_main.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_client.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_server.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolfssl_demo.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/common/wolfssl_dummy.c \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/common/strings.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/common/unistd.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/common/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.project \
-@BUILD_DISTRO_FALSE@ IDE/Renesas/e2studio/RX72NEnvisionKit/smc/smc.scfg \
-@BUILD_DISTRO_FALSE@ IDE/WICED-STUDIO/README \
-@BUILD_DISTRO_FALSE@ IDE/WICED-STUDIO/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/CRYPTOCELL/README.md \
-@BUILD_DISTRO_FALSE@ IDE/CRYPTOCELL/main.c \
-@BUILD_DISTRO_FALSE@ IDE/CRYPTOCELL/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/M68K/README.md IDE/M68K/Makefile \
-@BUILD_DISTRO_FALSE@ IDE/M68K/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/M68K/testwolfcrypt/main.cpp \
-@BUILD_DISTRO_FALSE@ IDE/M68K/testwolfcrypt/Makefile \
-@BUILD_DISTRO_FALSE@ IDE/M68K/benchmark/main.cpp \
-@BUILD_DISTRO_FALSE@ IDE/M68K/benchmark/Makefile \
-@BUILD_DISTRO_FALSE@ IDE/HEXAGON/Makefile \
-@BUILD_DISTRO_FALSE@ IDE/HEXAGON/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/HEXAGON/README.md IDE/HEXAGON/build.sh \
-@BUILD_DISTRO_FALSE@ IDE/HEXAGON/ecc-verify.c \
-@BUILD_DISTRO_FALSE@ IDE/HEXAGON/ecc-verify-benchmark.c \
-@BUILD_DISTRO_FALSE@ IDE/HEXAGON/DSP/Makefile \
-@BUILD_DISTRO_FALSE@ IDE/HEXAGON/DSP/wolfssl_dsp.idl \
-@BUILD_DISTRO_FALSE@ IDE/RISCV/SIFIVE-HIFIVE1/README.md \
-@BUILD_DISTRO_FALSE@ IDE/RISCV/SIFIVE-HIFIVE1/main.c \
-@BUILD_DISTRO_FALSE@ IDE/RISCV/SIFIVE-HIFIVE1/Makefile \
-@BUILD_DISTRO_FALSE@ IDE/RISCV/SIFIVE-HIFIVE1/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/RISCV/SIFIVE-UNLEASHED/README.md \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/README.md \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/user_settings.h \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/wolfssl_example.c \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/2018_2/lscript.ld \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/2018_2/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/2018_2/.project \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/2019_2/wolfCrypt_example/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/2019_2/wolfCrypt_example/.project \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/2019_2/wolfCrypt_example/src/lscript.ld \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/2019_2/wolfCrypt_example_system/.cproject \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/2019_2/wolfCrypt_example_system/.project \
-@BUILD_DISTRO_FALSE@ IDE/XilinxSDK/2019_2/wolfCrypt_example_system/wolfCrypt_example_system.sprj \
-@BUILD_DISTRO_FALSE@ IDE/IAR-EWARM IDE/MDK-ARM IDE/MDK5-ARM \
-@BUILD_DISTRO_FALSE@ IDE/MYSQL IDE/LPCXPRESSO IDE/HEXIWEAR \
-@BUILD_DISTRO_FALSE@ IDE/Espressif IDE/zephyr \
-@BUILD_DISTRO_FALSE@ IDE/OPENSTM32/README.md
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@am__append_149 = mcapi/test
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@am__append_150 = mcapi/test
-@BUILD_DISTRO_FALSE@am__append_151 = mcapi/crypto.h
-@BUILD_SNIFFTEST_TRUE@am__append_152 = scripts/sniffer-testsuite.test
-@BUILD_EXAMPLE_SERVERS_TRUE@am__append_153 = scripts/resume.test
-@BUILD_EXAMPLE_SERVERS_TRUE@am__append_154 = scripts/benchmark.test \
-@BUILD_EXAMPLE_SERVERS_TRUE@ scripts/memtest.sh
-
-# The CRL and OCSP tests use RSA certificates.
-
-# make revoked test rely on completion of resume test
-@BUILD_CRL_TRUE@@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_RSA_TRUE@am__append_155 = scripts/crl-revoked.test
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_RSA_TRUE@am__append_156 = scripts/ocsp-stapling.test \
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_RSA_TRUE@ scripts/ocsp-stapling-with-ca-as-responder.test
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_V2_TRUE@@BUILD_RSA_TRUE@am__append_157 = scripts/ocsp-stapling2.test
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_PSK_TRUE@am__append_158 = scripts/psk.test
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_TRUST_PEER_CERT_TRUE@am__append_159 = scripts/trusted_peer.test
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_PKCALLBACKS_TRUE@am__append_160 = scripts/pkcallbacks.test
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_TLS13_TRUE@am__append_161 = scripts/tls13.test
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_IPV6_FALSE@am__append_162 = scripts/external.test \
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_IPV6_FALSE@ scripts/google.test \
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_IPV6_FALSE@ scripts/openssl.test
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_IPV6_FALSE@@BUILD_OCSP_TRUE@am__append_163 = scripts/ocsp.test
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_add_am_macro.m4 \
- $(top_srcdir)/m4/ax_am_jobserver.m4 \
- $(top_srcdir)/m4/ax_am_macros.m4 \
- $(top_srcdir)/m4/ax_append_compile_flags.m4 \
- $(top_srcdir)/m4/ax_append_flag.m4 \
- $(top_srcdir)/m4/ax_append_to_file.m4 \
- $(top_srcdir)/m4/ax_check_compile_flag.m4 \
- $(top_srcdir)/m4/ax_check_link_flag.m4 \
- $(top_srcdir)/m4/ax_count_cpus.m4 \
- $(top_srcdir)/m4/ax_create_generic_config.m4 \
- $(top_srcdir)/m4/ax_debug.m4 \
- $(top_srcdir)/m4/ax_file_escapes.m4 \
- $(top_srcdir)/m4/ax_harden_compiler_flags.m4 \
- $(top_srcdir)/m4/ax_print_to_file.m4 \
- $(top_srcdir)/m4/ax_pthread.m4 \
- $(top_srcdir)/m4/ax_require_defined.m4 \
- $(top_srcdir)/m4/ax_tls.m4 $(top_srcdir)/m4/ax_vcs_checkout.m4 \
- $(top_srcdir)/m4/hexversion.m4 \
- $(top_srcdir)/m4/lib_socket_nsl.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
- $(am__configure_deps) $(am__dist_noinst_SCRIPTS_DIST) \
- $(dist_doc_DATA) $(dist_example_DATA) \
- $(am__include_HEADERS_DIST) $(am__nobase_include_HEADERS_DIST) \
- $(am__noinst_HEADERS_DIST) $(am__DIST_COMMON)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = stamp-h wolfssl/version.h wolfssl/options.h \
- cyassl/options.h support/wolfssl.pc rpm/spec
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \
- "$(DESTDIR)$(docdir)" "$(DESTDIR)$(exampledir)" \
- "$(DESTDIR)$(ippdir)" "$(DESTDIR)$(pkgconfigdir)" \
- "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"
-@BUILD_CRYPTONLY_TRUE@@BUILD_WOLFCRYPT_TESTS_TRUE@am__EXEEXT_1 = wolfcrypt/test/testwolfcrypt$(EXEEXT)
-@BUILD_TESTS_TRUE@am__EXEEXT_2 = testsuite/testsuite.test$(EXEEXT) \
-@BUILD_TESTS_TRUE@ tests/unit.test$(EXEEXT)
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@am__EXEEXT_3 = \
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@ mcapi/test$(EXEEXT)
-@BUILD_WOLFCRYPT_TESTS_TRUE@am__EXEEXT_4 = wolfcrypt/benchmark/benchmark$(EXEEXT) \
-@BUILD_WOLFCRYPT_TESTS_TRUE@ wolfcrypt/test/testwolfcrypt$(EXEEXT) \
-@BUILD_WOLFCRYPT_TESTS_TRUE@ wolfcrypt/test/testwolfcrypt$(EXEEXT)
-@BUILD_THREADED_EXAMPLES_TRUE@am__EXEEXT_5 = examples/benchmark/tls_bench$(EXEEXT)
-@BUILD_EXAMPLE_CLIENTS_TRUE@am__EXEEXT_6 = \
-@BUILD_EXAMPLE_CLIENTS_TRUE@ examples/client/client$(EXEEXT) \
-@BUILD_EXAMPLE_CLIENTS_TRUE@ examples/echoclient/echoclient$(EXEEXT)
-@BUILD_EXAMPLE_SERVERS_TRUE@am__EXEEXT_7 = examples/echoserver/echoserver$(EXEEXT) \
-@BUILD_EXAMPLE_SERVERS_TRUE@ examples/server/server$(EXEEXT)
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@am__EXEEXT_8 = examples/sctp/sctp-server$(EXEEXT) \
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@ examples/sctp/sctp-server-dtls$(EXEEXT)
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@am__EXEEXT_9 = examples/sctp/sctp-client$(EXEEXT) \
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@ examples/sctp/sctp-client-dtls$(EXEEXT)
-@BUILD_SNIFFTEST_TRUE@am__EXEEXT_10 = sslSniffer/sslSnifferTest/snifftest$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
- }
-LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-src_libwolfssl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am__src_libwolfssl_la_SOURCES_DIST = ctaocrypt/src/wolfcrypt_first.c \
- ctaocrypt/src/hmac.c ctaocrypt/src/random.c \
- ctaocrypt/src/sha256.c ctaocrypt/src/rsa.c ctaocrypt/src/aes.c \
- ctaocrypt/src/des3.c ctaocrypt/src/sha.c \
- ctaocrypt/src/sha512.c ctaocrypt/src/fips.c \
- ctaocrypt/src/fips_test.c ctaocrypt/src/wolfcrypt_last.c \
- wolfcrypt/src/wolfcrypt_first.c wolfcrypt/src/hmac.c \
- wolfcrypt/src/random.c wolfcrypt/src/sha256.c \
- wolfcrypt/src/rsa.c wolfcrypt/src/ecc.c wolfcrypt/src/aes.c \
- wolfcrypt/src/aes_asm.S wolfcrypt/src/aes_gcm_asm.S \
- wolfcrypt/src/des3.c wolfcrypt/src/sha.c \
- wolfcrypt/src/sha256_asm.S wolfcrypt/src/sha512.c \
- wolfcrypt/src/sha512_asm.S wolfcrypt/src/sha3.c \
- wolfcrypt/src/dh.c wolfcrypt/src/cmac.c wolfcrypt/src/fips.c \
- wolfcrypt/src/fips_test.c wolfcrypt/src/wolfcrypt_last.c \
- wolfcrypt/src/selftest.c wolfcrypt/src/hash.c \
- wolfcrypt/src/cpuid.c wolfcrypt/src/port/arm/armv8-sha256.c \
- wolfcrypt/src/port/af_alg/afalg_hash.c \
- wolfcrypt/src/wolfevent.c wolfcrypt/src/async.c \
- wolfcrypt/user-crypto/src/rsa.c wolfcrypt/src/sp_c32.c \
- wolfcrypt/src/sp_c64.c wolfcrypt/src/sp_x86_64.c \
- wolfcrypt/src/sp_x86_64_asm.S wolfcrypt/src/sp_arm32.c \
- wolfcrypt/src/sp_armthumb.c wolfcrypt/src/sp_arm64.c \
- wolfcrypt/src/sp_int.c wolfcrypt/src/sp_cortexm.c \
- wolfcrypt/src/port/arm/armv8-aes.c \
- wolfcrypt/src/port/af_alg/afalg_aes.c \
- wolfcrypt/src/port/arm/armv8-sha512.c \
- wolfcrypt/src/port/arm/armv8-sha512-asm.S \
- wolfcrypt/src/port/arm/armv8-32-sha512-asm.S \
- wolfcrypt/src/logging.c wolfcrypt/src/wc_port.c \
- wolfcrypt/src/error.c wolfcrypt/src/wc_encrypt.c \
- wolfcrypt/src/signature.c wolfcrypt/src/wolfmath.c \
- wolfcrypt/src/memory.c wolfcrypt/src/asn.c \
- wolfcrypt/src/coding.c wolfcrypt/src/port/arm/armv8-poly1305.c \
- wolfcrypt/src/poly1305.c wolfcrypt/src/poly1305_asm.S \
- wolfcrypt/src/arc4.c wolfcrypt/src/md4.c wolfcrypt/src/md5.c \
- wolfcrypt/src/pwdbased.c wolfcrypt/src/pkcs12.c \
- wolfcrypt/src/dsa.c wolfcrypt/src/camellia.c \
- wolfcrypt/src/md2.c wolfcrypt/src/ripemd.c \
- wolfcrypt/src/blake2b.c wolfcrypt/src/blake2s.c \
- wolfcrypt/src/hc128.c wolfcrypt/src/rabbit.c \
- wolfcrypt/src/port/arm/armv8-chacha.c wolfcrypt/src/chacha.c \
- wolfcrypt/src/chacha_asm.S wolfcrypt/src/chacha20_poly1305.c \
- wolfcrypt/src/misc.c wolfcrypt/src/tfm.c \
- wolfcrypt/src/integer.c wolfcrypt/src/curve25519.c \
- wolfcrypt/src/ed25519.c wolfcrypt/src/fe_low_mem.c \
- wolfcrypt/src/fe_x25519_asm.S \
- wolfcrypt/src/port/arm/armv8-32-curve25519.S \
- wolfcrypt/src/port/arm/armv8-curve25519.S \
- wolfcrypt/src/fe_operations.c wolfcrypt/src/ge_low_mem.c \
- wolfcrypt/src/ge_operations.c wolfcrypt/src/curve448.c \
- wolfcrypt/src/ed448.c wolfcrypt/src/fe_448.c \
- wolfcrypt/src/ge_448.c wolfcrypt/src/compress.c \
- wolfcrypt/src/pkcs7.c wolfcrypt/src/srp.c wolfcrypt/src/idea.c \
- wolfcrypt/src/port/af_alg/wc_afalg.c src/internal.c \
- src/wolfio.c src/keys.c src/ssl.c src/tls.c src/tls13.c \
- src/ocsp.c src/crl.c src/sniffer.c wolfcrypt/src/cryptocb.c \
- wolfcrypt/src/wc_pkcs11.c \
- wolfcrypt/src/port/devcrypto/devcrypto_hash.c \
- wolfcrypt/src/port/devcrypto/devcrypto_aes.c \
- wolfcrypt/src/port/devcrypto/wc_devcrypto.c \
- wolfcrypt/src/port/cavium/cavium_nitrox.c \
- wolfcrypt/src/port/cavium/cavium_octeon_sync.c \
- wolfcrypt/src/port/intel/quickassist.c \
- wolfcrypt/src/port/intel/quickassist_mem.c \
- wolfcrypt/src/port/intel/quickassist_sync.c \
- wolfcrypt/src/port/atmel/atmel.c
-am__dirstamp = $(am__leading_dot)dirstamp
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@am__objects_1 = ctaocrypt/src/src_libwolfssl_la-wolfcrypt_first.lo \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/src_libwolfssl_la-hmac.lo \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/src_libwolfssl_la-random.lo \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/src_libwolfssl_la-sha256.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@@BUILD_RSA_TRUE@am__objects_2 = ctaocrypt/src/src_libwolfssl_la-rsa.lo
-@BUILD_AES_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@am__objects_3 = ctaocrypt/src/src_libwolfssl_la-aes.lo
-@BUILD_DES3_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@am__objects_4 = ctaocrypt/src/src_libwolfssl_la-des3.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@@BUILD_SHA_TRUE@am__objects_5 = ctaocrypt/src/src_libwolfssl_la-sha.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@@BUILD_SHA512_TRUE@am__objects_6 = ctaocrypt/src/src_libwolfssl_la-sha512.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@am__objects_7 = ctaocrypt/src/src_libwolfssl_la-fips.lo \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/src_libwolfssl_la-fips_test.lo \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V1_TRUE@ ctaocrypt/src/src_libwolfssl_la-wolfcrypt_last.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__objects_8 = wolfcrypt/src/src_libwolfssl_la-wolfcrypt_first.lo \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/src_libwolfssl_la-hmac.lo \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/src_libwolfssl_la-random.lo \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/src_libwolfssl_la-sha256.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_RSA_TRUE@am__objects_9 = wolfcrypt/src/src_libwolfssl_la-rsa.lo
-@BUILD_ECC_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__objects_10 = wolfcrypt/src/src_libwolfssl_la-ecc.lo
-@BUILD_AES_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__objects_11 = wolfcrypt/src/src_libwolfssl_la-aes.lo
-@BUILD_AESNI_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__objects_12 = wolfcrypt/src/src_libwolfssl_la-aes_asm.lo
-@BUILD_AESNI_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_INTELASM_TRUE@am__objects_13 = wolfcrypt/src/src_libwolfssl_la-aes_gcm_asm.lo
-@BUILD_DES3_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__objects_14 = wolfcrypt/src/src_libwolfssl_la-des3.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_SHA_TRUE@am__objects_15 = wolfcrypt/src/src_libwolfssl_la-sha.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_INTELASM_TRUE@@BUILD_SHA_TRUE@am__objects_16 = wolfcrypt/src/src_libwolfssl_la-sha256_asm.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_SHA512_TRUE@am__objects_17 = wolfcrypt/src/src_libwolfssl_la-sha512.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_INTELASM_TRUE@@BUILD_SHA512_TRUE@am__objects_18 = wolfcrypt/src/src_libwolfssl_la-sha512_asm.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@@BUILD_SHA3_TRUE@am__objects_19 = wolfcrypt/src/src_libwolfssl_la-sha3.lo
-@BUILD_DH_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__objects_20 = wolfcrypt/src/src_libwolfssl_la-dh.lo
-@BUILD_CMAC_TRUE@@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__objects_21 = wolfcrypt/src/src_libwolfssl_la-cmac.lo
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@am__objects_22 = wolfcrypt/src/src_libwolfssl_la-fips.lo \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/src_libwolfssl_la-fips_test.lo \
-@BUILD_FIPS_TRUE@@BUILD_FIPS_V2_TRUE@ wolfcrypt/src/src_libwolfssl_la-wolfcrypt_last.lo
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@am__objects_23 = wolfcrypt/src/src_libwolfssl_la-wolfcrypt_first.lo \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/src_libwolfssl_la-hmac.lo \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/src_libwolfssl_la-random.lo \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/src_libwolfssl_la-sha256.lo \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/src_libwolfssl_la-sha256_asm.lo \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/src_libwolfssl_la-fips.lo \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/src_libwolfssl_la-fips_test.lo \
-@BUILD_FIPS_RAND_TRUE@@BUILD_FIPS_TRUE@ wolfcrypt/src/src_libwolfssl_la-wolfcrypt_last.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_24 = wolfcrypt/src/src_libwolfssl_la-hmac.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_SELFTEST_TRUE@am__objects_25 = wolfcrypt/src/src_libwolfssl_la-selftest.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_RNG_TRUE@am__objects_26 = wolfcrypt/src/src_libwolfssl_la-random.lo
-@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_27 = wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha256.lo
-@BUILD_ARMASM_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_28 = wolfcrypt/src/src_libwolfssl_la-sha256.lo
-@BUILD_ARMASM_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_INTELASM_TRUE@am__objects_29 = wolfcrypt/src/src_libwolfssl_la-sha256_asm.lo
-@BUILD_AFALG_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_30 = wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_hash.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_WOLFEVENT_TRUE@am__objects_31 = wolfcrypt/src/src_libwolfssl_la-wolfevent.lo
-@BUILD_ASYNCCRYPT_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_32 = wolfcrypt/src/src_libwolfssl_la-async.lo
-@BUILD_FAST_RSA_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_RSA_TRUE@@BUILD_USER_RSA_FALSE@am__objects_33 = wolfcrypt/user-crypto/src/src_libwolfssl_la-rsa.lo
-@BUILD_FAST_RSA_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_RSA_TRUE@@BUILD_USER_RSA_FALSE@am__objects_34 = wolfcrypt/src/src_libwolfssl_la-rsa.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_C_TRUE@@BUILD_SP_TRUE@am__objects_35 = wolfcrypt/src/src_libwolfssl_la-sp_c32.lo \
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_C_TRUE@@BUILD_SP_TRUE@ wolfcrypt/src/src_libwolfssl_la-sp_c64.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_TRUE@@BUILD_SP_X86_64_TRUE@am__objects_36 = wolfcrypt/src/src_libwolfssl_la-sp_x86_64.lo \
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_TRUE@@BUILD_SP_X86_64_TRUE@ wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SP_ARM32_TRUE@@BUILD_SP_TRUE@am__objects_37 = wolfcrypt/src/src_libwolfssl_la-sp_arm32.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_ARM_THUMB_TRUE@@BUILD_SP_TRUE@am__objects_38 = wolfcrypt/src/src_libwolfssl_la-sp_armthumb.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_ARM64_TRUE@@BUILD_SP_TRUE@am__objects_39 = wolfcrypt/src/src_libwolfssl_la-sp_arm64.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_INT_TRUE@@BUILD_SP_TRUE@am__objects_40 = wolfcrypt/src/src_libwolfssl_la-sp_int.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_SP_ARM_CORTEX_TRUE@@BUILD_SP_TRUE@am__objects_41 = wolfcrypt/src/src_libwolfssl_la-sp_cortexm.lo
-@BUILD_AES_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_42 = wolfcrypt/src/src_libwolfssl_la-aes.lo
-@BUILD_AES_TRUE@@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_43 = wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-aes.lo
-@BUILD_AES_TRUE@@BUILD_AFALG_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_44 = wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_aes.lo
-@BUILD_CMAC_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_45 = wolfcrypt/src/src_libwolfssl_la-cmac.lo
-@BUILD_DES3_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_46 = wolfcrypt/src/src_libwolfssl_la-des3.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA_TRUE@am__objects_47 = wolfcrypt/src/src_libwolfssl_la-sha.lo
-@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA512_TRUE@am__objects_48 = wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512.lo \
-@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA512_TRUE@ wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512-asm.lo \
-@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA512_TRUE@ wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-sha512-asm.lo
-@BUILD_ARMASM_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA512_TRUE@am__objects_49 = wolfcrypt/src/src_libwolfssl_la-sha512.lo
-@BUILD_ARMASM_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_INTELASM_TRUE@@BUILD_SHA512_TRUE@am__objects_50 = wolfcrypt/src/src_libwolfssl_la-sha512_asm.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@@BUILD_SHA3_TRUE@am__objects_51 = wolfcrypt/src/src_libwolfssl_la-sha3.lo
-@BUILD_FIPS_RAND_FALSE@am__objects_52 = wolfcrypt/src/src_libwolfssl_la-wc_encrypt.lo \
-@BUILD_FIPS_RAND_FALSE@ wolfcrypt/src/src_libwolfssl_la-signature.lo \
-@BUILD_FIPS_RAND_FALSE@ wolfcrypt/src/src_libwolfssl_la-wolfmath.lo
-@BUILD_MEMORY_TRUE@am__objects_53 = \
-@BUILD_MEMORY_TRUE@ wolfcrypt/src/src_libwolfssl_la-memory.lo
-@BUILD_DH_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_54 = wolfcrypt/src/src_libwolfssl_la-dh.lo
-@BUILD_ASN_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_55 = wolfcrypt/src/src_libwolfssl_la-asn.lo
-@BUILD_CODING_TRUE@am__objects_56 = \
-@BUILD_CODING_TRUE@ wolfcrypt/src/src_libwolfssl_la-coding.lo
-@BUILD_ARMASM_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_POLY1305_TRUE@am__objects_57 = wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-poly1305.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_POLY1305_TRUE@am__objects_58 = wolfcrypt/src/src_libwolfssl_la-poly1305.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_TRUE@@BUILD_POLY1305_TRUE@am__objects_59 = wolfcrypt/src/src_libwolfssl_la-poly1305_asm.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_RC4_TRUE@am__objects_60 = wolfcrypt/src/src_libwolfssl_la-arc4.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_MD4_TRUE@am__objects_61 = wolfcrypt/src/src_libwolfssl_la-md4.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_MD5_TRUE@am__objects_62 = wolfcrypt/src/src_libwolfssl_la-md5.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_PWDBASED_TRUE@am__objects_63 = wolfcrypt/src/src_libwolfssl_la-pwdbased.lo \
-@BUILD_FIPS_RAND_FALSE@@BUILD_PWDBASED_TRUE@ wolfcrypt/src/src_libwolfssl_la-pkcs12.lo
-@BUILD_DSA_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_64 = wolfcrypt/src/src_libwolfssl_la-dsa.lo
-@BUILD_AESNI_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_65 = wolfcrypt/src/src_libwolfssl_la-aes_asm.lo \
-@BUILD_AESNI_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@ wolfcrypt/src/src_libwolfssl_la-aes_gcm_asm.lo
-@BUILD_CAMELLIA_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_66 = wolfcrypt/src/src_libwolfssl_la-camellia.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_MD2_TRUE@am__objects_67 = wolfcrypt/src/src_libwolfssl_la-md2.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_RIPEMD_TRUE@am__objects_68 = wolfcrypt/src/src_libwolfssl_la-ripemd.lo
-@BUILD_BLAKE2_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_69 = wolfcrypt/src/src_libwolfssl_la-blake2b.lo
-@BUILD_BLAKE2S_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_70 = wolfcrypt/src/src_libwolfssl_la-blake2s.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_HC128_TRUE@am__objects_71 = wolfcrypt/src/src_libwolfssl_la-hc128.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_RABBIT_TRUE@am__objects_72 = wolfcrypt/src/src_libwolfssl_la-rabbit.lo
-@BUILD_ARMASM_TRUE@@BUILD_CHACHA_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_73 = wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-chacha.lo
-@BUILD_ARMASM_FALSE@@BUILD_CHACHA_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_74 = wolfcrypt/src/src_libwolfssl_la-chacha.lo
-@BUILD_ARMASM_FALSE@@BUILD_CHACHA_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_TRUE@am__objects_75 = wolfcrypt/src/src_libwolfssl_la-chacha_asm.lo
-@BUILD_CHACHA_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_POLY1305_TRUE@am__objects_76 = wolfcrypt/src/src_libwolfssl_la-chacha20_poly1305.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_INLINE_FALSE@am__objects_77 = wolfcrypt/src/src_libwolfssl_la-misc.lo
-@BUILD_FASTMATH_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_78 = wolfcrypt/src/src_libwolfssl_la-tfm.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_SLOWMATH_TRUE@am__objects_79 = wolfcrypt/src/src_libwolfssl_la-integer.lo
-@BUILD_ECC_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_FIPS_V2_FALSE@am__objects_80 = wolfcrypt/src/src_libwolfssl_la-ecc.lo
-@BUILD_CURVE25519_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_81 = wolfcrypt/src/src_libwolfssl_la-curve25519.lo
-@BUILD_ED25519_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_82 = wolfcrypt/src/src_libwolfssl_la-ed25519.lo
-@BUILD_CURVE25519_SMALL_TRUE@@BUILD_FEMATH_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_83 = wolfcrypt/src/src_libwolfssl_la-fe_low_mem.lo
-@BUILD_CURVE25519_SMALL_FALSE@@BUILD_FEMATH_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_TRUE@am__objects_84 = wolfcrypt/src/src_libwolfssl_la-fe_x25519_asm.lo
-@BUILD_ARMASM_TRUE@@BUILD_CURVE25519_SMALL_FALSE@@BUILD_FEMATH_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_FALSE@am__objects_85 = wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-curve25519.lo \
-@BUILD_ARMASM_TRUE@@BUILD_CURVE25519_SMALL_FALSE@@BUILD_FEMATH_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_FALSE@ wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-curve25519.lo
-@BUILD_ARMASM_FALSE@@BUILD_CURVE25519_SMALL_FALSE@@BUILD_FEMATH_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_INTELASM_FALSE@am__objects_86 = wolfcrypt/src/src_libwolfssl_la-fe_operations.lo
-@BUILD_ED25519_SMALL_TRUE@@BUILD_FIPS_RAND_FALSE@@BUILD_GEMATH_TRUE@am__objects_87 = wolfcrypt/src/src_libwolfssl_la-ge_low_mem.lo
-@BUILD_ED25519_SMALL_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_GEMATH_TRUE@am__objects_88 = wolfcrypt/src/src_libwolfssl_la-ge_operations.lo
-@BUILD_ED25519_SMALL_FALSE@@BUILD_FEMATH_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_GEMATH_TRUE@@BUILD_INTELASM_TRUE@am__objects_89 = wolfcrypt/src/src_libwolfssl_la-fe_x25519_asm.lo
-@BUILD_ARMASM_TRUE@@BUILD_ED25519_SMALL_FALSE@@BUILD_FEMATH_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_GEMATH_TRUE@@BUILD_INTELASM_FALSE@am__objects_90 = wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-curve25519.lo
-@BUILD_ARMASM_FALSE@@BUILD_ED25519_SMALL_FALSE@@BUILD_FEMATH_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_GEMATH_TRUE@@BUILD_INTELASM_FALSE@am__objects_91 = wolfcrypt/src/src_libwolfssl_la-fe_operations.lo
-@BUILD_CURVE448_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_92 = wolfcrypt/src/src_libwolfssl_la-curve448.lo
-@BUILD_ED448_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_93 = wolfcrypt/src/src_libwolfssl_la-ed448.lo
-@BUILD_FE448_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_94 = wolfcrypt/src/src_libwolfssl_la-fe_448.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_GE448_TRUE@am__objects_95 = wolfcrypt/src/src_libwolfssl_la-ge_448.lo
-@BUILD_FE448_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_GE448_TRUE@am__objects_96 = wolfcrypt/src/src_libwolfssl_la-fe_448.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_LIBZ_TRUE@am__objects_97 = wolfcrypt/src/src_libwolfssl_la-compress.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_PKCS7_TRUE@am__objects_98 = wolfcrypt/src/src_libwolfssl_la-pkcs7.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_SRP_TRUE@am__objects_99 = wolfcrypt/src/src_libwolfssl_la-srp.lo
-@BUILD_FIPS_RAND_FALSE@@BUILD_IDEA_TRUE@am__objects_100 = wolfcrypt/src/src_libwolfssl_la-idea.lo
-@BUILD_AFALG_TRUE@@BUILD_FIPS_RAND_FALSE@am__objects_101 = wolfcrypt/src/port/af_alg/src_libwolfssl_la-wc_afalg.lo
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@am__objects_102 = src/libwolfssl_la-internal.lo \
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@ src/libwolfssl_la-wolfio.lo \
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@ src/libwolfssl_la-keys.lo \
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@ src/libwolfssl_la-ssl.lo \
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@ src/libwolfssl_la-tls.lo
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_TLS13_TRUE@am__objects_103 = src/libwolfssl_la-tls13.lo
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_OCSP_TRUE@am__objects_104 = src/libwolfssl_la-ocsp.lo
-@BUILD_CRL_TRUE@@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@am__objects_105 = src/libwolfssl_la-crl.lo
-@BUILD_CRYPTONLY_FALSE@@BUILD_FIPS_RAND_FALSE@@BUILD_SNIFFER_TRUE@am__objects_106 = src/libwolfssl_la-sniffer.lo
-@BUILD_CRYPTOCB_TRUE@am__objects_107 = wolfcrypt/src/src_libwolfssl_la-cryptocb.lo
-@BUILD_PKCS11_TRUE@am__objects_108 = wolfcrypt/src/src_libwolfssl_la-wc_pkcs11.lo
-@BUILD_DEVCRYPTO_TRUE@am__objects_109 = wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_hash.lo \
-@BUILD_DEVCRYPTO_TRUE@ wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_aes.lo \
-@BUILD_DEVCRYPTO_TRUE@ wolfcrypt/src/port/devcrypto/src_libwolfssl_la-wc_devcrypto.lo
-@BUILD_CAVIUM_TRUE@am__objects_110 = wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_nitrox.lo
-@BUILD_OCTEON_SYNC_TRUE@am__objects_111 = wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_octeon_sync.lo
-@BUILD_INTEL_QA_TRUE@am__objects_112 = wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist.lo \
-@BUILD_INTEL_QA_TRUE@ wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_mem.lo
-@BUILD_INTEL_QA_SYNC_TRUE@am__objects_113 = wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_sync.lo
-@BUILD_CRYPTOAUTHLIB_TRUE@am__objects_114 = wolfcrypt/src/port/atmel/src_libwolfssl_la-atmel.lo
-am_src_libwolfssl_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
- $(am__objects_3) $(am__objects_4) $(am__objects_5) \
- $(am__objects_6) $(am__objects_7) $(am__objects_8) \
- $(am__objects_9) $(am__objects_10) $(am__objects_11) \
- $(am__objects_12) $(am__objects_13) $(am__objects_14) \
- $(am__objects_15) $(am__objects_16) $(am__objects_17) \
- $(am__objects_18) $(am__objects_19) $(am__objects_20) \
- $(am__objects_21) $(am__objects_22) $(am__objects_23) \
- $(am__objects_24) $(am__objects_25) \
- wolfcrypt/src/src_libwolfssl_la-hash.lo \
- wolfcrypt/src/src_libwolfssl_la-cpuid.lo $(am__objects_26) \
- $(am__objects_27) $(am__objects_28) $(am__objects_29) \
- $(am__objects_30) $(am__objects_31) $(am__objects_32) \
- $(am__objects_33) $(am__objects_34) $(am__objects_35) \
- $(am__objects_36) $(am__objects_37) $(am__objects_38) \
- $(am__objects_39) $(am__objects_40) $(am__objects_41) \
- $(am__objects_42) $(am__objects_43) $(am__objects_44) \
- $(am__objects_45) $(am__objects_46) $(am__objects_47) \
- $(am__objects_48) $(am__objects_49) $(am__objects_50) \
- $(am__objects_51) wolfcrypt/src/src_libwolfssl_la-logging.lo \
- wolfcrypt/src/src_libwolfssl_la-wc_port.lo \
- wolfcrypt/src/src_libwolfssl_la-error.lo $(am__objects_52) \
- $(am__objects_53) $(am__objects_54) $(am__objects_55) \
- $(am__objects_56) $(am__objects_57) $(am__objects_58) \
- $(am__objects_59) $(am__objects_60) $(am__objects_61) \
- $(am__objects_62) $(am__objects_63) $(am__objects_64) \
- $(am__objects_65) $(am__objects_66) $(am__objects_67) \
- $(am__objects_68) $(am__objects_69) $(am__objects_70) \
- $(am__objects_71) $(am__objects_72) $(am__objects_73) \
- $(am__objects_74) $(am__objects_75) $(am__objects_76) \
- $(am__objects_77) $(am__objects_78) $(am__objects_79) \
- $(am__objects_80) $(am__objects_81) $(am__objects_82) \
- $(am__objects_83) $(am__objects_84) $(am__objects_85) \
- $(am__objects_86) $(am__objects_87) $(am__objects_88) \
- $(am__objects_89) $(am__objects_90) $(am__objects_91) \
- $(am__objects_92) $(am__objects_93) $(am__objects_94) \
- $(am__objects_95) $(am__objects_96) $(am__objects_97) \
- $(am__objects_98) $(am__objects_99) $(am__objects_100) \
- $(am__objects_101) $(am__objects_102) $(am__objects_103) \
- $(am__objects_104) $(am__objects_105) $(am__objects_106) \
- $(am__objects_107) $(am__objects_108) $(am__objects_109) \
- $(am__objects_110) $(am__objects_111) $(am__objects_112) \
- $(am__objects_113) $(am__objects_114)
-src_libwolfssl_la_OBJECTS = $(am_src_libwolfssl_la_OBJECTS)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 =
-src_libwolfssl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(src_libwolfssl_la_CFLAGS) $(CFLAGS) \
- $(src_libwolfssl_la_LDFLAGS) $(LDFLAGS) -o $@
-am__examples_benchmark_tls_bench_SOURCES_DIST = \
- examples/benchmark/tls_bench.c
-@BUILD_THREADED_EXAMPLES_TRUE@am_examples_benchmark_tls_bench_OBJECTS = examples/benchmark/tls_bench.$(OBJEXT)
-examples_benchmark_tls_bench_OBJECTS = \
- $(am_examples_benchmark_tls_bench_OBJECTS)
-am__examples_client_client_SOURCES_DIST = examples/client/client.c
-@BUILD_EXAMPLE_CLIENTS_TRUE@am_examples_client_client_OBJECTS = \
-@BUILD_EXAMPLE_CLIENTS_TRUE@ examples/client/client.$(OBJEXT)
-examples_client_client_OBJECTS = $(am_examples_client_client_OBJECTS)
-am__examples_echoclient_echoclient_SOURCES_DIST = \
- examples/echoclient/echoclient.c
-@BUILD_EXAMPLE_CLIENTS_TRUE@am_examples_echoclient_echoclient_OBJECTS = examples/echoclient/echoclient.$(OBJEXT)
-examples_echoclient_echoclient_OBJECTS = \
- $(am_examples_echoclient_echoclient_OBJECTS)
-am__examples_echoserver_echoserver_SOURCES_DIST = \
- examples/echoserver/echoserver.c
-@BUILD_EXAMPLE_SERVERS_TRUE@am_examples_echoserver_echoserver_OBJECTS = examples/echoserver/echoserver.$(OBJEXT)
-examples_echoserver_echoserver_OBJECTS = \
- $(am_examples_echoserver_echoserver_OBJECTS)
-am__examples_sctp_sctp_client_SOURCES_DIST = \
- examples/sctp/sctp-client.c
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@am_examples_sctp_sctp_client_OBJECTS = examples/sctp/sctp-client.$(OBJEXT)
-examples_sctp_sctp_client_OBJECTS = \
- $(am_examples_sctp_sctp_client_OBJECTS)
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_client_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__examples_sctp_sctp_client_dtls_SOURCES_DIST = \
- examples/sctp/sctp-client-dtls.c
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@am_examples_sctp_sctp_client_dtls_OBJECTS = examples/sctp/sctp-client-dtls.$(OBJEXT)
-examples_sctp_sctp_client_dtls_OBJECTS = \
- $(am_examples_sctp_sctp_client_dtls_OBJECTS)
-am__examples_sctp_sctp_server_SOURCES_DIST = \
- examples/sctp/sctp-server.c
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@am_examples_sctp_sctp_server_OBJECTS = examples/sctp/sctp-server.$(OBJEXT)
-examples_sctp_sctp_server_OBJECTS = \
- $(am_examples_sctp_sctp_server_OBJECTS)
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_server_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__examples_sctp_sctp_server_dtls_SOURCES_DIST = \
- examples/sctp/sctp-server-dtls.c
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@am_examples_sctp_sctp_server_dtls_OBJECTS = examples/sctp/sctp-server-dtls.$(OBJEXT)
-examples_sctp_sctp_server_dtls_OBJECTS = \
- $(am_examples_sctp_sctp_server_dtls_OBJECTS)
-am__examples_server_server_SOURCES_DIST = examples/server/server.c
-@BUILD_EXAMPLE_SERVERS_TRUE@am_examples_server_server_OBJECTS = \
-@BUILD_EXAMPLE_SERVERS_TRUE@ examples/server/server.$(OBJEXT)
-examples_server_server_OBJECTS = $(am_examples_server_server_OBJECTS)
-am__mcapi_test_SOURCES_DIST = mcapi/crypto.c mcapi/mcapi_test.c
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@am_mcapi_test_OBJECTS = \
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@ mcapi/crypto.$(OBJEXT) \
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@ mcapi/mcapi_test.$(OBJEXT)
-mcapi_test_OBJECTS = $(am_mcapi_test_OBJECTS)
-am__sslSniffer_sslSnifferTest_snifftest_SOURCES_DIST = \
- sslSniffer/sslSnifferTest/snifftest.c
-@BUILD_SNIFFTEST_TRUE@am_sslSniffer_sslSnifferTest_snifftest_OBJECTS = sslSniffer/sslSnifferTest/snifftest.$(OBJEXT)
-sslSniffer_sslSnifferTest_snifftest_OBJECTS = \
- $(am_sslSniffer_sslSnifferTest_snifftest_OBJECTS)
-am__tests_unit_test_SOURCES_DIST = tests/unit.c tests/api.c \
- tests/suites.c tests/hash.c tests/srp.c \
- examples/client/client.c examples/server/server.c
-@BUILD_TESTS_TRUE@am_tests_unit_test_OBJECTS = \
-@BUILD_TESTS_TRUE@ tests/unit_test-unit.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ tests/unit_test-api.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ tests/unit_test-suites.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ tests/unit_test-hash.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ tests/unit_test-srp.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ examples/client/tests_unit_test-client.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ examples/server/tests_unit_test-server.$(OBJEXT)
-tests_unit_test_OBJECTS = $(am_tests_unit_test_OBJECTS)
-tests_unit_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(tests_unit_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am__testsuite_testsuite_test_SOURCES_DIST = wolfcrypt/test/test.c \
- examples/client/client.c examples/echoclient/echoclient.c \
- examples/echoserver/echoserver.c examples/server/server.c \
- testsuite/testsuite.c
-@BUILD_TESTS_TRUE@am_testsuite_testsuite_test_OBJECTS = wolfcrypt/test/testsuite_testsuite_test-test.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ examples/client/testsuite_testsuite_test-client.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ examples/echoclient/testsuite_testsuite_test-echoclient.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ examples/echoserver/testsuite_testsuite_test-echoserver.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ examples/server/testsuite_testsuite_test-server.$(OBJEXT) \
-@BUILD_TESTS_TRUE@ testsuite/testsuite_test-testsuite.$(OBJEXT)
-testsuite_testsuite_test_OBJECTS = \
- $(am_testsuite_testsuite_test_OBJECTS)
-testsuite_testsuite_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-am__wolfcrypt_benchmark_benchmark_SOURCES_DIST = \
- wolfcrypt/benchmark/benchmark.c
-@BUILD_WOLFCRYPT_TESTS_TRUE@am_wolfcrypt_benchmark_benchmark_OBJECTS = wolfcrypt/benchmark/benchmark.$(OBJEXT)
-wolfcrypt_benchmark_benchmark_OBJECTS = \
- $(am_wolfcrypt_benchmark_benchmark_OBJECTS)
-am__wolfcrypt_test_testwolfcrypt_SOURCES_DIST = wolfcrypt/test/test.c
-@BUILD_WOLFCRYPT_TESTS_TRUE@am_wolfcrypt_test_testwolfcrypt_OBJECTS = \
-@BUILD_WOLFCRYPT_TESTS_TRUE@ wolfcrypt/test/test.$(OBJEXT)
-wolfcrypt_test_testwolfcrypt_OBJECTS = \
- $(am_wolfcrypt_test_testwolfcrypt_OBJECTS)
-am__dist_noinst_SCRIPTS_DIST = scripts/sniffer-testsuite.test \
- scripts/resume.test scripts/crl-revoked.test \
- scripts/ocsp-stapling.test \
- scripts/ocsp-stapling-with-ca-as-responder.test \
- scripts/ocsp-stapling2.test scripts/psk.test \
- scripts/trusted_peer.test scripts/pkcallbacks.test \
- scripts/tls13.test scripts/external.test scripts/google.test \
- scripts/openssl.test scripts/ocsp.test
-SCRIPTS = $(dist_noinst_SCRIPTS) $(noinst_SCRIPTS)
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-am__v_GEN_1 =
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Plo \
- ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Plo \
- examples/benchmark/$(DEPDIR)/tls_bench.Po \
- examples/client/$(DEPDIR)/client.Po \
- examples/client/$(DEPDIR)/tests_unit_test-client.Po \
- examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po \
- examples/echoclient/$(DEPDIR)/echoclient.Po \
- examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po \
- examples/echoserver/$(DEPDIR)/echoserver.Po \
- examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po \
- examples/sctp/$(DEPDIR)/sctp-client-dtls.Po \
- examples/sctp/$(DEPDIR)/sctp-client.Po \
- examples/sctp/$(DEPDIR)/sctp-server-dtls.Po \
- examples/sctp/$(DEPDIR)/sctp-server.Po \
- examples/server/$(DEPDIR)/server.Po \
- examples/server/$(DEPDIR)/tests_unit_test-server.Po \
- examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po \
- mcapi/$(DEPDIR)/crypto.Po mcapi/$(DEPDIR)/mcapi_test.Po \
- src/$(DEPDIR)/libwolfssl_la-crl.Plo \
- src/$(DEPDIR)/libwolfssl_la-internal.Plo \
- src/$(DEPDIR)/libwolfssl_la-keys.Plo \
- src/$(DEPDIR)/libwolfssl_la-ocsp.Plo \
- src/$(DEPDIR)/libwolfssl_la-sniffer.Plo \
- src/$(DEPDIR)/libwolfssl_la-ssl.Plo \
- src/$(DEPDIR)/libwolfssl_la-tls.Plo \
- src/$(DEPDIR)/libwolfssl_la-tls13.Plo \
- src/$(DEPDIR)/libwolfssl_la-wolfio.Plo \
- sslSniffer/sslSnifferTest/$(DEPDIR)/snifftest.Po \
- tests/$(DEPDIR)/unit_test-api.Po \
- tests/$(DEPDIR)/unit_test-hash.Po \
- tests/$(DEPDIR)/unit_test-srp.Po \
- tests/$(DEPDIR)/unit_test-suites.Po \
- tests/$(DEPDIR)/unit_test-unit.Po \
- testsuite/$(DEPDIR)/testsuite_test-testsuite.Po \
- wolfcrypt/benchmark/$(DEPDIR)/benchmark.Po \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_asm.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_gcm_asm.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-arc4.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-asn.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-async.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2b.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2s.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-camellia.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha20_poly1305.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha_asm.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cmac.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-coding.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-compress.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cpuid.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cryptocb.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve25519.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve448.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dh.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dsa.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ecc.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed25519.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed448.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-error.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_448.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_low_mem.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_operations.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_x25519_asm.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_448.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_low_mem.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_operations.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hash.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hc128.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-idea.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-integer.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-logging.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md2.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md4.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md5.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-memory.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-misc.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs12.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs7.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305_asm.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pwdbased.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rabbit.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ripemd.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-selftest.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256_asm.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha3.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512_asm.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-signature.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm32.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm64.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_armthumb.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c32.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c64.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_cortexm.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_int.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64_asm.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-srp.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-tfm.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_encrypt.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_pkcs11.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_port.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfevent.Plo \
- wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfmath.Plo \
- wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_aes.Plo \
- wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_hash.Plo \
- wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-wc_afalg.Plo \
- wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-curve25519.Plo \
- wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-sha512-asm.Plo \
- wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-aes.Plo \
- wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-chacha.Plo \
- wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-curve25519.Plo \
- wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-poly1305.Plo \
- wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha256.Plo \
- wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512-asm.Plo \
- wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512.Plo \
- wolfcrypt/src/port/atmel/$(DEPDIR)/src_libwolfssl_la-atmel.Plo \
- wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_nitrox.Plo \
- wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_octeon_sync.Plo \
- wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_aes.Plo \
- wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_hash.Plo \
- wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-wc_devcrypto.Plo \
- wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist.Plo \
- wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_mem.Plo \
- wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_sync.Plo \
- wolfcrypt/test/$(DEPDIR)/test.Po \
- wolfcrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po \
- wolfcrypt/user-crypto/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo
-am__mv = mv -f
-CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
-LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CCASFLAGS) $(CCASFLAGS)
-AM_V_CPPAS = $(am__v_CPPAS_@AM_V@)
-am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@)
-am__v_CPPAS_0 = @echo " CPPAS " $@;
-am__v_CPPAS_1 =
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-am__v_CC_1 =
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-am__v_CCLD_1 =
-SOURCES = $(src_libwolfssl_la_SOURCES) \
- $(examples_benchmark_tls_bench_SOURCES) \
- $(examples_client_client_SOURCES) \
- $(examples_echoclient_echoclient_SOURCES) \
- $(examples_echoserver_echoserver_SOURCES) \
- $(examples_sctp_sctp_client_SOURCES) \
- $(examples_sctp_sctp_client_dtls_SOURCES) \
- $(examples_sctp_sctp_server_SOURCES) \
- $(examples_sctp_sctp_server_dtls_SOURCES) \
- $(examples_server_server_SOURCES) $(mcapi_test_SOURCES) \
- $(sslSniffer_sslSnifferTest_snifftest_SOURCES) \
- $(tests_unit_test_SOURCES) $(testsuite_testsuite_test_SOURCES) \
- $(wolfcrypt_benchmark_benchmark_SOURCES) \
- $(wolfcrypt_test_testwolfcrypt_SOURCES)
-DIST_SOURCES = $(am__src_libwolfssl_la_SOURCES_DIST) \
- $(am__examples_benchmark_tls_bench_SOURCES_DIST) \
- $(am__examples_client_client_SOURCES_DIST) \
- $(am__examples_echoclient_echoclient_SOURCES_DIST) \
- $(am__examples_echoserver_echoserver_SOURCES_DIST) \
- $(am__examples_sctp_sctp_client_SOURCES_DIST) \
- $(am__examples_sctp_sctp_client_dtls_SOURCES_DIST) \
- $(am__examples_sctp_sctp_server_SOURCES_DIST) \
- $(am__examples_sctp_sctp_server_dtls_SOURCES_DIST) \
- $(am__examples_server_server_SOURCES_DIST) \
- $(am__mcapi_test_SOURCES_DIST) \
- $(am__sslSniffer_sslSnifferTest_snifftest_SOURCES_DIST) \
- $(am__tests_unit_test_SOURCES_DIST) \
- $(am__testsuite_testsuite_test_SOURCES_DIST) \
- $(am__wolfcrypt_benchmark_benchmark_SOURCES_DIST) \
- $(am__wolfcrypt_test_testwolfcrypt_SOURCES_DIST)
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-DATA = $(dist_doc_DATA) $(dist_example_DATA) $(ipp_DATA) \
- $(pkgconfig_DATA)
-am__include_HEADERS_DIST = @IPPHEADERS@ \
- wolfcrypt/user-crypto/include/user_rsa.h
-am__nobase_include_HEADERS_DIST = cyassl/ctaocrypt/aes.h \
- cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/asn.h \
- cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/poly1305.h \
- cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/coding.h \
- cyassl/ctaocrypt/compress.h cyassl/ctaocrypt/des3.h \
- cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h \
- cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/error-crypt.h \
- cyassl/ctaocrypt/fips_test.h cyassl/ctaocrypt/hc128.h \
- cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/integer.h \
- cyassl/ctaocrypt/md2.h cyassl/ctaocrypt/md4.h \
- cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/misc.h \
- cyassl/ctaocrypt/pkcs7.h cyassl/ctaocrypt/wc_port.h \
- cyassl/ctaocrypt/pwdbased.h cyassl/ctaocrypt/rabbit.h \
- cyassl/ctaocrypt/chacha.h cyassl/ctaocrypt/random.h \
- cyassl/ctaocrypt/ripemd.h cyassl/ctaocrypt/rsa.h \
- cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/settings_comp.h \
- cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/sha512.h \
- cyassl/ctaocrypt/sha.h cyassl/ctaocrypt/blake2.h \
- cyassl/ctaocrypt/blake2-int.h cyassl/ctaocrypt/blake2-impl.h \
- cyassl/ctaocrypt/tfm.h cyassl/ctaocrypt/types.h \
- cyassl/ctaocrypt/visibility.h cyassl/ctaocrypt/logging.h \
- cyassl/ctaocrypt/memory.h cyassl/ctaocrypt/mpi_class.h \
- cyassl/ctaocrypt/mpi_superclass.h cyassl/openssl/asn1.h \
- cyassl/openssl/bio.h cyassl/openssl/bn.h cyassl/openssl/conf.h \
- cyassl/openssl/crypto.h cyassl/openssl/des.h \
- cyassl/openssl/dh.h cyassl/openssl/dsa.h \
- cyassl/openssl/ecdsa.h cyassl/openssl/ecdh.h \
- cyassl/openssl/ec.h cyassl/openssl/ec25519.h \
- cyassl/openssl/ed25519.h cyassl/openssl/ec448.h \
- cyassl/openssl/ed448.h cyassl/openssl/engine.h \
- cyassl/openssl/err.h cyassl/openssl/evp.h \
- cyassl/openssl/hmac.h cyassl/openssl/lhash.h \
- cyassl/openssl/md4.h cyassl/openssl/md5.h \
- cyassl/openssl/ripemd.h cyassl/openssl/ocsp.h \
- cyassl/openssl/opensslconf.h cyassl/openssl/opensslv.h \
- cyassl/openssl/ossl_typ.h cyassl/openssl/pem.h \
- cyassl/openssl/pkcs12.h cyassl/openssl/rand.h \
- cyassl/openssl/rsa.h cyassl/openssl/sha.h \
- cyassl/openssl/ssl23.h cyassl/openssl/ssl.h \
- cyassl/openssl/stack.h cyassl/openssl/ui.h \
- cyassl/openssl/x509.h cyassl/openssl/x509v3.h \
- cyassl/error-ssl.h cyassl/ssl.h cyassl/sniffer_error.h \
- cyassl/sniffer.h cyassl/callbacks.h cyassl/certs_test.h \
- cyassl/test.h cyassl/version.h cyassl/ocsp.h cyassl/crl.h \
- cyassl/options.h wolfssl/wolfcrypt/aes.h \
- wolfssl/wolfcrypt/arc4.h wolfssl/wolfcrypt/asn.h \
- wolfssl/wolfcrypt/asn_public.h wolfssl/wolfcrypt/poly1305.h \
- wolfssl/wolfcrypt/camellia.h wolfssl/wolfcrypt/cmac.h \
- wolfssl/wolfcrypt/coding.h wolfssl/wolfcrypt/compress.h \
- wolfssl/wolfcrypt/des3.h wolfssl/wolfcrypt/dh.h \
- wolfssl/wolfcrypt/dsa.h wolfssl/wolfcrypt/ecc.h \
- wolfssl/wolfcrypt/curve25519.h wolfssl/wolfcrypt/ed25519.h \
- wolfssl/wolfcrypt/fe_operations.h \
- wolfssl/wolfcrypt/ge_operations.h wolfssl/wolfcrypt/curve448.h \
- wolfssl/wolfcrypt/ed448.h wolfssl/wolfcrypt/fe_448.h \
- wolfssl/wolfcrypt/ge_448.h wolfssl/wolfcrypt/error-crypt.h \
- wolfssl/wolfcrypt/fips_test.h wolfssl/wolfcrypt/hash.h \
- wolfssl/wolfcrypt/hc128.h wolfssl/wolfcrypt/hmac.h \
- wolfssl/wolfcrypt/integer.h wolfssl/wolfcrypt/md2.h \
- wolfssl/wolfcrypt/md4.h wolfssl/wolfcrypt/md5.h \
- wolfssl/wolfcrypt/misc.h wolfssl/wolfcrypt/pkcs7.h \
- wolfssl/wolfcrypt/wc_encrypt.h wolfssl/wolfcrypt/wc_port.h \
- wolfssl/wolfcrypt/pwdbased.h wolfssl/wolfcrypt/rabbit.h \
- wolfssl/wolfcrypt/chacha.h \
- wolfssl/wolfcrypt/chacha20_poly1305.h \
- wolfssl/wolfcrypt/random.h wolfssl/wolfcrypt/ripemd.h \
- wolfssl/wolfcrypt/rsa.h wolfssl/wolfcrypt/settings.h \
- wolfssl/wolfcrypt/sha256.h wolfssl/wolfcrypt/sha512.h \
- wolfssl/wolfcrypt/sha.h wolfssl/wolfcrypt/signature.h \
- wolfssl/wolfcrypt/blake2.h wolfssl/wolfcrypt/blake2-int.h \
- wolfssl/wolfcrypt/blake2-impl.h wolfssl/wolfcrypt/tfm.h \
- wolfssl/wolfcrypt/srp.h wolfssl/wolfcrypt/idea.h \
- wolfssl/wolfcrypt/types.h wolfssl/wolfcrypt/visibility.h \
- wolfssl/wolfcrypt/logging.h wolfssl/wolfcrypt/memory.h \
- wolfssl/wolfcrypt/mpi_class.h \
- wolfssl/wolfcrypt/mpi_superclass.h \
- wolfssl/wolfcrypt/mem_track.h wolfssl/wolfcrypt/wolfevent.h \
- wolfssl/wolfcrypt/pkcs12.h wolfssl/wolfcrypt/wolfmath.h \
- wolfssl/wolfcrypt/sha3.h wolfssl/wolfcrypt/cpuid.h \
- wolfssl/wolfcrypt/cryptocb.h \
- wolfssl/wolfcrypt/port/atmel/atmel.h \
- wolfssl/wolfcrypt/port/af_alg/afalg_hash.h \
- wolfssl/wolfcrypt/port/af_alg/wc_afalg.h \
- wolfssl/wolfcrypt/port/devcrypto/wc_devcrypto.h \
- wolfssl/wolfcrypt/async.h wolfssl/wolfcrypt/wc_pkcs11.h \
- wolfssl/wolfcrypt/pkcs11.h \
- wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h \
- wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h \
- wolfssl/wolfcrypt/port/intel/quickassist.h \
- wolfssl/wolfcrypt/port/intel/quickassist_mem.h \
- wolfssl/wolfcrypt/port/intel/quickassist_sync.h \
- wolfssl/wolfcrypt/sp.h wolfssl/wolfcrypt/sp_int.h \
- wolfssl/wolfcrypt/selftest.h wolfssl/wolfcrypt/fips.h \
- wolfssl/openssl/asn1.h wolfssl/openssl/asn1t.h \
- wolfssl/openssl/aes.h wolfssl/openssl/bio.h \
- wolfssl/openssl/bn.h wolfssl/openssl/buffer.h \
- wolfssl/openssl/conf.h wolfssl/openssl/crypto.h \
- wolfssl/openssl/des.h wolfssl/openssl/dh.h \
- wolfssl/openssl/dsa.h wolfssl/openssl/ecdsa.h \
- wolfssl/openssl/ecdh.h wolfssl/openssl/ec.h \
- wolfssl/openssl/ec25519.h wolfssl/openssl/ed25519.h \
- wolfssl/openssl/ec448.h wolfssl/openssl/ed448.h \
- wolfssl/openssl/engine.h wolfssl/openssl/err.h \
- wolfssl/openssl/evp.h wolfssl/openssl/hmac.h \
- wolfssl/openssl/lhash.h wolfssl/openssl/md4.h \
- wolfssl/openssl/md5.h wolfssl/openssl/ripemd.h \
- wolfssl/openssl/obj_mac.h wolfssl/openssl/objects.h \
- wolfssl/openssl/ocsp.h wolfssl/openssl/opensslconf.h \
- wolfssl/openssl/opensslv.h wolfssl/openssl/ossl_typ.h \
- wolfssl/openssl/pem.h wolfssl/openssl/pkcs12.h \
- wolfssl/openssl/pkcs7.h wolfssl/openssl/rand.h \
- wolfssl/openssl/rsa.h wolfssl/openssl/sha.h \
- wolfssl/openssl/sha3.h wolfssl/openssl/ssl23.h \
- wolfssl/openssl/ssl.h wolfssl/openssl/stack.h \
- wolfssl/openssl/tls1.h wolfssl/openssl/ui.h \
- wolfssl/openssl/x509.h wolfssl/openssl/x509_vfy.h \
- wolfssl/openssl/x509v3.h wolfssl/openssl/rc4.h \
- wolfssl/error-ssl.h wolfssl/ssl.h wolfssl/sniffer_error.h \
- wolfssl/sniffer.h wolfssl/callbacks.h wolfssl/certs_test.h \
- wolfssl/test.h wolfssl/version.h wolfssl/ocsp.h wolfssl/crl.h \
- wolfssl/wolfio.h wolfssl/options.h
-am__noinst_HEADERS_DIST = cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h \
- cyassl/internal.h cyassl/options.h \
- wolfssl/wolfcrypt/port/pic32/pic32mz-crypt.h \
- wolfssl/wolfcrypt/port/ti/ti-hash.h \
- wolfssl/wolfcrypt/port/ti/ti-ccm.h \
- wolfssl/wolfcrypt/port/nrf51.h \
- wolfssl/wolfcrypt/port/nxp/ksdk_port.h \
- wolfssl/wolfcrypt/port/xilinx/xil-sha3.h \
- wolfssl/wolfcrypt/port/caam/caam_driver.h \
- wolfssl/wolfcrypt/port/caam/wolfcaam.h \
- wolfssl/wolfcrypt/port/caam/wolfcaam_sha.h \
- wolfssl/wolfcrypt/port/st/stm32.h \
- wolfssl/wolfcrypt/port/st/stsafe.h \
- wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h \
- wolfssl/wolfcrypt/port/arm/cryptoCell.h \
- wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h \
- wolfssl/wolfcrypt/port/cypress/psoc6_crypto.h \
- wolfssl/internal.h wolfssl/options.h \
- wolfcrypt/benchmark/benchmark.h wolfcrypt/test/test.h \
- examples/benchmark/tls_bench.h examples/client/client.h \
- examples/echoclient/echoclient.h \
- examples/echoserver/echoserver.h examples/server/server.h \
- mcapi/crypto.h
-HEADERS = $(include_HEADERS) $(nobase_include_HEADERS) \
- $(noinst_HEADERS)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
- config.in
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates. Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
- BEGIN { nonempty = 0; } \
- { items[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique. This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
- list='$(am__tagged_files)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-CSCOPE = cscope
-AM_RECURSIVE_TARGETS = cscope check recheck
-am__tty_colors_dummy = \
- mgn= red= grn= lgn= blu= brg= std=; \
- am__color_tests=no
-am__tty_colors = { \
- $(am__tty_colors_dummy); \
- if test "X$(AM_COLOR_TESTS)" = Xno; then \
- am__color_tests=no; \
- elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
- am__color_tests=yes; \
- elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
- am__color_tests=yes; \
- fi; \
- if test $$am__color_tests = yes; then \
- red='[0;31m'; \
- grn='[0;32m'; \
- lgn='[1;32m'; \
- blu='[1;34m'; \
- mgn='[0;35m'; \
- brg='[1m'; \
- std='[m'; \
- fi; \
-}
-am__recheck_rx = ^[ ]*:recheck:[ ]*
-am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
-am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
- recheck = 1; \
- while ((rc = (getline line < ($$0 ".trs"))) != 0) \
- { \
- if (rc < 0) \
- { \
- if ((getline line2 < ($$0 ".log")) < 0) \
- recheck = 0; \
- break; \
- } \
- else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
- { \
- recheck = 0; \
- break; \
- } \
- else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
- { \
- break; \
- } \
- }; \
- if (recheck) \
- print $$0; \
- close ($$0 ".trs"); \
- close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
- print "fatal: making $@: " msg | "cat >&2"; \
- exit 1; \
-} \
-function rst_section(header) \
-{ \
- print header; \
- len = length(header); \
- for (i = 1; i <= len; i = i + 1) \
- printf "="; \
- printf "\n\n"; \
-} \
-{ \
- copy_in_global_log = 1; \
- global_test_result = "RUN"; \
- while ((rc = (getline line < ($$0 ".trs"))) != 0) \
- { \
- if (rc < 0) \
- fatal("failed to read from " $$0 ".trs"); \
- if (line ~ /$(am__global_test_result_rx)/) \
- { \
- sub("$(am__global_test_result_rx)", "", line); \
- sub("[ ]*$$", "", line); \
- global_test_result = line; \
- } \
- else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
- copy_in_global_log = 0; \
- }; \
- if (copy_in_global_log) \
- { \
- rst_section(global_test_result ": " $$0); \
- while ((rc = (getline line < ($$0 ".log"))) != 0) \
- { \
- if (rc < 0) \
- fatal("failed to read from " $$0 ".log"); \
- print line; \
- }; \
- printf "\n"; \
- }; \
- close ($$0 ".trs"); \
- close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
- --color-tests "$$am__color_tests" \
- --enable-hard-errors "$$am__enable_hard_errors" \
- --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test. Creates the
-# directory for the log if needed. Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log. Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup); \
-$(am__vpath_adj_setup) $(am__vpath_adj) \
-$(am__tty_colors); \
-srcdir=$(srcdir); export srcdir; \
-case "$@" in \
- */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
- *) am__odir=.;; \
-esac; \
-test "x$$am__odir" = x"." || test -d "$$am__odir" \
- || $(MKDIR_P) "$$am__odir" || exit $$?; \
-if test -f "./$$f"; then dir=./; \
-elif test -f "$$f"; then dir=; \
-else dir="$(srcdir)/"; fi; \
-tst=$$dir$$f; log='$@'; \
-if test -n '$(DISABLE_HARD_ERRORS)'; then \
- am__enable_hard_errors=no; \
-else \
- am__enable_hard_errors=yes; \
-fi; \
-case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
- am__expect_failure=yes;; \
- *) \
- am__expect_failure=no;; \
-esac; \
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed). The result is saved in the shell variable
-# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
- bases='$(TEST_LOGS)'; \
- bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
- bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
-TEST_SUITE_LOG = test-suite.log
-LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
- case '$@' in \
- */*) \
- case '$*' in \
- */*) b='$*';; \
- *) b=`echo '$@' | sed 's/\.log$$//'`; \
- esac;; \
- *) \
- b='$*';; \
- esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
- $(TEST_LOG_FLAGS)
-am__DIST_COMMON = $(srcdir)/IDE/ARDUINO/include.am \
- $(srcdir)/IDE/CRYPTOCELL/include.am \
- $(srcdir)/IDE/CSBENCH/include.am \
- $(srcdir)/IDE/ECLIPSE/DEOS/include.am \
- $(srcdir)/IDE/ECLIPSE/MICRIUM/include.am \
- $(srcdir)/IDE/ECLIPSE/SIFIVE/include.am \
- $(srcdir)/IDE/GCC-ARM/include.am \
- $(srcdir)/IDE/HEXAGON/include.am \
- $(srcdir)/IDE/INTIME-RTOS/include.am \
- $(srcdir)/IDE/LINUX-SGX/include.am \
- $(srcdir)/IDE/M68K/include.am \
- $(srcdir)/IDE/RISCV/SIFIVE-HIFIVE1/include.am \
- $(srcdir)/IDE/RISCV/SIFIVE-UNLEASHED/include.am \
- $(srcdir)/IDE/RISCV/include.am \
- $(srcdir)/IDE/ROWLEY-CROSSWORKS-ARM/include.am \
- $(srcdir)/IDE/Renesas/cs+/Projects/include.am \
- $(srcdir)/IDE/Renesas/e2studio/DK-S7G2/include.am \
- $(srcdir)/IDE/Renesas/e2studio/GR-ROSE/include.am \
- $(srcdir)/IDE/Renesas/e2studio/Projects/include.am \
- $(srcdir)/IDE/Renesas/e2studio/RA6M3/include.am \
- $(srcdir)/IDE/Renesas/e2studio/RX72NEnvisionKit/include.am \
- $(srcdir)/IDE/STM32Cube/include.am \
- $(srcdir)/IDE/TRUESTUDIO/include.am \
- $(srcdir)/IDE/VS-ARM/include.am \
- $(srcdir)/IDE/VS-AZURE-SPHERE/include.am \
- $(srcdir)/IDE/WICED-STUDIO/include.am \
- $(srcdir)/IDE/WIN-SGX/include.am $(srcdir)/IDE/WIN/include.am \
- $(srcdir)/IDE/WIN10/include.am \
- $(srcdir)/IDE/WORKBENCH/include.am \
- $(srcdir)/IDE/XCODE/Benchmark/include.am \
- $(srcdir)/IDE/XCODE/include.am \
- $(srcdir)/IDE/XilinxSDK/include.am $(srcdir)/IDE/include.am \
- $(srcdir)/IDE/mynewt/include.am $(srcdir)/Makefile.in \
- $(srcdir)/certs/1024/include.am \
- $(srcdir)/certs/3072/include.am \
- $(srcdir)/certs/4096/include.am $(srcdir)/certs/crl/include.am \
- $(srcdir)/certs/ecc/include.am \
- $(srcdir)/certs/ed25519/include.am \
- $(srcdir)/certs/ed448/include.am \
- $(srcdir)/certs/external/include.am $(srcdir)/certs/include.am \
- $(srcdir)/certs/intermediate/include.am \
- $(srcdir)/certs/ocsp/include.am \
- $(srcdir)/certs/statickeys/include.am \
- $(srcdir)/certs/test-pathlen/include.am \
- $(srcdir)/certs/test/include.am $(srcdir)/config.in \
- $(srcdir)/cyassl/ctaocrypt/include.am \
- $(srcdir)/cyassl/include.am \
- $(srcdir)/cyassl/openssl/include.am $(srcdir)/doc/include.am \
- $(srcdir)/examples/benchmark/include.am \
- $(srcdir)/examples/client/include.am \
- $(srcdir)/examples/configs/include.am \
- $(srcdir)/examples/echoclient/include.am \
- $(srcdir)/examples/echoserver/include.am \
- $(srcdir)/examples/include.am \
- $(srcdir)/examples/sctp/include.am \
- $(srcdir)/examples/server/include.am \
- $(srcdir)/mcapi/include.am \
- $(srcdir)/mcapi/wolfcrypt_mcapi.X/nbproject/include.am \
- $(srcdir)/mcapi/wolfcrypt_test.X/nbproject/include.am \
- $(srcdir)/mcapi/wolfssl.X/nbproject/include.am \
- $(srcdir)/mcapi/zlib.X/nbproject/include.am \
- $(srcdir)/mplabx/include.am \
- $(srcdir)/mplabx/wolfcrypt_benchmark.X/nbproject/include.am \
- $(srcdir)/mplabx/wolfcrypt_test.X/nbproject/include.am \
- $(srcdir)/mplabx/wolfssl.X/nbproject/include.am \
- $(srcdir)/mqx/util_lib/Sources/include.am \
- $(srcdir)/mqx/wolfcrypt_benchmark/Sources/include.am \
- $(srcdir)/mqx/wolfcrypt_test/Sources/include.am \
- $(srcdir)/mqx/wolfssl/include.am \
- $(srcdir)/mqx/wolfssl_client/Sources/include.am \
- $(srcdir)/rpm/include.am $(srcdir)/scripts/include.am \
- $(srcdir)/src/include.am \
- $(srcdir)/sslSniffer/sslSnifferTest/include.am \
- $(srcdir)/stamp-h.in $(srcdir)/support/include.am \
- $(srcdir)/swig/include.am $(srcdir)/tests/include.am \
- $(srcdir)/testsuite/include.am $(srcdir)/tirtos/include.am \
- $(srcdir)/wolfcrypt/benchmark/include.am \
- $(srcdir)/wolfcrypt/src/include.am \
- $(srcdir)/wolfcrypt/test/include.am \
- $(srcdir)/wolfcrypt/user-crypto/include.am \
- $(srcdir)/wolfssl/include.am \
- $(srcdir)/wolfssl/openssl/include.am \
- $(srcdir)/wolfssl/wolfcrypt/include.am \
- $(srcdir)/wrapper/CSharp/include.am \
- $(srcdir)/wrapper/include.am \
- $(srcdir)/wrapper/python/wolfcrypt/include.am \
- $(srcdir)/wrapper/python/wolfssl/include.am \
- $(top_srcdir)/build-aux/compile \
- $(top_srcdir)/build-aux/config.guess \
- $(top_srcdir)/build-aux/config.sub \
- $(top_srcdir)/build-aux/depcomp \
- $(top_srcdir)/build-aux/install-sh \
- $(top_srcdir)/build-aux/ltmain.sh \
- $(top_srcdir)/build-aux/missing \
- $(top_srcdir)/build-aux/test-driver \
- $(top_srcdir)/cyassl/options.h.in $(top_srcdir)/rpm/spec.in \
- $(top_srcdir)/support/wolfssl.pc.in \
- $(top_srcdir)/wolfssl/options.h.in \
- $(top_srcdir)/wolfssl/version.h.in AUTHORS COPYING INSTALL \
- README build-aux/compile build-aux/config.guess \
- build-aux/config.sub build-aux/depcomp build-aux/install-sh \
- build-aux/ltmain.sh build-aux/missing
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
- if test -d "$(distdir)"; then \
- find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -rf "$(distdir)" \
- || { sleep 5 && rm -rf "$(distdir)"; }; \
- else :; fi
-am__post_remove_distdir = $(am__remove_distdir)
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-DIST_TARGETS = dist-gzip
-distuninstallcheck_listfiles = find . -type f -print
-am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
- | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMINCLUDE = @AMINCLUDE@
-AMTAR = @AMTAR@
-AM_CCASFLAGS = @AM_CCASFLAGS@
-AM_CFLAGS = @AM_CFLAGS@
-AM_CPPFLAGS = @AM_CPPFLAGS@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AM_LDFLAGS = @AM_LDFLAGS@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GENERIC_CONFIG = @GENERIC_CONFIG@
-GREP = @GREP@
-HAVE_OPENSSL_CMD = @HAVE_OPENSSL_CMD@
-HAVE_VALGRIND = @HAVE_VALGRIND@
-HAVE_VISIBILITY = @HAVE_VISIBILITY@
-HEX_VERSION = @HEX_VERSION@
-INC_AMINCLUDE = @INC_AMINCLUDE@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPPHEADERS = @IPPHEADERS@
-IPPLIBS = @IPPLIBS@
-IPPLINK = @IPPLINK@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBM = @LIBM@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIB_ADD = @LIB_ADD@
-LIB_STATIC_ADD = @LIB_STATIC_ADD@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MCHECK = @MCHECK@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-WOLFSSL_LIBRARY_VERSION = @WOLFSSL_LIBRARY_VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# includes append to these:
-SUFFIXES =
-TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
-CLEANFILES = cert.der cert.pem certecc.der certecc.pem certreq.der \
- certreq.pem key.der key.pem ntru-cert.der ecc-key-pkcs8.der \
- ntru-cert.pem ntru-key.raw othercert.der othercert.pem \
- pkcs7cert.der pkcs7authEnvelopedDataAES128GCM.der \
- pkcs7authEnvelopedDataAES128GCM_ECDH_SHA1KDF.der \
- pkcs7authEnvelopedDataAES128GCM_KEKRI.der \
- pkcs7authEnvelopedDataAES128GCM_ORI.der \
- pkcs7authEnvelopedDataAES128GCM_PWRI.der \
- pkcs7authEnvelopedDataAES192GCM.der \
- pkcs7authEnvelopedDataAES256GCM.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_authAttribs.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_bothAttribs.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_fw_bothAttribs.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_unauthAttribs.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA512KDF.der \
- pkcs7authEnvelopedDataAES256GCM_ECDH_SHA512KDF_ukm.der \
- pkcs7authEnvelopedDataAES256GCM_firmwarePkgData.der \
- pkcs7authEnvelopedDataAES256GCM_IANDS.der \
- pkcs7authEnvelopedDataAES256GCM_SKID.der \
- pkcs7compressedData_data_zlib.der \
- pkcs7compressedData_firmwarePkgData_zlib.der \
- pkcs7encryptedDataAES128CBC.der \
- pkcs7encryptedDataAES192CBC.der \
- pkcs7encryptedDataAES256CBC_attribs.der \
- pkcs7encryptedDataAES256CBC.der \
- pkcs7encryptedDataAES256CBC_firmwarePkgData.der \
- pkcs7encryptedDataAES256CBC_multi_attribs.der \
- pkcs7encryptedDataDES3.der pkcs7encryptedDataDES.der \
- pkcs7envelopedDataAES256CBC_ECDH.der \
- pkcs7envelopedDataAES128CBC_ECDH_SHA1KDF.der \
- pkcs7envelopedDataAES256CBC_ECDH_SHA256KDF.der \
- pkcs7envelopedDataAES256CBC_ECDH_SHA512KDF.der \
- pkcs7envelopedDataAES256CBC_ECDH_SHA512KDF_ukm.der \
- pkcs7envelopedDataDES3.der pkcs7envelopedDataAES128CBC.der \
- pkcs7envelopedDataAES128CBC_KEKRI.der \
- pkcs7envelopedDataAES128CBC_PWRI.der \
- pkcs7envelopedDataAES128CBC_ORI.der \
- pkcs7envelopedDataAES192CBC.der \
- pkcs7envelopedDataAES256CBC.der \
- pkcs7envelopedDataAES256CBC_IANDS.der \
- pkcs7envelopedDataAES256CBC_SKID.der \
- pkcs7signedData_RSA_SHA.der pkcs7signedData_RSA_SHA_noattr.der \
- pkcs7signedData_RSA_SHA224.der pkcs7signedData_RSA_SHA256.der \
- pkcs7signedData_RSA_SHA256_firmwarePkgData.der \
- pkcs7signedData_RSA_SHA256_custom_contentType.der \
- pkcs7signedData_RSA_SHA256_with_ca_cert.der \
- pkcs7signedData_RSA_SHA256_SKID.der \
- pkcs7signedData_RSA_SHA256_detachedSig.der \
- pkcs7signedData_RSA_SHA384.der pkcs7signedData_RSA_SHA512.der \
- pkcs7signedData_ECDSA_SHA.der \
- pkcs7signedData_ECDSA_SHA_noattr.der \
- pkcs7signedData_ECDSA_SHA224.der \
- pkcs7signedData_ECDSA_SHA256.der \
- pkcs7signedData_ECDSA_SHA256_firmwarePkgData.der \
- pkcs7signedData_ECDSA_SHA256_custom_contentType.der \
- pkcs7signedData_ECDSA_SHA256_SKID.der \
- pkcs7signedData_ECDSA_SHA384.der \
- pkcs7signedData_ECDSA_SHA512.der \
- pkcs7signedFirmwarePkgData_ECDSA_SHA256.der \
- pkcs7signedFirmwarePkgData_ECDSA_SHA256_SKID.der \
- pkcs7signedFirmwarePkgData_ECDSA_SHA256_noattr.der \
- pkcs7signedFirmwarePkgData_RSA_SHA256.der \
- pkcs7signedFirmwarePkgData_RSA_SHA256_SKID.der \
- pkcs7signedFirmwarePkgData_RSA_SHA256_noattr.der \
- pkcs7signedFirmwarePkgData_RSA_SHA256_with_ca_cert.der \
- pkcs7signedCompressedFirmwarePkgData_ECDSA_SHA256.der \
- pkcs7signedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der \
- pkcs7signedCompressedFirmwarePkgData_RSA_SHA256.der \
- pkcs7signedCompressedFirmwarePkgData_RSA_SHA256_noattr.der \
- pkcs7signedEncryptedFirmwarePkgData_RSA_SHA256.der \
- pkcs7signedEncryptedFirmwarePkgData_RSA_SHA256_noattr.der \
- pkcs7signedEncryptedFirmwarePkgData_ECDSA_SHA256.der \
- pkcs7signedEncryptedFirmwarePkgData_ECDSA_SHA256_noattr.der \
- pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256.der \
- pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der \
- pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256.der \
- pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256_noattr.der \
- tests/test-log-dump-to-file.txt
-DISTCLEANFILES = aminclude.am wolfcrypt/benchmark/.libs/benchmark \
- wolfcrypt/test/.libs/testwolfcrypt \
- examples/benchmark/.libs/tls_bench \
- examples/client/.libs/client \
- examples/echoclient/.libs/echoclient \
- examples/echoserver/.libs/echoserver \
- examples/server/.libs/server examples/sctp/.libs/sctp-server \
- examples/sctp/.libs/sctp-server-dtls \
- examples/sctp/.libs/sctp-client \
- examples/sctp/.libs/sctp-client-dtls \
- testsuite/.libs/testsuite.test tests/.libs/unit.test \
- sslSniffer/sslSnifferTest/.libs/snifftest cyassl-config \
- wolfssl-config
-noinst_HEADERS = cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h \
- cyassl/internal.h $(am__append_1) \
- wolfssl/wolfcrypt/port/pic32/pic32mz-crypt.h \
- wolfssl/wolfcrypt/port/ti/ti-hash.h \
- wolfssl/wolfcrypt/port/ti/ti-ccm.h \
- wolfssl/wolfcrypt/port/nrf51.h \
- wolfssl/wolfcrypt/port/nxp/ksdk_port.h \
- wolfssl/wolfcrypt/port/xilinx/xil-sha3.h \
- wolfssl/wolfcrypt/port/caam/caam_driver.h \
- wolfssl/wolfcrypt/port/caam/wolfcaam.h \
- wolfssl/wolfcrypt/port/caam/wolfcaam_sha.h \
- wolfssl/wolfcrypt/port/st/stm32.h \
- wolfssl/wolfcrypt/port/st/stsafe.h \
- wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h \
- wolfssl/wolfcrypt/port/arm/cryptoCell.h \
- wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h \
- wolfssl/wolfcrypt/port/cypress/psoc6_crypto.h \
- wolfssl/internal.h $(am__append_16) $(am__append_127) \
- $(am__append_138) $(am__append_140) $(am__append_142) \
- $(am__append_151)
-lib_LTLIBRARIES = src/libwolfssl.la
-man_MANS =
-noinst_LTLIBRARIES =
-include_HEADERS = $(am__append_19)
-nobase_include_HEADERS = cyassl/ctaocrypt/aes.h \
- cyassl/ctaocrypt/arc4.h cyassl/ctaocrypt/asn.h \
- cyassl/ctaocrypt/asn_public.h cyassl/ctaocrypt/poly1305.h \
- cyassl/ctaocrypt/camellia.h cyassl/ctaocrypt/coding.h \
- cyassl/ctaocrypt/compress.h cyassl/ctaocrypt/des3.h \
- cyassl/ctaocrypt/dh.h cyassl/ctaocrypt/dsa.h \
- cyassl/ctaocrypt/ecc.h cyassl/ctaocrypt/error-crypt.h \
- cyassl/ctaocrypt/fips_test.h cyassl/ctaocrypt/hc128.h \
- cyassl/ctaocrypt/hmac.h cyassl/ctaocrypt/integer.h \
- cyassl/ctaocrypt/md2.h cyassl/ctaocrypt/md4.h \
- cyassl/ctaocrypt/md5.h cyassl/ctaocrypt/misc.h \
- cyassl/ctaocrypt/pkcs7.h cyassl/ctaocrypt/wc_port.h \
- cyassl/ctaocrypt/pwdbased.h cyassl/ctaocrypt/rabbit.h \
- cyassl/ctaocrypt/chacha.h cyassl/ctaocrypt/random.h \
- cyassl/ctaocrypt/ripemd.h cyassl/ctaocrypt/rsa.h \
- cyassl/ctaocrypt/settings.h cyassl/ctaocrypt/settings_comp.h \
- cyassl/ctaocrypt/sha256.h cyassl/ctaocrypt/sha512.h \
- cyassl/ctaocrypt/sha.h cyassl/ctaocrypt/blake2.h \
- cyassl/ctaocrypt/blake2-int.h cyassl/ctaocrypt/blake2-impl.h \
- cyassl/ctaocrypt/tfm.h cyassl/ctaocrypt/types.h \
- cyassl/ctaocrypt/visibility.h cyassl/ctaocrypt/logging.h \
- cyassl/ctaocrypt/memory.h cyassl/ctaocrypt/mpi_class.h \
- cyassl/ctaocrypt/mpi_superclass.h cyassl/openssl/asn1.h \
- cyassl/openssl/bio.h cyassl/openssl/bn.h cyassl/openssl/conf.h \
- cyassl/openssl/crypto.h cyassl/openssl/des.h \
- cyassl/openssl/dh.h cyassl/openssl/dsa.h \
- cyassl/openssl/ecdsa.h cyassl/openssl/ecdh.h \
- cyassl/openssl/ec.h cyassl/openssl/ec25519.h \
- cyassl/openssl/ed25519.h cyassl/openssl/ec448.h \
- cyassl/openssl/ed448.h cyassl/openssl/engine.h \
- cyassl/openssl/err.h cyassl/openssl/evp.h \
- cyassl/openssl/hmac.h cyassl/openssl/lhash.h \
- cyassl/openssl/md4.h cyassl/openssl/md5.h \
- cyassl/openssl/ripemd.h cyassl/openssl/ocsp.h \
- cyassl/openssl/opensslconf.h cyassl/openssl/opensslv.h \
- cyassl/openssl/ossl_typ.h cyassl/openssl/pem.h \
- cyassl/openssl/pkcs12.h cyassl/openssl/rand.h \
- cyassl/openssl/rsa.h cyassl/openssl/sha.h \
- cyassl/openssl/ssl23.h cyassl/openssl/ssl.h \
- cyassl/openssl/stack.h cyassl/openssl/ui.h \
- cyassl/openssl/x509.h cyassl/openssl/x509v3.h \
- cyassl/error-ssl.h cyassl/ssl.h cyassl/sniffer_error.h \
- cyassl/sniffer.h cyassl/callbacks.h cyassl/certs_test.h \
- cyassl/test.h cyassl/version.h cyassl/ocsp.h cyassl/crl.h \
- $(am__append_2) wolfssl/wolfcrypt/aes.h \
- wolfssl/wolfcrypt/arc4.h wolfssl/wolfcrypt/asn.h \
- wolfssl/wolfcrypt/asn_public.h wolfssl/wolfcrypt/poly1305.h \
- wolfssl/wolfcrypt/camellia.h wolfssl/wolfcrypt/cmac.h \
- wolfssl/wolfcrypt/coding.h wolfssl/wolfcrypt/compress.h \
- wolfssl/wolfcrypt/des3.h wolfssl/wolfcrypt/dh.h \
- wolfssl/wolfcrypt/dsa.h wolfssl/wolfcrypt/ecc.h \
- wolfssl/wolfcrypt/curve25519.h wolfssl/wolfcrypt/ed25519.h \
- wolfssl/wolfcrypt/fe_operations.h \
- wolfssl/wolfcrypt/ge_operations.h wolfssl/wolfcrypt/curve448.h \
- wolfssl/wolfcrypt/ed448.h wolfssl/wolfcrypt/fe_448.h \
- wolfssl/wolfcrypt/ge_448.h wolfssl/wolfcrypt/error-crypt.h \
- wolfssl/wolfcrypt/fips_test.h wolfssl/wolfcrypt/hash.h \
- wolfssl/wolfcrypt/hc128.h wolfssl/wolfcrypt/hmac.h \
- wolfssl/wolfcrypt/integer.h wolfssl/wolfcrypt/md2.h \
- wolfssl/wolfcrypt/md4.h wolfssl/wolfcrypt/md5.h \
- wolfssl/wolfcrypt/misc.h wolfssl/wolfcrypt/pkcs7.h \
- wolfssl/wolfcrypt/wc_encrypt.h wolfssl/wolfcrypt/wc_port.h \
- wolfssl/wolfcrypt/pwdbased.h wolfssl/wolfcrypt/rabbit.h \
- wolfssl/wolfcrypt/chacha.h \
- wolfssl/wolfcrypt/chacha20_poly1305.h \
- wolfssl/wolfcrypt/random.h wolfssl/wolfcrypt/ripemd.h \
- wolfssl/wolfcrypt/rsa.h wolfssl/wolfcrypt/settings.h \
- wolfssl/wolfcrypt/sha256.h wolfssl/wolfcrypt/sha512.h \
- wolfssl/wolfcrypt/sha.h wolfssl/wolfcrypt/signature.h \
- wolfssl/wolfcrypt/blake2.h wolfssl/wolfcrypt/blake2-int.h \
- wolfssl/wolfcrypt/blake2-impl.h wolfssl/wolfcrypt/tfm.h \
- wolfssl/wolfcrypt/srp.h wolfssl/wolfcrypt/idea.h \
- wolfssl/wolfcrypt/types.h wolfssl/wolfcrypt/visibility.h \
- wolfssl/wolfcrypt/logging.h wolfssl/wolfcrypt/memory.h \
- wolfssl/wolfcrypt/mpi_class.h \
- wolfssl/wolfcrypt/mpi_superclass.h \
- wolfssl/wolfcrypt/mem_track.h wolfssl/wolfcrypt/wolfevent.h \
- wolfssl/wolfcrypt/pkcs12.h wolfssl/wolfcrypt/wolfmath.h \
- wolfssl/wolfcrypt/sha3.h wolfssl/wolfcrypt/cpuid.h \
- wolfssl/wolfcrypt/cryptocb.h $(am__append_3) $(am__append_4) \
- $(am__append_5) $(am__append_6) $(am__append_7) \
- $(am__append_8) $(am__append_9) $(am__append_10) \
- $(am__append_11) $(am__append_12) $(am__append_13) \
- $(am__append_14) $(am__append_15) wolfssl/openssl/asn1.h \
- wolfssl/openssl/asn1t.h wolfssl/openssl/aes.h \
- wolfssl/openssl/bio.h wolfssl/openssl/bn.h \
- wolfssl/openssl/buffer.h wolfssl/openssl/conf.h \
- wolfssl/openssl/crypto.h wolfssl/openssl/des.h \
- wolfssl/openssl/dh.h wolfssl/openssl/dsa.h \
- wolfssl/openssl/ecdsa.h wolfssl/openssl/ecdh.h \
- wolfssl/openssl/ec.h wolfssl/openssl/ec25519.h \
- wolfssl/openssl/ed25519.h wolfssl/openssl/ec448.h \
- wolfssl/openssl/ed448.h wolfssl/openssl/engine.h \
- wolfssl/openssl/err.h wolfssl/openssl/evp.h \
- wolfssl/openssl/hmac.h wolfssl/openssl/lhash.h \
- wolfssl/openssl/md4.h wolfssl/openssl/md5.h \
- wolfssl/openssl/ripemd.h wolfssl/openssl/obj_mac.h \
- wolfssl/openssl/objects.h wolfssl/openssl/ocsp.h \
- wolfssl/openssl/opensslconf.h wolfssl/openssl/opensslv.h \
- wolfssl/openssl/ossl_typ.h wolfssl/openssl/pem.h \
- wolfssl/openssl/pkcs12.h wolfssl/openssl/pkcs7.h \
- wolfssl/openssl/rand.h wolfssl/openssl/rsa.h \
- wolfssl/openssl/sha.h wolfssl/openssl/sha3.h \
- wolfssl/openssl/ssl23.h wolfssl/openssl/ssl.h \
- wolfssl/openssl/stack.h wolfssl/openssl/tls1.h \
- wolfssl/openssl/ui.h wolfssl/openssl/x509.h \
- wolfssl/openssl/x509_vfy.h wolfssl/openssl/x509v3.h \
- wolfssl/openssl/rc4.h wolfssl/error-ssl.h wolfssl/ssl.h \
- wolfssl/sniffer_error.h wolfssl/sniffer.h wolfssl/callbacks.h \
- wolfssl/certs_test.h wolfssl/test.h wolfssl/version.h \
- wolfssl/ocsp.h wolfssl/crl.h wolfssl/wolfio.h $(am__append_17)
-EXTRA_HEADERS =
-BUILT_SOURCES =
-
-# wolfSSL CSharp wrapper files
-
-# ECC CA prime256v1
-
-# ECC CA SECP384R1
-
-# Intermediate cert CRL's
-
-# ECC
-
-# DH FFDHE Groups
-
-# The certs/server-cert with the last byte (signature byte) changed
-
-# user crypto plug in example
-
-# leave openssl.test as extra until non bash works
-
-# for use with wolfssl-x.x.x-commercial-fips-stm32l4-v2
-EXTRA_DIST = lib/dummy wolfssl-ntru.vcproj wolfssl.vcproj \
- wolfssl.vcxproj wolfssl-ntru.sln wolfssl.sln wolfssl64.sln \
- valgrind-error.sh valgrind-bash.supp fips-hash.sh \
- gencertbuf.pl README.md README ChangeLog.md LICENSING INSTALL \
- IPP LPCExpresso.cproject LPCExpresso.project resource.h \
- wolfssl.rc CMakeLists.txt wrapper/python/wolfcrypt/.gitignore \
- wrapper/python/wolfcrypt/docs/asymmetric.rst \
- wrapper/python/wolfcrypt/docs/conf.py \
- wrapper/python/wolfcrypt/docs/digest.rst \
- wrapper/python/wolfcrypt/docs/index.rst \
- wrapper/python/wolfcrypt/docs/mac.rst \
- wrapper/python/wolfcrypt/docs/Makefile \
- wrapper/python/wolfcrypt/docs/random.rst \
- wrapper/python/wolfcrypt/docs/symmetric.rst \
- wrapper/python/wolfcrypt/LICENSING.rst \
- wrapper/python/wolfcrypt/MANIFEST.in \
- wrapper/python/wolfcrypt/README.rst \
- wrapper/python/wolfcrypt/requirements-testing.txt \
- wrapper/python/wolfcrypt/setup.py \
- wrapper/python/wolfcrypt/test/test_ciphers.py \
- wrapper/python/wolfcrypt/test/test_hashes.py \
- wrapper/python/wolfcrypt/test/test_random.py \
- wrapper/python/wolfcrypt/tox.ini \
- wrapper/python/wolfcrypt/wolfcrypt/__about__.py \
- wrapper/python/wolfcrypt/wolfcrypt/__init__.py \
- wrapper/python/wolfcrypt/wolfcrypt/build_ffi.py \
- wrapper/python/wolfcrypt/wolfcrypt/ciphers.py \
- wrapper/python/wolfcrypt/wolfcrypt/exceptions.py \
- wrapper/python/wolfcrypt/wolfcrypt/hashes.py \
- wrapper/python/wolfcrypt/wolfcrypt/random.py \
- wrapper/python/wolfcrypt/wolfcrypt/utils.py \
- wrapper/python/wolfssl/.gitignore \
- wrapper/python/wolfssl/docs/api.rst \
- wrapper/python/wolfssl/docs/conf.py \
- wrapper/python/wolfssl/docs/examples.rst \
- wrapper/python/wolfssl/docs/index.rst \
- wrapper/python/wolfssl/docs/installation.rst \
- wrapper/python/wolfssl/docs/Makefile \
- wrapper/python/wolfssl/docs/licensing.rst \
- wrapper/python/wolfssl/docs/requirements.txt \
- wrapper/python/wolfssl/docs/usage.rst \
- wrapper/python/wolfssl/examples/client.py \
- wrapper/python/wolfssl/examples/server.py \
- wrapper/python/wolfssl/test/conftest.py \
- wrapper/python/wolfssl/test/test_client.py \
- wrapper/python/wolfssl/test/test_context.py \
- wrapper/python/wolfssl/test/test_methods.py \
- wrapper/python/wolfssl/src/wolfssl/__about__.py \
- wrapper/python/wolfssl/src/wolfssl/__init__.py \
- wrapper/python/wolfssl/src/wolfssl/build_ffi.py \
- wrapper/python/wolfssl/src/wolfssl/_memory.py \
- wrapper/python/wolfssl/src/wolfssl/_methods.py \
- wrapper/python/wolfssl/src/wolfssl/exceptions.py \
- wrapper/python/wolfssl/src/wolfssl/utils.py \
- wrapper/python/wolfssl/LICENSING.rst \
- wrapper/python/wolfssl/Makefile \
- wrapper/python/wolfssl/MANIFEST.in \
- wrapper/python/wolfssl/README.rst \
- wrapper/python/wolfssl/requirements-testing.txt \
- wrapper/python/wolfssl/setup.py wrapper/python/wolfssl/tox.ini \
- wrapper/python/wolfssl/Vagrantfile \
- wrapper/python/wolfssl/.centos-provisioner.sh \
- wrapper/python/wolfssl/.ubuntu-provisioner.sh \
- wrapper/CSharp/wolfSSL-DTLS-PSK-Server/App.config \
- wrapper/CSharp/wolfSSL-DTLS-PSK-Server/Properties/AssemblyInfo.cs \
- wrapper/CSharp/wolfSSL-DTLS-PSK-Server/wolfSSL-DTLS-PSK-Server.cs \
- wrapper/CSharp/wolfSSL-DTLS-PSK-Server/wolfSSL-DTLS-PSK-Server.csproj \
- wrapper/CSharp/wolfSSL-DTLS-Server/App.config \
- wrapper/CSharp/wolfSSL-DTLS-Server/Properties/AssemblyInfo.cs \
- wrapper/CSharp/wolfSSL-DTLS-Server/wolfSSL-DTLS-Server.cs \
- wrapper/CSharp/wolfSSL-DTLS-Server/wolfSSL-DTLS-Server.csproj \
- wrapper/CSharp/wolfSSL-TLS-PSK-Server/App.config \
- wrapper/CSharp/wolfSSL-TLS-PSK-Server/Properties/AssemblyInfo.cs \
- wrapper/CSharp/wolfSSL-TLS-PSK-Server/wolfSSL-TLS-PSK-Server.cs \
- wrapper/CSharp/wolfSSL-TLS-PSK-Server/wolfSSL-TLS-PSK-Server.csproj \
- wrapper/CSharp/wolfSSL-TLS-Server/App.config \
- wrapper/CSharp/wolfSSL-TLS-Server/Properties/AssemblyInfo.cs \
- wrapper/CSharp/wolfSSL-TLS-Server/Properties/Settings.Designer.cs \
- wrapper/CSharp/wolfSSL-TLS-Server/Properties/Settings.settings \
- wrapper/CSharp/wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs \
- wrapper/CSharp/wolfSSL-TLS-Server/wolfSSL-TLS-Server.csproj \
- wrapper/CSharp/wolfSSL-TLS-ServerThreaded/App.config \
- wrapper/CSharp/wolfSSL-TLS-ServerThreaded/Properties/AssemblyInfo.cs \
- wrapper/CSharp/wolfSSL-TLS-ServerThreaded/Properties/Settings.Designer.cs \
- wrapper/CSharp/wolfSSL-TLS-ServerThreaded/Properties/Settings.settings \
- wrapper/CSharp/wolfSSL-TLS-ServerThreaded/wolfSSL-TLS-ServerThreaded.cs \
- wrapper/CSharp/wolfSSL-TLS-ServerThreaded/wolfSSL-TLS-ServerThreaded.csproj \
- wrapper/CSharp/wolfSSL-Example-IOCallbacks/App.config \
- wrapper/CSharp/wolfSSL-Example-IOCallbacks/Properties/AssemblyInfo.cs \
- wrapper/CSharp/wolfSSL-Example-IOCallbacks/wolfSSL-Example-IOCallbacks.cs \
- wrapper/CSharp/wolfSSL-Example-IOCallbacks/wolfSSL-Example-IOCallbacks.csproj \
- wrapper/CSharp/wolfSSL_CSharp.sln \
- wrapper/CSharp/wolfSSL_CSharp/Properties/AssemblyInfo.cs \
- wrapper/CSharp/wolfSSL_CSharp/Properties/Resources.Designer.cs \
- wrapper/CSharp/wolfSSL_CSharp/Properties/Resources.resx \
- wrapper/CSharp/wolfSSL_CSharp/wolfSSL.cs \
- wrapper/CSharp/wolfSSL_CSharp/X509.cs \
- wrapper/CSharp/wolfSSL_CSharp/wolfSSL_CSharp.csproj \
- wrapper/CSharp/wolfSSL-TLS-Client/App.config \
- wrapper/CSharp/wolfSSL-TLS-Client/Properties/AssemblyInfo.cs \
- wrapper/CSharp/wolfSSL-TLS-Client/Properties/Settings.Designer.cs \
- wrapper/CSharp/wolfSSL-TLS-Client/Properties/Settings.settings \
- wrapper/CSharp/wolfSSL-TLS-Client/wolfSSL-TLS-Client.cs \
- wrapper/CSharp/wolfSSL-TLS-Client/wolfSSL-TLS-Client.csproj \
- ctaocrypt/src/misc.c cyassl/sniffer_error.rc \
- wolfssl/sniffer_error.rc certs/ca-cert-chain.der \
- certs/ca-cert.pem certs/ca-key.pem certs/client-cert.pem \
- certs/client-keyEnc.pem certs/client-key.pem \
- certs/client-uri-cert.pem certs/client-relative-uri.pem \
- certs/ecc-key.pem certs/ecc-privkey.pem \
- certs/ecc-privkeyPkcs8.der certs/ecc-privkeyPkcs8.pem \
- certs/ecc-keyPkcs8Enc.pem certs/ecc-keyPkcs8Enc.der \
- certs/ecc-key-comp.pem certs/ecc-keyPkcs8.pem \
- certs/ecc-keyPkcs8.der certs/ecc-client-key.pem \
- certs/ecc-client-keyPub.pem certs/client-ecc-cert.pem \
- certs/client-ca.pem certs/ntru-cert.pem certs/dh2048.pem \
- certs/server-cert.pem certs/server-ecc.pem \
- certs/server-ecc-self.pem certs/server-ecc-comp.pem \
- certs/server-ecc-rsa.pem certs/server-keyEnc.pem \
- certs/server-key.pem certs/server-keyPkcs8.der \
- certs/server-keyPkcs8Enc12.pem certs/server-keyPkcs8Enc2.pem \
- certs/server-keyPkcs8Enc.pem certs/server-keyPkcs8Enc.der \
- certs/server-keyPkcs8.pem certs/server-revoked-cert.pem \
- certs/server-revoked-key.pem certs/wolfssl-website-ca.pem \
- certs/test-degenerate.p7b certs/test-ber-exp02-05-2022.p7b \
- certs/test-servercert.p12 certs/ecc-rsa-server.p12 \
- certs/dsaparams.pem certs/ecc-privOnlyKey.pem \
- certs/ecc-privOnlyCert.pem certs/dh3072.pem certs/dh4096.pem \
- certs/client-cert-ext.pem certs/ca-key.der certs/ca-cert.der \
- certs/client-cert.der certs/client-key.der \
- certs/client-ecc-cert.der certs/client-keyPub.der \
- certs/dh2048.der certs/dh3072.der certs/dh4096.der \
- certs/rsa2048.der certs/rsa-pub-2048.pem certs/rsa3072.der \
- certs/dsa2048.der certs/dsa3072.der certs/ecc-client-key.der \
- certs/ecc-client-keyPub.der certs/ecc-key.der \
- certs/ecc-keyPub.der certs/server-key.der \
- certs/server-cert.der certs/server-ecc-comp.der \
- certs/server-ecc.der certs/server-ecc-self.der \
- certs/server-ecc-rsa.der certs/server-cert-chain.der \
- certs/client-cert-ext.der certs/ca-ecc-cert.der \
- certs/ca-ecc-cert.pem certs/ca-ecc-key.der \
- certs/ca-ecc-key.pem certs/ca-ecc384-cert.der \
- certs/ca-ecc384-cert.pem certs/ca-ecc384-key.der \
- certs/ca-ecc384-key.pem certs/ntru-key.raw \
- certs/1024/ca-cert.pem certs/1024/ca-key.pem \
- certs/1024/client-cert.pem certs/1024/client-key.pem \
- certs/1024/dh1024.pem certs/1024/dsa1024.pem \
- certs/1024/dsa-pub-1024.pem certs/1024/server-cert.pem \
- certs/1024/server-key.pem certs/1024/ca-cert.der \
- certs/1024/ca-key.der certs/1024/client-cert.der \
- certs/1024/client-key.der certs/1024/client-keyPub.der \
- certs/1024/dh1024.der certs/1024/dsa1024.der \
- certs/1024/rsa1024.der certs/1024/server-cert.der \
- certs/1024/server-key.der certs/3072/client-cert.der \
- certs/3072/client-cert.pem certs/3072/client-key.der \
- certs/3072/client-key.pem certs/3072/client-keyPub.der \
- certs/4096/client-cert.pem certs/4096/client-key.pem \
- certs/4096/client-cert.der certs/4096/client-key.der \
- certs/4096/client-keyPub.der certs/crl/crl.pem \
- certs/crl/cliCrl.pem certs/crl/eccSrvCRL.pem \
- certs/crl/eccCliCRL.pem certs/crl/crl2.pem \
- certs/crl/caEccCrl.pem certs/crl/caEcc384Crl.pem \
- certs/crl/wolfssl.cnf certs/crl/crl.revoked \
- certs/crl/ca-int.pem certs/crl/ca-int2.pem \
- certs/crl/client-int.pem certs/crl/server-int.pem \
- certs/crl/ca-int-ecc.pem certs/crl/ca-int2-ecc.pem \
- certs/crl/client-int-ecc.pem certs/crl/server-int-ecc.pem \
- certs/ecc/genecc.sh certs/ecc/wolfssl.cnf \
- certs/ecc/wolfssl_384.cnf certs/ed25519/ca-ed25519.der \
- certs/ed25519/ca-ed25519.pem certs/ed25519/ca-ed25519-key.der \
- certs/ed25519/ca-ed25519-key.pem \
- certs/ed25519/ca-ed25519-priv.der \
- certs/ed25519/ca-ed25519-priv.pem \
- certs/ed25519/client-ed25519.der \
- certs/ed25519/client-ed25519.pem \
- certs/ed25519/client-ed25519-key.der \
- certs/ed25519/client-ed25519-key.pem \
- certs/ed25519/client-ed25519-priv.der \
- certs/ed25519/client-ed25519-priv.pem \
- certs/ed25519/root-ed25519.der certs/ed25519/root-ed25519.pem \
- certs/ed25519/root-ed25519-key.der \
- certs/ed25519/root-ed25519-key.pem \
- certs/ed25519/root-ed25519-priv.der \
- certs/ed25519/root-ed25519-priv.pem \
- certs/ed25519/server-ed25519.der \
- certs/ed25519/server-ed25519.pem \
- certs/ed25519/server-ed25519-cert.pem \
- certs/ed25519/server-ed25519-key.der \
- certs/ed25519/server-ed25519-key.pem \
- certs/ed25519/server-ed25519-priv.der \
- certs/ed25519/server-ed25519-priv.pem certs/ed448/ca-ed448.der \
- certs/ed448/ca-ed448.pem certs/ed448/ca-ed448-key.der \
- certs/ed448/ca-ed448-key.pem certs/ed448/ca-ed448-priv.der \
- certs/ed448/ca-ed448-priv.pem certs/ed448/client-ed448.der \
- certs/ed448/client-ed448.pem certs/ed448/client-ed448-key.der \
- certs/ed448/client-ed448-key.pem \
- certs/ed448/client-ed448-priv.der \
- certs/ed448/client-ed448-priv.pem certs/ed448/root-ed448.der \
- certs/ed448/root-ed448.pem certs/ed448/root-ed448-key.der \
- certs/ed448/root-ed448-key.pem certs/ed448/root-ed448-priv.der \
- certs/ed448/root-ed448-priv.pem certs/ed448/server-ed448.der \
- certs/ed448/server-ed448.pem certs/ed448/server-ed448-cert.pem \
- certs/ed448/server-ed448-key.der \
- certs/ed448/server-ed448-key.pem \
- certs/ed448/server-ed448-priv.der \
- certs/ed448/server-ed448-priv.pem \
- certs/external/ca-globalsign-root.pem \
- certs/external/ca-google-root.pem \
- certs/external/ca-digicert-ev.pem \
- certs/external/baltimore-cybertrust-root.pem \
- certs/external/README.txt \
- certs/external/DigiCertGlobalRootCA.pem \
- certs/external/ca_collection.pem \
- certs/ocsp/index-ca-and-intermediate-cas.txt \
- certs/ocsp/index-ca-and-intermediate-cas.txt.attr \
- certs/ocsp/index-intermediate1-ca-issued-certs.txt \
- certs/ocsp/index-intermediate1-ca-issued-certs.txt.attr \
- certs/ocsp/index-intermediate2-ca-issued-certs.txt \
- certs/ocsp/index-intermediate2-ca-issued-certs.txt.attr \
- certs/ocsp/index-intermediate3-ca-issued-certs.txt \
- certs/ocsp/index-intermediate3-ca-issued-certs.txt.attr \
- certs/ocsp/openssl.cnf certs/ocsp/renewcerts-for-test.sh \
- certs/ocsp/intermediate1-ca-key.pem \
- certs/ocsp/intermediate1-ca-cert.pem \
- certs/ocsp/intermediate2-ca-key.pem \
- certs/ocsp/intermediate2-ca-cert.pem \
- certs/ocsp/intermediate3-ca-key.pem \
- certs/ocsp/intermediate3-ca-cert.pem \
- certs/ocsp/ocsp-responder-key.pem \
- certs/ocsp/ocsp-responder-cert.pem certs/ocsp/server1-key.pem \
- certs/ocsp/server1-cert.pem certs/ocsp/server2-key.pem \
- certs/ocsp/server2-cert.pem certs/ocsp/server3-key.pem \
- certs/ocsp/server3-cert.pem certs/ocsp/server4-key.pem \
- certs/ocsp/server4-cert.pem certs/ocsp/server5-key.pem \
- certs/ocsp/server5-cert.pem certs/ocsp/root-ca-key.pem \
- certs/ocsp/root-ca-cert.pem certs/statickeys/gen-static.sh \
- certs/statickeys/ecc-secp256r1.der \
- certs/statickeys/ecc-secp256r1.pem \
- certs/statickeys/dh-ffdhe2048-params.pem \
- certs/statickeys/dh-ffdhe2048.der \
- certs/statickeys/dh-ffdhe2048.pem certs/test/cert-ext-ia.cfg \
- certs/test/cert-ext-ia.der certs/test/cert-ext-nc.cfg \
- certs/test/cert-ext-nc.der certs/test/cert-ext-nct.cfg \
- certs/test/cert-ext-nct.der certs/test/cert-ext-ns.der \
- certs/test/gen-ext-certs.sh \
- certs/test/server-duplicate-policy.pem \
- certs/test/cert-ext-joi.pem \
- certs/test/server-cert-rsa-badsig.der \
- certs/test/server-cert-rsa-badsig.pem \
- certs/test/server-cert-ecc-badsig.der \
- certs/test/server-cert-ecc-badsig.pem \
- certs/test/gen-testcerts.sh certs/test/server-garbage.der \
- certs/test/server-garbage.pem certs/test/server-goodcn.pem \
- certs/test/server-goodcn.der certs/test/server-goodalt.pem \
- certs/test/server-goodalt.der certs/test/server-goodcnwild.pem \
- certs/test/server-goodcnwild.der \
- certs/test/server-goodaltwild.pem \
- certs/test/server-goodaltwild.der \
- certs/test/server-badcnnull.pem \
- certs/test/server-badcnnull.der certs/test/server-badcn.pem \
- certs/test/server-badcn.der certs/test/server-badaltnull.pem \
- certs/test/server-badaltnull.der \
- certs/test/server-badaltname.der \
- certs/test/server-badaltname.pem \
- certs/test/server-localhost.der \
- certs/test/server-localhost.pem \
- certs/crl/server-goodaltCrl.pem certs/crl/server-goodcnCrl.pem \
- certs/crl/server-goodaltwildCrl.pem \
- certs/crl/server-goodcnwildCrl.pem certs/test/crit-cert.pem \
- certs/test/crit-key.pem certs/test/dh1024.der \
- certs/test/dh1024.pem certs/test/dh512.der \
- certs/test/dh512.pem certs/test/digsigku.pem \
- certs/test/expired/expired-ca.pem \
- certs/test/expired/expired-ca.der \
- certs/test/expired/expired-cert.pem \
- certs/test/expired/expired-cert.der \
- certs/test-pathlen/chainA-ICA1-key.pem \
- certs/test-pathlen/chainA-ICA1-pathlen0.pem \
- certs/test-pathlen/chainA-assembled.pem \
- certs/test-pathlen/chainA-entity-key.pem \
- certs/test-pathlen/chainA-entity.pem \
- certs/test-pathlen/chainB-ICA1-key.pem \
- certs/test-pathlen/chainB-ICA1-pathlen0.pem \
- certs/test-pathlen/chainB-ICA2-key.pem \
- certs/test-pathlen/chainB-ICA2-pathlen1.pem \
- certs/test-pathlen/chainB-assembled.pem \
- certs/test-pathlen/chainB-entity-key.pem \
- certs/test-pathlen/chainB-entity.pem \
- certs/test-pathlen/chainC-ICA1-key.pem \
- certs/test-pathlen/chainC-ICA1-pathlen1.pem \
- certs/test-pathlen/chainC-assembled.pem \
- certs/test-pathlen/chainC-entity-key.pem \
- certs/test-pathlen/chainC-entity.pem \
- certs/test-pathlen/chainD-ICA1-key.pem \
- certs/test-pathlen/chainD-ICA1-pathlen127.pem \
- certs/test-pathlen/chainD-assembled.pem \
- certs/test-pathlen/chainD-entity-key.pem \
- certs/test-pathlen/chainD-entity.pem \
- certs/test-pathlen/chainE-ICA1-key.pem \
- certs/test-pathlen/chainE-ICA1-pathlen128.pem \
- certs/test-pathlen/chainE-assembled.pem \
- certs/test-pathlen/chainE-entity-key.pem \
- certs/test-pathlen/chainE-entity.pem \
- certs/test-pathlen/chainF-ICA1-key.pem \
- certs/test-pathlen/chainF-ICA1-pathlen1.pem \
- certs/test-pathlen/chainF-ICA2-key.pem \
- certs/test-pathlen/chainF-ICA2-pathlen0.pem \
- certs/test-pathlen/chainF-assembled.pem \
- certs/test-pathlen/chainF-entity-key.pem \
- certs/test-pathlen/chainF-entity.pem \
- certs/test-pathlen/chainG-ICA1-key.pem \
- certs/test-pathlen/chainG-ICA1-pathlen0.pem \
- certs/test-pathlen/chainG-ICA2-key.pem \
- certs/test-pathlen/chainG-ICA2-pathlen1.pem \
- certs/test-pathlen/chainG-ICA3-key.pem \
- certs/test-pathlen/chainG-ICA3-pathlen99.pem \
- certs/test-pathlen/chainG-ICA4-key.pem \
- certs/test-pathlen/chainG-ICA4-pathlen5.pem \
- certs/test-pathlen/chainG-ICA5-key.pem \
- certs/test-pathlen/chainG-ICA5-pathlen20.pem \
- certs/test-pathlen/chainG-ICA6-key.pem \
- certs/test-pathlen/chainG-ICA6-pathlen10.pem \
- certs/test-pathlen/chainG-ICA7-key.pem \
- certs/test-pathlen/chainG-ICA7-pathlen100.pem \
- certs/test-pathlen/chainG-assembled.pem \
- certs/test-pathlen/chainG-entity-key.pem \
- certs/test-pathlen/chainG-entity.pem \
- certs/test-pathlen/chainH-ICA1-key.pem \
- certs/test-pathlen/chainH-ICA1-pathlen0.pem \
- certs/test-pathlen/chainH-ICA2-key.pem \
- certs/test-pathlen/chainH-ICA2-pathlen2.pem \
- certs/test-pathlen/chainH-ICA3-key.pem \
- certs/test-pathlen/chainH-ICA3-pathlen2.pem \
- certs/test-pathlen/chainH-ICA4-key.pem \
- certs/test-pathlen/chainH-ICA4-pathlen2.pem \
- certs/test-pathlen/chainH-assembled.pem \
- certs/test-pathlen/chainH-entity-key.pem \
- certs/test-pathlen/chainH-entity.pem \
- certs/test-pathlen/chainI-ICA1-key.pem \
- certs/test-pathlen/chainI-ICA1-no_pathlen.pem \
- certs/test-pathlen/chainI-ICA2-key.pem \
- certs/test-pathlen/chainI-ICA2-no_pathlen.pem \
- certs/test-pathlen/chainI-ICA3-key.pem \
- certs/test-pathlen/chainI-ICA3-pathlen2.pem \
- certs/test-pathlen/chainI-assembled.pem \
- certs/test-pathlen/chainI-entity-key.pem \
- certs/test-pathlen/chainI-entity.pem \
- certs/test-pathlen/chainJ-ICA1-key.pem \
- certs/test-pathlen/chainJ-ICA1-no_pathlen.pem \
- certs/test-pathlen/chainJ-ICA2-key.pem \
- certs/test-pathlen/chainJ-ICA2-no_pathlen.pem \
- certs/test-pathlen/chainJ-ICA3-key.pem \
- certs/test-pathlen/chainJ-ICA3-no_pathlen.pem \
- certs/test-pathlen/chainJ-ICA4-key.pem \
- certs/test-pathlen/chainJ-ICA4-pathlen2.pem \
- certs/test-pathlen/chainJ-assembled.pem \
- certs/test-pathlen/chainJ-entity-key.pem \
- certs/test-pathlen/chainJ-entity.pem \
- certs/intermediate/genintcerts.sh \
- certs/intermediate/ca-int-cert.der \
- certs/intermediate/ca-int-cert.pem \
- certs/intermediate/ca-int-ecc-cert.der \
- certs/intermediate/ca-int-ecc-cert.pem \
- certs/intermediate/ca-int-ecc-key.der \
- certs/intermediate/ca-int-ecc-key.pem \
- certs/intermediate/ca-int-key.der \
- certs/intermediate/ca-int-key.pem \
- certs/intermediate/client-chain-alt-ecc.pem \
- certs/intermediate/client-chain-alt.pem \
- certs/intermediate/ca-int2-cert.der \
- certs/intermediate/ca-int2-cert.pem \
- certs/intermediate/ca-int2-ecc-cert.der \
- certs/intermediate/ca-int2-ecc-cert.pem \
- certs/intermediate/ca-int2-ecc-key.der \
- certs/intermediate/ca-int2-ecc-key.pem \
- certs/intermediate/ca-int2-key.der \
- certs/intermediate/ca-int2-key.pem \
- certs/intermediate/client-chain-ecc.der \
- certs/intermediate/client-chain-ecc.pem \
- certs/intermediate/client-chain.der \
- certs/intermediate/client-chain.pem \
- certs/intermediate/client-int-cert.der \
- certs/intermediate/client-int-cert.pem \
- certs/intermediate/client-int-ecc-cert.der \
- certs/intermediate/client-int-ecc-cert.pem \
- certs/intermediate/server-chain-alt-ecc.pem \
- certs/intermediate/server-chain-alt.pem \
- certs/intermediate/server-chain-ecc.der \
- certs/intermediate/server-chain-ecc.pem \
- certs/intermediate/server-chain.der \
- certs/intermediate/server-chain.pem \
- certs/intermediate/server-int-cert.der \
- certs/intermediate/server-int-cert.pem \
- certs/intermediate/server-int-ecc-cert.der \
- certs/intermediate/server-int-ecc-cert.pem swig/PythonBuild.sh \
- swig/README swig/wolfssl.i swig/wolfssl_adds.c \
- swig/python_wolfssl.vcproj swig/rsasign.py swig/runme.py \
- support/wolfssl.pc wolfcrypt/user-crypto/configure.ac \
- wolfcrypt/user-crypto/autogen.sh \
- wolfcrypt/user-crypto/include/user_rsa.h \
- wolfcrypt/user-crypto/src/rsa.c \
- wolfcrypt/user-crypto/lib/.gitkeep \
- wolfcrypt/user-crypto/README.txt \
- wolfcrypt/user-crypto/Makefile.am \
- wolfcrypt/benchmark/benchmark.sln \
- wolfcrypt/benchmark/benchmark.vcproj \
- wolfcrypt/benchmark/README.md src/bio.c wolfcrypt/src/misc.c \
- wolfcrypt/src/evp.c wolfcrypt/src/asm.c \
- wolfcrypt/src/aes_asm.asm wolfcrypt/src/wc_dsp.c \
- wolfcrypt/src/sp_dsp32.c wolfcrypt/src/ecc_fp.c \
- wolfcrypt/src/fp_mont_small.i wolfcrypt/src/fp_mul_comba_12.i \
- wolfcrypt/src/fp_mul_comba_17.i \
- wolfcrypt/src/fp_mul_comba_20.i \
- wolfcrypt/src/fp_mul_comba_24.i \
- wolfcrypt/src/fp_mul_comba_28.i \
- wolfcrypt/src/fp_mul_comba_32.i wolfcrypt/src/fp_mul_comba_3.i \
- wolfcrypt/src/fp_mul_comba_48.i wolfcrypt/src/fp_mul_comba_4.i \
- wolfcrypt/src/fp_mul_comba_64.i wolfcrypt/src/fp_mul_comba_6.i \
- wolfcrypt/src/fp_mul_comba_7.i wolfcrypt/src/fp_mul_comba_8.i \
- wolfcrypt/src/fp_mul_comba_9.i \
- wolfcrypt/src/fp_mul_comba_small_set.i \
- wolfcrypt/src/fp_sqr_comba_12.i \
- wolfcrypt/src/fp_sqr_comba_17.i \
- wolfcrypt/src/fp_sqr_comba_20.i \
- wolfcrypt/src/fp_sqr_comba_24.i \
- wolfcrypt/src/fp_sqr_comba_28.i \
- wolfcrypt/src/fp_sqr_comba_32.i wolfcrypt/src/fp_sqr_comba_3.i \
- wolfcrypt/src/fp_sqr_comba_48.i wolfcrypt/src/fp_sqr_comba_4.i \
- wolfcrypt/src/fp_sqr_comba_64.i wolfcrypt/src/fp_sqr_comba_6.i \
- wolfcrypt/src/fp_sqr_comba_7.i wolfcrypt/src/fp_sqr_comba_8.i \
- wolfcrypt/src/fp_sqr_comba_9.i \
- wolfcrypt/src/fp_sqr_comba_small_set.i \
- wolfcrypt/src/fe_x25519_128.i wolfcrypt/src/port/ti/ti-aes.c \
- wolfcrypt/src/port/ti/ti-des3.c \
- wolfcrypt/src/port/ti/ti-hash.c wolfcrypt/src/port/ti/ti-ccm.c \
- wolfcrypt/src/port/pic32/pic32mz-crypt.c \
- wolfcrypt/src/port/nrf51.c wolfcrypt/src/port/arm/armv8-aes.c \
- wolfcrypt/src/port/arm/armv8-sha256.c \
- wolfcrypt/src/port/arm/armv8-chacha.c \
- wolfcrypt/src/port/arm/armv8-curve25519.c \
- wolfcrypt/src/port/arm/armv8-32-curve25519.c \
- wolfcrypt/src/port/arm/armv8-sha512-asm.c \
- wolfcrypt/src/port/arm/armv8-32-sha512-asm.c \
- wolfcrypt/src/port/nxp/ksdk_port.c \
- wolfcrypt/src/port/atmel/README.md \
- wolfcrypt/src/port/xilinx/xil-sha3.c \
- wolfcrypt/src/port/xilinx/xil-aesgcm.c \
- wolfcrypt/src/port/caam/caam_aes.c \
- wolfcrypt/src/port/caam/caam_driver.c \
- wolfcrypt/src/port/caam/caam_init.c \
- wolfcrypt/src/port/caam/caam_sha.c \
- wolfcrypt/src/port/caam/caam_doc.pdf \
- wolfcrypt/src/port/st/stm32.c wolfcrypt/src/port/st/stsafe.c \
- wolfcrypt/src/port/st/README.md \
- wolfcrypt/src/port/af_alg/afalg_aes.c \
- wolfcrypt/src/port/af_alg/afalg_hash.c \
- wolfcrypt/src/port/devcrypto/devcrypto_hash.c \
- wolfcrypt/src/port/devcrypto/wc_devcrypto.c \
- wolfcrypt/src/port/devcrypto/README.md \
- wolfcrypt/src/port/mynewt/mynewt_port.c \
- wolfcrypt/src/port/Espressif/esp32_aes.c \
- wolfcrypt/src/port/Espressif/esp32_sha.c \
- wolfcrypt/src/port/Espressif/esp32_util.c \
- wolfcrypt/src/port/Espressif/esp32_mp.c \
- wolfcrypt/src/port/Espressif/README.md \
- wolfcrypt/src/port/arm/cryptoCell.c \
- wolfcrypt/src/port/arm/cryptoCellHash.c \
- wolfcrypt/src/port/Renesas/renesas_tsip_aes.c \
- wolfcrypt/src/port/Renesas/renesas_tsip_sha.c \
- wolfcrypt/src/port/Renesas/renesas_tsip_util.c \
- wolfcrypt/src/port/Renesas/README.md \
- wolfcrypt/src/port/cypress/psoc6_crypto.c \
- wolfcrypt/src/port/cavium/README.md \
- wolfcrypt/src/port/cavium/README_Octeon.md \
- wolfcrypt/src/port/intel/README.md wolfcrypt/test/test.sln \
- wolfcrypt/test/test.vcproj wolfcrypt/test/README.md \
- examples/client/client.sln examples/client/client-ntru.vcproj \
- examples/client/client.vcproj examples/client/client.vcxproj \
- examples/echoclient/echoclient.sln \
- examples/echoclient/echoclient-ntru.vcproj \
- examples/echoclient/echoclient.vcproj \
- examples/echoclient/echoclient.vcxproj \
- examples/echoserver/echoserver.sln \
- examples/echoserver/echoserver-ntru.vcproj \
- examples/echoserver/echoserver.vcproj \
- examples/echoserver/echoserver.vcxproj \
- examples/server/server.sln examples/server/server-ntru.vcproj \
- examples/server/server.vcproj examples/server/server.vcxproj \
- examples/configs/README.md \
- examples/configs/user_settings_all.h \
- examples/configs/user_settings_min_ecc.h \
- examples/configs/user_settings_wolfboot_keytools.h \
- testsuite/testsuite.sln testsuite/testsuite-ntru.vcproj \
- testsuite/testsuite.vcproj testsuite/testsuite.vcxproj input \
- quit tests/unit.h tests/test.conf tests/test-sha2.conf \
- tests/test-tls13.conf tests/test-tls13-down.conf \
- tests/test-tls13-ecc.conf tests/test-tls13-psk.conf \
- tests/test-qsh.conf tests/test-qsh-sha2.conf \
- tests/test-psk.conf tests/test-psk-no-id.conf \
- tests/test-psk-no-id-sha2.conf tests/test-dtls.conf \
- tests/test-dtls-fails.conf tests/test-dtls-group.conf \
- tests/test-dtls-reneg-client.conf \
- tests/test-dtls-reneg-server.conf tests/test-dtls-resume.conf \
- tests/test-dtls-sha2.conf tests/test-sctp.conf \
- tests/test-sctp-sha2.conf tests/test-sig.conf \
- tests/test-ed25519.conf tests/test-ed448.conf \
- tests/test-enckeys.conf tests/test-maxfrag.conf \
- tests/test-maxfrag-dtls.conf tests/test-fails.conf \
- tests/test-chains.conf tests/test-altchains.conf \
- tests/test-trustpeer.conf tests/test-dhprime.conf \
- sslSniffer/README.md sslSniffer/sslSniffer.vcproj \
- sslSniffer/sslSniffer.vcxproj \
- sslSniffer/sslSnifferTest/sslSniffTest.vcproj \
- $(am__append_148) $(am__append_154) scripts/testsuite.pcap \
- scripts/sniffer-ipv6.pcap scripts/sniffer-tls13-dh.pcap \
- scripts/sniffer-tls13-ecc.pcap scripts/sniffer-tls13-gen.sh \
- scripts/ping.test scripts/openssl.test scripts/dertoc.pl \
- scripts/stm32l4-v4_0_1_build.sh scripts/cleanup_testfiles.sh
-dist_doc_DATA = certs/taoCert.txt doc/README.txt
-dist_noinst_SCRIPTS = $(am__append_152) $(am__append_153) \
- $(am__append_155) $(am__append_156) $(am__append_157) \
- $(am__append_158) $(am__append_159) $(am__append_160) \
- $(am__append_161) $(am__append_162) $(am__append_163)
-noinst_SCRIPTS = $(am__append_18)
-check_SCRIPTS = $(dist_noinst_SCRIPTS)
-exampledir = $(docdir)/example
-dist_example_DATA = examples/benchmark/tls_bench.c \
- examples/client/client.c examples/echoclient/echoclient.c \
- examples/echoserver/echoserver.c examples/server/server.c \
- examples/sctp/sctp-server.c examples/sctp/sctp-server-dtls.c \
- examples/sctp/sctp-client.c examples/sctp/sctp-client-dtls.c
-ACLOCAL_AMFLAGS = -I m4
-src_libwolfssl_la_SOURCES = $(am__append_20) $(am__append_21) \
- $(am__append_22) $(am__append_23) $(am__append_24) \
- $(am__append_25) $(am__append_26) $(am__append_27) \
- $(am__append_28) $(am__append_29) $(am__append_30) \
- $(am__append_31) $(am__append_32) $(am__append_33) \
- $(am__append_34) $(am__append_35) $(am__append_36) \
- $(am__append_37) $(am__append_38) $(am__append_39) \
- $(am__append_40) $(am__append_41) $(am__append_42) \
- $(am__append_43) $(am__append_44) wolfcrypt/src/hash.c \
- wolfcrypt/src/cpuid.c $(am__append_45) $(am__append_46) \
- $(am__append_47) $(am__append_48) $(am__append_49) \
- $(am__append_50) $(am__append_51) $(am__append_52) \
- $(am__append_53) $(am__append_54) $(am__append_55) \
- $(am__append_56) $(am__append_57) $(am__append_58) \
- $(am__append_59) $(am__append_60) $(am__append_61) \
- $(am__append_62) $(am__append_63) $(am__append_64) \
- $(am__append_65) $(am__append_66) $(am__append_67) \
- $(am__append_68) $(am__append_69) $(am__append_70) \
- wolfcrypt/src/logging.c wolfcrypt/src/wc_port.c \
- wolfcrypt/src/error.c $(am__append_71) $(am__append_72) \
- $(am__append_73) $(am__append_74) $(am__append_75) \
- $(am__append_76) $(am__append_77) $(am__append_78) \
- $(am__append_79) $(am__append_80) $(am__append_81) \
- $(am__append_82) $(am__append_83) $(am__append_84) \
- $(am__append_85) $(am__append_86) $(am__append_87) \
- $(am__append_88) $(am__append_89) $(am__append_90) \
- $(am__append_91) $(am__append_92) $(am__append_93) \
- $(am__append_94) $(am__append_95) $(am__append_96) \
- $(am__append_97) $(am__append_98) $(am__append_99) \
- $(am__append_100) $(am__append_101) $(am__append_102) \
- $(am__append_103) $(am__append_104) $(am__append_105) \
- $(am__append_106) $(am__append_107) $(am__append_108) \
- $(am__append_109) $(am__append_110) $(am__append_111) \
- $(am__append_112) $(am__append_113) $(am__append_114) \
- $(am__append_115) $(am__append_116) $(am__append_117) \
- $(am__append_118) $(am__append_119) $(am__append_120) \
- $(am__append_121) $(am__append_122) $(am__append_123) \
- $(am__append_124) $(am__append_125) $(am__append_128) \
- $(am__append_129) $(am__append_130) $(am__append_131) \
- $(am__append_132) $(am__append_133) $(am__append_134) \
- $(am__append_135)
-src_libwolfssl_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${WOLFSSL_LIBRARY_VERSION}
-src_libwolfssl_la_LIBADD = $(LIBM) $(LIB_ADD) $(LIB_STATIC_ADD)
-src_libwolfssl_la_CFLAGS = -DBUILDING_WOLFSSL $(AM_CFLAGS)
-src_libwolfssl_la_CPPFLAGS = -DBUILDING_WOLFSSL $(AM_CPPFLAGS)
-@BUILD_FAST_RSA_TRUE@ippdir = $(libdir)
-@BUILD_FAST_RSA_TRUE@ipp_DATA = $(IPPLIBS)
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = support/wolfssl.pc
-@BUILD_WOLFCRYPT_TESTS_TRUE@wolfcrypt_benchmark_benchmark_SOURCES = wolfcrypt/benchmark/benchmark.c
-@BUILD_WOLFCRYPT_TESTS_TRUE@wolfcrypt_benchmark_benchmark_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_WOLFCRYPT_TESTS_TRUE@wolfcrypt_benchmark_benchmark_DEPENDENCIES = src/libwolfssl.la
-@BUILD_WOLFCRYPT_TESTS_TRUE@wolfcrypt_test_testwolfcrypt_SOURCES = wolfcrypt/test/test.c
-@BUILD_WOLFCRYPT_TESTS_TRUE@wolfcrypt_test_testwolfcrypt_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_WOLFCRYPT_TESTS_TRUE@wolfcrypt_test_testwolfcrypt_DEPENDENCIES = src/libwolfssl.la
-@BUILD_THREADED_EXAMPLES_TRUE@examples_benchmark_tls_bench_SOURCES = examples/benchmark/tls_bench.c
-@BUILD_THREADED_EXAMPLES_TRUE@examples_benchmark_tls_bench_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_THREADED_EXAMPLES_TRUE@examples_benchmark_tls_bench_DEPENDENCIES = src/libwolfssl.la
-@BUILD_EXAMPLE_CLIENTS_TRUE@examples_client_client_SOURCES = examples/client/client.c
-@BUILD_EXAMPLE_CLIENTS_TRUE@examples_client_client_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_EXAMPLE_CLIENTS_TRUE@examples_client_client_DEPENDENCIES = src/libwolfssl.la
-@BUILD_EXAMPLE_CLIENTS_TRUE@examples_echoclient_echoclient_SOURCES = examples/echoclient/echoclient.c
-@BUILD_EXAMPLE_CLIENTS_TRUE@examples_echoclient_echoclient_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_EXAMPLE_CLIENTS_TRUE@examples_echoclient_echoclient_DEPENDENCIES = src/libwolfssl.la
-@BUILD_EXAMPLE_SERVERS_TRUE@examples_echoserver_echoserver_SOURCES = examples/echoserver/echoserver.c
-@BUILD_EXAMPLE_SERVERS_TRUE@examples_echoserver_echoserver_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_EXAMPLE_SERVERS_TRUE@examples_echoserver_echoserver_DEPENDENCIES = src/libwolfssl.la
-@BUILD_EXAMPLE_SERVERS_TRUE@examples_server_server_SOURCES = examples/server/server.c
-@BUILD_EXAMPLE_SERVERS_TRUE@examples_server_server_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_EXAMPLE_SERVERS_TRUE@examples_server_server_DEPENDENCIES = src/libwolfssl.la
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_server_SOURCES = examples/sctp/sctp-server.c
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_server_LDADD = $(LIB_STATIC_ADD)
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_server_dtls_SOURCES = examples/sctp/sctp-server-dtls.c
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_server_dtls_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_server_dtls_DEPENDENCIES = src/libwolfssl.la
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_client_SOURCES = examples/sctp/sctp-client.c
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_client_LDADD = $(LIB_STATIC_ADD)
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_client_dtls_SOURCES = examples/sctp/sctp-client-dtls.c
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_client_dtls_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_EXAMPLE_CLIENTS_TRUE@@BUILD_SCTP_TRUE@examples_sctp_sctp_client_dtls_DEPENDENCIES = src/libwolfssl.la
-@BUILD_TESTS_TRUE@testsuite_testsuite_test_SOURCES = \
-@BUILD_TESTS_TRUE@ wolfcrypt/test/test.c \
-@BUILD_TESTS_TRUE@ examples/client/client.c \
-@BUILD_TESTS_TRUE@ examples/echoclient/echoclient.c \
-@BUILD_TESTS_TRUE@ examples/echoserver/echoserver.c \
-@BUILD_TESTS_TRUE@ examples/server/server.c \
-@BUILD_TESTS_TRUE@ testsuite/testsuite.c
-
-@BUILD_TESTS_TRUE@testsuite_testsuite_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS)
-@BUILD_TESTS_TRUE@testsuite_testsuite_test_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_TESTS_TRUE@testsuite_testsuite_test_DEPENDENCIES = src/libwolfssl.la
-@BUILD_TESTS_TRUE@tests_unit_test_SOURCES = \
-@BUILD_TESTS_TRUE@ tests/unit.c \
-@BUILD_TESTS_TRUE@ tests/api.c \
-@BUILD_TESTS_TRUE@ tests/suites.c \
-@BUILD_TESTS_TRUE@ tests/hash.c \
-@BUILD_TESTS_TRUE@ tests/srp.c \
-@BUILD_TESTS_TRUE@ examples/client/client.c \
-@BUILD_TESTS_TRUE@ examples/server/server.c
-
-@BUILD_TESTS_TRUE@tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS)
-@BUILD_TESTS_TRUE@tests_unit_test_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
-@BUILD_TESTS_TRUE@tests_unit_test_DEPENDENCIES = src/libwolfssl.la
-@BUILD_SNIFFTEST_TRUE@sslSniffer_sslSnifferTest_snifftest_SOURCES = sslSniffer/sslSnifferTest/snifftest.c
-@BUILD_SNIFFTEST_TRUE@sslSniffer_sslSnifferTest_snifftest_LDADD = src/libwolfssl.la -lpcap $(LIB_STATIC_ADD)
-@BUILD_SNIFFTEST_TRUE@sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES = src/libwolfssl.la
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@mcapi_test_SOURCES = mcapi/crypto.c \
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@ mcapi/mcapi_test.c
-
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@mcapi_test_LDADD = src/libwolfssl.la
-@BUILD_DISTRO_FALSE@@BUILD_MCAPI_TRUE@mcapi_test_DEPENDENCIES = src/libwolfssl.la
-
-# Exclude references to non-DFSG sources from build files
-@USE_VALGRIND_TRUE@TESTS_ENVIRONMENT = ./valgrind-error.sh
-TEST_EXTENSIONS = .test
-all: $(BUILT_SOURCES) config.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .log .o .obj .test .test$(EXEEXT) .trs
-am--refresh: Makefile
- @:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/wrapper/include.am $(srcdir)/wrapper/python/wolfcrypt/include.am $(srcdir)/wrapper/python/wolfssl/include.am $(srcdir)/wrapper/CSharp/include.am $(srcdir)/cyassl/include.am $(srcdir)/cyassl/ctaocrypt/include.am $(srcdir)/cyassl/openssl/include.am $(srcdir)/wolfssl/include.am $(srcdir)/wolfssl/wolfcrypt/include.am $(srcdir)/wolfssl/openssl/include.am $(srcdir)/certs/include.am $(srcdir)/certs/1024/include.am $(srcdir)/certs/3072/include.am $(srcdir)/certs/4096/include.am $(srcdir)/certs/crl/include.am $(srcdir)/certs/ecc/include.am $(srcdir)/certs/ed25519/include.am $(srcdir)/certs/ed448/include.am $(srcdir)/certs/external/include.am $(srcdir)/certs/ocsp/include.am $(srcdir)/certs/statickeys/include.am $(srcdir)/certs/test/include.am $(srcdir)/certs/test-pathlen/include.am $(srcdir)/certs/intermediate/include.am $(srcdir)/doc/include.am $(srcdir)/swig/include.am $(srcdir)/src/include.am $(srcdir)/support/include.am $(srcdir)/wolfcrypt/user-crypto/include.am $(srcdir)/wolfcrypt/benchmark/include.am $(srcdir)/wolfcrypt/src/include.am $(srcdir)/wolfcrypt/test/include.am $(srcdir)/examples/include.am $(srcdir)/examples/benchmark/include.am $(srcdir)/examples/client/include.am $(srcdir)/examples/echoclient/include.am $(srcdir)/examples/echoserver/include.am $(srcdir)/examples/server/include.am $(srcdir)/examples/sctp/include.am $(srcdir)/examples/configs/include.am $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am $(srcdir)/sslSniffer/sslSnifferTest/include.am $(srcdir)/rpm/include.am $(srcdir)/mqx/util_lib/Sources/include.am $(srcdir)/mqx/wolfcrypt_benchmark/Sources/include.am $(srcdir)/mqx/wolfcrypt_test/Sources/include.am $(srcdir)/mqx/wolfssl/include.am $(srcdir)/mqx/wolfssl_client/Sources/include.am $(srcdir)/mplabx/include.am $(srcdir)/mplabx/wolfcrypt_benchmark.X/nbproject/include.am $(srcdir)/mplabx/wolfcrypt_test.X/nbproject/include.am $(srcdir)/mplabx/wolfssl.X/nbproject/include.am $(srcdir)/mcapi/include.am $(srcdir)/mcapi/wolfcrypt_mcapi.X/nbproject/include.am $(srcdir)/mcapi/wolfcrypt_test.X/nbproject/include.am $(srcdir)/mcapi/wolfssl.X/nbproject/include.am $(srcdir)/mcapi/zlib.X/nbproject/include.am $(srcdir)/tirtos/include.am $(srcdir)/IDE/include.am $(srcdir)/IDE/XCODE/include.am $(srcdir)/IDE/XCODE/Benchmark/include.am $(srcdir)/IDE/WIN/include.am $(srcdir)/IDE/WIN10/include.am $(srcdir)/IDE/WIN-SGX/include.am $(srcdir)/IDE/LINUX-SGX/include.am $(srcdir)/IDE/WORKBENCH/include.am $(srcdir)/IDE/ROWLEY-CROSSWORKS-ARM/include.am $(srcdir)/IDE/TRUESTUDIO/include.am $(srcdir)/IDE/ARDUINO/include.am $(srcdir)/IDE/INTIME-RTOS/include.am $(srcdir)/IDE/STM32Cube/include.am $(srcdir)/IDE/VS-ARM/include.am $(srcdir)/IDE/VS-AZURE-SPHERE/include.am $(srcdir)/IDE/GCC-ARM/include.am $(srcdir)/IDE/CSBENCH/include.am $(srcdir)/IDE/ECLIPSE/DEOS/include.am $(srcdir)/IDE/ECLIPSE/MICRIUM/include.am $(srcdir)/IDE/ECLIPSE/SIFIVE/include.am $(srcdir)/IDE/mynewt/include.am $(srcdir)/IDE/Renesas/e2studio/DK-S7G2/include.am $(srcdir)/IDE/Renesas/cs+/Projects/include.am $(srcdir)/IDE/Renesas/e2studio/Projects/include.am $(srcdir)/IDE/Renesas/e2studio/RA6M3/include.am $(srcdir)/IDE/Renesas/e2studio/GR-ROSE/include.am $(srcdir)/IDE/Renesas/e2studio/RX72NEnvisionKit/include.am $(srcdir)/IDE/WICED-STUDIO/include.am $(srcdir)/IDE/CRYPTOCELL/include.am $(srcdir)/IDE/M68K/include.am $(srcdir)/IDE/HEXAGON/include.am $(srcdir)/IDE/RISCV/include.am $(srcdir)/IDE/RISCV/SIFIVE-HIFIVE1/include.am $(srcdir)/IDE/RISCV/SIFIVE-UNLEASHED/include.am $(srcdir)/IDE/XilinxSDK/include.am $(srcdir)/scripts/include.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
- $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
- esac;
-$(srcdir)/wrapper/include.am $(srcdir)/wrapper/python/wolfcrypt/include.am $(srcdir)/wrapper/python/wolfssl/include.am $(srcdir)/wrapper/CSharp/include.am $(srcdir)/cyassl/include.am $(srcdir)/cyassl/ctaocrypt/include.am $(srcdir)/cyassl/openssl/include.am $(srcdir)/wolfssl/include.am $(srcdir)/wolfssl/wolfcrypt/include.am $(srcdir)/wolfssl/openssl/include.am $(srcdir)/certs/include.am $(srcdir)/certs/1024/include.am $(srcdir)/certs/3072/include.am $(srcdir)/certs/4096/include.am $(srcdir)/certs/crl/include.am $(srcdir)/certs/ecc/include.am $(srcdir)/certs/ed25519/include.am $(srcdir)/certs/ed448/include.am $(srcdir)/certs/external/include.am $(srcdir)/certs/ocsp/include.am $(srcdir)/certs/statickeys/include.am $(srcdir)/certs/test/include.am $(srcdir)/certs/test-pathlen/include.am $(srcdir)/certs/intermediate/include.am $(srcdir)/doc/include.am $(srcdir)/swig/include.am $(srcdir)/src/include.am $(srcdir)/support/include.am $(srcdir)/wolfcrypt/user-crypto/include.am $(srcdir)/wolfcrypt/benchmark/include.am $(srcdir)/wolfcrypt/src/include.am $(srcdir)/wolfcrypt/test/include.am $(srcdir)/examples/include.am $(srcdir)/examples/benchmark/include.am $(srcdir)/examples/client/include.am $(srcdir)/examples/echoclient/include.am $(srcdir)/examples/echoserver/include.am $(srcdir)/examples/server/include.am $(srcdir)/examples/sctp/include.am $(srcdir)/examples/configs/include.am $(srcdir)/testsuite/include.am $(srcdir)/tests/include.am $(srcdir)/sslSniffer/sslSnifferTest/include.am $(srcdir)/rpm/include.am $(srcdir)/mqx/util_lib/Sources/include.am $(srcdir)/mqx/wolfcrypt_benchmark/Sources/include.am $(srcdir)/mqx/wolfcrypt_test/Sources/include.am $(srcdir)/mqx/wolfssl/include.am $(srcdir)/mqx/wolfssl_client/Sources/include.am $(srcdir)/mplabx/include.am $(srcdir)/mplabx/wolfcrypt_benchmark.X/nbproject/include.am $(srcdir)/mplabx/wolfcrypt_test.X/nbproject/include.am $(srcdir)/mplabx/wolfssl.X/nbproject/include.am $(srcdir)/mcapi/include.am $(srcdir)/mcapi/wolfcrypt_mcapi.X/nbproject/include.am $(srcdir)/mcapi/wolfcrypt_test.X/nbproject/include.am $(srcdir)/mcapi/wolfssl.X/nbproject/include.am $(srcdir)/mcapi/zlib.X/nbproject/include.am $(srcdir)/tirtos/include.am $(srcdir)/IDE/include.am $(srcdir)/IDE/XCODE/include.am $(srcdir)/IDE/XCODE/Benchmark/include.am $(srcdir)/IDE/WIN/include.am $(srcdir)/IDE/WIN10/include.am $(srcdir)/IDE/WIN-SGX/include.am $(srcdir)/IDE/LINUX-SGX/include.am $(srcdir)/IDE/WORKBENCH/include.am $(srcdir)/IDE/ROWLEY-CROSSWORKS-ARM/include.am $(srcdir)/IDE/TRUESTUDIO/include.am $(srcdir)/IDE/ARDUINO/include.am $(srcdir)/IDE/INTIME-RTOS/include.am $(srcdir)/IDE/STM32Cube/include.am $(srcdir)/IDE/VS-ARM/include.am $(srcdir)/IDE/VS-AZURE-SPHERE/include.am $(srcdir)/IDE/GCC-ARM/include.am $(srcdir)/IDE/CSBENCH/include.am $(srcdir)/IDE/ECLIPSE/DEOS/include.am $(srcdir)/IDE/ECLIPSE/MICRIUM/include.am $(srcdir)/IDE/ECLIPSE/SIFIVE/include.am $(srcdir)/IDE/mynewt/include.am $(srcdir)/IDE/Renesas/e2studio/DK-S7G2/include.am $(srcdir)/IDE/Renesas/cs+/Projects/include.am $(srcdir)/IDE/Renesas/e2studio/Projects/include.am $(srcdir)/IDE/Renesas/e2studio/RA6M3/include.am $(srcdir)/IDE/Renesas/e2studio/GR-ROSE/include.am $(srcdir)/IDE/Renesas/e2studio/RX72NEnvisionKit/include.am $(srcdir)/IDE/WICED-STUDIO/include.am $(srcdir)/IDE/CRYPTOCELL/include.am $(srcdir)/IDE/M68K/include.am $(srcdir)/IDE/HEXAGON/include.am $(srcdir)/IDE/RISCV/include.am $(srcdir)/IDE/RISCV/SIFIVE-HIFIVE1/include.am $(srcdir)/IDE/RISCV/SIFIVE-UNLEASHED/include.am $(srcdir)/IDE/XilinxSDK/include.am $(srcdir)/scripts/include.am $(am__empty):
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: $(am__configure_deps)
- $(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-$(am__aclocal_m4_deps):
-
-config.h: stamp-h1
- @test -f $@ || rm -f stamp-h1
- @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
-
-stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.in: $(am__configure_deps)
- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f stamp-h1
- touch $@
-
-distclean-hdr:
- -rm -f config.h stamp-h1
-stamp-h: $(top_builddir)/config.status $(srcdir)/stamp-h.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-wolfssl/version.h: $(top_builddir)/config.status $(top_srcdir)/wolfssl/version.h.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-wolfssl/options.h: $(top_builddir)/config.status $(top_srcdir)/wolfssl/options.h.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-cyassl/options.h: $(top_builddir)/config.status $(top_srcdir)/cyassl/options.h.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-support/wolfssl.pc: $(top_builddir)/config.status $(top_srcdir)/support/wolfssl.pc.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-rpm/spec: $(top_builddir)/config.status $(top_srcdir)/rpm/spec.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
- fi; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p \
- || test -f $$p1 \
- ; then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' \
- -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' \
- `; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
- @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-
-clean-checkPROGRAMS:
- @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- list2=; for p in $$list; do \
- if test -f $$p; then \
- list2="$$list2 $$p"; \
- else :; fi; \
- done; \
- test -z "$$list2" || { \
- echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
- }
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
- done
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; \
- locs=`for p in $$list; do echo $$p; done | \
- sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
- sort -u`; \
- test -z "$$locs" || { \
- echo rm -f $${locs}; \
- rm -f $${locs}; \
- }
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; \
- locs=`for p in $$list; do echo $$p; done | \
- sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
- sort -u`; \
- test -z "$$locs" || { \
- echo rm -f $${locs}; \
- rm -f $${locs}; \
- }
-ctaocrypt/src/$(am__dirstamp):
- @$(MKDIR_P) ctaocrypt/src
- @: > ctaocrypt/src/$(am__dirstamp)
-ctaocrypt/src/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) ctaocrypt/src/$(DEPDIR)
- @: > ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-wolfcrypt_first.lo: \
- ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-hmac.lo: \
- ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-random.lo: \
- ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-sha256.lo: \
- ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-rsa.lo: ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-aes.lo: ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-des3.lo: \
- ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-sha.lo: ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-sha512.lo: \
- ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-fips.lo: \
- ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-fips_test.lo: \
- ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-ctaocrypt/src/src_libwolfssl_la-wolfcrypt_last.lo: \
- ctaocrypt/src/$(am__dirstamp) \
- ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src
- @: > wolfcrypt/src/$(am__dirstamp)
-wolfcrypt/src/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/$(DEPDIR)
- @: > wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-wolfcrypt_first.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-hmac.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-random.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sha256.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-rsa.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-ecc.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-aes.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-aes_asm.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-aes_gcm_asm.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-des3.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sha.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sha256_asm.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sha512.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sha512_asm.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sha3.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-dh.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-cmac.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-fips.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-fips_test.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-wolfcrypt_last.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-selftest.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-hash.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-cpuid.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/arm/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/arm
- @: > wolfcrypt/src/port/arm/$(am__dirstamp)
-wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/arm/$(DEPDIR)
- @: > wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha256.lo: \
- wolfcrypt/src/port/arm/$(am__dirstamp) \
- wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/af_alg/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/af_alg
- @: > wolfcrypt/src/port/af_alg/$(am__dirstamp)
-wolfcrypt/src/port/af_alg/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/af_alg/$(DEPDIR)
- @: > wolfcrypt/src/port/af_alg/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_hash.lo: \
- wolfcrypt/src/port/af_alg/$(am__dirstamp) \
- wolfcrypt/src/port/af_alg/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-wolfevent.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-async.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/user-crypto/src/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/user-crypto/src
- @: > wolfcrypt/user-crypto/src/$(am__dirstamp)
-wolfcrypt/user-crypto/src/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/user-crypto/src/$(DEPDIR)
- @: > wolfcrypt/user-crypto/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/user-crypto/src/src_libwolfssl_la-rsa.lo: \
- wolfcrypt/user-crypto/src/$(am__dirstamp) \
- wolfcrypt/user-crypto/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sp_c32.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sp_c64.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sp_x86_64.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sp_arm32.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sp_armthumb.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sp_arm64.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sp_int.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-sp_cortexm.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-aes.lo: \
- wolfcrypt/src/port/arm/$(am__dirstamp) \
- wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_aes.lo: \
- wolfcrypt/src/port/af_alg/$(am__dirstamp) \
- wolfcrypt/src/port/af_alg/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512.lo: \
- wolfcrypt/src/port/arm/$(am__dirstamp) \
- wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512-asm.lo: \
- wolfcrypt/src/port/arm/$(am__dirstamp) \
- wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-sha512-asm.lo: \
- wolfcrypt/src/port/arm/$(am__dirstamp) \
- wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-logging.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-wc_port.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-error.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-wc_encrypt.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-signature.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-wolfmath.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-memory.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-asn.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-coding.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-poly1305.lo: \
- wolfcrypt/src/port/arm/$(am__dirstamp) \
- wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-poly1305.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-poly1305_asm.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-arc4.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-md4.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-md5.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-pwdbased.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-pkcs12.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-dsa.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-camellia.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-md2.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-ripemd.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-blake2b.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-blake2s.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-hc128.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-rabbit.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-chacha.lo: \
- wolfcrypt/src/port/arm/$(am__dirstamp) \
- wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-chacha.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-chacha_asm.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-chacha20_poly1305.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-misc.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-tfm.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-integer.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-curve25519.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-ed25519.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-fe_low_mem.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-fe_x25519_asm.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-curve25519.lo: \
- wolfcrypt/src/port/arm/$(am__dirstamp) \
- wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-curve25519.lo: \
- wolfcrypt/src/port/arm/$(am__dirstamp) \
- wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-fe_operations.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-ge_low_mem.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-ge_operations.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-curve448.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-ed448.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-fe_448.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-ge_448.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-compress.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-pkcs7.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-srp.lo: wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-idea.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/af_alg/src_libwolfssl_la-wc_afalg.lo: \
- wolfcrypt/src/port/af_alg/$(am__dirstamp) \
- wolfcrypt/src/port/af_alg/$(DEPDIR)/$(am__dirstamp)
-src/$(am__dirstamp):
- @$(MKDIR_P) src
- @: > src/$(am__dirstamp)
-src/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) src/$(DEPDIR)
- @: > src/$(DEPDIR)/$(am__dirstamp)
-src/libwolfssl_la-internal.lo: src/$(am__dirstamp) \
- src/$(DEPDIR)/$(am__dirstamp)
-src/libwolfssl_la-wolfio.lo: src/$(am__dirstamp) \
- src/$(DEPDIR)/$(am__dirstamp)
-src/libwolfssl_la-keys.lo: src/$(am__dirstamp) \
- src/$(DEPDIR)/$(am__dirstamp)
-src/libwolfssl_la-ssl.lo: src/$(am__dirstamp) \
- src/$(DEPDIR)/$(am__dirstamp)
-src/libwolfssl_la-tls.lo: src/$(am__dirstamp) \
- src/$(DEPDIR)/$(am__dirstamp)
-src/libwolfssl_la-tls13.lo: src/$(am__dirstamp) \
- src/$(DEPDIR)/$(am__dirstamp)
-src/libwolfssl_la-ocsp.lo: src/$(am__dirstamp) \
- src/$(DEPDIR)/$(am__dirstamp)
-src/libwolfssl_la-crl.lo: src/$(am__dirstamp) \
- src/$(DEPDIR)/$(am__dirstamp)
-src/libwolfssl_la-sniffer.lo: src/$(am__dirstamp) \
- src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-cryptocb.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/src_libwolfssl_la-wc_pkcs11.lo: \
- wolfcrypt/src/$(am__dirstamp) \
- wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/devcrypto/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/devcrypto
- @: > wolfcrypt/src/port/devcrypto/$(am__dirstamp)
-wolfcrypt/src/port/devcrypto/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/devcrypto/$(DEPDIR)
- @: > wolfcrypt/src/port/devcrypto/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_hash.lo: \
- wolfcrypt/src/port/devcrypto/$(am__dirstamp) \
- wolfcrypt/src/port/devcrypto/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_aes.lo: \
- wolfcrypt/src/port/devcrypto/$(am__dirstamp) \
- wolfcrypt/src/port/devcrypto/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/devcrypto/src_libwolfssl_la-wc_devcrypto.lo: \
- wolfcrypt/src/port/devcrypto/$(am__dirstamp) \
- wolfcrypt/src/port/devcrypto/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/cavium/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/cavium
- @: > wolfcrypt/src/port/cavium/$(am__dirstamp)
-wolfcrypt/src/port/cavium/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/cavium/$(DEPDIR)
- @: > wolfcrypt/src/port/cavium/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_nitrox.lo: \
- wolfcrypt/src/port/cavium/$(am__dirstamp) \
- wolfcrypt/src/port/cavium/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_octeon_sync.lo: \
- wolfcrypt/src/port/cavium/$(am__dirstamp) \
- wolfcrypt/src/port/cavium/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/intel/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/intel
- @: > wolfcrypt/src/port/intel/$(am__dirstamp)
-wolfcrypt/src/port/intel/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/intel/$(DEPDIR)
- @: > wolfcrypt/src/port/intel/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist.lo: \
- wolfcrypt/src/port/intel/$(am__dirstamp) \
- wolfcrypt/src/port/intel/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_mem.lo: \
- wolfcrypt/src/port/intel/$(am__dirstamp) \
- wolfcrypt/src/port/intel/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_sync.lo: \
- wolfcrypt/src/port/intel/$(am__dirstamp) \
- wolfcrypt/src/port/intel/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/atmel/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/atmel
- @: > wolfcrypt/src/port/atmel/$(am__dirstamp)
-wolfcrypt/src/port/atmel/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/src/port/atmel/$(DEPDIR)
- @: > wolfcrypt/src/port/atmel/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/src/port/atmel/src_libwolfssl_la-atmel.lo: \
- wolfcrypt/src/port/atmel/$(am__dirstamp) \
- wolfcrypt/src/port/atmel/$(DEPDIR)/$(am__dirstamp)
-
-src/libwolfssl.la: $(src_libwolfssl_la_OBJECTS) $(src_libwolfssl_la_DEPENDENCIES) $(EXTRA_src_libwolfssl_la_DEPENDENCIES) src/$(am__dirstamp)
- $(AM_V_CCLD)$(src_libwolfssl_la_LINK) -rpath $(libdir) $(src_libwolfssl_la_OBJECTS) $(src_libwolfssl_la_LIBADD) $(LIBS)
-examples/benchmark/$(am__dirstamp):
- @$(MKDIR_P) examples/benchmark
- @: > examples/benchmark/$(am__dirstamp)
-examples/benchmark/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) examples/benchmark/$(DEPDIR)
- @: > examples/benchmark/$(DEPDIR)/$(am__dirstamp)
-examples/benchmark/tls_bench.$(OBJEXT): \
- examples/benchmark/$(am__dirstamp) \
- examples/benchmark/$(DEPDIR)/$(am__dirstamp)
-
-examples/benchmark/tls_bench$(EXEEXT): $(examples_benchmark_tls_bench_OBJECTS) $(examples_benchmark_tls_bench_DEPENDENCIES) $(EXTRA_examples_benchmark_tls_bench_DEPENDENCIES) examples/benchmark/$(am__dirstamp)
- @rm -f examples/benchmark/tls_bench$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(examples_benchmark_tls_bench_OBJECTS) $(examples_benchmark_tls_bench_LDADD) $(LIBS)
-examples/client/$(am__dirstamp):
- @$(MKDIR_P) examples/client
- @: > examples/client/$(am__dirstamp)
-examples/client/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) examples/client/$(DEPDIR)
- @: > examples/client/$(DEPDIR)/$(am__dirstamp)
-examples/client/client.$(OBJEXT): examples/client/$(am__dirstamp) \
- examples/client/$(DEPDIR)/$(am__dirstamp)
-
-examples/client/client$(EXEEXT): $(examples_client_client_OBJECTS) $(examples_client_client_DEPENDENCIES) $(EXTRA_examples_client_client_DEPENDENCIES) examples/client/$(am__dirstamp)
- @rm -f examples/client/client$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(examples_client_client_OBJECTS) $(examples_client_client_LDADD) $(LIBS)
-examples/echoclient/$(am__dirstamp):
- @$(MKDIR_P) examples/echoclient
- @: > examples/echoclient/$(am__dirstamp)
-examples/echoclient/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) examples/echoclient/$(DEPDIR)
- @: > examples/echoclient/$(DEPDIR)/$(am__dirstamp)
-examples/echoclient/echoclient.$(OBJEXT): \
- examples/echoclient/$(am__dirstamp) \
- examples/echoclient/$(DEPDIR)/$(am__dirstamp)
-
-examples/echoclient/echoclient$(EXEEXT): $(examples_echoclient_echoclient_OBJECTS) $(examples_echoclient_echoclient_DEPENDENCIES) $(EXTRA_examples_echoclient_echoclient_DEPENDENCIES) examples/echoclient/$(am__dirstamp)
- @rm -f examples/echoclient/echoclient$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(examples_echoclient_echoclient_OBJECTS) $(examples_echoclient_echoclient_LDADD) $(LIBS)
-examples/echoserver/$(am__dirstamp):
- @$(MKDIR_P) examples/echoserver
- @: > examples/echoserver/$(am__dirstamp)
-examples/echoserver/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) examples/echoserver/$(DEPDIR)
- @: > examples/echoserver/$(DEPDIR)/$(am__dirstamp)
-examples/echoserver/echoserver.$(OBJEXT): \
- examples/echoserver/$(am__dirstamp) \
- examples/echoserver/$(DEPDIR)/$(am__dirstamp)
-
-examples/echoserver/echoserver$(EXEEXT): $(examples_echoserver_echoserver_OBJECTS) $(examples_echoserver_echoserver_DEPENDENCIES) $(EXTRA_examples_echoserver_echoserver_DEPENDENCIES) examples/echoserver/$(am__dirstamp)
- @rm -f examples/echoserver/echoserver$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(examples_echoserver_echoserver_OBJECTS) $(examples_echoserver_echoserver_LDADD) $(LIBS)
-examples/sctp/$(am__dirstamp):
- @$(MKDIR_P) examples/sctp
- @: > examples/sctp/$(am__dirstamp)
-examples/sctp/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) examples/sctp/$(DEPDIR)
- @: > examples/sctp/$(DEPDIR)/$(am__dirstamp)
-examples/sctp/sctp-client.$(OBJEXT): examples/sctp/$(am__dirstamp) \
- examples/sctp/$(DEPDIR)/$(am__dirstamp)
-
-examples/sctp/sctp-client$(EXEEXT): $(examples_sctp_sctp_client_OBJECTS) $(examples_sctp_sctp_client_DEPENDENCIES) $(EXTRA_examples_sctp_sctp_client_DEPENDENCIES) examples/sctp/$(am__dirstamp)
- @rm -f examples/sctp/sctp-client$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(examples_sctp_sctp_client_OBJECTS) $(examples_sctp_sctp_client_LDADD) $(LIBS)
-examples/sctp/sctp-client-dtls.$(OBJEXT): \
- examples/sctp/$(am__dirstamp) \
- examples/sctp/$(DEPDIR)/$(am__dirstamp)
-
-examples/sctp/sctp-client-dtls$(EXEEXT): $(examples_sctp_sctp_client_dtls_OBJECTS) $(examples_sctp_sctp_client_dtls_DEPENDENCIES) $(EXTRA_examples_sctp_sctp_client_dtls_DEPENDENCIES) examples/sctp/$(am__dirstamp)
- @rm -f examples/sctp/sctp-client-dtls$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(examples_sctp_sctp_client_dtls_OBJECTS) $(examples_sctp_sctp_client_dtls_LDADD) $(LIBS)
-examples/sctp/sctp-server.$(OBJEXT): examples/sctp/$(am__dirstamp) \
- examples/sctp/$(DEPDIR)/$(am__dirstamp)
-
-examples/sctp/sctp-server$(EXEEXT): $(examples_sctp_sctp_server_OBJECTS) $(examples_sctp_sctp_server_DEPENDENCIES) $(EXTRA_examples_sctp_sctp_server_DEPENDENCIES) examples/sctp/$(am__dirstamp)
- @rm -f examples/sctp/sctp-server$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(examples_sctp_sctp_server_OBJECTS) $(examples_sctp_sctp_server_LDADD) $(LIBS)
-examples/sctp/sctp-server-dtls.$(OBJEXT): \
- examples/sctp/$(am__dirstamp) \
- examples/sctp/$(DEPDIR)/$(am__dirstamp)
-
-examples/sctp/sctp-server-dtls$(EXEEXT): $(examples_sctp_sctp_server_dtls_OBJECTS) $(examples_sctp_sctp_server_dtls_DEPENDENCIES) $(EXTRA_examples_sctp_sctp_server_dtls_DEPENDENCIES) examples/sctp/$(am__dirstamp)
- @rm -f examples/sctp/sctp-server-dtls$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(examples_sctp_sctp_server_dtls_OBJECTS) $(examples_sctp_sctp_server_dtls_LDADD) $(LIBS)
-examples/server/$(am__dirstamp):
- @$(MKDIR_P) examples/server
- @: > examples/server/$(am__dirstamp)
-examples/server/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) examples/server/$(DEPDIR)
- @: > examples/server/$(DEPDIR)/$(am__dirstamp)
-examples/server/server.$(OBJEXT): examples/server/$(am__dirstamp) \
- examples/server/$(DEPDIR)/$(am__dirstamp)
-
-examples/server/server$(EXEEXT): $(examples_server_server_OBJECTS) $(examples_server_server_DEPENDENCIES) $(EXTRA_examples_server_server_DEPENDENCIES) examples/server/$(am__dirstamp)
- @rm -f examples/server/server$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(examples_server_server_OBJECTS) $(examples_server_server_LDADD) $(LIBS)
-mcapi/$(am__dirstamp):
- @$(MKDIR_P) mcapi
- @: > mcapi/$(am__dirstamp)
-mcapi/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) mcapi/$(DEPDIR)
- @: > mcapi/$(DEPDIR)/$(am__dirstamp)
-mcapi/crypto.$(OBJEXT): mcapi/$(am__dirstamp) \
- mcapi/$(DEPDIR)/$(am__dirstamp)
-mcapi/mcapi_test.$(OBJEXT): mcapi/$(am__dirstamp) \
- mcapi/$(DEPDIR)/$(am__dirstamp)
-
-mcapi/test$(EXEEXT): $(mcapi_test_OBJECTS) $(mcapi_test_DEPENDENCIES) $(EXTRA_mcapi_test_DEPENDENCIES) mcapi/$(am__dirstamp)
- @rm -f mcapi/test$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(mcapi_test_OBJECTS) $(mcapi_test_LDADD) $(LIBS)
-sslSniffer/sslSnifferTest/$(am__dirstamp):
- @$(MKDIR_P) sslSniffer/sslSnifferTest
- @: > sslSniffer/sslSnifferTest/$(am__dirstamp)
-sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) sslSniffer/sslSnifferTest/$(DEPDIR)
- @: > sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp)
-sslSniffer/sslSnifferTest/snifftest.$(OBJEXT): \
- sslSniffer/sslSnifferTest/$(am__dirstamp) \
- sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp)
-
-sslSniffer/sslSnifferTest/snifftest$(EXEEXT): $(sslSniffer_sslSnifferTest_snifftest_OBJECTS) $(sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES) $(EXTRA_sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES) sslSniffer/sslSnifferTest/$(am__dirstamp)
- @rm -f sslSniffer/sslSnifferTest/snifftest$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sslSniffer_sslSnifferTest_snifftest_OBJECTS) $(sslSniffer_sslSnifferTest_snifftest_LDADD) $(LIBS)
-tests/$(am__dirstamp):
- @$(MKDIR_P) tests
- @: > tests/$(am__dirstamp)
-tests/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tests/$(DEPDIR)
- @: > tests/$(DEPDIR)/$(am__dirstamp)
-tests/unit_test-unit.$(OBJEXT): tests/$(am__dirstamp) \
- tests/$(DEPDIR)/$(am__dirstamp)
-tests/unit_test-api.$(OBJEXT): tests/$(am__dirstamp) \
- tests/$(DEPDIR)/$(am__dirstamp)
-tests/unit_test-suites.$(OBJEXT): tests/$(am__dirstamp) \
- tests/$(DEPDIR)/$(am__dirstamp)
-tests/unit_test-hash.$(OBJEXT): tests/$(am__dirstamp) \
- tests/$(DEPDIR)/$(am__dirstamp)
-tests/unit_test-srp.$(OBJEXT): tests/$(am__dirstamp) \
- tests/$(DEPDIR)/$(am__dirstamp)
-examples/client/tests_unit_test-client.$(OBJEXT): \
- examples/client/$(am__dirstamp) \
- examples/client/$(DEPDIR)/$(am__dirstamp)
-examples/server/tests_unit_test-server.$(OBJEXT): \
- examples/server/$(am__dirstamp) \
- examples/server/$(DEPDIR)/$(am__dirstamp)
-
-tests/unit.test$(EXEEXT): $(tests_unit_test_OBJECTS) $(tests_unit_test_DEPENDENCIES) $(EXTRA_tests_unit_test_DEPENDENCIES) tests/$(am__dirstamp)
- @rm -f tests/unit.test$(EXEEXT)
- $(AM_V_CCLD)$(tests_unit_test_LINK) $(tests_unit_test_OBJECTS) $(tests_unit_test_LDADD) $(LIBS)
-wolfcrypt/test/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/test
- @: > wolfcrypt/test/$(am__dirstamp)
-wolfcrypt/test/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/test/$(DEPDIR)
- @: > wolfcrypt/test/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/test/testsuite_testsuite_test-test.$(OBJEXT): \
- wolfcrypt/test/$(am__dirstamp) \
- wolfcrypt/test/$(DEPDIR)/$(am__dirstamp)
-examples/client/testsuite_testsuite_test-client.$(OBJEXT): \
- examples/client/$(am__dirstamp) \
- examples/client/$(DEPDIR)/$(am__dirstamp)
-examples/echoclient/testsuite_testsuite_test-echoclient.$(OBJEXT): \
- examples/echoclient/$(am__dirstamp) \
- examples/echoclient/$(DEPDIR)/$(am__dirstamp)
-examples/echoserver/testsuite_testsuite_test-echoserver.$(OBJEXT): \
- examples/echoserver/$(am__dirstamp) \
- examples/echoserver/$(DEPDIR)/$(am__dirstamp)
-examples/server/testsuite_testsuite_test-server.$(OBJEXT): \
- examples/server/$(am__dirstamp) \
- examples/server/$(DEPDIR)/$(am__dirstamp)
-testsuite/$(am__dirstamp):
- @$(MKDIR_P) testsuite
- @: > testsuite/$(am__dirstamp)
-testsuite/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) testsuite/$(DEPDIR)
- @: > testsuite/$(DEPDIR)/$(am__dirstamp)
-testsuite/testsuite_test-testsuite.$(OBJEXT): \
- testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/testsuite.test$(EXEEXT): $(testsuite_testsuite_test_OBJECTS) $(testsuite_testsuite_test_DEPENDENCIES) $(EXTRA_testsuite_testsuite_test_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/testsuite.test$(EXEEXT)
- $(AM_V_CCLD)$(testsuite_testsuite_test_LINK) $(testsuite_testsuite_test_OBJECTS) $(testsuite_testsuite_test_LDADD) $(LIBS)
-wolfcrypt/benchmark/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/benchmark
- @: > wolfcrypt/benchmark/$(am__dirstamp)
-wolfcrypt/benchmark/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) wolfcrypt/benchmark/$(DEPDIR)
- @: > wolfcrypt/benchmark/$(DEPDIR)/$(am__dirstamp)
-wolfcrypt/benchmark/benchmark.$(OBJEXT): \
- wolfcrypt/benchmark/$(am__dirstamp) \
- wolfcrypt/benchmark/$(DEPDIR)/$(am__dirstamp)
-
-wolfcrypt/benchmark/benchmark$(EXEEXT): $(wolfcrypt_benchmark_benchmark_OBJECTS) $(wolfcrypt_benchmark_benchmark_DEPENDENCIES) $(EXTRA_wolfcrypt_benchmark_benchmark_DEPENDENCIES) wolfcrypt/benchmark/$(am__dirstamp)
- @rm -f wolfcrypt/benchmark/benchmark$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(wolfcrypt_benchmark_benchmark_OBJECTS) $(wolfcrypt_benchmark_benchmark_LDADD) $(LIBS)
-wolfcrypt/test/test.$(OBJEXT): wolfcrypt/test/$(am__dirstamp) \
- wolfcrypt/test/$(DEPDIR)/$(am__dirstamp)
-
-wolfcrypt/test/testwolfcrypt$(EXEEXT): $(wolfcrypt_test_testwolfcrypt_OBJECTS) $(wolfcrypt_test_testwolfcrypt_DEPENDENCIES) $(EXTRA_wolfcrypt_test_testwolfcrypt_DEPENDENCIES) wolfcrypt/test/$(am__dirstamp)
- @rm -f wolfcrypt/test/testwolfcrypt$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(wolfcrypt_test_testwolfcrypt_OBJECTS) $(wolfcrypt_test_testwolfcrypt_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
- -rm -f ctaocrypt/src/*.$(OBJEXT)
- -rm -f ctaocrypt/src/*.lo
- -rm -f examples/benchmark/*.$(OBJEXT)
- -rm -f examples/client/*.$(OBJEXT)
- -rm -f examples/echoclient/*.$(OBJEXT)
- -rm -f examples/echoserver/*.$(OBJEXT)
- -rm -f examples/sctp/*.$(OBJEXT)
- -rm -f examples/server/*.$(OBJEXT)
- -rm -f mcapi/*.$(OBJEXT)
- -rm -f src/*.$(OBJEXT)
- -rm -f src/*.lo
- -rm -f sslSniffer/sslSnifferTest/*.$(OBJEXT)
- -rm -f tests/*.$(OBJEXT)
- -rm -f testsuite/*.$(OBJEXT)
- -rm -f wolfcrypt/benchmark/*.$(OBJEXT)
- -rm -f wolfcrypt/src/*.$(OBJEXT)
- -rm -f wolfcrypt/src/*.lo
- -rm -f wolfcrypt/src/port/af_alg/*.$(OBJEXT)
- -rm -f wolfcrypt/src/port/af_alg/*.lo
- -rm -f wolfcrypt/src/port/arm/*.$(OBJEXT)
- -rm -f wolfcrypt/src/port/arm/*.lo
- -rm -f wolfcrypt/src/port/atmel/*.$(OBJEXT)
- -rm -f wolfcrypt/src/port/atmel/*.lo
- -rm -f wolfcrypt/src/port/cavium/*.$(OBJEXT)
- -rm -f wolfcrypt/src/port/cavium/*.lo
- -rm -f wolfcrypt/src/port/devcrypto/*.$(OBJEXT)
- -rm -f wolfcrypt/src/port/devcrypto/*.lo
- -rm -f wolfcrypt/src/port/intel/*.$(OBJEXT)
- -rm -f wolfcrypt/src/port/intel/*.lo
- -rm -f wolfcrypt/test/*.$(OBJEXT)
- -rm -f wolfcrypt/user-crypto/src/*.$(OBJEXT)
- -rm -f wolfcrypt/user-crypto/src/*.lo
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/benchmark/$(DEPDIR)/tls_bench.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/client/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/client/$(DEPDIR)/tests_unit_test-client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/echoclient/$(DEPDIR)/echoclient.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/echoserver/$(DEPDIR)/echoserver.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/sctp/$(DEPDIR)/sctp-client-dtls.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/sctp/$(DEPDIR)/sctp-client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/sctp/$(DEPDIR)/sctp-server-dtls.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/sctp/$(DEPDIR)/sctp-server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/server/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/server/$(DEPDIR)/tests_unit_test-server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@mcapi/$(DEPDIR)/crypto.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@mcapi/$(DEPDIR)/mcapi_test.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwolfssl_la-crl.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwolfssl_la-internal.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwolfssl_la-keys.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwolfssl_la-ocsp.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwolfssl_la-sniffer.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwolfssl_la-ssl.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwolfssl_la-tls.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwolfssl_la-tls13.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libwolfssl_la-wolfio.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sslSniffer/sslSnifferTest/$(DEPDIR)/snifftest.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/unit_test-api.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/unit_test-hash.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/unit_test-srp.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/unit_test-suites.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/unit_test-unit.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/testsuite_test-testsuite.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/benchmark/$(DEPDIR)/benchmark.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_asm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_gcm_asm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-arc4.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-asn.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-async.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2b.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2s.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-camellia.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha20_poly1305.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha_asm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cmac.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-coding.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-compress.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cpuid.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cryptocb.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve25519.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve448.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dh.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dsa.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ecc.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed25519.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed448.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-error.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_448.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_low_mem.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_operations.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_x25519_asm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_448.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_low_mem.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_operations.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hash.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hc128.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-idea.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-integer.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-logging.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md2.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md4.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md5.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-memory.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-misc.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs12.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs7.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305_asm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pwdbased.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rabbit.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ripemd.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-selftest.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256_asm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha3.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512_asm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-signature.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm32.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm64.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_armthumb.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c32.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c64.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_cortexm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_int.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64_asm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-srp.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-tfm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_encrypt.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_pkcs11.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_port.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfevent.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfmath.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_aes.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_hash.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-wc_afalg.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-curve25519.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-sha512-asm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-aes.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-chacha.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-curve25519.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-poly1305.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha256.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512-asm.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/atmel/$(DEPDIR)/src_libwolfssl_la-atmel.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_nitrox.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_octeon_sync.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_aes.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_hash.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-wc_devcrypto.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_mem.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_sync.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/test/$(DEPDIR)/test.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@wolfcrypt/user-crypto/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
- @$(MKDIR_P) $(@D)
- @echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
-
-.S.o:
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $<
-
-.S.obj:
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.S.lo:
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $<
-
-wolfcrypt/src/src_libwolfssl_la-aes_asm.lo: wolfcrypt/src/aes_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-aes_asm.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_asm.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-aes_asm.lo `test -f 'wolfcrypt/src/aes_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/aes_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_asm.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_asm.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/aes_asm.S' object='wolfcrypt/src/src_libwolfssl_la-aes_asm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-aes_asm.lo `test -f 'wolfcrypt/src/aes_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/aes_asm.S
-
-wolfcrypt/src/src_libwolfssl_la-aes_gcm_asm.lo: wolfcrypt/src/aes_gcm_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-aes_gcm_asm.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_gcm_asm.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-aes_gcm_asm.lo `test -f 'wolfcrypt/src/aes_gcm_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/aes_gcm_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_gcm_asm.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_gcm_asm.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/aes_gcm_asm.S' object='wolfcrypt/src/src_libwolfssl_la-aes_gcm_asm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-aes_gcm_asm.lo `test -f 'wolfcrypt/src/aes_gcm_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/aes_gcm_asm.S
-
-wolfcrypt/src/src_libwolfssl_la-sha256_asm.lo: wolfcrypt/src/sha256_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sha256_asm.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256_asm.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sha256_asm.lo `test -f 'wolfcrypt/src/sha256_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/sha256_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256_asm.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256_asm.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/sha256_asm.S' object='wolfcrypt/src/src_libwolfssl_la-sha256_asm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sha256_asm.lo `test -f 'wolfcrypt/src/sha256_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/sha256_asm.S
-
-wolfcrypt/src/src_libwolfssl_la-sha512_asm.lo: wolfcrypt/src/sha512_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sha512_asm.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512_asm.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sha512_asm.lo `test -f 'wolfcrypt/src/sha512_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/sha512_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512_asm.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512_asm.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/sha512_asm.S' object='wolfcrypt/src/src_libwolfssl_la-sha512_asm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sha512_asm.lo `test -f 'wolfcrypt/src/sha512_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/sha512_asm.S
-
-wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo: wolfcrypt/src/sp_x86_64_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64_asm.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo `test -f 'wolfcrypt/src/sp_x86_64_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/sp_x86_64_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64_asm.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64_asm.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/sp_x86_64_asm.S' object='wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo `test -f 'wolfcrypt/src/sp_x86_64_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/sp_x86_64_asm.S
-
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512-asm.lo: wolfcrypt/src/port/arm/armv8-sha512-asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512-asm.lo -MD -MP -MF wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512-asm.Tpo -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512-asm.lo `test -f 'wolfcrypt/src/port/arm/armv8-sha512-asm.S' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-sha512-asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512-asm.Tpo wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512-asm.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/port/arm/armv8-sha512-asm.S' object='wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512-asm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512-asm.lo `test -f 'wolfcrypt/src/port/arm/armv8-sha512-asm.S' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-sha512-asm.S
-
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-sha512-asm.lo: wolfcrypt/src/port/arm/armv8-32-sha512-asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-sha512-asm.lo -MD -MP -MF wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-sha512-asm.Tpo -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-sha512-asm.lo `test -f 'wolfcrypt/src/port/arm/armv8-32-sha512-asm.S' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-32-sha512-asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-sha512-asm.Tpo wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-sha512-asm.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/port/arm/armv8-32-sha512-asm.S' object='wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-sha512-asm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-sha512-asm.lo `test -f 'wolfcrypt/src/port/arm/armv8-32-sha512-asm.S' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-32-sha512-asm.S
-
-wolfcrypt/src/src_libwolfssl_la-poly1305_asm.lo: wolfcrypt/src/poly1305_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-poly1305_asm.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305_asm.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-poly1305_asm.lo `test -f 'wolfcrypt/src/poly1305_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/poly1305_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305_asm.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305_asm.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/poly1305_asm.S' object='wolfcrypt/src/src_libwolfssl_la-poly1305_asm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-poly1305_asm.lo `test -f 'wolfcrypt/src/poly1305_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/poly1305_asm.S
-
-wolfcrypt/src/src_libwolfssl_la-chacha_asm.lo: wolfcrypt/src/chacha_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-chacha_asm.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha_asm.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-chacha_asm.lo `test -f 'wolfcrypt/src/chacha_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/chacha_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha_asm.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha_asm.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/chacha_asm.S' object='wolfcrypt/src/src_libwolfssl_la-chacha_asm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-chacha_asm.lo `test -f 'wolfcrypt/src/chacha_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/chacha_asm.S
-
-wolfcrypt/src/src_libwolfssl_la-fe_x25519_asm.lo: wolfcrypt/src/fe_x25519_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-fe_x25519_asm.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_x25519_asm.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-fe_x25519_asm.lo `test -f 'wolfcrypt/src/fe_x25519_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/fe_x25519_asm.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_x25519_asm.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_x25519_asm.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/fe_x25519_asm.S' object='wolfcrypt/src/src_libwolfssl_la-fe_x25519_asm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-fe_x25519_asm.lo `test -f 'wolfcrypt/src/fe_x25519_asm.S' || echo '$(srcdir)/'`wolfcrypt/src/fe_x25519_asm.S
-
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-curve25519.lo: wolfcrypt/src/port/arm/armv8-32-curve25519.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-curve25519.lo -MD -MP -MF wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-curve25519.Tpo -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-curve25519.lo `test -f 'wolfcrypt/src/port/arm/armv8-32-curve25519.S' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-32-curve25519.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-curve25519.Tpo wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-curve25519.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/port/arm/armv8-32-curve25519.S' object='wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-curve25519.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-32-curve25519.lo `test -f 'wolfcrypt/src/port/arm/armv8-32-curve25519.S' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-32-curve25519.S
-
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-curve25519.lo: wolfcrypt/src/port/arm/armv8-curve25519.S
-@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-curve25519.lo -MD -MP -MF wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-curve25519.Tpo -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-curve25519.lo `test -f 'wolfcrypt/src/port/arm/armv8-curve25519.S' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-curve25519.S
-@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-curve25519.Tpo wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-curve25519.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='wolfcrypt/src/port/arm/armv8-curve25519.S' object='wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-curve25519.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-curve25519.lo `test -f 'wolfcrypt/src/port/arm/armv8-curve25519.S' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-curve25519.S
-
-.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-ctaocrypt/src/src_libwolfssl_la-wolfcrypt_first.lo: ctaocrypt/src/wolfcrypt_first.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-wolfcrypt_first.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-wolfcrypt_first.lo `test -f 'ctaocrypt/src/wolfcrypt_first.c' || echo '$(srcdir)/'`ctaocrypt/src/wolfcrypt_first.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/wolfcrypt_first.c' object='ctaocrypt/src/src_libwolfssl_la-wolfcrypt_first.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-wolfcrypt_first.lo `test -f 'ctaocrypt/src/wolfcrypt_first.c' || echo '$(srcdir)/'`ctaocrypt/src/wolfcrypt_first.c
-
-ctaocrypt/src/src_libwolfssl_la-hmac.lo: ctaocrypt/src/hmac.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-hmac.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-hmac.lo `test -f 'ctaocrypt/src/hmac.c' || echo '$(srcdir)/'`ctaocrypt/src/hmac.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/hmac.c' object='ctaocrypt/src/src_libwolfssl_la-hmac.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-hmac.lo `test -f 'ctaocrypt/src/hmac.c' || echo '$(srcdir)/'`ctaocrypt/src/hmac.c
-
-ctaocrypt/src/src_libwolfssl_la-random.lo: ctaocrypt/src/random.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-random.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-random.lo `test -f 'ctaocrypt/src/random.c' || echo '$(srcdir)/'`ctaocrypt/src/random.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/random.c' object='ctaocrypt/src/src_libwolfssl_la-random.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-random.lo `test -f 'ctaocrypt/src/random.c' || echo '$(srcdir)/'`ctaocrypt/src/random.c
-
-ctaocrypt/src/src_libwolfssl_la-sha256.lo: ctaocrypt/src/sha256.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-sha256.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-sha256.lo `test -f 'ctaocrypt/src/sha256.c' || echo '$(srcdir)/'`ctaocrypt/src/sha256.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/sha256.c' object='ctaocrypt/src/src_libwolfssl_la-sha256.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-sha256.lo `test -f 'ctaocrypt/src/sha256.c' || echo '$(srcdir)/'`ctaocrypt/src/sha256.c
-
-ctaocrypt/src/src_libwolfssl_la-rsa.lo: ctaocrypt/src/rsa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-rsa.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-rsa.lo `test -f 'ctaocrypt/src/rsa.c' || echo '$(srcdir)/'`ctaocrypt/src/rsa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/rsa.c' object='ctaocrypt/src/src_libwolfssl_la-rsa.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-rsa.lo `test -f 'ctaocrypt/src/rsa.c' || echo '$(srcdir)/'`ctaocrypt/src/rsa.c
-
-ctaocrypt/src/src_libwolfssl_la-aes.lo: ctaocrypt/src/aes.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-aes.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-aes.lo `test -f 'ctaocrypt/src/aes.c' || echo '$(srcdir)/'`ctaocrypt/src/aes.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/aes.c' object='ctaocrypt/src/src_libwolfssl_la-aes.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-aes.lo `test -f 'ctaocrypt/src/aes.c' || echo '$(srcdir)/'`ctaocrypt/src/aes.c
-
-ctaocrypt/src/src_libwolfssl_la-des3.lo: ctaocrypt/src/des3.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-des3.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-des3.lo `test -f 'ctaocrypt/src/des3.c' || echo '$(srcdir)/'`ctaocrypt/src/des3.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/des3.c' object='ctaocrypt/src/src_libwolfssl_la-des3.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-des3.lo `test -f 'ctaocrypt/src/des3.c' || echo '$(srcdir)/'`ctaocrypt/src/des3.c
-
-ctaocrypt/src/src_libwolfssl_la-sha.lo: ctaocrypt/src/sha.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-sha.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-sha.lo `test -f 'ctaocrypt/src/sha.c' || echo '$(srcdir)/'`ctaocrypt/src/sha.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/sha.c' object='ctaocrypt/src/src_libwolfssl_la-sha.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-sha.lo `test -f 'ctaocrypt/src/sha.c' || echo '$(srcdir)/'`ctaocrypt/src/sha.c
-
-ctaocrypt/src/src_libwolfssl_la-sha512.lo: ctaocrypt/src/sha512.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-sha512.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-sha512.lo `test -f 'ctaocrypt/src/sha512.c' || echo '$(srcdir)/'`ctaocrypt/src/sha512.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/sha512.c' object='ctaocrypt/src/src_libwolfssl_la-sha512.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-sha512.lo `test -f 'ctaocrypt/src/sha512.c' || echo '$(srcdir)/'`ctaocrypt/src/sha512.c
-
-ctaocrypt/src/src_libwolfssl_la-fips.lo: ctaocrypt/src/fips.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-fips.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-fips.lo `test -f 'ctaocrypt/src/fips.c' || echo '$(srcdir)/'`ctaocrypt/src/fips.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/fips.c' object='ctaocrypt/src/src_libwolfssl_la-fips.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-fips.lo `test -f 'ctaocrypt/src/fips.c' || echo '$(srcdir)/'`ctaocrypt/src/fips.c
-
-ctaocrypt/src/src_libwolfssl_la-fips_test.lo: ctaocrypt/src/fips_test.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-fips_test.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-fips_test.lo `test -f 'ctaocrypt/src/fips_test.c' || echo '$(srcdir)/'`ctaocrypt/src/fips_test.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/fips_test.c' object='ctaocrypt/src/src_libwolfssl_la-fips_test.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-fips_test.lo `test -f 'ctaocrypt/src/fips_test.c' || echo '$(srcdir)/'`ctaocrypt/src/fips_test.c
-
-ctaocrypt/src/src_libwolfssl_la-wolfcrypt_last.lo: ctaocrypt/src/wolfcrypt_last.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT ctaocrypt/src/src_libwolfssl_la-wolfcrypt_last.lo -MD -MP -MF ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Tpo -c -o ctaocrypt/src/src_libwolfssl_la-wolfcrypt_last.lo `test -f 'ctaocrypt/src/wolfcrypt_last.c' || echo '$(srcdir)/'`ctaocrypt/src/wolfcrypt_last.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Tpo ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ctaocrypt/src/wolfcrypt_last.c' object='ctaocrypt/src/src_libwolfssl_la-wolfcrypt_last.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o ctaocrypt/src/src_libwolfssl_la-wolfcrypt_last.lo `test -f 'ctaocrypt/src/wolfcrypt_last.c' || echo '$(srcdir)/'`ctaocrypt/src/wolfcrypt_last.c
-
-wolfcrypt/src/src_libwolfssl_la-wolfcrypt_first.lo: wolfcrypt/src/wolfcrypt_first.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-wolfcrypt_first.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-wolfcrypt_first.lo `test -f 'wolfcrypt/src/wolfcrypt_first.c' || echo '$(srcdir)/'`wolfcrypt/src/wolfcrypt_first.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/wolfcrypt_first.c' object='wolfcrypt/src/src_libwolfssl_la-wolfcrypt_first.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-wolfcrypt_first.lo `test -f 'wolfcrypt/src/wolfcrypt_first.c' || echo '$(srcdir)/'`wolfcrypt/src/wolfcrypt_first.c
-
-wolfcrypt/src/src_libwolfssl_la-hmac.lo: wolfcrypt/src/hmac.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-hmac.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-hmac.lo `test -f 'wolfcrypt/src/hmac.c' || echo '$(srcdir)/'`wolfcrypt/src/hmac.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/hmac.c' object='wolfcrypt/src/src_libwolfssl_la-hmac.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-hmac.lo `test -f 'wolfcrypt/src/hmac.c' || echo '$(srcdir)/'`wolfcrypt/src/hmac.c
-
-wolfcrypt/src/src_libwolfssl_la-random.lo: wolfcrypt/src/random.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-random.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-random.lo `test -f 'wolfcrypt/src/random.c' || echo '$(srcdir)/'`wolfcrypt/src/random.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/random.c' object='wolfcrypt/src/src_libwolfssl_la-random.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-random.lo `test -f 'wolfcrypt/src/random.c' || echo '$(srcdir)/'`wolfcrypt/src/random.c
-
-wolfcrypt/src/src_libwolfssl_la-sha256.lo: wolfcrypt/src/sha256.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sha256.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sha256.lo `test -f 'wolfcrypt/src/sha256.c' || echo '$(srcdir)/'`wolfcrypt/src/sha256.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sha256.c' object='wolfcrypt/src/src_libwolfssl_la-sha256.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sha256.lo `test -f 'wolfcrypt/src/sha256.c' || echo '$(srcdir)/'`wolfcrypt/src/sha256.c
-
-wolfcrypt/src/src_libwolfssl_la-rsa.lo: wolfcrypt/src/rsa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-rsa.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-rsa.lo `test -f 'wolfcrypt/src/rsa.c' || echo '$(srcdir)/'`wolfcrypt/src/rsa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/rsa.c' object='wolfcrypt/src/src_libwolfssl_la-rsa.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-rsa.lo `test -f 'wolfcrypt/src/rsa.c' || echo '$(srcdir)/'`wolfcrypt/src/rsa.c
-
-wolfcrypt/src/src_libwolfssl_la-ecc.lo: wolfcrypt/src/ecc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-ecc.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ecc.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-ecc.lo `test -f 'wolfcrypt/src/ecc.c' || echo '$(srcdir)/'`wolfcrypt/src/ecc.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ecc.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ecc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/ecc.c' object='wolfcrypt/src/src_libwolfssl_la-ecc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-ecc.lo `test -f 'wolfcrypt/src/ecc.c' || echo '$(srcdir)/'`wolfcrypt/src/ecc.c
-
-wolfcrypt/src/src_libwolfssl_la-aes.lo: wolfcrypt/src/aes.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-aes.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-aes.lo `test -f 'wolfcrypt/src/aes.c' || echo '$(srcdir)/'`wolfcrypt/src/aes.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/aes.c' object='wolfcrypt/src/src_libwolfssl_la-aes.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-aes.lo `test -f 'wolfcrypt/src/aes.c' || echo '$(srcdir)/'`wolfcrypt/src/aes.c
-
-wolfcrypt/src/src_libwolfssl_la-des3.lo: wolfcrypt/src/des3.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-des3.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-des3.lo `test -f 'wolfcrypt/src/des3.c' || echo '$(srcdir)/'`wolfcrypt/src/des3.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/des3.c' object='wolfcrypt/src/src_libwolfssl_la-des3.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-des3.lo `test -f 'wolfcrypt/src/des3.c' || echo '$(srcdir)/'`wolfcrypt/src/des3.c
-
-wolfcrypt/src/src_libwolfssl_la-sha.lo: wolfcrypt/src/sha.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sha.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sha.lo `test -f 'wolfcrypt/src/sha.c' || echo '$(srcdir)/'`wolfcrypt/src/sha.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sha.c' object='wolfcrypt/src/src_libwolfssl_la-sha.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sha.lo `test -f 'wolfcrypt/src/sha.c' || echo '$(srcdir)/'`wolfcrypt/src/sha.c
-
-wolfcrypt/src/src_libwolfssl_la-sha512.lo: wolfcrypt/src/sha512.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sha512.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sha512.lo `test -f 'wolfcrypt/src/sha512.c' || echo '$(srcdir)/'`wolfcrypt/src/sha512.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sha512.c' object='wolfcrypt/src/src_libwolfssl_la-sha512.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sha512.lo `test -f 'wolfcrypt/src/sha512.c' || echo '$(srcdir)/'`wolfcrypt/src/sha512.c
-
-wolfcrypt/src/src_libwolfssl_la-sha3.lo: wolfcrypt/src/sha3.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sha3.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha3.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sha3.lo `test -f 'wolfcrypt/src/sha3.c' || echo '$(srcdir)/'`wolfcrypt/src/sha3.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha3.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha3.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sha3.c' object='wolfcrypt/src/src_libwolfssl_la-sha3.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sha3.lo `test -f 'wolfcrypt/src/sha3.c' || echo '$(srcdir)/'`wolfcrypt/src/sha3.c
-
-wolfcrypt/src/src_libwolfssl_la-dh.lo: wolfcrypt/src/dh.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-dh.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dh.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-dh.lo `test -f 'wolfcrypt/src/dh.c' || echo '$(srcdir)/'`wolfcrypt/src/dh.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dh.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dh.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/dh.c' object='wolfcrypt/src/src_libwolfssl_la-dh.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-dh.lo `test -f 'wolfcrypt/src/dh.c' || echo '$(srcdir)/'`wolfcrypt/src/dh.c
-
-wolfcrypt/src/src_libwolfssl_la-cmac.lo: wolfcrypt/src/cmac.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-cmac.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cmac.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-cmac.lo `test -f 'wolfcrypt/src/cmac.c' || echo '$(srcdir)/'`wolfcrypt/src/cmac.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cmac.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cmac.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/cmac.c' object='wolfcrypt/src/src_libwolfssl_la-cmac.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-cmac.lo `test -f 'wolfcrypt/src/cmac.c' || echo '$(srcdir)/'`wolfcrypt/src/cmac.c
-
-wolfcrypt/src/src_libwolfssl_la-fips.lo: wolfcrypt/src/fips.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-fips.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-fips.lo `test -f 'wolfcrypt/src/fips.c' || echo '$(srcdir)/'`wolfcrypt/src/fips.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/fips.c' object='wolfcrypt/src/src_libwolfssl_la-fips.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-fips.lo `test -f 'wolfcrypt/src/fips.c' || echo '$(srcdir)/'`wolfcrypt/src/fips.c
-
-wolfcrypt/src/src_libwolfssl_la-fips_test.lo: wolfcrypt/src/fips_test.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-fips_test.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-fips_test.lo `test -f 'wolfcrypt/src/fips_test.c' || echo '$(srcdir)/'`wolfcrypt/src/fips_test.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/fips_test.c' object='wolfcrypt/src/src_libwolfssl_la-fips_test.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-fips_test.lo `test -f 'wolfcrypt/src/fips_test.c' || echo '$(srcdir)/'`wolfcrypt/src/fips_test.c
-
-wolfcrypt/src/src_libwolfssl_la-wolfcrypt_last.lo: wolfcrypt/src/wolfcrypt_last.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-wolfcrypt_last.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-wolfcrypt_last.lo `test -f 'wolfcrypt/src/wolfcrypt_last.c' || echo '$(srcdir)/'`wolfcrypt/src/wolfcrypt_last.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/wolfcrypt_last.c' object='wolfcrypt/src/src_libwolfssl_la-wolfcrypt_last.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-wolfcrypt_last.lo `test -f 'wolfcrypt/src/wolfcrypt_last.c' || echo '$(srcdir)/'`wolfcrypt/src/wolfcrypt_last.c
-
-wolfcrypt/src/src_libwolfssl_la-selftest.lo: wolfcrypt/src/selftest.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-selftest.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-selftest.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-selftest.lo `test -f 'wolfcrypt/src/selftest.c' || echo '$(srcdir)/'`wolfcrypt/src/selftest.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-selftest.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-selftest.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/selftest.c' object='wolfcrypt/src/src_libwolfssl_la-selftest.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-selftest.lo `test -f 'wolfcrypt/src/selftest.c' || echo '$(srcdir)/'`wolfcrypt/src/selftest.c
-
-wolfcrypt/src/src_libwolfssl_la-hash.lo: wolfcrypt/src/hash.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-hash.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hash.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-hash.lo `test -f 'wolfcrypt/src/hash.c' || echo '$(srcdir)/'`wolfcrypt/src/hash.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hash.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hash.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/hash.c' object='wolfcrypt/src/src_libwolfssl_la-hash.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-hash.lo `test -f 'wolfcrypt/src/hash.c' || echo '$(srcdir)/'`wolfcrypt/src/hash.c
-
-wolfcrypt/src/src_libwolfssl_la-cpuid.lo: wolfcrypt/src/cpuid.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-cpuid.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cpuid.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-cpuid.lo `test -f 'wolfcrypt/src/cpuid.c' || echo '$(srcdir)/'`wolfcrypt/src/cpuid.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cpuid.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cpuid.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/cpuid.c' object='wolfcrypt/src/src_libwolfssl_la-cpuid.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-cpuid.lo `test -f 'wolfcrypt/src/cpuid.c' || echo '$(srcdir)/'`wolfcrypt/src/cpuid.c
-
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha256.lo: wolfcrypt/src/port/arm/armv8-sha256.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha256.lo -MD -MP -MF wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha256.Tpo -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha256.lo `test -f 'wolfcrypt/src/port/arm/armv8-sha256.c' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-sha256.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha256.Tpo wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha256.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/arm/armv8-sha256.c' object='wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha256.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha256.lo `test -f 'wolfcrypt/src/port/arm/armv8-sha256.c' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-sha256.c
-
-wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_hash.lo: wolfcrypt/src/port/af_alg/afalg_hash.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_hash.lo -MD -MP -MF wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_hash.Tpo -c -o wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_hash.lo `test -f 'wolfcrypt/src/port/af_alg/afalg_hash.c' || echo '$(srcdir)/'`wolfcrypt/src/port/af_alg/afalg_hash.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_hash.Tpo wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_hash.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/af_alg/afalg_hash.c' object='wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_hash.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_hash.lo `test -f 'wolfcrypt/src/port/af_alg/afalg_hash.c' || echo '$(srcdir)/'`wolfcrypt/src/port/af_alg/afalg_hash.c
-
-wolfcrypt/src/src_libwolfssl_la-wolfevent.lo: wolfcrypt/src/wolfevent.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-wolfevent.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfevent.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-wolfevent.lo `test -f 'wolfcrypt/src/wolfevent.c' || echo '$(srcdir)/'`wolfcrypt/src/wolfevent.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfevent.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfevent.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/wolfevent.c' object='wolfcrypt/src/src_libwolfssl_la-wolfevent.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-wolfevent.lo `test -f 'wolfcrypt/src/wolfevent.c' || echo '$(srcdir)/'`wolfcrypt/src/wolfevent.c
-
-wolfcrypt/src/src_libwolfssl_la-async.lo: wolfcrypt/src/async.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-async.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-async.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-async.lo `test -f 'wolfcrypt/src/async.c' || echo '$(srcdir)/'`wolfcrypt/src/async.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-async.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-async.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/async.c' object='wolfcrypt/src/src_libwolfssl_la-async.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-async.lo `test -f 'wolfcrypt/src/async.c' || echo '$(srcdir)/'`wolfcrypt/src/async.c
-
-wolfcrypt/user-crypto/src/src_libwolfssl_la-rsa.lo: wolfcrypt/user-crypto/src/rsa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/user-crypto/src/src_libwolfssl_la-rsa.lo -MD -MP -MF wolfcrypt/user-crypto/src/$(DEPDIR)/src_libwolfssl_la-rsa.Tpo -c -o wolfcrypt/user-crypto/src/src_libwolfssl_la-rsa.lo `test -f 'wolfcrypt/user-crypto/src/rsa.c' || echo '$(srcdir)/'`wolfcrypt/user-crypto/src/rsa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/user-crypto/src/$(DEPDIR)/src_libwolfssl_la-rsa.Tpo wolfcrypt/user-crypto/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/user-crypto/src/rsa.c' object='wolfcrypt/user-crypto/src/src_libwolfssl_la-rsa.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/user-crypto/src/src_libwolfssl_la-rsa.lo `test -f 'wolfcrypt/user-crypto/src/rsa.c' || echo '$(srcdir)/'`wolfcrypt/user-crypto/src/rsa.c
-
-wolfcrypt/src/src_libwolfssl_la-sp_c32.lo: wolfcrypt/src/sp_c32.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sp_c32.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c32.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sp_c32.lo `test -f 'wolfcrypt/src/sp_c32.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_c32.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c32.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c32.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sp_c32.c' object='wolfcrypt/src/src_libwolfssl_la-sp_c32.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sp_c32.lo `test -f 'wolfcrypt/src/sp_c32.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_c32.c
-
-wolfcrypt/src/src_libwolfssl_la-sp_c64.lo: wolfcrypt/src/sp_c64.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sp_c64.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c64.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sp_c64.lo `test -f 'wolfcrypt/src/sp_c64.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_c64.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c64.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c64.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sp_c64.c' object='wolfcrypt/src/src_libwolfssl_la-sp_c64.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sp_c64.lo `test -f 'wolfcrypt/src/sp_c64.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_c64.c
-
-wolfcrypt/src/src_libwolfssl_la-sp_x86_64.lo: wolfcrypt/src/sp_x86_64.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sp_x86_64.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sp_x86_64.lo `test -f 'wolfcrypt/src/sp_x86_64.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_x86_64.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sp_x86_64.c' object='wolfcrypt/src/src_libwolfssl_la-sp_x86_64.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sp_x86_64.lo `test -f 'wolfcrypt/src/sp_x86_64.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_x86_64.c
-
-wolfcrypt/src/src_libwolfssl_la-sp_arm32.lo: wolfcrypt/src/sp_arm32.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sp_arm32.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm32.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sp_arm32.lo `test -f 'wolfcrypt/src/sp_arm32.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_arm32.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm32.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm32.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sp_arm32.c' object='wolfcrypt/src/src_libwolfssl_la-sp_arm32.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sp_arm32.lo `test -f 'wolfcrypt/src/sp_arm32.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_arm32.c
-
-wolfcrypt/src/src_libwolfssl_la-sp_armthumb.lo: wolfcrypt/src/sp_armthumb.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sp_armthumb.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_armthumb.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sp_armthumb.lo `test -f 'wolfcrypt/src/sp_armthumb.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_armthumb.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_armthumb.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_armthumb.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sp_armthumb.c' object='wolfcrypt/src/src_libwolfssl_la-sp_armthumb.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sp_armthumb.lo `test -f 'wolfcrypt/src/sp_armthumb.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_armthumb.c
-
-wolfcrypt/src/src_libwolfssl_la-sp_arm64.lo: wolfcrypt/src/sp_arm64.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sp_arm64.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm64.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sp_arm64.lo `test -f 'wolfcrypt/src/sp_arm64.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_arm64.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm64.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm64.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sp_arm64.c' object='wolfcrypt/src/src_libwolfssl_la-sp_arm64.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sp_arm64.lo `test -f 'wolfcrypt/src/sp_arm64.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_arm64.c
-
-wolfcrypt/src/src_libwolfssl_la-sp_int.lo: wolfcrypt/src/sp_int.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sp_int.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_int.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sp_int.lo `test -f 'wolfcrypt/src/sp_int.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_int.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_int.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_int.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sp_int.c' object='wolfcrypt/src/src_libwolfssl_la-sp_int.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sp_int.lo `test -f 'wolfcrypt/src/sp_int.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_int.c
-
-wolfcrypt/src/src_libwolfssl_la-sp_cortexm.lo: wolfcrypt/src/sp_cortexm.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-sp_cortexm.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_cortexm.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-sp_cortexm.lo `test -f 'wolfcrypt/src/sp_cortexm.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_cortexm.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_cortexm.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_cortexm.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/sp_cortexm.c' object='wolfcrypt/src/src_libwolfssl_la-sp_cortexm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-sp_cortexm.lo `test -f 'wolfcrypt/src/sp_cortexm.c' || echo '$(srcdir)/'`wolfcrypt/src/sp_cortexm.c
-
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-aes.lo: wolfcrypt/src/port/arm/armv8-aes.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-aes.lo -MD -MP -MF wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-aes.Tpo -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-aes.lo `test -f 'wolfcrypt/src/port/arm/armv8-aes.c' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-aes.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-aes.Tpo wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-aes.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/arm/armv8-aes.c' object='wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-aes.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-aes.lo `test -f 'wolfcrypt/src/port/arm/armv8-aes.c' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-aes.c
-
-wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_aes.lo: wolfcrypt/src/port/af_alg/afalg_aes.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_aes.lo -MD -MP -MF wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_aes.Tpo -c -o wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_aes.lo `test -f 'wolfcrypt/src/port/af_alg/afalg_aes.c' || echo '$(srcdir)/'`wolfcrypt/src/port/af_alg/afalg_aes.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_aes.Tpo wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_aes.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/af_alg/afalg_aes.c' object='wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_aes.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/af_alg/src_libwolfssl_la-afalg_aes.lo `test -f 'wolfcrypt/src/port/af_alg/afalg_aes.c' || echo '$(srcdir)/'`wolfcrypt/src/port/af_alg/afalg_aes.c
-
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512.lo: wolfcrypt/src/port/arm/armv8-sha512.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512.lo -MD -MP -MF wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512.Tpo -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512.lo `test -f 'wolfcrypt/src/port/arm/armv8-sha512.c' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-sha512.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512.Tpo wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/arm/armv8-sha512.c' object='wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-sha512.lo `test -f 'wolfcrypt/src/port/arm/armv8-sha512.c' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-sha512.c
-
-wolfcrypt/src/src_libwolfssl_la-logging.lo: wolfcrypt/src/logging.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-logging.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-logging.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-logging.lo `test -f 'wolfcrypt/src/logging.c' || echo '$(srcdir)/'`wolfcrypt/src/logging.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-logging.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-logging.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/logging.c' object='wolfcrypt/src/src_libwolfssl_la-logging.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-logging.lo `test -f 'wolfcrypt/src/logging.c' || echo '$(srcdir)/'`wolfcrypt/src/logging.c
-
-wolfcrypt/src/src_libwolfssl_la-wc_port.lo: wolfcrypt/src/wc_port.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-wc_port.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_port.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-wc_port.lo `test -f 'wolfcrypt/src/wc_port.c' || echo '$(srcdir)/'`wolfcrypt/src/wc_port.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_port.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_port.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/wc_port.c' object='wolfcrypt/src/src_libwolfssl_la-wc_port.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-wc_port.lo `test -f 'wolfcrypt/src/wc_port.c' || echo '$(srcdir)/'`wolfcrypt/src/wc_port.c
-
-wolfcrypt/src/src_libwolfssl_la-error.lo: wolfcrypt/src/error.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-error.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-error.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-error.lo `test -f 'wolfcrypt/src/error.c' || echo '$(srcdir)/'`wolfcrypt/src/error.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-error.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-error.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/error.c' object='wolfcrypt/src/src_libwolfssl_la-error.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-error.lo `test -f 'wolfcrypt/src/error.c' || echo '$(srcdir)/'`wolfcrypt/src/error.c
-
-wolfcrypt/src/src_libwolfssl_la-wc_encrypt.lo: wolfcrypt/src/wc_encrypt.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-wc_encrypt.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_encrypt.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-wc_encrypt.lo `test -f 'wolfcrypt/src/wc_encrypt.c' || echo '$(srcdir)/'`wolfcrypt/src/wc_encrypt.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_encrypt.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_encrypt.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/wc_encrypt.c' object='wolfcrypt/src/src_libwolfssl_la-wc_encrypt.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-wc_encrypt.lo `test -f 'wolfcrypt/src/wc_encrypt.c' || echo '$(srcdir)/'`wolfcrypt/src/wc_encrypt.c
-
-wolfcrypt/src/src_libwolfssl_la-signature.lo: wolfcrypt/src/signature.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-signature.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-signature.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-signature.lo `test -f 'wolfcrypt/src/signature.c' || echo '$(srcdir)/'`wolfcrypt/src/signature.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-signature.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-signature.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/signature.c' object='wolfcrypt/src/src_libwolfssl_la-signature.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-signature.lo `test -f 'wolfcrypt/src/signature.c' || echo '$(srcdir)/'`wolfcrypt/src/signature.c
-
-wolfcrypt/src/src_libwolfssl_la-wolfmath.lo: wolfcrypt/src/wolfmath.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-wolfmath.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfmath.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-wolfmath.lo `test -f 'wolfcrypt/src/wolfmath.c' || echo '$(srcdir)/'`wolfcrypt/src/wolfmath.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfmath.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfmath.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/wolfmath.c' object='wolfcrypt/src/src_libwolfssl_la-wolfmath.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-wolfmath.lo `test -f 'wolfcrypt/src/wolfmath.c' || echo '$(srcdir)/'`wolfcrypt/src/wolfmath.c
-
-wolfcrypt/src/src_libwolfssl_la-memory.lo: wolfcrypt/src/memory.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-memory.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-memory.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-memory.lo `test -f 'wolfcrypt/src/memory.c' || echo '$(srcdir)/'`wolfcrypt/src/memory.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-memory.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-memory.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/memory.c' object='wolfcrypt/src/src_libwolfssl_la-memory.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-memory.lo `test -f 'wolfcrypt/src/memory.c' || echo '$(srcdir)/'`wolfcrypt/src/memory.c
-
-wolfcrypt/src/src_libwolfssl_la-asn.lo: wolfcrypt/src/asn.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-asn.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-asn.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-asn.lo `test -f 'wolfcrypt/src/asn.c' || echo '$(srcdir)/'`wolfcrypt/src/asn.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-asn.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-asn.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/asn.c' object='wolfcrypt/src/src_libwolfssl_la-asn.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-asn.lo `test -f 'wolfcrypt/src/asn.c' || echo '$(srcdir)/'`wolfcrypt/src/asn.c
-
-wolfcrypt/src/src_libwolfssl_la-coding.lo: wolfcrypt/src/coding.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-coding.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-coding.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-coding.lo `test -f 'wolfcrypt/src/coding.c' || echo '$(srcdir)/'`wolfcrypt/src/coding.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-coding.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-coding.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/coding.c' object='wolfcrypt/src/src_libwolfssl_la-coding.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-coding.lo `test -f 'wolfcrypt/src/coding.c' || echo '$(srcdir)/'`wolfcrypt/src/coding.c
-
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-poly1305.lo: wolfcrypt/src/port/arm/armv8-poly1305.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-poly1305.lo -MD -MP -MF wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-poly1305.Tpo -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-poly1305.lo `test -f 'wolfcrypt/src/port/arm/armv8-poly1305.c' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-poly1305.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-poly1305.Tpo wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-poly1305.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/arm/armv8-poly1305.c' object='wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-poly1305.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-poly1305.lo `test -f 'wolfcrypt/src/port/arm/armv8-poly1305.c' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-poly1305.c
-
-wolfcrypt/src/src_libwolfssl_la-poly1305.lo: wolfcrypt/src/poly1305.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-poly1305.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-poly1305.lo `test -f 'wolfcrypt/src/poly1305.c' || echo '$(srcdir)/'`wolfcrypt/src/poly1305.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/poly1305.c' object='wolfcrypt/src/src_libwolfssl_la-poly1305.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-poly1305.lo `test -f 'wolfcrypt/src/poly1305.c' || echo '$(srcdir)/'`wolfcrypt/src/poly1305.c
-
-wolfcrypt/src/src_libwolfssl_la-arc4.lo: wolfcrypt/src/arc4.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-arc4.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-arc4.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-arc4.lo `test -f 'wolfcrypt/src/arc4.c' || echo '$(srcdir)/'`wolfcrypt/src/arc4.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-arc4.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-arc4.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/arc4.c' object='wolfcrypt/src/src_libwolfssl_la-arc4.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-arc4.lo `test -f 'wolfcrypt/src/arc4.c' || echo '$(srcdir)/'`wolfcrypt/src/arc4.c
-
-wolfcrypt/src/src_libwolfssl_la-md4.lo: wolfcrypt/src/md4.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-md4.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md4.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-md4.lo `test -f 'wolfcrypt/src/md4.c' || echo '$(srcdir)/'`wolfcrypt/src/md4.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md4.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md4.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/md4.c' object='wolfcrypt/src/src_libwolfssl_la-md4.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-md4.lo `test -f 'wolfcrypt/src/md4.c' || echo '$(srcdir)/'`wolfcrypt/src/md4.c
-
-wolfcrypt/src/src_libwolfssl_la-md5.lo: wolfcrypt/src/md5.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-md5.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md5.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-md5.lo `test -f 'wolfcrypt/src/md5.c' || echo '$(srcdir)/'`wolfcrypt/src/md5.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md5.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md5.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/md5.c' object='wolfcrypt/src/src_libwolfssl_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-md5.lo `test -f 'wolfcrypt/src/md5.c' || echo '$(srcdir)/'`wolfcrypt/src/md5.c
-
-wolfcrypt/src/src_libwolfssl_la-pwdbased.lo: wolfcrypt/src/pwdbased.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-pwdbased.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pwdbased.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-pwdbased.lo `test -f 'wolfcrypt/src/pwdbased.c' || echo '$(srcdir)/'`wolfcrypt/src/pwdbased.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pwdbased.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pwdbased.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/pwdbased.c' object='wolfcrypt/src/src_libwolfssl_la-pwdbased.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-pwdbased.lo `test -f 'wolfcrypt/src/pwdbased.c' || echo '$(srcdir)/'`wolfcrypt/src/pwdbased.c
-
-wolfcrypt/src/src_libwolfssl_la-pkcs12.lo: wolfcrypt/src/pkcs12.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-pkcs12.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs12.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-pkcs12.lo `test -f 'wolfcrypt/src/pkcs12.c' || echo '$(srcdir)/'`wolfcrypt/src/pkcs12.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs12.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs12.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/pkcs12.c' object='wolfcrypt/src/src_libwolfssl_la-pkcs12.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-pkcs12.lo `test -f 'wolfcrypt/src/pkcs12.c' || echo '$(srcdir)/'`wolfcrypt/src/pkcs12.c
-
-wolfcrypt/src/src_libwolfssl_la-dsa.lo: wolfcrypt/src/dsa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-dsa.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dsa.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-dsa.lo `test -f 'wolfcrypt/src/dsa.c' || echo '$(srcdir)/'`wolfcrypt/src/dsa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dsa.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dsa.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/dsa.c' object='wolfcrypt/src/src_libwolfssl_la-dsa.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-dsa.lo `test -f 'wolfcrypt/src/dsa.c' || echo '$(srcdir)/'`wolfcrypt/src/dsa.c
-
-wolfcrypt/src/src_libwolfssl_la-camellia.lo: wolfcrypt/src/camellia.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-camellia.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-camellia.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-camellia.lo `test -f 'wolfcrypt/src/camellia.c' || echo '$(srcdir)/'`wolfcrypt/src/camellia.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-camellia.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-camellia.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/camellia.c' object='wolfcrypt/src/src_libwolfssl_la-camellia.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-camellia.lo `test -f 'wolfcrypt/src/camellia.c' || echo '$(srcdir)/'`wolfcrypt/src/camellia.c
-
-wolfcrypt/src/src_libwolfssl_la-md2.lo: wolfcrypt/src/md2.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-md2.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md2.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-md2.lo `test -f 'wolfcrypt/src/md2.c' || echo '$(srcdir)/'`wolfcrypt/src/md2.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md2.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md2.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/md2.c' object='wolfcrypt/src/src_libwolfssl_la-md2.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-md2.lo `test -f 'wolfcrypt/src/md2.c' || echo '$(srcdir)/'`wolfcrypt/src/md2.c
-
-wolfcrypt/src/src_libwolfssl_la-ripemd.lo: wolfcrypt/src/ripemd.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-ripemd.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ripemd.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-ripemd.lo `test -f 'wolfcrypt/src/ripemd.c' || echo '$(srcdir)/'`wolfcrypt/src/ripemd.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ripemd.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ripemd.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/ripemd.c' object='wolfcrypt/src/src_libwolfssl_la-ripemd.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-ripemd.lo `test -f 'wolfcrypt/src/ripemd.c' || echo '$(srcdir)/'`wolfcrypt/src/ripemd.c
-
-wolfcrypt/src/src_libwolfssl_la-blake2b.lo: wolfcrypt/src/blake2b.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-blake2b.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2b.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-blake2b.lo `test -f 'wolfcrypt/src/blake2b.c' || echo '$(srcdir)/'`wolfcrypt/src/blake2b.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2b.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2b.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/blake2b.c' object='wolfcrypt/src/src_libwolfssl_la-blake2b.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-blake2b.lo `test -f 'wolfcrypt/src/blake2b.c' || echo '$(srcdir)/'`wolfcrypt/src/blake2b.c
-
-wolfcrypt/src/src_libwolfssl_la-blake2s.lo: wolfcrypt/src/blake2s.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-blake2s.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2s.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-blake2s.lo `test -f 'wolfcrypt/src/blake2s.c' || echo '$(srcdir)/'`wolfcrypt/src/blake2s.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2s.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2s.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/blake2s.c' object='wolfcrypt/src/src_libwolfssl_la-blake2s.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-blake2s.lo `test -f 'wolfcrypt/src/blake2s.c' || echo '$(srcdir)/'`wolfcrypt/src/blake2s.c
-
-wolfcrypt/src/src_libwolfssl_la-hc128.lo: wolfcrypt/src/hc128.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-hc128.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hc128.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-hc128.lo `test -f 'wolfcrypt/src/hc128.c' || echo '$(srcdir)/'`wolfcrypt/src/hc128.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hc128.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hc128.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/hc128.c' object='wolfcrypt/src/src_libwolfssl_la-hc128.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-hc128.lo `test -f 'wolfcrypt/src/hc128.c' || echo '$(srcdir)/'`wolfcrypt/src/hc128.c
-
-wolfcrypt/src/src_libwolfssl_la-rabbit.lo: wolfcrypt/src/rabbit.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-rabbit.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rabbit.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-rabbit.lo `test -f 'wolfcrypt/src/rabbit.c' || echo '$(srcdir)/'`wolfcrypt/src/rabbit.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rabbit.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rabbit.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/rabbit.c' object='wolfcrypt/src/src_libwolfssl_la-rabbit.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-rabbit.lo `test -f 'wolfcrypt/src/rabbit.c' || echo '$(srcdir)/'`wolfcrypt/src/rabbit.c
-
-wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-chacha.lo: wolfcrypt/src/port/arm/armv8-chacha.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-chacha.lo -MD -MP -MF wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-chacha.Tpo -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-chacha.lo `test -f 'wolfcrypt/src/port/arm/armv8-chacha.c' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-chacha.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-chacha.Tpo wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-chacha.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/arm/armv8-chacha.c' object='wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-chacha.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-chacha.lo `test -f 'wolfcrypt/src/port/arm/armv8-chacha.c' || echo '$(srcdir)/'`wolfcrypt/src/port/arm/armv8-chacha.c
-
-wolfcrypt/src/src_libwolfssl_la-chacha.lo: wolfcrypt/src/chacha.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-chacha.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-chacha.lo `test -f 'wolfcrypt/src/chacha.c' || echo '$(srcdir)/'`wolfcrypt/src/chacha.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/chacha.c' object='wolfcrypt/src/src_libwolfssl_la-chacha.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-chacha.lo `test -f 'wolfcrypt/src/chacha.c' || echo '$(srcdir)/'`wolfcrypt/src/chacha.c
-
-wolfcrypt/src/src_libwolfssl_la-chacha20_poly1305.lo: wolfcrypt/src/chacha20_poly1305.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-chacha20_poly1305.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha20_poly1305.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-chacha20_poly1305.lo `test -f 'wolfcrypt/src/chacha20_poly1305.c' || echo '$(srcdir)/'`wolfcrypt/src/chacha20_poly1305.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha20_poly1305.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha20_poly1305.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/chacha20_poly1305.c' object='wolfcrypt/src/src_libwolfssl_la-chacha20_poly1305.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-chacha20_poly1305.lo `test -f 'wolfcrypt/src/chacha20_poly1305.c' || echo '$(srcdir)/'`wolfcrypt/src/chacha20_poly1305.c
-
-wolfcrypt/src/src_libwolfssl_la-misc.lo: wolfcrypt/src/misc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-misc.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-misc.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-misc.lo `test -f 'wolfcrypt/src/misc.c' || echo '$(srcdir)/'`wolfcrypt/src/misc.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-misc.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-misc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/misc.c' object='wolfcrypt/src/src_libwolfssl_la-misc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-misc.lo `test -f 'wolfcrypt/src/misc.c' || echo '$(srcdir)/'`wolfcrypt/src/misc.c
-
-wolfcrypt/src/src_libwolfssl_la-tfm.lo: wolfcrypt/src/tfm.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-tfm.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-tfm.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-tfm.lo `test -f 'wolfcrypt/src/tfm.c' || echo '$(srcdir)/'`wolfcrypt/src/tfm.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-tfm.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-tfm.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/tfm.c' object='wolfcrypt/src/src_libwolfssl_la-tfm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-tfm.lo `test -f 'wolfcrypt/src/tfm.c' || echo '$(srcdir)/'`wolfcrypt/src/tfm.c
-
-wolfcrypt/src/src_libwolfssl_la-integer.lo: wolfcrypt/src/integer.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-integer.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-integer.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-integer.lo `test -f 'wolfcrypt/src/integer.c' || echo '$(srcdir)/'`wolfcrypt/src/integer.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-integer.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-integer.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/integer.c' object='wolfcrypt/src/src_libwolfssl_la-integer.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-integer.lo `test -f 'wolfcrypt/src/integer.c' || echo '$(srcdir)/'`wolfcrypt/src/integer.c
-
-wolfcrypt/src/src_libwolfssl_la-curve25519.lo: wolfcrypt/src/curve25519.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-curve25519.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve25519.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-curve25519.lo `test -f 'wolfcrypt/src/curve25519.c' || echo '$(srcdir)/'`wolfcrypt/src/curve25519.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve25519.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve25519.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/curve25519.c' object='wolfcrypt/src/src_libwolfssl_la-curve25519.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-curve25519.lo `test -f 'wolfcrypt/src/curve25519.c' || echo '$(srcdir)/'`wolfcrypt/src/curve25519.c
-
-wolfcrypt/src/src_libwolfssl_la-ed25519.lo: wolfcrypt/src/ed25519.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-ed25519.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed25519.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-ed25519.lo `test -f 'wolfcrypt/src/ed25519.c' || echo '$(srcdir)/'`wolfcrypt/src/ed25519.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed25519.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed25519.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/ed25519.c' object='wolfcrypt/src/src_libwolfssl_la-ed25519.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-ed25519.lo `test -f 'wolfcrypt/src/ed25519.c' || echo '$(srcdir)/'`wolfcrypt/src/ed25519.c
-
-wolfcrypt/src/src_libwolfssl_la-fe_low_mem.lo: wolfcrypt/src/fe_low_mem.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-fe_low_mem.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_low_mem.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-fe_low_mem.lo `test -f 'wolfcrypt/src/fe_low_mem.c' || echo '$(srcdir)/'`wolfcrypt/src/fe_low_mem.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_low_mem.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_low_mem.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/fe_low_mem.c' object='wolfcrypt/src/src_libwolfssl_la-fe_low_mem.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-fe_low_mem.lo `test -f 'wolfcrypt/src/fe_low_mem.c' || echo '$(srcdir)/'`wolfcrypt/src/fe_low_mem.c
-
-wolfcrypt/src/src_libwolfssl_la-fe_operations.lo: wolfcrypt/src/fe_operations.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-fe_operations.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_operations.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-fe_operations.lo `test -f 'wolfcrypt/src/fe_operations.c' || echo '$(srcdir)/'`wolfcrypt/src/fe_operations.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_operations.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_operations.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/fe_operations.c' object='wolfcrypt/src/src_libwolfssl_la-fe_operations.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-fe_operations.lo `test -f 'wolfcrypt/src/fe_operations.c' || echo '$(srcdir)/'`wolfcrypt/src/fe_operations.c
-
-wolfcrypt/src/src_libwolfssl_la-ge_low_mem.lo: wolfcrypt/src/ge_low_mem.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-ge_low_mem.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_low_mem.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-ge_low_mem.lo `test -f 'wolfcrypt/src/ge_low_mem.c' || echo '$(srcdir)/'`wolfcrypt/src/ge_low_mem.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_low_mem.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_low_mem.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/ge_low_mem.c' object='wolfcrypt/src/src_libwolfssl_la-ge_low_mem.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-ge_low_mem.lo `test -f 'wolfcrypt/src/ge_low_mem.c' || echo '$(srcdir)/'`wolfcrypt/src/ge_low_mem.c
-
-wolfcrypt/src/src_libwolfssl_la-ge_operations.lo: wolfcrypt/src/ge_operations.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-ge_operations.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_operations.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-ge_operations.lo `test -f 'wolfcrypt/src/ge_operations.c' || echo '$(srcdir)/'`wolfcrypt/src/ge_operations.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_operations.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_operations.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/ge_operations.c' object='wolfcrypt/src/src_libwolfssl_la-ge_operations.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-ge_operations.lo `test -f 'wolfcrypt/src/ge_operations.c' || echo '$(srcdir)/'`wolfcrypt/src/ge_operations.c
-
-wolfcrypt/src/src_libwolfssl_la-curve448.lo: wolfcrypt/src/curve448.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-curve448.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve448.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-curve448.lo `test -f 'wolfcrypt/src/curve448.c' || echo '$(srcdir)/'`wolfcrypt/src/curve448.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve448.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve448.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/curve448.c' object='wolfcrypt/src/src_libwolfssl_la-curve448.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-curve448.lo `test -f 'wolfcrypt/src/curve448.c' || echo '$(srcdir)/'`wolfcrypt/src/curve448.c
-
-wolfcrypt/src/src_libwolfssl_la-ed448.lo: wolfcrypt/src/ed448.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-ed448.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed448.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-ed448.lo `test -f 'wolfcrypt/src/ed448.c' || echo '$(srcdir)/'`wolfcrypt/src/ed448.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed448.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed448.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/ed448.c' object='wolfcrypt/src/src_libwolfssl_la-ed448.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-ed448.lo `test -f 'wolfcrypt/src/ed448.c' || echo '$(srcdir)/'`wolfcrypt/src/ed448.c
-
-wolfcrypt/src/src_libwolfssl_la-fe_448.lo: wolfcrypt/src/fe_448.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-fe_448.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_448.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-fe_448.lo `test -f 'wolfcrypt/src/fe_448.c' || echo '$(srcdir)/'`wolfcrypt/src/fe_448.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_448.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_448.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/fe_448.c' object='wolfcrypt/src/src_libwolfssl_la-fe_448.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-fe_448.lo `test -f 'wolfcrypt/src/fe_448.c' || echo '$(srcdir)/'`wolfcrypt/src/fe_448.c
-
-wolfcrypt/src/src_libwolfssl_la-ge_448.lo: wolfcrypt/src/ge_448.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-ge_448.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_448.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-ge_448.lo `test -f 'wolfcrypt/src/ge_448.c' || echo '$(srcdir)/'`wolfcrypt/src/ge_448.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_448.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_448.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/ge_448.c' object='wolfcrypt/src/src_libwolfssl_la-ge_448.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-ge_448.lo `test -f 'wolfcrypt/src/ge_448.c' || echo '$(srcdir)/'`wolfcrypt/src/ge_448.c
-
-wolfcrypt/src/src_libwolfssl_la-compress.lo: wolfcrypt/src/compress.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-compress.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-compress.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-compress.lo `test -f 'wolfcrypt/src/compress.c' || echo '$(srcdir)/'`wolfcrypt/src/compress.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-compress.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-compress.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/compress.c' object='wolfcrypt/src/src_libwolfssl_la-compress.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-compress.lo `test -f 'wolfcrypt/src/compress.c' || echo '$(srcdir)/'`wolfcrypt/src/compress.c
-
-wolfcrypt/src/src_libwolfssl_la-pkcs7.lo: wolfcrypt/src/pkcs7.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-pkcs7.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs7.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-pkcs7.lo `test -f 'wolfcrypt/src/pkcs7.c' || echo '$(srcdir)/'`wolfcrypt/src/pkcs7.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs7.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs7.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/pkcs7.c' object='wolfcrypt/src/src_libwolfssl_la-pkcs7.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-pkcs7.lo `test -f 'wolfcrypt/src/pkcs7.c' || echo '$(srcdir)/'`wolfcrypt/src/pkcs7.c
-
-wolfcrypt/src/src_libwolfssl_la-srp.lo: wolfcrypt/src/srp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-srp.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-srp.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-srp.lo `test -f 'wolfcrypt/src/srp.c' || echo '$(srcdir)/'`wolfcrypt/src/srp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-srp.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-srp.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/srp.c' object='wolfcrypt/src/src_libwolfssl_la-srp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-srp.lo `test -f 'wolfcrypt/src/srp.c' || echo '$(srcdir)/'`wolfcrypt/src/srp.c
-
-wolfcrypt/src/src_libwolfssl_la-idea.lo: wolfcrypt/src/idea.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-idea.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-idea.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-idea.lo `test -f 'wolfcrypt/src/idea.c' || echo '$(srcdir)/'`wolfcrypt/src/idea.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-idea.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-idea.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/idea.c' object='wolfcrypt/src/src_libwolfssl_la-idea.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-idea.lo `test -f 'wolfcrypt/src/idea.c' || echo '$(srcdir)/'`wolfcrypt/src/idea.c
-
-wolfcrypt/src/port/af_alg/src_libwolfssl_la-wc_afalg.lo: wolfcrypt/src/port/af_alg/wc_afalg.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/af_alg/src_libwolfssl_la-wc_afalg.lo -MD -MP -MF wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-wc_afalg.Tpo -c -o wolfcrypt/src/port/af_alg/src_libwolfssl_la-wc_afalg.lo `test -f 'wolfcrypt/src/port/af_alg/wc_afalg.c' || echo '$(srcdir)/'`wolfcrypt/src/port/af_alg/wc_afalg.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-wc_afalg.Tpo wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-wc_afalg.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/af_alg/wc_afalg.c' object='wolfcrypt/src/port/af_alg/src_libwolfssl_la-wc_afalg.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/af_alg/src_libwolfssl_la-wc_afalg.lo `test -f 'wolfcrypt/src/port/af_alg/wc_afalg.c' || echo '$(srcdir)/'`wolfcrypt/src/port/af_alg/wc_afalg.c
-
-src/libwolfssl_la-internal.lo: src/internal.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT src/libwolfssl_la-internal.lo -MD -MP -MF src/$(DEPDIR)/libwolfssl_la-internal.Tpo -c -o src/libwolfssl_la-internal.lo `test -f 'src/internal.c' || echo '$(srcdir)/'`src/internal.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libwolfssl_la-internal.Tpo src/$(DEPDIR)/libwolfssl_la-internal.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/internal.c' object='src/libwolfssl_la-internal.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o src/libwolfssl_la-internal.lo `test -f 'src/internal.c' || echo '$(srcdir)/'`src/internal.c
-
-src/libwolfssl_la-wolfio.lo: src/wolfio.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT src/libwolfssl_la-wolfio.lo -MD -MP -MF src/$(DEPDIR)/libwolfssl_la-wolfio.Tpo -c -o src/libwolfssl_la-wolfio.lo `test -f 'src/wolfio.c' || echo '$(srcdir)/'`src/wolfio.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libwolfssl_la-wolfio.Tpo src/$(DEPDIR)/libwolfssl_la-wolfio.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/wolfio.c' object='src/libwolfssl_la-wolfio.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o src/libwolfssl_la-wolfio.lo `test -f 'src/wolfio.c' || echo '$(srcdir)/'`src/wolfio.c
-
-src/libwolfssl_la-keys.lo: src/keys.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT src/libwolfssl_la-keys.lo -MD -MP -MF src/$(DEPDIR)/libwolfssl_la-keys.Tpo -c -o src/libwolfssl_la-keys.lo `test -f 'src/keys.c' || echo '$(srcdir)/'`src/keys.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libwolfssl_la-keys.Tpo src/$(DEPDIR)/libwolfssl_la-keys.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/keys.c' object='src/libwolfssl_la-keys.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o src/libwolfssl_la-keys.lo `test -f 'src/keys.c' || echo '$(srcdir)/'`src/keys.c
-
-src/libwolfssl_la-ssl.lo: src/ssl.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT src/libwolfssl_la-ssl.lo -MD -MP -MF src/$(DEPDIR)/libwolfssl_la-ssl.Tpo -c -o src/libwolfssl_la-ssl.lo `test -f 'src/ssl.c' || echo '$(srcdir)/'`src/ssl.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libwolfssl_la-ssl.Tpo src/$(DEPDIR)/libwolfssl_la-ssl.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ssl.c' object='src/libwolfssl_la-ssl.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o src/libwolfssl_la-ssl.lo `test -f 'src/ssl.c' || echo '$(srcdir)/'`src/ssl.c
-
-src/libwolfssl_la-tls.lo: src/tls.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT src/libwolfssl_la-tls.lo -MD -MP -MF src/$(DEPDIR)/libwolfssl_la-tls.Tpo -c -o src/libwolfssl_la-tls.lo `test -f 'src/tls.c' || echo '$(srcdir)/'`src/tls.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libwolfssl_la-tls.Tpo src/$(DEPDIR)/libwolfssl_la-tls.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/tls.c' object='src/libwolfssl_la-tls.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o src/libwolfssl_la-tls.lo `test -f 'src/tls.c' || echo '$(srcdir)/'`src/tls.c
-
-src/libwolfssl_la-tls13.lo: src/tls13.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT src/libwolfssl_la-tls13.lo -MD -MP -MF src/$(DEPDIR)/libwolfssl_la-tls13.Tpo -c -o src/libwolfssl_la-tls13.lo `test -f 'src/tls13.c' || echo '$(srcdir)/'`src/tls13.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libwolfssl_la-tls13.Tpo src/$(DEPDIR)/libwolfssl_la-tls13.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/tls13.c' object='src/libwolfssl_la-tls13.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o src/libwolfssl_la-tls13.lo `test -f 'src/tls13.c' || echo '$(srcdir)/'`src/tls13.c
-
-src/libwolfssl_la-ocsp.lo: src/ocsp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT src/libwolfssl_la-ocsp.lo -MD -MP -MF src/$(DEPDIR)/libwolfssl_la-ocsp.Tpo -c -o src/libwolfssl_la-ocsp.lo `test -f 'src/ocsp.c' || echo '$(srcdir)/'`src/ocsp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libwolfssl_la-ocsp.Tpo src/$(DEPDIR)/libwolfssl_la-ocsp.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ocsp.c' object='src/libwolfssl_la-ocsp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o src/libwolfssl_la-ocsp.lo `test -f 'src/ocsp.c' || echo '$(srcdir)/'`src/ocsp.c
-
-src/libwolfssl_la-crl.lo: src/crl.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT src/libwolfssl_la-crl.lo -MD -MP -MF src/$(DEPDIR)/libwolfssl_la-crl.Tpo -c -o src/libwolfssl_la-crl.lo `test -f 'src/crl.c' || echo '$(srcdir)/'`src/crl.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libwolfssl_la-crl.Tpo src/$(DEPDIR)/libwolfssl_la-crl.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/crl.c' object='src/libwolfssl_la-crl.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o src/libwolfssl_la-crl.lo `test -f 'src/crl.c' || echo '$(srcdir)/'`src/crl.c
-
-src/libwolfssl_la-sniffer.lo: src/sniffer.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT src/libwolfssl_la-sniffer.lo -MD -MP -MF src/$(DEPDIR)/libwolfssl_la-sniffer.Tpo -c -o src/libwolfssl_la-sniffer.lo `test -f 'src/sniffer.c' || echo '$(srcdir)/'`src/sniffer.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libwolfssl_la-sniffer.Tpo src/$(DEPDIR)/libwolfssl_la-sniffer.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sniffer.c' object='src/libwolfssl_la-sniffer.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o src/libwolfssl_la-sniffer.lo `test -f 'src/sniffer.c' || echo '$(srcdir)/'`src/sniffer.c
-
-wolfcrypt/src/src_libwolfssl_la-cryptocb.lo: wolfcrypt/src/cryptocb.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-cryptocb.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cryptocb.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-cryptocb.lo `test -f 'wolfcrypt/src/cryptocb.c' || echo '$(srcdir)/'`wolfcrypt/src/cryptocb.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cryptocb.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cryptocb.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/cryptocb.c' object='wolfcrypt/src/src_libwolfssl_la-cryptocb.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-cryptocb.lo `test -f 'wolfcrypt/src/cryptocb.c' || echo '$(srcdir)/'`wolfcrypt/src/cryptocb.c
-
-wolfcrypt/src/src_libwolfssl_la-wc_pkcs11.lo: wolfcrypt/src/wc_pkcs11.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/src_libwolfssl_la-wc_pkcs11.lo -MD -MP -MF wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_pkcs11.Tpo -c -o wolfcrypt/src/src_libwolfssl_la-wc_pkcs11.lo `test -f 'wolfcrypt/src/wc_pkcs11.c' || echo '$(srcdir)/'`wolfcrypt/src/wc_pkcs11.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_pkcs11.Tpo wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_pkcs11.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/wc_pkcs11.c' object='wolfcrypt/src/src_libwolfssl_la-wc_pkcs11.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/src_libwolfssl_la-wc_pkcs11.lo `test -f 'wolfcrypt/src/wc_pkcs11.c' || echo '$(srcdir)/'`wolfcrypt/src/wc_pkcs11.c
-
-wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_hash.lo: wolfcrypt/src/port/devcrypto/devcrypto_hash.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_hash.lo -MD -MP -MF wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_hash.Tpo -c -o wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_hash.lo `test -f 'wolfcrypt/src/port/devcrypto/devcrypto_hash.c' || echo '$(srcdir)/'`wolfcrypt/src/port/devcrypto/devcrypto_hash.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_hash.Tpo wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_hash.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/devcrypto/devcrypto_hash.c' object='wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_hash.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_hash.lo `test -f 'wolfcrypt/src/port/devcrypto/devcrypto_hash.c' || echo '$(srcdir)/'`wolfcrypt/src/port/devcrypto/devcrypto_hash.c
-
-wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_aes.lo: wolfcrypt/src/port/devcrypto/devcrypto_aes.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_aes.lo -MD -MP -MF wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_aes.Tpo -c -o wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_aes.lo `test -f 'wolfcrypt/src/port/devcrypto/devcrypto_aes.c' || echo '$(srcdir)/'`wolfcrypt/src/port/devcrypto/devcrypto_aes.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_aes.Tpo wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_aes.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/devcrypto/devcrypto_aes.c' object='wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_aes.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/devcrypto/src_libwolfssl_la-devcrypto_aes.lo `test -f 'wolfcrypt/src/port/devcrypto/devcrypto_aes.c' || echo '$(srcdir)/'`wolfcrypt/src/port/devcrypto/devcrypto_aes.c
-
-wolfcrypt/src/port/devcrypto/src_libwolfssl_la-wc_devcrypto.lo: wolfcrypt/src/port/devcrypto/wc_devcrypto.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/devcrypto/src_libwolfssl_la-wc_devcrypto.lo -MD -MP -MF wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-wc_devcrypto.Tpo -c -o wolfcrypt/src/port/devcrypto/src_libwolfssl_la-wc_devcrypto.lo `test -f 'wolfcrypt/src/port/devcrypto/wc_devcrypto.c' || echo '$(srcdir)/'`wolfcrypt/src/port/devcrypto/wc_devcrypto.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-wc_devcrypto.Tpo wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-wc_devcrypto.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/devcrypto/wc_devcrypto.c' object='wolfcrypt/src/port/devcrypto/src_libwolfssl_la-wc_devcrypto.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/devcrypto/src_libwolfssl_la-wc_devcrypto.lo `test -f 'wolfcrypt/src/port/devcrypto/wc_devcrypto.c' || echo '$(srcdir)/'`wolfcrypt/src/port/devcrypto/wc_devcrypto.c
-
-wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_nitrox.lo: wolfcrypt/src/port/cavium/cavium_nitrox.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_nitrox.lo -MD -MP -MF wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_nitrox.Tpo -c -o wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_nitrox.lo `test -f 'wolfcrypt/src/port/cavium/cavium_nitrox.c' || echo '$(srcdir)/'`wolfcrypt/src/port/cavium/cavium_nitrox.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_nitrox.Tpo wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_nitrox.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/cavium/cavium_nitrox.c' object='wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_nitrox.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_nitrox.lo `test -f 'wolfcrypt/src/port/cavium/cavium_nitrox.c' || echo '$(srcdir)/'`wolfcrypt/src/port/cavium/cavium_nitrox.c
-
-wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_octeon_sync.lo: wolfcrypt/src/port/cavium/cavium_octeon_sync.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_octeon_sync.lo -MD -MP -MF wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_octeon_sync.Tpo -c -o wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_octeon_sync.lo `test -f 'wolfcrypt/src/port/cavium/cavium_octeon_sync.c' || echo '$(srcdir)/'`wolfcrypt/src/port/cavium/cavium_octeon_sync.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_octeon_sync.Tpo wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_octeon_sync.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/cavium/cavium_octeon_sync.c' object='wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_octeon_sync.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/cavium/src_libwolfssl_la-cavium_octeon_sync.lo `test -f 'wolfcrypt/src/port/cavium/cavium_octeon_sync.c' || echo '$(srcdir)/'`wolfcrypt/src/port/cavium/cavium_octeon_sync.c
-
-wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist.lo: wolfcrypt/src/port/intel/quickassist.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist.lo -MD -MP -MF wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist.Tpo -c -o wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist.lo `test -f 'wolfcrypt/src/port/intel/quickassist.c' || echo '$(srcdir)/'`wolfcrypt/src/port/intel/quickassist.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist.Tpo wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/intel/quickassist.c' object='wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist.lo `test -f 'wolfcrypt/src/port/intel/quickassist.c' || echo '$(srcdir)/'`wolfcrypt/src/port/intel/quickassist.c
-
-wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_mem.lo: wolfcrypt/src/port/intel/quickassist_mem.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_mem.lo -MD -MP -MF wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_mem.Tpo -c -o wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_mem.lo `test -f 'wolfcrypt/src/port/intel/quickassist_mem.c' || echo '$(srcdir)/'`wolfcrypt/src/port/intel/quickassist_mem.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_mem.Tpo wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_mem.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/intel/quickassist_mem.c' object='wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_mem.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_mem.lo `test -f 'wolfcrypt/src/port/intel/quickassist_mem.c' || echo '$(srcdir)/'`wolfcrypt/src/port/intel/quickassist_mem.c
-
-wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_sync.lo: wolfcrypt/src/port/intel/quickassist_sync.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_sync.lo -MD -MP -MF wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_sync.Tpo -c -o wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_sync.lo `test -f 'wolfcrypt/src/port/intel/quickassist_sync.c' || echo '$(srcdir)/'`wolfcrypt/src/port/intel/quickassist_sync.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_sync.Tpo wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_sync.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/intel/quickassist_sync.c' object='wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_sync.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/intel/src_libwolfssl_la-quickassist_sync.lo `test -f 'wolfcrypt/src/port/intel/quickassist_sync.c' || echo '$(srcdir)/'`wolfcrypt/src/port/intel/quickassist_sync.c
-
-wolfcrypt/src/port/atmel/src_libwolfssl_la-atmel.lo: wolfcrypt/src/port/atmel/atmel.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -MT wolfcrypt/src/port/atmel/src_libwolfssl_la-atmel.lo -MD -MP -MF wolfcrypt/src/port/atmel/$(DEPDIR)/src_libwolfssl_la-atmel.Tpo -c -o wolfcrypt/src/port/atmel/src_libwolfssl_la-atmel.lo `test -f 'wolfcrypt/src/port/atmel/atmel.c' || echo '$(srcdir)/'`wolfcrypt/src/port/atmel/atmel.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/src/port/atmel/$(DEPDIR)/src_libwolfssl_la-atmel.Tpo wolfcrypt/src/port/atmel/$(DEPDIR)/src_libwolfssl_la-atmel.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/src/port/atmel/atmel.c' object='wolfcrypt/src/port/atmel/src_libwolfssl_la-atmel.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libwolfssl_la_CPPFLAGS) $(CPPFLAGS) $(src_libwolfssl_la_CFLAGS) $(CFLAGS) -c -o wolfcrypt/src/port/atmel/src_libwolfssl_la-atmel.lo `test -f 'wolfcrypt/src/port/atmel/atmel.c' || echo '$(srcdir)/'`wolfcrypt/src/port/atmel/atmel.c
-
-tests/unit_test-unit.o: tests/unit.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/unit_test-unit.o -MD -MP -MF tests/$(DEPDIR)/unit_test-unit.Tpo -c -o tests/unit_test-unit.o `test -f 'tests/unit.c' || echo '$(srcdir)/'`tests/unit.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/unit_test-unit.Tpo tests/$(DEPDIR)/unit_test-unit.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/unit.c' object='tests/unit_test-unit.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/unit_test-unit.o `test -f 'tests/unit.c' || echo '$(srcdir)/'`tests/unit.c
-
-tests/unit_test-unit.obj: tests/unit.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/unit_test-unit.obj -MD -MP -MF tests/$(DEPDIR)/unit_test-unit.Tpo -c -o tests/unit_test-unit.obj `if test -f 'tests/unit.c'; then $(CYGPATH_W) 'tests/unit.c'; else $(CYGPATH_W) '$(srcdir)/tests/unit.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/unit_test-unit.Tpo tests/$(DEPDIR)/unit_test-unit.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/unit.c' object='tests/unit_test-unit.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/unit_test-unit.obj `if test -f 'tests/unit.c'; then $(CYGPATH_W) 'tests/unit.c'; else $(CYGPATH_W) '$(srcdir)/tests/unit.c'; fi`
-
-tests/unit_test-api.o: tests/api.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/unit_test-api.o -MD -MP -MF tests/$(DEPDIR)/unit_test-api.Tpo -c -o tests/unit_test-api.o `test -f 'tests/api.c' || echo '$(srcdir)/'`tests/api.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/unit_test-api.Tpo tests/$(DEPDIR)/unit_test-api.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/api.c' object='tests/unit_test-api.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/unit_test-api.o `test -f 'tests/api.c' || echo '$(srcdir)/'`tests/api.c
-
-tests/unit_test-api.obj: tests/api.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/unit_test-api.obj -MD -MP -MF tests/$(DEPDIR)/unit_test-api.Tpo -c -o tests/unit_test-api.obj `if test -f 'tests/api.c'; then $(CYGPATH_W) 'tests/api.c'; else $(CYGPATH_W) '$(srcdir)/tests/api.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/unit_test-api.Tpo tests/$(DEPDIR)/unit_test-api.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/api.c' object='tests/unit_test-api.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/unit_test-api.obj `if test -f 'tests/api.c'; then $(CYGPATH_W) 'tests/api.c'; else $(CYGPATH_W) '$(srcdir)/tests/api.c'; fi`
-
-tests/unit_test-suites.o: tests/suites.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/unit_test-suites.o -MD -MP -MF tests/$(DEPDIR)/unit_test-suites.Tpo -c -o tests/unit_test-suites.o `test -f 'tests/suites.c' || echo '$(srcdir)/'`tests/suites.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/unit_test-suites.Tpo tests/$(DEPDIR)/unit_test-suites.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/suites.c' object='tests/unit_test-suites.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/unit_test-suites.o `test -f 'tests/suites.c' || echo '$(srcdir)/'`tests/suites.c
-
-tests/unit_test-suites.obj: tests/suites.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/unit_test-suites.obj -MD -MP -MF tests/$(DEPDIR)/unit_test-suites.Tpo -c -o tests/unit_test-suites.obj `if test -f 'tests/suites.c'; then $(CYGPATH_W) 'tests/suites.c'; else $(CYGPATH_W) '$(srcdir)/tests/suites.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/unit_test-suites.Tpo tests/$(DEPDIR)/unit_test-suites.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/suites.c' object='tests/unit_test-suites.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/unit_test-suites.obj `if test -f 'tests/suites.c'; then $(CYGPATH_W) 'tests/suites.c'; else $(CYGPATH_W) '$(srcdir)/tests/suites.c'; fi`
-
-tests/unit_test-hash.o: tests/hash.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/unit_test-hash.o -MD -MP -MF tests/$(DEPDIR)/unit_test-hash.Tpo -c -o tests/unit_test-hash.o `test -f 'tests/hash.c' || echo '$(srcdir)/'`tests/hash.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/unit_test-hash.Tpo tests/$(DEPDIR)/unit_test-hash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/hash.c' object='tests/unit_test-hash.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/unit_test-hash.o `test -f 'tests/hash.c' || echo '$(srcdir)/'`tests/hash.c
-
-tests/unit_test-hash.obj: tests/hash.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/unit_test-hash.obj -MD -MP -MF tests/$(DEPDIR)/unit_test-hash.Tpo -c -o tests/unit_test-hash.obj `if test -f 'tests/hash.c'; then $(CYGPATH_W) 'tests/hash.c'; else $(CYGPATH_W) '$(srcdir)/tests/hash.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/unit_test-hash.Tpo tests/$(DEPDIR)/unit_test-hash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/hash.c' object='tests/unit_test-hash.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/unit_test-hash.obj `if test -f 'tests/hash.c'; then $(CYGPATH_W) 'tests/hash.c'; else $(CYGPATH_W) '$(srcdir)/tests/hash.c'; fi`
-
-tests/unit_test-srp.o: tests/srp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/unit_test-srp.o -MD -MP -MF tests/$(DEPDIR)/unit_test-srp.Tpo -c -o tests/unit_test-srp.o `test -f 'tests/srp.c' || echo '$(srcdir)/'`tests/srp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/unit_test-srp.Tpo tests/$(DEPDIR)/unit_test-srp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/srp.c' object='tests/unit_test-srp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/unit_test-srp.o `test -f 'tests/srp.c' || echo '$(srcdir)/'`tests/srp.c
-
-tests/unit_test-srp.obj: tests/srp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT tests/unit_test-srp.obj -MD -MP -MF tests/$(DEPDIR)/unit_test-srp.Tpo -c -o tests/unit_test-srp.obj `if test -f 'tests/srp.c'; then $(CYGPATH_W) 'tests/srp.c'; else $(CYGPATH_W) '$(srcdir)/tests/srp.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/unit_test-srp.Tpo tests/$(DEPDIR)/unit_test-srp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/srp.c' object='tests/unit_test-srp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o tests/unit_test-srp.obj `if test -f 'tests/srp.c'; then $(CYGPATH_W) 'tests/srp.c'; else $(CYGPATH_W) '$(srcdir)/tests/srp.c'; fi`
-
-examples/client/tests_unit_test-client.o: examples/client/client.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/client/tests_unit_test-client.o -MD -MP -MF examples/client/$(DEPDIR)/tests_unit_test-client.Tpo -c -o examples/client/tests_unit_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/tests_unit_test-client.Tpo examples/client/$(DEPDIR)/tests_unit_test-client.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/tests_unit_test-client.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/client/tests_unit_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c
-
-examples/client/tests_unit_test-client.obj: examples/client/client.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/client/tests_unit_test-client.obj -MD -MP -MF examples/client/$(DEPDIR)/tests_unit_test-client.Tpo -c -o examples/client/tests_unit_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/tests_unit_test-client.Tpo examples/client/$(DEPDIR)/tests_unit_test-client.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/tests_unit_test-client.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/client/tests_unit_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi`
-
-examples/server/tests_unit_test-server.o: examples/server/server.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/server/tests_unit_test-server.o -MD -MP -MF examples/server/$(DEPDIR)/tests_unit_test-server.Tpo -c -o examples/server/tests_unit_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/tests_unit_test-server.Tpo examples/server/$(DEPDIR)/tests_unit_test-server.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/tests_unit_test-server.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/server/tests_unit_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c
-
-examples/server/tests_unit_test-server.obj: examples/server/server.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -MT examples/server/tests_unit_test-server.obj -MD -MP -MF examples/server/$(DEPDIR)/tests_unit_test-server.Tpo -c -o examples/server/tests_unit_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/tests_unit_test-server.Tpo examples/server/$(DEPDIR)/tests_unit_test-server.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/tests_unit_test-server.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_unit_test_CFLAGS) $(CFLAGS) -c -o examples/server/tests_unit_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi`
-
-wolfcrypt/test/testsuite_testsuite_test-test.o: wolfcrypt/test/test.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT wolfcrypt/test/testsuite_testsuite_test-test.o -MD -MP -MF wolfcrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo -c -o wolfcrypt/test/testsuite_testsuite_test-test.o `test -f 'wolfcrypt/test/test.c' || echo '$(srcdir)/'`wolfcrypt/test/test.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo wolfcrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/test/test.c' object='wolfcrypt/test/testsuite_testsuite_test-test.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o wolfcrypt/test/testsuite_testsuite_test-test.o `test -f 'wolfcrypt/test/test.c' || echo '$(srcdir)/'`wolfcrypt/test/test.c
-
-wolfcrypt/test/testsuite_testsuite_test-test.obj: wolfcrypt/test/test.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT wolfcrypt/test/testsuite_testsuite_test-test.obj -MD -MP -MF wolfcrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo -c -o wolfcrypt/test/testsuite_testsuite_test-test.obj `if test -f 'wolfcrypt/test/test.c'; then $(CYGPATH_W) 'wolfcrypt/test/test.c'; else $(CYGPATH_W) '$(srcdir)/wolfcrypt/test/test.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wolfcrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Tpo wolfcrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wolfcrypt/test/test.c' object='wolfcrypt/test/testsuite_testsuite_test-test.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o wolfcrypt/test/testsuite_testsuite_test-test.obj `if test -f 'wolfcrypt/test/test.c'; then $(CYGPATH_W) 'wolfcrypt/test/test.c'; else $(CYGPATH_W) '$(srcdir)/wolfcrypt/test/test.c'; fi`
-
-examples/client/testsuite_testsuite_test-client.o: examples/client/client.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/client/testsuite_testsuite_test-client.o -MD -MP -MF examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo -c -o examples/client/testsuite_testsuite_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/testsuite_testsuite_test-client.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/client/testsuite_testsuite_test-client.o `test -f 'examples/client/client.c' || echo '$(srcdir)/'`examples/client/client.c
-
-examples/client/testsuite_testsuite_test-client.obj: examples/client/client.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/client/testsuite_testsuite_test-client.obj -MD -MP -MF examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo -c -o examples/client/testsuite_testsuite_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Tpo examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/client/client.c' object='examples/client/testsuite_testsuite_test-client.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/client/testsuite_testsuite_test-client.obj `if test -f 'examples/client/client.c'; then $(CYGPATH_W) 'examples/client/client.c'; else $(CYGPATH_W) '$(srcdir)/examples/client/client.c'; fi`
-
-examples/echoclient/testsuite_testsuite_test-echoclient.o: examples/echoclient/echoclient.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoclient/testsuite_testsuite_test-echoclient.o -MD -MP -MF examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo -c -o examples/echoclient/testsuite_testsuite_test-echoclient.o `test -f 'examples/echoclient/echoclient.c' || echo '$(srcdir)/'`examples/echoclient/echoclient.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoclient/echoclient.c' object='examples/echoclient/testsuite_testsuite_test-echoclient.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoclient/testsuite_testsuite_test-echoclient.o `test -f 'examples/echoclient/echoclient.c' || echo '$(srcdir)/'`examples/echoclient/echoclient.c
-
-examples/echoclient/testsuite_testsuite_test-echoclient.obj: examples/echoclient/echoclient.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoclient/testsuite_testsuite_test-echoclient.obj -MD -MP -MF examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo -c -o examples/echoclient/testsuite_testsuite_test-echoclient.obj `if test -f 'examples/echoclient/echoclient.c'; then $(CYGPATH_W) 'examples/echoclient/echoclient.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoclient/echoclient.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Tpo examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoclient/echoclient.c' object='examples/echoclient/testsuite_testsuite_test-echoclient.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoclient/testsuite_testsuite_test-echoclient.obj `if test -f 'examples/echoclient/echoclient.c'; then $(CYGPATH_W) 'examples/echoclient/echoclient.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoclient/echoclient.c'; fi`
-
-examples/echoserver/testsuite_testsuite_test-echoserver.o: examples/echoserver/echoserver.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoserver/testsuite_testsuite_test-echoserver.o -MD -MP -MF examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo -c -o examples/echoserver/testsuite_testsuite_test-echoserver.o `test -f 'examples/echoserver/echoserver.c' || echo '$(srcdir)/'`examples/echoserver/echoserver.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoserver/echoserver.c' object='examples/echoserver/testsuite_testsuite_test-echoserver.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoserver/testsuite_testsuite_test-echoserver.o `test -f 'examples/echoserver/echoserver.c' || echo '$(srcdir)/'`examples/echoserver/echoserver.c
-
-examples/echoserver/testsuite_testsuite_test-echoserver.obj: examples/echoserver/echoserver.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/echoserver/testsuite_testsuite_test-echoserver.obj -MD -MP -MF examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo -c -o examples/echoserver/testsuite_testsuite_test-echoserver.obj `if test -f 'examples/echoserver/echoserver.c'; then $(CYGPATH_W) 'examples/echoserver/echoserver.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoserver/echoserver.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Tpo examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/echoserver/echoserver.c' object='examples/echoserver/testsuite_testsuite_test-echoserver.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/echoserver/testsuite_testsuite_test-echoserver.obj `if test -f 'examples/echoserver/echoserver.c'; then $(CYGPATH_W) 'examples/echoserver/echoserver.c'; else $(CYGPATH_W) '$(srcdir)/examples/echoserver/echoserver.c'; fi`
-
-examples/server/testsuite_testsuite_test-server.o: examples/server/server.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/server/testsuite_testsuite_test-server.o -MD -MP -MF examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo -c -o examples/server/testsuite_testsuite_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/testsuite_testsuite_test-server.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/server/testsuite_testsuite_test-server.o `test -f 'examples/server/server.c' || echo '$(srcdir)/'`examples/server/server.c
-
-examples/server/testsuite_testsuite_test-server.obj: examples/server/server.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT examples/server/testsuite_testsuite_test-server.obj -MD -MP -MF examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo -c -o examples/server/testsuite_testsuite_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Tpo examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='examples/server/server.c' object='examples/server/testsuite_testsuite_test-server.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o examples/server/testsuite_testsuite_test-server.obj `if test -f 'examples/server/server.c'; then $(CYGPATH_W) 'examples/server/server.c'; else $(CYGPATH_W) '$(srcdir)/examples/server/server.c'; fi`
-
-testsuite/testsuite_test-testsuite.o: testsuite/testsuite.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT testsuite/testsuite_test-testsuite.o -MD -MP -MF testsuite/$(DEPDIR)/testsuite_test-testsuite.Tpo -c -o testsuite/testsuite_test-testsuite.o `test -f 'testsuite/testsuite.c' || echo '$(srcdir)/'`testsuite/testsuite.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) testsuite/$(DEPDIR)/testsuite_test-testsuite.Tpo testsuite/$(DEPDIR)/testsuite_test-testsuite.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testsuite/testsuite.c' object='testsuite/testsuite_test-testsuite.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o testsuite/testsuite_test-testsuite.o `test -f 'testsuite/testsuite.c' || echo '$(srcdir)/'`testsuite/testsuite.c
-
-testsuite/testsuite_test-testsuite.obj: testsuite/testsuite.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -MT testsuite/testsuite_test-testsuite.obj -MD -MP -MF testsuite/$(DEPDIR)/testsuite_test-testsuite.Tpo -c -o testsuite/testsuite_test-testsuite.obj `if test -f 'testsuite/testsuite.c'; then $(CYGPATH_W) 'testsuite/testsuite.c'; else $(CYGPATH_W) '$(srcdir)/testsuite/testsuite.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) testsuite/$(DEPDIR)/testsuite_test-testsuite.Tpo testsuite/$(DEPDIR)/testsuite_test-testsuite.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testsuite/testsuite.c' object='testsuite/testsuite_test-testsuite.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testsuite_testsuite_test_CFLAGS) $(CFLAGS) -c -o testsuite/testsuite_test-testsuite.obj `if test -f 'testsuite/testsuite.c'; then $(CYGPATH_W) 'testsuite/testsuite.c'; else $(CYGPATH_W) '$(srcdir)/testsuite/testsuite.c'; fi`
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
- -rm -rf ctaocrypt/src/.libs ctaocrypt/src/_libs
- -rm -rf examples/benchmark/.libs examples/benchmark/_libs
- -rm -rf examples/client/.libs examples/client/_libs
- -rm -rf examples/echoclient/.libs examples/echoclient/_libs
- -rm -rf examples/echoserver/.libs examples/echoserver/_libs
- -rm -rf examples/sctp/.libs examples/sctp/_libs
- -rm -rf examples/server/.libs examples/server/_libs
- -rm -rf mcapi/.libs mcapi/_libs
- -rm -rf src/.libs src/_libs
- -rm -rf sslSniffer/sslSnifferTest/.libs sslSniffer/sslSnifferTest/_libs
- -rm -rf tests/.libs tests/_libs
- -rm -rf testsuite/.libs testsuite/_libs
- -rm -rf wolfcrypt/benchmark/.libs wolfcrypt/benchmark/_libs
- -rm -rf wolfcrypt/src/.libs wolfcrypt/src/_libs
- -rm -rf wolfcrypt/src/port/af_alg/.libs wolfcrypt/src/port/af_alg/_libs
- -rm -rf wolfcrypt/src/port/arm/.libs wolfcrypt/src/port/arm/_libs
- -rm -rf wolfcrypt/src/port/atmel/.libs wolfcrypt/src/port/atmel/_libs
- -rm -rf wolfcrypt/src/port/cavium/.libs wolfcrypt/src/port/cavium/_libs
- -rm -rf wolfcrypt/src/port/devcrypto/.libs wolfcrypt/src/port/devcrypto/_libs
- -rm -rf wolfcrypt/src/port/intel/.libs wolfcrypt/src/port/intel/_libs
- -rm -rf wolfcrypt/test/.libs wolfcrypt/test/_libs
- -rm -rf wolfcrypt/user-crypto/src/.libs wolfcrypt/user-crypto/src/_libs
-
-distclean-libtool:
- -rm -f libtool config.lt
-install-dist_docDATA: $(dist_doc_DATA)
- @$(NORMAL_INSTALL)
- @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
- done
-
-uninstall-dist_docDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
-install-dist_exampleDATA: $(dist_example_DATA)
- @$(NORMAL_INSTALL)
- @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(exampledir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(exampledir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \
- done
-
-uninstall-dist_exampleDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(exampledir)'; $(am__uninstall_files_from_dir)
-install-ippDATA: $(ipp_DATA)
- @$(NORMAL_INSTALL)
- @list='$(ipp_DATA)'; test -n "$(ippdir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(ippdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(ippdir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ippdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(ippdir)" || exit $$?; \
- done
-
-uninstall-ippDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(ipp_DATA)'; test -n "$(ippdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(ippdir)'; $(am__uninstall_files_from_dir)
-install-pkgconfigDATA: $(pkgconfig_DATA)
- @$(NORMAL_INSTALL)
- @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
- done
-
-uninstall-pkgconfigDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
-install-includeHEADERS: $(include_HEADERS)
- @$(NORMAL_INSTALL)
- @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
- done
-
-uninstall-includeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
-install-nobase_includeHEADERS: $(nobase_include_HEADERS)
- @$(NORMAL_INSTALL)
- @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
- fi; \
- $(am__nobase_list) | while read dir files; do \
- xfiles=; for file in $$files; do \
- if test -f "$$file"; then xfiles="$$xfiles $$file"; \
- else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
- test -z "$$xfiles" || { \
- test "x$$dir" = x. || { \
- echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \
- $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \
- echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \
- $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \
- done
-
-uninstall-nobase_includeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
- $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
- dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
-
-ID: $(am__tagged_files)
- $(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- set x; \
- here=`pwd`; \
- $(am__define_uniq_tagged_files); \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- $(am__define_uniq_tagged_files); \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-cscope: cscope.files
- test ! -s cscope.files \
- || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-clean-cscope:
- -rm -f cscope.files
-cscope.files: clean-cscope cscopelist
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
- list='$(am__tagged_files)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
- -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
-
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
- rm -f $< $@
- $(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
- @:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
- @$(am__set_TESTS_bases); \
- am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
- redo_bases=`for i in $$bases; do \
- am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
- done`; \
- if test -n "$$redo_bases"; then \
- redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
- redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
- if $(am__make_dryrun); then :; else \
- rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
- fi; \
- fi; \
- if test -n "$$am__remaking_logs"; then \
- echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
- "recursion detected" >&2; \
- elif test -n "$$redo_logs"; then \
- am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
- fi; \
- if $(am__make_dryrun); then :; else \
- st=0; \
- errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
- for i in $$redo_bases; do \
- test -f $$i.trs && test -r $$i.trs \
- || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
- test -f $$i.log && test -r $$i.log \
- || { echo "$$errmsg $$i.log" >&2; st=1; }; \
- done; \
- test $$st -eq 0 || exit 1; \
- fi
- @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
- ws='[ ]'; \
- results=`for b in $$bases; do echo $$b.trs; done`; \
- test -n "$$results" || results=/dev/null; \
- all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
- pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
- fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
- skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
- xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
- xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
- error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
- if test `expr $$fail + $$xpass + $$error` -eq 0; then \
- success=true; \
- else \
- success=false; \
- fi; \
- br='==================='; br=$$br$$br$$br$$br; \
- result_count () \
- { \
- if test x"$$1" = x"--maybe-color"; then \
- maybe_colorize=yes; \
- elif test x"$$1" = x"--no-color"; then \
- maybe_colorize=no; \
- else \
- echo "$@: invalid 'result_count' usage" >&2; exit 4; \
- fi; \
- shift; \
- desc=$$1 count=$$2; \
- if test $$maybe_colorize = yes && test $$count -gt 0; then \
- color_start=$$3 color_end=$$std; \
- else \
- color_start= color_end=; \
- fi; \
- echo "$${color_start}# $$desc $$count$${color_end}"; \
- }; \
- create_testsuite_report () \
- { \
- result_count $$1 "TOTAL:" $$all "$$brg"; \
- result_count $$1 "PASS: " $$pass "$$grn"; \
- result_count $$1 "SKIP: " $$skip "$$blu"; \
- result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
- result_count $$1 "FAIL: " $$fail "$$red"; \
- result_count $$1 "XPASS:" $$xpass "$$red"; \
- result_count $$1 "ERROR:" $$error "$$mgn"; \
- }; \
- { \
- echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
- $(am__rst_title); \
- create_testsuite_report --no-color; \
- echo; \
- echo ".. contents:: :depth: 2"; \
- echo; \
- for b in $$bases; do echo $$b; done \
- | $(am__create_global_log); \
- } >$(TEST_SUITE_LOG).tmp || exit 1; \
- mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
- if $$success; then \
- col="$$grn"; \
- else \
- col="$$red"; \
- test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
- fi; \
- echo "$${col}$$br$${std}"; \
- echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
- echo "$${col}$$br$${std}"; \
- create_testsuite_report --maybe-color; \
- echo "$$col$$br$$std"; \
- if $$success; then :; else \
- echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
- if test -n "$(PACKAGE_BUGREPORT)"; then \
- echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
- fi; \
- echo "$$col$$br$$std"; \
- fi; \
- $$success || exit 1
-
-check-TESTS: $(check_PROGRAMS) $(check_SCRIPTS)
- @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
- @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
- @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
- @set +e; $(am__set_TESTS_bases); \
- log_list=`for i in $$bases; do echo $$i.log; done`; \
- trs_list=`for i in $$bases; do echo $$i.trs; done`; \
- log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
- exit $$?;
-recheck: all $(check_PROGRAMS) $(check_SCRIPTS)
- @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
- @set +e; $(am__set_TESTS_bases); \
- bases=`for i in $$bases; do echo $$i; done \
- | $(am__list_recheck_tests)` || exit 1; \
- log_list=`for i in $$bases; do echo $$i.log; done`; \
- log_list=`echo $$log_list`; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
- am__force_recheck=am--force-recheck \
- TEST_LOGS="$$log_list"; \
- exit $$?
-wolfcrypt/test/testwolfcrypt.log: wolfcrypt/test/testwolfcrypt$(EXEEXT)
- @p='wolfcrypt/test/testwolfcrypt$(EXEEXT)'; \
- b='wolfcrypt/test/testwolfcrypt'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-mcapi/test.log: mcapi/test$(EXEEXT)
- @p='mcapi/test$(EXEEXT)'; \
- b='mcapi/test'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
- @p='$<'; \
- $(am__set_b); \
- $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-@am__EXEEXT_TRUE@.test$(EXEEXT).log:
-@am__EXEEXT_TRUE@ @p='$<'; \
-@am__EXEEXT_TRUE@ $(am__set_b); \
-@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
-@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
-
-distdir: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
- $(am__remove_distdir)
- test -d "$(distdir)" || mkdir "$(distdir)"
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
- -test -n "$(am__skip_mode_fix)" \
- || find "$(distdir)" -type d ! -perm -755 \
- -exec chmod u+rwx,go+rx {} \; -o \
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r "$(distdir)"
-dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
- $(am__post_remove_distdir)
-
-dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
- $(am__post_remove_distdir)
-
-dist-lzip: distdir
- tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
- $(am__post_remove_distdir)
-
-dist-xz: distdir
- tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
- $(am__post_remove_distdir)
-
-dist-zstd: distdir
- tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
- $(am__post_remove_distdir)
-
-dist-tarZ: distdir
- @echo WARNING: "Support for distribution archives compressed with" \
- "legacy program 'compress' is deprecated." >&2
- @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__post_remove_distdir)
-
-dist-shar: distdir
- @echo WARNING: "Support for shar distribution archives is" \
- "deprecated." >&2
- @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
- $(am__post_remove_distdir)
-
-dist-zip: distdir
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__post_remove_distdir)
-
-dist dist-all:
- $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
- $(am__post_remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- case '$(DIST_ARCHIVES)' in \
- *.tar.gz*) \
- eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
- *.tar.bz2*) \
- bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lz*) \
- lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
- *.tar.xz*) \
- xz -dc $(distdir).tar.xz | $(am__untar) ;;\
- *.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
- *.shar.gz*) \
- eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
- *.zip*) \
- unzip $(distdir).zip ;;\
- *.tar.zst*) \
- zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
- esac
- chmod -R a-w $(distdir)
- chmod u+w $(distdir)
- mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
- chmod a-w $(distdir)
- test -d $(distdir)/_build || exit 0; \
- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build/sub \
- && ../../configure \
- $(AM_DISTCHECK_CONFIGURE_FLAGS) \
- $(DISTCHECK_CONFIGURE_FLAGS) \
- --srcdir=../.. --prefix="$$dc_install_base" \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
- distuninstallcheck \
- && chmod -R a-w "$$dc_install_base" \
- && ({ \
- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
- } || { rm -rf "$$dc_destdir"; exit 1; }) \
- && rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist \
- && rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
- && cd "$$am__cwd" \
- || exit 1
- $(am__post_remove_distdir)
- @(echo "$(distdir) archives ready for distribution: "; \
- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
-distuninstallcheck:
- @test -n '$(distuninstallcheck_dir)' || { \
- echo 'ERROR: trying to run $@ with an empty' \
- '$$(distuninstallcheck_dir)' >&2; \
- exit 1; \
- }; \
- $(am__cd) '$(distuninstallcheck_dir)' || { \
- echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
- exit 1; \
- }; \
- test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left after uninstall:" ; \
- if test -n "$(DESTDIR)"; then \
- echo " (check DESTDIR support)"; \
- fi ; \
- $(distuninstallcheck_listfiles) ; \
- exit 1; } >&2
-distcleancheck: distclean
- @if test '$(srcdir)' = . ; then \
- echo "ERROR: distcleancheck can only run from a VPATH build" ; \
- exit 1 ; \
- fi
- @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left in build directory after distclean:" ; \
- $(distcleancheck_listfiles) ; \
- exit 1; } >&2
-check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS)
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(DATA) \
- $(HEADERS) config.h
-install-binPROGRAMS: install-libLTLIBRARIES
-
-installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(ippdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
- -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
- -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
- -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
- -rm -f ctaocrypt/src/$(DEPDIR)/$(am__dirstamp)
- -rm -f ctaocrypt/src/$(am__dirstamp)
- -rm -f examples/benchmark/$(DEPDIR)/$(am__dirstamp)
- -rm -f examples/benchmark/$(am__dirstamp)
- -rm -f examples/client/$(DEPDIR)/$(am__dirstamp)
- -rm -f examples/client/$(am__dirstamp)
- -rm -f examples/echoclient/$(DEPDIR)/$(am__dirstamp)
- -rm -f examples/echoclient/$(am__dirstamp)
- -rm -f examples/echoserver/$(DEPDIR)/$(am__dirstamp)
- -rm -f examples/echoserver/$(am__dirstamp)
- -rm -f examples/sctp/$(DEPDIR)/$(am__dirstamp)
- -rm -f examples/sctp/$(am__dirstamp)
- -rm -f examples/server/$(DEPDIR)/$(am__dirstamp)
- -rm -f examples/server/$(am__dirstamp)
- -rm -f mcapi/$(DEPDIR)/$(am__dirstamp)
- -rm -f mcapi/$(am__dirstamp)
- -rm -f src/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/$(am__dirstamp)
- -rm -f sslSniffer/sslSnifferTest/$(DEPDIR)/$(am__dirstamp)
- -rm -f sslSniffer/sslSnifferTest/$(am__dirstamp)
- -rm -f tests/$(DEPDIR)/$(am__dirstamp)
- -rm -f tests/$(am__dirstamp)
- -rm -f testsuite/$(DEPDIR)/$(am__dirstamp)
- -rm -f testsuite/$(am__dirstamp)
- -rm -f wolfcrypt/benchmark/$(DEPDIR)/$(am__dirstamp)
- -rm -f wolfcrypt/benchmark/$(am__dirstamp)
- -rm -f wolfcrypt/src/$(DEPDIR)/$(am__dirstamp)
- -rm -f wolfcrypt/src/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/af_alg/$(DEPDIR)/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/af_alg/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/arm/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/atmel/$(DEPDIR)/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/atmel/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/cavium/$(DEPDIR)/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/cavium/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/devcrypto/$(DEPDIR)/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/devcrypto/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/intel/$(DEPDIR)/$(am__dirstamp)
- -rm -f wolfcrypt/src/port/intel/$(am__dirstamp)
- -rm -f wolfcrypt/test/$(DEPDIR)/$(am__dirstamp)
- -rm -f wolfcrypt/test/$(am__dirstamp)
- -rm -f wolfcrypt/user-crypto/src/$(DEPDIR)/$(am__dirstamp)
- -rm -f wolfcrypt/user-crypto/src/$(am__dirstamp)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
- clean-libLTLIBRARIES clean-libtool clean-local \
- clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am
-
-distclean: distclean-am
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Plo
- -rm -f examples/benchmark/$(DEPDIR)/tls_bench.Po
- -rm -f examples/client/$(DEPDIR)/client.Po
- -rm -f examples/client/$(DEPDIR)/tests_unit_test-client.Po
- -rm -f examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po
- -rm -f examples/echoclient/$(DEPDIR)/echoclient.Po
- -rm -f examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po
- -rm -f examples/echoserver/$(DEPDIR)/echoserver.Po
- -rm -f examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po
- -rm -f examples/sctp/$(DEPDIR)/sctp-client-dtls.Po
- -rm -f examples/sctp/$(DEPDIR)/sctp-client.Po
- -rm -f examples/sctp/$(DEPDIR)/sctp-server-dtls.Po
- -rm -f examples/sctp/$(DEPDIR)/sctp-server.Po
- -rm -f examples/server/$(DEPDIR)/server.Po
- -rm -f examples/server/$(DEPDIR)/tests_unit_test-server.Po
- -rm -f examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po
- -rm -f mcapi/$(DEPDIR)/crypto.Po
- -rm -f mcapi/$(DEPDIR)/mcapi_test.Po
- -rm -f src/$(DEPDIR)/libwolfssl_la-crl.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-internal.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-keys.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-ocsp.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-sniffer.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-ssl.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-tls.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-tls13.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-wolfio.Plo
- -rm -f sslSniffer/sslSnifferTest/$(DEPDIR)/snifftest.Po
- -rm -f tests/$(DEPDIR)/unit_test-api.Po
- -rm -f tests/$(DEPDIR)/unit_test-hash.Po
- -rm -f tests/$(DEPDIR)/unit_test-srp.Po
- -rm -f tests/$(DEPDIR)/unit_test-suites.Po
- -rm -f tests/$(DEPDIR)/unit_test-unit.Po
- -rm -f testsuite/$(DEPDIR)/testsuite_test-testsuite.Po
- -rm -f wolfcrypt/benchmark/$(DEPDIR)/benchmark.Po
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_gcm_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-arc4.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-asn.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-async.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2b.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2s.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-camellia.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha20_poly1305.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cmac.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-coding.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-compress.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cpuid.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cryptocb.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve25519.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve448.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dh.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dsa.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ecc.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed25519.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed448.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-error.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_448.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_low_mem.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_operations.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_x25519_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_448.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_low_mem.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_operations.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hash.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hc128.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-idea.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-integer.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-logging.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md2.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md4.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md5.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-memory.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-misc.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs12.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs7.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pwdbased.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rabbit.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ripemd.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-selftest.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha3.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-signature.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm32.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm64.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_armthumb.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c32.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c64.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_cortexm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_int.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-srp.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-tfm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_encrypt.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_pkcs11.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_port.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfevent.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfmath.Plo
- -rm -f wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_aes.Plo
- -rm -f wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_hash.Plo
- -rm -f wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-wc_afalg.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-curve25519.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-sha512-asm.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-aes.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-chacha.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-curve25519.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-poly1305.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha256.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512-asm.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512.Plo
- -rm -f wolfcrypt/src/port/atmel/$(DEPDIR)/src_libwolfssl_la-atmel.Plo
- -rm -f wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_nitrox.Plo
- -rm -f wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_octeon_sync.Plo
- -rm -f wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_aes.Plo
- -rm -f wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_hash.Plo
- -rm -f wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-wc_devcrypto.Plo
- -rm -f wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist.Plo
- -rm -f wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_mem.Plo
- -rm -f wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_sync.Plo
- -rm -f wolfcrypt/test/$(DEPDIR)/test.Po
- -rm -f wolfcrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po
- -rm -f wolfcrypt/user-crypto/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-dist_docDATA install-dist_exampleDATA \
- install-includeHEADERS install-ippDATA \
- install-nobase_includeHEADERS install-pkgconfigDATA
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS install-exec-local \
- install-libLTLIBRARIES
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Plo
- -rm -f ctaocrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Plo
- -rm -f examples/benchmark/$(DEPDIR)/tls_bench.Po
- -rm -f examples/client/$(DEPDIR)/client.Po
- -rm -f examples/client/$(DEPDIR)/tests_unit_test-client.Po
- -rm -f examples/client/$(DEPDIR)/testsuite_testsuite_test-client.Po
- -rm -f examples/echoclient/$(DEPDIR)/echoclient.Po
- -rm -f examples/echoclient/$(DEPDIR)/testsuite_testsuite_test-echoclient.Po
- -rm -f examples/echoserver/$(DEPDIR)/echoserver.Po
- -rm -f examples/echoserver/$(DEPDIR)/testsuite_testsuite_test-echoserver.Po
- -rm -f examples/sctp/$(DEPDIR)/sctp-client-dtls.Po
- -rm -f examples/sctp/$(DEPDIR)/sctp-client.Po
- -rm -f examples/sctp/$(DEPDIR)/sctp-server-dtls.Po
- -rm -f examples/sctp/$(DEPDIR)/sctp-server.Po
- -rm -f examples/server/$(DEPDIR)/server.Po
- -rm -f examples/server/$(DEPDIR)/tests_unit_test-server.Po
- -rm -f examples/server/$(DEPDIR)/testsuite_testsuite_test-server.Po
- -rm -f mcapi/$(DEPDIR)/crypto.Po
- -rm -f mcapi/$(DEPDIR)/mcapi_test.Po
- -rm -f src/$(DEPDIR)/libwolfssl_la-crl.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-internal.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-keys.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-ocsp.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-sniffer.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-ssl.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-tls.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-tls13.Plo
- -rm -f src/$(DEPDIR)/libwolfssl_la-wolfio.Plo
- -rm -f sslSniffer/sslSnifferTest/$(DEPDIR)/snifftest.Po
- -rm -f tests/$(DEPDIR)/unit_test-api.Po
- -rm -f tests/$(DEPDIR)/unit_test-hash.Po
- -rm -f tests/$(DEPDIR)/unit_test-srp.Po
- -rm -f tests/$(DEPDIR)/unit_test-suites.Po
- -rm -f tests/$(DEPDIR)/unit_test-unit.Po
- -rm -f testsuite/$(DEPDIR)/testsuite_test-testsuite.Po
- -rm -f wolfcrypt/benchmark/$(DEPDIR)/benchmark.Po
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-aes_gcm_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-arc4.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-asn.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-async.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2b.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-blake2s.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-camellia.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha20_poly1305.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-chacha_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cmac.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-coding.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-compress.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cpuid.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-cryptocb.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve25519.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-curve448.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-des3.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dh.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-dsa.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ecc.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed25519.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ed448.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-error.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_448.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_low_mem.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_operations.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fe_x25519_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-fips_test.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_448.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_low_mem.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ge_operations.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hash.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hc128.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-hmac.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-idea.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-integer.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-logging.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md2.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md4.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-md5.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-memory.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-misc.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs12.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pkcs7.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-poly1305_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-pwdbased.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rabbit.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-random.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-ripemd.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-selftest.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha256_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha3.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sha512_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-signature.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm32.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_arm64.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_armthumb.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c32.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_c64.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_cortexm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_int.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-sp_x86_64_asm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-srp.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-tfm.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_encrypt.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_pkcs11.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wc_port.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_first.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfcrypt_last.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfevent.Plo
- -rm -f wolfcrypt/src/$(DEPDIR)/src_libwolfssl_la-wolfmath.Plo
- -rm -f wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_aes.Plo
- -rm -f wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-afalg_hash.Plo
- -rm -f wolfcrypt/src/port/af_alg/$(DEPDIR)/src_libwolfssl_la-wc_afalg.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-curve25519.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-32-sha512-asm.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-aes.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-chacha.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-curve25519.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-poly1305.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha256.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512-asm.Plo
- -rm -f wolfcrypt/src/port/arm/$(DEPDIR)/src_libwolfssl_la-armv8-sha512.Plo
- -rm -f wolfcrypt/src/port/atmel/$(DEPDIR)/src_libwolfssl_la-atmel.Plo
- -rm -f wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_nitrox.Plo
- -rm -f wolfcrypt/src/port/cavium/$(DEPDIR)/src_libwolfssl_la-cavium_octeon_sync.Plo
- -rm -f wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_aes.Plo
- -rm -f wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-devcrypto_hash.Plo
- -rm -f wolfcrypt/src/port/devcrypto/$(DEPDIR)/src_libwolfssl_la-wc_devcrypto.Plo
- -rm -f wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist.Plo
- -rm -f wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_mem.Plo
- -rm -f wolfcrypt/src/port/intel/$(DEPDIR)/src_libwolfssl_la-quickassist_sync.Plo
- -rm -f wolfcrypt/test/$(DEPDIR)/test.Po
- -rm -f wolfcrypt/test/$(DEPDIR)/testsuite_testsuite_test-test.Po
- -rm -f wolfcrypt/user-crypto/src/$(DEPDIR)/src_libwolfssl_la-rsa.Plo
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic \
- maintainer-clean-local
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \
- uninstall-dist_exampleDATA uninstall-includeHEADERS \
- uninstall-ippDATA uninstall-libLTLIBRARIES uninstall-local \
- uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA
-
-.MAKE: all check check-am install install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \
- check-TESTS check-am clean clean-binPROGRAMS \
- clean-checkPROGRAMS clean-cscope clean-generic \
- clean-libLTLIBRARIES clean-libtool clean-local \
- clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \
- cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
- dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
- dist-zstd distcheck distclean distclean-compile \
- distclean-generic distclean-hdr distclean-libtool \
- distclean-tags distcleancheck distdir distuninstallcheck dvi \
- dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am \
- install-dist_docDATA install-dist_exampleDATA install-dvi \
- install-dvi-am install-exec install-exec-am install-exec-local \
- install-html install-html-am install-includeHEADERS \
- install-info install-info-am install-ippDATA \
- install-libLTLIBRARIES install-man \
- install-nobase_includeHEADERS install-pdf install-pdf-am \
- install-pkgconfigDATA install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic maintainer-clean-local mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am recheck tags tags-am uninstall \
- uninstall-am uninstall-binPROGRAMS uninstall-dist_docDATA \
- uninstall-dist_exampleDATA uninstall-includeHEADERS \
- uninstall-ippDATA uninstall-libLTLIBRARIES uninstall-local \
- uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA
-
-.PRECIOUS: Makefile
-
-
-#includes additional rules from aminclude.am
-@INC_AMINCLUDE@
-
-dox-pdf:
- echo "Generating PDF"
- cd doc && ./generate_documentation.sh -install -pdf || (echo "HTML generation failed $$?"; exit 1)
-
-dox-html:
- echo "Generating HTML"
- cd doc && ./generate_documentation.sh -install -html || (echo "HTML generation failed $$?"; exit 1)
-
-dox: dox-html dox-pdf
-
-clean-local:
- -rm -rf doc/build/
- -rm -rf doc/html/
- -rm -f doc/refman.pdf
- -rm -f doc/doxygen_warnings
-@BUILD_FAST_RSA_TRUE@IPP_links:
-@BUILD_FAST_RSA_TRUE@ @$(IPPLINK)
-
-rpm-build: rpm/spec dist
- @rm -f *.rpm
- @rm -f ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm
- @rm -f ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm
- @mkdir -p ~/rpmbuild/BUILD/
- @mkdir -p ~/rpmbuild/RPMS/i386/
- @mkdir -p ~/rpmbuild/RPMS/i686/
- @mkdir -p ~/rpmbuild/RPMS/noarch/
- @mkdir -p ~/rpmbuild/RPMS/x86_64/
- @mkdir -p ~/rpmbuild/SOURCES/
- @mkdir -p ~/rpmbuild/SPECS/
- @mkdir -p ~/rpmbuild/SRPMS/
- @cp $(PACKAGE)-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
- @rpmbuild -ba --clean rpm/spec
- @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm .
- @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-devel-$(VERSION)*.rpm .
- @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-debuginfo-$(VERSION)*.rpm .
- @cp ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm .
-
-rpm-sign: rpm-build
- @rpm --addsign *.rpm
- @rpm --checksig *.rpm
-
-clean-rpm:
- @rm -f *.tar.gz
- @rm -f *.src.rpm
- @rm -f *.rpm
-
-rpm: rpm-build
-
-release: rpm-sign
-
-auto-rpmbuild:
- @auto-br-rpmbuild -ba rpm/spec
-@BUILD_CRL_TRUE@@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_RSA_TRUE@scripts/crl-revoked.log: scripts/resume.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling.log: tests/unit.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling.log: scripts/ocsp.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling-with-ca-as-responder.log: tests/unit.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling-with-ca-as-responder.log: scripts/ocsp.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling-with-ca-as-responder.log: scripts/ocsp-stapling.log
-
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_OCSP_STAPLING_V2_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling2.log: tests/unit.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_OCSP_STAPLING_V2_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling2.log: scripts/ocsp.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_OCSP_STAPLING_V2_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling2.log: scripts/ocsp-stapling.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_TRUE@@BUILD_OCSP_STAPLING_V2_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling2.log: scripts/ocsp-stapling-with-ca-as-responder.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_FALSE@@BUILD_OCSP_STAPLING_V2_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling2.log: tests/unit.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_OCSP_STAPLING_FALSE@@BUILD_OCSP_STAPLING_V2_TRUE@@BUILD_RSA_TRUE@scripts/ocsp-stapling2.log: scripts/ocsp.log
-@BUILD_EXAMPLE_SERVERS_TRUE@@BUILD_PKCALLBACKS_TRUE@scripts/pkcallbacks.log: scripts/resume.log
-
-test: check
-tests/unit.log: testsuite/testsuite.log
-
-maintainer-clean-local:
- -rm Makefile.in
- -rm aclocal.m4
- -rm build-aux/compile
- -rm build-aux/config.guess
- -rm build-aux/config.sub
- -rm build-aux/depcomp
- -rm build-aux/install-sh
- -rm build-aux/ltmain.sh
- -rm build-aux/missing
- -rm cyassl-config
- -rmdir build-aux
- -rm configure
- -rm config.log
- -rm config.status
- -rm config.in
- -rm m4/libtool.m4
- -rm m4/ltoptions.m4
- -rm m4/ltsugar.m4
- -rm m4/ltversion.m4
- -rm m4/lt~obsolete.m4
- -rm support/wolfssl.pc
- find . -type f -name '*~' -exec rm -f '{}' \;
- -rm -f @PACKAGE@-*.tar.gz
- -rm -f @PACKAGE@-*.rpm
-
-# !!!! first line of rule has to start with a hard (real) tab, not spaces
-egs:
- $(MAKE) examples/client/client; \
- $(MAKE) examples/echoclient/echoclient;\
- $(MAKE) examples/server/server; \
- $(MAKE) examples/echoserver/echoserver;
-
-wc_egs:
- $(MAKE) wolfcrypt/test/testwolfcrypt; \
- $(MAKE) wolfcrypt/benchmark/benchmark;
-
-install-exec-local: install-generic-config
-
-install-generic-config:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- $(INSTALL_SCRIPT) @GENERIC_CONFIG@ $(DESTDIR)$(bindir)
-
-uninstall-local:
- -rm -f $(DESTDIR)$(bindir)/@GENERIC_CONFIG@
-
-merge-clean:
- @find ./ | $(GREP) \.gcda | xargs rm -f
- @find ./ | $(GREP) \.gcno | xargs rm -f
- @find ./ | $(GREP) \.gz | xargs rm -f
- @find ./ | $(GREP) \.orig | xargs rm -f
- @find ./ | $(GREP) \.rej | xargs rm -f
- @find ./ | $(GREP) \.rpm | xargs rm -f
- @find ./ | $(GREP) \.THIS | xargs rm -f
- @find ./ | $(GREP) \.OTHER | xargs rm -f
- @find ./ | $(GREP) \.BASE | xargs rm -f
- @find ./ | $(GREP) \~$$ | xargs rm -f
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/README b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/README
deleted file mode 100644
index 06efb96d99..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/README
+++ /dev/null
@@ -1,239 +0,0 @@
-*** Description ***
-
-The wolfSSL embedded SSL library (formerly CyaSSL) is a lightweight SSL/TLS
-library written in ANSI C and targeted for embedded, RTOS, and
-resource-constrained environments - primarily because of its small size, speed,
-and feature set. It is commonly used in standard operating environments as well
-because of its royalty-free pricing and excellent cross platform support.
-wolfSSL supports industry standards up to the current TLS 1.3 and DTLS 1.2
-levels, is up to 20 times smaller than OpenSSL, and offers progressive ciphers
-such as ChaCha20, Curve25519, NTRU, and Blake2b. User benchmarking and feedback
-reports dramatically better performance when using wolfSSL over OpenSSL.
-
-wolfSSL is powered by the wolfCrypt library. Two versions of the wolfCrypt
-cryptography library have been FIPS 140-2 validated (Certificate #2425 and
-certificate #3389). For additional information, visit the wolfCrypt FIPS FAQ
-(https://www.wolfssl.com/license/fips/) or contact fips@wolfssl.com
-
-*** Why choose wolfSSL? ***
-
-There are many reasons to choose wolfSSL as your embedded SSL solution. Some of
-the top reasons include size (typical footprint sizes range from 20-100 kB),
-support for the newest standards (SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3,
-DTLS 1.0, and DTLS 1.2), current and progressive cipher support (including
-stream ciphers), multi-platform, royalty free, and an OpenSSL compatibility API
-to ease porting into existing applications which have previously used the
-OpenSSL package. For a complete feature list, see chapter 4 of the wolfSSL
-manual. (https://www.wolfssl.com/docs/wolfssl-manual/ch4/)
-
-*** Notes, Please read ***
-
-Note 1)
-wolfSSL as of 3.6.6 no longer enables SSLv3 by default. wolfSSL also no longer
-supports static key cipher suites with PSK, RSA, or ECDH. This means if you
-plan to use TLS cipher suites you must enable DH (DH is on by default), or
-enable ECC (ECC is on by default), or you must enable static key cipher suites
-with
-
- WOLFSSL_STATIC_DH
- WOLFSSL_STATIC_RSA
- or
- WOLFSSL_STATIC_PSK
-
-though static key cipher suites are deprecated and will be removed from future
-versions of TLS. They also lower your security by removing PFS. Since current
-NTRU suites available do not use ephemeral keys, WOLFSSL_STATIC_RSA needs to be
-used in order to build with NTRU suites.
-
-When compiling ssl.c, wolfSSL will now issue a compiler error if no cipher
-suites are available. You can remove this error by defining
-WOLFSSL_ALLOW_NO_SUITES in the event that you desire that, i.e., you're not
-using TLS cipher suites.
-
-Note 2)
-wolfSSL takes a different approach to certificate verification than OpenSSL
-does. The default policy for the client is to verify the server, this means
-that if you don't load CAs to verify the server you'll get a connect error,
-no signer error to confirm failure (-188).
-
-If you want to mimic OpenSSL behavior of having SSL_connect succeed even if
-verifying the server fails and reducing security you can do this by calling:
-
- wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
-
-before calling wolfSSL_new();. Though it's not recommended.
-
-Note 3)
-The enum values SHA, SHA256, SHA384, SHA512 are no longer available when
-wolfSSL is built with --enable-opensslextra (OPENSSL_EXTRA) or with the macro
-NO_OLD_SHA_NAMES. These names get mapped to the OpenSSL API for a single call
-hash function. Instead the name WC_SHA, WC_SHA256, WC_SHA384 and WC_SHA512
-should be used for the enum name.
-
-*** end Notes ***
-
-
-# wolfSSL Release 4.5.0 (August 19, 2020)
-
-If you have questions about this release, feel free to contact us on our
-info@ address.
-
-Release 4.5.0 of wolfSSL embedded TLS has bug fixes and new features including:
-
-## New Feature Additions
-
-* Added Xilinx Vitis 2019.2 example and README updates
-* TLS v1.3 is now enabled by default
-* Building FIPS 140-2 code and test on Solaris
-* Secure renegotiation with DTLS 1.2
-* Update RSA calls for hardware acceleration with Xilsecure
-* Additional OpenSSL compatibility layer functions added
-* Cypress PSoC6 wolfCrypt driver added
-* Added STM32CubeIDE support
-* Added certificate parsing and inspection to C# wrapper layer
-* TLS v1.3 sniffer support added
-* TSIP v1.09 for target board GR-ROSE support added
-* Added support for the "X72N Envision Kit" evaluation board
-* Support for ECC nonblocking using the configure options
- "--enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS=-DWOLFSSL_PUBLIC_MP"
-* Added wc_curve25519_make_pub function to generate a public key given the
- private one
-
-## Fixes
-
-* PIC32MZ hardware cache and large hashes fix
-* AES-GCM use with EVP layer in compatibility layer code
-* Fix for RSA_LOW_MEM with ARM build of SP code
-* Sanity check on tag length with AES-CCM to conform with RFC 3610
-* Fixes for 32 and 64 bit software implementations of SP code when
- WOLFSSL_SP_CACHE_RESISTANT is defined
-* GCC warning fixes for GCC 9 and later
-* Sanity check on HKDF expand length to conform with RFC 5869
-* Fixes for STM32 CubeMX HAL with AES-GCM
-* Fixed point cache look up table (LUT) implementation fixes
-* Fix for ARM 32bit SP code when calling div word
-* Fix for potential out of bounds read when parsing CRLs
-* Fix for potential out of bounds read with RSA unpadding
-* AES-CCM optimized counter fix
-* Updates to Xcode projects for new files and features
-* Fix for adding CRL’s to a WOLFSSL_X509_STORE structure
-* FIPSv2 build with opensslall build fixes
-* Fixes for CryptoCell use with ECC and signature wrappers
-* Fix for mod calculation with SP code dealing with 3072 bit keys
-* Fix for handling certificates with multiple OU’s in name
-* Fix for SP math implementation of sp_add_d and add a sanity check on
- rshb range
-* Fix for sanity check on padding with DES3 conversion of PEM to DER
-* Sanity check for potential out of bounds read with fp_read_radix_16
-* Additional checking of ECC scalars.
-* Fixing the FIPS Ready build w.r.t. ecc.c.
-* When processing certificate names with OpenSSL compatibility layer
- enabled, unknown name item types were getting handled as having NID 0,
- and failing. Added a couple more items to what is handled correctly,
- and ignoring anything that is an unknown type.
-
-## Improvements/Optimizations
-
-* TLS 1.3 certificate verify update to handle 8192 bit RSA keys
-* wpa_supplicant support with reduced code size option
-* TLS 1.3 alerts encrypted when possible
-* Many minor coverity fixes added
-* Error checking when parsing PKCS12 DER
-* IAR warning in test.c resolved
-* ATECC608A improvements for use with Harmony 3 and PIC32 MZ
-* Support for AES-GCM and wc_SignatureVerifyHash with static memory and no
- malloc’s
-* Enable SNI by default with JNI/JSSE builds
-* NetBSD GCC compiler warnings resolved
-* Additional test cases and code coverage added including curve25519 and
- curve448 tests
-* Option for user defined mutexes with WOLFSSL_USER_MUTEX
-* Sniffer API’s for loading buffer directly
-* Fixes and improvements from going through the DO-178 process were added
-* Doxygen updates and fixes for auto documentation generation
-* Changed the configure option for FIPS Ready builds to be
- `--enable-fips=ready`.
-
-## This release of wolfSSL includes fixes for 6 security vulnerabilities.
-
-wolfSSL version 4.5.0 contains 6 vulnerability fixes: 2 fixes for TLS 1.3,
-2 side channel attack mitigations, 1 fix for a potential private key leak
-in a specific use case, 1 fix for DTLS.
-
-* In earlier versions of wolfSSL there exists a potential man in the middle
- attack on TLS 1.3 clients. Malicious attackers with a privileged network
- position can impersonate TLS 1.3 servers and bypass authentication. Users
- that have applications with client side code and have TLS 1.3 turned on,
- should update to the latest version of wolfSSL. Users that do not have
- TLS 1.3 turned on, or that are server side only, are NOT affected by this
- report. Thanks to Gerald Doussot from NCC group for the report.
-* Denial of service attack on TLS 1.3 servers from repetitively sending
- ChangeCipherSpecs messages. This denial of service results from the
- relatively low effort of sending a ChangeCipherSpecs message versus the
- effort of the server to process that message. Users with TLS 1.3 servers are
- recommended to update to the most recent version of wolfSSL which limits the
- number of TLS 1.3 ChangeCipherSpecs that can be received in order to avoid
- this DoS attack. CVE-2020-12457 was reserved for the report. Thanks to
- Lenny Wang of Tencent Security Xuanwu LAB.
-* Potential cache timing attacks on public key operations in builds that are
- not using SP (single precision). Users that have a system where malicious
- agents could execute code on the system, are not using the SP build with
- wolfSSL, and are doing private key operations on the system (such as signing
- with a private key) are recommended to regenerate private keys and update to
- the most recent version of wolfSSL. CVE-2020-15309 is reserved for this
- issue. Thanks to Ida Bruhns from Universität zu Lübeck for the report.
-* When using SGX with EC scalar multiplication the possibility of side-channel
- attacks are present. To mitigate the risk of side channel attacks wolfSSL’s
- single precision EC operations should be used instead. Release 4.5.0 turns
- this on be default now with SGX builds and in previous versions of wolfSSL
- this can be turned on by using the WOLFSSL_SP macros. Thank you to
- Alejandro Cabrera Aldaya, Cesar Pereida García and Billy Bob Brumley from
- the Network and Information Security Group (NISEC) at Tampere University for
- the report.
-* Leak of private key in the case that PEM format private keys are bundled in
- with PEM certificates into a single file. This is due to the
- misclassification of certificate type versus private key type when parsing
- through the PEM file. To be affected, wolfSSL would need to have been built
- with OPENSSL_EXTRA (--enable-opensslextra). Some build variants such as
- --enable-all and --enable-opensslall also turn on this code path, checking
- wolfssl/options.h for OPENSSL_EXTRA will show if the macro was used with the
- build. If having built with the opensslextra enable option and having placed
- PEM certificates with PEM private keys in the same file when loading up the
- certificate file, then we recommend updating wolfSSL for this use case and
- also recommend regenerating any private keys in the file.
-* During the handshake, clear application_data messages in epoch 0 are
- processed and returned to the application. Fixed by dropping received
- application_data messages in epoch 0. Thank you to Paul Fiterau of Uppsala
- University and Robert Merget of Ruhr-University Bochum for the report.
-
-For additional vulnerability information visit the vulnerability page at
-https://www.wolfssl.com/docs/security-vulnerabilities/
-
-See INSTALL file for build instructions.
-More info can be found on-line at https://wolfssl.com/wolfSSL/Docs.html
-
-
-
-*** Resources ***
-
-
-[wolfSSL Website](https://www.wolfssl.com/)
-
-[wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
-
-[FIPS FAQ](https://wolfssl.com/license/fips)
-
-[wolfSSL Documents](https://wolfssl.com/wolfSSL/Docs.html)
-
-[wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
-
-[wolfSSL API Reference]
-(https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
-
-[wolfCrypt API Reference]
-(https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
-
-[TLS 1.3](https://www.wolfssl.com/docs/tls13/)
-
-[wolfSSL Vulnerabilities]
-(https://www.wolfssl.com/docs/security-vulnerabilities/)
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/README.md b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/README.md
deleted file mode 100644
index 06efb96d99..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/README.md
+++ /dev/null
@@ -1,239 +0,0 @@
-*** Description ***
-
-The wolfSSL embedded SSL library (formerly CyaSSL) is a lightweight SSL/TLS
-library written in ANSI C and targeted for embedded, RTOS, and
-resource-constrained environments - primarily because of its small size, speed,
-and feature set. It is commonly used in standard operating environments as well
-because of its royalty-free pricing and excellent cross platform support.
-wolfSSL supports industry standards up to the current TLS 1.3 and DTLS 1.2
-levels, is up to 20 times smaller than OpenSSL, and offers progressive ciphers
-such as ChaCha20, Curve25519, NTRU, and Blake2b. User benchmarking and feedback
-reports dramatically better performance when using wolfSSL over OpenSSL.
-
-wolfSSL is powered by the wolfCrypt library. Two versions of the wolfCrypt
-cryptography library have been FIPS 140-2 validated (Certificate #2425 and
-certificate #3389). For additional information, visit the wolfCrypt FIPS FAQ
-(https://www.wolfssl.com/license/fips/) or contact fips@wolfssl.com
-
-*** Why choose wolfSSL? ***
-
-There are many reasons to choose wolfSSL as your embedded SSL solution. Some of
-the top reasons include size (typical footprint sizes range from 20-100 kB),
-support for the newest standards (SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3,
-DTLS 1.0, and DTLS 1.2), current and progressive cipher support (including
-stream ciphers), multi-platform, royalty free, and an OpenSSL compatibility API
-to ease porting into existing applications which have previously used the
-OpenSSL package. For a complete feature list, see chapter 4 of the wolfSSL
-manual. (https://www.wolfssl.com/docs/wolfssl-manual/ch4/)
-
-*** Notes, Please read ***
-
-Note 1)
-wolfSSL as of 3.6.6 no longer enables SSLv3 by default. wolfSSL also no longer
-supports static key cipher suites with PSK, RSA, or ECDH. This means if you
-plan to use TLS cipher suites you must enable DH (DH is on by default), or
-enable ECC (ECC is on by default), or you must enable static key cipher suites
-with
-
- WOLFSSL_STATIC_DH
- WOLFSSL_STATIC_RSA
- or
- WOLFSSL_STATIC_PSK
-
-though static key cipher suites are deprecated and will be removed from future
-versions of TLS. They also lower your security by removing PFS. Since current
-NTRU suites available do not use ephemeral keys, WOLFSSL_STATIC_RSA needs to be
-used in order to build with NTRU suites.
-
-When compiling ssl.c, wolfSSL will now issue a compiler error if no cipher
-suites are available. You can remove this error by defining
-WOLFSSL_ALLOW_NO_SUITES in the event that you desire that, i.e., you're not
-using TLS cipher suites.
-
-Note 2)
-wolfSSL takes a different approach to certificate verification than OpenSSL
-does. The default policy for the client is to verify the server, this means
-that if you don't load CAs to verify the server you'll get a connect error,
-no signer error to confirm failure (-188).
-
-If you want to mimic OpenSSL behavior of having SSL_connect succeed even if
-verifying the server fails and reducing security you can do this by calling:
-
- wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
-
-before calling wolfSSL_new();. Though it's not recommended.
-
-Note 3)
-The enum values SHA, SHA256, SHA384, SHA512 are no longer available when
-wolfSSL is built with --enable-opensslextra (OPENSSL_EXTRA) or with the macro
-NO_OLD_SHA_NAMES. These names get mapped to the OpenSSL API for a single call
-hash function. Instead the name WC_SHA, WC_SHA256, WC_SHA384 and WC_SHA512
-should be used for the enum name.
-
-*** end Notes ***
-
-
-# wolfSSL Release 4.5.0 (August 19, 2020)
-
-If you have questions about this release, feel free to contact us on our
-info@ address.
-
-Release 4.5.0 of wolfSSL embedded TLS has bug fixes and new features including:
-
-## New Feature Additions
-
-* Added Xilinx Vitis 2019.2 example and README updates
-* TLS v1.3 is now enabled by default
-* Building FIPS 140-2 code and test on Solaris
-* Secure renegotiation with DTLS 1.2
-* Update RSA calls for hardware acceleration with Xilsecure
-* Additional OpenSSL compatibility layer functions added
-* Cypress PSoC6 wolfCrypt driver added
-* Added STM32CubeIDE support
-* Added certificate parsing and inspection to C# wrapper layer
-* TLS v1.3 sniffer support added
-* TSIP v1.09 for target board GR-ROSE support added
-* Added support for the "X72N Envision Kit" evaluation board
-* Support for ECC nonblocking using the configure options
- "--enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS=-DWOLFSSL_PUBLIC_MP"
-* Added wc_curve25519_make_pub function to generate a public key given the
- private one
-
-## Fixes
-
-* PIC32MZ hardware cache and large hashes fix
-* AES-GCM use with EVP layer in compatibility layer code
-* Fix for RSA_LOW_MEM with ARM build of SP code
-* Sanity check on tag length with AES-CCM to conform with RFC 3610
-* Fixes for 32 and 64 bit software implementations of SP code when
- WOLFSSL_SP_CACHE_RESISTANT is defined
-* GCC warning fixes for GCC 9 and later
-* Sanity check on HKDF expand length to conform with RFC 5869
-* Fixes for STM32 CubeMX HAL with AES-GCM
-* Fixed point cache look up table (LUT) implementation fixes
-* Fix for ARM 32bit SP code when calling div word
-* Fix for potential out of bounds read when parsing CRLs
-* Fix for potential out of bounds read with RSA unpadding
-* AES-CCM optimized counter fix
-* Updates to Xcode projects for new files and features
-* Fix for adding CRL’s to a WOLFSSL_X509_STORE structure
-* FIPSv2 build with opensslall build fixes
-* Fixes for CryptoCell use with ECC and signature wrappers
-* Fix for mod calculation with SP code dealing with 3072 bit keys
-* Fix for handling certificates with multiple OU’s in name
-* Fix for SP math implementation of sp_add_d and add a sanity check on
- rshb range
-* Fix for sanity check on padding with DES3 conversion of PEM to DER
-* Sanity check for potential out of bounds read with fp_read_radix_16
-* Additional checking of ECC scalars.
-* Fixing the FIPS Ready build w.r.t. ecc.c.
-* When processing certificate names with OpenSSL compatibility layer
- enabled, unknown name item types were getting handled as having NID 0,
- and failing. Added a couple more items to what is handled correctly,
- and ignoring anything that is an unknown type.
-
-## Improvements/Optimizations
-
-* TLS 1.3 certificate verify update to handle 8192 bit RSA keys
-* wpa_supplicant support with reduced code size option
-* TLS 1.3 alerts encrypted when possible
-* Many minor coverity fixes added
-* Error checking when parsing PKCS12 DER
-* IAR warning in test.c resolved
-* ATECC608A improvements for use with Harmony 3 and PIC32 MZ
-* Support for AES-GCM and wc_SignatureVerifyHash with static memory and no
- malloc’s
-* Enable SNI by default with JNI/JSSE builds
-* NetBSD GCC compiler warnings resolved
-* Additional test cases and code coverage added including curve25519 and
- curve448 tests
-* Option for user defined mutexes with WOLFSSL_USER_MUTEX
-* Sniffer API’s for loading buffer directly
-* Fixes and improvements from going through the DO-178 process were added
-* Doxygen updates and fixes for auto documentation generation
-* Changed the configure option for FIPS Ready builds to be
- `--enable-fips=ready`.
-
-## This release of wolfSSL includes fixes for 6 security vulnerabilities.
-
-wolfSSL version 4.5.0 contains 6 vulnerability fixes: 2 fixes for TLS 1.3,
-2 side channel attack mitigations, 1 fix for a potential private key leak
-in a specific use case, 1 fix for DTLS.
-
-* In earlier versions of wolfSSL there exists a potential man in the middle
- attack on TLS 1.3 clients. Malicious attackers with a privileged network
- position can impersonate TLS 1.3 servers and bypass authentication. Users
- that have applications with client side code and have TLS 1.3 turned on,
- should update to the latest version of wolfSSL. Users that do not have
- TLS 1.3 turned on, or that are server side only, are NOT affected by this
- report. Thanks to Gerald Doussot from NCC group for the report.
-* Denial of service attack on TLS 1.3 servers from repetitively sending
- ChangeCipherSpecs messages. This denial of service results from the
- relatively low effort of sending a ChangeCipherSpecs message versus the
- effort of the server to process that message. Users with TLS 1.3 servers are
- recommended to update to the most recent version of wolfSSL which limits the
- number of TLS 1.3 ChangeCipherSpecs that can be received in order to avoid
- this DoS attack. CVE-2020-12457 was reserved for the report. Thanks to
- Lenny Wang of Tencent Security Xuanwu LAB.
-* Potential cache timing attacks on public key operations in builds that are
- not using SP (single precision). Users that have a system where malicious
- agents could execute code on the system, are not using the SP build with
- wolfSSL, and are doing private key operations on the system (such as signing
- with a private key) are recommended to regenerate private keys and update to
- the most recent version of wolfSSL. CVE-2020-15309 is reserved for this
- issue. Thanks to Ida Bruhns from Universität zu Lübeck for the report.
-* When using SGX with EC scalar multiplication the possibility of side-channel
- attacks are present. To mitigate the risk of side channel attacks wolfSSL’s
- single precision EC operations should be used instead. Release 4.5.0 turns
- this on be default now with SGX builds and in previous versions of wolfSSL
- this can be turned on by using the WOLFSSL_SP macros. Thank you to
- Alejandro Cabrera Aldaya, Cesar Pereida García and Billy Bob Brumley from
- the Network and Information Security Group (NISEC) at Tampere University for
- the report.
-* Leak of private key in the case that PEM format private keys are bundled in
- with PEM certificates into a single file. This is due to the
- misclassification of certificate type versus private key type when parsing
- through the PEM file. To be affected, wolfSSL would need to have been built
- with OPENSSL_EXTRA (--enable-opensslextra). Some build variants such as
- --enable-all and --enable-opensslall also turn on this code path, checking
- wolfssl/options.h for OPENSSL_EXTRA will show if the macro was used with the
- build. If having built with the opensslextra enable option and having placed
- PEM certificates with PEM private keys in the same file when loading up the
- certificate file, then we recommend updating wolfSSL for this use case and
- also recommend regenerating any private keys in the file.
-* During the handshake, clear application_data messages in epoch 0 are
- processed and returned to the application. Fixed by dropping received
- application_data messages in epoch 0. Thank you to Paul Fiterau of Uppsala
- University and Robert Merget of Ruhr-University Bochum for the report.
-
-For additional vulnerability information visit the vulnerability page at
-https://www.wolfssl.com/docs/security-vulnerabilities/
-
-See INSTALL file for build instructions.
-More info can be found on-line at https://wolfssl.com/wolfSSL/Docs.html
-
-
-
-*** Resources ***
-
-
-[wolfSSL Website](https://www.wolfssl.com/)
-
-[wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
-
-[FIPS FAQ](https://wolfssl.com/license/fips)
-
-[wolfSSL Documents](https://wolfssl.com/wolfSSL/Docs.html)
-
-[wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
-
-[wolfSSL API Reference]
-(https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
-
-[wolfCrypt API Reference]
-(https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
-
-[TLS 1.3](https://www.wolfssl.com/docs/tls13/)
-
-[wolfSSL Vulnerabilities]
-(https://www.wolfssl.com/docs/security-vulnerabilities/)
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/aclocal.m4 b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/aclocal.m4
deleted file mode 100644
index 538172dd97..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/aclocal.m4
+++ /dev/null
@@ -1,1183 +0,0 @@
-# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
-
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
-
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
-[m4_warning([this file was generated for autoconf 2.69.
-You have another version of autoconf. It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-
-# Copyright (C) 2002-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.16'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.16.2], [],
- [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too. Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.2])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-
-# Figure out how to run the assembler. -*- Autoconf -*-
-
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_AS
-# ----------
-AC_DEFUN([AM_PROG_AS],
-[# By default we simply use the C compiler to build assembly code.
-AC_REQUIRE([AC_PROG_CC])
-test "${CCAS+set}" = set || CCAS=$CC
-test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
-AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
-AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
-_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
-])
-
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
-# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is '.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ([2.52])dnl
- m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-
-# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
- [$1], [CXX], [depcc="$CXX" am_compiler_list=],
- [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
- [$1], [UPC], [depcc="$UPC" am_compiler_list=],
- [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named 'D' -- because '-MD' means "put the output
- # in D".
- rm -rf conftest.dir
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- am__universal=false
- m4_case([$1], [CC],
- [case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac],
- [CXX],
- [case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac])
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
- # Solaris 10 /bin/sh.
- echo '/* dummy */' > sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with '-c' and '-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle '-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs.
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # After this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested.
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok '-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE([dependency-tracking], [dnl
-AS_HELP_STRING(
- [--enable-dependency-tracking],
- [do not reject slow dependency extractors])
-AS_HELP_STRING(
- [--disable-dependency-tracking],
- [speeds up one-time build])])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
- am__nodep='_no'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-AC_SUBST([am__nodep])dnl
-_AM_SUBST_NOTMAKE([am__nodep])dnl
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
- # Older Autoconf quotes --file arguments for eval, but not when files
- # are listed without --file. Let's play safe and only enable the eval
- # if we detect the quoting.
- # TODO: see whether this extra hack can be removed once we start
- # requiring Autoconf 2.70 or later.
- AS_CASE([$CONFIG_FILES],
- [*\'*], [eval set x "$CONFIG_FILES"],
- [*], [set x $CONFIG_FILES])
- shift
- # Used to flag and report bootstrapping failures.
- am_rc=0
- for am_mf
- do
- # Strip MF so we end up with the name of the file.
- am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile which includes
- # dependency-tracking related rules and includes.
- # Grep'ing the whole file directly is not great: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
- || continue
- am_dirpart=`AS_DIRNAME(["$am_mf"])`
- am_filepart=`AS_BASENAME(["$am_mf"])`
- AM_RUN_LOG([cd "$am_dirpart" \
- && sed -e '/# am--include-marker/d' "$am_filepart" \
- | $MAKE -f - am--depfiles]) || am_rc=$?
- done
- if test $am_rc -ne 0; then
- AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
- for automatic dependency tracking. If GNU make was not used, consider
- re-running the configure script with MAKE="gmake" (or whatever is
- necessary). You can also try re-running configure with the
- '--disable-dependency-tracking' option to at least be able to build
- the package (albeit without support for automatic dependency tracking).])
- fi
- AS_UNSET([am_dirpart])
- AS_UNSET([am_filepart])
- AS_UNSET([am_mf])
- AS_UNSET([am_rc])
- rm -f conftest-deps.mk
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking is enabled.
-# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
-# order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This macro actually does too much. Some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
-m4_define([AC_PROG_CC],
-m4_defn([AC_PROG_CC])
-[_AM_PROG_CC_C_O
-])
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.65])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
- # is not polluted with repeated "-I."
- AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
- # test to see if srcdir already configured
- if test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
- fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[AC_DIAGNOSE([obsolete],
- [$0: two- and three-arguments forms are deprecated.])
-m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(
- m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
- [ok:ok],,
- [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
- AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
-AM_MISSING_PROG([AUTOCONF], [autoconf])
-AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
-AM_MISSING_PROG([AUTOHEADER], [autoheader])
-AM_MISSING_PROG([MAKEINFO], [makeinfo])
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-# For better backward compatibility. To be removed once Automake 1.9.x
-# dies out for good. For more background, see:
-#
-#
-AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target (and possibly the TAP driver). The
-# system "awk" is bad on some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES([CC])],
- [m4_define([AC_PROG_CC],
- m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES([CXX])],
- [m4_define([AC_PROG_CXX],
- m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
- [_AM_DEPENDENCIES([OBJC])],
- [m4_define([AC_PROG_OBJC],
- m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
- [_AM_DEPENDENCIES([OBJCXX])],
- [m4_define([AC_PROG_OBJCXX],
- m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
-])
-AC_REQUIRE([AM_SILENT_RULES])dnl
-dnl The testsuite driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
-dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
- [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes. So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
- cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present. This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard:
-
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message. This
-can help us improve future automake versions.
-
-END
- if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
- echo 'Configuration will proceed anyway, since you have set the' >&2
- echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
- echo >&2
- else
- cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: .
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
- AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
- fi
-fi
-dnl The trailing newline in this macro's definition is deliberate, for
-dnl backward compatibility and to allow trailing 'dnl'-style comments
-dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
-])
-
-dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $_am_arg | $_am_arg:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
- *)
- install_sh="\${SHELL} $am_aux_dir/install-sh"
- esac
-fi
-AC_SUBST([install_sh])])
-
-# Copyright (C) 2003-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check whether make has an 'include' directive that can support all
-# the idioms we need for our automatic dependency tracking code.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
-cat > confinc.mk << 'END'
-am__doit:
- @echo this is the am__doit target >confinc.out
-.PHONY: am__doit
-END
-am__include="#"
-am__quote=
-# BSD make does it like this.
-echo '.include "confinc.mk" # ignored' > confmf.BSD
-# Other make implementations (GNU, Solaris 10, AIX) do it like this.
-echo 'include confinc.mk # ignored' > confmf.GNU
-_am_result=no
-for s in GNU BSD; do
- AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
- AS_CASE([$?:`cat confinc.out 2>/dev/null`],
- ['0:this is the am__doit target'],
- [AS_CASE([$s],
- [BSD], [am__include='.include' am__quote='"'],
- [am__include='include' am__quote=''])])
- if test "$am__include" != "#"; then
- _am_result="yes ($s style)"
- break
- fi
-done
-rm -f confinc.* confmf.*
-AC_MSG_RESULT([${_am_result}])
-AC_SUBST([am__include])])
-AC_SUBST([am__quote])])
-
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-
-# Copyright (C) 1997-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it is modern enough.
-# If it is, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --is-lightweight"; then
- am_missing_run="$MISSING "
-else
- am_missing_run=
- AC_MSG_WARN(['missing' script is too old or missing])
-fi
-])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# --------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Copyright (C) 1999-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# _AM_PROG_CC_C_O
-# ---------------
-# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
-# to automatically call this.
-AC_DEFUN([_AM_PROG_CC_C_O],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-AC_LANG_PUSH([C])dnl
-AC_CACHE_CHECK(
- [whether $CC understands -c and -o together],
- [am_cv_prog_cc_c_o],
- [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
- # Make sure it works both with $CC and with simple cc.
- # Following AC_PROG_CC_C_O, we do the test twice because some
- # compilers refuse to overwrite an existing .o file with -o,
- # though they will create one.
- am_cv_prog_cc_c_o=yes
- for am_i in 1 2; do
- if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
- && test -f conftest2.$ac_objext; then
- : OK
- else
- am_cv_prog_cc_c_o=no
- break
- fi
- done
- rm -f core conftest*
- unset am_i])
-if test "$am_cv_prog_cc_c_o" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-AC_LANG_POP([C])])
-
-# For backward compatibility.
-AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_RUN_LOG(COMMAND)
-# -------------------
-# Run COMMAND, save the exit status in ac_status, and log it.
-# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
-AC_DEFUN([AM_RUN_LOG],
-[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
- ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- (exit $ac_status); }])
-
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name. Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
- *[[\\\"\#\$\&\'\`$am_lf]]*)
- AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
- *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
- AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
-esac
-
-# Do 'set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- am_has_slept=no
- for am_try in 1 2; do
- echo "timestamp, slept: $am_has_slept" > conftest.file
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
- alias in your environment])
- fi
- if test "$[2]" = conftest.file || test $am_try -eq 2; then
- break
- fi
- # Just in case.
- sleep 1
- am_has_slept=yes
- done
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT([yes])
-# If we didn't sleep, we still need to ensure time stamps of config.status and
-# generated files are strictly newer.
-am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
- ( sleep 1 ) &
- am_sleep_pid=$!
-fi
-AC_CONFIG_COMMANDS_PRE(
- [AC_MSG_CHECKING([that generated files are newer than configure])
- if test -n "$am_sleep_pid"; then
- # Hide warnings about reused PIDs.
- wait $am_sleep_pid 2>/dev/null
- fi
- AC_MSG_RESULT([done])])
-rm -f conftest.file
-])
-
-# Copyright (C) 2009-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# ("yes" being less verbose, "no" or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules], [dnl
-AS_HELP_STRING(
- [--enable-silent-rules],
- [less verbose build output (undo: "make V=1")])
-AS_HELP_STRING(
- [--disable-silent-rules],
- [verbose build output (undo: "make V=0")])dnl
-])
-case $enable_silent_rules in @%:@ (((
- yes) AM_DEFAULT_VERBOSITY=0;;
- no) AM_DEFAULT_VERBOSITY=1;;
- *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
-esac
-dnl
-dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
-dnl do not support nested variable expansions.
-dnl See automake bug#9928 and bug#10237.
-am_make=${MAKE-make}
-AC_CACHE_CHECK([whether $am_make supports nested variables],
- [am_cv_make_support_nested_variables],
- [if AS_ECHO([['TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
-am__doit:
- @$(TRUE)
-.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
- am_cv_make_support_nested_variables=yes
-else
- am_cv_make_support_nested_variables=no
-fi])
-if test $am_cv_make_support_nested_variables = yes; then
- dnl Using '$V' instead of '$(V)' breaks IRIX make.
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
-AC_SUBST([AM_V])dnl
-AM_SUBST_NOTMAKE([AM_V])dnl
-AC_SUBST([AM_DEFAULT_V])dnl
-AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
-AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
-AM_BACKSLASH='\'
-AC_SUBST([AM_BACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
-])
-
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor 'install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in "make install-strip", and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using 'strip' when the user
-# run "make install-strip". However 'strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the 'STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# AM_SUBST_NOTMAKE(VARIABLE)
-# --------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
-
-# Check how to create a tarball. -*- Autoconf -*-
-
-# Copyright (C) 2004-2020 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of 'v7', 'ustar', or 'pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-# tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-# $(am__untar) < result.tar
-#
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility. Yes, it's still used
-# in the wild :-( We should find a proper way to deprecate it ...
-AC_SUBST([AMTAR], ['$${TAR-tar}'])
-
-# We'll loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-
-m4_if([$1], [v7],
- [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-
- [m4_case([$1],
- [ustar],
- [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
- # There is notably a 21 bits limit for the UID and the GID. In fact,
- # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
- # and bug#13588).
- am_max_uid=2097151 # 2^21 - 1
- am_max_gid=$am_max_uid
- # The $UID and $GID variables are not portable, so we need to resort
- # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
- # below are definitely unexpected, so allow the users to see them
- # (that is, avoid stderr redirection).
- am_uid=`id -u || echo unknown`
- am_gid=`id -g || echo unknown`
- AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
- if test $am_uid -le $am_max_uid; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- _am_tools=none
- fi
- AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
- if test $am_gid -le $am_max_gid; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- _am_tools=none
- fi],
-
- [pax],
- [],
-
- [m4_fatal([Unknown tar format])])
-
- AC_MSG_CHECKING([how to create a $1 tar archive])
-
- # Go ahead even if we have the value already cached. We do so because we
- # need to set the values for the 'am__tar' and 'am__untar' variables.
- _am_tools=${am_cv_prog_tar_$1-$_am_tools}
-
- for _am_tool in $_am_tools; do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar; do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
-
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
-
- # tar/untar a dummy directory, and stop if the command works.
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
- rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar /dev/null 2>&1 && break
- fi
- done
- rm -rf conftest.dir
-
- AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
- AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-m4_include([m4/ax_add_am_macro.m4])
-m4_include([m4/ax_am_jobserver.m4])
-m4_include([m4/ax_am_macros.m4])
-m4_include([m4/ax_append_compile_flags.m4])
-m4_include([m4/ax_append_flag.m4])
-m4_include([m4/ax_append_to_file.m4])
-m4_include([m4/ax_check_compile_flag.m4])
-m4_include([m4/ax_check_link_flag.m4])
-m4_include([m4/ax_count_cpus.m4])
-m4_include([m4/ax_create_generic_config.m4])
-m4_include([m4/ax_debug.m4])
-m4_include([m4/ax_file_escapes.m4])
-m4_include([m4/ax_harden_compiler_flags.m4])
-m4_include([m4/ax_print_to_file.m4])
-m4_include([m4/ax_pthread.m4])
-m4_include([m4/ax_require_defined.m4])
-m4_include([m4/ax_tls.m4])
-m4_include([m4/ax_vcs_checkout.m4])
-m4_include([m4/hexversion.m4])
-m4_include([m4/lib_socket_nsl.m4])
-m4_include([m4/libtool.m4])
-m4_include([m4/ltoptions.m4])
-m4_include([m4/ltsugar.m4])
-m4_include([m4/ltversion.m4])
-m4_include([m4/lt~obsolete.m4])
-m4_include([m4/visibility.m4])
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/config.h b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/config.h
deleted file mode 100644
index c769b2d07d..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/config.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/* config.h. Generated from config.in by configure. */
-/* config.in. Generated from configure.ac by autoheader. */
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* User RSA is being defined */
-#define BUILD_USER_RSA /**/
-
-/* Define to 1 to enable debugging code. */
-#define DEBUG 0
-
-/* Define to 1 if you have the header file. */
-#define HAVE_ARPA_INET_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define to 1 if you have the `getaddrinfo' function. */
-#define HAVE_GETADDRINFO 1
-
-/* Define to 1 if you have the `gethostbyname' function. */
-#define HAVE_GETHOSTBYNAME 1
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#define HAVE_GETTIMEOFDAY 1
-
-/* Define to 1 if you have the `gmtime_r' function. */
-#define HAVE_GMTIME_R 1
-
-/* Define to 1 if you have the `inet_ntoa' function. */
-#define HAVE_INET_NTOA 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the header file. */
-/* #undef HAVE_IPPCP_H */
-
-/* Define to 1 if you have the `network' library (-lnetwork). */
-/* #undef HAVE_LIBNETWORK */
-
-/* Define to 1 if you have the `pthread' library (-lpthread). */
-/* #undef HAVE_LIBPTHREAD */
-
-/* Define to 1 if you have the header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `memset' function. */
-#define HAVE_MEMSET 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_NETDB_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_NETINET_IN_H 1
-
-/* Define to 1 if you have the header file. */
-/* #undef HAVE_PCAP_PCAP_H */
-
-/* Define if you have POSIX threads libraries and header files. */
-#define HAVE_PTHREAD 1
-
-/* Have PTHREAD_PRIO_INHERIT. */
-#define HAVE_PTHREAD_PRIO_INHERIT 1
-
-/* Define to 1 if you have the `socket' function. */
-#define HAVE_SOCKET 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_STDDEF_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_SYS_IOCTL_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_SYS_SOCKET_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 or 0, depending whether the compiler supports simple visibility
- declarations. */
-#define HAVE_VISIBILITY 1
-
-/* Define to 1 if the system has the type `__uint128_t'. */
-#define HAVE___UINT128_T 1
-
-/* Define to the sub-directory where libtool stores uninstalled libraries. */
-#define LT_OBJDIR ".libs/"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "https://github.com/wolfssl/wolfssl/issues"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "wolfssl"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "wolfssl 4.4.0"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "wolfssl"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL "https://www.wolfssl.com"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "4.4.0"
-
-/* Define to necessary symbol if this constant uses a non-standard name on
- your system. */
-/* #undef PTHREAD_CREATE_JOINABLE */
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 8
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* The size of `time_t', as computed by sizeof. */
-#define SIZEOF_TIME_T 8
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* If the compiler supports a TLS storage class define it to that here */
-#define TLS __thread
-
-/* Define if the code was built from VCS. */
-#define VCS_CHECKOUT 0
-
-/* VCS system */
-#define VCS_SYSTEM "none"
-
-/* Use __declspec(dllexport) when building library */
-/* #undef WOLFSSL_DLL */
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
- significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-# define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* # undef WORDS_BIGENDIAN */
-# endif
-#endif
-
-/* Define for Solaris 2.5.1 so the uint8_t typedef from ,
- , or is not used. If the typedef were allowed, the
- #define below would cause a syntax error. */
-/* #undef _UINT8_T */
-
-/* Define to `unsigned int' if does not define. */
-/* #undef size_t */
-
-/* Define to the type of an unsigned integer type of width exactly 8 bits if
- such a type exists and the standard includes do not define it. */
-/* #undef uint8_t */
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/config.in b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/config.in
deleted file mode 100644
index a71ac70bc0..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/config.in
+++ /dev/null
@@ -1,189 +0,0 @@
-/* config.in. Generated from configure.ac by autoheader. */
-
-/* Define if building universal (internal helper macro) */
-#undef AC_APPLE_UNIVERSAL_BUILD
-
-/* User RSA is being defined */
-#undef BUILD_USER_RSA
-
-/* Define to 1 to enable debugging code. */
-#undef DEBUG
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_ARPA_INET_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_ERRNO_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the `getaddrinfo' function. */
-#undef HAVE_GETADDRINFO
-
-/* Define to 1 if you have the `gethostbyname' function. */
-#undef HAVE_GETHOSTBYNAME
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define to 1 if you have the `gmtime_r' function. */
-#undef HAVE_GMTIME_R
-
-/* Define to 1 if you have the `inet_ntoa' function. */
-#undef HAVE_INET_NTOA
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_IPPCP_H
-
-/* Define to 1 if you have the `network' library (-lnetwork). */
-#undef HAVE_LIBNETWORK
-
-/* Define to 1 if you have the `pthread' library (-lpthread). */
-#undef HAVE_LIBPTHREAD
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `memset' function. */
-#undef HAVE_MEMSET
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_PCAP_PCAP_H
-
-/* Define if you have POSIX threads libraries and header files. */
-#undef HAVE_PTHREAD
-
-/* Have PTHREAD_PRIO_INHERIT. */
-#undef HAVE_PTHREAD_PRIO_INHERIT
-
-/* Define to 1 if you have the `socket' function. */
-#undef HAVE_SOCKET
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STDDEF_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_SYS_IOCTL_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 or 0, depending whether the compiler supports simple visibility
- declarations. */
-#undef HAVE_VISIBILITY
-
-/* Define to 1 if the system has the type `__uint128_t'. */
-#undef HAVE___UINT128_T
-
-/* Define to the sub-directory where libtool stores uninstalled libraries. */
-#undef LT_OBJDIR
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to necessary symbol if this constant uses a non-standard name on
- your system. */
-#undef PTHREAD_CREATE_JOINABLE
-
-/* The size of `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* The size of `long long', as computed by sizeof. */
-#undef SIZEOF_LONG_LONG
-
-/* The size of `time_t', as computed by sizeof. */
-#undef SIZEOF_TIME_T
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* If the compiler supports a TLS storage class define it to that here */
-#undef TLS
-
-/* Define if the code was built from VCS. */
-#undef VCS_CHECKOUT
-
-/* VCS system */
-#undef VCS_SYSTEM
-
-/* Use __declspec(dllexport) when building library */
-#undef WOLFSSL_DLL
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
- significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-# define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-# undef WORDS_BIGENDIAN
-# endif
-#endif
-
-/* Define for Solaris 2.5.1 so the uint8_t typedef from ,
- , or is not used. If the typedef were allowed, the
- #define below would cause a syntax error. */
-#undef _UINT8_T
-
-/* Define to `unsigned int' if does not define. */
-#undef size_t
-
-/* Define to the type of an unsigned integer type of width exactly 8 bits if
- such a type exists and the standard includes do not define it. */
-#undef uint8_t
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/configure b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/configure
deleted file mode 100644
index 93422a4473..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/configure
+++ /dev/null
@@ -1,30151 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for wolfssl 4.5.0.
-#
-# Report bugs to .
-#
-# Copyright (C) 2006-2020 wolfSSL Inc.
-#
-#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# Use a proper internal environment variable to ensure we don't fall
- # into an infinite loop, continuously re-executing ourselves.
- if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
- _as_can_reexec=no; export _as_can_reexec;
- # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
- fi
- # We don't want this to propagate to other subprocesses.
- { _as_can_reexec=; unset _as_can_reexec;}
-if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-"
- as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
- exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1
-test -x / || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-
- test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
- ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
- ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
- ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
- PATH=/empty FPATH=/empty; export PATH FPATH
- test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
- || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
-else
- as_have_required=no
-fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- as_found=:
- case $as_dir in #(
- /*)
- for as_base in sh bash ksh sh5; do
- # Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
- CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
- break 2
-fi
-fi
- done;;
- esac
- as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
- if test "x$CONFIG_SHELL" != x; then :
- export CONFIG_SHELL
- # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-exit 255
-fi
-
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
- else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: https://github.com/wolfssl/wolfssl/issues about your
-$0: system, including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
- fi
- exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
- test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
- # already done that, so ensure we don't try to do so again and fall
- # in an infinite loop. This has already happened in practice.
- _as_can_reexec=no; export _as_can_reexec
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -pR'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -pR'
- fi
-else
- as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-
-test -n "$DJDIR" || exec 7<&0 &1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='wolfssl'
-PACKAGE_TARNAME='wolfssl'
-PACKAGE_VERSION='4.5.0'
-PACKAGE_STRING='wolfssl 4.5.0'
-PACKAGE_BUGREPORT='https://github.com/wolfssl/wolfssl/issues'
-PACKAGE_URL='https://www.wolfssl.com'
-
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include
-#ifdef HAVE_SYS_TYPES_H
-# include
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include
-#endif
-#ifdef STDC_HEADERS
-# include
-# include
-#else
-# ifdef HAVE_STDLIB_H
-# include
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include
-# endif
-# include
-#endif
-#ifdef HAVE_STRINGS_H
-# include
-#endif
-#ifdef HAVE_INTTYPES_H
-# include
-#endif
-#ifdef HAVE_STDINT_H
-# include
-#endif
-#ifdef HAVE_UNISTD_H
-# include
-#endif"
-
-ac_subst_vars='am__EXEEXT_FALSE
-am__EXEEXT_TRUE
-LTLIBOBJS
-LIBOBJS
-INC_AMINCLUDE
-AMINCLUDE
-GENERIC_CONFIG
-LIB_STATIC_ADD
-LIB_ADD
-AM_CCASFLAGS
-AM_LDFLAGS
-AM_CFLAGS
-AM_CPPFLAGS
-HEX_VERSION
-BUILD_HASHFLAGS_FALSE
-BUILD_HASHFLAGS_TRUE
-BUILD_PKCS7_FALSE
-BUILD_PKCS7_TRUE
-BUILD_DES3_FALSE
-BUILD_DES3_TRUE
-BUILD_PKI_FALSE
-BUILD_PKI_TRUE
-BUILD_TRUST_PEER_CERT_FALSE
-BUILD_TRUST_PEER_CERT_TRUE
-BUILD_PSK_FALSE
-BUILD_PSK_TRUE
-BUILD_CRYPTOCB_FALSE
-BUILD_CRYPTOCB_TRUE
-BUILD_WOLFEVENT_FALSE
-BUILD_WOLFEVENT_TRUE
-BUILD_ASYNCCRYPT_FALSE
-BUILD_ASYNCCRYPT_TRUE
-BUILD_MCAPI_FALSE
-BUILD_MCAPI_TRUE
-BUILD_FAST_RSA_FALSE
-BUILD_FAST_RSA_TRUE
-BUILD_SP_INT_FALSE
-BUILD_SP_INT_TRUE
-BUILD_SP_X86_64_FALSE
-BUILD_SP_X86_64_TRUE
-BUILD_SP_ARM_CORTEX_FALSE
-BUILD_SP_ARM_CORTEX_TRUE
-BUILD_SP_ARM_THUMB_FALSE
-BUILD_SP_ARM_THUMB_TRUE
-BUILD_SP_ARM32_FALSE
-BUILD_SP_ARM32_TRUE
-BUILD_SP_ARM64_FALSE
-BUILD_SP_ARM64_TRUE
-BUILD_SP_C_FALSE
-BUILD_SP_C_TRUE
-BUILD_SP_FALSE
-BUILD_SP_TRUE
-BUILD_INTEL_QA_SYNC_FALSE
-BUILD_INTEL_QA_SYNC_TRUE
-BUILD_INTEL_QA_FALSE
-BUILD_INTEL_QA_TRUE
-BUILD_OCTEON_SYNC_FALSE
-BUILD_OCTEON_SYNC_TRUE
-BUILD_CAVIUM_V_FALSE
-BUILD_CAVIUM_V_TRUE
-BUILD_CAVIUM_FALSE
-BUILD_CAVIUM_TRUE
-BUILD_PKCS12_FALSE
-BUILD_PKCS12_TRUE
-BUILD_PKCS11_FALSE
-BUILD_PKCS11_TRUE
-BUILD_LIBZ_FALSE
-BUILD_LIBZ_TRUE
-BUILD_WOLFCRYPT_TESTS_FALSE
-BUILD_WOLFCRYPT_TESTS_TRUE
-BUILD_THREADED_EXAMPLES_FALSE
-BUILD_THREADED_EXAMPLES_TRUE
-BUILD_TESTS_FALSE
-BUILD_TESTS_TRUE
-BUILD_EXAMPLE_CLIENTS_FALSE
-BUILD_EXAMPLE_CLIENTS_TRUE
-BUILD_EXAMPLE_SERVERS_FALSE
-BUILD_EXAMPLE_SERVERS_TRUE
-BUILD_SLOWMATH_FALSE
-BUILD_SLOWMATH_TRUE
-BUILD_FASTMATH_FALSE
-BUILD_FASTMATH_TRUE
-BUILD_CRYPTONLY_FALSE
-BUILD_CRYPTONLY_TRUE
-BUILD_SCRYPT_FALSE
-BUILD_SCRYPT_TRUE
-BUILD_PWDBASED_FALSE
-BUILD_PWDBASED_TRUE
-BUILD_MD4_FALSE
-BUILD_MD4_TRUE
-USE_VALGRIND_FALSE
-USE_VALGRIND_TRUE
-BUILD_SRP_FALSE
-BUILD_SRP_TRUE
-BUILD_WNR_FALSE
-BUILD_WNR_TRUE
-BUILD_NTRU_FALSE
-BUILD_NTRU_TRUE
-BUILD_USER_CRYPTO_FALSE
-BUILD_USER_CRYPTO_TRUE
-BUILD_USER_RSA_FALSE
-BUILD_USER_RSA_TRUE
-BUILD_CRL_MONITOR_FALSE
-BUILD_CRL_MONITOR_TRUE
-BUILD_CRL_FALSE
-BUILD_CRL_TRUE
-BUILD_OCSP_STAPLING_V2_FALSE
-BUILD_OCSP_STAPLING_V2_TRUE
-BUILD_OCSP_STAPLING_FALSE
-BUILD_OCSP_STAPLING_TRUE
-BUILD_OCSP_FALSE
-BUILD_OCSP_TRUE
-BUILD_INLINE_FALSE
-BUILD_INLINE_TRUE
-BUILD_CHACHA_FALSE
-BUILD_CHACHA_TRUE
-BUILD_POLY1305_FALSE
-BUILD_POLY1305_TRUE
-BUILD_SHA3_FALSE
-BUILD_SHA3_TRUE
-BUILD_SHA224_FALSE
-BUILD_SHA224_TRUE
-BUILD_SELFTEST_FALSE
-BUILD_SELFTEST_TRUE
-BUILD_CMAC_FALSE
-BUILD_CMAC_TRUE
-BUILD_FIPS_RAND_FALSE
-BUILD_FIPS_RAND_TRUE
-BUILD_FIPS_V2_FALSE
-BUILD_FIPS_V2_TRUE
-BUILD_FIPS_V1_FALSE
-BUILD_FIPS_V1_TRUE
-BUILD_FIPS_FALSE
-BUILD_FIPS_TRUE
-BUILD_RABBIT_FALSE
-BUILD_RABBIT_TRUE
-BUILD_HC128_FALSE
-BUILD_HC128_TRUE
-BUILD_SHA_FALSE
-BUILD_SHA_TRUE
-BUILD_MD5_FALSE
-BUILD_MD5_TRUE
-BUILD_RC4_FALSE
-BUILD_RC4_TRUE
-BUILD_IDEA_FALSE
-BUILD_IDEA_TRUE
-BUILD_CODING_FALSE
-BUILD_CODING_TRUE
-BUILD_AES_FALSE
-BUILD_AES_TRUE
-BUILD_ASN_FALSE
-BUILD_ASN_TRUE
-BUILD_DH_FALSE
-BUILD_DH_TRUE
-BUILD_RSA_FALSE
-BUILD_RSA_TRUE
-BUILD_MEMORY_FALSE
-BUILD_MEMORY_TRUE
-BUILD_CURVE448_SMALL_FALSE
-BUILD_CURVE448_SMALL_TRUE
-BUILD_CURVE448_FALSE
-BUILD_CURVE448_TRUE
-BUILD_GE448_FALSE
-BUILD_GE448_TRUE
-BUILD_FE448_FALSE
-BUILD_FE448_TRUE
-BUILD_ED448_SMALL_FALSE
-BUILD_ED448_SMALL_TRUE
-BUILD_ED448_FALSE
-BUILD_ED448_TRUE
-BUILD_CURVE25519_SMALL_FALSE
-BUILD_CURVE25519_SMALL_TRUE
-BUILD_CURVE25519_FALSE
-BUILD_CURVE25519_TRUE
-BUILD_GEMATH_FALSE
-BUILD_GEMATH_TRUE
-BUILD_FEMATH_FALSE
-BUILD_FEMATH_TRUE
-BUILD_ED25519_SMALL_FALSE
-BUILD_ED25519_SMALL_TRUE
-BUILD_ED25519_FALSE
-BUILD_ED25519_TRUE
-BUILD_ECC_FALSE
-BUILD_ECC_TRUE
-BUILD_DSA_FALSE
-BUILD_DSA_TRUE
-BUILD_SHA512_FALSE
-BUILD_SHA512_TRUE
-BUILD_BLAKE2S_FALSE
-BUILD_BLAKE2S_TRUE
-BUILD_BLAKE2_FALSE
-BUILD_BLAKE2_TRUE
-BUILD_RIPEMD_FALSE
-BUILD_RIPEMD_TRUE
-BUILD_MD2_FALSE
-BUILD_MD2_TRUE
-BUILD_CAMELLIA_FALSE
-BUILD_CAMELLIA_TRUE
-BUILD_DEVCRYPTO_FALSE
-BUILD_DEVCRYPTO_TRUE
-BUILD_AFALG_FALSE
-BUILD_AFALG_TRUE
-BUILD_INTELASM_FALSE
-BUILD_INTELASM_TRUE
-BUILD_AESNI_FALSE
-BUILD_AESNI_TRUE
-BUILD_XILINX_FALSE
-BUILD_XILINX_TRUE
-BUILD_ARMASM_FALSE
-BUILD_ARMASM_TRUE
-BUILD_AESCCM_FALSE
-BUILD_AESCCM_TRUE
-BUILD_AESGCM_FALSE
-BUILD_AESGCM_TRUE
-BUILD_SNIFFTEST_FALSE
-BUILD_SNIFFTEST_TRUE
-BUILD_SNIFFER_FALSE
-BUILD_SNIFFER_TRUE
-BUILD_CRYPTOAUTHLIB_FALSE
-BUILD_CRYPTOAUTHLIB_TRUE
-BUILD_PKCALLBACKS_FALSE
-BUILD_PKCALLBACKS_TRUE
-BUILD_LOWMEM_FALSE
-BUILD_LOWMEM_TRUE
-BUILD_LEANTLS_FALSE
-BUILD_LEANTLS_TRUE
-BUILD_LEANPSK_FALSE
-BUILD_LEANPSK_TRUE
-BUILD_IPV6_FALSE
-BUILD_IPV6_TRUE
-BUILD_MCAST_FALSE
-BUILD_MCAST_TRUE
-BUILD_SCTP_FALSE
-BUILD_SCTP_TRUE
-BUILD_RNG_FALSE
-BUILD_RNG_TRUE
-BUILD_TLS13_FALSE
-BUILD_TLS13_TRUE
-BUILD_ALL_FALSE
-BUILD_ALL_TRUE
-BUILD_DISTRO_FALSE
-BUILD_DISTRO_TRUE
-IS_VCS_CHECKOUT_FALSE
-IS_VCS_CHECKOUT_TRUE
-IPPLINK
-IPPHEADERS
-IPPLIBS
-HAVE_VALGRIND
-HAVE_OPENSSL_CMD
-PTHREAD_CFLAGS
-PTHREAD_LIBS
-PTHREAD_CC
-ax_pthread_config
-DEBUG_FALSE
-DEBUG_TRUE
-MCHECK
-LIBM
-am__fastdepCCAS_FALSE
-am__fastdepCCAS_TRUE
-CCASDEPMODE
-CCASFLAGS
-CCAS
-HAVE_VISIBILITY
-CFLAG_VISIBILITY
-WOLFSSL_LIBRARY_VERSION
-CPP
-LT_SYS_LIBRARY_PATH
-OTOOL64
-OTOOL
-LIPO
-NMEDIT
-DSYMUTIL
-MANIFEST_TOOL
-RANLIB
-ac_ct_AR
-AR
-LN_S
-NM
-ac_ct_DUMPBIN
-DUMPBIN
-LD
-FGREP
-EGREP
-GREP
-SED
-LIBTOOL
-OBJDUMP
-DLLTOOL
-AS
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
-AM_DEFAULT_V
-AM_V
-am__fastdepCC_FALSE
-am__fastdepCC_TRUE
-CCDEPMODE
-am__nodep
-AMDEPBACKSLASH
-AMDEP_FALSE
-AMDEP_TRUE
-am__include
-DEPDIR
-am__untar
-am__tar
-AMTAR
-am__leading_dot
-SET_MAKE
-AWK
-mkdir_p
-MKDIR_P
-INSTALL_STRIP_PROGRAM
-STRIP
-install_sh
-MAKEINFO
-AUTOHEADER
-AUTOMAKE
-AUTOCONF
-ACLOCAL
-VERSION
-PACKAGE
-CYGPATH_W
-am__isrc
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL
-am__quote'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_dependency_tracking
-enable_silent_rules
-enable_static
-enable_shared
-with_pic
-enable_fast_install
-with_aix_soname
-with_gnu_ld
-with_sysroot
-enable_libtool_lock
-enable_debug
-enable_fips
-enable_distro
-enable_all
-enable_32bit
-enable_16bit
-enable_asm
-enable_singlethreaded
-enable_dtls
-enable_dtls_mtu
-enable_tls13_draft18
-enable_tls13
-enable_postauth
-enable_hrrcookie
-enable_rng
-enable_sctp
-enable_mcast
-enable_openssh
-enable_openvpn
-enable_nginx
-enable_haproxy
-enable_wpas
-enable_wpas_dpp
-enable_fortress
-enable_libwebsockets
-enable_ip_alt_name
-enable_qt
-enable_bump
-enable_sniffer
-enable_signal
-enable_opensslcoexist
-enable_opensslall
-enable_opensslextra
-enable_maxstrength
-enable_harden
-enable_ipv6
-enable_leanpsk
-enable_leantls
-enable_lowresource
-enable_titancache
-enable_hugecache
-enable_bigcache
-enable_smallcache
-enable_savesession
-enable_savecert
-enable_writedup
-enable_atomicuser
-enable_pkcallbacks
-with_cryptoauthlib
-enable_aescbc
-enable_aesgcm
-enable_aesccm
-enable_aesctr
-enable_aesofb
-enable_aescfb
-enable_armasm
-enable_xilinx
-enable_aesni
-enable_intelasm
-enable_intelrand
-enable_afalg
-enable_devcrypto
-enable_camellia
-enable_md2
-enable_nullcipher
-enable_ripemd
-enable_blake2
-enable_blake2s
-enable_sha512
-enable_sha384
-enable_sessioncerts
-enable_keygen
-enable_certgen
-enable_certreq
-enable_certext
-enable_certgencache
-enable_sep
-enable_hkdf
-enable_x963kdf
-enable_dsa
-enable_eccshamir
-enable_ecc
-enable_ecccustcurves
-enable_compkey
-enable_curve25519
-enable_ed25519
-enable_curve448
-enable_ed448
-enable_fpecc
-enable_eccencrypt
-enable_psk
-enable_psk_one_id
-enable_errorstrings
-enable_errorqueue
-enable_oldtls
-enable_tlsv12
-enable_tlsv10
-enable_sslv3
-enable_stacksize
-enable_memory
-enable_trackmemory
-enable_memorylog
-enable_stacklog
-enable_qt_test
-enable_rsa
-enable_oaep
-enable_rsapub
-enable_rsavfy
-enable_rsapss
-enable_dh
-enable_anon
-enable_asn
-enable_aes
-enable_coding
-enable_base64encode
-enable_base16
-enable_des3
-enable_idea
-enable_arc4
-enable_md5
-enable_sha
-enable_cmac
-enable_xts
-enable_webserver
-enable_webclient
-enable_hc128
-enable_rabbit
-enable_selftest
-enable_sha224
-enable_sha3
-enable_shake256
-enable_poly1305
-enable_chacha
-enable_hashdrbg
-enable_filesystem
-enable_inline
-enable_ocsp
-enable_ocspstapling
-enable_ocspstapling2
-enable_crl
-enable_crl_monitor
-with_user_crypto
-with_ntru
-enable_qsh
-with_wnr
-enable_sni
-enable_maxfragment
-enable_alpn
-enable_trustedca
-enable_truncatedhmac
-enable_renegotiation_indication
-enable_secure_renegotiation
-enable_fallback_scsv
-enable_supportedcurves
-enable_ffdhe_only
-enable_session_ticket
-enable_extended_master
-enable_tlsx
-enable_earlydata
-enable_pkcs7
-enable_ssh
-enable_scep
-enable_srp
-enable_indef
-enable_smallstackcache
-enable_smallstack
-enable_valgrind
-enable_testcert
-enable_iopool
-enable_certservice
-enable_jni
-enable_lighty
-enable_asio
-enable_apachehttpd
-enable_enc_then_mac
-enable_stunnel
-enable_md4
-enable_enckeys
-enable_pwdbased
-enable_scrypt
-enable_cryptonly
-enable_fastmath
-enable_fasthugemath
-enable_examples
-enable_crypttests
-with_libz
-enable_pkcs11
-enable_pkcs12
-with_cavium
-with_cavium_v
-with_octeon_sync
-with_intelqa
-with_intelqa_sync
-enable_sp
-enable_sp_asm
-enable_sp_math
-enable_fast_rsa
-enable_staticmemory
-enable_mcapi
-enable_asynccrypt
-enable_asyncthreads
-enable_cryptodev
-enable_cryptocb
-enable_sessionexport
-enable_aeskeywrap
-enable_oldnames
-enable_memtest
-enable_hashflags
-enable_defaultdhparams
-enable_usersettings
-enable_optflags
-enable_jobserver
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-LT_SYS_LIBRARY_PATH
-CPP
-CCAS
-CCASFLAGS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *=) ac_optarg= ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- case $ac_envvar in #(
- '' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
- esac
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures wolfssl 4.5.0 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/wolfssl]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of wolfssl 4.5.0:";;
- esac
- cat <<\_ACEOF
-
-Optional Features:
- --disable-option-checking ignore unrecognized --enable/--with options
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-dependency-tracking
- do not reject slow dependency extractors
- --disable-dependency-tracking
- speeds up one-time build
- --enable-silent-rules less verbose build output (undo: "make V=1")
- --disable-silent-rules verbose build output (undo: "make V=0")
- --enable-static[=PKGS] build static libraries [default=no]
- --enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
- --disable-libtool-lock avoid locking (might break parallel builds)
- --enable-debug Add debug code/turns off optimizations (yes|no)
- [default=no]
- --enable-fips Enable FIPS 140-2, Will NOT work w/o FIPS license
- (default: disabled)
- --enable-distro Enable wolfSSL distro build (default: disabled)
- --enable-all Enable all wolfSSL features, except SSLv3 (default:
- disabled)
- --enable-32bit Enables 32-bit support (default: disabled)
- --enable-16bit Enables 16-bit support (default: disabled)
- --enable-asm Enables option for assembly (default: enabled)
- --enable-singlethreaded Enable wolfSSL single threaded (default: disabled)
- --enable-dtls Enable wolfSSL DTLS (default: disabled)
- --enable-dtls-mtu Enable setting the MTU size for wolfSSL DTLS
- (default: disabled)
- --enable-tls13-draft18 Enable wolfSSL TLS v1.3 Draft 18 (default: disabled)
- --enable-tls13 Enable wolfSSL TLS v1.3 (default: enabled)
- --enable-postauth Enable wolfSSL Post-handshake Authentication
- (default: disabled)
- --enable-hrrcookie Enable the server to send Cookie Extension in HRR
- with state (default: disabled)
- --enable-rng Enable compiling and using RNG (default: enabled)
- --enable-sctp Enable wolfSSL DTLS-SCTP support (default: disabled)
- --enable-mcast Enable wolfSSL DTLS multicast support (default:
- disabled)
- --enable-openssh Enable OpenSSH compatibility build (default:
- disabled)
- --enable-openvpn Enable OpenVPN compatibility build (default:
- disabled)
- --enable-nginx Enable nginx (default: disabled)
- --enable-haproxy Enable haproxy (default: disabled)
- --enable-wpas Enable wpa_supplicant support (default: disabled)
- --enable-wpas-dpp Enable wpa_supplicant support with dpp (default:
- disabled)
- --enable-fortress Enable SSL fortress build (default: disabled)
- --enable-libwebsockets Enable libwebsockets (default: disabled)
- --enable-ip-alt-name Enable IP subject alternative name (default:
- disabled)
- --enable-qt Enable qt (default: disabled)
- --enable-bump Enable SSL Bump build (default: disabled)
- --enable-sniffer Enable wolfSSL sniffer support (default: disabled)
- --enable-signal Enable signal (default: disabled)
- --enable-opensslcoexist Enable coexistence of wolfssl/openssl (default:
- disabled)
- --enable-opensslall Enable all OpenSSL API, size++ (default: disabled)
- --enable-opensslextra Enable extra OpenSSL API, size+ (default: disabled)
- --enable-maxstrength Enable Max Strength build, allows TLSv1.2-AEAD-PFS
- ciphers only (default: disabled)
- --enable-harden Enable Hardened build, Enables Timing Resistance and
- Blinding (default: enabled)
- --enable-ipv6 Enable testing of IPV6 (default: disabled)
- --enable-leanpsk Enable Lean PSK build (default: disabled)
- --enable-leantls Enable Lean TLS build (default: disabled)
- --enable-lowresource Enable low resource options for memory/flash
- (default: disabled)
- --enable-titancache Enable titan session cache (default: disabled)
- --enable-hugecache Enable huge session cache (default: disabled)
- --enable-bigcache Enable big session cache (default: disabled)
- --enable-smallcache Enable small session cache (default: disabled)
- --enable-savesession Enable persistent session cache (default: disabled)
- --enable-savecert Enable persistent cert cache (default: disabled)
- --enable-writedup Enable write duplication of WOLFSSL objects
- (default: disabled)
- --enable-atomicuser Enable Atomic User Record Layer (default: disabled)
- --enable-pkcallbacks Enable Public Key Callbacks (default: disabled)
- --enable-aescbc Enable wolfSSL AES-CBC support (default: enabled)
- --enable-aesgcm Enable wolfSSL AES-GCM support (default: enabled)
- --enable-aesccm Enable wolfSSL AES-CCM support (default: disabled)
- --enable-aesctr Enable wolfSSL AES-CTR support (default: disabled)
- --enable-aesofb Enable wolfSSL AES-OFB support (default: disabled)
- --enable-aescfb Enable wolfSSL AES-CFB support (default: disabled)
- --enable-armasm Enable wolfSSL ARMv8 ASM support (default: disabled)
- --enable-xilinx Enable wolfSSL support for Xilinx hardened
- crypto(default: disabled)
- --enable-aesni Enable wolfSSL AES-NI support (default: disabled)
- --enable-intelasm Enable All Intel ASM speedups (default: disabled)
- --enable-intelrand Enable Intel rdrand as preferred RNG source
- (default: disabled)
- --enable-afalg Enable Linux af_alg use for crypto (default:
- disabled)
- --enable-devcrypto Enable Linux dev crypto calls: all | aes (all aes
- support) | hash (all hash algos) | cbc (aes-cbc
- only) (default: disabled)
- --enable-camellia Enable wolfSSL Camellia support (default: disabled)
- --enable-md2 Enable wolfSSL MD2 support (default: disabled)
- --enable-nullcipher Enable wolfSSL NULL cipher support (default:
- disabled)
- --enable-ripemd Enable wolfSSL RIPEMD-160 support (default:
- disabled)
- --enable-blake2 Enable wolfSSL BLAKE2b support (default: disabled)
- --enable-blake2s Enable wolfSSL BLAKE2s support (default: disabled)
- --enable-sha512 Enable wolfSSL SHA-512 support (default: enabled)
- --enable-sha384 Enable wolfSSL SHA-384 support (default: enabled)
- --enable-sessioncerts Enable session cert storing (default: disabled)
- --enable-keygen Enable key generation (default: disabled)
- --enable-certgen Enable cert generation (default: disabled)
- --enable-certreq Enable cert request generation (default: disabled)
- --enable-certext Enable cert request extensions (default: disabled)
- --enable-certgencache Enable decoded cert caching (default: disabled)
- --enable-sep Enable sep extensions (default: disabled)
- --enable-hkdf Enable HKDF (HMAC-KDF) support (default: disabled)
- --enable-x963kdf Enable X9.63 KDF support (default: disabled)
- --enable-dsa Enable DSA (default: disabled)
- --enable-eccshamir Enable ECC Shamir (default: enabled)
- --enable-ecc Enable ECC (default: enabled)
- --enable-ecccustcurves Enable ECC custom curves (default: disabled)
- --enable-compkey Enable compressed keys support (default: disabled)
- --enable-curve25519 Enable Curve25519 (default: disabled)
- --enable-ed25519 Enable ED25519 (default: disabled)
- --enable-curve448 Enable Curve448 (default: disabled)
- --enable-ed448 Enable ED448 (default: disabled)
- --enable-fpecc Enable Fixed Point cache ECC (default: disabled)
- --enable-eccencrypt Enable ECC encrypt (default: disabled)
- --enable-psk Enable PSK (default: disabled)
- --enable-psk-one-id Enable PSK (default: disabled)
- --enable-errorstrings Enable error strings table (default: enabled)
- --disable-errorqueue Disables adding nodes to error queue when compiled
- with OPENSSL_EXTRA (default: enabled)
- --enable-oldtls Enable old TLS versions < 1.2 (default: enabled)
- --enable-tlsv12 Enable TLS versions 1.2 (default: enabled)
- --enable-tlsv10 Enable old TLS versions 1.0 (default: disabled)
- --enable-sslv3 Enable SSL version 3.0 (default: disabled)
- --enable-stacksize Enable stack size info on examples (default:
- disabled)
- --enable-memory Enable memory callbacks (default: enabled)
- --enable-trackmemory Enable memory use info on wolfCrypt and wolfSSL
- cleanup (default: disabled)
- --enable-memorylog Enable dynamic memory logging (default: disabled)
- --enable-stacklog Enable stack logging (default: disabled)
- --enable-qt-test Enable qt tests (default: disabled)
- --enable-rsa Enable RSA (default: enabled)
- --enable-oaep Enable RSA OAEP (default: enabled)
- --enable-rsapub Enable RSA Public Only (default: disabled)
- --enable-rsavfy Enable RSA Verify Inline Only (default: disabled)
- --enable-rsapss Enable RSA-PSS (default: disabled)
- --enable-dh Enable DH (default: enabled)
- --enable-anon Enable Anonymous (default: disabled)
- --enable-asn Enable ASN (default: enabled)
- --enable-aes Enable AES (default: enabled)
- --enable-coding Enable Coding base 16/64 (default: enabled)
- --enable-base64encode Enable Base64 encoding (default: enabled on x86_64)
- --enable-base16 Enable Base16 encoding/decoding (default: disabled)
- --enable-des3 Enable DES3 (default: disabled)
- --enable-idea Enable IDEA Cipher (default: disabled)
- --enable-arc4 Enable ARC4 (default: disabled)
- --enable-md5 Enable MD5 (default: enabled)
- --enable-sha Enable SHA (default: enabled)
- --enable-cmac Enable CMAC (default: disabled)
- --enable-xts Enable XTS (default: disabled)
- --enable-webserver Enable Web Server (default: disabled)
- --enable-webclient Enable Web Client (HTTP) (default: disabled)
- --enable-hc128 Enable HC-128 (default: disabled)
- --enable-rabbit Enable RABBIT (default: disabled)
- --enable-selftest Enable selftest, Will NOT work w/o CAVP selftest
- license (default: disabled)
- --enable-sha224 Enable wolfSSL SHA-224 support (default: enabled on
- x86_64/aarch64)
- --enable-sha3 Enable wolfSSL SHA-3 support (default: enabled on
- x86_64/aarch64)
- --enable-shake256 Enable wolfSSL SHAKE256 support (default: enabled on
- x86_64/aarch64)
- --enable-poly1305 Enable wolfSSL POLY1305 support (default: enabled)
- --enable-chacha Enable CHACHA (default: enabled). Use `=noasm` to
- disable ASM AVX/AVX2 speedups
- --enable-hashdrbg Enable Hash DRBG support (default: enabled)
- --enable-filesystem Enable Filesystem support (default: enabled)
- --enable-inline Enable inline functions (default: enabled)
- --enable-ocsp Enable OCSP (default: disabled)
- --enable-ocspstapling Enable OCSP Stapling (default: disabled)
- --enable-ocspstapling2 Enable OCSP Stapling v2 (default: disabled)
- --enable-crl Enable CRL (default: disabled)
- --enable-crl-monitor Enable CRL Monitor (default: disabled)
- --enable-qsh Enable QSH (default: disabled)
- --enable-sni Enable SNI (default: disabled)
- --enable-maxfragment Enable Maximum Fragment Length (default: disabled)
- --enable-alpn Enable ALPN (default: disabled)
- --enable-trustedca Enable Trusted CA Indication (default: disabled)
- --enable-truncatedhmac Enable Truncated HMAC (default: disabled)
- --enable-renegotiation-indication
- Enable Renegotiation Indication (default: disabled)
- --enable-secure-renegotiation
- Enable Secure Renegotiation (default: disabled)
- --enable-fallback-scsv Enable Fallback SCSV (default: disabled)
- --enable-supportedcurves
- Enable Supported Elliptic Curves (default: enabled)
- --enable-ffdhe-only Enable using only FFDHE in client (default:
- disabled)
- --enable-session-ticket Enable Session Ticket (default: disabled)
- --enable-extended-master
- Enable Extended Master Secret (default: enabled)
- --enable-tlsx Enable all TLS Extensions (default: disabled)
- --enable-earlydata Enable Early Data handshake with wolfSSL TLS v1.3
- (default: disabled)
- --enable-pkcs7 Enable PKCS7 (default: disabled)
- --enable-ssh Enable wolfSSH options (default: disabled)
- --enable-scep Enable wolfSCEP (default: disabled)
- --enable-srp Enable Secure Remote Password (default: disabled)
- --enable-indef Enable parsing of indefinite length encoded msgs
- (default: disabled)
- --enable-smallstackcache
- Enable Small Stack Usage Caching (default: disabled)
- --enable-smallstack Enable Small Stack Usage (default: disabled)
- --enable-valgrind Enable valgrind for unit tests (default: disabled)
- --enable-testcert Enable Test Cert (default: disabled)
- --enable-iopool Enable I/O Pool example (default: disabled)
- --enable-certservice Enable cert service (default: disabled)
- --enable-jni Enable wolfSSL JNI (default: disabled)
- --enable-lighty Enable lighttpd/lighty (default: disabled)
- --enable-asio Enable asio (default: disabled)
- --enable-apachehttpd Enable Apache httpd (default: disabled)
- --enable-enc-then-mac Enable Encryptr-Then-Mac extension (default:
- enabled)
- --enable-stunnel Enable stunnel (default: disabled)
- --enable-md4 Enable MD4 (default: disabled)
- --enable-enckeys Enable PEM encrypted private key support (default:
- disabled)
- --enable-pwdbased Enable PWDBASED (default: disabled)
- --enable-scrypt Enable SCRYPT (default: disabled)
- --enable-cryptonly Enable wolfCrypt Only build (default: disabled)
- --enable-fastmath Enable fast math ops (default: enabled on
- x86_64/aarch64)
- --enable-fasthugemath Enable fast math + huge code (default: disabled)
- --enable-examples Enable Examples (default: enabled)
- --enable-crypttests Enable Crypt Bench/Test (default: enabled)
- --enable-pkcs11 Enable pkcs11 access (default: disabled)
- --enable-pkcs12 Enable pkcs12 (default: enabled)
- --enable-sp Enable Single Precision maths implementation
- (default: disabled)
- --enable-sp-asm Enable Single Precision assembly implementation
- (default: disabled)
- --enable-sp-math Enable Single Precision math implementation only
- (default: disabled)
- --enable-fast-rsa Enable RSA using Intel IPP (default: disabled)
- --enable-staticmemory Enable static memory use (default: disabled)
- --enable-mcapi Enable Microchip API (default: disabled)
- --enable-asynccrypt Enable Asynchronous Crypto (default: disabled)
- --enable-asyncthreads Enable Asynchronous Threading (default: enabled)
- --enable-cryptodev DEPRECATED, use cryptocb instead
- --enable-cryptocb Enable crypto callbacks (default: disabled)
- --enable-sessionexport Enable export and import of sessions (default:
- disabled)
- --enable-aeskeywrap Enable AES key wrap support (default: disabled)
- --enable-oldnames Keep backwards compat with old names (default:
- enabled)
- --enable-memtest Memory testing option, for internal use (default:
- disabled)
- --enable-hashflags Enable support for hash flags (default: disabled)
- --enable-dhdefaultparams
- Enables option for default dh parameters (default:
- disabled)
- --enable-usersettings Use your own user_settings.h and do not add Makefile
- CFLAGS (default: disabled)
- --enable-optflags Enable default optimization CFLAGS for the compiler
- (default: enabled)
- --enable-jobserver[=no/yes/#] default=yes
- Enable up to # make jobs
- yes: enable one more than CPU count
-
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
- both]
- --with-aix-soname=aix|svr4|both
- shared library versioning (aka "SONAME") variant to
- provide on AIX, [default=aix].
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
- compiler's sysroot if not specified).
- --with-cryptoauthlib=PATH
- PATH to CryptoAuthLib install (default /usr/)
- --with-user-crypto=PATH Path to USER_CRYPTO install (default /usr/local)
- --with-ntru=PATH Path to NTRU install (default /usr/)
- --with-wnr=PATH Path to Whitewood netRandom install (default
- /usr/local)
- --with-libz=PATH PATH to libz install (default /usr/)
- --with-cavium=PATH PATH to cavium/software dir
- --with-cavium-v=PATH PATH to Cavium V/software dir
- --with-octeon-sync=PATH PATH to Cavium Octeon SDK dir (sync)
- --with-intelqa=PATH PATH to Intel QuickAssist (QAT) driver dir
- --with-intelqa-sync=PATH
- PATH to Intel QuickAssist (QAT) driver dir (sync)
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L if you have libraries in a
- nonstandard directory
- LIBS libraries to pass to the linker, e.g. -l
- CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if
- you have headers in a nonstandard directory
- LT_SYS_LIBRARY_PATH
- User-defined run-time library search path.
- CPP C preprocessor
- CCAS assembler compiler command (defaults to CC)
- CCASFLAGS assembler compiler flags (defaults to CFLAGS)
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to .
-wolfssl home page: .
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-wolfssl configure 4.5.0
-generated by GNU Autoconf 2.69
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-
-Copyright (C) 2006-2020 wolfSSL Inc.
-_ACEOF
- exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- test -x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Define $2 to an innocuous variant, in case declares $2.
- For example, HP-UX 11i declares gettimeofday. */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer to if __STDC__ is defined, since
- exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_func
-
-# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
-# --------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_c_compute_int ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_lo=0 ac_mid=0
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_hi=$ac_mid; break
-else
- as_fn_arith $ac_mid + 1 && ac_lo=$as_val
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_hi=-1 ac_mid=-1
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_lo=$ac_mid; break
-else
- as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- ac_lo= ac_hi=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_hi=$ac_mid
-else
- as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in #((
-?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
-'') ac_retval=1 ;;
-esac
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
-#include
-#include
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- return 1;
- if (($2) < 0)
- {
- long int i = longval ();
- if (i != ($2))
- return 1;
- fprintf (f, "%ld", i);
- }
- else
- {
- unsigned long int i = ulongval ();
- if (i != ($2))
- return 1;
- fprintf (f, "%lu", i);
- }
- /* Do not output a trailing newline, as this causes \r\n confusion
- on some platforms. */
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- echo >>conftest.val; read $3 &5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-if (sizeof ($2))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_type
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## -------------------------------------------------------- ##
-## Report this to https://github.com/wolfssl/wolfssl/issues ##
-## -------------------------------------------------------- ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_find_uintX_t LINENO BITS VAR
-# ------------------------------------
-# Finds an unsigned integer type with width BITS, setting cache variable VAR
-# accordingly.
-ac_fn_c_find_uintX_t ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
-$as_echo_n "checking for uint$2_t... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- # Order is important - never check a type that is potentially smaller
- # than half of the expected target width.
- for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
- 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- case $ac_type in #(
- uint$2_t) :
- eval "$3=yes" ;; #(
- *) :
- eval "$3=\$ac_type" ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if eval test \"x\$"$3"\" = x"no"; then :
-
-else
- break
-fi
- done
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_find_uintX_t
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by wolfssl $as_me 4.5.0, which was
-generated by GNU Autoconf 2.69. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
- done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
- 2)
- as_fn_append ac_configure_args1 " '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- as_fn_append ac_configure_args " '$ac_arg'"
- ;;
- esac
- done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special files
- # actually), so we avoid doing that. DJGPP emulates it as a regular file.
- if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) as_fn_append ac_configure_args " '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_aux_dir=
-for ac_dir in build-aux "$srcdir"/build-aux; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-
-# The following sets CFLAGS to empty if unset on command line. We do not
-# want the default "-g -O2" that AC_PROG_CC sets automatically.
-: ${CFLAGS=""}
-
-# Test ar for the "U" option. Should be checked before the libtool macros.
-xxx_ar_flags=$(ar --help 2>&1)
-case $xxx_ar_flags in #(
- *'use actual timestamps and uids/gids'*) :
- : ${AR_FLAGS="Ucru"} ;; #(
- *) :
- ;;
-esac
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl.exe
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CC" && break
-done
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
- { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if { ac_try='./conftest$ac_cv_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GCC=yes
-else
- GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-else
- CFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-#include
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
- # Make sure it works both with $CC and with simple cc.
- # Following AC_PROG_CC_C_O, we do the test twice because some
- # compilers refuse to overwrite an existing .o file with -o,
- # though they will create one.
- am_cv_prog_cc_c_o=yes
- for am_i in 1 2; do
- if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
- ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } \
- && test -f conftest2.$ac_objext; then
- : OK
- else
- am_cv_prog_cc_c_o=no
- break
- fi
- done
- rm -f core conftest*
- unset am_i
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
-if test "$am_cv_prog_cc_c_o" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-
-am__api_version='1.16'
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
- done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name. Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
- *[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
-esac
-case $srcdir in
- *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
-esac
-
-# Do 'set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- am_has_slept=no
- for am_try in 1 2; do
- echo "timestamp, slept: $am_has_slept" > conftest.file
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
- alias in your environment" "$LINENO" 5
- fi
- if test "$2" = conftest.file || test $am_try -eq 2; then
- break
- fi
- # Just in case.
- sleep 1
- am_has_slept=yes
- done
- test "$2" = conftest.file
- )
-then
- # Ok.
- :
-else
- as_fn_error $? "newly created file is older than distributed files!
-Check your system clock" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-# If we didn't sleep, we still need to ensure time stamps of config.status and
-# generated files are strictly newer.
-am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
- ( sleep 1 ) &
- am_sleep_pid=$!
-fi
-
-rm -f conftest.file
-
-test "$program_prefix" != NONE &&
- program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --is-lightweight"; then
- am_missing_run="$MISSING "
-else
- am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
-fi
-
-if test x"${install_sh+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
- *)
- install_sh="\${SHELL} $am_aux_dir/install-sh"
- esac
-fi
-
-# Installed binaries are usually stripped using 'strip' when the user
-# run "make install-strip". However 'strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the 'STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
- if ${ac_cv_path_mkdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in mkdir gmkdir; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
- 'mkdir (GNU coreutils) '* | \
- 'mkdir (coreutils) '* | \
- 'mkdir (fileutils) '4.1*)
- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
- break 3;;
- esac
- done
- done
- done
-IFS=$as_save_IFS
-
-fi
-
- test -d ./--version && rmdir ./--version
- if test "${ac_cv_path_mkdir+set}" = set; then
- MKDIR_P="$ac_cv_path_mkdir -p"
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for MKDIR_P within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- MKDIR_P="$ac_install_sh -d"
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
-
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
- @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
- *@@@%%%=?*=@@@%%%*)
- eval ac_cv_prog_make_${ac_make}_set=yes;;
- *)
- eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- SET_MAKE=
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
-$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
-cat > confinc.mk << 'END'
-am__doit:
- @echo this is the am__doit target >confinc.out
-.PHONY: am__doit
-END
-am__include="#"
-am__quote=
-# BSD make does it like this.
-echo '.include "confinc.mk" # ignored' > confmf.BSD
-# Other make implementations (GNU, Solaris 10, AIX) do it like this.
-echo 'include confinc.mk # ignored' > confmf.GNU
-_am_result=no
-for s in GNU BSD; do
- { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
- (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- case $?:`cat confinc.out 2>/dev/null` in #(
- '0:this is the am__doit target') :
- case $s in #(
- BSD) :
- am__include='.include' am__quote='"' ;; #(
- *) :
- am__include='include' am__quote='' ;;
-esac ;; #(
- *) :
- ;;
-esac
- if test "$am__include" != "#"; then
- _am_result="yes ($s style)"
- break
- fi
-done
-rm -f confinc.* confmf.*
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
-$as_echo "${_am_result}" >&6; }
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
- enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
- am__nodep='_no'
-fi
- if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
-fi
-
-
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
- enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in # (((
- yes) AM_DEFAULT_VERBOSITY=0;;
- no) AM_DEFAULT_VERBOSITY=1;;
- *) AM_DEFAULT_VERBOSITY=1;;
-esac
-am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if $as_echo 'TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
-am__doit:
- @$(TRUE)
-.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
- am_cv_make_support_nested_variables=yes
-else
- am_cv_make_support_nested_variables=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
-AM_BACKSLASH='\'
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
- # is not polluted with repeated "-I."
- am__isrc=' -I$(srcdir)'
- # test to see if srcdir already configured
- if test -f $srcdir/config.status; then
- as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
- fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='wolfssl'
- VERSION='4.5.0'
-
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-# For better backward compatibility. To be removed once Automake 1.9.x
-# dies out for good. For more background, see:
-#
-#
-mkdir_p='$(MKDIR_P)'
-
-# We need awk for the "check" target (and possibly the TAP driver). The
-# system "awk" is bad on some platforms.
-# Always define AMTAR for backward compatibility. Yes, it's still used
-# in the wild :-( We should find a proper way to deprecate it ...
-AMTAR='$${TAR-tar}'
-
-
-# We'll loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar plaintar pax cpio none'
-
-# The POSIX 1988 'ustar' format is defined with fixed-size fields.
- # There is notably a 21 bits limit for the UID and the GID. In fact,
- # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
- # and bug#13588).
- am_max_uid=2097151 # 2^21 - 1
- am_max_gid=$am_max_uid
- # The $UID and $GID variables are not portable, so we need to resort
- # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
- # below are definitely unexpected, so allow the users to see them
- # (that is, avoid stderr redirection).
- am_uid=`id -u || echo unknown`
- am_gid=`id -g || echo unknown`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
-$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
- if test $am_uid -le $am_max_uid; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- _am_tools=none
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
-$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
- if test $am_gid -le $am_max_gid; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- _am_tools=none
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
-$as_echo_n "checking how to create a ustar tar archive... " >&6; }
-
- # Go ahead even if we have the value already cached. We do so because we
- # need to set the values for the 'am__tar' and 'am__untar' variables.
- _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
-
- for _am_tool in $_am_tools; do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar; do
- { echo "$as_me:$LINENO: $_am_tar --version" >&5
- ($_am_tar --version) >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && break
- done
- am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x ustar -w "$$tardir"'
- am__tar_='pax -L -x ustar -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
- am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
- am__untar='cpio -i -H ustar -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
-
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_ustar}" && break
-
- # tar/untar a dummy directory, and stop if the command works.
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
- (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- rm -rf conftest.dir
- if test -s conftest.tar; then
- { echo "$as_me:$LINENO: $am__untar &5
- ($am__untar &5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
- (cat conftest.dir/file) >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
- done
- rm -rf conftest.dir
-
- if ${am_cv_prog_tar_ustar+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- am_cv_prog_tar_ustar=$_am_tool
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
-$as_echo "$am_cv_prog_tar_ustar" >&6; }
-
-
-
-
-
-depcc="$CC" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CC_dependencies_compiler_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named 'D' -- because '-MD' means "put the output
- # in D".
- rm -rf conftest.dir
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
- case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
- # Solaris 10 /bin/sh.
- echo '/* dummy */' > sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with '-c' and '-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle '-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs.
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # After this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested.
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok '-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CC_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
- am__fastdepCC_TRUE=
- am__fastdepCC_FALSE='#'
-else
- am__fastdepCC_TRUE='#'
- am__fastdepCC_FALSE=
-fi
-
-
-
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes. So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
- cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present. This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard:
-
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message. This
-can help us improve future automake versions.
-
-END
- if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
- echo 'Configuration will proceed anyway, since you have set the' >&2
- echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
- echo >&2
- else
- cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: .
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
- as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
- fi
-fi
-
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
- enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in # (((
- yes) AM_DEFAULT_VERBOSITY=0;;
- no) AM_DEFAULT_VERBOSITY=1;;
- *) AM_DEFAULT_VERBOSITY=0;;
-esac
-am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if $as_echo 'TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
-am__doit:
- @$(TRUE)
-.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
- am_cv_make_support_nested_variables=yes
-else
- am_cv_make_support_nested_variables=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
-AM_BACKSLASH='\'
-
-
-
-
-ac_config_headers="$ac_config_headers config.h:config.in"
-
-
-
-case `pwd` in
- *\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
-esac
-
-
-
-macro_version='2.4.6'
-macro_revision='2.4.6'
-
-
-
-
-
-
-
-
-
-
-
-
-
-ltmain=$ac_aux_dir/ltmain.sh
-
-# Backslashify metacharacters that are still active within
-# double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
-$as_echo_n "checking how to print strings... " >&6; }
-# Test print first, because it will be a builtin if present.
-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
- test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='print -r --'
-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='printf %s\n'
-else
- # Use this function as a fallback that always works.
- func_fallback_echo ()
- {
- eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
- }
- ECHO='func_fallback_echo'
-fi
-
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
- $ECHO ""
-}
-
-case $ECHO in
- printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
-$as_echo "printf" >&6; } ;;
- print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
-$as_echo "print -r" >&6; } ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
-$as_echo "cat" >&6; } ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_SED" || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_SED_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
- fi
-else
- ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
-
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if ${ac_cv_path_FGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
- then ac_cv_path_FGREP="$GREP -F"
- else
- if test -z "$FGREP"; then
- ac_path_FGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_FGREP" || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
- # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
- "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_FGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_FGREP="$ac_path_FGREP"
- ac_path_FGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_FGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_FGREP"; then
- as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_FGREP=$FGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
-
-
-test -z "$GREP" && GREP=grep
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test yes = "$GCC"; then
- # Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return, which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD=$ac_prog
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test yes = "$with_gnu_ld"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if ${lt_cv_path_LD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$LD"; then
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS=$lt_save_ifs
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD=$ac_dir/$ac_prog
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 &5
-$as_echo "$LD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 &5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if ${lt_cv_path_NM+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM=$NM
-else
- lt_nm_to_check=${ac_tool_prefix}nm
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS=$lt_save_ifs
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/$lt_tmp_nm
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
- case $build_os in
- mingw*) lt_bad_file=conftest.nm/nofile ;;
- *) lt_bad_file=/dev/null ;;
- esac
- case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
- *$lt_bad_file* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break 2
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break 2
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS=$lt_save_ifs
- done
- : ${lt_cv_path_NM=no}
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
-if test no != "$lt_cv_path_NM"; then
- NM=$lt_cv_path_NM
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- if test -n "$DUMPBIN"; then :
- # Let the user override the test.
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in dumpbin "link -dump"
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DUMPBIN+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DUMPBIN"; then
- ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$DUMPBIN" && break
- done
-fi
-if test -z "$DUMPBIN"; then
- ac_ct_DUMPBIN=$DUMPBIN
- for ac_prog in dumpbin "link -dump"
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DUMPBIN"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
-if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_DUMPBIN" && break
-done
-
- if test "x$ac_ct_DUMPBIN" = x; then
- DUMPBIN=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DUMPBIN=$ac_ct_DUMPBIN
- fi
-fi
-
- case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
- *COFF*)
- DUMPBIN="$DUMPBIN -symbols -headers"
- ;;
- *)
- DUMPBIN=:
- ;;
- esac
- fi
-
- if test : != "$DUMPBIN"; then
- NM=$DUMPBIN
- fi
-fi
-test -z "$NM" && NM=nm
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if ${lt_cv_nm_interface+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&5
- (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&5
- (eval echo "\"\$as_me:$LINENO: output\"" >&5)
- cat conftest.out >&5
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-# find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if ${lt_cv_sys_max_cmd_len+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- i=0
- teststring=ABCD
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- mint*)
- # On MiNT this can take a long time and run out of memory.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- os2*)
- # The test takes a long time on OS/2.
- lt_cv_sys_max_cmd_len=8192
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len" && \
- test undefined != "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test X`env echo "$teststring$teststring" 2>/dev/null` \
- = "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test 17 != "$i" # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-
-fi
-
-if test -n "$lt_cv_sys_max_cmd_len"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-
-
-
-
-
-: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-
-
-
-
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
-$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-if ${lt_cv_to_host_file_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $host in
- *-*-mingw* )
- case $build in
- *-*-mingw* ) # actually msys
- lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
- ;;
- *-*-cygwin* )
- lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
- ;;
- * ) # otherwise, assume *nix
- lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
- ;;
- esac
- ;;
- *-*-cygwin* )
- case $build in
- *-*-mingw* ) # actually msys
- lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
- ;;
- *-*-cygwin* )
- lt_cv_to_host_file_cmd=func_convert_file_noop
- ;;
- * ) # otherwise, assume *nix
- lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
- ;;
- esac
- ;;
- * ) # unhandled hosts (and "normal" native builds)
- lt_cv_to_host_file_cmd=func_convert_file_noop
- ;;
-esac
-
-fi
-
-to_host_file_cmd=$lt_cv_to_host_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
-$as_echo "$lt_cv_to_host_file_cmd" >&6; }
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
-$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-if ${lt_cv_to_tool_file_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- #assume ordinary cross tools, or native build.
-lt_cv_to_tool_file_cmd=func_convert_file_noop
-case $host in
- *-*-mingw* )
- case $build in
- *-*-mingw* ) # actually msys
- lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
- ;;
- esac
- ;;
-esac
-
-fi
-
-to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
-$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if ${lt_cv_ld_reload_flag+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- if test yes != "$GCC"; then
- reload_cmds=false
- fi
- ;;
- darwin*)
- if test yes = "$GCC"; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OBJDUMP" = x; then
- OBJDUMP="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OBJDUMP=$ac_ct_OBJDUMP
- fi
-else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if ${lt_cv_deplibs_check_method+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# 'unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# that responds to the $file_magic_cmd with a given extended regex.
-# If you have 'file' or equivalent on your system and you're not sure
-# whether 'pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[4-9]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[45]*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- # Keep this pattern in sync with the one in func_win32_libid.
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc*)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-haiku*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[3-9]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd* | bitrig*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-os2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
-
-file_magic_glob=
-want_nocaseglob=no
-if test "$build" = "$host"; then
- case $host_os in
- mingw* | pw32*)
- if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
- want_nocaseglob=yes
- else
- file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
- fi
- ;;
- esac
-fi
-
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DLLTOOL" = x; then
- DLLTOOL="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DLLTOOL=$ac_ct_DLLTOOL
- fi
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
-$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_sharedlib_from_linklib_cmd='unknown'
-
-case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
- # two different shell functions defined in ltmain.sh;
- # decide which one to use based on capabilities of $DLLTOOL
- case `$DLLTOOL --help 2>&1` in
- *--identify-strict*)
- lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
- ;;
- *)
- lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
- ;;
- esac
- ;;
-*)
- # fallback: assume linklib IS sharedlib
- lt_cv_sharedlib_from_linklib_cmd=$ECHO
- ;;
-esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
-$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
-sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
-test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- for ac_prog in ar
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AR" && break
- done
-fi
-if test -z "$AR"; then
- ac_ct_AR=$AR
- for ac_prog in ar
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_AR" && break
-done
-
- if test "x$ac_ct_AR" = x; then
- AR="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_ct_AR
- fi
-fi
-
-: ${AR=ar}
-: ${AR_FLAGS=cru}
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
-$as_echo_n "checking for archiver @FILE support... " >&6; }
-if ${lt_cv_ar_at_file+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ar_at_file=no
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- echo conftest.$ac_objext > conftest.lst
- lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
- (eval $lt_ar_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if test 0 -eq "$ac_status"; then
- # Ensure the archiver fails upon bogus file names.
- rm -f conftest.$ac_objext libconftest.a
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
- (eval $lt_ar_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if test 0 -ne "$ac_status"; then
- lt_cv_ar_at_file=@
- fi
- fi
- rm -f conftest.* libconftest.a
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
-$as_echo "$lt_cv_ar_at_file" >&6; }
-
-if test no = "$lt_cv_ar_at_file"; then
- archiver_list_spec=
-else
- archiver_list_spec=$lt_cv_ar_at_file
-fi
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-test -z "$STRIP" && STRIP=:
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-test -z "$RANLIB" && RANLIB=:
-
-
-
-
-
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- bitrig* | openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
-fi
-
-case $host_os in
- darwin*)
- lock_old_archive_extraction=yes ;;
- *)
- lock_old_archive_extraction=no ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if ${lt_cv_sys_global_symbol_pipe+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[BCDT]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[ABCDGISTW]'
- ;;
-hpux*)
- if test ia64 = "$host_cpu"; then
- symcode='[ABCDEGRST]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[BCDEGRST]'
- ;;
-osf*)
- symcode='[BCDEGQRST]'
- ;;
-solaris*)
- symcode='[BDRT]'
- ;;
-sco3.2v5*)
- symcode='[DT]'
- ;;
-sysv4.2uw2*)
- symcode='[DT]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[ABDT]'
- ;;
-sysv4)
- symcode='[DFNSTU]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[ABCDGIRSTW]' ;;
-esac
-
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Gets list of data symbols to import.
- lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
- # Adjust the below global symbol transforms to fixup imported variables.
- lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
- lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
- lt_c_name_lib_hook="\
- -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
- -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
-else
- # Disable hooks by default.
- lt_cv_sys_global_symbol_to_import=
- lt_cdecl_hook=
- lt_c_name_hook=
- lt_c_name_lib_hook=
-fi
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
-$lt_cdecl_hook\
-" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
-$lt_c_name_hook\
-" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
-
-# Transform an extracted symbol line into symbol name with lib prefix and
-# symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
-$lt_c_name_lib_hook\
-" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
-" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function,
- # D for any global variable and I for any imported variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK '"\
-" {last_section=section; section=\$ 3};"\
-" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
-" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
-" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
-" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
-" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
- lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
- (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
-/* DATA imports from DLLs on WIN32 can't be const, because runtime
- relocations are performed -- see ld's documentation on pseudo-relocs. */
-# define LT_DLSYM_CONST
-#elif defined __osf__
-/* This system does not cope well with relocations in const data. */
-# define LT_DLSYM_CONST
-#else
-# define LT_DLSYM_CONST const
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-LT_DLSYM_CONST struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_globsym_save_LIBS=$LIBS
- lt_globsym_save_CFLAGS=$CFLAGS
- LIBS=conftstm.$ac_objext
- CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest$ac_exeext; then
- pipe_works=yes
- fi
- LIBS=$lt_globsym_save_LIBS
- CFLAGS=$lt_globsym_save_CFLAGS
- else
- echo "cannot find nm_test_func in $nlist" >&5
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&5
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
- fi
- else
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test yes = "$pipe_works"; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-
-fi
-
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-fi
-
-# Response file support.
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- nm_file_list_spec='@'
-elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
- nm_file_list_spec='@'
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
-$as_echo_n "checking for sysroot... " >&6; }
-
-# Check whether --with-sysroot was given.
-if test "${with_sysroot+set}" = set; then :
- withval=$with_sysroot;
-else
- with_sysroot=no
-fi
-
-
-lt_sysroot=
-case $with_sysroot in #(
- yes)
- if test yes = "$GCC"; then
- lt_sysroot=`$CC --print-sysroot 2>/dev/null`
- fi
- ;; #(
- /*)
- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
- ;; #(
- no|'')
- ;; #(
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
-$as_echo "$with_sysroot" >&6; }
- as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
- ;;
-esac
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
-$as_echo "${lt_sysroot:-no}" >&6; }
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
-$as_echo_n "checking for a working dd... " >&6; }
-if ${ac_cv_path_lt_DD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- printf 0123456789abcdef0123456789abcdef >conftest.i
-cat conftest.i conftest.i >conftest2.i
-: ${lt_DD:=$DD}
-if test -z "$lt_DD"; then
- ac_path_lt_DD_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in dd; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_lt_DD" || continue
-if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then
- cmp -s conftest.i conftest.out \
- && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
-fi
- $ac_path_lt_DD_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_lt_DD"; then
- :
- fi
-else
- ac_cv_path_lt_DD=$lt_DD
-fi
-
-rm -f conftest.i conftest2.i conftest.out
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
-$as_echo "$ac_cv_path_lt_DD" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
-$as_echo_n "checking how to truncate binary pipes... " >&6; }
-if ${lt_cv_truncate_bin+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- printf 0123456789abcdef0123456789abcdef >conftest.i
-cat conftest.i conftest.i >conftest2.i
-lt_cv_truncate_bin=
-if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then
- cmp -s conftest.i conftest.out \
- && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
-fi
-rm -f conftest.i conftest2.i conftest.out
-test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
-$as_echo "$lt_cv_truncate_bin" >&6; }
-
-
-
-
-
-
-
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-func_cc_basename ()
-{
- for cc_temp in $*""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
- done
- func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-}
-
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
- enableval=$enable_libtool_lock;
-fi
-
-test no = "$enable_libtool_lock" || enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out what ABI is being produced by ac_compile, and set mode
- # options accordingly.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE=32
- ;;
- *ELF-64*)
- HPUX_IA64_MODE=64
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly.
- echo '#line '$LINENO' "configure"' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- if test yes = "$lt_cv_prog_gnu_ld"; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-mips64*-*linux*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly.
- echo '#line '$LINENO' "configure"' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- emul=elf
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- emul="${emul}32"
- ;;
- *64-bit*)
- emul="${emul}64"
- ;;
- esac
- case `/usr/bin/file conftest.$ac_objext` in
- *MSB*)
- emul="${emul}btsmip"
- ;;
- *LSB*)
- emul="${emul}ltsmip"
- ;;
- esac
- case `/usr/bin/file conftest.$ac_objext` in
- *N32*)
- emul="${emul}n32"
- ;;
- esac
- LD="${LD-ld} -m $emul"
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly. Note that the listed cases only cover the
- # situations where additional linker options are needed (such as when
- # doing 32-bit compilation for a host where ld defaults to 64-bit, or
- # vice versa); the common cases where no linker options are needed do
- # not appear in the list.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- case `/usr/bin/file conftest.o` in
- *x86-64*)
- LD="${LD-ld} -m elf32_x86_64"
- ;;
- *)
- LD="${LD-ld} -m elf_i386"
- ;;
- esac
- ;;
- powerpc64le-*linux*)
- LD="${LD-ld} -m elf32lppclinux"
- ;;
- powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- powerpcle-*linux*)
- LD="${LD-ld} -m elf64lppc"
- ;;
- powerpc-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -belf"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if ${lt_cv_cc_needs_belf+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_cc_needs_belf=yes
-else
- lt_cv_cc_needs_belf=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
- if test yes != "$lt_cv_cc_needs_belf"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS=$SAVE_CFLAGS
- fi
- ;;
-*-*solaris*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*)
- case $host in
- i?86-*-solaris*|x86_64-*-solaris*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- sparc*-*-solaris*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
- if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
- LD=${LD-ld}_sol2
- fi
- ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks=$enable_libtool_lock
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
-set dummy ${ac_tool_prefix}mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$MANIFEST_TOOL"; then
- ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
-if test -n "$MANIFEST_TOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
-$as_echo "$MANIFEST_TOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
- ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
- # Extract the first word of "mt", so it can be a program name with args.
-set dummy mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_MANIFEST_TOOL"; then
- ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
-if test -n "$ac_ct_MANIFEST_TOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
-$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_MANIFEST_TOOL" = x; then
- MANIFEST_TOOL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
- fi
-else
- MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
-fi
-
-test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
-$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-if ${lt_cv_path_mainfest_tool+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_path_mainfest_tool=no
- echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
- $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
- cat conftest.err >&5
- if $GREP 'Manifest Tool' conftest.out > /dev/null; then
- lt_cv_path_mainfest_tool=yes
- fi
- rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
-$as_echo "$lt_cv_path_mainfest_tool" >&6; }
-if test yes != "$lt_cv_path_mainfest_tool"; then
- MANIFEST_TOOL=:
-fi
-
-
-
-
-
-
- case $host_os in
- rhapsody* | darwin*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DSYMUTIL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DSYMUTIL"; then
- ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DSYMUTIL=$ac_cv_prog_DSYMUTIL
-if test -n "$DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DSYMUTIL"; then
- ac_ct_DSYMUTIL=$DSYMUTIL
- # Extract the first word of "dsymutil", so it can be a program name with args.
-set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DSYMUTIL"; then
- ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
-if test -n "$ac_ct_DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DSYMUTIL" = x; then
- DSYMUTIL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DSYMUTIL=$ac_ct_DSYMUTIL
- fi
-else
- DSYMUTIL="$ac_cv_prog_DSYMUTIL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_NMEDIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NMEDIT"; then
- ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-NMEDIT=$ac_cv_prog_NMEDIT
-if test -n "$NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NMEDIT"; then
- ac_ct_NMEDIT=$NMEDIT
- # Extract the first word of "nmedit", so it can be a program name with args.
-set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_NMEDIT"; then
- ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_NMEDIT="nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
-if test -n "$ac_ct_NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_NMEDIT" = x; then
- NMEDIT=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- NMEDIT=$ac_ct_NMEDIT
- fi
-else
- NMEDIT="$ac_cv_prog_NMEDIT"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
-set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LIPO+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$LIPO"; then
- ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-LIPO=$ac_cv_prog_LIPO
-if test -n "$LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_LIPO"; then
- ac_ct_LIPO=$LIPO
- # Extract the first word of "lipo", so it can be a program name with args.
-set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_LIPO"; then
- ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_LIPO="lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
-if test -n "$ac_ct_LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_LIPO" = x; then
- LIPO=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- LIPO=$ac_ct_LIPO
- fi
-else
- LIPO="$ac_cv_prog_LIPO"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OTOOL"; then
- ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL=$ac_cv_prog_OTOOL
-if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL"; then
- ac_ct_OTOOL=$OTOOL
- # Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OTOOL"; then
- ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_OTOOL="otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
-if test -n "$ac_ct_OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OTOOL" = x; then
- OTOOL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OTOOL=$ac_ct_OTOOL
- fi
-else
- OTOOL="$ac_cv_prog_OTOOL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL64+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OTOOL64"; then
- ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL64=$ac_cv_prog_OTOOL64
-if test -n "$OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL64"; then
- ac_ct_OTOOL64=$OTOOL64
- # Extract the first word of "otool64", so it can be a program name with args.
-set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OTOOL64"; then
- ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_OTOOL64="otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
-if test -n "$ac_ct_OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OTOOL64" = x; then
- OTOOL64=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OTOOL64=$ac_ct_OTOOL64
- fi
-else
- OTOOL64="$ac_cv_prog_OTOOL64"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if ${lt_cv_apple_cc_single_mod+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_apple_cc_single_mod=no
- if test -z "$LT_MULTI_MODULE"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&5
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- # If there is a non-empty error log, and "single_module"
- # appears in it, assume the flag caused a linker warning
- if test -s conftest.err && $GREP single_module conftest.err; then
- cat conftest.err >&5
- # Otherwise, if the output was created with a 0 exit code from
- # the compiler, it worked.
- elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&5
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if ${lt_cv_ld_exported_symbols_list+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_ld_exported_symbols_list=yes
-else
- lt_cv_ld_exported_symbols_list=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
-$as_echo_n "checking for -force_load linker flag... " >&6; }
-if ${lt_cv_ld_force_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_force_load=no
- cat > conftest.c << _LT_EOF
-int forced_loaded() { return 2;}
-_LT_EOF
- echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
- $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
- echo "$AR cru libconftest.a conftest.o" >&5
- $AR cru libconftest.a conftest.o 2>&5
- echo "$RANLIB libconftest.a" >&5
- $RANLIB libconftest.a 2>&5
- cat > conftest.c << _LT_EOF
-int main() { return 0;}
-_LT_EOF
- echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
- $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
- _lt_result=$?
- if test -s conftest.err && $GREP force_load conftest.err; then
- cat conftest.err >&5
- elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
- lt_cv_ld_force_load=yes
- else
- cat conftest.err >&5
- fi
- rm -f conftest.err libconftest.a conftest conftest.c
- rm -rf conftest.dSYM
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
-$as_echo "$lt_cv_ld_force_load" >&6; }
- case $host_os in
- rhapsody* | darwin1.[012])
- _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- darwin*)
- case ${MACOSX_DEPLOYMENT_TARGET},$host in
- 10.[012],*|,*powerpc*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- *)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test yes = "$lt_cv_apple_cc_single_mod"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test yes = "$lt_cv_ld_exported_symbols_list"; then
- _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
- fi
- if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-
-# func_munge_path_list VARIABLE PATH
-# -----------------------------------
-# VARIABLE is name of variable containing _space_ separated list of
-# directories to be munged by the contents of PATH, which is string
-# having a format:
-# "DIR[:DIR]:"
-# string "DIR[ DIR]" will be prepended to VARIABLE
-# ":DIR[:DIR]"
-# string "DIR[ DIR]" will be appended to VARIABLE
-# "DIRP[:DIRP]::[DIRA:]DIRA"
-# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
-# "DIRA[ DIRA]" will be appended to VARIABLE
-# "DIR[:DIR]"
-# VARIABLE will be replaced by "DIR[ DIR]"
-func_munge_path_list ()
-{
- case x$2 in
- x)
- ;;
- *:)
- eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
- ;;
- x:*)
- eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
- ;;
- *::*)
- eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
- eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
- ;;
- *)
- eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
- ;;
- esac
-}
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer to if __STDC__ is defined, since
- # exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer to if __STDC__ is defined, since
- # exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-#include
-#include
-#include
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-#include
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in dlfcn.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-# Set options
-# Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
- enableval=$enable_static; p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
- for pkg in $enableval; do
- IFS=$lt_save_ifs
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS=$lt_save_ifs
- ;;
- esac
-else
- enable_static=no
-fi
-
-
-
-
-
-
-
-enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AS+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
-$as_echo "$AS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AS"; then
- ac_ct_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AS+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AS"; then
- ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AS="as"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
-$as_echo "$ac_ct_AS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AS" = x; then
- AS="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AS=$ac_ct_AS
- fi
-else
- AS="$ac_cv_prog_AS"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DLLTOOL" = x; then
- DLLTOOL="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DLLTOOL=$ac_ct_DLLTOOL
- fi
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OBJDUMP" = x; then
- OBJDUMP="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OBJDUMP=$ac_ct_OBJDUMP
- fi
-else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
- ;;
-esac
-
-test -z "$AS" && AS=as
-
-
-
-
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-
-
-
-
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-
- enable_dlopen=no
-
-
-
- # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
- for pkg in $enableval; do
- IFS=$lt_save_ifs
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS=$lt_save_ifs
- ;;
- esac
-else
- enable_shared=yes
-fi
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
- withval=$with_pic; lt_p=${PACKAGE-default}
- case $withval in
- yes|no) pic_mode=$withval ;;
- *)
- pic_mode=default
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
- for lt_pkg in $withval; do
- IFS=$lt_save_ifs
- if test "X$lt_pkg" = "X$lt_p"; then
- pic_mode=yes
- fi
- done
- IFS=$lt_save_ifs
- ;;
- esac
-else
- pic_mode=default
-fi
-
-
-
-
-
-
-
-
- # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
- enableval=$enable_fast_install; p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
- for pkg in $enableval; do
- IFS=$lt_save_ifs
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS=$lt_save_ifs
- ;;
- esac
-else
- enable_fast_install=yes
-fi
-
-
-
-
-
-
-
-
- shared_archive_member_spec=
-case $host,$enable_shared in
-power*-*-aix[5-9]*,yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
-$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
-
-# Check whether --with-aix-soname was given.
-if test "${with_aix_soname+set}" = set; then :
- withval=$with_aix_soname; case $withval in
- aix|svr4|both)
- ;;
- *)
- as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
- ;;
- esac
- lt_cv_with_aix_soname=$with_aix_soname
-else
- if ${lt_cv_with_aix_soname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_with_aix_soname=aix
-fi
-
- with_aix_soname=$lt_cv_with_aix_soname
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
-$as_echo "$with_aix_soname" >&6; }
- if test aix != "$with_aix_soname"; then
- # For the AIX way of multilib, we name the shared archive member
- # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
- # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
- # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
- # the AIX toolchain works better with OBJECT_MODE set (default 32).
- if test 64 = "${OBJECT_MODE-32}"; then
- shared_archive_member_spec=shr_64
- else
- shared_archive_member_spec=shr
- fi
- fi
- ;;
-*)
- with_aix_soname=aix
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS=$ltmain
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-test -z "$LN_S" && LN_S="ln -s"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "${ZSH_VERSION+set}"; then
- setopt NO_GLOB_SUBST
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if ${lt_cv_objdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
-
-
-
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test set != "${COLLECT_NAMES+set}"; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-old_CC=$CC
-old_CFLAGS=$CFLAGS
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-func_cc_basename $compiler
-cc_basename=$func_cc_basename_result
-
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD=$MAGIC_CMD
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS=$lt_save_ifs
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/${ac_tool_prefix}file"; then
- lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD=$lt_cv_path_MAGIC_CMD
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS=$lt_save_ifs
- MAGIC_CMD=$lt_save_MAGIC_CMD
- ;;
-esac
-fi
-
-MAGIC_CMD=$lt_cv_path_MAGIC_CMD
-if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD=$MAGIC_CMD
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS=$lt_save_ifs
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/file"; then
- lt_cv_path_MAGIC_CMD=$ac_dir/"file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD=$lt_cv_path_MAGIC_CMD
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS=$lt_save_ifs
- MAGIC_CMD=$lt_save_MAGIC_CMD
- ;;
-esac
-fi
-
-MAGIC_CMD=$lt_cv_path_MAGIC_CMD
-if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-
-lt_save_CC=$CC
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-
-lt_prog_compiler_no_builtin_flag=
-
-if test yes = "$GCC"; then
- case $cc_basename in
- nvcc*)
- lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
- *)
- lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
- esac
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_rtti_exceptions=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_rtti_exceptions=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-
-if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
- lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
-else
- :
-fi
-
-fi
-
-
-
-
-
-
- lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-
- if test yes = "$GCC"; then
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_static='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test ia64 = "$host_cpu"; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- fi
- lt_prog_compiler_pic='-fPIC'
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- lt_prog_compiler_pic='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the '-m68020' flag to GCC prevents building anything better,
- # like '-m68040'.
- lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic='-DDLL_EXPORT'
- case $host_os in
- os2*)
- lt_prog_compiler_static='$wl-static'
- ;;
- esac
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic='-fno-common'
- ;;
-
- haiku*)
- # PIC is the default for Haiku.
- # The "-static" flag exists, but is broken.
- lt_prog_compiler_static=
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- ;;
-
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- lt_prog_compiler_can_build_shared=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic=-Kconform_pic
- fi
- ;;
-
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
-
- case $cc_basename in
- nvcc*) # Cuda Compiler Driver 2.2
- lt_prog_compiler_wl='-Xlinker '
- if test -n "$lt_prog_compiler_pic"; then
- lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
- fi
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- lt_prog_compiler_wl='-Wl,'
- if test ia64 = "$host_cpu"; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- else
- lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic='-fno-common'
- case $cc_basename in
- nagfor*)
- # NAG Fortran compiler
- lt_prog_compiler_wl='-Wl,-Wl,,'
- lt_prog_compiler_pic='-PIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
- esac
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic='-DDLL_EXPORT'
- case $host_os in
- os2*)
- lt_prog_compiler_static='$wl-static'
- ;;
- esac
- ;;
-
- hpux9* | hpux10* | hpux11*)
- lt_prog_compiler_wl='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='$wl-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_prog_compiler_wl='-Wl,'
- # PIC (with -KPIC) is the default.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
- case $cc_basename in
- # old Intel for x86_64, which still supported -KPIC.
- ecc*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fPIC'
- lt_prog_compiler_static='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='--shared'
- lt_prog_compiler_static='--static'
- ;;
- nagfor*)
- # NAG Fortran compiler
- lt_prog_compiler_wl='-Wl,-Wl,,'
- lt_prog_compiler_pic='-PIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
- tcc*)
- # Fabrice Bellard et al's Tiny C Compiler
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fPIC'
- lt_prog_compiler_static='-static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fpic'
- lt_prog_compiler_static='-Bstatic'
- ;;
- ccc*)
- lt_prog_compiler_wl='-Wl,'
- # All Alpha code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
- xl* | bgxl* | bgf* | mpixl*)
- # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-qpic'
- lt_prog_compiler_static='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl=''
- ;;
- *Sun\ F* | *Sun*Fortran*)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl='-Qoption ld '
- ;;
- *Sun\ C*)
- # Sun C 5.9
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl='-Wl,'
- ;;
- *Intel*\ [CF]*Compiler*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fPIC'
- lt_prog_compiler_static='-static'
- ;;
- *Portland\ Group*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fpic'
- lt_prog_compiler_static='-Bstatic'
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- lt_prog_compiler_wl='-Wl,'
- # All OSF/1 code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- rdos*)
- lt_prog_compiler_static='-non_shared'
- ;;
-
- solaris*)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
- lt_prog_compiler_wl='-Qoption ld ';;
- *)
- lt_prog_compiler_wl='-Wl,';;
- esac
- ;;
-
- sunos4*)
- lt_prog_compiler_wl='-Qoption ld '
- lt_prog_compiler_pic='-PIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic='-Kconform_pic'
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- unicos*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_can_build_shared=no
- ;;
-
- uts4*)
- lt_prog_compiler_pic='-pic'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *)
- lt_prog_compiler_can_build_shared=no
- ;;
- esac
- fi
-
-case $host_os in
- # For platforms that do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic=
- ;;
- *)
- lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
- ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-if ${lt_cv_prog_compiler_pic+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
-$as_echo "$lt_cv_prog_compiler_pic" >&6; }
-lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if ${lt_cv_prog_compiler_pic_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_pic_works=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_pic_works=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-
-if test yes = "$lt_cv_prog_compiler_pic_works"; then
- case $lt_prog_compiler_pic in
- "" | " "*) ;;
- *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
- esac
-else
- lt_prog_compiler_pic=
- lt_prog_compiler_can_build_shared=no
-fi
-
-fi
-
-
-
-
-
-
-
-
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if ${lt_cv_prog_compiler_static_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_static_works=no
- save_LDFLAGS=$LDFLAGS
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_static_works=yes
- fi
- else
- lt_cv_prog_compiler_static_works=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS=$save_LDFLAGS
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-
-if test yes = "$lt_cv_prog_compiler_static_works"; then
- :
-else
- lt_prog_compiler_static=
-fi
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-hard_links=nottested
-if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
- # do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
- if test no = "$hard_links"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-
- runpath_var=
- allow_undefined_flag=
- always_export_symbols=no
- archive_cmds=
- archive_expsym_cmds=
- compiler_needs_object=no
- enable_shared_with_static_runtimes=no
- export_dynamic_flag_spec=
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- hardcode_automatic=no
- hardcode_direct=no
- hardcode_direct_absolute=no
- hardcode_libdir_flag_spec=
- hardcode_libdir_separator=
- hardcode_minus_L=no
- hardcode_shlibpath_var=unsupported
- inherit_rpath=no
- link_all_deplibs=unknown
- module_cmds=
- module_expsym_cmds=
- old_archive_from_new_cmds=
- old_archive_from_expsyms_cmds=
- thread_safe_flag_spec=
- whole_archive_flag_spec=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- include_expsyms=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ' (' and ')$', so one must not match beginning or
- # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
- # as well as any symbol that contains 'd'.
- exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test yes != "$GCC"; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd* | bitrig*)
- with_gnu_ld=no
- ;;
- esac
-
- ld_shlibs=yes
-
- # On some targets, GNU ld is compatible enough with the native linker
- # that we're better off using the native interface for both.
- lt_use_gnu_ld_interface=no
- if test yes = "$with_gnu_ld"; then
- case $host_os in
- aix*)
- # The AIX port of GNU ld has always aspired to compatibility
- # with the native linker. However, as the warning in the GNU ld
- # block says, versions before 2.19.5* couldn't really create working
- # shared libraries, regardless of the interface used.
- case `$LD -v 2>&1` in
- *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
- *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
- *\ \(GNU\ Binutils\)\ [3-9]*) ;;
- *)
- lt_use_gnu_ld_interface=yes
- ;;
- esac
- ;;
- *)
- lt_use_gnu_ld_interface=yes
- ;;
- esac
- fi
-
- if test yes = "$lt_use_gnu_ld_interface"; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='$wl'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
- export_dynamic_flag_spec='$wl--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- supports_anon_versioning=no
- case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
- *GNU\ gold*) supports_anon_versioning=yes ;;
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[3-9]*)
- # On AIX/PPC, the GNU linker is very broken
- if test ia64 != "$host_cpu"; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.19, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to install binutils
-*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
-*** You will then need to restart the configuration process.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds=''
- ;;
- m68k)
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- export_dynamic_flag_spec='$wl--export-all-symbols'
- allow_undefined_flag=unsupported
- always_export_symbols=no
- enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
- exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file, use it as
- # is; otherwise, prepend EXPORTS...
- archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- haiku*)
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- link_all_deplibs=yes
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- shrext_cmds=.dll
- archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- prefix_cmds="$SED"~
- if test EXPORTS = "`$SED 1q $export_symbols`"; then
- prefix_cmds="$prefix_cmds -e 1d";
- fi~
- prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
- cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
- enable_shared_with_static_runtimes=yes
- ;;
-
- interix[3-9]*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='$wl-rpath,$libdir'
- export_dynamic_flag_spec='$wl-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- tmp_diet=no
- if test linux-dietlibc = "$host_os"; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test no = "$tmp_diet"
- then
- tmp_addflag=' $pic_flag'
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95* | pgfortran*)
- # Portland Group f77 and f90 compilers
- whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- whole_archive_flag_spec=
- tmp_sharedflag='--shared' ;;
- nagfor*) # NAGFOR 5.3
- tmp_sharedflag='-Wl,-shared' ;;
- xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
- tmp_sharedflag='-qmkshrobj'
- tmp_addflag= ;;
- nvcc*) # Cuda Compiler Driver 2.2
- whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
- compiler_needs_object=yes
- ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
- compiler_needs_object=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-
- if test yes = "$supports_anon_versioning"; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- tcc*)
- export_dynamic_flag_spec='-rdynamic'
- ;;
- xlf* | bgf* | bgxlf* | mpixlf*)
- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
- whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
- archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test yes = "$supports_anon_versioning"; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- ld_shlibs=no
- fi
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
-
- if test no = "$ld_shlibs"; then
- runpath_var=
- hardcode_libdir_flag_spec=
- export_dynamic_flag_spec=
- whole_archive_flag_spec=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix[4-9]*)
- if test ia64 = "$host_cpu"; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to GNU nm, but means don't demangle to AIX nm.
- # Without the "-l" option, or with the "-B" option, AIX nm treats
- # weak defined symbols like other global defined symbols, whereas
- # GNU nm marks them as "W".
- # While the 'weak' keyword is ignored in the Export File, we need
- # it in the Import File for the 'aix-soname' feature, so we have
- # to replace the "-B" option with "-P" for AIX nm.
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # have runtime linking enabled, and use it for executables.
- # For shared libraries, we enable/disable runtime linking
- # depending on the kind of the shared library created -
- # when "with_aix_soname,aix_use_runtimelinking" is:
- # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
- # "aix,yes" lib.so shared, rtl:yes, for executables
- # lib.a static archive
- # "both,no" lib.so.V(shr.o) shared, rtl:yes
- # lib.a(lib.so.V) shared, rtl:no, for executables
- # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a(lib.so.V) shared, rtl:no
- # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a static archive
- case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
- for ld_flag in $LDFLAGS; do
- if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
- # With aix-soname=svr4, we create the lib.so.V shared archives only,
- # so we don't have lib.a shared libs to link our executables.
- # We have to force runtime linking in this case.
- aix_use_runtimelinking=yes
- LDFLAGS="$LDFLAGS -Wl,-brtl"
- fi
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds=''
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- file_list_spec='$wl-f,'
- case $with_aix_soname,$aix_use_runtimelinking in
- aix,*) ;; # traditional, no import file
- svr4,* | *,yes) # use import file
- # The Import File defines what to hardcode.
- hardcode_direct=no
- hardcode_direct_absolute=no
- ;;
- esac
-
- if test yes = "$GCC"; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`$CC -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag="$shared_flag "'$wl-G'
- fi
- # Need to ensure runtime linking is disabled for the traditional
- # shared library, or the linker may eventually find shared libraries
- # /with/ Import File - we do not want to mix them.
- shared_flag_aix='-shared'
- shared_flag_svr4='-shared $wl-G'
- else
- # not using gcc
- if test ia64 = "$host_cpu"; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag='$wl-G'
- else
- shared_flag='$wl-bM:SRE'
- fi
- shared_flag_aix='$wl-bM:SRE'
- shared_flag_svr4='$wl-G'
- fi
- fi
-
- export_dynamic_flag_spec='$wl-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- always_export_symbols=yes
- if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- if test set = "${lt_cv_aix_libpath+set}"; then
- aix_libpath=$lt_cv_aix_libpath
-else
- if ${lt_cv_aix_libpath_+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\([^ ]*\) *$/\1/
- p
- }
- }'
- lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
- fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_=/usr/lib:/lib
- fi
-
-fi
-
- aix_libpath=$lt_cv_aix_libpath_
-fi
-
- hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
- else
- if test ia64 = "$host_cpu"; then
- hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
- allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- if test set = "${lt_cv_aix_libpath+set}"; then
- aix_libpath=$lt_cv_aix_libpath
-else
- if ${lt_cv_aix_libpath_+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\([^ ]*\) *$/\1/
- p
- }
- }'
- lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
- fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_=/usr/lib:/lib
- fi
-
-fi
-
- aix_libpath=$lt_cv_aix_libpath_
-fi
-
- hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag=' $wl-bernotok'
- allow_undefined_flag=' $wl-berok'
- if test yes = "$with_gnu_ld"; then
- # We only use this code for GNU lds that support --whole-archive.
- whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
- else
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec='$convenience'
- fi
- archive_cmds_need_lc=yes
- archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
- # -brtl affects multiple linker settings, -berok does not and is overridden later
- compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
- if test svr4 != "$with_aix_soname"; then
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
- fi
- if test aix != "$with_aix_soname"; then
- archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
- else
- # used by -dlpreopen to get the symbols
- archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
- fi
- archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds=''
- ;;
- m68k)
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
-
- bsdi[45]*)
- export_dynamic_flag_spec=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- case $cc_basename in
- cl*)
- # Native MSVC
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- file_list_spec='@'
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=.dll
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
- archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
- cp "$export_symbols" "$output_objdir/$soname.def";
- echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
- else
- $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
- # The linker will not automatically build a static lib if we build a DLL.
- # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
- enable_shared_with_static_runtimes=yes
- exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
- # Don't use ranlib
- old_postinstall_cmds='chmod 644 $oldlib'
- postlink_cmds='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile=$lt_outputfile.exe
- lt_tool_outputfile=$lt_tool_outputfile.exe
- ;;
- esac~
- if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
- ;;
- *)
- # Assume MSVC wrapper
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=.dll
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
- enable_shared_with_static_runtimes=yes
- ;;
- esac
- ;;
-
- darwin* | rhapsody*)
-
-
- archive_cmds_need_lc=no
- hardcode_direct=no
- hardcode_automatic=yes
- hardcode_shlibpath_var=unsupported
- if test yes = "$lt_cv_ld_force_load"; then
- whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
-
- else
- whole_archive_flag_spec=''
- fi
- link_all_deplibs=yes
- allow_undefined_flag=$_lt_dar_allow_undefined
- case $cc_basename in
- ifort*|nagfor*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test yes = "$_lt_dar_can_shared"; then
- output_verbose_link_cmd=func_echo_all
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
- module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
-
- else
- ld_shlibs=no
- fi
-
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2.*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9*)
- if test yes = "$GCC"; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
- else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
- fi
- hardcode_libdir_flag_spec='$wl+b $wl$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- export_dynamic_flag_spec='$wl-E'
- ;;
-
- hpux10*)
- if test yes,no = "$GCC,$with_gnu_ld"; then
- archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test no = "$with_gnu_ld"; then
- hardcode_libdir_flag_spec='$wl+b $wl$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='$wl-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- fi
- ;;
-
- hpux11*)
- if test yes,no = "$GCC,$with_gnu_ld"; then
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
-
- # Older versions of the 11.00 compiler do not understand -b yet
- # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
-$as_echo_n "checking if $CC understands -b... " >&6; }
-if ${lt_cv_prog_compiler__b+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler__b=no
- save_LDFLAGS=$LDFLAGS
- LDFLAGS="$LDFLAGS -b"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler__b=yes
- fi
- else
- lt_cv_prog_compiler__b=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS=$save_LDFLAGS
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
-$as_echo "$lt_cv_prog_compiler__b" >&6; }
-
-if test yes = "$lt_cv_prog_compiler__b"; then
- archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-else
- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-fi
-
- ;;
- esac
- fi
- if test no = "$with_gnu_ld"; then
- hardcode_libdir_flag_spec='$wl+b $wl$libdir'
- hardcode_libdir_separator=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- ;;
- *)
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='$wl-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test yes = "$GCC"; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- # This should be the same for all languages, so no per-tag cache variable.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
-$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-if ${lt_cv_irix_exported_symbol+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- save_LDFLAGS=$LDFLAGS
- LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int foo (void) { return 0; }
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_irix_exported_symbol=yes
-else
- lt_cv_irix_exported_symbol=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
-$as_echo "$lt_cv_irix_exported_symbol" >&6; }
- if test yes = "$lt_cv_irix_exported_symbol"; then
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
- fi
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
- hardcode_libdir_separator=:
- inherit_rpath=yes
- link_all_deplibs=yes
- ;;
-
- linux*)
- case $cc_basename in
- tcc*)
- # Fabrice Bellard et al's Tiny C Compiler
- ld_shlibs=yes
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- newsos6)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
- hardcode_libdir_separator=:
- hardcode_shlibpath_var=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd* | bitrig*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='$wl-rpath,$libdir'
- export_dynamic_flag_spec='$wl-E'
- else
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='$wl-rpath,$libdir'
- fi
- else
- ld_shlibs=no
- fi
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- shrext_cmds=.dll
- archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- prefix_cmds="$SED"~
- if test EXPORTS = "`$SED 1q $export_symbols`"; then
- prefix_cmds="$prefix_cmds -e 1d";
- fi~
- prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
- cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
- enable_shared_with_static_runtimes=yes
- ;;
-
- osf3*)
- if test yes = "$GCC"; then
- allow_undefined_flag=' $wl-expect_unresolved $wl\*'
- archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
- hardcode_libdir_separator=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test yes = "$GCC"; then
- allow_undefined_flag=' $wl-expect_unresolved $wl\*'
- archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_separator=:
- ;;
-
- solaris*)
- no_undefined_flag=' -z defs'
- if test yes = "$GCC"; then
- wlarc='$wl'
- archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='$wl'
- archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands '-z linker_flag'. GCC discards it without '$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test yes = "$GCC"; then
- whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
- else
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- link_all_deplibs=yes
- ;;
-
- sunos4*)
- if test sequent = "$host_vendor"; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- reload_cmds='$CC -r -o $output$reload_objs'
- hardcode_direct=no
- ;;
- motorola)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='$wl-z,text'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
-
- if test yes = "$GCC"; then
- archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We CANNOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag='$wl-z,text'
- allow_undefined_flag='$wl-z,nodefs'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='$wl-R,$libdir'
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- export_dynamic_flag_spec='$wl-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test yes = "$GCC"; then
- archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-
- if test sni = "$host_vendor"; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='$wl-Blargedynsym'
- ;;
- esac
- fi
- fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
-test no = "$ld_shlibs" && can_build_shared=no
-
-with_gnu_ld=$with_gnu_ld
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc=yes
-
- if test yes,yes = "$GCC,$enable_shared"; then
- case $archive_cmds in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-if ${lt_cv_archive_cmds_need_lc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl
- pic_flag=$lt_prog_compiler_pic
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
- (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- then
- lt_cv_archive_cmds_need_lc=no
- else
- lt_cv_archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
-$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
- archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
- ;;
- esac
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
-
-if test yes = "$GCC"; then
- case $host_os in
- darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
- *) lt_awk_arg='/^libraries:/' ;;
- esac
- case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
- *) lt_sed_strip_eq='s|=/|/|g' ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
- case $lt_search_path_spec in
- *\;*)
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
- ;;
- *)
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
- ;;
- esac
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary...
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- # ...but if some path component already ends with the multilib dir we assume
- # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
- case "$lt_multi_os_dir; $lt_search_path_spec " in
- "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
- lt_multi_os_dir=
- ;;
- esac
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
- elif test -n "$lt_multi_os_dir"; then
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS = " "; FS = "/|\n";} {
- lt_foo = "";
- lt_count = 0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo = "/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[lt_foo]++; }
- if (lt_freq[lt_foo] == 1) { print lt_foo; }
-}'`
- # AWK program above erroneously prepends '/' to C:/dos/paths
- # for these hosts.
- case $host_os in
- mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
- esac
- sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=.so
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-
-
-case $host_os in
-aix3*)
- version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='$libname$release$shared_ext$major'
- ;;
-
-aix[4-9]*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test ia64 = "$host_cpu"; then
- # AIX 5 supports IA64
- library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line '#! .'. This would cause the generated library to
- # depend on '.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # Using Import Files as archive members, it is possible to support
- # filename-based versioning of shared library archives on AIX. While
- # this would work for both with and without runtime linking, it will
- # prevent static linking of such archives. So we do filename-based
- # shared library versioning with .so extension only, which is used
- # when both runtime linking and shared linking is enabled.
- # Unfortunately, runtime linking may impact performance, so we do
- # not want this to be the default eventually. Also, we use the
- # versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
- # To allow for filename-based versioning support, we need to create
- # libNAME.so.V as an archive file, containing:
- # *) an Import File, referring to the versioned filename of the
- # archive as well as the shared archive member, telling the
- # bitwidth (32 or 64) of that shared object, and providing the
- # list of exported symbols of that shared object, eventually
- # decorated with the 'weak' keyword
- # *) the shared object with the F_LOADONLY flag set, to really avoid
- # it being seen by the linker.
- # At run time we better use the real file rather than another symlink,
- # but for link time we create the symlink libNAME.so -> libNAME.so.V
-
- case $with_aix_soname,$aix_use_runtimelinking in
- # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- aix,yes) # traditional libtool
- dynamic_linker='AIX unversionable lib.so'
- # If using run time linking (on AIX 4.2 or later) use lib.so
- # instead of lib.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- ;;
- aix,no) # traditional AIX only
- dynamic_linker='AIX lib.a(lib.so.V)'
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='$libname$release.a $libname.a'
- soname_spec='$libname$release$shared_ext$major'
- ;;
- svr4,*) # full svr4 only
- dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
- library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
- # We do not specify a path in Import Files, so LIBPATH fires.
- shlibpath_overrides_runpath=yes
- ;;
- *,yes) # both, prefer svr4
- dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
- library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
- # unpreferred sharedlib libNAME.a needs extra handling
- postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
- postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
- # We do not specify a path in Import Files, so LIBPATH fires.
- shlibpath_overrides_runpath=yes
- ;;
- *,no) # both, prefer aix
- dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
- library_names_spec='$libname$release.a $libname.a'
- soname_spec='$libname$release$shared_ext$major'
- # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
- postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
- postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
- ;;
- esac
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='$libname$shared_ext'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=.dll
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$cc_basename in
- yes,*)
- # gcc
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
-
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- ;;
-
- *,cl*)
- # Native MSVC
- libname_spec='$name'
- soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
- library_names_spec='$libname.dll.lib'
-
- case $build_os in
- mingw*)
- sys_lib_search_path_spec=
- lt_save_ifs=$IFS
- IFS=';'
- for lt_path in $LIB
- do
- IFS=$lt_save_ifs
- # Let DOS variable expansion print the short 8.3 style file name.
- lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
- sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
- done
- IFS=$lt_save_ifs
- # Convert to MSYS style.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
- ;;
- cygwin*)
- # Convert to unix form, then to dos form, then back to unix form
- # but this time dos style (no spaces!) so that the unix form looks
- # like /cygdrive/c/PROGRA~1:/cygdr...
- sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
- sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
- sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- ;;
- *)
- sys_lib_search_path_spec=$LIB
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # FIXME: find the short name or the path components, as spaces are
- # common. (e.g. "Program Files" -> "PROGRA~1")
- ;;
- esac
-
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
- dynamic_linker='Win32 link.exe'
- ;;
-
- *)
- # Assume MSVC wrapper
- library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
- dynamic_linker='Win32 ld.exe'
- ;;
- esac
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$major$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[23].*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2.*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-haiku*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- dynamic_linker="$host_os runtime_loader"
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=no
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- if test 32 = "$HPUX_IA64_MODE"; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- sys_lib_dlsearch_path_spec=/usr/lib/hpux32
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- sys_lib_dlsearch_path_spec=/usr/lib/hpux64
- fi
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
- postinstall_cmds='chmod 555 $lib'
- # or fails outright, so override atomically:
- install_override_mode=555
- ;;
-
-interix[3-9]*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test yes = "$lt_cv_prog_gnu_ld"; then
- version_type=linux # correct to gnu/linux during the next big refactor
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='$libname$release$shared_ext$major'
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
- sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-linux*android*)
- version_type=none # Android doesn't support versioned libraries.
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext'
- soname_spec='$libname$release$shared_ext'
- finish_cmds=
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
-
-# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
-
- # Some binutils ld are patched to set DT_RUNPATH
- if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_shlibpath_overrides_runpath=no
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
- LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
- lt_cv_shlibpath_overrides_runpath=yes
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
-fi
-
- shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Ideally, we could use ldconfig to report *all* directores which are
- # searched for libraries, however this is still not possible. Aside from not
- # being certain /sbin/ldconfig is available, command
- # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
- # even though it is searched at run-time. Try to do the best guess by
- # appending ld.so.conf contents (and includes) to the search path.
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd* | bitrig*)
- version_type=sunos
- sys_lib_dlsearch_path_spec=/usr/lib
- need_lib_prefix=no
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
- need_version=no
- else
- need_version=yes
- fi
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-os2*)
- libname_spec='$name'
- version_type=windows
- shrext_cmds=.dll
- need_version=no
- need_lib_prefix=no
- # OS/2 can only load a DLL with a base name of 8 characters or less.
- soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
- v=$($ECHO $release$versuffix | tr -d .-);
- n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
- $ECHO $n$v`$shared_ext'
- library_names_spec='${libname}_dll.$libext'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=BEGINLIBPATH
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='$libname$release$shared_ext$major'
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test yes = "$with_gnu_ld"; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec; then
- version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
- soname_spec='$libname$shared_ext.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=sco
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test yes = "$with_gnu_ld"; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test no = "$dynamic_linker" && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test yes = "$GCC"; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
- sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
-fi
-
-if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
- sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
-fi
-
-# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
-configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
-
-# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
-func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
-
-# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
-configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
- test -n "$runpath_var" ||
- test yes = "$hardcode_automatic"; then
-
- # We can hardcode non-existent directories.
- if test no != "$hardcode_direct" &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
- test no != "$hardcode_minus_L"; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action=unsupported
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
-
-if test relink = "$hardcode_action" ||
- test yes = "$inherit_rpath"; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test yes = "$shlibpath_overrides_runpath" ||
- test no = "$enable_shared"; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-
-
-
-
- if test yes != "$enable_dlopen"; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen=load_add_on
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen=LoadLibrary
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen=dlopen
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
-
- lt_cv_dlopen=dyld
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
-
-fi
-
- ;;
-
- tpf*)
- # Don't try to run any link tests for TPF. We know it's impossible
- # because TPF is a cross-compiler, and we know how we open DSOs.
- lt_cv_dlopen=dlopen
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=no
- ;;
-
- *)
- ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = xyes; then :
- lt_cv_dlopen=shl_load
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if ${ac_cv_lib_dld_shl_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int
-main ()
-{
-return shl_load ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_shl_load=yes
-else
- ac_cv_lib_dld_shl_load=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
- lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
-else
- ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = xyes; then :
- lt_cv_dlopen=dlopen
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if ${ac_cv_lib_svld_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_svld_dlopen=yes
-else
- ac_cv_lib_svld_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
- lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if ${ac_cv_lib_dld_dld_link+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
-int
-main ()
-{
-return dld_link ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_dld_link=yes
-else
- ac_cv_lib_dld_dld_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
- lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
- ;;
- esac
-
- if test no = "$lt_cv_dlopen"; then
- enable_dlopen=no
- else
- enable_dlopen=yes
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS=$CPPFLAGS
- test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS=$LDFLAGS
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS=$LIBS
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test yes = "$cross_compiling"; then :
- lt_cv_dlopen_self=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include
-#endif
-
-#include
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-/* When -fvisibility=hidden is used, assume the code has been annotated
- correspondingly for the symbols needed. */
-#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
-
-int fnord () { return 42; }
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else
- {
- if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- else puts (dlerror ());
- }
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
-
- if test yes = "$lt_cv_dlopen_self"; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self_static+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test yes = "$cross_compiling"; then :
- lt_cv_dlopen_self_static=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include
-#endif
-
-#include
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-/* When -fvisibility=hidden is used, assume the code has been annotated
- correspondingly for the symbols needed. */
-#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
-
-int fnord () { return 42; }
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else
- {
- if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- else puts (dlerror ());
- }
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self_static=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
- fi
-
- CPPFLAGS=$save_CPPFLAGS
- LDFLAGS=$save_LDFLAGS
- LIBS=$save_LIBS
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-striplib=
-old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP"; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
- # Report what library types will actually be built
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
- test no = "$can_build_shared" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test yes = "$enable_shared" && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[4-9]*)
- if test ia64 != "$host_cpu"; then
- case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
- yes,aix,yes) ;; # shared object as lib.so file only
- yes,svr4,*) ;; # shared object as lib.so archive member only
- yes,*) enable_static=no ;; # shared object in lib.a archive as well
- esac
- fi
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
- # Make sure either enable_shared or enable_static is yes.
- test yes = "$enable_shared" || enable_static=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
-
-
-
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC=$lt_save_CC
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ac_config_commands="$ac_config_commands libtool"
-
-
-
-
-# Only expand once:
-
-
-
-#shared library versioning
-WOLFSSL_LIBRARY_VERSION=26:0:2
-# | | |
-# +------+ | +---+
-# | | |
-# current:revision:age
-# | | |
-# | | +- increment if interfaces have been added
-# | | set to zero if interfaces have been removed
-# | | or changed
-# | +- increment if source code has changed
-# | set to zero if current is incremented
-# +- increment if interfaces have been added, removed or changed
-
-
-# Capture user C_EXTRA_FLAGS from configure line.
-# Use of C_EXTRA_FLAGS is deprecated because CFLAGS was fixed but someone
-# might still be using it.
-CFLAGS="$CFLAGS $C_EXTRA_FLAGS $C_FLAGS"
-
-
-
- CFLAG_VISIBILITY=
- HAVE_VISIBILITY=0
- if test -n "$GCC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
-$as_echo_n "checking whether the -Werror option is usable... " >&6; }
- if ${gl_cv_cc_vis_werror+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- gl_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gl_cv_cc_vis_werror=yes
-else
- gl_cv_cc_vis_werror=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$gl_save_CFLAGS"
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
-$as_echo "$gl_cv_cc_vis_werror" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
-$as_echo_n "checking for simple visibility declarations... " >&6; }
- if ${gl_cv_cc_visibility+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- gl_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fvisibility=hidden"
- if test $gl_cv_cc_vis_werror = yes; then
- CFLAGS="$CFLAGS -Werror"
- fi
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-extern __attribute__((__visibility__("hidden"))) int hiddenvar;
- extern __attribute__((__visibility__("default"))) int exportedvar;
- extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
- extern __attribute__((__visibility__("default"))) int exportedfunc (void);
- void dummyfunc (void) {}
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gl_cv_cc_visibility=yes
-else
- gl_cv_cc_visibility=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$gl_save_CFLAGS"
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
-$as_echo "$gl_cv_cc_visibility" >&6; }
- if test $gl_cv_cc_visibility = yes; then
- CFLAG_VISIBILITY="-fvisibility=hidden"
- HAVE_VISIBILITY=1
- fi
- fi
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_VISIBILITY $HAVE_VISIBILITY
-_ACEOF
-
-
-if test -n "$CFLAG_VISIBILITY" ; then :
-
- AM_CFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY"
-
-fi
-
-
-# Moved these size of and type checks before the library checks.
-# The library checks add the library to subsequent test compiles
-# and in some rare cases, the networking check causes these sizeof
-# checks to fail.
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
-$as_echo_n "checking size of long long... " >&6; }
-if ${ac_cv_sizeof_long_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_long_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long long)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_long_long=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
-$as_echo "$ac_cv_sizeof_long_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_long=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
-$as_echo_n "checking size of time_t... " >&6; }
-if ${ac_cv_sizeof_time_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_time_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (time_t)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_time_t=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
-$as_echo "$ac_cv_sizeof_time_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
-_ACEOF
-
-
-ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
-if test "x$ac_cv_type___uint128_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE___UINT128_T 1
-_ACEOF
-
-
-fi
-
-for ac_func in gethostbyname getaddrinfo gettimeofday gmtime_r inet_ntoa memset socket
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-for ac_header in arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h sys/ioctl.h sys/socket.h sys/time.h errno.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
-$as_echo_n "checking for socket in -lnetwork... " >&6; }
-if ${ac_cv_lib_network_socket+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnetwork $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socket ();
-int
-main ()
-{
-return socket ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_network_socket=yes
-else
- ac_cv_lib_network_socket=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
-$as_echo "$ac_cv_lib_network_socket" >&6; }
-if test "x$ac_cv_lib_network_socket" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNETWORK 1
-_ACEOF
-
- LIBS="-lnetwork $LIBS"
-
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if ${ac_cv_c_bigendian+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_c_bigendian=unknown
- # See if we're dealing with a universal compiler.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifndef __APPLE_CC__
- not a universal capable compiler
- #endif
- typedef int dummy;
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- # Check for potential -arch flags. It is not universal unless
- # there are at least two -arch flags with different values.
- ac_arch=
- ac_prev=
- for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
- if test -n "$ac_prev"; then
- case $ac_word in
- i?86 | x86_64 | ppc | ppc64)
- if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
- ac_arch=$ac_word
- else
- ac_cv_c_bigendian=universal
- break
- fi
- ;;
- esac
- ac_prev=
- elif test "x$ac_word" = "x-arch"; then
- ac_prev=arch
- fi
- done
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test $ac_cv_c_bigendian = unknown; then
- # See if sys/param.h defines the BYTE_ORDER macro.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
- #include
-
-int
-main ()
-{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
- && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
- && LITTLE_ENDIAN)
- bogus endian macros
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- # It does; now see whether it defined to BIG_ENDIAN or not.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
- #include
-
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_bigendian=yes
-else
- ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test $ac_cv_c_bigendian = unknown; then
- # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-
-int
-main ()
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
- bogus endian macros
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- # It does; now see whether it defined to _BIG_ENDIAN or not.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-
-int
-main ()
-{
-#ifndef _BIG_ENDIAN
- not big endian
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_bigendian=yes
-else
- ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test $ac_cv_c_bigendian = unknown; then
- # Compile a test program.
- if test "$cross_compiling" = yes; then :
- # Try to guess by grepping values from an object file.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-short int ascii_mm[] =
- { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
- short int ascii_ii[] =
- { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
- int use_ascii (int i) {
- return ascii_mm[i] + ascii_ii[i];
- }
- short int ebcdic_ii[] =
- { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
- short int ebcdic_mm[] =
- { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
- int use_ebcdic (int i) {
- return ebcdic_mm[i] + ebcdic_ii[i];
- }
- extern int foo;
-
-int
-main ()
-{
-return use_ascii (foo) == use_ebcdic (foo);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
- ac_cv_c_bigendian=yes
- fi
- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
- if test "$ac_cv_c_bigendian" = unknown; then
- ac_cv_c_bigendian=no
- else
- # finding both strings is unlikely to happen, but who knows?
- ac_cv_c_bigendian=unknown
- fi
- fi
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long int l;
- char c[sizeof (long int)];
- } u;
- u.l = 1;
- return u.c[sizeof (long int) - 1] == 1;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_c_bigendian=no
-else
- ac_cv_c_bigendian=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
- yes)
- $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
-;; #(
- no)
- ;; #(
- universal)
-
-$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
-
- ;; #(
- *)
- as_fn_error $? "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
- esac
-
-
-
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
-
-fi
-
-ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
-case $ac_cv_c_uint8_t in #(
- no|yes) ;; #(
- *)
-
-$as_echo "#define _UINT8_T 1" >>confdefs.h
-
-
-cat >>confdefs.h <<_ACEOF
-#define uint8_t $ac_cv_c_uint8_t
-_ACEOF
-;;
- esac
-
-# By default we simply use the C compiler to build assembly code.
-
-test "${CCAS+set}" = set || CCAS=$CC
-test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
-
-
-
-depcc="$CCAS" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CCAS_dependencies_compiler_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named 'D' -- because '-MD' means "put the output
- # in D".
- rm -rf conftest.dir
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CCAS_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
-
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
- # Solaris 10 /bin/sh.
- echo '/* dummy */' > sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with '-c' and '-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle '-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs.
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # After this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested.
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok '-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CCAS_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CCAS_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; }
-CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
-
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then
- am__fastdepCCAS_TRUE=
- am__fastdepCCAS_FALSE='#'
-else
- am__fastdepCCAS_TRUE='#'
- am__fastdepCCAS_FALSE=
-fi
-
-
-LIBM=
-case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5
-$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; }
-if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmw $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char _mwvalidcheckl ();
-int
-main ()
-{
-return _mwvalidcheckl ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_mw__mwvalidcheckl=yes
-else
- ac_cv_lib_mw__mwvalidcheckl=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
-$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
-if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then :
- LIBM=-lmw
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
-$as_echo_n "checking for cos in -lm... " >&6; }
-if ${ac_cv_lib_m_cos+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cos ();
-int
-main ()
-{
-return cos ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_m_cos=yes
-else
- ac_cv_lib_m_cos=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
-$as_echo "$ac_cv_lib_m_cos" >&6; }
-if test "x$ac_cv_lib_m_cos" = xyes; then :
- LIBM="$LIBM -lm"
-fi
-
- ;;
-*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
-$as_echo_n "checking for cos in -lm... " >&6; }
-if ${ac_cv_lib_m_cos+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cos ();
-int
-main ()
-{
-return cos ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_m_cos=yes
-else
- ac_cv_lib_m_cos=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
-$as_echo "$ac_cv_lib_m_cos" >&6; }
-if test "x$ac_cv_lib_m_cos" = xyes; then :
- LIBM=-lm
-fi
-
- ;;
-esac
-
-
-
-OPTIMIZE_CFLAGS="-Os"
-OPTIMIZE_FAST_CFLAGS="-O2"
-OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET"
-DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_WOLFSSL"
-LIB_ADD=
-LIB_STATIC_ADD=
-
-# Thread local storage
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5
-$as_echo_n "checking for thread local storage (TLS) class... " >&6; }
- if ${ac_cv_tls+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_tls_keywords="__thread __declspec(thread) none"
- for ax_tls_keyword in $ax_tls_keywords; do
- case $ax_tls_keyword in #(
- none) :
- ac_cv_tls=none ; break ;; #(
- *) :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
- static void
- foo(void) {
- static $ax_tls_keyword int bar;
- exit(1);
- }
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_tls=$ax_tls_keyword ; break
-else
- ac_cv_tls=none
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;;
-esac
- done
-
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
-$as_echo "$ac_cv_tls" >&6; }
-
- if test "$ac_cv_tls" != "none"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define TLS $ac_cv_tls
-_ACEOF
-
- thread_ls_on=yes
-else
- thread_ls_on=no
-
-fi
-
-if test "x$thread_ls_on" = "xyes"; then :
- AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS"
-fi
-
-# DEBUG
- # Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
- enableval=$enable_debug; ax_enable_debug=$enableval
-else
- ax_enable_debug=no
-fi
-
-
- if test "x$ax_enable_debug" = xyes; then :
-
-$as_echo "#define DEBUG 1" >>confdefs.h
-
-else
-
-
-$as_echo "#define DEBUG 0" >>confdefs.h
-
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug" >&5
-$as_echo_n "checking for debug... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_enable_debug" >&5
-$as_echo "$ax_enable_debug" >&6; }
- if test "x${ax_enable_debug}" = xyes; then
- DEBUG_TRUE=
- DEBUG_FALSE='#'
-else
- DEBUG_TRUE='#'
- DEBUG_FALSE=
-fi
-
-if test "$ax_enable_debug" = "yes"; then :
- AM_CFLAGS="$DEBUG_CFLAGS $AM_CFLAGS"
-else
- AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
-fi
-
-
-
-# FIPS
-# Check whether --enable-fips was given.
-if test "${enable_fips+set}" = set; then :
- enableval=$enable_fips; ENABLED_FIPS=$enableval
-else
- ENABLED_FIPS="no"
-fi
-
-
-case $ENABLED_FIPS in #(
- "ready") :
-
- ENABLED_FIPS="yes"
- FIPS_VERSION="v2"
- FIPS_READY="yes"
- ;; #(
- "v2") :
-
- # FIPS v2
- ENABLED_FIPS="yes"
- FIPS_VERSION="v2"
- ;; #(
- "rand") :
-
- # FIPS Rand
- ENABLED_FIPS="yes"
- FIPS_VERSION="rand"
- ;; #(
- "no") :
- FIPS_VERSION="none" ;; #(
- *) :
-
- # FIPS v1
- ENABLED_FIPS="yes"
- FIPS_VERSION="v1"
- ;;
-esac
-
-
-# Distro build feature subset (Debian, Ubuntu, etc.)
-# Check whether --enable-distro was given.
-if test "${enable_distro+set}" = set; then :
- enableval=$enable_distro; ENABLED_DISTRO=$enableval
-else
- ENABLED_DISTRO=no
-
-fi
-
-if test "$ENABLED_DISTRO" = "yes"
-then
- enable_shared=yes
- enable_static=yes
- enable_all=yes
-fi
-
-
-# ALL FEATURES
-# Check whether --enable-all was given.
-if test "${enable_all+set}" = set; then :
- enableval=$enable_all; ENABLED_ALL=$enableval
-else
- ENABLED_ALL=no
-
-fi
-
-if test "$ENABLED_ALL" = "yes"
-then
- enable_dtls=yes
- if test "x$FIPS_VERSION" != "xv1"
- then
- enable_tls13=yes
- enable_rsapss=yes
- fi
- enable_openssh=yes
- enable_opensslextra=yes
- enable_opensslall=yes
- enable_savesession=yes
- enable_savecert=yes
- enable_atomicuser=yes
- enable_pkcallbacks=yes
- enable_aesgcm=yes
- enable_aesccm=yes
- enable_aesctr=yes
- enable_aesofb=yes
- enable_aescfb=yes
- enable_camellia=yes
- enable_ripemd=yes
- enable_sha512=yes
- enable_sha224=yes
- enable_sha3=yes
- enable_sessioncerts=yes
- enable_keygen=yes
- enable_certgen=yes
- enable_certreq=yes
- enable_certext=yes
- enable_sep=yes
- enable_hkdf=yes
- enable_dsa=yes
- enable_ecccustcurves=yes
- enable_compkey=yes
- enable_curve25519=yes
- enable_curve448=yes
- enable_ed25519=yes
- enable_fpecc=yes
- enable_eccencrypt=yes
- enable_psk=yes
- enable_idea=yes
- enable_cmac=yes
- enable_xts=yes
- enable_webserver=yes
- enable_hc128=yes
- enable_rabbit=yes
- enable_ocsp=yes
- enable_ocspstapling=yes
- enable_ocspstapling2=yes
- enable_crl=yes
- enable_crl_monitor=yes
- enable_sni=yes
- enable_maxfragment=yes
- enable_alpn=yes
- enable_truncatedhmac=yes
- enable_trusted_ca=yes
- enable_supportedcurves=yes
- enable_session_ticket=yes
- enable_tlsx=yes
- enable_pkcs7=yes
- enable_ssh=yes
- enable_scep=yes
- enable_srp=yes
- enable_certservice=yes
- enable_jni=yes
- enable_lighty=yes
- enable_haproxy=yes
- enable_stunnel=yes
- enable_nginx=yes
- enable_openvpn=yes
- enable_asio=yes
- enable_libwebsockets=yes
- enable_qt=yes
- enable_pwdbased=yes
- enable_aeskeywrap=yes
- enable_x963kdf=yes
- enable_scrypt=yes
- enable_indef=yes
- enable_enckeys=yes
- enable_hashflags=yes
- enable_dhdefaultparams=yes
-
- # Enable AES Decrypt, AES ECB, Alt Names, DER Load, Keep Certs, CRL IO with Timeout
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_DECRYPT -DHAVE_AES_ECB -DWOLFSSL_ALT_NAMES -DWOLFSSL_DER_LOAD -DKEEP_OUR_CERT -DKEEP_PEER_CERT -DHAVE_CRL_IO -DHAVE_IO_TIMEOUT"
-
- # Enable DH const table speedups (eliminates `-lm` math lib dependency)
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FFDHE_2048 -DHAVE_FFDHE_3072 -DFP_MAX_BITS=8192"
-
- # Enable ECC Key Gen / Import checks
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_VALIDATE_ECC_IMPORT -DWOLFSSL_VALIDATE_ECC_KEYGEN"
-
- # Enable multiple attribute additions such as DC
- AM_CFLAGS="-DWOLFSSL_MULTI_ATTRIB $AM_CFLAGS"
-fi
-
-
-# Support for forcing 32-bit mode
-# To force 32-bit instructions use:
-# ./configure CFLAGS="-m32" LDFLAGS="-m32" && make
-# The checks for sizeof long and long/long are run at the top of configure and require "-m32" to be set directly in the ./configure statement.
-# Check whether --enable-32bit was given.
-if test "${enable_32bit+set}" = set; then :
- enableval=$enable_32bit; ENABLED_32BIT=$enableval
-else
- ENABLED_32BIT=no
-
-fi
-
-
-# 16-bit compiler support
-# Check whether --enable-16bit was given.
-if test "${enable_16bit+set}" = set; then :
- enableval=$enable_16bit; ENABLED_16BIT=$enableval
-else
- ENABLED_16BIT=no
-
-fi
-
-if test "$ENABLED_16BIT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWC_16BIT_CPU"
-fi
-
-
-
-# Support for disabling all ASM
-# Check whether --enable-asm was given.
-if test "${enable_asm+set}" = set; then :
- enableval=$enable_asm; ENABLED_ASM=$enableval
-else
- ENABLED_ASM=yes
-
-fi
-
-
-if test "$ENABLED_ASM" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DTFM_NO_ASM -DWOLFSSL_NO_ASM"
-fi
-
-
-# SINGLE THREADED
-# Check whether --enable-singlethreaded was given.
-if test "${enable_singlethreaded+set}" = set; then :
- enableval=$enable_singlethreaded; ENABLED_SINGLETHREADED=$enableval
-else
- ENABLED_SINGLETHREADED=no
-fi
-
-
-if test "x$ENABLED_SINGLETHREADED" = "xno" ; then :
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-ax_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on Tru64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
- ax_pthread_save_CC="$CC"
- ax_pthread_save_CFLAGS="$CFLAGS"
- ax_pthread_save_LIBS="$LIBS"
- if test "x$PTHREAD_CC" != "x"; then :
- CC="$PTHREAD_CC"
-fi
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
-$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_join ();
-int
-main ()
-{
-return pthread_join ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
-$as_echo "$ax_pthread_ok" >&6; }
- if test "x$ax_pthread_ok" = "xno"; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- CC="$ax_pthread_save_CC"
- CFLAGS="$ax_pthread_save_CFLAGS"
- LIBS="$ax_pthread_save_LIBS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
-# (Note: HP C rejects this with "bad form for `-t' option")
-# -pthreads: Solaris/gcc (Note: HP C also rejects)
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads and
-# -D_REENTRANT too), HP C (must be checked before -lpthread, which
-# is present but should not be used directly; and before -mthreads,
-# because the compiler interprets this as "-mt" + "-hreads")
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case $host_os in
-
- freebsd*)
-
- # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
- # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-
- ax_pthread_flags="-kthread lthread $ax_pthread_flags"
- ;;
-
- hpux*)
-
- # From the cc(1) man page: "[-mt] Sets various -D flags to enable
- # multi-threading and also sets -lpthread."
-
- ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
- ;;
-
- openedition*)
-
- # IBM z/OS requires a feature-test macro to be defined in order to
- # enable POSIX threads at all, so give the user a hint if this is
- # not set. (We don't define these ourselves, as they can affect
- # other portions of the system API in unpredictable ways.)
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
- AX_PTHREAD_ZOS_MISSING
-# endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
-$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
-fi
-rm -f conftest*
-
- ;;
-
- solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (N.B.: The stubs are missing
- # pthread_cleanup_push, or rather a function called by this macro,
- # so we could check for that, but who knows whether they'll stub
- # that too in a future libc.) So we'll check first for the
- # standard Solaris way of linking pthreads (-mt -lpthread).
-
- ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
- ;;
-esac
-
-# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
-
-if test "x$GCC" = "xyes"; then :
- ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
-fi
-
-# The presence of a feature test macro requesting re-entrant function
-# definitions is, on some systems, a strong hint that pthreads support is
-# correctly enabled
-
-case $host_os in
- darwin* | hpux* | linux* | osf* | solaris*)
- ax_pthread_check_macro="_REENTRANT"
- ;;
-
- aix*)
- ax_pthread_check_macro="_THREAD_SAFE"
- ;;
-
- *)
- ax_pthread_check_macro="--"
- ;;
-esac
-if test "x$ax_pthread_check_macro" = "x--"; then :
- ax_pthread_check_cond=0
-else
- ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
-fi
-
-# Are we compiling with Clang?
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
-$as_echo_n "checking whether $CC is Clang... " >&6; }
-if ${ax_cv_PTHREAD_CLANG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ax_cv_PTHREAD_CLANG=no
- # Note that Autoconf sets GCC=yes for Clang as well as GCC
- if test "x$GCC" = "xyes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
-# if defined(__clang__) && defined(__llvm__)
- AX_PTHREAD_CC_IS_CLANG
-# endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
- ax_cv_PTHREAD_CLANG=yes
-fi
-rm -f conftest*
-
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
-$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
-ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
-
-ax_pthread_clang_warning=no
-
-# Clang needs special handling, because older versions handle the -pthread
-# option in a rather... idiosyncratic way
-
-if test "x$ax_pthread_clang" = "xyes"; then
-
- # Clang takes -pthread; it has never supported any other flag
-
- # (Note 1: This will need to be revisited if a system that Clang
- # supports has POSIX threads in a separate library. This tends not
- # to be the way of modern systems, but it's conceivable.)
-
- # (Note 2: On some systems, notably Darwin, -pthread is not needed
- # to get POSIX threads support; the API is always present and
- # active. We could reasonably leave PTHREAD_CFLAGS empty. But
- # -pthread does define _REENTRANT, and while the Darwin headers
- # ignore this macro, third-party headers might not.)
-
- PTHREAD_CFLAGS="-pthread"
- PTHREAD_LIBS=
-
- ax_pthread_ok=yes
-
- # However, older versions of Clang make a point of warning the user
- # that, in an invocation where only linking and no compilation is
- # taking place, the -pthread option has no effect ("argument unused
- # during compilation"). They expect -pthread to be passed in only
- # when source code is being compiled.
- #
- # Problem is, this is at odds with the way Automake and most other
- # C build frameworks function, which is that the same flags used in
- # compilation (CFLAGS) are also used in linking. Many systems
- # supported by AX_PTHREAD require exactly this for POSIX threads
- # support, and in fact it is often not straightforward to specify a
- # flag that is used only in the compilation phase and not in
- # linking. Such a scenario is extremely rare in practice.
- #
- # Even though use of the -pthread flag in linking would only print
- # a warning, this can be a nuisance for well-run software projects
- # that build with -Werror. So if the active version of Clang has
- # this misfeature, we search for an option to squash it.
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
-$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
-if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
- # Create an alternate version of $ac_link that compiles and
- # links in two steps (.c -> .o, .o -> exe) instead of one
- # (.c -> exe), because the warning occurs only in the second
- # step
- ax_pthread_save_ac_link="$ac_link"
- ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
- ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
- ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
- ax_pthread_save_CFLAGS="$CFLAGS"
- for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
- if test "x$ax_pthread_try" = "xunknown"; then :
- break
-fi
- CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
- ac_link="$ax_pthread_save_ac_link"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int main(void){return 0;}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_link="$ax_pthread_2step_ac_link"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int main(void){return 0;}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- break
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
- ac_link="$ax_pthread_save_ac_link"
- CFLAGS="$ax_pthread_save_CFLAGS"
- if test "x$ax_pthread_try" = "x"; then :
- ax_pthread_try=no
-fi
- ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
-$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
-
- case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
- no | unknown) ;;
- *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
- esac
-
-fi # $ax_pthread_clang = yes
-
-if test "x$ax_pthread_ok" = "xno"; then
-for ax_pthread_try_flag in $ax_pthread_flags; do
-
- case $ax_pthread_try_flag in
- none)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
- ;;
-
- -mt,pthread)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
-$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
- PTHREAD_CFLAGS="-mt"
- PTHREAD_LIBS="-lpthread"
- ;;
-
- -*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
-$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
- PTHREAD_CFLAGS="$ax_pthread_try_flag"
- ;;
-
- pthread-config)
- # Extract the first word of "pthread-config", so it can be a program name with args.
-set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ax_pthread_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ax_pthread_config"; then
- ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ax_pthread_config="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
-fi
-fi
-ax_pthread_config=$ac_cv_prog_ax_pthread_config
-if test -n "$ax_pthread_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
-$as_echo "$ax_pthread_config" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test "x$ax_pthread_config" = "xno"; then :
- continue
-fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
-$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
- PTHREAD_LIBS="-l$ax_pthread_try_flag"
- ;;
- esac
-
- ax_pthread_save_CFLAGS="$CFLAGS"
- ax_pthread_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
- static void routine(void *a) { a = 0; }
- static void *start_routine(void *a) { return a; }
-int
-main ()
-{
-pthread_t th; pthread_attr_t attr;
- pthread_create(&th, 0, start_routine, 0);
- pthread_join(th, 0);
- pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0) /* ; */
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- CFLAGS="$ax_pthread_save_CFLAGS"
- LIBS="$ax_pthread_save_LIBS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
-$as_echo "$ax_pthread_ok" >&6; }
- if test "x$ax_pthread_ok" = "xyes"; then :
- break
-fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$ax_pthread_ok" = "xyes"; then
- ax_pthread_save_CFLAGS="$CFLAGS"
- ax_pthread_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
-if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ax_cv_PTHREAD_JOINABLE_ATTR=unknown
- for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
-int attr = $ax_pthread_attr; return attr /* ; */
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
-$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
- if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
- test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
- test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
-_ACEOF
-
- ax_pthread_joinable_attr_defined=yes
-
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
-$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
-if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ax_cv_PTHREAD_SPECIAL_FLAGS=no
- case $host_os in
- solaris*)
- ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
- ;;
- esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
-$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
- if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
- test "x$ax_pthread_special_flags_added" != "xyes"; then :
- PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
- ax_pthread_special_flags_added=yes
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
-$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
-if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
-int i = PTHREAD_PRIO_INHERIT;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_cv_PTHREAD_PRIO_INHERIT=yes
-else
- ax_cv_PTHREAD_PRIO_INHERIT=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
-$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
- if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
- test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
-
-$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
-
- ax_pthread_prio_inherit_defined=yes
-
-fi
-
- CFLAGS="$ax_pthread_save_CFLAGS"
- LIBS="$ax_pthread_save_LIBS"
-
- # More AIX lossage: compile with *_r variant
- if test "x$GCC" != "xyes"; then
- case $host_os in
- aix*)
- case "x/$CC" in #(
- x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
- #handle absolute path differently from PATH based program lookup
- case "x$CC" in #(
- x/*) :
- if as_fn_executable_p ${CC}_r; then :
- PTHREAD_CC="${CC}_r"
-fi ;; #(
- *) :
- for ac_prog in ${CC}_r
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PTHREAD_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PTHREAD_CC"; then
- ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PTHREAD_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$PTHREAD_CC" && break
-done
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
- ;;
-esac ;; #(
- *) :
- ;;
-esac
- ;;
- esac
- fi
-fi
-
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
-
-
-
-
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test "x$ax_pthread_ok" = "xyes"; then
-
-
-$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
-
- # If AX_PTHREAD is adding -Qunused-arguments, need to prepend with -Xcompiler libtool will use it. Newer
- # versions of clang don't need the -Q flag when using pthreads.
- case $PTHREAD_CFLAGS in #(
- -Qunused-arguments*) :
- PTHREAD_CFLAGS="-Xcompiler $PTHREAD_CFLAGS" ;; #(
- *) :
- ;;
-esac
- AM_CFLAGS="-D_POSIX_THREADS $AM_CFLAGS $PTHREAD_CFLAGS"
- LIBS="$LIBS $PTHREAD_LIBS"
-
- :
-else
- ax_pthread_ok=no
-
- ENABLED_SINGLETHREADED=yes
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-fi
-
-if test "x$ENABLED_SINGLETHREADED" = "xyes" ; then :
- AM_CFLAGS="-DSINGLE_THREADED $AM_CFLAGS"
-fi
-
-
-# DTLS
-# Check whether --enable-dtls was given.
-if test "${enable_dtls+set}" = set; then :
- enableval=$enable_dtls; ENABLED_DTLS=$enableval
-else
- ENABLED_DTLS=no
-
-fi
-
-if test "$ENABLED_DTLS" = "yes"
-then
- AM_CFLAGS="-DWOLFSSL_DTLS $AM_CFLAGS"
-fi
-
-# DTLS change MTU
-# Check whether --enable-dtls-mtu was given.
-if test "${enable_dtls_mtu+set}" = set; then :
- enableval=$enable_dtls_mtu; ENABLED_DTLS_MTU=$enableval
-else
- ENABLED_DTLS_MTU=no
-
-fi
-
-if test "$ENABLED_DTLS_MTU" = "yes"
-then
- AM_CFLAGS="-DWOLFSSL_DTLS_MTU $AM_CFLAGS"
-fi
-
-
-# TLS v1.3 Draft 18 (Note: only final TLS v1.3 supported, here for backwards build compatibility)
-# Check whether --enable-tls13-draft18 was given.
-if test "${enable_tls13_draft18+set}" = set; then :
- enableval=$enable_tls13_draft18; ENABLED_TLS13_DRAFT18=$enableval
-else
- ENABLED_TLS13_DRAFT18=no
-
-fi
-
-
-# TLS v1.3
-# Check whether --enable-tls13 was given.
-if test "${enable_tls13+set}" = set; then :
- enableval=$enable_tls13; ENABLED_TLS13=$enableval
-else
- ENABLED_TLS13=yes
-
-fi
-
-if test "x$FIPS_VERSION" = "xv1"
-then
- ENABLED_TLS13="no"
-fi
-
-# Post-handshake Authentication
-# Check whether --enable-postauth was given.
-if test "${enable_postauth+set}" = set; then :
- enableval=$enable_postauth; ENABLED_TLS13_POST_AUTH=$enableval
-else
- ENABLED_TLS13_POST_AUTH=no
-
-fi
-
-if test "$ENABLED_TLS13_POST_AUTH" = "yes"
-then
- if test "x$ENABLED_TLS13" = "xno"
- then
- as_fn_error $? "cannot enable postauth without enabling tls13." "$LINENO" 5
- fi
- AM_CFLAGS="-DWOLFSSL_POST_HANDSHAKE_AUTH $AM_CFLAGS"
-fi
-
-
-# Hello Retry Request Cookie
-# Check whether --enable-hrrcookie was given.
-if test "${enable_hrrcookie+set}" = set; then :
- enableval=$enable_hrrcookie; ENABLED_SEND_HRR_COOKIE=$enableval
-else
- ENABLED_SEND_HRR_COOKIE=no
-
-fi
-
-if test "$ENABLED_SEND_HRR_COOKIE" = "yes"
-then
- if test "x$ENABLED_TLS13" = "xno"
- then
- as_fn_error $? "cannot enable hrrcookie without enabling tls13." "$LINENO" 5
- fi
- AM_CFLAGS="-DWOLFSSL_SEND_HRR_COOKIE $AM_CFLAGS"
-fi
-
-
-# RNG
-# Check whether --enable-rng was given.
-if test "${enable_rng+set}" = set; then :
- enableval=$enable_rng; ENABLED_RNG=$enableval
-else
- ENABLED_RNG=yes
-
-fi
-
-
-if test "$ENABLED_RNG" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DWC_NO_RNG"
-fi
-
-
-# DTLS-SCTP
-# Check whether --enable-sctp was given.
-if test "${enable_sctp+set}" = set; then :
- enableval=$enable_sctp; ENABLED_SCTP=$enableval
-else
- ENABLED_SCTP=no
-fi
-
-
-if test "x$ENABLED_SCTP" = "xyes"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCTP" >&5
-$as_echo_n "checking for SCTP... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include
-#include
-
-int
-main ()
-{
-int s = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP); if (s == -1) return 1;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "SCTP not available, remove enable-sctp from configure" "$LINENO" 5
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-
-
-# DTLS-MULTICAST
-# Check whether --enable-mcast was given.
-if test "${enable_mcast+set}" = set; then :
- enableval=$enable_mcast; ENABLED_MCAST=$enableval
-else
- ENABLED_MCAST=no
-fi
-
-
-
-# List of open source project defines using our openssl compatibility layer:
-# openssh (--enable-openssh) WOLFSSL_OPENSSH
-# openvpn (--enable-openvpn) WOLFSSL_OPENVPN
-# nginix (--enable-nginx) WOLFSSL_NGINX
-# haproxy (--enable-haproxy) WOLFSSL_HAPROXY
-# wpa_supplicant (--enable-wpas) WOLFSSL_WPAS
-# ssl fortress (--enable-fortress) FORTRESS
-# ssl bump (--enable-bump)
-# signal (--enable-signal)
-# lighty (--enable-lighty) HAVE_LIGHTY
-# stunnel (--enable-stunnel) HAVE_STUNNEL
-# asio (--enable-asio) WOLFSSL_ASIO
-# libwebsockets (--enable-libwebsockets) WOLFSSL_LIBWEBSOCKETS
-# qt (--enable-qt) WOLFSSL_QT
-# qt test (--enable-qt-test) WOLFSSL_QT_TEST
-# HAVE_POCO_LIB
-# WOLFSSL_MYSQL_COMPATIBLE
-# web server (--enable-webserver) HAVE_WEBSERVER
-
-
-# OpenSSH compatibility Build
-# Check whether --enable-openssh was given.
-if test "${enable_openssh+set}" = set; then :
- enableval=$enable_openssh; ENABLED_OPENSSH=$enableval
-else
- ENABLED_OPENSSH=no
-fi
-
-
-# OpenVPN compatibility Build
-# Check whether --enable-openvpn was given.
-if test "${enable_openvpn+set}" = set; then :
- enableval=$enable_openvpn; ENABLED_OPENVPN=$enableval
-else
- ENABLED_OPENVPN=no
-fi
-
-
-# nginx compatibility build
-# Check whether --enable-nginx was given.
-if test "${enable_nginx+set}" = set; then :
- enableval=$enable_nginx; ENABLED_NGINX=$enableval
-else
- ENABLED_NGINX=no
-
-fi
-
-
-# haproxy compatibility build
-# Check whether --enable-haproxy was given.
-if test "${enable_haproxy+set}" = set; then :
- enableval=$enable_haproxy; ENABLED_HAPROXY=$enableval
-else
- ENABLED_HAPROXY=no
-
-fi
-
-
-# wpa_supplicant support
-# Check whether --enable-wpas was given.
-if test "${enable_wpas+set}" = set; then :
- enableval=$enable_wpas; ENABLED_WPAS=$enableval
-else
- ENABLED_WPAS=no
-
-fi
-
-
-# wpa_supplicant support
-# Check whether --enable-wpas-dpp was given.
-if test "${enable_wpas_dpp+set}" = set; then :
- enableval=$enable_wpas_dpp; ENABLED_WPAS_DPP=$enableval
-else
- ENABLED_WPAS_DPP=no
-
-fi
-
-
-if test "$ENABLED_WPAS_DPP" = "yes"
-then
- ENABLED_WPAS="yes"
-fi
-
-# Fortress build
-# Check whether --enable-fortress was given.
-if test "${enable_fortress+set}" = set; then :
- enableval=$enable_fortress; ENABLED_FORTRESS=$enableval
-else
- ENABLED_FORTRESS=no
-
-fi
-
-
-# libwebsockets Support
-# Check whether --enable-libwebsockets was given.
-if test "${enable_libwebsockets+set}" = set; then :
- enableval=$enable_libwebsockets; ENABLED_LIBWEBSOCKETS=$enableval
-else
- ENABLED_LIBWEBSOCKETS=no
-
-fi
-
-if test "$ENABLED_LIBWEBSOCKETS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_LIBWEBSOCKETS -DHAVE_EX_DATA -DOPENSSL_NO_EC"
-fi
-
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_FORTRESS="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_OPENSSH -DHAVE_EX_DATA -DWOLFSSL_BASE16"
-fi
-
-#IP alternative name Support
-# Check whether --enable-ip-alt-name was given.
-if test "${enable_ip_alt_name+set}" = set; then :
- enableval=$enable_ip_alt_name; ENABLE_IP_ALT_NAME=$enableval
-else
- ENABLE_IP_ALT_NAME=no
-
-fi
-
-
-if test "$ENABLE_IP_ALT_NAME" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_IP_ALT_NAME"
-fi
-
-#Qt Support
-# Check whether --enable-qt was given.
-if test "${enable_qt+set}" = set; then :
- enableval=$enable_qt; ENABLED_QT=$enableval
-else
- ENABLED_QT=no
-
-fi
-
-
-# ssl bump build
-# Check whether --enable-bump was given.
-if test "${enable_bump+set}" = set; then :
- enableval=$enable_bump; ENABLED_BUMP=$enableval
-else
- ENABLED_BUMP=no
-
-fi
-
-
-# SNIFFER
-# Check whether --enable-sniffer was given.
-if test "${enable_sniffer+set}" = set; then :
- enableval=$enable_sniffer; ENABLED_SNIFFER=$enableval
-else
- ENABLED_SNIFFER=no
-
-fi
-
-
-# signal compatibility build
-# Check whether --enable-signal was given.
-if test "${enable_signal+set}" = set; then :
- enableval=$enable_signal; ENABLED_SIGNAL=$enableval
-else
- ENABLED_SIGNAL=no
-
-fi
-
-
-# OpenSSL Coexist
-# Check whether --enable-opensslcoexist was given.
-if test "${enable_opensslcoexist+set}" = set; then :
- enableval=$enable_opensslcoexist; ENABLED_OPENSSLCOEXIST=$enableval
-else
- ENABLED_OPENSSLCOEXIST=no
-
-fi
-
-if test "x$ENABLED_OPENSSLCOEXIST" = "xyes"
-then
- # make sure old names are disabled
- enable_oldnames=no
-
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_COEXIST"
-fi
-
-
-# OPENSSL Compatibility ALL
-# Check whether --enable-opensslall was given.
-if test "${enable_opensslall+set}" = set; then :
- enableval=$enable_opensslall; ENABLED_OPENSSLALL=$enableval
-else
- ENABLED_OPENSSLALL=no
-
-fi
-
-if test "$ENABLED_LIBWEBSOCKETS" = "yes" || test "$ENABLED_OPENVPN" = "yes" || test "$ENABLED_WPAS_DPP" = "yes"
-then
- ENABLED_OPENSSLALL="yes"
-fi
-
-if test "$ENABLED_OPENSSLALL" = "yes"
-then
-AM_CFLAGS="-DOPENSSL_ALL -DWOLFSSL_EITHER_SIDE -DWC_RSA_NO_PADDING -DWC_RSA_PSS $AM_CFLAGS"
-fi
-
-# OPENSSL Extra Compatibility
-# Check whether --enable-opensslextra was given.
-if test "${enable_opensslextra+set}" = set; then :
- enableval=$enable_opensslextra; ENABLED_OPENSSLEXTRA=$enableval
-else
- ENABLED_OPENSSLEXTRA=no
-
-fi
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_NGINX" = "yes" || test "$ENABLED_SIGNAL" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_FORTRESS" = "yes" || test "$ENABLED_BUMP" = "yes" || test "$ENABLED_SNIFFER" = "yes" || test "$ENABLED_OPENSSLALL" = "yes" || test "$ENABLED_LIBWEBSOCKETS" = "yes"
-then
- ENABLED_OPENSSLEXTRA="yes"
-fi
-
-if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
-then
- AM_CFLAGS="-DOPENSSL_EXTRA -DWOLFSSL_ALWAYS_VERIFY_CB $AM_CFLAGS"
- AM_CFLAGS="-DWOLFSSL_VERIFY_CB_ALL_CERTS -DWOLFSSL_EXTRA_ALERTS $AM_CFLAGS"
- AM_CFLAGS="-DHAVE_EXT_CACHE $AM_CFLAGS"
-fi
-
-if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "$ENABLED_SMALL" = "yes"
-then
- as_fn_error $? "cannot enable small and opensslextra, only one or the other." "$LINENO" 5
-fi
-
-if test "$ENABLED_OPENSSLEXTRA" = "x509small"
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling only a subset of X509 opensslextra" >&5
-$as_echo "$as_me: Enabling only a subset of X509 opensslextra" >&6;}
- AM_CFLAGS="-DOPENSSL_EXTRA_X509_SMALL $AM_CFLAGS"
- AM_CFLAGS="-DWOLFSSL_EKU_OID -DWOLFSSL_MULTI_ATTRIB $AM_CFLAGS"
-fi
-
-# High Strength Build
-# Check whether --enable-maxstrength was given.
-if test "${enable_maxstrength+set}" = set; then :
- enableval=$enable_maxstrength; ENABLED_MAXSTRENGTH=$enableval
-else
- ENABLED_MAXSTRENGTH=no
-fi
-
-
-
-# Harden, enable Timing Resistance and Blinding by default
-# Check whether --enable-harden was given.
-if test "${enable_harden+set}" = set; then :
- enableval=$enable_harden; ENABLED_HARDEN=$enableval
-else
- ENABLED_HARDEN=yes
-fi
-
-
-if test "$ENABLED_HARDEN" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DTFM_TIMING_RESISTANT -DECC_TIMING_RESISTANT"
- if test "$ENABLED_RNG" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWC_RSA_BLINDING"
- fi
-else
- AM_CFLAGS="$AM_CFLAGS -DWC_NO_HARDEN"
-fi
-
-
-# IPv6 Test Apps
-# Check whether --enable-ipv6 was given.
-if test "${enable_ipv6+set}" = set; then :
- enableval=$enable_ipv6; ENABLED_IPV6=$enableval
-else
- ENABLED_IPV6=no
-
-fi
-
-
-if test "$ENABLED_IPV6" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DTEST_IPV6 -DWOLFSSL_IPV6"
-fi
-
-
-if test "$ENABLED_WPAS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SECRET_CALLBACK -DWOLFSSL_STATIC_RSA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PUBLIC_MP -DWOLFSSL_PUBLIC_ECC_ADD_DBL"
- AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER -DHAVE_EX_DATA -DWOLFSSL_KEEP_PEER_CERT"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_EXT_CACHE"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_VERIFY_CB"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT -DWOLFSSL_DER_LOAD"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN -DWOLFSSL_DES_ECB"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WPAS"
-fi
-
-if test "$ENABLED_WPAS" = "small"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_VERIFY_CB"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_KEEP_SNI"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_EX_DATA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_EITHER_SIDE"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WPAS_SMALL"
-fi
-
-if test "$ENABLED_FORTRESS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DFORTRESS -DWOLFSSL_ALWAYS_VERIFY_CB -DWOLFSSL_AES_COUNTER -DWOLFSSL_AES_DIRECT -DWOLFSSL_DER_LOAD -DWOLFSSL_KEY_GEN"
-fi
-
-
-if test "$ENABLED_BUMP" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DLARGE_STATIC_BUFFERS -DWOLFSSL_CERT_GEN -DWOLFSSL_KEY_GEN -DHUGE_SESSION_CACHE -DFP_MAX_BITS=8192 -DWOLFSSL_DER_LOAD -DWOLFSSL_ALT_NAMES -DWOLFSSL_TEST_CERT"
-fi
-
-ENABLED_SLOWMATH="yes"
-
-# lean psk build
-# Check whether --enable-leanpsk was given.
-if test "${enable_leanpsk+set}" = set; then :
- enableval=$enable_leanpsk; ENABLED_LEANPSK=$enableval
-else
- ENABLED_LEANPSK=no
-
-fi
-
-
-if test "$ENABLED_LEANPSK" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_LEANPSK -DWOLFSSL_STATIC_PSK -DHAVE_NULL_CIPHER -DSINGLE_THREADED -DNO_AES -DNO_FILESYSTEM -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS -DNO_PWDBASED -DNO_MD4 -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_WRITEV -DNO_DEV_RANDOM -DWOLFSSL_USER_IO -DNO_SHA"
- ENABLED_SLOWMATH="no"
- ENABLED_SINGLETHREADED="yes"
- enable_lowresource=yes
-fi
-
-
-# lean TLS build (TLS 1.2 client only (no client auth), ECC256, AES128 and SHA256 w/o Shamir)
-# Check whether --enable-leantls was given.
-if test "${enable_leantls+set}" = set; then :
- enableval=$enable_leantls; ENABLED_LEANTLS=$enableval
-else
- ENABLED_LEANTLS=no
-
-fi
-
-
-if test "$ENABLED_LEANTLS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_LEANTLS -DNO_WRITEV -DHAVE_ECC -DTFM_ECC256 -DECC_USER_CURVES -DNO_WOLFSSL_SERVER -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_PWDBASED -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_SHA -DNO_PSK -DNO_WOLFSSL_MEMORY -DNO_WOLFSSL_CM_VERIFY"
- enable_lowresource=yes
-fi
-
-
-# low resource options to reduce flash and memory use
-# Check whether --enable-lowresource was given.
-if test "${enable_lowresource+set}" = set; then :
- enableval=$enable_lowresource; ENABLED_LOWRESOURCE=$enableval
-else
- ENABLED_LOWRESOURCE=no
-
-fi
-
-
-if test "$ENABLED_LOWRESOURCE" = "yes"
-then
- # low memory / flash flags
- AM_CFLAGS="$AM_CFLAGS -DNO_SESSION_CACHE -DRSA_LOW_MEM -DALT_ECC_SIZE -DGCM_SMALL -DCURVE25519_SMALL -DED25519_SMALL -DWOLFSSL_SMALL_CERT_VERIFY"
-
- # low flash flags
- AM_CFLAGS="$AM_CFLAGS -DUSE_SLOW_SHA -DUSE_SLOW_SHA256 -DUSE_SLOW_SHA512"
-fi
-
-
-# TITAN cache
-# Check whether --enable-titancache was given.
-if test "${enable_titancache+set}" = set; then :
- enableval=$enable_titancache; ENABLED_TITANCACHE=$enableval
-else
- ENABLED_TITANCACHE=no
-
-fi
-
-
-if test "$ENABLED_TITANCACHE" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DTITAN_SESSION_CACHE"
-fi
-
-
-# HUGE cache
-# Check whether --enable-hugecache was given.
-if test "${enable_hugecache+set}" = set; then :
- enableval=$enable_hugecache; ENABLED_HUGECACHE=$enableval
-else
- ENABLED_HUGECACHE=no
-
-fi
-
-
-if test "$ENABLED_HUGECACHE" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHUGE_SESSION_CACHE"
-fi
-
-
-# big cache
-# Check whether --enable-bigcache was given.
-if test "${enable_bigcache+set}" = set; then :
- enableval=$enable_bigcache; ENABLED_BIGCACHE=$enableval
-else
- ENABLED_BIGCACHE=no
-
-fi
-
-
-if test "$ENABLED_BIGCACHE" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DBIG_SESSION_CACHE"
-fi
-
-
-# SMALL cache
-# Check whether --enable-smallcache was given.
-if test "${enable_smallcache+set}" = set; then :
- enableval=$enable_smallcache; ENABLED_SMALLCACHE=$enableval
-else
- ENABLED_SMALLCACHE=no
-
-fi
-
-
-if test "$ENABLED_SMALLCACHE" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DSMALL_SESSION_CACHE"
-fi
-
-
-# Persistent session cache
-# Check whether --enable-savesession was given.
-if test "${enable_savesession+set}" = set; then :
- enableval=$enable_savesession; ENABLED_SAVESESSION=$enableval
-else
- ENABLED_SAVESESSION=no
-
-fi
-
-
-if test "$ENABLED_SAVESESSION" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE"
-fi
-
-
-# Persistent cert cache
-# Check whether --enable-savecert was given.
-if test "${enable_savecert+set}" = set; then :
- enableval=$enable_savecert; ENABLED_SAVECERT=$enableval
-else
- ENABLED_SAVECERT=no
-
-fi
-
-
-if test "$ENABLED_SAVECERT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE"
-fi
-
-
-# Write duplicate WOLFSSL object
-# Check whether --enable-writedup was given.
-if test "${enable_writedup+set}" = set; then :
- enableval=$enable_writedup; ENABLED_WRITEDUP=$enableval
-else
- ENABLED_WRITEDUP=no
-
-fi
-
-
-if test "$ENABLED_WRITEDUP" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_WRITE_DUP"
-fi
-
-
-# Atomic User Record Layer
-# Check whether --enable-atomicuser was given.
-if test "${enable_atomicuser+set}" = set; then :
- enableval=$enable_atomicuser; ENABLED_ATOMICUSER=$enableval
-else
- ENABLED_ATOMICUSER=no
-
-fi
-
-
-if test "$ENABLED_ATOMICUSER" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER"
-fi
-
-
-# Public Key Callbacks
-# Check whether --enable-pkcallbacks was given.
-if test "${enable_pkcallbacks+set}" = set; then :
- enableval=$enable_pkcallbacks; ENABLED_PKCALLBACKS=$enableval
-else
- ENABLED_PKCALLBACKS=no
-
-fi
-
-
-if test "$ENABLED_PKCALLBACKS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS"
-fi
-
-
-# Microchip/Atmel CryptoAuthLib
-ENABLED_CRYPTOAUTHLIB="no"
-trylibatcadir=""
-
-# Check whether --with-cryptoauthlib was given.
-if test "${with_cryptoauthlib+set}" = set; then :
- withval=$with_cryptoauthlib;
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cryptoauthlib" >&5
-$as_echo_n "checking for cryptoauthlib... " >&6; }
- CPPFLAGS="$CPPFLAGS -DWOLFSSL_ATECC508A"
- LIBS="$LIBS -lcryptoauth"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
- atcab_init(0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- libatca_linked=yes
-else
- libatca_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$libatca_linked" = "xno" ; then
- if test "x$withval" != "xno" ; then
- trylibatcadir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- trylibatcadir="/usr"
- fi
-
- LDFLAGS="$LDFLAGS -L$trylibatcadir/lib"
- CPPFLAGS="$CPPFLAGS -I$trylibatcadir/lib"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
- atcab_init(0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- libatca_linked=yes
-else
- libatca_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$libatca_linked" = "xno" ; then
- as_fn_error $? "cryptoauthlib isn't found.
- If it's already installed, specify its path using --with-cryptoauthlib=/dir/" "$LINENO" 5
- fi
-
- AM_LDFLAGS="$AM_LDFLAGS -L$trylibatcadir/lib"
- AM_CFLAGS="$AM_CFLAGS -I$trylibatcadir/lib"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
-
- ENABLED_CRYPTOAUTHLIB="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ATECC508A"
-
-
-fi
-
-
-
-# sniffer doesn't work in maxstrength mode
-if test "$ENABLED_SNIFFER" = "yes" && test "$ENABLED_MAXSTRENGTH" = "yes"
-then
- as_fn_error $? "cannot enable maxstrength in sniffer mode." "$LINENO" 5
-fi
-
-ENABLED_SNIFFTEST=no
-if test "x$ENABLED_SNIFFER" = "xyes" ; then :
-
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SNIFFER -DWOLFSSL_STATIC_EPHEMERAL"
- for ac_header in pcap/pcap.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "pcap/pcap.h" "ac_cv_header_pcap_pcap_h" "$ac_includes_default"
-if test "x$ac_cv_header_pcap_pcap_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_PCAP_H 1
-_ACEOF
- ENABLED_SNIFFTEST=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable sniffer test without having libpcap available." >&5
-$as_echo "$as_me: WARNING: cannot enable sniffer test without having libpcap available." >&2;}
-
-fi
-
-done
-
-
-fi
-
-
-# AES-CBC
-# Check whether --enable-aescbc was given.
-if test "${enable_aescbc+set}" = set; then :
- enableval=$enable_aescbc; ENABLED_AESCBC=$enableval
-else
- ENABLED_AESCBC=yes
-
-fi
-
-
-if test "$ENABLED_AESCBC" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_AES_CBC"
-fi
-
-# leanpsk and leantls don't need gcm
-
-# AES-GCM
-# Check whether --enable-aesgcm was given.
-if test "${enable_aesgcm+set}" = set; then :
- enableval=$enable_aesgcm; ENABLED_AESGCM=$enableval
-else
- ENABLED_AESGCM=yes
-
-fi
-
-
-# leanpsk and leantls don't need gcm
-if test "$ENABLED_LEANPSK" = "yes" || ( test "$ENABLED_LEANTLS" = "yes" &&
- test "$ENABLED_TLS13" = "no")
-then
- ENABLED_AESGCM=no
-fi
-
-if test "$ENABLED_AESGCM" != "no"
-then
- if test "$ENABLED_AESGCM" = "word32"
- then
- AM_CFLAGS="$AM_CFLAGS -DGCM_WORD32"
- ENABLED_AESGCM=yes
- fi
-
- if test "$ENABLED_AESGCM" = "small" || test "$ENABLED_LOWRESOURCE" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DGCM_SMALL"
- ENABLED_AESGCM=yes
- fi
-
- if test "$ENABLED_AESGCM" = "table"
- then
- AM_CFLAGS="$AM_CFLAGS -DGCM_TABLE"
- ENABLED_AESGCM=yes
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM"
-fi
-
-
-# AES-CCM
-# Check whether --enable-aesccm was given.
-if test "${enable_aesccm+set}" = set; then :
- enableval=$enable_aesccm; ENABLED_AESCCM=$enableval
-else
- ENABLED_AESCCM=no
-
-fi
-
-
-if test "$ENABLED_AESCCM" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM"
-fi
-
-
-# AES-CTR
-# Check whether --enable-aesctr was given.
-if test "${enable_aesctr+set}" = set; then :
- enableval=$enable_aesctr; ENABLED_AESCTR=$enableval
-else
- ENABLED_AESCTR=no
-
-fi
-
-if test "$ENABLED_OPENVPN" = "yes"
-then
- ENABLED_AESCTR=yes
-fi
-
-if test "$ENABLED_AESCTR" = "yes"
-then
- if test "x$ENABLED_FORTRESS" != "xyes"
- then
- # This is already implied by fortress build
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_COUNTER -DWOLFSSL_AES_DIRECT"
- fi
-fi
-
-
-# AES-OFB
-# Check whether --enable-aesofb was given.
-if test "${enable_aesofb+set}" = set; then :
- enableval=$enable_aesofb; ENABLED_AESOFB=$enableval
-else
- ENABLED_AESOFB=no
-
-fi
-
-
-if test "$ENABLED_AESOFB" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_OFB -DWOLFSSL_AES_DIRECT"
-fi
-
-
-# AES-CFB
-# Check whether --enable-aescfb was given.
-if test "${enable_aescfb+set}" = set; then :
- enableval=$enable_aescfb; ENABLED_AESCFB=$enableval
-else
- ENABLED_AESCFB=no
-
-fi
-
-
-if test "$ENABLED_AESCFB" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_CFB"
-fi
-
-
-# AES-ARM
-# Check whether --enable-armasm was given.
-if test "${enable_armasm+set}" = set; then :
- enableval=$enable_armasm; ENABLED_ARMASM=$enableval
-else
- ENABLED_ARMASM=no
-
-fi
-
-if test "$ENABLED_ARMASM" = "yes" && test "$ENABLED_ASM" = "yes"
-then
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_ARMASM"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ARMASM -DWOLFSSL_NO_HASH_RAW"
- #Check if mcpu and mfpu values already set if not use default
- case $CPPFLAGS in
- *mcpu* | *mfpu*)
- break;; #Do not override user set values
- *)
- case $host_cpu in
- *aarch64*)
- # +crypto needed for hardware acceleration
- AM_CPPFLAGS="$AM_CPPFLAGS -mcpu=generic+crypto"
- # Include options.h
- AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
-
- # Check for and set -mstrict-align compiler flag
- # Used to set assumption that Aarch64 systems will not handle
- # unaligned memory references. The flag -mstrict-align is needed
- # on some compiler versions to avoid an invalid addressing mode
- # error with "m" constraint variables in the inline assembly AES
- # code. Even though unaligned load/store access is permitted on
- # normal memory with Cortex-A series boards with the exception
- # being exclusive and ordered access.
- case $CPPFLAGS in
- *mstrict-align*)
- break;; # already set by user
- *)
- AM_CPPFLAGS="$AM_CPPFLAGS -mstrict-align"
- { $as_echo "$as_me:${as_lineno-$LINENO}: 64bit ARMv8, setting -mstrict-align" >&5
-$as_echo "$as_me: 64bit ARMv8, setting -mstrict-align" >&6;};;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: 64bit ARMv8 found, setting mcpu to generic+crypto" >&5
-$as_echo "$as_me: 64bit ARMv8 found, setting mcpu to generic+crypto" >&6;};;
- *)
- AM_CPPFLAGS="$AM_CPPFLAGS -mfpu=crypto-neon-fp-armv8"
- # Include options.h
- AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
- { $as_echo "$as_me:${as_lineno-$LINENO}: 32bit ARMv8 found, setting mfpu to crypto-neon-fp-armv8" >&5
-$as_echo "$as_me: 32bit ARMv8 found, setting mfpu to crypto-neon-fp-armv8" >&6;};;
- esac
- esac
-fi
-
-
-# Xilinx hardened crypto
-# Check whether --enable-xilinx was given.
-if test "${enable_xilinx+set}" = set; then :
- enableval=$enable_xilinx; ENABLED_XILINX=$enableval
-else
- ENABLED_XILINX=no
-
-fi
-
-if test "$ENABLED_XILINX" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_XILINX -DWOLFSSL_XILINX_CRYPT"
-fi
-
-
-# INTEL AES-NI
-# Check whether --enable-aesni was given.
-if test "${enable_aesni+set}" = set; then :
- enableval=$enable_aesni; ENABLED_AESNI=$enableval
-else
- ENABLED_AESNI=no
-
-fi
-
-
-# INTEL ASM
-# Check whether --enable-intelasm was given.
-if test "${enable_intelasm+set}" = set; then :
- enableval=$enable_intelasm; ENABLED_INTELASM=$enableval
-else
- ENABLED_INTELASM=no
-
-fi
-
-
-if test "$ENABLED_ASM" = "yes"
-then
- if test "$ENABLED_AESNI" = "small"
- then
- AM_CFLAGS="$AM_CFLAGS -DAES_GCM_AESNI_NO_UNROLL"
- ENABLED_AESNI=yes
- fi
-
- if test "$ENABLED_AESNI" = "yes" || test "$ENABLED_INTELASM" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AESNI"
- if test "$GCC" = "yes"
- then
- # GCC needs these flags, icc doesn't
- # opt levels greater than 2 may cause problems on systems w/o aesni
- if test "$CC" != "icc"
- then
- AM_CFLAGS="$AM_CFLAGS -maes -msse4 -mpclmul"
- fi
- fi
- if test "x$ENABLED_AESGCM" != "xno"; then :
- AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_AESGCM"
-fi
- fi
-
- if test "$ENABLED_INTELASM" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_INTEL_RDSEED -DUSE_INTEL_SPEEDUP"
- ENABLED_AESNI=yes
- fi
-fi
-
-# INTEL RDRAND
-# Check whether --enable-intelrand was given.
-if test "${enable_intelrand+set}" = set; then :
- enableval=$enable_intelrand; ENABLED_INTELRDRAND=$enableval
-else
- ENABLED_INTELRDRAND=no
-
-fi
-
-
-if test "$ENABLED_INTELRDRAND" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_INTEL_RDRAND"
-fi
-
-
-# Linux af_alg
-# Check whether --enable-afalg was given.
-if test "${enable_afalg+set}" = set; then :
- enableval=$enable_afalg; ENABLED_AFALG=$enableval
-else
- ENABLED_AFALG=no
-
-fi
-
-
-if test "$ENABLED_AFALG" = "yes"
-then
- if test "$ENABLED_AESCCM" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_HASH"
-fi
-
-if test "$ENABLED_AFALG" = "xilinx"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX -DWOLFSSL_AFALG_XILINX_AES"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX_SHA3 -DWOLFSSL_AFALG_XILINX_RSA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NOSHA3_224 -DWOLFSSL_NOSHA3_256 -DWOLFSSL_NOSHA3_512 -DWOLFSSL_NO_SHAKE256"
- ENABLED_AFALG="yes"
- ENABLED_XILINX="yes"
-fi
-
-if test "$ENABLED_AFALG" = "xilinx-aes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX -DWOLFSSL_AFALG_XILINX_AES"
- ENABLED_AFALG="yes"
- ENABLED_XILINX="yes"
-fi
-
-if test "$ENABLED_AFALG" = "xilinx-sha3"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX_SHA3"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NOSHA3_224 -DWOLFSSL_NOSHA3_256 -DWOLFSSL_NOSHA3_512 -DWOLFSSL_NO_SHAKE256"
- ENABLED_AFALG="yes"
- ENABLED_XILINX="yes"
-fi
-
-if test "$ENABLED_AFALG" = "xilinx-rsa"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX_RSA"
- ENABLED_AFALG="yes"
- ENABLED_XILINX="yes"
-fi
-
-
-# Support for Linux dev/crypto calls
-# Check whether --enable-devcrypto was given.
-if test "${enable_devcrypto+set}" = set; then :
- enableval=$enable_devcrypto; ENABLED_DEVCRYPTO=$enableval
-else
- ENABLED_DEVCRYPTO=no
-
-fi
-
-
-if test "$ENABLED_DEVCRYPTO" = "yes" || test "$ENABLED_DEVCRYPTO" = "all"
-then
- #enable all devcrypto supported algorithms
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_CBC"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_AES"
- if test "$ENABLED_AESCCM" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_HASH"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_HASH_RAW"
- ENABLED_DEVCRYPTO=yes
-fi
-if test "$ENABLED_DEVCRYPTO" = "aes"
-then
- #enable only AES-CBC algorithm support
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_AES"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_CBC"
- if test "$ENABLED_AESCCM" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
- fi
- ENABLED_DEVCRYPTO=yes
-fi
-if test "$ENABLED_DEVCRYPTO" = "cbc"
-then
- #enable only AES-CBC algorithm support
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_CBC"
- ENABLED_DEVCRYPTO=yes
-fi
-if test "$ENABLED_DEVCRYPTO" = "hash"
-then
- #enable only hash algorithm support
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_HASH"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_HASH_RAW"
- ENABLED_DEVCRYPTO=yes
-fi
-
-
-# Camellia
-# Check whether --enable-camellia was given.
-if test "${enable_camellia+set}" = set; then :
- enableval=$enable_camellia; ENABLED_CAMELLIA=$enableval
-else
- ENABLED_CAMELLIA=no
-
-fi
-
-
-if test "$ENABLED_CAMELLIA" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CAMELLIA"
-fi
-
-
-# MD2
-# Check whether --enable-md2 was given.
-if test "${enable_md2+set}" = set; then :
- enableval=$enable_md2; ENABLED_MD2=$enableval
-else
- ENABLED_MD2=no
-
-fi
-
-
-if test "$ENABLED_BUMP" = "yes"
-then
- ENABLED_MD2="yes"
-fi
-
-if test "$ENABLED_MD2" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_MD2"
-fi
-
-
-# NULL CIPHER
-# Check whether --enable-nullcipher was given.
-if test "${enable_nullcipher+set}" = set; then :
- enableval=$enable_nullcipher; ENABLED_NULL_CIPHER=$enableval
-else
- ENABLED_NULL_CIPHER=no
-
-fi
-
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_NULL_CIPHER="yes"
-fi
-
-if test "$ENABLED_NULL_CIPHER" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_NULL_CIPHER"
-fi
-
-# RIPEMD
-# Check whether --enable-ripemd was given.
-if test "${enable_ripemd+set}" = set; then :
- enableval=$enable_ripemd; ENABLED_RIPEMD=$enableval
-else
- ENABLED_RIPEMD=no
-
-fi
-
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_RIPEMD="yes"
-fi
-
-if test "$ENABLED_RIPEMD" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RIPEMD"
-fi
-
-
-# BLAKE2
-# Check whether --enable-blake2 was given.
-if test "${enable_blake2+set}" = set; then :
- enableval=$enable_blake2; ENABLED_BLAKE2=$enableval
-else
- ENABLED_BLAKE2=no
-
-fi
-
-
-if test "$ENABLED_BLAKE2" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2 -DHAVE_BLAKE2B"
-fi
-
-
-# Check whether --enable-blake2s was given.
-if test "${enable_blake2s+set}" = set; then :
- enableval=$enable_blake2s; ENABLED_BLAKE2S=$enableval
-else
- ENABLED_BLAKE2S=Sno
-
-fi
-
-
-if test "$ENABLED_BLAKE2S" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2S"
- ENABLED_BLAKE2="yes"
-fi
-
-
-# SHA512
-# Check whether --enable-sha512 was given.
-if test "${enable_sha512+set}" = set; then :
- enableval=$enable_sha512; ENABLED_SHA512=$enableval
-else
- ENABLED_SHA512=yes
-
-fi
-
-
-# options that don't require sha512
-if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes" || test "$ENABLED_32BIT" = "yes" || test "$ENABLED_16BIT" = "yes"
-then
- ENABLED_SHA512="no"
-fi
-
-# options that require sha512
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_FORTRESS" = "yes"
-then
- ENABLED_SHA512="yes"
- ENABLED_SHA384="yes"
-fi
-
-if test "$ENABLED_SHA512" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA512"
-fi
-
-
-# SHA384
-# Check whether --enable-sha384 was given.
-if test "${enable_sha384+set}" = set; then :
- enableval=$enable_sha384; ENABLED_SHA384=$enableval
-else
- ENABLED_SHA384=yes
-
-fi
-
-
-# options that don't require sha384
-if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes" || test "$ENABLED_32BIT" = "yes" || test "$ENABLED_16BIT" = "yes"
-then
- ENABLED_SHA384="no"
-fi
-
-# options that require sha384
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_FORTRESS" = "yes"
-then
- ENABLED_SHA384="yes"
-fi
-if test "$ENABLED_SHA384" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA384"
-fi
-
-
-# SESSION CERTS
-# Check whether --enable-sessioncerts was given.
-if test "${enable_sessioncerts+set}" = set; then :
- enableval=$enable_sessioncerts; ENABLED_SESSIONCERTS=$enableval
-else
- ENABLED_SESSIONCERTS=no
-
-fi
-
-
-if test "x$ENABLED_NGINX" = "xyes" || test "x$ENABLED_OPENVPN" = "xyes"
-then
- ENABLED_SESSIONCERTS=yes
-fi
-if test "$ENABLED_TLS13" = "yes" && test "$ENABLED_PSK" = "yes"
-then
- ENABLED_SESSIONCERTS=yes
-fi
-
-if test "$ENABLED_SESSIONCERTS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS"
-fi
-
-
-# KEY GENERATION
-# Check whether --enable-keygen was given.
-if test "${enable_keygen+set}" = set; then :
- enableval=$enable_keygen; ENABLED_KEYGEN=$enableval
-else
- ENABLED_KEYGEN=no
-
-fi
-
-
-if test "$ENABLED_KEYGEN" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN"
-fi
-
-
-# CERT GENERATION
-# Check whether --enable-certgen was given.
-if test "${enable_certgen+set}" = set; then :
- enableval=$enable_certgen; ENABLED_CERTGEN=$enableval
-else
- ENABLED_CERTGEN=no
-
-fi
-
-if test "$ENABLED_OPENVPN" = "yes" || test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_CERTGEN=yes
-fi
-
-if test "$ENABLED_CERTGEN" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
-fi
-
-
-# CERT REQUEST GENERATION
-# Check whether --enable-certreq was given.
-if test "${enable_certreq+set}" = set; then :
- enableval=$enable_certreq; ENABLED_CERTREQ=$enableval
-else
- ENABLED_CERTREQ=no
-
-fi
-
-
-if test "$ENABLED_CERTREQ" = "yes"
-then
- if test "$ENABLED_CERTGEN" = "no"
- then
- as_fn_error $? "cannot enable certreq without enabling certgen." "$LINENO" 5
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_REQ"
-fi
-
-
-# CERT REQUEST EXTENSION
-# Check whether --enable-certext was given.
-if test "${enable_certext+set}" = set; then :
- enableval=$enable_certext; ENABLED_CERTEXT=$enableval
-else
- ENABLED_CERTEXT=no
-
-fi
-
-if test "$ENABLED_OPENVPN" = "yes"
-then
- ENABLED_CERTEXT=yes
-fi
-
-if test "$ENABLED_CERTEXT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
-fi
-
-
-# DECODED CERT CACHE
-# Check whether --enable-certgencache was given.
-if test "${enable_certgencache+set}" = set; then :
- enableval=$enable_certgencache; ENABLED_certgencache=$enableval
-else
- ENABLED_certgencache=no
-
-fi
-
-
-if test "$ENABLED_certgencache" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN_CACHE"
-fi
-
-
-# SEP
-# Check whether --enable-sep was given.
-if test "${enable_sep+set}" = set; then :
- enableval=$enable_sep; ENABLED_SEP=$enableval
-else
- ENABLED_SEP=no
-
-fi
-
-if test "$ENABLED_SEP" = "yes"
-then
- AM_CFLAGS="-DWOLFSSL_SEP -DKEEP_PEER_CERT $AM_CFLAGS"
-fi
-
-
-# HKDF
-# Check whether --enable-hkdf was given.
-if test "${enable_hkdf+set}" = set; then :
- enableval=$enable_hkdf; ENABLED_HKDF=$enableval
-else
- ENABLED_HKDF=no
-
-fi
-
-if test "$ENABLED_TLS13" = "yes"
-then
- ENABLED_HKDF="yes"
-fi
-if test "$ENABLED_HKDF" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF"
-fi
-
-# X9.63 KDF
-# Check whether --enable-x963kdf was given.
-if test "${enable_x963kdf+set}" = set; then :
- enableval=$enable_x963kdf; ENABLED_X963KDF=$enableval
-else
- ENABLED_X963KDF=no
-
-fi
-
-if test "$ENABLED_X963KDF" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_X963_KDF"
-fi
-
-# DSA
-# Check whether --enable-dsa was given.
-if test "${enable_dsa+set}" = set; then :
- enableval=$enable_dsa; ENABLED_DSA=$enableval
-else
- ENABLED_DSA=no
-
-fi
-
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_OPENVPN" = "yes" || test "$ENABLED_NGINX" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_QT" = "yes"
-then
- ENABLED_DSA="yes"
-fi
-
-if test "$ENABLED_DSA" = "no" && test "$ENABLED_OPENSSH" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_DSA"
-fi
-
-# ECC Shamir
-# Check whether --enable-eccshamir was given.
-if test "${enable_eccshamir+set}" = set; then :
- enableval=$enable_eccshamir; ENABLED_ECC_SHAMIR=$enableval
-else
- ENABLED_ECC_SHAMIR=yes
-
-fi
-
-
-
-# ECC
-# Check whether --enable-ecc was given.
-if test "${enable_ecc+set}" = set; then :
- enableval=$enable_ecc; ENABLED_ECC=$enableval
-else
- ENABLED_ECC=yes
-
-fi
-
-
-# lean psk doesn't need ecc
-if test "$ENABLED_LEANPSK" = "yes"
-then
- ENABLED_ECC=no
-fi
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_NGINX" = "yes" || test "$ENABLED_SIGNAL" = "yes"
-then
- ENABLED_ECC="yes"
-fi
-
-if test "$ENABLED_ECC" != "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256"
- if test "$ENABLED_ECC_SHAMIR" = "yes" && test "$ENABLED_LOWRESOURCE" = "no"
- then
- AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"
- fi
-
- if test "$ENABLED_ECC" = "nonblock"
- then
- AM_CFLAGS="$AM_CFLAGS -DWC_ECC_NONBLOCK"
- fi
-fi
-
-
-# ECC Custom Curves
-# Check whether --enable-ecccustcurves was given.
-if test "${enable_ecccustcurves+set}" = set; then :
- enableval=$enable_ecccustcurves; ENABLED_ECCCUSTCURVES=$enableval
-else
- ENABLED_ECCCUSTCURVES=no
-
-fi
-
-
-if test "$ENABLED_ECCCUSTCURVES" != "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CUSTOM_CURVES"
-
- # For distro, all or ecccustcurves=all builds, enable all curve types
- if test "$ENABLED_DISTRO" = "yes" || test "$ENABLED_ALL" = "yes" || test "$ENABLED_ECCCUSTCURVES" = "all"
- then
- # Enable ECC SECPR2, SECPR3, BRAINPOOL and KOBLITZ curves
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_SECPR2 -DHAVE_ECC_SECPR3 -DHAVE_ECC_BRAINPOOL -DHAVE_ECC_KOBLITZ"
-
- # Enable ECC Cofactor support
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_CDH"
-
- # If fastmath enabled and on x86 use speedups
- if test "x$ENABLED_FASTMATH" = "xyes" && test "$host_cpu" = "x86_64"
- then
- AM_CFLAGS="$AM_CFLAGS -DTFM_ECC192 -DTFM_ECC224 -DTFM_ECC256 -DTFM_ECC384 -DTFM_ECC521"
- fi
- fi
-fi
-
-
-# Compressed Key
-# Check whether --enable-compkey was given.
-if test "${enable_compkey+set}" = set; then :
- enableval=$enable_compkey; ENABLED_COMPKEY=$enableval
-else
- ENABLED_COMPKEY=no
-
-fi
-
-
-if test "$ENABLED_WPAS" = "yes"
-then
- ENABLED_COMPKEY=yes
-fi
-if test "$ENABLED_COMPKEY" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_COMP_KEY"
-fi
-
-
-# for using memory optimization setting on both curve25519 and ed25519
-ENABLED_CURVE25519_SMALL=no
-ENABLED_ED25519_SMALL=no
-
-# CURVE25519
-# Check whether --enable-curve25519 was given.
-if test "${enable_curve25519+set}" = set; then :
- enableval=$enable_curve25519; ENABLED_CURVE25519=$enableval
-else
- ENABLED_CURVE25519=no
-
-fi
-
-
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_CURVE25519="yes"
-fi
-
-if test "$ENABLED_CURVE25519" != "no"
-then
- if test "$ENABLED_CURVE25519" = "small" || test "$ENABLED_LOWRESOURCE" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DCURVE25519_SMALL"
- ENABLED_CURVE25519_SMALL=yes
- ENABLED_CURVE25519=yes
- fi
-
- if test "$ENABLED_CURVE25519" = "no128bit" || test "$ENABLED_32BIT" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_CURVED25519_128BIT"
- ENABLED_CURVE25519=yes
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CURVE25519"
- ENABLED_FEMATH=yes
-fi
-
-
-# ED25519
-# Check whether --enable-ed25519 was given.
-if test "${enable_ed25519+set}" = set; then :
- enableval=$enable_ed25519; ENABLED_ED25519=$enableval
-else
- ENABLED_ED25519=no
-
-fi
-
-
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_ED25519="yes"
-fi
-
-if test "$ENABLED_ED25519" != "no" && test "$ENABLED_32BIT" = "no"
-then
- if test "$ENABLED_ED25519" = "small" || test "$ENABLED_LOWRESOURCE" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DED25519_SMALL"
- ENABLED_ED25519_SMALL=yes
- ENABLED_CURVE25519_SMALL=yes
- ENABLED_ED25519=yes
- fi
-
- if test "$ENABLED_SHA512" = "no"
- then
- as_fn_error $? "cannot enable ed25519 without enabling sha512." "$LINENO" 5
- fi
- ENABLED_FEMATH=yes
- ENABLED_GEMATH=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ED25519"
-fi
-
-
-# for using memory optimization setting on both curve448 and ed448
-ENABLED_CURVE448_SMALL=no
-ENABLED_ED448_SMALL=no
-
-# CURVE448
-# Check whether --enable-curve448 was given.
-if test "${enable_curve448+set}" = set; then :
- enableval=$enable_curve448; ENABLED_CURVE448=$enableval
-else
- ENABLED_CURVE448=no
-
-fi
-
-
-if test "$ENABLED_CURVE448" != "no"
-then
- if test "$ENABLED_CURVE448" = "small" || test "$ENABLED_LOWRESOURCE" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DCURVE448_SMALL"
- ENABLED_CURVE448_SMALL=yes
- ENABLED_CURVE448=yes
- fi
-
- if test "$ENABLED_CURVE448" = "no128bit" || test "$ENABLED_32BIT" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_CURVED448_128BIT"
- ENABLED_CURVE448=yes
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CURVE448"
- ENABLED_FE448=yes
-fi
-
-# ED448
-# Check whether --enable-ed448 was given.
-if test "${enable_ed448+set}" = set; then :
- enableval=$enable_ed448; ENABLED_ED448=$enableval
-else
- ENABLED_ED448=no
-
-fi
-
-
-if test "$ENABLED_ED448" != "no" && test "$ENABLED_32BIT" = "no"
-then
- if test "$ENABLED_ED448" = "small" || test "$ENABLED_LOWRESOURCE" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DED448_SMALL"
- ENABLED_ED448_SMALL=yes
- ENABLED_CURVE448_SMALL=yes
- ENABLED_ED448=yes
- fi
-
- if test "$ENABLED_SHA512" = "no"
- then
- as_fn_error $? "cannot enable ed448 without enabling sha512." "$LINENO" 5
- fi
- ENABLED_FE448=yes
- ENABLED_GE448=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ED448"
-
- # EdDSA448 requires SHAKE256 which requires SHA-3
- ENABLED_SHAKE3=yes
- ENABLED_SHAKE256=yes
-fi
-
-
-
-# FP ECC, Fixed Point cache ECC
-# Check whether --enable-fpecc was given.
-if test "${enable_fpecc+set}" = set; then :
- enableval=$enable_fpecc; ENABLED_FPECC=$enableval
-else
- ENABLED_FPECC=no
-
-fi
-
-
-if test "$ENABLED_FPECC" = "yes"
-then
- if test "$ENABLED_ECC" = "no"
- then
- as_fn_error $? "cannot enable fpecc without enabling ecc." "$LINENO" 5
- fi
- AM_CFLAGS="$AM_CFLAGS -DFP_ECC"
-fi
-
-
-# ECC encrypt
-# Check whether --enable-eccencrypt was given.
-if test "${enable_eccencrypt+set}" = set; then :
- enableval=$enable_eccencrypt; ENABLED_ECC_ENCRYPT=$enableval
-else
- ENABLED_ECC_ENCRYPT=no
-
-fi
-
-
-if test "$ENABLED_ECC_ENCRYPT" = "yes"
-then
- if test "$ENABLED_ECC" = "no"
- then
- as_fn_error $? "cannot enable eccencrypt without enabling ecc." "$LINENO" 5
- fi
- if test "$ENABLED_HKDF" = "no"
- then
- as_fn_error $? "cannot enable eccencrypt without enabling hkdf." "$LINENO" 5
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_ENCRYPT"
-fi
-
-
-# PSK
-# Check whether --enable-psk was given.
-if test "${enable_psk+set}" = set; then :
- enableval=$enable_psk; ENABLED_PSK=$enableval
-else
- ENABLED_PSK=no
-
-fi
-
-
-# Single PSK identity
-# Check whether --enable-psk-one-id was given.
-if test "${enable_psk_one_id+set}" = set; then :
- enableval=$enable_psk_one_id; ENABLED_PSK_ONE_ID=$enableval
-else
- ENABLED_PSK_ONE_ID=no
-
-fi
-
-if test "$ENABLED_PSK_ONE_ID" = "yes"
-then
- if test "$ENABLED_PSK" = "no"
- then
- ENABLED_PSK="yes"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PSK_ONE_ID"
-fi
-
-# ERROR STRINGS
-# Check whether --enable-errorstrings was given.
-if test "${enable_errorstrings+set}" = set; then :
- enableval=$enable_errorstrings; ENABLED_ERROR_STRINGS=$enableval
-else
- ENABLED_ERROR_STRINGS=yes
-
-fi
-
-
-if test "$ENABLED_ERROR_STRINGS" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS"
-else
- # turn off error strings if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS"
- ENABLED_ERROR_STRINGS=no
- fi
-fi
-
-
-# ERROR QUEUE
-# Check whether --enable-errorqueue was given.
-if test "${enable_errorqueue+set}" = set; then :
- enableval=$enable_errorqueue; ENABLED_ERROR_QUEUE=$enableval
-else
- ENABLED_ERROR_QUEUE=yes
-
-fi
-
-
-if test "$ENABLED_ERROR_QUEUE" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_QUEUE"
-fi
-
-
-# OLD TLS
-# Check whether --enable-oldtls was given.
-if test "${enable_oldtls+set}" = set; then :
- enableval=$enable_oldtls; ENABLED_OLD_TLS=$enableval
-else
- ENABLED_OLD_TLS=yes
-
-fi
-
-
-if test "$ENABLED_OLD_TLS" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS"
-else
- # turn off old if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS"
- ENABLED_OLD_TLS=no
- fi
-fi
-
-
-# TLSv1.2
-# Check whether --enable-tlsv12 was given.
-if test "${enable_tlsv12+set}" = set; then :
- enableval=$enable_tlsv12; ENABLED_TLSV12=$enableval
-else
- ENABLED_TLSV12=yes
-
-fi
-
-
-if test "$ENABLED_TLSV12" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_TLS12 -DNO_OLD_TLS"
-fi
-
-
-# TLSv1.0
-# Check whether --enable-tlsv10 was given.
-if test "${enable_tlsv10+set}" = set; then :
- enableval=$enable_tlsv10; ENABLED_TLSV10=$enableval
-else
- ENABLED_TLSV10=no
-
-fi
-
-
-if test "$ENABLED_TLSV10" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALLOW_TLSV10"
-fi
-
-
-# SSLv3
-# Check whether --enable-sslv3 was given.
-if test "${enable_sslv3+set}" = set; then :
- enableval=$enable_sslv3; ENABLED_SSLV3=$enableval
-else
- ENABLED_SSLV3=no
-
-fi
-
-
-if test "x$ENABLED_HAPROXY" = "xyes" && test "x$ENABLED_ALL" = "xno"
-then
- ENABLED_SSLV3="yes"
-fi
-
-if test "$ENABLED_SSLV3" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALLOW_SSLV3"
-fi
-
-
-# STACK SIZE info for examples
-# Check whether --enable-stacksize was given.
-if test "${enable_stacksize+set}" = set; then :
- enableval=$enable_stacksize; ENABLED_STACKSIZE=$enableval
-else
- ENABLED_STACKSIZE=no
-
-fi
-
-
-if test "$ENABLED_STACKSIZE" = "yes"
-then
- ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign"
-if test "x$ac_cv_func_posix_memalign" = xyes; then :
-
-else
- as_fn_error $? "stacksize needs posix_memalign" "$LINENO" 5
-fi
-
- ac_fn_c_check_func "$LINENO" "pthread_attr_setstack" "ac_cv_func_pthread_attr_setstack"
-if test "x$ac_cv_func_pthread_attr_setstack" = xyes; then :
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_setstack in -lpthread" >&5
-$as_echo_n "checking for pthread_attr_setstack in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_attr_setstack+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_attr_setstack ();
-int
-main ()
-{
-return pthread_attr_setstack ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pthread_pthread_attr_setstack=yes
-else
- ac_cv_lib_pthread_pthread_attr_setstack=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_setstack" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_attr_setstack" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_attr_setstack" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
-
- LIBS="-lpthread $LIBS"
-
-fi
-
-fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_STACK_SIZE"
-fi
-
-
-# MEMORY
-# Check whether --enable-memory was given.
-if test "${enable_memory+set}" = set; then :
- enableval=$enable_memory; ENABLED_MEMORY=$enableval
-else
- ENABLED_MEMORY=yes
-
-fi
-
-
-if test "$ENABLED_MEMORY" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_WOLFSSL_MEMORY"
-else
- # turn off memory cb if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- # but don't turn on NO_WOLFSSL_MEMORY because using own
- ENABLED_MEMORY=no
- fi
-fi
-
-
-# MEMORY SIZE info
-# Check whether --enable-trackmemory was given.
-if test "${enable_trackmemory+set}" = set; then :
- enableval=$enable_trackmemory; ENABLED_TRACKMEMORY=$enableval
-else
- ENABLED_TRACKMEMORY=no
-
-fi
-
-
-if test "$ENABLED_TRACKMEMORY" = "yes"
-then
- if test "$ENABLED_MEMORY" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_TRACK_MEMORY"
- else
- as_fn_error $? "trackmemory requires using wolfSSL memory (--enable-memory)." "$LINENO" 5
- fi
-fi
-
-# MEMORY usage logging
-# Check whether --enable-memorylog was given.
-if test "${enable_memorylog+set}" = set; then :
- enableval=$enable_memorylog; ENABLED_MEMORYLOG=$enableval
-else
- ENABLED_MEMORYLOG=no
-
-fi
-
-
-if test "$ENABLED_MEMORYLOG" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_MEMORY_LOG"
-fi
-
-
-# STACK usage logging
-# Check whether --enable-stacklog was given.
-if test "${enable_stacklog+set}" = set; then :
- enableval=$enable_stacklog; ENABLED_STACKLOG=$enableval
-else
- ENABLED_STACKLOG=no
-
-fi
-
-
-if test "$ENABLED_STACKLOG" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_STACK_LOG -finstrument-functions"
-fi
-
-if test "$ENABLED_QT" = "yes"
-then
- # Requires opensslextra and opensslall
- if test "x$ENABLED_OPENSSLALL" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLALL="yes"
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_EXTRA -DOPENSSL_ALL -DHAVE_EX_DATA"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_QT -DSESSION_CERTS -DOPENSSL_NO_SSL2"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN -DHAVE_EX_DATA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CUSTOM_CURVES -DHAVE_ECC_SECPR2 -DHAVE_ECC_SECPR3 -DHAVE_ECC_BRAINPOOL -DHAVE_ECC_KOBLITZ"
- if test "x$ENABLED_ALL" = "xno"; then
- # Don't enable old SSL/TLS for --enable-all, which is used by distro
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALLOW_SSLV3 -DWOLFSSL_ALLOW_TLSV10"
- fi
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-
- # Requires PSK make sure on
- if test "x$ENABLED_PSK" = "xno"
- then
- ENABLED_PSK="yes"
- fi
-
- # Requires RC4 make sure on
- if test "x$ENABLED_ARC4" = "xno"
- then
- ENABLED_ARC4="yes"
- fi
-
- if test "x$ENABLED_CERTEXT" = "xno"
- then
- ENABLED_CERTEXT="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
- fi
-
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
-
- # requires oldnames disabled
- enable_oldnames=no
-fi
-
-# Check whether --enable-qt-test was given.
-if test "${enable_qt_test+set}" = set; then :
- enableval=$enable_qt_test; ENABLED_QT_TEST=$enableval
-else
- ENABLED_QT_TEST=no
-
-fi
-
-
-if test "$ENABLED_QT_TEST" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_NO_SSL3 -DWOLFSSL_STATIC_RSA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_STATIC_PSK"
-fi
-
-# RSA
-# Check whether --enable-rsa was given.
-if test "${enable_rsa+set}" = set; then :
- enableval=$enable_rsa; ENABLED_RSA=$enableval
-else
- ENABLED_RSA=yes
-
-fi
-
-
-if test "$ENABLED_RSA" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_RSA"
-else
- # turn off RSA if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_RSA"
- ENABLED_RSA=no
- fi
-fi
-
-# Check whether --enable-oaep was given.
-if test "${enable_oaep+set}" = set; then :
- enableval=$enable_oaep; ENABLED_OAEP=$enableval
-else
- ENABLED_OAEP=yes
-
-fi
-
-
-if test "$ENABLED_OAEP" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DWC_NO_RSA_OAEP"
-fi
-
-# Check whether --enable-rsapub was given.
-if test "${enable_rsapub+set}" = set; then :
- enableval=$enable_rsapub; ENABLED_RSAPUB=$enableval
-else
- ENABLED_RSAPUB=no
-
-fi
-
-
-if test "$ENABLED_RSAPUB" = "yes"
-then
- if test "$ENABLED_RSA" = "no"
- then
- ENABLED_RSA="yes"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RSA_PUBLIC_ONLY"
-fi
-
-# Check whether --enable-rsavfy was given.
-if test "${enable_rsavfy+set}" = set; then :
- enableval=$enable_rsavfy; ENABLED_RSAVFY=$enableval
-else
- ENABLED_RSAVFY=no
-
-fi
-
-
-if test "$ENABLED_RSAVFY" = "yes"
-then
- if test "$ENABLED_RSA" = "no"
- then
- ENABLED_RSA="yes"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RSA_PUBLIC_ONLY -DWOLFSSL_RSA_VERIFY_ONLY"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RSA_VERIFY_INLINE -DNO_SIG_WRAPPER"
-fi
-
-
-# RSA-PSS
-# Check whether --enable-rsapss was given.
-if test "${enable_rsapss+set}" = set; then :
- enableval=$enable_rsapss; ENABLED_RSAPSS=$enableval
-else
- ENABLED_RSAPSS=no
-
-fi
-
-
-if test "$ENABLED_RSA" = "no"
-then
- ENABLED_RSAPSS="no"
-else
- if test "$ENABLED_TLS13" = "yes"
- then
- ENABLED_RSAPSS="yes"
- fi
-fi
-if test "$ENABLED_RSAPSS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWC_RSA_PSS"
-fi
-
-
-# DH
-# Check whether --enable-dh was given.
-if test "${enable_dh+set}" = set; then :
- enableval=$enable_dh; ENABLED_DH=$enableval
-else
- ENABLED_DH=yes
-
-fi
-
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_DH="yes"
-fi
-
-if test "$ENABLED_DH" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_DH"
-else
- # turn off DH if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_DH"
- ENABLED_DH=no
- fi
-fi
-
-
-# Anonymous
-# Check whether --enable-anon was given.
-if test "${enable_anon+set}" = set; then :
- enableval=$enable_anon; ENABLED_ANON=$enableval
-else
- ENABLED_ANON=no
-
-fi
-
-
-if test "x$ENABLED_WPAS" = "xyes"
-then
- ENABLED_ANON=yes
-fi
-if test "x$ENABLED_ANON" = "xyes"
-then
- if test "x$ENABLED_DH" != "xyes"
- then
- as_fn_error $? "Anonymous suite requires DH." "$LINENO" 5
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ANON"
-fi
-
-
-# ASN
-# turn off asn, which means no certs, no rsa, no dsa, no ecc,
-# and no big int (unless dh is on)
-# Check whether --enable-asn was given.
-if test "${enable_asn+set}" = set; then :
- enableval=$enable_asn; ENABLED_ASN=$enableval
-else
- ENABLED_ASN=yes
-
-fi
-
-
-if test "$ENABLED_ASN" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS"
- if test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no"
- then
- # DH and ECC need bigint
- AM_CFLAGS="$AM_CFLAGS -DNO_BIG_INT"
- fi
-else
- # turn off ASN if leanpsk on
- if test "$ENABLED_LEANPSK" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT"
- ENABLED_ASN=no
- else
- if test "$ENABLED_ASN" = "nocrypt"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_ASN_CRYPT"
- enable_pwdbased=no
- fi
- fi
-fi
-
-if test "$ENABLED_RSA" = "yes" && test "$ENABLED_RSAVFY" = "no" && test "$ENABLED_ASN" = "no"
-then
- as_fn_error $? "please disable rsa if disabling asn." "$LINENO" 5
-fi
-
-if test "$ENABLED_DSA" = "yes" && test "$ENABLED_ASN" = "no"
-then
- as_fn_error $? "please disable dsa if disabling asn." "$LINENO" 5
-fi
-
-# DH and ECC need bigint
-if test "$ENABLED_ASN" = "no" && test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no" && test "$ENABLED_RSA" = "no"
-then
- ENABLED_FASTMATH=no
- ENABLED_SLOWMATH=no
-fi
-
-
-# AES
-# Check whether --enable-aes was given.
-if test "${enable_aes+set}" = set; then :
- enableval=$enable_aes; ENABLED_AES=$enableval
-else
- ENABLED_AES=yes
-
-fi
-
-
-if test "$ENABLED_AES" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_AES"
- if test "$ENABLED_FORTRESS" = "yes"
- then
- as_fn_error $? "fortress requires aes" "$LINENO" 5
- fi
- if test "$ENABLED_ECC_ENCRYPT" = "yes"
- then
- as_fn_error $? "cannot enable eccencrypt and hkdf without aes." "$LINENO" 5
- fi
- if test "$ENABLED_AESGCM" = "yes"
- then
- as_fn_error $? "AESGCM requires AES." "$LINENO" 5
- fi
- if test "$ENABLED_AESCCM" = "yes"
- then
- as_fn_error $? "AESCCM requires AES." "$LINENO" 5
- fi
- if test "$ENABLED_AESCTR" = "yes"
- then
- as_fn_error $? "AESCTR requires AES." "$LINENO" 5
- fi
-else
- # turn off AES if leanpsk on
- if test "$ENABLED_LEANPSK" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_AES"
- ENABLED_AES=no
- fi
-fi
-
-
-# CODING
-# Check whether --enable-coding was given.
-if test "${enable_coding+set}" = set; then :
- enableval=$enable_coding; ENABLED_CODING=$enableval
-else
- ENABLED_CODING=yes
-
-fi
-
-
-if test "$ENABLED_CODING" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_CODING"
-else
- # turn off CODING if leanpsk on
- if test "$ENABLED_LEANPSK" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_CODING"
- ENABLED_CODING=no
- fi
-fi
-
-
-# Base64 Encode
-BASE64ENCODE_DEFAULT=no
-if test "$host_cpu" = "x86_64"
-then
-BASE64ENCODE_DEFAULT=yes
-fi
-# Check whether --enable-base64encode was given.
-if test "${enable_base64encode+set}" = set; then :
- enableval=$enable_base64encode; ENABLED_BASE64ENCODE=$enableval
-else
- ENABLED_BASE64ENCODE=$BASE64ENCODE_DEFAULT
-
-fi
-
-if test "$ENABLED_BASE64ENCODE" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_BASE64_ENCODE"
-fi
-
-
-# Base16
-# Check whether --enable-base16 was given.
-if test "${enable_base16+set}" = set; then :
- enableval=$enable_base16; ENABLED_BASE16=$enableval
-else
- ENABLED_BASE16=no
-
-fi
-
-if test "$ENABLED_BASE16" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_BASE16"
-fi
-
-
-# DES3
-# Check whether --enable-des3 was given.
-if test "${enable_des3+set}" = set; then :
- enableval=$enable_des3; ENABLED_DES3=$enableval
-else
- ENABLED_DES3=no
-
-fi
-
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_QT" = "yes" || test "$ENABLED_OPENVPN" = "yes"
-then
- ENABLED_DES3="yes"
-fi
-
-# IDEA
-# Check whether --enable-idea was given.
-if test "${enable_idea+set}" = set; then :
- enableval=$enable_idea; ENABLED_IDEA=$enableval
-else
- ENABLED_IDEA=no
-
-fi
-
-
-if test "x$ENABLED_IDEA" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_IDEA"
-fi
-
-# ARC4
-# Check whether --enable-arc4 was given.
-if test "${enable_arc4+set}" = set; then :
- enableval=$enable_arc4; ENABLED_ARC4=$enableval
-else
- ENABLED_ARC4=no
-
-fi
-
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_WPAS" = "yes"
-then
- ENABLED_ARC4="yes"
-fi
-
-if test "$ENABLED_ARC4" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_RC4"
-else
- # turn off ARC4 if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_RC4"
- ENABLED_ARC4=no
- fi
-fi
-
-# MD5
-# Check whether --enable-md5 was given.
-if test "${enable_md5+set}" = set; then :
- enableval=$enable_md5; ENABLED_MD5=$enableval
-else
- ENABLED_MD5=yes
-
-fi
-
-
-if test "$ENABLED_MD5" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS"
-else
- # turn off MD5 if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS"
- ENABLED_MD5=no
- fi
-fi
-
-
-# SHA
-# Check whether --enable-sha was given.
-if test "${enable_sha+set}" = set; then :
- enableval=$enable_sha; ENABLED_SHA=$enableval
-else
- ENABLED_SHA=yes
-
-fi
-
-
-if test "$ENABLED_SHA" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS"
-else
- # turn off SHA if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS"
- ENABLED_SHA=no
- fi
-fi
-
-
-# CMAC
-# Check whether --enable-cmac was given.
-if test "${enable_cmac+set}" = set; then :
- enableval=$enable_cmac; ENABLED_CMAC=$enableval
-else
- ENABLED_CMAC=no
-
-fi
-
-
-if test "$ENABLED_WPAS" = "yes"
-then
- ENABLED_CMAC=yes
-fi
-
-if test "x$ENABLED_CMAC" = "xyes"; then :
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CMAC -DWOLFSSL_AES_DIRECT"
-fi
-
-
-# AES-XTS
-# Check whether --enable-xts was given.
-if test "${enable_xts+set}" = set; then :
- enableval=$enable_xts; ENABLED_XTS=$enableval
-else
- ENABLED_XTS=no
-
-fi
-
-
-if test "x$ENABLED_XTS" = "xyes"; then :
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_XTS -DWOLFSSL_AES_DIRECT"
-fi
-
-
-# Web Server Build
-# Check whether --enable-webserver was given.
-if test "${enable_webserver+set}" = set; then :
- enableval=$enable_webserver; ENABLED_WEBSERVER=$enableval
-else
- ENABLED_WEBSERVER=no
-
-fi
-
-
-if test "$ENABLED_WEBSERVER" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_WEBSERVER"
-fi
-
-# Web Client Build (HTTP Client)
-# Check whether --enable-webclient was given.
-if test "${enable_webclient+set}" = set; then :
- enableval=$enable_webclient; ENABLED_WEBCLIENT=$enableval
-else
- ENABLED_WEBCLIENT=no
-
-fi
-
-
-if test "$ENABLED_WEBCLIENT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HTTP_CLIENT"
-fi
-
-
-# HC128
-# Check whether --enable-hc128 was given.
-if test "${enable_hc128+set}" = set; then :
- enableval=$enable_hc128; ENABLED_HC128=$enableval
-else
- ENABLED_HC128=no
-
-fi
-
-
-if test "$ENABLED_HC128" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_HC128"
-else
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HC128"
-fi
-
-
-# RABBIT
-# Check whether --enable-rabbit was given.
-if test "${enable_rabbit+set}" = set; then :
- enableval=$enable_rabbit; ENABLED_RABBIT=$enableval
-else
- ENABLED_RABBIT=no
-
-fi
-
-
-if test "$ENABLED_RABBIT" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_RABBIT"
-else
- AM_CFLAGS="$AM_CFLAGS -DHAVE_RABBIT"
-fi
-
-
-# FIPS
-case $FIPS_VERSION in #(
- "v2") :
-
- if test "x$FIPS_READY" = "xyes"; then :
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS_VERSION=3"
-else
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS_VERSION=2"
-fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS -DWOLFSSL_KEY_GEN -DWOLFSSL_SHA224 -DWOLFSSL_AES_DIRECT -DHAVE_AES_ECB -DHAVE_ECC_CDH -DWC_RSA_NO_PADDING -DWOLFSSL_VALIDATE_FFC_IMPORT -DHAVE_FFDHE_Q"
- ENABLED_KEYGEN="yes"
- ENABLED_SHA224="yes"
- # Shake256 is a SHA-3 algorithm not in our FIPS algorithm list
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_SHAKE256"
- if test "x$ENABLED_AESCCM" != "xyes"; then :
- ENABLED_AESCCM="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM"
-fi
- if test "x$ENABLED_RSAPSS" != "xyes"; then :
- ENABLED_RSAPSS="yes"
- AM_CFLAGS="$AM_CFLAGS -DWC_RSA_PSS"
-fi
- if test "x$ENABLED_ECC" != "xyes"; then :
- ENABLED_ECC="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DWOLFSSL_VALIDATE_ECC_IMPORT"
- if test "x$ENABLED_ECC_SHAMIR" = "xyes"; then :
- AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"
-fi
-else
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_VALIDATE_ECC_IMPORT"
-fi
- if test "x$ENABLED_AESCTR" != "xyes"; then :
- ENABLED_AESCTR="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_COUNTER"
-fi
- if test "x$ENABLED_CMAC" != "xyes"; then :
- ENABLED_CMAC="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CMAC"
-fi
- if test "x$ENABLED_HKDF" != "xyes"; then :
- ENABLED_HKDF="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF"
-fi
- if test "x$ENABLED_INTELASM" = "xyes"; then :
- AM_CFLAGS="$AM_CFLAGS -DFORCE_FAILURE_RDSEED"
-fi
- ;; #(
- "rand") :
-
- AM_CFLAGS="$AM_CFLAGS -DWOLFCRYPT_FIPS_RAND -DHAVE_FIPS -DHAVE_FIPS_VERSION=2"
- ;; #(
- "v1") :
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS"
- ;; #(
- *) :
- ;;
-esac
-
-if test "x$ENABLED_FIPS" = "xyes" && test "x$thread_ls_on" = "xno"; then :
- as_fn_error $? "FIPS requires Thread Local Storage" "$LINENO" 5
-fi
-
-if test "x$ENABLED_FIPS" = "xyes" && test "x$FIPS_VERSION" != "xrand"; then :
-
- # Force enable the prerequisites.
- if test "x$ENABLED_SHA512" = "xno"; then :
- ENABLED_SHA512="yes"; AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA512 -DWOLFSSL_SHA384"
-fi
- if test "x$ENABLED_AESGCM" = "xno"; then :
- ENABLED_AESGCM="yes"; AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM"
-fi
- if test "x$ENABLED_DES3" = "xno"; then :
- ENABLED_DES3="yes"
-fi
-
-else
-
- if test "x$ENABLED_FORTRESS" = "xyes"; then :
- ENABLED_DES3="yes"
-fi
-
-fi
-
-
-# SELFTEST
-# Check whether --enable-selftest was given.
-if test "${enable_selftest+set}" = set; then :
- enableval=$enable_selftest; ENABLED_SELFTEST=$enableval
-else
- ENABLED_SELFTEST="no"
-
-fi
-
-
-case $ENABLED_SELFTEST in #(
- "v2") :
-
- # selftest v2 (wolfCrypt 4.1.0)
- ENABLED_SELFTEST="yes"
- SELFTEST_VERSION="v2"
- ;; #(
- "no") :
- SELFTEST_VERSION="none" ;; #(
- *) :
-
- # selftest v1 (wolfCrypt 3.14.2)
- ENABLED_SELFTEST="yes"
- SELFTEST_VERSION="v1"
- ;;
-esac
-
-case $SELFTEST_VERSION in #(
- "v2") :
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SELFTEST -DHAVE_SELFTEST_VERSION=2"
- ;; #(
- "v1") :
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SELFTEST"
- ;; #(
- *) :
- ;;
-esac
-
-
-# set sha224 default
-SHA224_DEFAULT=no
-if test "$host_cpu" = "x86_64" || test "$host_cpu" = "aarch64"
-then
- if test "x$ENABLED_AFALG" = "xno" && test "x$ENABLED_DEVCRYPTO" = "xno" && ( test "x$ENABLED_FIPS" = "xno" || test "x$FIPS_VERSION" = "xv2" )
- then
- SHA224_DEFAULT=yes
- fi
-fi
-
-# SHA224
-# Check whether --enable-sha224 was given.
-if test "${enable_sha224+set}" = set; then :
- enableval=$enable_sha224; ENABLED_SHA224=$enableval
-else
- ENABLED_SHA224=$SHA224_DEFAULT
-
-fi
-
-
-if test "$ENABLED_SHA224" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA224"
-fi
-
-
-# set sha3 default
-SHA3_DEFAULT=no
-if test "$host_cpu" = "x86_64" || test "$host_cpu" = "aarch64"
-then
- if test "x$ENABLED_FIPS" = "xno" || test "x$FIPS_VERSION" = "xv2"
- then
- SHA3_DEFAULT=yes
- fi
-fi
-
-# SHA3
-# Check whether --enable-sha3 was given.
-if test "${enable_sha3+set}" = set; then :
- enableval=$enable_sha3; ENABLED_SHA3=$enableval
-else
- ENABLED_SHA3=$SHA3_DEFAULT
-
-fi
-
-
-if test "$ENABLED_SHA3" = "small"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA3_SMALL"
- ENABLED_SHA3="yes"
-fi
-
-if test "$ENABLED_SHA3" = "yes" && test "$ENABLED_32BIT" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA3"
-fi
-
-# SHAKE256
-# Check whether --enable-shake256 was given.
-if test "${enable_shake256+set}" = set; then :
- enableval=$enable_shake256; ENABLED_SHAKE256=$enableval
-else
- ENABLED_SHAKE256=$ENABLED_SHA3
-
-fi
-
-
-if test "$ENABLED_SHAKE256" = "yes" || test "$ENABLED_SHAKE256" = "small"
-then
- if test "$ENABLED_32BIT" = "no"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHAKE256"
- if test "$ENABLED_SHA3" = "no"
- then
- as_fn_error $? "Must have SHA-3 enabled: --enable-sha3" "$LINENO" 5
- fi
- fi
-fi
-
-# set POLY1305 default
-POLY1305_DEFAULT=yes
-
-if test "x$ENABLED_FIPS" = "xyes"
-then
-POLY1305_DEFAULT=no
-fi
-
-# POLY1305
-# Check whether --enable-poly1305 was given.
-if test "${enable_poly1305+set}" = set; then :
- enableval=$enable_poly1305; ENABLED_POLY1305=$enableval
-else
- ENABLED_POLY1305=$POLY1305_DEFAULT
-
-fi
-
-
-# leanpsk and leantls don't need poly1305
-if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
-then
- ENABLED_POLY1305=no
-fi
-
-if test "$ENABLED_POLY1305" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_POLY1305 -DHAVE_ONE_TIME_AUTH"
-fi
-
-
-# set CHACHA default
-CHACHA_DEFAULT=yes
-
-if test "x$ENABLED_FIPS" = "xyes"
-then
-CHACHA_DEFAULT=no
-fi
-
-# CHACHA
-# Check whether --enable-chacha was given.
-if test "${enable_chacha+set}" = set; then :
- enableval=$enable_chacha; ENABLED_CHACHA=$enableval
-else
- ENABLED_CHACHA=$CHACHA_DEFAULT
-
-fi
-
-
-# leanpsk and leantls don't need chacha
-if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
-then
- ENABLED_CHACHA=no
-fi
-
-if test "$ENABLED_CHACHA" = "noasm" || test "$ENABLED_ASM" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_CHACHA_ASM"
-fi
-
-if test "$ENABLED_CHACHA" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CHACHA"
-fi
-
-
-# Hash DRBG
-# Check whether --enable-hashdrbg was given.
-if test "${enable_hashdrbg+set}" = set; then :
- enableval=$enable_hashdrbg; ENABLED_HASHDRBG=$enableval
-else
- ENABLED_HASHDRBG=yes
-
-fi
-
-
-if test "x$ENABLED_HASHDRBG" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HASHDRBG"
-else
- # turn on Hash DRBG if FIPS is on
- if test "x$ENABLED_FIPS" = "xyes"
- then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HASHDRBG"
- ENABLED_HASHDRBG=yes
- else
- AM_CFLAGS="$AM_CFLAGS -DWC_NO_HASHDRBG"
- fi
-fi
-
-
-# Filesystem Build
-# Check whether --enable-filesystem was given.
-if test "${enable_filesystem+set}" = set; then :
- enableval=$enable_filesystem; ENABLED_FILESYSTEM=$enableval
-else
- ENABLED_FILESYSTEM=yes
-
-fi
-
-
-if test "$ENABLED_FILESYSTEM" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM"
-else
- # turn off filesystem if leanpsk on
- if test "$ENABLED_LEANPSK" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM"
- ENABLED_FILESYSTEM=no
- fi
-fi
-
-
-# inline Build
-# Check whether --enable-inline was given.
-if test "${enable_inline+set}" = set; then :
- enableval=$enable_inline; ENABLED_INLINE=$enableval
-else
- ENABLED_INLINE=yes
-
-fi
-
-
-if test "$ENABLED_INLINE" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_INLINE"
-fi
-
-
-# OCSP
-# Check whether --enable-ocsp was given.
-if test "${enable_ocsp+set}" = set; then :
- enableval=$enable_ocsp; ENABLED_OCSP=$enableval
-else
- ENABLED_OCSP=no
-fi
-
-
-if test "x$ENABLED_OPENSSLALL" = "xyes" || test "x$ENABLED_NGINX" = "xyes"
-then
- ENABLED_OCSP=yes
-fi
-
-if test "$ENABLED_OCSP" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
-fi
-
-
-if test "$ENABLED_OCSP" = "yes"
-then
- # check openssl command tool for testing ocsp
- # Extract the first word of "openssl", so it can be a program name with args.
-set dummy openssl; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_HAVE_OPENSSL_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$HAVE_OPENSSL_CMD"; then
- ac_cv_prog_HAVE_OPENSSL_CMD="$HAVE_OPENSSL_CMD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_HAVE_OPENSSL_CMD="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_HAVE_OPENSSL_CMD" && ac_cv_prog_HAVE_OPENSSL_CMD="no"
-fi
-fi
-HAVE_OPENSSL_CMD=$ac_cv_prog_HAVE_OPENSSL_CMD
-if test -n "$HAVE_OPENSSL_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_OPENSSL_CMD" >&5
-$as_echo "$HAVE_OPENSSL_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- if test "$HAVE_OPENSSL_CMD" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: openssl command line tool not available for testing ocsp" >&5
-$as_echo "$as_me: WARNING: openssl command line tool not available for testing ocsp" >&2;}
- fi
-fi
-
-
-# Certificate Status Request : a.k.a. OCSP Stapling
-# Check whether --enable-ocspstapling was given.
-if test "${enable_ocspstapling+set}" = set; then :
- enableval=$enable_ocspstapling; ENABLED_CERTIFICATE_STATUS_REQUEST=$enableval
-else
- ENABLED_CERTIFICATE_STATUS_REQUEST=no
-
-fi
-
-
-if test "x$ENABLED_NGINX" = "xyes" || test "x$ENABLED_WPAS" = "xyes" || test "x$ENABLED_HAPROXY" = "xyes"
-then
- ENABLED_CERTIFICATE_STATUS_REQUEST="yes"
-fi
-
-if test "x$ENABLED_CERTIFICATE_STATUS_REQUEST" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_CERTIFICATE_STATUS_REQUEST"
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-fi
-
-
-# Certificate Status Request v2 : a.k.a. OCSP stapling v2
-# Check whether --enable-ocspstapling2 was given.
-if test "${enable_ocspstapling2+set}" = set; then :
- enableval=$enable_ocspstapling2; ENABLED_CERTIFICATE_STATUS_REQUEST_V2=$enableval
-else
- ENABLED_CERTIFICATE_STATUS_REQUEST_V2=no
-
-fi
-
-
-if test "x$ENABLED_NGINX" = "xyes" || test "x$ENABLED_WPAS" = "xyes" || test "x$ENABLED_HAPROXY" = "xyes"
-then
- ENABLED_CERTIFICATE_STATUS_REQUEST_V2=yes
-fi
-
-if test "x$ENABLED_CERTIFICATE_STATUS_REQUEST_V2" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_CERTIFICATE_STATUS_REQUEST_V2"
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-fi
-
-
-# CRL
-# Check whether --enable-crl was given.
-if test "${enable_crl+set}" = set; then :
- enableval=$enable_crl; ENABLED_CRL=$enableval
-else
- ENABLED_CRL=no
-fi
-
-
-
-if test "x$ENABLED_NGINX" = "xyes" || test "x$ENABLED_HAPROXY" = "xyes" || test "x$ENABLED_OPENVPN" = "xyes"
-then
- ENABLED_CRL=yes
-fi
-
-if test "$ENABLED_CRL" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
-fi
-
-
-# CRL Monitor
-# Check whether --enable-crl-monitor was given.
-if test "${enable_crl_monitor+set}" = set; then :
- enableval=$enable_crl_monitor; ENABLED_CRL_MONITOR=$enableval
-else
- ENABLED_CRL_MONITOR=no
-fi
-
-
-if test "$ENABLED_CRL_MONITOR" = "yes"
-then
- case $host_os in
- *linux* | *darwin* | *freebsd*)
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;;
- *)
- if test "x$ENABLED_DISTRO" = "xyes" ; then
- ENABLED_CRL_MONITOR="no"
- else
- as_fn_error $? "crl monitor only allowed on linux, OS X, or freebsd" "$LINENO" 5
- fi
- break;;
- esac
-fi
-
-
-# USER CRYPTO
-ENABLED_USER_CRYPTO="no"
-ENABLED_USER_RSA="no"
-
-$as_echo "#define BUILD_USER_RSA /**/" >>confdefs.h
-
-trycryptodir=""
-
-# Check whether --with-user-crypto was given.
-if test "${with_user_crypto+set}" = set; then :
- withval=$with_user_crypto;
- CPPFLAGS="$CPPFLAGS -DHAVE_USER_CRYPTO"
- LIBS="$LIBS -lusercrypto"
-
- if test "x$withval" != "xno" ; then
- trycryptodir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- trycryptodir="/usr/local"
- fi
-
- LDFLAGS="$LDFLAGS -L$trycryptodir/lib"
- CPPFLAGS="$CPPFLAGS -I$trycryptodir/include"
-
- #Look for RSA Init function in usercrypto lib
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wc_InitRsaKey in -lusercrypto" >&5
-$as_echo_n "checking for wc_InitRsaKey in -lusercrypto... " >&6; }
-if ${ac_cv_lib_usercrypto_wc_InitRsaKey+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lusercrypto $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char wc_InitRsaKey ();
-int
-main ()
-{
-return wc_InitRsaKey ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_usercrypto_wc_InitRsaKey=yes
-else
- ac_cv_lib_usercrypto_wc_InitRsaKey=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_usercrypto_wc_InitRsaKey" >&5
-$as_echo "$ac_cv_lib_usercrypto_wc_InitRsaKey" >&6; }
-if test "x$ac_cv_lib_usercrypto_wc_InitRsaKey" = xyes; then :
- user_rsa_linked=yes
-else
- user_rsa_linked=no
-fi
-
-
- if test "x$user_rsa_linked" = "xyes" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: User user_rsa.h being used" >&5
-$as_echo "$as_me: User user_rsa.h being used" >&6;}
- AM_CFLAGS="$AM_CFLAGS -DHAVE_USER_RSA"
- ENABLED_USER_RSA=yes
- ENABLED_USER_CRYPTO=yes
- fi
-
-
- #Display check and find result of link attempts
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for USER_CRYPTO" >&5
-$as_echo_n "checking for USER_CRYPTO... " >&6; }
- if test "x$ENABLED_USER_CRYPTO" = "xno" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "USER_CRYPTO not found. Either move to /usr/include and /usr/lib or
- Specify its path using --with-user-crypto=/dir/" "$LINENO" 5
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- # Check if .la is available if not then rely on exported path
- as_ac_File=`$as_echo "ac_cv_file_$trycryptodir/lib/libusercrypto.la" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $trycryptodir/lib/libusercrypto.la" >&5
-$as_echo_n "checking for $trycryptodir/lib/libusercrypto.la... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$trycryptodir/lib/libusercrypto.la"; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
- LIB_ADD="$trycryptodir/lib/libusercrypto.la $LIB_ADD"
-else
- LIB_ADD="-lusercrypto $LIB_ADD"
-fi
-
- AM_LDFLAGS="$AM_LDFLAGS -L$trycryptodir/lib"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_USER_CRYPTO"
- fi
-
-
-fi
-
-
-if test "$ENABLED_USER_CRYPTO" = "yes" && test "$ENABLED_FIPS" = "yes"
-then
- as_fn_error $? "cannot enable user crypto and fips, user crypto posibility of using code in fips boundary." "$LINENO" 5
-fi
-
-
-# NTRU
-ENABLED_NTRU="no"
-tryntrudir=""
-
-# Check whether --with-ntru was given.
-if test "${with_ntru+set}" = set; then :
- withval=$with_ntru;
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NTRU" >&5
-$as_echo_n "checking for NTRU... " >&6; }
- CPPFLAGS="$CPPFLAGS -DHAVE_NTRU -DHAVE_TLS_EXTENSIONS"
- LIBS="$LIBS -lntruencrypt"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
- ntru_crypto_drbg_instantiate(0, 0, 0, 0, 0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ntru_linked=yes
-else
- ntru_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$ntru_linked" = "xno" ; then
- if test "x$withval" != "xno" ; then
- tryntrudir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- tryntrudir="/usr"
- fi
-
- LDFLAGS="$AM_LDFLAGS $LDFLAGS -L$tryntrudir/lib"
- CPPFLAGS="$CPPFLAGS -I$tryntrudir/include"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
- ntru_crypto_drbg_instantiate(0, 0, 0, 0, 0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ntru_linked=yes
-else
- ntru_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$ntru_linked" = "xno" ; then
- as_fn_error $? "NTRU isn't found.
- If it's already installed, specify its path using --with-ntru=/dir/" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- AM_LDFLAGS="$AM_LDFLAGS -L$tryntrudir/lib"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU -DHAVE_TLS_EXTENSIONS -DWOLFSSL_STATIC_RSA"
- ENABLED_NTRU="yes"
-
-
-fi
-
-
-
-# QSH
-# Check whether --enable-qsh was given.
-if test "${enable_qsh+set}" = set; then :
- enableval=$enable_qsh; ENABLED_QSH=$enableval
-else
- ENABLED_QSH=no
-
-fi
-
-
-if test "x$ENABLED_QSH" = "xyes"
-then
- if test "x$ENABLED_NTRU" = "xno"
- then
- as_fn_error $? "cannot enable qsh without NTRU" "$LINENO" 5
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_QSH"
-fi
-
-
-# Whitewood netRandom client library
-ENABLED_WNR="no"
-trywnrdir=""
-
-# Check whether --with-wnr was given.
-if test "${with_wnr+set}" = set; then :
- withval=$with_wnr;
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Whitewood netRandom" >&5
-$as_echo_n "checking for Whitewood netRandom... " >&6; }
- CPPFLAGS="$CPPFLAGS -DHAVE_WNR"
- LIBS="$LIBS -lwnr"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
- wnr_setup(0, 0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- wnr_linked=yes
-else
- wnr_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$wnr_linked" = "xno" ; then
- if test "x$withval" != "xno" ; then
- trywnrdir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- trywnrdir="/usr/local"
- fi
-
- LDFLAGS="$AM_LDFLAGS $LDFLAGS -L$trywnrdir/lib"
- CPPFLAGS="$CPPFLAGS -I$trywnrdir/include"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
- wnr_setup(0, 0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- wnr_linked=yes
-else
- wnr_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$wnr_linked" = "xno" ; then
- as_fn_error $? "Whitewood netRandom isn't found.
- If it's already installed, specify its path using --with-wnr=/dir/" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- AM_LDFLAGS="$AM_LDFLAGS -L$trywnrdir/lib"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_WNR"
- ENABLED_WNR="yes"
-
-
-fi
-
-
-
-# SNI
-# Check whether --enable-sni was given.
-if test "${enable_sni+set}" = set; then :
- enableval=$enable_sni; ENABLED_SNI=$enableval
-else
- ENABLED_SNI=no
-
-fi
-
-if test "x$ENABLED_QT" = "xyes"
-then
- ENABLED_SNI="yes"
-fi
-
-if test "x$ENABLED_SNI" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI"
-fi
-
-# Maximum Fragment Length
-# Check whether --enable-maxfragment was given.
-if test "${enable_maxfragment+set}" = set; then :
- enableval=$enable_maxfragment; ENABLED_MAX_FRAGMENT=$enableval
-else
- ENABLED_MAX_FRAGMENT=no
-
-fi
-
-
-# ALPN
-# Check whether --enable-alpn was given.
-if test "${enable_alpn+set}" = set; then :
- enableval=$enable_alpn; ENABLED_ALPN=$enableval
-else
- ENABLED_ALPN=no
-
-fi
-
-
-if test "x$ENABLED_ALPN" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_ALPN"
-fi
-
-# Maximum Fragment Length
-if test "x$ENABLED_MAX_FRAGMENT" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_MAX_FRAGMENT"
-fi
-
-# Trusted CA Indication Extension
-# Check whether --enable-trustedca was given.
-if test "${enable_trustedca+set}" = set; then :
- enableval=$enable_trustedca; ENABLED_TRUSTED_CA=$enableval
-else
- ENABLED_TRUSTED_CA=no
-fi
-
-
-if test "x$ENABLED_TRUSTED_CA" = "xyes"; then :
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUSTED_CA"
-fi
-
-# Truncated HMAC
-# Check whether --enable-truncatedhmac was given.
-if test "${enable_truncatedhmac+set}" = set; then :
- enableval=$enable_truncatedhmac; ENABLED_TRUNCATED_HMAC=$enableval
-else
- ENABLED_TRUNCATED_HMAC=no
-
-fi
-
-
-if test "x$ENABLED_TRUNCATED_HMAC" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUNCATED_HMAC"
-fi
-
-# Renegotiation Indication - (FAKE Secure Renegotiation)
-# Check whether --enable-renegotiation-indication was given.
-if test "${enable_renegotiation_indication+set}" = set; then :
- enableval=$enable_renegotiation_indication; ENABLED_RENEGOTIATION_INDICATION=$enableval
-else
- ENABLED_RENEGOTIATION_INDICATION=no
-
-fi
-
-
-if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_RENEGOTIATION_INDICATION"
-fi
-
-# Secure Renegotiation
-# Check whether --enable-secure-renegotiation was given.
-if test "${enable_secure_renegotiation+set}" = set; then :
- enableval=$enable_secure_renegotiation; ENABLED_SECURE_RENEGOTIATION=$enableval
-else
- ENABLED_SECURE_RENEGOTIATION=no
-
-fi
-
-
-if test "x$ENABLED_SECURE_RENEGOTIATION" = "xyes"
-then
- if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes"
- then
- as_fn_error $? "cannot enable renegotiation-indication and secure-renegotiation." "$LINENO" 5
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SECURE_RENEGOTIATION -DHAVE_SERVER_RENEGOTIATION_INFO"
-fi
-
-# Fallback SCSV
-# Check whether --enable-fallback-scsv was given.
-if test "${enable_fallback_scsv+set}" = set; then :
- enableval=$enable_fallback_scsv; ENABLED_FALLBACK_SCSV=$enableval
-else
- ENABLED_FALLBACK_SCSV=no
-
-fi
-
-
-if test "x$ENABLED_FALLBACK_SCSV" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FALLBACK_SCSV"
-fi
-
-# Supported Elliptic Curves Extensions
-# Check whether --enable-supportedcurves was given.
-if test "${enable_supportedcurves+set}" = set; then :
- enableval=$enable_supportedcurves; ENABLED_SUPPORTED_CURVES=$enableval
-else
- ENABLED_SUPPORTED_CURVES=yes
-fi
-
-
-if test "x$ENABLED_SUPPORTED_CURVES" = "xyes"
-then
- if test "x$ENABLED_ECC" = "xno" && test "x$ENABLED_CURVE25519" = "xno" && test "x$ENABLED_CURVE448" = "xno"; then :
- ENABLED_SUPPORTED_CURVES=no
-else
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES"
-fi
-fi
-
-# Diffie-Hellman
-if test "$ENABLED_DH" = "yes"
-then
- if test "$ENABLED_TLS13" = "yes" || test "$ENABLED_SUPPORTED_CURVES" = "yes"
- then
- AM_CFLAGS="-DHAVE_FFDHE_2048 $AM_CFLAGS"
- fi
-fi
-
-# FFDHE parameters only
-# Check whether --enable-ffdhe-only was given.
-if test "${enable_ffdhe_only+set}" = set; then :
- enableval=$enable_ffdhe_only; ENABLED_FFDHE_ONLY=$enableval
-else
- ENABLED_FFDHE_ONLY=no
-
-fi
-
-
-if test "x$ENABLED_FFDHE_ONLY" = "xyes"
-then
- if test "$ENABLED_DH" = "no"
- then
- as_fn_error $? "FFDHE only support requires DH support" "$LINENO" 5
- fi
- if test "$ENABLED_SUPPORTED_CURVES" = "no"
- then
- as_fn_error $? "FFDHE only support requires Supported Curves extension" "$LINENO" 5
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_REQUIRE_FFDHE"
-fi
-
-# TLS 1.3 Requires either ECC or (RSA/DH), or CURVE25519/ED25519 or CURVE448/ED448
-if test "x$ENABLED_ECC" = "xno" && \
- (test "x$ENABLED_RSA" = "xno" || test "x$ENABLED_DH" = "xno") && \
- (test "x$ENABLED_CURVE25519" = "xno" || test "x$ENABLED_ED25519" = "xno") && \
- (test "x$ENABLED_CURVE448" = "xno" || test "x$ENABLED_ED448" = "xno")
-then
- # disable TLS 1.3
- ENABLED_TLS13=no
-fi
-if test "$ENABLED_TLS13" = "yes"
-then
- AM_CFLAGS="-DWOLFSSL_TLS13 -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES $AM_CFLAGS"
-fi
-
-
-# Session Ticket Extension
-# Check whether --enable-session-ticket was given.
-if test "${enable_session_ticket+set}" = set; then :
- enableval=$enable_session_ticket; ENABLED_SESSION_TICKET=$enableval
-else
- ENABLED_SESSION_TICKET=no
-
-fi
-
-
-if test "x$ENABLED_NGINX" = "xyes" || test "$ENABLED_WPAS" != "no" || test "x$ENABLED_HAPROXY" = "xyes"
-then
- ENABLED_SESSION_TICKET=yes
-fi
-
-if test "x$ENABLED_SESSION_TICKET" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SESSION_TICKET"
-fi
-
-# Extended Master Secret Extension
-# Check whether --enable-extended-master was given.
-if test "${enable_extended_master+set}" = set; then :
- enableval=$enable_extended_master; ENABLED_EXTENDED_MASTER=$enableval
-else
- ENABLED_EXTENDED_MASTER=yes
-
-fi
-
-
-if test "x$ENABLED_EXTENDED_MASTER" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_EXTENDED_MASTER"
-fi
-
-# TLS Extensions
-# Check whether --enable-tlsx was given.
-if test "${enable_tlsx+set}" = set; then :
- enableval=$enable_tlsx; ENABLED_TLSX=$enableval
-else
- ENABLED_TLSX=no
-
-fi
-
-
-if test "x$ENABLED_NGINX" = "xyes" || test "x$ENABLED_HAPROXY" = "xyes" || test "x$ENABLED_SIGNAL" = "xyes"
-then
- ENABLED_TLSX=yes
-fi
-
-if test "x$ENABLED_TLSX" = "xyes"
-then
- ENABLED_SNI=yes
- ENABLED_MAX_FRAGMENT=yes
- ENABLED_TRUNCATED_HMAC=yes
- ENABLED_ALPN=yes
- ENABLED_TRUSTED_CA=yes
- ENABLED_ENCRYPT_THEN_MAC=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC -DHAVE_ALPN -DHAVE_TRUSTED_CA"
- # Check the ECC supported curves prereq
- if test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_CURVE25519" = "xyes" || test "x$ENABLED_CURVE448" = "xyes" || test "x$ENABLED_TLS13" = "xyes"; then :
- ENABLED_SUPPORTED_CURVES=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SUPPORTED_CURVES"
-fi
-fi
-
-# Early Data handshake in TLS v1.3 and above
-# Check whether --enable-earlydata was given.
-if test "${enable_earlydata+set}" = set; then :
- enableval=$enable_earlydata; ENABLED_TLS13_EARLY_DATA=$enableval
-else
- ENABLED_TLS13_EARLY_DATA=no
-
-fi
-
-
-if test "$ENABLED_TLS13_EARLY_DATA" = "group"
-then
- ENABLED_TLS13_EARLY_DATA="yes"
- # Group EarlyData with ClientHello
- AM_CFLAGS="-DWOLFSSL_EARLY_DATA_GROUP $AM_CFLAGS"
-fi
-if test "$ENABLED_TLS13_EARLY_DATA" = "yes"
-then
- if test "x$ENABLED_TLS13" = "xno"
- then
- as_fn_error $? "cannot enable earlydata without enabling tls13." "$LINENO" 5
- fi
- if test "x$ENABLED_SESSION_TICKET" = "xno" && test "x$ENABLED_PSK" = "xno"
- then
- as_fn_error $? "cannot enable earlydata without enabling session tickets and/or PSK." "$LINENO" 5
- fi
- AM_CFLAGS="-DWOLFSSL_EARLY_DATA $AM_CFLAGS"
-fi
-
-if test "$ENABLED_TLSV12" = "no" && test "$ENABLED_TLS13" = "yes" && test "x$ENABLED_SESSION_TICKET" = "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_SESSION_CACHE"
-fi
-
-
-# PKCS7
-# Check whether --enable-pkcs7 was given.
-if test "${enable_pkcs7+set}" = set; then :
- enableval=$enable_pkcs7; ENABLED_PKCS7=$enableval
-else
- ENABLED_PKCS7=no
-fi
-
-
-
-# wolfSSH Options
-# Check whether --enable-ssh was given.
-if test "${enable_ssh+set}" = set; then :
- enableval=$enable_ssh; ENABLED_WOLFSSH=$enableval
-else
- ENABLED_WOLFSSH=no
-
-fi
-
-
-# Simple Certificate Enrollment Protocol (SCEP)
-# Check whether --enable-scep was given.
-if test "${enable_scep+set}" = set; then :
- enableval=$enable_scep; ENABLED_WOLFSCEP=$enableval
-else
- ENABLED_WOLFSCEP=no
-
-fi
-
-
-
-# Secure Remote Password
-# Check whether --enable-srp was given.
-if test "${enable_srp+set}" = set; then :
- enableval=$enable_srp; ENABLED_SRP=$enableval
-else
- ENABLED_SRP=no
-
-fi
-
-
-if test "x$ENABLED_SRP" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFCRYPT_HAVE_SRP"
-fi
-
-
-# Indefinite length encoded BER message support
-# Check whether --enable-indef was given.
-if test "${enable_indef+set}" = set; then :
- enableval=$enable_indef; ENABLED_BER_INDEF=$enableval
-else
- ENABLED_BER_INDEF=no
-
-fi
-
-
-if test "x$ENABLED_BER_INDEF" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DASN_BER_TO_DER"
-fi
-
-
-
-# Small Stack - Cache on object
-# Check whether --enable-smallstackcache was given.
-if test "${enable_smallstackcache+set}" = set; then :
- enableval=$enable_smallstackcache; ENABLED_SMALL_STACK_CACHE=$enableval
-else
- ENABLED_SMALL_STACK_CACHE=no
-
-fi
-
-
-if test "x$ENABLED_SMALL_STACK_CACHE" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SMALL_STACK_CACHE"
-fi
-
-# Small Stack
-# Check whether --enable-smallstack was given.
-if test "${enable_smallstack+set}" = set; then :
- enableval=$enable_smallstack; ENABLED_SMALL_STACK=$enableval
-else
- ENABLED_SMALL_STACK=no
-
-fi
-
-
-if test "x$ENABLED_SMALL_STACK_CACHE" = "xyes"
-then
- ENABLED_SMALL_STACK=yes
-fi
-if test "x$ENABLED_SMALL_STACK" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SMALL_STACK"
-fi
-
-
-#valgrind
-# Check whether --enable-valgrind was given.
-if test "${enable_valgrind+set}" = set; then :
- enableval=$enable_valgrind; ENABLED_VALGRIND=$enableval
-else
- ENABLED_VALGRIND=no
-
-fi
-
-
-if test "$ENABLED_VALGRIND" = "yes"
-then
- # Extract the first word of "valgrind", so it can be a program name with args.
-set dummy valgrind; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_HAVE_VALGRIND+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$HAVE_VALGRIND"; then
- ac_cv_prog_HAVE_VALGRIND="$HAVE_VALGRIND" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_HAVE_VALGRIND="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_HAVE_VALGRIND" && ac_cv_prog_HAVE_VALGRIND="no"
-fi
-fi
-HAVE_VALGRIND=$ac_cv_prog_HAVE_VALGRIND
-if test -n "$HAVE_VALGRIND"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_VALGRIND" >&5
-$as_echo "$HAVE_VALGRIND" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- if test "$HAVE_VALGRIND" = "no"
- then
- as_fn_error $? "Valgrind not found." "$LINENO" 5
- fi
- enable_shared=no
- enable_static=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_VALGRIND"
-fi
-
-
-# Test certs, use internal cert functions for extra testing
-# Check whether --enable-testcert was given.
-if test "${enable_testcert+set}" = set; then :
- enableval=$enable_testcert; ENABLED_TESTCERT=$enableval
-else
- ENABLED_TESTCERT=no
-
-fi
-
-
-if test "$ENABLED_TESTCERT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_TEST_CERT"
-fi
-
-
-# I/O Pool, an example to show user how to override memory handler and use
-# a pool for the input/output buffer requests
-# Check whether --enable-iopool was given.
-if test "${enable_iopool+set}" = set; then :
- enableval=$enable_iopool; ENABLED_IOPOOL=$enableval
-else
- ENABLED_IOPOOL=no
-
-fi
-
-
-if test "$ENABLED_IOPOOL" = "yes"
-then
- if test "$thread_ls_on" = "no"
- then
- as_fn_error $? "I/O Pool example requires Thread Local Storage" "$LINENO" 5
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_IO_POOL -DXMALLOC_USER"
-fi
-
-
-# Certificate Service Support
-# Check whether --enable-certservice was given.
-if test "${enable_certservice+set}" = set; then :
- enableval=$enable_certservice; ENABLED_CERT_SERVICE=$enableval
-else
- ENABLED_CERT_SERVICE=no
-
-fi
-
-if test "$ENABLED_CERT_SERVICE" = "yes"
-then
- # Requires ecc,certgen, and opensslextra make sure on
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
- if test "x$ENABLED_ECC" = "xno"
- then
- ENABLED_ECC="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256"
-
- if test "$ENABLED_ECC_SHAMIR" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"
- fi
- fi
- if test "x$ENABLED_OPENSSLEXTRA" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_CERT_SERVICE"
-fi
-
-
-# wolfSSL JNI
-# Check whether --enable-jni was given.
-if test "${enable_jni+set}" = set; then :
- enableval=$enable_jni; ENABLED_JNI=$enableval
-else
- ENABLED_JNI=no
-
-fi
-
-if test "$ENABLED_JNI" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_JNI -DHAVE_EX_DATA"
-
- # Enable prereqs if not already enabled
- if test "x$ENABLED_DTLS" = "xno"
- then
- ENABLED_DTLS="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DTLS"
- fi
- if test "x$ENABLED_OPENSSLEXTRA" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_EXTRA"
- fi
- if test "x$ENABLED_OPENSSLALL" = "xno"
- then
- ENABLED_OPENSSLALL="yes"
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_ALL"
- fi
- if test "x$ENABLED_CRL" = "xno"
- then
- ENABLED_CRL="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
- fi
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
- if test "x$ENABLED_CRL_MONITOR" = "xno" && test "x$ENABLED_DISTRO" = "xno"
- then
- ENABLED_CRL_MONITOR="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR"
- fi
- if test "x$ENABLED_SAVESESSION" = "xno"
- then
- ENABLED_SAVESESSION="yes"
- AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE"
- fi
- if test "x$ENABLED_SAVECERT" = "xno"
- then
- ENABLED_SAVECERT="yes"
- AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE"
- fi
- if test "x$ENABLED_ATOMICUSER" = "xno"
- then
- ENABLED_ATOMICUSER="yes"
- AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER"
- fi
- if test "x$ENABLED_ECC" = "xno"
- then
- ENABLED_ECC="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256"
-
- if test "$ENABLED_ECC_SHAMIR" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"
- fi
- fi
- if test "x$ENABLED_PKCALLBACKS" = "xno"
- then
- ENABLED_PKCALLBACKS="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS"
- fi
- if test "x$ENABLED_DH" = "xno"
- then
- ENABLED_DH="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_DH"
- fi
- if test "x$ENABLED_PSK" = "xno"
- then
- ENABLED_PSK="yes"
- fi
- if test "x$ENABLED_CERTEXT" = "xno"
- then
- ENABLED_CERTEXT="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
- fi
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
- if test "x$ENABLED_SNI" = "xno"
- then
- ENABLED_SNI="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI"
- fi
- if test "x$ENABLED_ALPN" = "xno"
- then
- ENABLED_ALPN="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ALPN"
- fi
-fi
-
-# lighty Support
-# Check whether --enable-lighty was given.
-if test "${enable_lighty+set}" = set; then :
- enableval=$enable_lighty; ENABLED_LIGHTY=$enableval
-else
- ENABLED_LIGHTY=no
-
-fi
-
-if test "$ENABLED_LIGHTY" = "yes"
-then
- # Requires opensslextra make sure on
- if test "x$ENABLED_OPENSSLEXTRA" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_LIGHTY -DHAVE_WOLFSSL_SSL_H=1"
-fi
-
-if test "$ENABLED_NGINX" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NGINX -DWOLFSSL_SIGNER_DER_CERT"
-fi
-
-if test "$ENABLED_HAPROXY" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAPROXY"
- # Requires opensslextra make sure on
- if test "x$ENABLED_OPENSSLEXTRA" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
- fi
-fi
-
-if test "$ENABLED_SIGNAL" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SIGNAL"
- # Requires opensslextra make sure on
- if test "x$ENABLED_OPENSSLEXTRA" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
- fi
-fi
-
-if test "$ENABLED_OPENVPN" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DES_ECB -DHAVE_EX_DATA -DWOLFSSL_KEY_GEN -DWOLFSSL_OPENVPN"
-fi
-
-
-if test "$ENABLED_NGINX" = "yes"|| test "x$ENABLED_HAPROXY" = "xyes" || test "x$ENABLED_LIGHTY" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_VERIFY_CB"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_KEEP_SNI"
- AM_CFLAGS="$AM_CFLAGS -DKEEP_OUR_CERT -DKEEP_PEER_CERT"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_EXT_CACHE -DHAVE_EX_DATA"
-fi
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_QT" = "yes"
-then
- ENABLED_ARC4="yes"
-fi
-
-if test "$ENABLED_ARC4" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_RC4"
-else
- # turn off ARC4 if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_RC4"
- ENABLED_ARC4=no
- fi
-fi
-
-# Asio Support
-# Check whether --enable-asio was given.
-if test "${enable_asio+set}" = set; then :
- enableval=$enable_asio; ENABLED_ASIO=$enableval
-else
- ENABLED_ASIO=no
-
-fi
-
-if test "$ENABLED_ASIO" = "yes"
-then
- # Requires opensslextra and opensslall
- if test "x$ENABLED_OPENSSLALL" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLALL="yes"
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA -DOPENSSL_ALL $AM_CFLAGS"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ASIO -DASIO_USE_WOLFSSL -DWOLFSSL_KEY_GEN"
- AM_CFLAGS="$AM_CFLAGS -DBOOST_ASIO_USE_WOLFSSL -DHAVE_EX_DATA"
- AM_CFLAGS="$AM_CFLAGS -DSSL_TXT_TLSV1_2 -DSSL_TXT_TLSV1_1"
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3"
- if test "$ENABLED_TLSV10" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DSSL_TXT_TLSV1"
- fi
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-fi
-
-# Apache HTTPD
-# Check whether --enable-apachehttpd was given.
-if test "${enable_apachehttpd+set}" = set; then :
- enableval=$enable_apachehttpd; ENABLED_APACHE_HTTPD=$enableval
-else
- ENABLED_APACHE_HTTPD=no
-
-fi
-
-if test "$ENABLED_APACHE_HTTPD" = "yes"
-then
- # Requires opensslextra and opensslall
- if test "x$ENABLED_OPENSSLALL" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLALL="yes"
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA -DOPENSSL_ALL $AM_CFLAGS"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_APACHE_HTTPD"
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 -DOPENSSL_NO_COMP"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_EX_DATA -DWOLFSSL_SIGNER_DER_CERT"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT -DWOLFSSL_CERT_GEN"
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-
- # Requires sessioncerts make sure on
- if test "x$ENABLED_SESSIONCERTS" = "xno"
- then
- ENABLED_SESSIONCERTS="yes"
- AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS"
- fi
-
- # Requires ALPN
- if test "x$ENABLED_ALPN" = "xno"
- then
- ENABLED_ALPN="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_ALPN"
- fi
-
- # Requires CRL
- if test "x$ENABLED_CRL" = "xno"
- then
- ENABLED_CRL="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
- fi
-
- # Requires Certificate Generation, Request and Extensions
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
- if test "x$ENABLED_CERTREQ" = "xno"
- then
- ENABLED_CERTREQ="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_REQ"
- fi
- if test "x$ENABLED_CERTEXT" = "xno"
- then
- ENABLED_CERTEXT="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
- fi
-
- # Requires Secure Renegotiation
- if test "x$ENABLED_SECURE_RENEGOTIATION" = "xno"
- then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SECURE_RENEGOTIATION -DHAVE_SERVER_RENEGOTIATION_INFO"
- fi
-fi
-
-# Encrypt-Then-Mac
-# Check whether --enable-enc-then-mac was given.
-if test "${enable_enc_then_mac+set}" = set; then :
- enableval=$enable_enc_then_mac; ENABLED_ENCRYPT_THEN_MAC=$enableval
-else
- ENABLED_ENCRYPT_THEN_MAC=yes
-
-fi
-
-
-if test "x$ENABLED_APACHE_HTTPD" = "xyes"
-then
- ENABLED_ENCRYPT_THEN_MAC=no
-fi
-
-if test "x$ENABLED_TLSX" = "xyes"
-then
- ENABLED_ENCRYPT_THEN_MAC=yes
-fi
-
-if test "x$ENABLED_SNIFFER" = "xyes"; then :
- ENABLED_ENCRYPT_THEN_MAC="no"
-fi
-
-if test "x$ENABLED_ENCRYPT_THEN_MAC" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ENCRYPT_THEN_MAC"
-fi
-
-
-# stunnel Support
-# Check whether --enable-stunnel was given.
-if test "${enable_stunnel+set}" = set; then :
- enableval=$enable_stunnel; ENABLED_STUNNEL=$enableval
-else
- ENABLED_STUNNEL=no
-
-fi
-
-if test "$ENABLED_WPAS" = "yes"
-then
- ENABLED_STUNNEL="yes"
-fi
-if test "$ENABLED_STUNNEL" = "yes"
-then
- # Requires opensslextra make sure on
- if test "x$ENABLED_OPENSSLEXTRA" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
- fi
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-
- # Requires coding make sure on
- if test "x$ENABLED_CODING" = "xno"
- then
- ENABLED_CODING="yes"
- fi
-
- # Requires sessioncerts make sure on
- if test "x$ENABLED_SESSIONCERTS" = "xno"
- then
- ENABLED_SESSIONCERTS="yes"
- AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS"
- fi
-
- # Requires crls, make sure on
- if test "x$ENABLED_CRL" = "xno"
- then
- ENABLED_CRL="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
- fi
-
- # Requires DES3, make sure on
- if test "x$ENABLED_DES3" = "xno"
- then
- ENABLED_DES3="yes"
- fi
-
- # Requires tlsx, make sure on
- if test "x$ENABLED_TLSX" = "xno"
- then
- ENABLED_TLSX="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC"
-
- # Check the ECC supported curves prereq
- if test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_CURVE25519" = "xyes"; then :
- ENABLED_SUPPORTED_CURVES=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SUPPORTED_CURVES"
-fi
- fi
-
- # Requires ecc make sure on
- if test "x$ENABLED_ECC" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- ENABLED_ECC="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256"
-
- if test "$ENABLED_ECC_SHAMIR" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"
- fi
- fi
-
- # Requires wolfSSL_OBJ_txt2nid
- if test "x$ENABLED_CERTEXT" = "xno"
- then
- ENABLED_CERTEXT="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
- fi
-
- # Requires certgen
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_STUNNEL -DWOLFSSL_ALWAYS_VERIFY_CB"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_KEEP_SNI -DHAVE_EX_DATA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DES_ECB"
-fi
-
-if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "no" \
- && test "x$ENABLED_STUNNEL" = "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_PSK"
-fi
-
-if test "$ENABLED_PSK" = "no" && \
- (test "$ENABLED_LEANPSK" = "yes" || test "x$ENABLED_STUNNEL" = "xyes")
-then
- ENABLED_PSK=yes
-fi
-
-# MD4
-# Check whether --enable-md4 was given.
-if test "${enable_md4+set}" = set; then :
- enableval=$enable_md4; ENABLED_MD4=$enableval
-else
- ENABLED_MD4=no
-
-fi
-
-
-
-if test "$ENABLED_MD4" = "no"
-then
- #turn on MD4 if using stunnel
- if test "x$ENABLED_STUNNEL" = "xyes"
- then
- ENABLED_MD4="yes"
- else
- AM_CFLAGS="$AM_CFLAGS -DNO_MD4"
- fi
-fi
-
-
-# Encrypted keys
-# Check whether --enable-enckeys was given.
-if test "${enable_enckeys+set}" = set; then :
- enableval=$enable_enckeys; ENABLED_ENCKEYS=$enableval
-else
- ENABLED_ENCKEYS=no
-
-fi
-
-
-if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_WEBSERVER" = "yes" || test "$ENABLED_WPAS" != "no"
-then
- ENABLED_ENCKEYS=yes
-fi
-
-if test "$ENABLED_ENCKEYS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ENCRYPTED_KEYS"
-fi
-
-
-# PWDBASED has to come after certservice since we want it on w/o explicit on
-# PWDBASED
-# Check whether --enable-pwdbased was given.
-if test "${enable_pwdbased+set}" = set; then :
- enableval=$enable_pwdbased; ENABLED_PWDBASED=$enableval
-else
- ENABLED_PWDBASED=no
-
-fi
-
-
-if test "$ENABLED_PWDBASED" = "no"
-then
- if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_OPENSSLALL" = "yes" || test "$ENABLED_WEBSERVER" = "yes" || test "$ENABLED_ENCKEYS" = "yes"
- then
- # opensslextra, opensslall, webserver, and enckeys needs pwdbased
- ENABLED_PWDBASED=yes
- else
- AM_CFLAGS="$AM_CFLAGS -DNO_PWDBASED"
- fi
-fi
-
-
-# Check whether --enable-scrypt was given.
-if test "${enable_scrypt+set}" = set; then :
- enableval=$enable_scrypt; ENABLED_SCRYPT=$enableval
-else
- ENABLED_SCRYPT=no
-
-fi
-
-
-if test "$ENABLED_SCRYPT" = "yes"
-then
- if test "$ENABLED_PWDBASED" = "no"
- then
- as_fn_error $? "cannot enable scrypt without enabling pwdbased." "$LINENO" 5
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SCRYPT"
-fi
-
-
-# wolfCrypt Only Build
-# Check whether --enable-cryptonly was given.
-if test "${enable_cryptonly+set}" = set; then :
- enableval=$enable_cryptonly; ENABLED_CRYPTONLY=$enableval
-else
- ENABLED_CRYPTONLY=no
-fi
-
-
-if test "x$FIPS_VERSION" = "xrand"; then :
- ENABLED_CRYPTONLY="yes"
-fi
-
-if test "$ENABLED_CRYPTONLY" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFCRYPT_ONLY"
-fi
-
-if test "x$ENABLED_CRYPTONLY" = "xno"
-then
- if test "x$ENABLED_PSK" = "xno" && test "x$ENABLED_ASN" = "xno"
- then
- as_fn_error $? "please enable psk if disabling asn." "$LINENO" 5
- fi
-
- if test "x$ENABLED_ECC" != "xno" && test "x$ENABLED_ASN" = "xno"
- then
- as_fn_error $? "please disable ecc if disabling asn." "$LINENO" 5
- fi
-
- if test "$ENABLED_AFALG" = "yes"
- then
- # for TLS connections the intermediate hash needs to store buffer
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_HASH_KEEP"
- fi
-
- if test "$ENABLED_DEVCRYPTO" = "yes"
- then
- # for TLS connections the intermediate hash needs to store buffer
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_HASH_KEEP"
- fi
-fi
-
-# set fastmath default
-FASTMATH_DEFAULT=no
-
-if test "$host_cpu" = "x86_64" || test "$host_cpu" = "aarch64"
-then
- FASTMATH_DEFAULT=yes
-fi
-if test "$ENABLED_SP_MATH" = "yes"
-then
- FASTMATH_DEFAULT=no
-fi
-
-# fastmath
-# Check whether --enable-fastmath was given.
-if test "${enable_fastmath+set}" = set; then :
- enableval=$enable_fastmath; ENABLED_FASTMATH=$enableval
-else
- ENABLED_FASTMATH=$FASTMATH_DEFAULT
-
-fi
-
-
-if test "x$ENABLED_FASTMATH" = "xyes"
-then
- # turn off fastmth if leanpsk on or asn off (w/o DH and ECC)
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_ASN" = "no"
- then
- if test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no" && test "$ENABLED_RSA" = "no"
- then
- ENABLED_FASTMATH=no
- else
- AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH"
- ENABLED_SLOWMATH="no"
- fi
- else
- AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH"
- ENABLED_SLOWMATH="no"
- fi
- if test "$host_cpu" = "x86_64"
- then
- # Have settings.h set FP_MAX_BITS higher if user didn't set directly
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_X86_64_BUILD"
- fi
-fi
-
-
-# fast HUGE math
-# Check whether --enable-fasthugemath was given.
-if test "${enable_fasthugemath+set}" = set; then :
- enableval=$enable_fasthugemath; ENABLED_FASTHUGEMATH=$enableval
-else
- ENABLED_FASTHUGEMATH=no
-
-fi
-
-
-if test "$ENABLED_BUMP" = "yes"
-then
- ENABLED_FASTHUGEMATH="yes"
-fi
-
-if test "$ENABLED_FASTHUGEMATH" = "yes"
-then
- ENABLED_FASTMATH="yes"
- AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH"
- ENABLED_SLOWMATH="no"
-fi
-
-
-# Enable Examples, used to disable examples
-# Check whether --enable-examples was given.
-if test "${enable_examples+set}" = set; then :
- enableval=$enable_examples; ENABLED_EXAMPLES=$enableval
-else
- ENABLED_EXAMPLES=yes
-
-fi
-
-
-if test "x$ENABLED_FILESYSTEM" = "xno"; then :
- ENABLED_EXAMPLES="no"
-fi
-if test "x$ENABLED_INLINE" = "xno"; then :
- ENABLED_EXAMPLES="no"
-fi
-if test "x$ENABLED_CRYPTONLY" = "xyes"; then :
- ENABLED_EXAMPLES="no"
-fi
-
-
-# Enable wolfCrypt test and benchmark
-# Check whether --enable-crypttests was given.
-if test "${enable_crypttests+set}" = set; then :
- enableval=$enable_crypttests; ENABLED_CRYPT_TESTS=$enableval
-else
- ENABLED_CRYPT_TESTS=yes
-
-fi
-
-
-
-# LIBZ
-ENABLED_LIBZ="no"
-trylibzdir=""
-
-# Check whether --with-libz was given.
-if test "${with_libz+set}" = set; then :
- withval=$with_libz;
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libz" >&5
-$as_echo_n "checking for libz... " >&6; }
- CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ"
- LIBS="$LIBS -lz"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
- deflateInit(0, 8);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- libz_linked=yes
-else
- libz_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$libz_linked" = "xno" ; then
- if test "x$withval" != "xno" ; then
- trylibzdir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- trylibzdir="/usr"
- fi
-
- LDFLAGS="$LDFLAGS -L$trylibzdir/lib"
- CPPFLAGS="$CPPFLAGS -I$trylibzdir/include"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
- deflateInit(0, 8);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- libz_linked=yes
-else
- libz_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$libz_linked" = "xno" ; then
- as_fn_error $? "libz isn't found.
- If it's already installed, specify its path using --with-libz=/dir/" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- ENABLED_LIBZ="yes"
-
-
-fi
-
-
-
-# PKCS#11
-# Check whether --enable-pkcs11 was given.
-if test "${enable_pkcs11+set}" = set; then :
- enableval=$enable_pkcs11; ENABLED_PKCS11=$enableval
-else
- ENABLED_PKCS11=no
-
-fi
-
-
-if test "x$ENABLED_PKCS11" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS11 -DHAVE_WOLF_BIGINT"
- LIBS="$LIBS -ldl"
-fi
-
-
-# PKCS#12
-# Check whether --enable-pkcs12 was given.
-if test "${enable_pkcs12+set}" = set; then :
- enableval=$enable_pkcs12; ENABLED_PKCS12=$enableval
-else
- ENABLED_PKCS12=yes
-
-fi
-
-
-if test "x$ENABLED_PKCS12" = "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_PKCS12"
-fi
-
-
-# cavium
-trycaviumdir=""
-
-# Check whether --with-cavium was given.
-if test "${with_cavium+set}" = set; then :
- withval=$with_cavium;
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cavium" >&5
-$as_echo_n "checking for cavium... " >&6; }
- CPPFLAGS="$CPPFLAGS -DHAVE_CAVIUM"
- LIB_ADD="-lrt $LIB_ADD"
-
- if test "x$withval" = "xyes" ; then
- as_fn_error $? "need a PATH for --with-cavium" "$LINENO" 5
- fi
- if test "x$withval" != "xno" ; then
- trycaviumdir=$withval
- fi
-
- LDFLAGS="$AM_LDFLAGS $trycaviumdir/api/cavium_common.o"
- CPPFLAGS="$CPPFLAGS -I$trycaviumdir/include"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include "cavium_common.h"
-int
-main ()
-{
- CspShutdown(CAVIUM_DEV_ID);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- cavium_linked=yes
-else
- cavium_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$cavium_linked" = "xno" ; then
- as_fn_error $? "cavium isn't found.
- If it's already installed, specify its path using --with-cavium=/dir/" "$LINENO" 5
- else
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CAVIUM"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- enable_shared=no
- enable_static=yes
- ENABLED_CAVIUM=yes
-
-else
- ENABLED_CAVIUM=no
-
-fi
-
-
-# cavium V
-trycaviumdir=""
-
-# Check whether --with-cavium-v was given.
-if test "${with_cavium_v+set}" = set; then :
- withval=$with_cavium_v;
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cavium" >&5
-$as_echo_n "checking for cavium... " >&6; }
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CAVIUM -DHAVE_CAVIUM_V"
- LIB_ADD="-lrt -lcrypto $LIB_ADD"
-
- if test "x$withval" = "xyes" ; then
- as_fn_error $? "need a PATH for --with-cavium" "$LINENO" 5
- fi
- if test "x$withval" != "xno" ; then
- trycaviumdir=$withval
- fi
-
- as_ac_File=`$as_echo "ac_cv_file_$trycaviumdir/lib/libnitrox.a" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $trycaviumdir/lib/libnitrox.a" >&5
-$as_echo_n "checking for $trycaviumdir/lib/libnitrox.a... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$trycaviumdir/lib/libnitrox.a"; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$trycaviumdir/lib/libnitrox.a" | $as_tr_cpp` 1
-_ACEOF
-AM_CPPFLAGS="-I$trycaviumdir/include $AM_CPPFLAGS"
-else
- ENABLED_CAVIUM_V=no
-fi
-
- LIB_STATIC_ADD="$trycaviumdir/lib/libnitrox.a $LIB_STATIC_ADD"
-
- if test "$ENABLED_CAVIUM_V" = "no"; then
- as_fn_error $? "Could not find Nitrox library" "$LINENO" 5
- fi
-
- enable_shared=no
- enable_static=yes
- enable_opensslextra=yes
-
- ENABLED_CAVIUM=yes
- ENABLED_CAVIUM_V=yes
-
-else
-
- ENABLED_CAVIUM_=no
- ENABLED_CAVIUM_V=no
-
-
-fi
-
-
-
-# Cavium Octeon
-OCTEON_ROOT=""
-: ${OCTEON_OBJ="obj-octeon2"}
-: ${OCTEON_HOST="standalone"}
-
-
-# Check whether --with-octeon-sync was given.
-if test "${with_octeon_sync+set}" = set; then :
- withval=$with_octeon_sync;
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for octeon" >&5
-$as_echo_n "checking for octeon... " >&6; }
-
- if test "x$withval" = "xyes" ; then
- as_fn_error $? "need a PATH for --with-octeon" "$LINENO" 5
- fi
- if test "x$withval" != "xno" ; then
- OCTEON_ROOT=$withval
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CAVIUM_OCTEON_SYNC"
- AM_CFLAGS="$AM_CFLAGS -DOCTEON_MODEL=$OCTEON_MODEL"
- AM_CFLAGS="$AM_CFLAGS -I$OCTEON_ROOT/executive"
- case $OCTEON_HOST in #(
- 'linux') :
- AM_CFLAGS="$AM_CFLAGS -DCVMX_BUILD_FOR_LINUX_HOST" ;; #(
- *) :
- ;;
-esac
-
- #-I$OCTEON_ROOT/target/include
- AM_LDFLAGS="$AM_LDFLAGS -lrt -Xlinker -T -Xlinker $OCTEON_ROOT/executive/cvmx-shared-linux.ld"
- AM_LDFLAGS="$AM_LDFLAGS -L$OCTEON_ROOT/executive/$OCTEON_OBJ -lcvmx -lfdt"
-
- enable_shared=no
- enable_static=yes
-
- ENABLED_OCTEON_SYNC=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
- ENABLED_OCTEON_SYNC=no
-
-fi
-
-
-
-# Intel QuickAssist
-QAT_DIR=""
-BUILD_INTEL_QAT_VERSION=2
-
-
-# Check whether --with-intelqa was given.
-if test "${with_intelqa+set}" = set; then :
- withval=$with_intelqa; ENABLED_INTEL_QA=yes; QAT_DIR=$withval
-else
- ENABLED_INTEL_QA=no
-fi
-
-
-
-# Check whether --with-intelqa-sync was given.
-if test "${with_intelqa_sync+set}" = set; then :
- withval=$with_intelqa_sync; ENABLED_INTEL_QA_SYNC=yes; QAT_DIR=$withval
-else
- ENABLED_INTEL_QA_SYNC=no
-fi
-
-
-if test "x$ENABLED_INTEL_QA" = "xyes" && test "x$ENABLED_INTEL_QA_SYNC" = "xyes"; then :
- as_fn_error $? "Both Intel QA Async and Sync are selected, only select one." "$LINENO" 5
-fi
-
-if test "x$ENABLED_INTEL_QA" = "xyes" || test "x$ENABLED_INTEL_QA_SYNC" = "xyes"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intelqa" >&5
-$as_echo_n "checking for intelqa... " >&6; }
- if test "x$ENABLED_INTEL_QA" = "xyes"; then :
- AM_CPPFLAGS="$AM_CPPFLAGS -DHAVE_INTEL_QA -DDO_CRYPTO -DUSER_SPACE"; intelqa_opt=""
-else
- AM_CPPFLAGS="$AM_CPPFLAGS -DHAVE_INTEL_QA_SYNC -DQAT_USE_POLLING_THREAD -DO_CRYPTO -DUSER_SPACE"; intelqa_opt="-sync"
-fi
- OLD_LIBS="$LIBS"
- OLD_CPPFLAGS="$CPPFLAGS"
-
- if test "x$QAT_DIR" = "xyes"; then :
- as_fn_error $? "need a PATH for --with-intelqa$intelqa_opt" "$LINENO" 5
-fi
-
- AM_CPPFLAGS="$AM_CPPFLAGS -I$QAT_DIR/quickassist/include -I$QAT_DIR/quickassist/include/lac -I$QAT_DIR/quickassist/utilities/osal/include \
- -I$QAT_DIR/quickassist/utilities/osal/src/linux/user_space/include -I$QAT_DIR/quickassist/lookaside/access_layer/include \
- -I$QAT_DIR/quickassist/lookaside/access_layer/src/common/include -I$srcdir/wolfssl -I$srcdir/wolfssl/wolfcrypt/port/intel \
- -I$QAT_DIR/quickassist/utilities/libusdm_drv"
- CPPFLAGS="$AM_CPPFLAGS"
-
- LDFLAGS="$LDFLAGS -L$QAT_DIR/build"
- LIBS="$LIBS -lqat_s -lusdm_drv_s"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include "cpa_cy_common.h"
-int
-main ()
-{
-Cpa16U count = 0; cpaCyGetNumInstances(&count);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- intelqa_linked=yes
-else
- intelqa_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$intelqa_linked" = "xno"; then :
- # Try old QAT driver libraries
- LIBS="$OLD_LIBS -licp_qa_al_s"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include "cpa_cy_common.h"
-int
-main ()
-{
-Cpa16U count = 0; cpaCyGetNumInstances(&count);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- intelqa_linked=yes
-else
- intelqa_linked=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "x$intelqa_linked" = "xno"; then :
- as_fn_error $? "Intel QuickAssist not found. If it's already installed, specify its path using --with-intelqa$intelqa_opt=/dir/" "$LINENO" 5
-else
- BUILD_INTEL_QAT_VERSION=1
-fi
-
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
- if test "x$BUILD_INTEL_QAT_VERSION" = "x1"; then :
- LIB_ADD="-ladf_proxy -losal -lrt $LIB_ADD"
-else
- LIB_ADD="-losal -lrt $LIB_ADD"
-fi
- CPPFLAGS="$OLD_CPPFLAGS"
-
-fi
-
-
-# Single Precision maths implementation
-# Check whether --enable-sp was given.
-if test "${enable_sp+set}" = set; then :
- enableval=$enable_sp; ENABLED_SP=$enableval
-else
- ENABLED_SP=no
-fi
-
-
-ENABLED_SP_RSA=no
-ENABLED_SP_DH=no
-ENABLED_SP_FF_2048=no
-ENABLED_SP_FF_3072=no
-ENABLED_SP_FF_4096=no
-ENABLED_SP_ECC=no
-ENABLED_SP_EC_256=no
-ENABLED_SP_EC_384=no
-ENABLED_SP_NO_MALLOC=no
-ENABLED_SP_NONBLOCK=no
-for v in `echo $ENABLED_SP | tr "," " "`
-do
- case $v in
- small)
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_2048=yes
- ENABLED_SP_FF_3072=yes
- ENABLED_SP_ECC=yes
- ENABLED_SP_SMALL=yes
- ENABLED_SP_EC_256=yes
- if test "$host_cpu" = "x86_64"; then
- ENABLED_SP_FF_4096=yes
- ENABLED_SP_EC_384=yes
- fi
- ;;
-
- yes)
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_2048=yes
- ENABLED_SP_FF_3072=yes
- ENABLED_SP_ECC=yes
- ENABLED_SP_EC_256=yes
- if test "$host_cpu" = "x86_64"; then
- ENABLED_SP_FF_4096=yes
- ENABLED_SP_EC_384=yes
- fi
- ;;
-
- no)
- ;;
-
- smallec256 | smallp256 | small256)
- ENABLED_SP_ECC=yes
- ENABLED_SP_SMALL=yes
- ENABLED_SP_EC_256=yes
- ;;
- ec256 | p256 | 256)
- ENABLED_SP_ECC=yes
- ENABLED_SP_EC_256=yes
- ;;
- smallec384 | smallp384 | small384)
- ENABLED_SP_ECC=yes
- ENABLED_SP_SMALL=yes
- ENABLED_SP_EC_384=yes
- ;;
- ec384 | p384 | 384)
- ENABLED_SP_ECC=yes
- ENABLED_SP_EC_384=yes
- ;;
-
- small2048)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_2048=yes
- ;;
- 2048)
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_2048=yes
- ;;
- smallrsa2048)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_2048=yes
- ;;
- rsa2048)
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_2048=yes
- ;;
-
- small3072)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_3072=yes
- ;;
- 3072)
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_3072=yes
- ;;
- smallrsa3072)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_3072=yes
- ;;
- rsa3072)
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_3072=yes
- ;;
-
- small4096)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_4096=yes
- ;;
- 4096 | +4096)
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_4096=yes
- ;;
- smallrsa4096)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_4096=yes
- ;;
- rsa4096)
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_4096=yes
- ;;
-
- nomalloc)
- ENABLED_SP_NO_MALLOC=yes
- ;;
-
- nonblock)
- # Requires small and no malloc
- ENABLED_SP_NONBLOCK=yes
- ENABLED_SP_NO_MALLOC=yes
- ENABLED_SP_SMALL=yes
- ;;
-
- *)
- as_fn_error $? "Invalid choice of Single Precision length in bits 256, 2048, 3072: $ENABLED_SP." "$LINENO" 5
- break;;
- esac
-done
-
-ENABLED_SP=no
-if test "$ENABLED_RSA" = "yes" && test "$ENABLED_SP_RSA" = "yes"; then
- ENABLED_SP=yes
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_SP_RSA"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_HAVE_SP_RSA"
-fi
-if test "$ENABLED_DH" = "yes" && test "$ENABLED_SP_DH" = "yes"; then
- ENABLED_SP=yes
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_SP_DH"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_HAVE_SP_DH"
-fi
-if test "$ENABLED_SP_RSA" = "yes" || test "$ENABLED_SP_DH" = "yes"; then
- if test "$ENABLED_SP_FF_2048" = "no"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NO_2048"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NO_2048"
- fi
- if test "$ENABLED_SP_FF_3072" = "no"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NO_3072"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NO_3072"
- fi
- if test "$ENABLED_SP_FF_4096" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_4096"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_4096"
- fi
-fi
-if test "$ENABLED_ECC" != "no" && test "$ENABLED_SP_ECC" = "yes"; then
- ENABLED_SP=yes
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_SP_ECC"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_HAVE_SP_ECC"
- if test "$ENABLED_SP_EC_256" = "no"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NO_256"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NO_256"
- fi
- if test "$ENABLED_SP_EC_384" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC384 -DWOLFSSL_SP_384"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_384"
- fi
-fi
-if test "$ENABLED_SP_SMALL" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_SMALL"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_SMALL"
-fi
-if test "$ENABLED_SP_NO_MALLOC" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NO_MALLOC"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NO_MALLOC"
-fi
-if test "$ENABLED_SP_NONBLOCK" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NONBLOCK"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NONBLOCK"
-fi
-
-
-# Check whether --enable-sp-asm was given.
-if test "${enable_sp_asm+set}" = set; then :
- enableval=$enable_sp_asm; ENABLED_SP_ASM=$enableval
-else
- ENABLED_SP_ASM=no
-fi
-
-if test "$ENABLED_SP_ASM" = "yes"; then
- if test "$ENABLED_SP" = "no"; then
- as_fn_error $? "Must have SP enabled: --enable-sp" "$LINENO" 5
- fi
- if test "$ENABLED_SP_NONBLOCK" = "yes"; then
- as_fn_error $? "SP non-blocking not supported with sp-asm" "$LINENO" 5
- fi
- if test "$ENABLED_ASM" = "no"; then
- as_fn_error $? "Assembly code turned off" "$LINENO" 5
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_ASM"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ASM"
- case $host_cpu in
- *aarch64*)
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_ARM64_ASM"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ARM64_ASM"
- ENABLED_SP_ARM64_ASM=yes
- ;;
- *arm*)
- if test $host_alias = "thumb"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_ARM_THUMB_ASM -mthumb -march=armv6"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ARM_THUMB_ASM"
- ENABLED_SP_ARM_THUMB_ASM=yes
- else
- if test $host_alias = "cortex"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_ARM_CORTEX_M_ASM -mcpu=cortex-r5"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ARM_CORTEX_M_ASM"
- ENABLED_SP_ARM_CORTEX_ASM=yes
- else
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_ARM32_ASM"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ARM32_ASM"
- ENABLED_SP_ARM32_ASM=yes
- fi
- fi
- ;;
- *x86_64*)
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_X86_64_ASM"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_X86_64_ASM"
- ENABLED_SP_X86_64_ASM=yes
- ;;
- *)
- as_fn_error $? "ASM not available for CPU. Supported CPUs: x86_64, aarch64, arm" "$LINENO" 5
- ;;
- esac
-fi
-
-# Check whether --enable-sp-math was given.
-if test "${enable_sp_math+set}" = set; then :
- enableval=$enable_sp_math; ENABLED_SP_MATH=$enableval
-else
- ENABLED_SP_MATH=no
-fi
-
-if test "$ENABLED_SP_MATH" = "yes"; then
- if test "$ENABLED_SP" = "no"; then
- as_fn_error $? "Must have SP enabled: --enable-sp" "$LINENO" 5
- fi
- if test "$ENABLED_ECCCUSTCURVES" = "yes"; then
- as_fn_error $? "Cannot use single precision math and custom curves" "$LINENO" 5
- fi
- if test "$ENABLED_OPENSSLEXTRA" = "yes"; then
- as_fn_error $? "Cannot use single precision math and OpenSSL extra" "$LINENO" 5
- fi
- if test "$ENABLED_DSA" = "yes"; then
- as_fn_error $? "Cannot use single precision math and DSA" "$LINENO" 5
- fi
- if test "$ENABLED_SRP" = "yes"; then
- as_fn_error $? "Cannot use single precision math and SRP" "$LINENO" 5
- fi
- if test "$ENABLED_SP_RSA" = "no" && test "$ENABLED_RSA" = "yes"; then
- as_fn_error $? "Cannot use RSA single precision only math and RSA" "$LINENO" 5
- fi
- if test "$ENABLED_SP_DH" = "no" && test "$ENABLED_DH" = "yes"; then
- as_fn_error $? "Cannot use DH single precision only math and DH" "$LINENO" 5
- fi
-
- ENABLED_FASTMATH="no"
- ENABLED_SLOWMATH="no"
-fi
-if test "$ENABLED_SP_MATH" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_MATH"
-fi
-
-
-# Fast RSA using Intel IPP
-ippdir="${srcdir}/IPP"
-ipplib="lib" # if autoconf guesses 32bit system changes lib directory
-fastRSA_found=no
-abs_path=`pwd`
-
-# set up variables used
-IPPLIBS=
-IPPHEADERS=
-IPPLINK=
-
-# Check whether --enable-fast-rsa was given.
-if test "${enable_fast_rsa+set}" = set; then :
- enableval=$enable_fast_rsa; ENABLED_FAST_RSA=$enableval
-else
- ENABLED_FAST_RSA=no
-fi
-
-
-# Fast RSA does not support RSA-PSS
-if test "$ENABLED_RSAPSS" = "yes"; then
- ENABLED_FAST_RSA=no
-fi
-
-if test "$ENABLED_USER_RSA" = "no" && test "$ENABLED_FIPS" = "no"; then
-
- if test "$ac_cv_sizeof_long" = "4" && test "$ac_cv_sizeof_long_long" = "8"; then
- ipplib="lib_32" # 32 bit OS detected
- fi
-
-# Use static IPP Libraries
-if test "$enable_shared" = "no" && test "$ENABLED_FAST_RSA" = "yes"; then
- case $host_os in
- *darwin*)
- ipplib="$ipplib/mac_static"
- as_fn_error $? "Issue with static linking to libippcp.a on Mac.
- Dynamic IPP libraries supported on Mac" "$LINENO" 5
- break;;
-
- *linux*)
- ipplib="$ipplib/linux_static"
- break;;
- *)
- ENABLED_FAST_RSA=no
- esac
-
- as_ac_File=`$as_echo "ac_cv_file_$srcdir/IPP/$ipplib/libippcore.a" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $srcdir/IPP/$ipplib/libippcore.a" >&5
-$as_echo_n "checking for $srcdir/IPP/$ipplib/libippcore.a... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$srcdir/IPP/$ipplib/libippcore.a"; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$srcdir/IPP/$ipplib/libippcore.a" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ENABLED_FAST_RSA=no
-fi
-as_ac_File=`$as_echo "ac_cv_file_$srcdir/IPP/$ipplib/libippcp.a" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $srcdir/IPP/$ipplib/libippcp.a" >&5
-$as_echo_n "checking for $srcdir/IPP/$ipplib/libippcp.a... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$srcdir/IPP/$ipplib/libippcp.a"; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$srcdir/IPP/$ipplib/libippcp.a" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ENABLED_FAST_RSA=no
-fi
-
- as_ac_File=`$as_echo "ac_cv_file_$srcdir/IPP/include/ipp.h" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $srcdir/IPP/include/ipp.h" >&5
-$as_echo_n "checking for $srcdir/IPP/include/ipp.h... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$srcdir/IPP/include/ipp.h"; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$srcdir/IPP/include/ipp.h" | $as_tr_cpp` 1
-_ACEOF
-AM_CPPFLAGS="-I$srcdir/IPP/include $AM_CPPFLAGS"
-else
- ENABLED_FAST_RSA=no
-fi
-as_ac_File=`$as_echo "ac_cv_file_$srcdir/IPP/include/ippcp.h" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $srcdir/IPP/include/ippcp.h" >&5
-$as_echo_n "checking for $srcdir/IPP/include/ippcp.h... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$srcdir/IPP/include/ippcp.h"; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$srcdir/IPP/include/ippcp.h" | $as_tr_cpp` 1
-_ACEOF
-AM_CPPFLAGS="-I$srcdir/IPP/include $AM_CPPFLAGS"
-else
- ENABLED_FAST_RSA=no
-fi
-
- LIB_STATIC_ADD="$srcdir/IPP/$ipplib/libippcp.a $srcdir/IPP/$ipplib/libippcore.a $LIB_STATIC_ADD"
- if test "$ENABLED_FAST_RSA" = "no"; then
- as_fn_error $? "Could not find fast rsa libraries" "$LINENO" 5
- fi
-else
-
-# Check for and use bundled IPP libraries
-if test "$ENABLED_FAST_RSA" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using local IPP crypto library" >&5
-$as_echo "$as_me: Using local IPP crypto library" >&6;}
-
- as_ac_File=`$as_echo "ac_cv_file_$abs_path/IPP/include/ippcp.h" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $abs_path/IPP/include/ippcp.h" >&5
-$as_echo_n "checking for $abs_path/IPP/include/ippcp.h... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$abs_path/IPP/include/ippcp.h"; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$abs_path/IPP/include/ippcp.h" | $as_tr_cpp` 1
-_ACEOF
-
- # build and default locations on linux and mac
- STORE_LDFLAGS=${LDFLAGS}
- STORE_CPPFLAGS=${CPPFLAGS}
-
- # using LDFLAGS instead of AM_ temporarily to test link to library
- LDFLAGS="-L$ippdir/$ipplib -lippcp -lippcore"
- CPPFLAGS="-I$ippdir/include"
- for ac_header in ippcp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "ippcp.h" "ac_cv_header_ippcp_h" "$ac_includes_default"
-if test "x$ac_cv_header_ippcp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_IPPCP_H 1
-_ACEOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ippsRSAEncrypt_PKCSv15 in -lippcp" >&5
-$as_echo_n "checking for ippsRSAEncrypt_PKCSv15 in -lippcp... " >&6; }
-if ${ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lippcp $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ippsRSAEncrypt_PKCSv15 ();
-int
-main ()
-{
-return ippsRSAEncrypt_PKCSv15 ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15=yes
-else
- ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15" >&5
-$as_echo "$ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15" >&6; }
-if test "x$ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15" = xyes; then :
- fastRSA_found=yes
-else
- fastRSA_found=no
-fi
-
-else
- fastRSA_found=no
-fi
-
-done
-
- name="$ippdir/$ipplib/libippcp"
- case $host_os in
- *darwin*)
- # check file existence and conditionally set variables
- as_ac_File=`$as_echo "ac_cv_file_$abs_path/IPP/$ipplib/libippcp.dylib" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $abs_path/IPP/$ipplib/libippcp.dylib" >&5
-$as_echo_n "checking for $abs_path/IPP/$ipplib/libippcp.dylib... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$abs_path/IPP/$ipplib/libippcp.dylib"; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$abs_path/IPP/$ipplib/libippcp.dylib" | $as_tr_cpp` 1
-_ACEOF
-
- IPPLIBS="${name}.dylib ${name}-9.0.dylib ${name}e9-9.0.dylib ${name}g9-9.0.dylib ${name}h9-9.0.dylib ${name}k0-9.0.dylib ${name}l9-9.0.dylib ${name}n8-9.0.dylib ${name}p8-9.0.dylib ${name}s8-9.0.dylib ${name}y8-9.0.dylib IPP/lib/libippcore.dylib IPP/lib/libippcore-9.0.dylib"
- IPPLINK="mkdir -p src/.libs && ln -f ${name}.dylib src/.libs/libippcp.dylib && ln -f ${srcdir}/${name}-9.0.dylib src/.libs/libippcp-9.0.dylib && ln -f ${srcdir}/${name}e9-9.0.dylib src/.libs/libippcpe9-9.0.dylib && ln -f ${srcdir}/${name}g9-9.0.dylib src/.libs/libippcpg9-9.0.dylib && ln -f ${srcdir}/${name}h9-9.0.dylib src/.libs/libippcph9-9.0.dylib && ln -f ${srcdir}/${name}k0-9.0.dylib src/.libs/libippcpk0-9.0.dylib && ln -f ${srcdir}/${name}l9-9.0.dylib src/.libs/libippcpl9-9.0.dylib && ln -f ${srcdir}/${name}n8-9.0.dylib src/.libs/libippcpn8-9.0.dylib && ln -f ${srcdir}/${name}p8-9.0.dylib src/.libs/libippcpp8-9.0.dylib && ln -f ${srcdir}/${name}s8-9.0.dylib src/.libs/libippcps8-9.0.dylib && ln -f ${srcdir}/${name}y8-9.0.dylib src/.libs/libippcpy8-9.0.dylib && ln -f ${srcdir}/IPP/lib/libippcore.dylib src/.libs/libippcore.dylib && ln -f ${srcdir}/IPP/lib/libippcore-9.0.dylib src/.libs/libippcore-9.0.dylib"
-
-else
- fastRSA_found=no
-fi
-
- break;;
-
- *linux*)
- # check file existence and conditionally set variables
- as_ac_File=`$as_echo "ac_cv_file_$abs_path/IPP/$ipplib/libippcp.so.9.0" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $abs_path/IPP/$ipplib/libippcp.so.9.0" >&5
-$as_echo_n "checking for $abs_path/IPP/$ipplib/libippcp.so.9.0... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$abs_path/IPP/$ipplib/libippcp.so.9.0"; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$abs_path/IPP/$ipplib/libippcp.so.9.0" | $as_tr_cpp` 1
-_ACEOF
-
- if test "$ac_cv_sizeof_long" = "4" && test "$ac_cv_sizeof_long_long" = "8"; then
- IPPLIBS="${name}.so.9.0 ${name}g9.so.9.0 ${name}h9.so.9.0 ${name}p8.so.9.0 ${name}px.so.9.0 ${name}s8.so.9.0 ${name}.so ${name}w7.so.9.0 IPP/$ipplib/libippcore.so IPP/$ipplib/libippcore.so.9.0"
- IPPLINK="mkdir -p src/.libs && ln -f ${name}.so.9.0 src/.libs/libippcp.so.9.0 && ln -f ${name}g9.so.9.0 src/.libs/libippcpg9.so.9.0 && ln -f ${name}h9.so.9.0 src/.libs/libippcph9.so.9.0 && ln -f ${name}p8.so.9.0 src/.libs/libippcpp8.so.9.0 && ln -f ${name}px.so.9.0 src/.libs/libippcppx.so.9.0 && ln -f ${name}s8.so.9.0 src/.libs/libippcps8.so.9.0 && ln -f ${name}.so src/.libs/libippcp.so && ln -f ${name}w7.so.9.0 src/.libs/libippcpw7.so.9.0 && ln -f IPP/$ipplib/libippcore.so src/.libs/libippcore.so && ln -f IPP/$ipplib/libippcore.so.9.0 src/.libs/libippcore.so.9.0"
- else
- IPPLIBS="${name}.so.9.0 ${name}e9.so.9.0 ${name}k0.so.9.0 ${name}l9.so.9.0 ${name}m7.so.9.0 ${name}mx.so.9.0 ${name}.so ${name}n8.so.9.0 ${name}y8.so.9.0 IPP/lib/libippcore.so IPP/lib/libippcore.so.9.0"
- IPPLINK="mkdir -p src/.libs && ln -f ${name}.so.9.0 src/.libs/libippcp.so.9.0 && ln -f ${name}e9.so.9.0 src/.libs/libippcpe9.so.9.0 && ln -f ${name}k0.so.9.0 src/.libs/libippcpk0.so.9.0 && ln -f ${name}l9.so.9.0 src/.libs/libippcpl9.so.9.0 && ln -f ${name}m7.so.9.0 src/.libs/libippcpm7.so.9.0 && ln -f ${name}mx.so.9.0 src/.libs/libippcpmx.so.9.0 && ln -f ${name}.so src/.libs/libippcp.so && ln -f ${name}n8.so.9.0 src/.libs/libippcpn8.so.9.0 && ln -f ${name}y8.so.9.0 src/.libs/libippcpy8.so.9.0 && ln -f IPP/lib/libippcore.so src/.libs/libippcore.so && ln -f IPP/lib/libippcore.so.9.0 src/.libs/libippcore.so.9.0"
- fi
-
-else
- fastRSA_found=no
-fi
-
- break;;
- *)
- fastRSA_found=no
- esac
-
- if test "$fastRSA_found" = "yes"; then
- # was succesfull so add tested LDFLAGS to AM_ flags
- AM_LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}"
- AM_CPPFLAGS="${AM_CPPFLAGS} ${CPPFLAGS}"
- IPPHEADERS="${srcdir}/IPP/include/*.h"
- fi
-
- # restore LDFLAGS to user set
- LDFLAGS=${STORE_LDFLAGS}
- CPPFLAGS=${STORE_CPPFLAGS}
-
-else
- fastRSA_found=no
-fi
-
-fi
-
-# Don't cache the result so it can be checked
-{ ac_cv_header_ippcp_h=; unset ac_cv_header_ippcp_h;}
-{ ac_cv_header_ipp_h=; unset ac_cv_header_ipp_h;}
-{ ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15=; unset ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15;};
-
-# Check link and see if user has pre-existing IPP Libraries if not using local
-if test "$ENABLED_FAST_RSA" = "yes" && test "$fastRSA_found" = "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Checking if IPP crypto library installed" >&5
-$as_echo "$as_me: Checking if IPP crypto library installed" >&6;}
- ac_fn_c_check_header_mongrel "$LINENO" "ippcp.h" "ac_cv_header_ippcp_h" "$ac_includes_default"
-if test "x$ac_cv_header_ippcp_h" = xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ippsRSAEncrypt_PKCSv15 in -lippcp" >&5
-$as_echo_n "checking for ippsRSAEncrypt_PKCSv15 in -lippcp... " >&6; }
-if ${ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lippcp $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ippsRSAEncrypt_PKCSv15 ();
-int
-main ()
-{
-return ippsRSAEncrypt_PKCSv15 ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15=yes
-else
- ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15" >&5
-$as_echo "$ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15" >&6; }
-if test "x$ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15" = xyes; then :
-
- fastRSA_found=yes
- AM_LDFLAGS="${AM_LDFLAGS} -lippcore -lippcp"
-
-else
- fastRSA_found=no
-fi
-
-
-else
- fastRSA_found=no
-fi
-
-
-
- # Error out on not finding libraries
- if test "$fastRSA_found" = "no"; then
- as_fn_error $? "Could not find fast rsa libraries" "$LINENO" 5
- fi
-fi
-fi # end of if for shared library
-else # if user rsa is set than do not use fast rsa option
- if test "$ENABLED_FAST_RSA" = "yes"; then
- as_fn_error $? "Could not use fast rsa libraries with user crypto or fips" "$LINENO" 5
- fi
-fi # end of if for user rsa crypto or fips
-
-# End result of checking for IPP Libraries
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fast RSA" >&5
-$as_echo_n "checking for fast RSA... " >&6; }
-if test "$ENABLED_FAST_RSA" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FAST_RSA -DHAVE_USER_RSA"
- # add in user crypto header that uses Intel IPP
- AM_CPPFLAGS="$AM_CPPFLAGS -I$srcdir/wolfcrypt/user-crypto/include"
- if test "$enable_shared" = "yes"; then
- LIBS="$LIBS -lippcore -lippcp"
- LIB_ADD="-lippcp -lippcore $LIB_ADD"
- else
- LIB_ADD="$srcdir/IPP/$ipplib/libippcp.a $srcdir/IPP/$ipplib/libippcore.a $LIB_ADD"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-
-
-# static memory use
-# Check whether --enable-staticmemory was given.
-if test "${enable_staticmemory+set}" = set; then :
- enableval=$enable_staticmemory; ENABLED_STATICMEMORY=$enableval
-else
- ENABLED_STATICMEMORY=no
-
-fi
-
-
-if test "x$ENABLED_STATICMEMORY" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_STATIC_MEMORY"
- if test "x$ENABLED_FASTMATH" = "xno"
- then
- as_fn_error $? "please use --enable-fastmath if enabling staticmemory." "$LINENO" 5
- fi
- if test "$ENABLED_LOWRESOURCE" = "yes" && test "$ENABLED_RSA" = "no"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_STATIC_MEMORY_SMALL"
- fi
-fi
-
-
-# microchip api
-# Check whether --enable-mcapi was given.
-if test "${enable_mcapi+set}" = set; then :
- enableval=$enable_mcapi; ENABLED_MCAPI=$enableval
-else
- ENABLED_MCAPI=no
-
-fi
-
-
-if test "$ENABLED_MCAPI" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_MCAPI"
- if test "x$ENABLED_AESCTR" != "xyes"
- then
- # These flags are already implied by --enable-aesctr
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_COUNTER -DWOLFSSL_AES_DIRECT"
- fi
-fi
-
-if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_SHA512" = "no"
-then
- as_fn_error $? "please enable sha512 if enabling mcapi." "$LINENO" 5
-fi
-
-if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_ECC" = "no"
-then
- as_fn_error $? "please enable ecc if enabling mcapi." "$LINENO" 5
-fi
-
-if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_LIBZ" = "no"
-then
- as_fn_error $? "please use --with-libz if enabling mcapi." "$LINENO" 5
-fi
-
-
-# Asynchronous Crypto
-# Check whether --enable-asynccrypt was given.
-if test "${enable_asynccrypt+set}" = set; then :
- enableval=$enable_asynccrypt; ENABLED_ASYNCCRYPT=$enableval
-else
- ENABLED_ASYNCCRYPT=no
-
-fi
-
-
-if test "$ENABLED_ASYNCCRYPT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ASYNC_CRYPT -DHAVE_WOLF_EVENT -DHAVE_WOLF_BIGINT -DWOLFSSL_NO_HASH_RAW"
-
- # if no async hardware then use simulator for testing
- if test "x$ENABLED_CAVIUM" = "xno" && test "x$ENABLED_INTEL_QA" = "xno"
- then
- # Async threading is Linux specific
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ASYNC_CRYPT_TEST"
- fi
-fi
-
-
-# check for async if using Intel QuckAssist or Cavium
-if test "x$ENABLED_INTEL_QA" = "xyes" || test "x$ENABLED_CAVIUM" = "xyes" ; then
- if test "x$ENABLED_ASYNCCRYPT" = "xno" ; then
- as_fn_error $? "Please enable asynchronous support using --enable-asynccrypt" "$LINENO" 5
- fi
-fi
-
-
-# Asynchronous threading
-# Check whether --enable-asyncthreads was given.
-if test "${enable_asyncthreads+set}" = set; then :
- enableval=$enable_asyncthreads; ENABLED_ASYNCTHREADS=$enableval
-else
- ENABLED_ASYNCTHREADS=yes
-
-fi
-
-
-if test "$ENABLED_ASYNCCRYPT" = "yes" && test "$ENABLED_ASYNCTHREADS" = "yes"
-then
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-ax_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on Tru64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
- ax_pthread_save_CC="$CC"
- ax_pthread_save_CFLAGS="$CFLAGS"
- ax_pthread_save_LIBS="$LIBS"
- if test "x$PTHREAD_CC" != "x"; then :
- CC="$PTHREAD_CC"
-fi
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
-$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_join ();
-int
-main ()
-{
-return pthread_join ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
-$as_echo "$ax_pthread_ok" >&6; }
- if test "x$ax_pthread_ok" = "xno"; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- CC="$ax_pthread_save_CC"
- CFLAGS="$ax_pthread_save_CFLAGS"
- LIBS="$ax_pthread_save_LIBS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
-# (Note: HP C rejects this with "bad form for `-t' option")
-# -pthreads: Solaris/gcc (Note: HP C also rejects)
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads and
-# -D_REENTRANT too), HP C (must be checked before -lpthread, which
-# is present but should not be used directly; and before -mthreads,
-# because the compiler interprets this as "-mt" + "-hreads")
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case $host_os in
-
- freebsd*)
-
- # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
- # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-
- ax_pthread_flags="-kthread lthread $ax_pthread_flags"
- ;;
-
- hpux*)
-
- # From the cc(1) man page: "[-mt] Sets various -D flags to enable
- # multi-threading and also sets -lpthread."
-
- ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
- ;;
-
- openedition*)
-
- # IBM z/OS requires a feature-test macro to be defined in order to
- # enable POSIX threads at all, so give the user a hint if this is
- # not set. (We don't define these ourselves, as they can affect
- # other portions of the system API in unpredictable ways.)
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
- AX_PTHREAD_ZOS_MISSING
-# endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
-$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
-fi
-rm -f conftest*
-
- ;;
-
- solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (N.B.: The stubs are missing
- # pthread_cleanup_push, or rather a function called by this macro,
- # so we could check for that, but who knows whether they'll stub
- # that too in a future libc.) So we'll check first for the
- # standard Solaris way of linking pthreads (-mt -lpthread).
-
- ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
- ;;
-esac
-
-# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
-
-if test "x$GCC" = "xyes"; then :
- ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
-fi
-
-# The presence of a feature test macro requesting re-entrant function
-# definitions is, on some systems, a strong hint that pthreads support is
-# correctly enabled
-
-case $host_os in
- darwin* | hpux* | linux* | osf* | solaris*)
- ax_pthread_check_macro="_REENTRANT"
- ;;
-
- aix*)
- ax_pthread_check_macro="_THREAD_SAFE"
- ;;
-
- *)
- ax_pthread_check_macro="--"
- ;;
-esac
-if test "x$ax_pthread_check_macro" = "x--"; then :
- ax_pthread_check_cond=0
-else
- ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
-fi
-
-# Are we compiling with Clang?
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
-$as_echo_n "checking whether $CC is Clang... " >&6; }
-if ${ax_cv_PTHREAD_CLANG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ax_cv_PTHREAD_CLANG=no
- # Note that Autoconf sets GCC=yes for Clang as well as GCC
- if test "x$GCC" = "xyes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
-# if defined(__clang__) && defined(__llvm__)
- AX_PTHREAD_CC_IS_CLANG
-# endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
- ax_cv_PTHREAD_CLANG=yes
-fi
-rm -f conftest*
-
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
-$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
-ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
-
-ax_pthread_clang_warning=no
-
-# Clang needs special handling, because older versions handle the -pthread
-# option in a rather... idiosyncratic way
-
-if test "x$ax_pthread_clang" = "xyes"; then
-
- # Clang takes -pthread; it has never supported any other flag
-
- # (Note 1: This will need to be revisited if a system that Clang
- # supports has POSIX threads in a separate library. This tends not
- # to be the way of modern systems, but it's conceivable.)
-
- # (Note 2: On some systems, notably Darwin, -pthread is not needed
- # to get POSIX threads support; the API is always present and
- # active. We could reasonably leave PTHREAD_CFLAGS empty. But
- # -pthread does define _REENTRANT, and while the Darwin headers
- # ignore this macro, third-party headers might not.)
-
- PTHREAD_CFLAGS="-pthread"
- PTHREAD_LIBS=
-
- ax_pthread_ok=yes
-
- # However, older versions of Clang make a point of warning the user
- # that, in an invocation where only linking and no compilation is
- # taking place, the -pthread option has no effect ("argument unused
- # during compilation"). They expect -pthread to be passed in only
- # when source code is being compiled.
- #
- # Problem is, this is at odds with the way Automake and most other
- # C build frameworks function, which is that the same flags used in
- # compilation (CFLAGS) are also used in linking. Many systems
- # supported by AX_PTHREAD require exactly this for POSIX threads
- # support, and in fact it is often not straightforward to specify a
- # flag that is used only in the compilation phase and not in
- # linking. Such a scenario is extremely rare in practice.
- #
- # Even though use of the -pthread flag in linking would only print
- # a warning, this can be a nuisance for well-run software projects
- # that build with -Werror. So if the active version of Clang has
- # this misfeature, we search for an option to squash it.
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
-$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
-if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
- # Create an alternate version of $ac_link that compiles and
- # links in two steps (.c -> .o, .o -> exe) instead of one
- # (.c -> exe), because the warning occurs only in the second
- # step
- ax_pthread_save_ac_link="$ac_link"
- ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
- ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
- ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
- ax_pthread_save_CFLAGS="$CFLAGS"
- for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
- if test "x$ax_pthread_try" = "xunknown"; then :
- break
-fi
- CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
- ac_link="$ax_pthread_save_ac_link"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int main(void){return 0;}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_link="$ax_pthread_2step_ac_link"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int main(void){return 0;}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- break
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
- ac_link="$ax_pthread_save_ac_link"
- CFLAGS="$ax_pthread_save_CFLAGS"
- if test "x$ax_pthread_try" = "x"; then :
- ax_pthread_try=no
-fi
- ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
-$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
-
- case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
- no | unknown) ;;
- *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
- esac
-
-fi # $ax_pthread_clang = yes
-
-if test "x$ax_pthread_ok" = "xno"; then
-for ax_pthread_try_flag in $ax_pthread_flags; do
-
- case $ax_pthread_try_flag in
- none)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
- ;;
-
- -mt,pthread)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
-$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
- PTHREAD_CFLAGS="-mt"
- PTHREAD_LIBS="-lpthread"
- ;;
-
- -*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
-$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
- PTHREAD_CFLAGS="$ax_pthread_try_flag"
- ;;
-
- pthread-config)
- # Extract the first word of "pthread-config", so it can be a program name with args.
-set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ax_pthread_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ax_pthread_config"; then
- ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ax_pthread_config="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
-fi
-fi
-ax_pthread_config=$ac_cv_prog_ax_pthread_config
-if test -n "$ax_pthread_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
-$as_echo "$ax_pthread_config" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test "x$ax_pthread_config" = "xno"; then :
- continue
-fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
-$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
- PTHREAD_LIBS="-l$ax_pthread_try_flag"
- ;;
- esac
-
- ax_pthread_save_CFLAGS="$CFLAGS"
- ax_pthread_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
- static void routine(void *a) { a = 0; }
- static void *start_routine(void *a) { return a; }
-int
-main ()
-{
-pthread_t th; pthread_attr_t attr;
- pthread_create(&th, 0, start_routine, 0);
- pthread_join(th, 0);
- pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0) /* ; */
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- CFLAGS="$ax_pthread_save_CFLAGS"
- LIBS="$ax_pthread_save_LIBS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
-$as_echo "$ax_pthread_ok" >&6; }
- if test "x$ax_pthread_ok" = "xyes"; then :
- break
-fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$ax_pthread_ok" = "xyes"; then
- ax_pthread_save_CFLAGS="$CFLAGS"
- ax_pthread_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
-if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ax_cv_PTHREAD_JOINABLE_ATTR=unknown
- for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
-int attr = $ax_pthread_attr; return attr /* ; */
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
-$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
- if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
- test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
- test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
-_ACEOF
-
- ax_pthread_joinable_attr_defined=yes
-
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
-$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
-if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ax_cv_PTHREAD_SPECIAL_FLAGS=no
- case $host_os in
- solaris*)
- ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
- ;;
- esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
-$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
- if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
- test "x$ax_pthread_special_flags_added" != "xyes"; then :
- PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
- ax_pthread_special_flags_added=yes
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
-$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
-if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
-int i = PTHREAD_PRIO_INHERIT;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_cv_PTHREAD_PRIO_INHERIT=yes
-else
- ax_cv_PTHREAD_PRIO_INHERIT=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
-$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
- if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
- test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
-
-$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
-
- ax_pthread_prio_inherit_defined=yes
-
-fi
-
- CFLAGS="$ax_pthread_save_CFLAGS"
- LIBS="$ax_pthread_save_LIBS"
-
- # More AIX lossage: compile with *_r variant
- if test "x$GCC" != "xyes"; then
- case $host_os in
- aix*)
- case "x/$CC" in #(
- x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
- #handle absolute path differently from PATH based program lookup
- case "x$CC" in #(
- x/*) :
- if as_fn_executable_p ${CC}_r; then :
- PTHREAD_CC="${CC}_r"
-fi ;; #(
- *) :
- for ac_prog in ${CC}_r
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PTHREAD_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PTHREAD_CC"; then
- ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PTHREAD_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$PTHREAD_CC" && break
-done
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
- ;;
-esac ;; #(
- *) :
- ;;
-esac
- ;;
- esac
- fi
-fi
-
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
-
-
-
-
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test "x$ax_pthread_ok" = "xyes"; then
- ENABLED_ASYNCTHREADS=yes
- :
-else
- ax_pthread_ok=no
- ENABLED_ASYNCTHREADS=no
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-else
- ENABLED_ASYNCTHREADS=no
-fi
-
-if test "$ENABLED_ASYNCTHREADS" = "yes"
-then
- LIB_ADD="-lpthread $LIB_ADD"
- AM_CFLAGS="$AM_CFLAGS -D_GNU_SOURCE"
-else
- AM_CFLAGS="$AM_CFLAGS -DWC_NO_ASYNC_THREADING"
-fi
-
-
-# cryptodev is old name, replaced with cryptocb
-# Check whether --enable-cryptodev was given.
-if test "${enable_cryptodev+set}" = set; then :
- enableval=$enable_cryptodev; ENABLED_CRYPTOCB=$enableval
-else
- ENABLED_CRYPTOCB=no
-fi
-
-
-# Support for crypto callbacks
-# Check whether --enable-cryptocb was given.
-if test "${enable_cryptocb+set}" = set; then :
- enableval=$enable_cryptocb; ENABLED_CRYPTOCB=$enableval
-else
- ENABLED_CRYPTOCB=no
-
-fi
-
-
-if test "x$ENABLED_PKCS11" = "xyes"
-then
- ENABLED_CRYPTOCB=yes
-fi
-if test "$ENABLED_CRYPTOCB" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLF_CRYPTO_CB"
-fi
-
-
-# Session Export
-# Check whether --enable-sessionexport was given.
-if test "${enable_sessionexport+set}" = set; then :
- enableval=$enable_sessionexport; ENABLED_SESSIONEXPORT=$enableval
-else
- ENABLED_SESSIONEXPORT=no
-
-fi
-
-
-if test "$ENABLED_SESSIONEXPORT" = "yes" ||
- test "$ENABLED_SESSIONEXPORT" = "nopeer"
-then
- if test "$ENABLED_DTLS" = "no"
- then
- as_fn_error $? "Only DTLS supported with session export" "$LINENO" 5
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SESSION_EXPORT"
-
- if test "$ENABLED_SESSIONEXPORT" = "nopeer"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SESSION_EXPORT_NOPEER"
- fi
-fi
-
-
-# AES key wrap
-# Check whether --enable-aeskeywrap was given.
-if test "${enable_aeskeywrap+set}" = set; then :
- enableval=$enable_aeskeywrap; ENABLED_AESKEYWRAP=$enableval
-else
- ENABLED_AESKEYWRAP=no
-
-fi
-
-
-if test "$ENABLED_WPAS" = "yes" && test "$ENABLED_FIPS" = "no"
-then
- ENABLED_AESKEYWRAP="yes"
-fi
-
-if test "$ENABLED_AESKEYWRAP" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_KEYWRAP -DWOLFSSL_AES_DIRECT"
-fi
-
-
-# Old name support for backwards compatibility
-# Check whether --enable-oldnames was given.
-if test "${enable_oldnames+set}" = set; then :
- enableval=$enable_oldnames; ENABLED_OLDNAMES=$enableval
-else
- ENABLED_OLDNAMES=yes
-
-fi
-
-
-if test "x$ENABLED_OLDNAMES" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_OLD_RNGNAME -DNO_OLD_WC_NAMES -DNO_OLD_SSL_NAMES"
- AM_CFLAGS="$AM_CFLAGS -DNO_OLD_SHA_NAMES"
-fi
-
-
-# Memory Tests
-# Check whether --enable-memtest was given.
-if test "${enable_memtest+set}" = set; then :
- enableval=$enable_memtest; ENABLED_MEMTEST=$enableval
-else
- ENABLED_MEMTEST=no
-
-fi
-
-
-if test "x$ENABLED_MEMTEST" != "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY -DWOLFSSL_FORCE_MALLOC_FAIL_TEST"
-fi
-
-
-# Enable hash flags support
-# Hash flags are useful for runtime options such as SHA3 KECCAK256 selection
-# Check whether --enable-hashflags was given.
-if test "${enable_hashflags+set}" = set; then :
- enableval=$enable_hashflags; ENABLED_HASHFLAGS=$enableval
-else
- ENABLED_HASHFLAGS=no
-
-fi
-
-
-if test "x$ENABLED_HASHFLAGS" != "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HASH_FLAGS"
-fi
-
-# Support for enabling setting default DH parameters in
-# Check whether --enable-defaultdhparams was given.
-if test "${enable_defaultdhparams+set}" = set; then :
- enableval=$enable_defaultdhparams; ENABLED_DHDEFAULTPARAMS=$enableval
-else
- ENABLED_DHDEFAULTPARAMS=no
-
-fi
-
-if test "$ENABLED_DHDEFAULTPARAMS" = "yes" || test "$ENABLED_QT" = "no"
-then
- ENABLED_DHDEFAULTPARAMS=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_DH_DEFAULT_PARAMS"
-fi
-
-# User Settings
-# Check whether --enable-usersettings was given.
-if test "${enable_usersettings+set}" = set; then :
- enableval=$enable_usersettings; ENABLED_USERSETTINGS=$enableval
-else
- ENABLED_USERSETTINGS=no
-
-fi
-
-
-
-# Default optimization CFLAGS enable
-# Check whether --enable-optflags was given.
-if test "${enable_optflags+set}" = set; then :
- enableval=$enable_optflags; ENABLED_OPTFLAGS=$enableval
-else
- ENABLED_OPTFLAGS=yes
-
-fi
-
-
-
-# check if should run the trusted peer certs test
-# (for now checking both C_FLAGS and C_EXTRA_FLAGS)
-case "$CFLAGS $CPPFLAGS" in #(
- *'WOLFSSL_TRUST_PEER_CERT'*) :
- ENABLED_TRUSTED_PEER_CERT=yes ;; #(
- *) :
- ;;
-esac
-
-
-# dertermine if we have key validation mechanism
-if test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_RSA" = "xyes"
-then
- if test "x$ENABLED_ASN" = "xyes"
- then
- ENABLED_PKI="yes"
- fi
-fi
-
-
-# When building for wolfRand, strip out all options to disable everything.
-if test "x$ENABLED_FIPS" = "xyes" && test "x$FIPS_VERSION" = "xrand"; then :
- NEW_AM_CFLAGS="-DNO_AES -DNO_DH -DNO_ASN -DNO_RSA -DNO_SHA -DNO_MD5 -DNO_BIG_INT"
-for v in $AM_CFLAGS
-do
- case $v in
--DHAVE_FFDHE_2048 | -DTFM_TIMING_RESISTANT | -DECC_TIMING_RESISTANT | \
--DWC_RSA_BLINDING | -DHAVE_AESGCM | -DWOLFSSL_SHA512 | -DWOLFSSL_SHA384 | \
--DHAVE_ECC | -DTFM_ECC256 | -DECC_SHAMIR | -DHAVE_TLS_EXTENSIONS | \
--DHAVE_SUPPORTED_CURVES | -DHAVE_EXTENDED_MASTER | -DUSE_FAST_MATH)
- $as_echo "ignoring $v"
- ;;
- *)
- NEW_AM_CFLAGS="$NEW_AM_CFLAGS $v"
- ;;
- esac
-done
-AM_CFLAGS=$NEW_AM_CFLAGS
-fi
-
-
-################################################################################
-# Check for build-type conflicts #
-################################################################################
-
-if test "x$ENABLED_MAXSTRENGTH" = "xyes" && \
- test "x$ENABLED_LEANPSK" = "xyes"; then :
- as_fn_error $? "Cannot use Max Strength and Lean PSK at the same time." "$LINENO" 5
-fi
-
-if test "x$ENABLED_OCSP" = "xyes" && \
- test "x$ENABLED_ASN" = "xno"; then :
- as_fn_error $? "please enable asn if enabling ocsp." "$LINENO" 5
-fi
-
-if test "x$ENABLED_OCSP" = "xyes" && \
- test "x$ENABLED_RSA" = "xno" && \
- test "x$ENABLED_ECC" = "xno"; then :
- as_fn_error $? "please enable rsa or ecc if enabling ocsp." "$LINENO" 5
-fi
-
-# Sync Intel QA and Sync Cavium Octeon require the crypto callback
-if test "x$ENABLED_INTEL_QA_SYNC" = "xyes" || test "x$ENABLED_OCTEON_SYNC" = "xyes"; then :
- if test "x$ENABLED_CRYPTOCB" = "xno"; then :
- as_fn_error $? "please enable the crypto callback support using --enable-cryptocb" "$LINENO" 5
-fi
-fi
-
-# checks for pkcs7 needed enables
-if test "x$ENABLED_PKCS7" = "xyes" && \
- test "x$ENABLED_RSA" = "xno" && \
- test "x$ENABLED_ECC" = "xno"; then :
- as_fn_error $? "please enable ecc or rsa if enabling pkcs7." "$LINENO" 5
-fi
-
-if test "x$ENABLED_PKCS7" = "xyes" && \
- test "x$ENABLED_SHA" = "xno"; then :
- as_fn_error $? "please enable sha if enabling pkcs7." "$LINENO" 5
-fi
-
-if test "x$ENABLED_PKCS7" = "xyes" && \
- test "x$ENABLED_AES" = "xno" && \
- test "x$ENABLED_DES3" = "xno"; then :
- as_fn_error $? "please enable either AES or 3DES if enabling pkcs7." "$LINENO" 5
-fi
-
-if test "x$ENABLED_WOLFSCEP" = "xyes" && \
- test "x$ENABLED_AES" = "xno" && \
- test "x$ENABLED_DES3" = "xno"; then :
- as_fn_error $? "please enable either AES or 3DES if enabling scep." "$LINENO" 5
-fi
-
-if test "x$ENABLED_LEANTLS" = "xyes" && \
- test "x$ENABLED_ECC" = "xno"; then :
- as_fn_error $? "please enable ecc if enabling leantls." "$LINENO" 5
-fi
-
-if test "x$ENABLED_SNIFFER" = "xyes" && \
- test "x$ENABLED_RSA" = "xno" && \
- test "x$ENABLED_ECC" = "xno"; then :
- as_fn_error $? "please enable ecc or rsa if enabling sniffer." "$LINENO" 5
-fi
-
-# Lean TLS forces off prereqs of SCEP.
-if test "x$ENABLED_SCEP" = "xyes" && \
- test "x$ENABLED_LEANTLS" = "xyes"; then :
- as_fn_error $? "Cannot use SCEP and Lean TLS at the same time." "$LINENO" 5
-fi
-
-# CMAC currently requires AES.
-if test "x$ENABLED_CMAC" = "xyes" && \
- test "x$ENABLED_AES" = "xno"; then :
- as_fn_error $? "cannot use CMAC without AES." "$LINENO" 5
-fi
-
-################################################################################
-# Update CFLAGS based on options #
-################################################################################
-
-if test "x$ENABLED_MCAPI" = "xyes"; then :
- if test "x$ENABLED_DES3" = "xno"; then :
- ENABLED_DES3="yes"
-fi
-fi
-
-if test "$ENABLED_WOLFSCEP" = "yes"
-then
- # Enable prereqs if not already enabled
- if test "x$ENABLED_KEYGEN" = "xno"
- then
- ENABLED_KEYGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN"
- fi
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
- if test "x$ENABLED_CERTREQ" = "xno"
- then
- ENABLED_CERTREQ="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_REQ"
- fi
- if test "x$ENABLED_CERTEXT" = "xno"
- then
- ENABLED_CERTEXT="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
- fi
- if test "x$ENABLED_PKCS7" = "xno"
- then
- ENABLED_PKCS7="yes"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_WOLFSCEP"
-fi
-#if test "$ENABLED_SP_MATH" = "yes" && test "$ENABLED_KEYGEN" = "yes"; then
-# AC_MSG_ERROR([Cannot use single precision math and key generation])
-#fi
-
-if test "x$ENABLED_PKCS7" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7"
- # Enable prereqs if not already enabled
- if test "x$ENABLED_AESKEYWRAP" = "xno"
- then
- ENABLED_AESKEYWRAP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_KEYWRAP -DWOLFSSL_AES_DIRECT"
- fi
- if test "x$ENABLED_X963KDF" = "xno" && test "$ENABLED_ECC" != "no"
- then
- ENABLED_X963KDF="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_X963_KDF"
- fi
-fi
-
-if test "x$ENABLED_DES3" = "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_DES3"
-else
- # turn off DES3 if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_DES3"
- ENABLED_DES3=no
- fi
-fi
-
-
-if test "x$ENABLED_MAXSTRENGTH" = "xyes"; then :
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_MAX_STRENGTH"
-fi
-
-if test "x$ENABLED_MAXSTRENGTH" = "xyes" && \
- test "x$ENABLED_OLD_TLS" = "xyes"; then :
- AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS"
- ENABLED_OLD_TLS=no
-fi
-
-if test "x$ENABLED_MAXSTRENGTH" = "xyes" && \
- test "x$ENABLED_SSLV3" = "xyes"; then :
- as_fn_error $? "Cannot use Max Strength and SSLv3 at the same time." "$LINENO" 5
-fi
-
-if test "x$ENABLED_SCTP" = "xyes"; then :
- AM_CFLAGS="-DWOLFSSL_SCTP $AM_CFLAGS"
-fi
-
-if test "x$ENABLED_MCAST" = "xyes"; then :
- AM_CFLAGS="-DWOLFSSL_MULTICAST $AM_CFLAGS"
-fi
-
-# WOLFSSL_AFALG does not support SHA224 yet
-if (test "x$ENABLED_AFALG" = "xyes") && (test "x$ENABLED_SHA224" = "xyes"); then :
- as_fn_error $? "--enable-sha224 with --enable-afalg not yet supported" "$LINENO" 5
-fi
-
-# WOLFSSL_DEVCRYPTO does not support SHA224 yet
-if (test "x$ENABLED_DEVCRYPTO" = "xyes") && (test "x$ENABLED_SHA224" = "xyes"); then :
- as_fn_error $? "--enable-sha224 with --enable-devcrypto not yet supported" "$LINENO" 5
-fi
-
-# SCTP and Multicast require DTLS
-if (test "x$ENABLED_DTLS" = "xno") && \
- (test "x$ENABLED_SCTP" = "xyes" || test "x$ENABLED_MCAST" = "xyes"); then :
- AM_CFLAGS="-DWOLFSSL_DTLS $AM_CFLAGS"
- ENABLED_DTLS=yes
-fi
-
-# Multicast requires the null cipher
-if test "x$ENABLED_NULL_CIPHER" = "xno" && \
- test "x$ENABLED_MCAST" = "xyes"; then :
- AM_CFLAGS="-DHAVE_NULL_CIPHER $AM_CFLAGS"
- ENABLED_NULL_CIPHER=yes
-fi
-
-# wolfSSH and WPA Supplicant both need Public MP, only enable once.
-# This will let you know if you enabled wolfSSH but have any of the prereqs
-# disabled. Some of these options, disabling them adds things to the FLAGS and
-# you need to check and add items in two places depending on the option.
-if test "x$ENABLED_WOLFSSH" = "xyes"; then :
- if test "x$ENABLED_WPAS" = "xno"; then :
- AM_CFLAGS="-DWOLFSSL_PUBLIC_MP $AM_CFLAGS"
-fi
- if test "x$ENABLED_AESGCM" = "xno"; then :
- as_fn_error $? "cannot enable wolfSSH with AES-GCM disabled" "$LINENO" 5
-fi
- if test "x$ENABLED_ECC" = "xno"; then :
- as_fn_error $? "cannot enable wolfSSH with ECC disabled" "$LINENO" 5
-fi
- if test "x$ENABLED_SHA" = "xno"; then :
- as_fn_error $? "cannot enable wolfSSH with SHA-1 disabled" "$LINENO" 5
-fi
- if test "x$ENABLED_SHA512" = "xno"; then :
- as_fn_error $? "cannot enable wolfSSH with SHA-512/384 disabled" "$LINENO" 5
-fi
-
-fi
-
-if test "x$ENABLED_OPENSSLCOEXIST" = "xyes"; then
- if test "x$ENABLED_OPENSSLALL" = "xyes"; then
- as_fn_error $? "Cannot use --enable-opensslcoexist with --enable-opensslall" "$LINENO" 5
- fi
- if test "x$ENABLED_OPENSSLEXTRA" = "xyes"; then
- as_fn_error $? "Cannot use --enable-opensslcoexist with --enable-opensslextra" "$LINENO" 5
- fi
-fi
-################################################################################
-
-# USER SETTINGS
-if test "x$ENABLED_USERSETTINGS" = "xyes"
-then
- # Replace all options and just use WOLFSSL_USER_SETTINGS
- AM_CFLAGS="-DWOLFSSL_USER_SETTINGS"
-fi
-
-# OPTIMIZE FLAGS
-# For distro disable custom build options that interfere with symbol generation
-if test "$GCC" = "yes" && test "$ENABLED_DISTRO" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -Wall -Wno-unused"
- if test "$ax_enable_debug" = "no"
- then
- if test "x$ENABLED_OPTFLAGS" = "xyes"; then :
-
- if test "$ENABLED_FASTMATH" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_FAST_CFLAGS"
- if test "$ENABLED_FASTHUGEMATH" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_HUGE_CFLAGS"
- fi
- else
- AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_CFLAGS"
- fi
-
-fi
- fi
-fi
-
-# ICC command line warning for non supported warning flags
-if test "$CC" = "icc"
-then
- AM_CFLAGS="$AM_CFLAGS -wd10006"
-fi
-
-# Expose HAVE___UINT128_T to options flags"
-if test "$ac_cv_type___uint128_t" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE___UINT128_T=1"
-fi
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
-$as_echo_n "checking for library containing gethostbyname... " >&6; }
-if ${ac_cv_search_gethostbyname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' nsl; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_gethostbyname=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_gethostbyname+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_gethostbyname+:} false; then :
-
-else
- ac_cv_search_gethostbyname=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
-$as_echo "$ac_cv_search_gethostbyname" >&6; }
-ac_res=$ac_cv_search_gethostbyname
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
-$as_echo_n "checking for library containing socket... " >&6; }
-if ${ac_cv_search_socket+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socket ();
-int
-main ()
-{
-return socket ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' socket; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_socket=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_socket+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_socket+:} false; then :
-
-else
- ac_cv_search_socket=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
-$as_echo "$ac_cv_search_socket" >&6; }
-ac_res=$ac_cv_search_socket
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
-$as_echo_n "checking for socket in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_socket+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket -lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socket ();
-int
-main ()
-{
-return socket ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_socket=yes
-else
- ac_cv_lib_socket_socket=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
-$as_echo "$ac_cv_lib_socket_socket" >&6; }
-if test "x$ac_cv_lib_socket_socket" = xyes; then :
- LIBS="-lsocket -lnsl $LIBS"
-fi
-
-fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs system" >&5
-$as_echo_n "checking for vcs system... " >&6; }
-if ${ac_cv_vcs_system+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_vcs_system="none"
- if test -d ".bzr"; then :
- ac_cv_vcs_system="bazaar"
-fi
- if test -d ".svn"; then :
- ac_cv_vcs_system="svn"
-fi
- if test -d ".hg"; then :
- ac_cv_vcs_system="mercurial"
-fi
- if test -e ".git"; then :
- ac_cv_vcs_system="git"
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_system" >&5
-$as_echo "$ac_cv_vcs_system" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define VCS_SYSTEM "$ac_cv_vcs_system"
-_ACEOF
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs checkout" >&5
-$as_echo_n "checking for vcs checkout... " >&6; }
-if ${ac_cv_vcs_checkout+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$ac_cv_vcs_system" != "xnone"; then :
- ac_cv_vcs_checkout=yes
-else
- ac_cv_vcs_checkout=no
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_checkout" >&5
-$as_echo "$ac_cv_vcs_checkout" >&6; }
-
- if test "x$ac_cv_vcs_checkout" = "xyes"; then
- IS_VCS_CHECKOUT_TRUE=
- IS_VCS_CHECKOUT_FALSE='#'
-else
- IS_VCS_CHECKOUT_TRUE='#'
- IS_VCS_CHECKOUT_FALSE=
-fi
-
- if test "x$ac_cv_vcs_checkout" = "xyes"; then :
-
-$as_echo "#define VCS_CHECKOUT 1" >>confdefs.h
-
-else
-
-$as_echo "#define VCS_CHECKOUT 0" >>confdefs.h
-
-fi
-
-
-
-
-
-
-
- AX_HARDEN_LIB=
- ax_append_compile_link_flags_extra=
- if test "x$ac_cv_vcs_checkout" = "xyes"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Werror" >&5
-$as_echo_n "checking whether the linker accepts -Werror... " >&6; }
-if ${ax_cv_check_ldflags___Werror+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$LDFLAGS
- LDFLAGS="$LDFLAGS -Werror"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_cv_check_ldflags___Werror=yes
-else
- ax_cv_check_ldflags___Werror=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$ax_check_save_flags
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Werror" >&5
-$as_echo "$ax_cv_check_ldflags___Werror" >&6; }
-if test "x$ax_cv_check_ldflags___Werror" = xyes; then :
-
- AX_HARDEN_LIB="-Werror $AX_HARDEN_LIB"
-
-else
- :
-fi
-
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Werror" >&5
-$as_echo_n "checking whether the linker accepts -Werror... " >&6; }
-if ${ax_cv_check_ldflags___Werror+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$LDFLAGS
- LDFLAGS="$LDFLAGS -Werror"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_cv_check_ldflags___Werror=yes
-else
- ax_cv_check_ldflags___Werror=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$ax_check_save_flags
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Werror" >&5
-$as_echo "$ax_cv_check_ldflags___Werror" >&6; }
-if test "x$ax_cv_check_ldflags___Werror" = xyes; then :
-
- ax_append_compile_link_flags_extra='-Werror'
-
-else
- :
-fi
-
-
-fi
-
- as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_append_compile_link_flags_extra_-z relro -z now" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -z relro -z now" >&5
-$as_echo_n "checking whether the linker accepts -z relro -z now... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$LDFLAGS
- LDFLAGS="$LDFLAGS $ax_append_compile_link_flags_extra -z relro -z now"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
- AX_HARDEN_LIB="-z relro -z now $AX_HARDEN_LIB"
-
-else
- :
-fi
-
-
- as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_append_compile_link_flags_extra_-pie" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -pie" >&5
-$as_echo_n "checking whether the linker accepts -pie... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$LDFLAGS
- LDFLAGS="$LDFLAGS $ax_append_compile_link_flags_extra -pie"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
- AX_HARDEN_LIB="-pie $AX_HARDEN_LIB"
-
-else
- :
-fi
-
-
- LIB="$LIB $AX_HARDEN_LIB"
-
-
-
-
-
-
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
- ac_cv_warnings_as_errors=no
- ax_append_compile_cflags_extra=
- if test "$ac_cv_vcs_checkout" = "yes"; then :
-
-
-
-
-
-for flag in -Werror; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
- ac_cv_warnings_as_errors=yes
-
-else
-
-
-
-
-
-for flag in -Werror; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${ax_append_compile_cflags_extra+:} false; then :
-
- case " $ax_append_compile_cflags_extra " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra already contains \$flag"; } >&5
- (: ax_append_compile_cflags_extra already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append ax_append_compile_cflags_extra " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra=\"\$ax_append_compile_cflags_extra\""; } >&5
- (: ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- ax_append_compile_cflags_extra=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : ax_append_compile_cflags_extra=\"\$ax_append_compile_cflags_extra\""; } >&5
- (: ax_append_compile_cflags_extra="$ax_append_compile_cflags_extra") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-fi
-
- if test "$ax_enable_debug" = "yes"; then :
-
-
-
-
-
-for flag in -g; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -ggdb; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -O0; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-fi
-
-
-
-
-
-for flag in -Wno-pragmas; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-
-for flag in -Wall; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wno-strict-aliasing; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wextra; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wunknown-pragmas; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wthis-test-should-fail; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
- if test "$CC" = "clang"; then :
-
-else
-
-
-
-
-
-for flag in --param=ssp-buffer-size=1; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-fi
-
-
-
-
-for flag in -Waddress; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Warray-bounds; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wbad-function-cast; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wchar-subscripts; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wcomment; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wfloat-equal; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wformat-security; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wformat=2; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wmaybe-uninitialized; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wmissing-field-initializers; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wmissing-noreturn; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wmissing-prototypes; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wnested-externs; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wnormalized=id; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Woverride-init; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wpointer-arith; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wpointer-sign; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wredundant-decls; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wshadow; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wshorten-64-to-32; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wsign-compare; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wstrict-overflow=1; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wstrict-prototypes; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wswitch-enum; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wundef; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wunused; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wunused-result; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wunused-variable; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -Wwrite-strings; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
-
-
-
-
-for flag in -fwrapv; do
- as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_append_compile_cflags_extra_$flag" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
-$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
-if eval \${$as_CACHEVAR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ax_check_save_flags=$CFLAGS
- CFLAGS="$CFLAGS $ax_append_compile_cflags_extra $flag"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_CACHEVAR=yes"
-else
- eval "$as_CACHEVAR=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
-fi
-eval ac_res=\$$as_CACHEVAR
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
-
-if ${CFLAGS+:} false; then :
-
- case " $CFLAGS " in #(
- *" $flag "*) :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
- (: CFLAGS already contains $flag) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } ;; #(
- *) :
-
- as_fn_append CFLAGS " $flag"
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- ;;
-esac
-
-else
-
- CFLAGS=$flag
- { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
- (: CFLAGS="$CFLAGS") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-
-fi
-
-else
- :
-fi
-
-done
-
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-# if mingw then link to ws2_32 for sockets
-case $host_os in
- mingw*)
- LDFLAGS="$LDFLAGS -lws2_32"
- if test "$enable_shared" = "yes"
- then
-
-$as_echo "#define WOLFSSL_DLL 1" >>confdefs.h
-
- if test "$enable_static" = "yes"
- then
- MINGW_LIB_WARNING="yes"
- fi
- fi ;;
-esac
-
-
-# The following AM_CONDITIONAL statements set flags for use in the Makefiles.
-# Some of these affect build targets and objects, some trigger different
-# test scripts for make check.
- if test "x$ENABLED_DISTRO" = "xyes"; then
- BUILD_DISTRO_TRUE=
- BUILD_DISTRO_FALSE='#'
-else
- BUILD_DISTRO_TRUE='#'
- BUILD_DISTRO_FALSE=
-fi
-
- if test "x$ENABLED_ALL" = "xyes"; then
- BUILD_ALL_TRUE=
- BUILD_ALL_FALSE='#'
-else
- BUILD_ALL_TRUE='#'
- BUILD_ALL_FALSE=
-fi
-
- if test "x$ENABLED_TLS13" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_TLS13_TRUE=
- BUILD_TLS13_FALSE='#'
-else
- BUILD_TLS13_TRUE='#'
- BUILD_TLS13_FALSE=
-fi
-
- if test "x$ENABLED_RNG" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_RNG_TRUE=
- BUILD_RNG_FALSE='#'
-else
- BUILD_RNG_TRUE='#'
- BUILD_RNG_FALSE=
-fi
-
- if test "x$ENABLED_SCTP" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SCTP_TRUE=
- BUILD_SCTP_FALSE='#'
-else
- BUILD_SCTP_TRUE='#'
- BUILD_SCTP_FALSE=
-fi
-
- if test "x$ENABLED_MCAST" = "xyes"; then
- BUILD_MCAST_TRUE=
- BUILD_MCAST_FALSE='#'
-else
- BUILD_MCAST_TRUE='#'
- BUILD_MCAST_FALSE=
-fi
-
- if test "x$ENABLED_IPV6" = "xyes"; then
- BUILD_IPV6_TRUE=
- BUILD_IPV6_FALSE='#'
-else
- BUILD_IPV6_TRUE='#'
- BUILD_IPV6_FALSE=
-fi
-
- if test "x$ENABLED_LEANPSK" = "xyes"; then
- BUILD_LEANPSK_TRUE=
- BUILD_LEANPSK_FALSE='#'
-else
- BUILD_LEANPSK_TRUE='#'
- BUILD_LEANPSK_FALSE=
-fi
-
- if test "x$ENABLED_LEANTLS" = "xyes"; then
- BUILD_LEANTLS_TRUE=
- BUILD_LEANTLS_FALSE='#'
-else
- BUILD_LEANTLS_TRUE='#'
- BUILD_LEANTLS_FALSE=
-fi
-
- if test "x$ENABLED_LOWRESOURCE" = "xyes"; then
- BUILD_LOWMEM_TRUE=
- BUILD_LOWMEM_FALSE='#'
-else
- BUILD_LOWMEM_TRUE='#'
- BUILD_LOWMEM_FALSE=
-fi
-
- if test "x$ENABLED_PKCALLBACKS" = "xyes"; then
- BUILD_PKCALLBACKS_TRUE=
- BUILD_PKCALLBACKS_FALSE='#'
-else
- BUILD_PKCALLBACKS_TRUE='#'
- BUILD_PKCALLBACKS_FALSE=
-fi
-
- if test "x$ENABLED_CRYPTOAUTHLIB" = "xyes"; then
- BUILD_CRYPTOAUTHLIB_TRUE=
- BUILD_CRYPTOAUTHLIB_FALSE='#'
-else
- BUILD_CRYPTOAUTHLIB_TRUE='#'
- BUILD_CRYPTOAUTHLIB_FALSE=
-fi
-
- if test "x$ENABLED_SNIFFER" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SNIFFER_TRUE=
- BUILD_SNIFFER_FALSE='#'
-else
- BUILD_SNIFFER_TRUE='#'
- BUILD_SNIFFER_FALSE=
-fi
-
- if test "x$ENABLED_SNIFFTEST" = "xyes"; then
- BUILD_SNIFFTEST_TRUE=
- BUILD_SNIFFTEST_FALSE='#'
-else
- BUILD_SNIFFTEST_TRUE='#'
- BUILD_SNIFFTEST_FALSE=
-fi
-
- if test "x$ENABLED_AESGCM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_AESGCM_TRUE=
- BUILD_AESGCM_FALSE='#'
-else
- BUILD_AESGCM_TRUE='#'
- BUILD_AESGCM_FALSE=
-fi
-
- if test "x$ENABLED_AESCCM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_AESCCM_TRUE=
- BUILD_AESCCM_FALSE='#'
-else
- BUILD_AESCCM_TRUE='#'
- BUILD_AESCCM_FALSE=
-fi
-
- if test "x$ENABLED_ARMASM" = "xyes"; then
- BUILD_ARMASM_TRUE=
- BUILD_ARMASM_FALSE='#'
-else
- BUILD_ARMASM_TRUE='#'
- BUILD_ARMASM_FALSE=
-fi
-
- if test "x$ENABLED_XILINX" = "xyes"; then
- BUILD_XILINX_TRUE=
- BUILD_XILINX_FALSE='#'
-else
- BUILD_XILINX_TRUE='#'
- BUILD_XILINX_FALSE=
-fi
-
- if test "x$ENABLED_AESNI" = "xyes"; then
- BUILD_AESNI_TRUE=
- BUILD_AESNI_FALSE='#'
-else
- BUILD_AESNI_TRUE='#'
- BUILD_AESNI_FALSE=
-fi
-
- if test "x$ENABLED_INTELASM" = "xyes"; then
- BUILD_INTELASM_TRUE=
- BUILD_INTELASM_FALSE='#'
-else
- BUILD_INTELASM_TRUE='#'
- BUILD_INTELASM_FALSE=
-fi
-
- if test "x$ENABLED_AFALG" = "xyes"; then
- BUILD_AFALG_TRUE=
- BUILD_AFALG_FALSE='#'
-else
- BUILD_AFALG_TRUE='#'
- BUILD_AFALG_FALSE=
-fi
-
- if test "x$ENABLED_DEVCRYPTO" = "xyes"; then
- BUILD_DEVCRYPTO_TRUE=
- BUILD_DEVCRYPTO_FALSE='#'
-else
- BUILD_DEVCRYPTO_TRUE='#'
- BUILD_DEVCRYPTO_FALSE=
-fi
-
- if test "x$ENABLED_CAMELLIA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_CAMELLIA_TRUE=
- BUILD_CAMELLIA_FALSE='#'
-else
- BUILD_CAMELLIA_TRUE='#'
- BUILD_CAMELLIA_FALSE=
-fi
-
- if test "x$ENABLED_MD2" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_MD2_TRUE=
- BUILD_MD2_FALSE='#'
-else
- BUILD_MD2_TRUE='#'
- BUILD_MD2_FALSE=
-fi
-
- if test "x$ENABLED_RIPEMD" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_RIPEMD_TRUE=
- BUILD_RIPEMD_FALSE='#'
-else
- BUILD_RIPEMD_TRUE='#'
- BUILD_RIPEMD_FALSE=
-fi
-
- if test "x$ENABLED_BLAKE2" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_BLAKE2_TRUE=
- BUILD_BLAKE2_FALSE='#'
-else
- BUILD_BLAKE2_TRUE='#'
- BUILD_BLAKE2_FALSE=
-fi
-
- if test "x$ENABLED_BLAKE2S" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_BLAKE2S_TRUE=
- BUILD_BLAKE2S_FALSE='#'
-else
- BUILD_BLAKE2S_TRUE='#'
- BUILD_BLAKE2S_FALSE=
-fi
-
- if test "x$ENABLED_SHA512" = "xyes" || test "x$ENABLED_SHA384" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SHA512_TRUE=
- BUILD_SHA512_FALSE='#'
-else
- BUILD_SHA512_TRUE='#'
- BUILD_SHA512_FALSE=
-fi
-
- if test "x$ENABLED_DSA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_DSA_TRUE=
- BUILD_DSA_FALSE='#'
-else
- BUILD_DSA_TRUE='#'
- BUILD_DSA_FALSE=
-fi
-
- if test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_ECC_TRUE=
- BUILD_ECC_FALSE='#'
-else
- BUILD_ECC_TRUE='#'
- BUILD_ECC_FALSE=
-fi
-
- if test "x$ENABLED_ED25519" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_ED25519_TRUE=
- BUILD_ED25519_FALSE='#'
-else
- BUILD_ED25519_TRUE='#'
- BUILD_ED25519_FALSE=
-fi
-
- if test "x$ENABLED_ED25519_SMALL" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_ED25519_SMALL_TRUE=
- BUILD_ED25519_SMALL_FALSE='#'
-else
- BUILD_ED25519_SMALL_TRUE='#'
- BUILD_ED25519_SMALL_FALSE=
-fi
-
- if test "x$ENABLED_FEMATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_FEMATH_TRUE=
- BUILD_FEMATH_FALSE='#'
-else
- BUILD_FEMATH_TRUE='#'
- BUILD_FEMATH_FALSE=
-fi
-
- if test "x$ENABLED_GEMATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_GEMATH_TRUE=
- BUILD_GEMATH_FALSE='#'
-else
- BUILD_GEMATH_TRUE='#'
- BUILD_GEMATH_FALSE=
-fi
-
- if test "x$ENABLED_CURVE25519" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_CURVE25519_TRUE=
- BUILD_CURVE25519_FALSE='#'
-else
- BUILD_CURVE25519_TRUE='#'
- BUILD_CURVE25519_FALSE=
-fi
-
- if test "x$ENABLED_CURVE25519_SMALL" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_CURVE25519_SMALL_TRUE=
- BUILD_CURVE25519_SMALL_FALSE='#'
-else
- BUILD_CURVE25519_SMALL_TRUE='#'
- BUILD_CURVE25519_SMALL_FALSE=
-fi
-
- if test "x$ENABLED_ED448" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_ED448_TRUE=
- BUILD_ED448_FALSE='#'
-else
- BUILD_ED448_TRUE='#'
- BUILD_ED448_FALSE=
-fi
-
- if test "x$ENABLED_ED448_SMALL" = "xyes"; then
- BUILD_ED448_SMALL_TRUE=
- BUILD_ED448_SMALL_FALSE='#'
-else
- BUILD_ED448_SMALL_TRUE='#'
- BUILD_ED448_SMALL_FALSE=
-fi
-
- if test "x$ENABLED_FE448" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_FE448_TRUE=
- BUILD_FE448_FALSE='#'
-else
- BUILD_FE448_TRUE='#'
- BUILD_FE448_FALSE=
-fi
-
- if test "x$ENABLED_GE448" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_GE448_TRUE=
- BUILD_GE448_FALSE='#'
-else
- BUILD_GE448_TRUE='#'
- BUILD_GE448_FALSE=
-fi
-
- if test "x$ENABLED_CURVE448" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_CURVE448_TRUE=
- BUILD_CURVE448_FALSE='#'
-else
- BUILD_CURVE448_TRUE='#'
- BUILD_CURVE448_FALSE=
-fi
-
- if test "x$ENABLED_CURVE448_SMALL" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_CURVE448_SMALL_TRUE=
- BUILD_CURVE448_SMALL_FALSE='#'
-else
- BUILD_CURVE448_SMALL_TRUE='#'
- BUILD_CURVE448_SMALL_FALSE=
-fi
-
- if test "x$ENABLED_MEMORY" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_MEMORY_TRUE=
- BUILD_MEMORY_FALSE='#'
-else
- BUILD_MEMORY_TRUE='#'
- BUILD_MEMORY_FALSE=
-fi
-
- if test "x$ENABLED_RSA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_RSA_TRUE=
- BUILD_RSA_FALSE='#'
-else
- BUILD_RSA_TRUE='#'
- BUILD_RSA_FALSE=
-fi
-
- if test "x$ENABLED_DH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_DH_TRUE=
- BUILD_DH_FALSE='#'
-else
- BUILD_DH_TRUE='#'
- BUILD_DH_FALSE=
-fi
-
- if test "x$ENABLED_ASN" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_ASN_TRUE=
- BUILD_ASN_FALSE='#'
-else
- BUILD_ASN_TRUE='#'
- BUILD_ASN_FALSE=
-fi
-
- if test "x$ENABLED_AES" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_AES_TRUE=
- BUILD_AES_FALSE='#'
-else
- BUILD_AES_TRUE='#'
- BUILD_AES_FALSE=
-fi
-
- if test "x$ENABLED_CODING" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_CODING_TRUE=
- BUILD_CODING_FALSE='#'
-else
- BUILD_CODING_TRUE='#'
- BUILD_CODING_FALSE=
-fi
-
- if test "x$ENABLED_IDEA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_IDEA_TRUE=
- BUILD_IDEA_FALSE='#'
-else
- BUILD_IDEA_TRUE='#'
- BUILD_IDEA_FALSE=
-fi
-
- if test "x$ENABLED_ARC4" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_RC4_TRUE=
- BUILD_RC4_FALSE='#'
-else
- BUILD_RC4_TRUE='#'
- BUILD_RC4_FALSE=
-fi
-
- if test "x$ENABLED_MD5" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_MD5_TRUE=
- BUILD_MD5_FALSE='#'
-else
- BUILD_MD5_TRUE='#'
- BUILD_MD5_FALSE=
-fi
-
- if test "x$ENABLED_SHA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SHA_TRUE=
- BUILD_SHA_FALSE='#'
-else
- BUILD_SHA_TRUE='#'
- BUILD_SHA_FALSE=
-fi
-
- if test "x$ENABLED_HC128" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_HC128_TRUE=
- BUILD_HC128_FALSE='#'
-else
- BUILD_HC128_TRUE='#'
- BUILD_HC128_FALSE=
-fi
-
- if test "x$ENABLED_RABBIT" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_RABBIT_TRUE=
- BUILD_RABBIT_FALSE='#'
-else
- BUILD_RABBIT_TRUE='#'
- BUILD_RABBIT_FALSE=
-fi
-
- if test "x$ENABLED_FIPS" = "xyes"; then
- BUILD_FIPS_TRUE=
- BUILD_FIPS_FALSE='#'
-else
- BUILD_FIPS_TRUE='#'
- BUILD_FIPS_FALSE=
-fi
-
- if test "x$FIPS_VERSION" = "xv1"; then
- BUILD_FIPS_V1_TRUE=
- BUILD_FIPS_V1_FALSE='#'
-else
- BUILD_FIPS_V1_TRUE='#'
- BUILD_FIPS_V1_FALSE=
-fi
-
- if test "x$FIPS_VERSION" = "xv2"; then
- BUILD_FIPS_V2_TRUE=
- BUILD_FIPS_V2_FALSE='#'
-else
- BUILD_FIPS_V2_TRUE='#'
- BUILD_FIPS_V2_FALSE=
-fi
-
- if test "x$FIPS_VERSION" = "xrand"; then
- BUILD_FIPS_RAND_TRUE=
- BUILD_FIPS_RAND_FALSE='#'
-else
- BUILD_FIPS_RAND_TRUE='#'
- BUILD_FIPS_RAND_FALSE=
-fi
-
- if test "x$ENABLED_CMAC" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_CMAC_TRUE=
- BUILD_CMAC_FALSE='#'
-else
- BUILD_CMAC_TRUE='#'
- BUILD_CMAC_FALSE=
-fi
-
- if test "x$ENABLED_SELFTEST" = "xyes"; then
- BUILD_SELFTEST_TRUE=
- BUILD_SELFTEST_FALSE='#'
-else
- BUILD_SELFTEST_TRUE='#'
- BUILD_SELFTEST_FALSE=
-fi
-
- if test "x$ENABLED_SHA224" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SHA224_TRUE=
- BUILD_SHA224_FALSE='#'
-else
- BUILD_SHA224_TRUE='#'
- BUILD_SHA224_FALSE=
-fi
-
- if test "x$ENABLED_SHA3" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SHA3_TRUE=
- BUILD_SHA3_FALSE='#'
-else
- BUILD_SHA3_TRUE='#'
- BUILD_SHA3_FALSE=
-fi
-
- if test "x$ENABLED_POLY1305" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_POLY1305_TRUE=
- BUILD_POLY1305_FALSE='#'
-else
- BUILD_POLY1305_TRUE='#'
- BUILD_POLY1305_FALSE=
-fi
-
- if test "x$ENABLED_CHACHA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_CHACHA_TRUE=
- BUILD_CHACHA_FALSE='#'
-else
- BUILD_CHACHA_TRUE='#'
- BUILD_CHACHA_FALSE=
-fi
-
- if test "x$ENABLED_INLINE" = "xyes"; then
- BUILD_INLINE_TRUE=
- BUILD_INLINE_FALSE='#'
-else
- BUILD_INLINE_TRUE='#'
- BUILD_INLINE_FALSE=
-fi
-
- if test "x$ENABLED_OCSP" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_OCSP_TRUE=
- BUILD_OCSP_FALSE='#'
-else
- BUILD_OCSP_TRUE='#'
- BUILD_OCSP_FALSE=
-fi
-
- if test "x$ENABLED_CERTIFICATE_STATUS_REQUEST" = "xyes"; then
- BUILD_OCSP_STAPLING_TRUE=
- BUILD_OCSP_STAPLING_FALSE='#'
-else
- BUILD_OCSP_STAPLING_TRUE='#'
- BUILD_OCSP_STAPLING_FALSE=
-fi
-
- if test "x$ENABLED_CERTIFICATE_STATUS_REQUEST_V2" = "xyes"; then
- BUILD_OCSP_STAPLING_V2_TRUE=
- BUILD_OCSP_STAPLING_V2_FALSE='#'
-else
- BUILD_OCSP_STAPLING_V2_TRUE='#'
- BUILD_OCSP_STAPLING_V2_FALSE=
-fi
-
- if test "x$ENABLED_CRL" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_CRL_TRUE=
- BUILD_CRL_FALSE='#'
-else
- BUILD_CRL_TRUE='#'
- BUILD_CRL_FALSE=
-fi
-
- if test "x$ENABLED_CRL_MONITOR" = "xyes"; then
- BUILD_CRL_MONITOR_TRUE=
- BUILD_CRL_MONITOR_FALSE='#'
-else
- BUILD_CRL_MONITOR_TRUE='#'
- BUILD_CRL_MONITOR_FALSE=
-fi
-
- if test "x$ENABLED_USER_RSA" = "xyes" ; then
- BUILD_USER_RSA_TRUE=
- BUILD_USER_RSA_FALSE='#'
-else
- BUILD_USER_RSA_TRUE='#'
- BUILD_USER_RSA_FALSE=
-fi
-
- if test "x$ENABLED_USER_CRYPTO" = "xyes"; then
- BUILD_USER_CRYPTO_TRUE=
- BUILD_USER_CRYPTO_FALSE='#'
-else
- BUILD_USER_CRYPTO_TRUE='#'
- BUILD_USER_CRYPTO_FALSE=
-fi
-
- if test "x$ENABLED_NTRU" = "xyes"; then
- BUILD_NTRU_TRUE=
- BUILD_NTRU_FALSE='#'
-else
- BUILD_NTRU_TRUE='#'
- BUILD_NTRU_FALSE=
-fi
-
- if test "x$ENABLED_WNR" = "xyes"; then
- BUILD_WNR_TRUE=
- BUILD_WNR_FALSE='#'
-else
- BUILD_WNR_TRUE='#'
- BUILD_WNR_FALSE=
-fi
-
- if test "x$ENABLED_SRP" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SRP_TRUE=
- BUILD_SRP_FALSE='#'
-else
- BUILD_SRP_TRUE='#'
- BUILD_SRP_FALSE=
-fi
-
- if test "x$ENABLED_VALGRIND" = "xyes"; then
- USE_VALGRIND_TRUE=
- USE_VALGRIND_FALSE='#'
-else
- USE_VALGRIND_TRUE='#'
- USE_VALGRIND_FALSE=
-fi
-
- if test "x$ENABLED_MD4" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_MD4_TRUE=
- BUILD_MD4_FALSE='#'
-else
- BUILD_MD4_TRUE='#'
- BUILD_MD4_FALSE=
-fi
-
- if test "x$ENABLED_PWDBASED" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_PWDBASED_TRUE=
- BUILD_PWDBASED_FALSE='#'
-else
- BUILD_PWDBASED_TRUE='#'
- BUILD_PWDBASED_FALSE=
-fi
-
- if test "x$ENABLED_SCRYPT" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SCRYPT_TRUE=
- BUILD_SCRYPT_FALSE='#'
-else
- BUILD_SCRYPT_TRUE='#'
- BUILD_SCRYPT_FALSE=
-fi
-
- if test "x$ENABLED_CRYPTONLY" = "xyes" && test "x$ENABLED_OPENSSLEXTRA" = "xno"; then
- BUILD_CRYPTONLY_TRUE=
- BUILD_CRYPTONLY_FALSE='#'
-else
- BUILD_CRYPTONLY_TRUE='#'
- BUILD_CRYPTONLY_FALSE=
-fi
-
- if test "x$ENABLED_FASTMATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_FASTMATH_TRUE=
- BUILD_FASTMATH_FALSE='#'
-else
- BUILD_FASTMATH_TRUE='#'
- BUILD_FASTMATH_FALSE=
-fi
-
- if test "x$ENABLED_SLOWMATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SLOWMATH_TRUE=
- BUILD_SLOWMATH_FALSE='#'
-else
- BUILD_SLOWMATH_TRUE='#'
- BUILD_SLOWMATH_FALSE=
-fi
-
- if test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_LEANTLS" = "xno"; then
- BUILD_EXAMPLE_SERVERS_TRUE=
- BUILD_EXAMPLE_SERVERS_FALSE='#'
-else
- BUILD_EXAMPLE_SERVERS_TRUE='#'
- BUILD_EXAMPLE_SERVERS_FALSE=
-fi
-
- if test "x$ENABLED_EXAMPLES" = "xyes"; then
- BUILD_EXAMPLE_CLIENTS_TRUE=
- BUILD_EXAMPLE_CLIENTS_FALSE='#'
-else
- BUILD_EXAMPLE_CLIENTS_TRUE='#'
- BUILD_EXAMPLE_CLIENTS_FALSE=
-fi
-
- if test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_LEANTLS" = "xno"; then
- BUILD_TESTS_TRUE=
- BUILD_TESTS_FALSE='#'
-else
- BUILD_TESTS_TRUE='#'
- BUILD_TESTS_FALSE=
-fi
-
- if test "x$ENABLED_SINGLETHREADED" = "xno" && test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_LEANTLS" = "xno"; then
- BUILD_THREADED_EXAMPLES_TRUE=
- BUILD_THREADED_EXAMPLES_FALSE='#'
-else
- BUILD_THREADED_EXAMPLES_TRUE='#'
- BUILD_THREADED_EXAMPLES_FALSE=
-fi
-
- if test "x$ENABLED_CRYPT_TESTS" = "xyes"; then
- BUILD_WOLFCRYPT_TESTS_TRUE=
- BUILD_WOLFCRYPT_TESTS_FALSE='#'
-else
- BUILD_WOLFCRYPT_TESTS_TRUE='#'
- BUILD_WOLFCRYPT_TESTS_FALSE=
-fi
-
- if test "x$ENABLED_LIBZ" = "xyes"; then
- BUILD_LIBZ_TRUE=
- BUILD_LIBZ_FALSE='#'
-else
- BUILD_LIBZ_TRUE='#'
- BUILD_LIBZ_FALSE=
-fi
-
- if test "x$ENABLED_PKCS11" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_PKCS11_TRUE=
- BUILD_PKCS11_FALSE='#'
-else
- BUILD_PKCS11_TRUE='#'
- BUILD_PKCS11_FALSE=
-fi
-
- if test "x$ENABLED_PKCS12" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_PKCS12_TRUE=
- BUILD_PKCS12_FALSE='#'
-else
- BUILD_PKCS12_TRUE='#'
- BUILD_PKCS12_FALSE=
-fi
-
- if test "x$ENABLED_CAVIUM" = "xyes"; then
- BUILD_CAVIUM_TRUE=
- BUILD_CAVIUM_FALSE='#'
-else
- BUILD_CAVIUM_TRUE='#'
- BUILD_CAVIUM_FALSE=
-fi
-
- if test "x$ENABLED_CAVIUM_V" = "xyes"; then
- BUILD_CAVIUM_V_TRUE=
- BUILD_CAVIUM_V_FALSE='#'
-else
- BUILD_CAVIUM_V_TRUE='#'
- BUILD_CAVIUM_V_FALSE=
-fi
-
- if test "x$ENABLED_OCTEON_SYNC" = "xyes"; then
- BUILD_OCTEON_SYNC_TRUE=
- BUILD_OCTEON_SYNC_FALSE='#'
-else
- BUILD_OCTEON_SYNC_TRUE='#'
- BUILD_OCTEON_SYNC_FALSE=
-fi
-
- if test "x$ENABLED_INTEL_QA" = "xyes"; then
- BUILD_INTEL_QA_TRUE=
- BUILD_INTEL_QA_FALSE='#'
-else
- BUILD_INTEL_QA_TRUE='#'
- BUILD_INTEL_QA_FALSE=
-fi
-
- if test "x$ENABLED_INTEL_QA_SYNC" = "xyes"; then
- BUILD_INTEL_QA_SYNC_TRUE=
- BUILD_INTEL_QA_SYNC_FALSE='#'
-else
- BUILD_INTEL_QA_SYNC_TRUE='#'
- BUILD_INTEL_QA_SYNC_FALSE=
-fi
-
- if test "x$ENABLED_SP" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SP_TRUE=
- BUILD_SP_FALSE='#'
-else
- BUILD_SP_TRUE='#'
- BUILD_SP_FALSE=
-fi
-
- if (test "x$ENABLED_SP" = "xyes" && test "x$ENABLED_SP_ASM" = "xno") || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SP_C_TRUE=
- BUILD_SP_C_FALSE='#'
-else
- BUILD_SP_C_TRUE='#'
- BUILD_SP_C_FALSE=
-fi
-
- if test "x$ENABLED_SP_ARM64_ASM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SP_ARM64_TRUE=
- BUILD_SP_ARM64_FALSE='#'
-else
- BUILD_SP_ARM64_TRUE='#'
- BUILD_SP_ARM64_FALSE=
-fi
-
- if test "x$ENABLED_SP_ARM32_ASM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SP_ARM32_TRUE=
- BUILD_SP_ARM32_FALSE='#'
-else
- BUILD_SP_ARM32_TRUE='#'
- BUILD_SP_ARM32_FALSE=
-fi
-
- if test "x$ENABLED_SP_ARM_THUMB_ASM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SP_ARM_THUMB_TRUE=
- BUILD_SP_ARM_THUMB_FALSE='#'
-else
- BUILD_SP_ARM_THUMB_TRUE='#'
- BUILD_SP_ARM_THUMB_FALSE=
-fi
-
- if test "x$ENABLED_SP_ARM_CORTEX_ASM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SP_ARM_CORTEX_TRUE=
- BUILD_SP_ARM_CORTEX_FALSE='#'
-else
- BUILD_SP_ARM_CORTEX_TRUE='#'
- BUILD_SP_ARM_CORTEX_FALSE=
-fi
-
- if test "x$ENABLED_SP_X86_64_ASM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SP_X86_64_TRUE=
- BUILD_SP_X86_64_FALSE='#'
-else
- BUILD_SP_X86_64_TRUE='#'
- BUILD_SP_X86_64_FALSE=
-fi
-
- if test "x$ENABLED_SP_MATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_SP_INT_TRUE=
- BUILD_SP_INT_FALSE='#'
-else
- BUILD_SP_INT_TRUE='#'
- BUILD_SP_INT_FALSE=
-fi
-
- if test "x$ENABLED_FAST_RSA" = "xyes"; then
- BUILD_FAST_RSA_TRUE=
- BUILD_FAST_RSA_FALSE='#'
-else
- BUILD_FAST_RSA_TRUE='#'
- BUILD_FAST_RSA_FALSE=
-fi
-
- if test "x$ENABLED_MCAPI" = "xyes"; then
- BUILD_MCAPI_TRUE=
- BUILD_MCAPI_FALSE='#'
-else
- BUILD_MCAPI_TRUE='#'
- BUILD_MCAPI_FALSE=
-fi
-
- if test "x$ENABLED_ASYNCCRYPT" = "xyes"; then
- BUILD_ASYNCCRYPT_TRUE=
- BUILD_ASYNCCRYPT_FALSE='#'
-else
- BUILD_ASYNCCRYPT_TRUE='#'
- BUILD_ASYNCCRYPT_FALSE=
-fi
-
- if test "x$ENABLED_ASYNCCRYPT" = "xyes"; then
- BUILD_WOLFEVENT_TRUE=
- BUILD_WOLFEVENT_FALSE='#'
-else
- BUILD_WOLFEVENT_TRUE='#'
- BUILD_WOLFEVENT_FALSE=
-fi
-
- if test "x$ENABLED_CRYPTOCB" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_CRYPTOCB_TRUE=
- BUILD_CRYPTOCB_FALSE='#'
-else
- BUILD_CRYPTOCB_TRUE='#'
- BUILD_CRYPTOCB_FALSE=
-fi
-
- if test "x$ENABLED_PSK" = "xyes"; then
- BUILD_PSK_TRUE=
- BUILD_PSK_FALSE='#'
-else
- BUILD_PSK_TRUE='#'
- BUILD_PSK_FALSE=
-fi
-
- if test "x$ENABLED_TRUSTED_PEER_CERT" = "xyes"; then
- BUILD_TRUST_PEER_CERT_TRUE=
- BUILD_TRUST_PEER_CERT_FALSE='#'
-else
- BUILD_TRUST_PEER_CERT_TRUE='#'
- BUILD_TRUST_PEER_CERT_FALSE=
-fi
-
- if test "x$ENABLED_PKI" = "xyes"; then
- BUILD_PKI_TRUE=
- BUILD_PKI_FALSE='#'
-else
- BUILD_PKI_TRUE='#'
- BUILD_PKI_FALSE=
-fi
-
- if test "x$ENABLED_DES3" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_DES3_TRUE=
- BUILD_DES3_FALSE='#'
-else
- BUILD_DES3_TRUE='#'
- BUILD_DES3_FALSE=
-fi
-
- if test "x$ENABLED_PKCS7" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"; then
- BUILD_PKCS7_TRUE=
- BUILD_PKCS7_FALSE='#'
-else
- BUILD_PKCS7_TRUE='#'
- BUILD_PKCS7_FALSE=
-fi
-
- if test "x$ENABLED_HASHFLAGS" = "xyes"; then
- BUILD_HASHFLAGS_TRUE=
- BUILD_HASHFLAGS_FALSE='#'
-else
- BUILD_HASHFLAGS_TRUE='#'
- BUILD_HASHFLAGS_FALSE=
-fi
-
-
-
-
-
- HEX_VERSION=`echo $VERSION | sed 's|\-a-z0-9*$||' | \
- awk -F. '{printf "0x%0.2d%0.3d%0.3d", $1, $2, $3}'`
-
-
-
-
-
-
-
-
-
-# FINAL
-ac_config_files="$ac_config_files stamp-h"
-
-ac_config_files="$ac_config_files Makefile wolfssl/version.h wolfssl/options.h cyassl/options.h support/wolfssl.pc rpm/spec"
-
-
-# create a generic PACKAGE-config file
-L=`echo $PACKAGE $LIBS`
-P=`echo $L | sed -e 's/ -.*//'`
-P=`echo $P`
-V=`echo $VERSION`
-F=`echo $P-config`
-L=`echo -l$L | sed -e 's/^-llib/-l/'`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: creating $F - generic $V for $L" >&5
-$as_echo "creating $F - generic $V for $L" >&6; }
-test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-echo '#! /bin/sh' >$F
-echo ' ' >>$F
-echo 'package="'$P'"' >>$F
-echo 'version="'$V'"' >>$F
-echo 'libs="'$L'"' >>$F
-echo ' ' >>$F
-# in the order of occurrence a standard automake Makefile
-echo 'prefix="'$prefix'"' >>$F
-echo 'exec_prefix="'$exec_prefix'"' >>$F
-echo 'bindir="'$bindir'"' >>$F
-echo 'sbindir="'$sbindir'"' >>$F
-echo 'libexecdir="'$libexecdir'"' >>$F
-echo 'datadir="'$datadir'"' >>$F
-echo 'sysconfdir="'$sysconfdir'"' >>$F
-echo 'sharedstatedir="'$sharedstatedir'"' >>$F
-echo 'localstatedir="'$localstatedir'"' >>$F
-echo 'libdir="'$libdir'"' >>$F
-echo 'infodir="'$infodir'"' >>$F
-echo 'mandir="'$mandir'"' >>$F
-echo 'includedir="'$includedir'"' >>$F
-echo 'target="'$target'"' >>$F
-echo 'host="'$host'"' >>$F
-echo 'build="'$build'"' >>$F
-echo ' ' >>$F
-echo 'if test "'"\$""#"'" -eq 0; then' >>$F
-echo ' cat <>$F
-echo 'Usage: $package-config OPTIONS' >>$F
-echo 'Options:' >>$F
-echo ' --prefix=DIR) : \$prefix' >>$F
-echo ' --package) : \$package' >>$F
-echo ' --version) : \$version' >>$F
-echo ' --cflags) : -I\$includedir' >>$F
-echo ' --libs) : -L\$libdir -l\$package' >>$F
-echo ' --help) print all the options (not just these)' >>$F
-echo 'EOF' >>$F
-echo 'fi' >>$F
-echo ' ' >>$F
-echo 'o=""' >>$F
-echo 'h=""' >>$F
-echo 'for i in "$@"; do' >>$F
-echo ' case $i in' >>$F
-echo ' --prefix=*) prefix=`echo $i | sed -e "s/--prefix=//"` ;;' >>$F
-echo ' --prefix) o="$o $prefix" ;;' >>$F
-echo ' --package) o="$o $package" ;;' >>$F
-echo ' --version) o="$o $version" ;;' >>$F
-echo ' --cflags) if test "_$includedir" != "_/usr/include"' >>$F
-echo ' then o="$o -I$includedir" ; fi' >>$F
-echo ' ;;' >>$F
-echo ' --libs) o="$o -L$libdir $libs" ;;' >>$F
-echo ' --exec_prefix|--eprefix) o="$o $exec_prefix" ;;' >>$F
-echo ' --bindir) o="$o $bindir" ;;' >>$F
-echo ' --sbindir) o="$o $sbindir" ;;' >>$F
-echo ' --libexecdir) o="$o $libexecdir" ;;' >>$F
-echo ' --datadir) o="$o $datadir" ;;' >>$F
-echo ' --datainc) o="$o -I$datadir" ;;' >>$F
-echo ' --datalib) o="$o -L$datadir" ;;' >>$F
-echo ' --sysconfdir) o="$o $sysconfdir" ;;' >>$F
-echo ' --sharedstatedir) o="$o $sharedstatedir" ;;' >>$F
-echo ' --localstatedir) o="$o $localstatedir" ;;' >>$F
-echo ' --libdir) o="$o $libdir" ;;' >>$F
-echo ' --libadd) o="$o -L$libdir" ;;' >>$F
-echo ' --infodir) o="$o $infodir" ;;' >>$F
-echo ' --mandir) o="$o $mandir" ;;' >>$F
-echo ' --target) o="$o $target" ;;' >>$F
-echo ' --host) o="$o $host" ;;' >>$F
-echo ' --build) o="$o $build" ;;' >>$F
-echo ' --data) o="$o -I$datadir/$package" ;;' >>$F
-echo ' --pkgdatadir) o="$o $datadir/$package" ;;' >>$F
-echo ' --pkgdatainc) o="$o -I$datadir/$package" ;;' >>$F
-echo ' --pkgdatalib) o="$o -L$datadir/$package" ;;' >>$F
-echo ' --pkglibdir) o="$o $libdir/$package" ;;' >>$F
-echo ' --pkglibinc) o="$o -I$libinc/$package" ;;' >>$F
-echo ' --pkglibadd) o="$o -L$libadd/$package" ;;' >>$F
-echo ' --pkgincludedir) o="$o $includedir/$package" ;;' >>$F
-echo ' --help) h="1" ;;' >>$F
-echo ' -?//*|-?/*//*|-?./*//*|//*|/*//*|./*//*) ' >>$F
-echo ' v=`echo $i | sed -e s://:\$:g`' >>$F
-echo ' v=`eval "echo $v"` ' >>$F
-echo ' o="$o $v" ;; ' >>$F
-echo ' esac' >>$F
-echo 'done' >>$F
-echo ' ' >>$F
-echo 'o=`eval "echo $o"`' >>$F
-echo 'o=`eval "echo $o"`' >>$F
-echo 'eval "echo $o"' >>$F
-echo ' ' >>$F
-echo 'if test ! -z "$h" ; then ' >>$F
-echo 'cat <>$F
-echo ' --prefix=xxx) (what is that for anyway?)' >>$F
-echo ' --prefix) \$prefix $prefix' >>$F
-echo ' --package) \$package $package' >>$F
-echo ' --version) \$version $version' >>$F
-echo ' --cflags) -I\$includedir unless it is /usr/include' >>$F
-echo ' --libs) -L\$libdir -l\$PACKAGE \$LIBS' >>$F
-echo ' --exec_prefix) or... ' >>$F
-echo ' --eprefix) \$exec_prefix $exec_prefix' >>$F
-echo ' --bindir) \$bindir $bindir' >>$F
-echo ' --sbindir) \$sbindir $sbindir' >>$F
-echo ' --libexecdir) \$libexecdir $libexecdir' >>$F
-echo ' --datadir) \$datadir $datadir' >>$F
-echo ' --sysconfdir) \$sysconfdir $sysconfdir' >>$F
-echo ' --sharedstatedir) \$sharedstatedir$sharedstatedir' >>$F
-echo ' --localstatedir) \$localstatedir $localstatedir' >>$F
-echo ' --libdir) \$libdir $libdir' >>$F
-echo ' --infodir) \$infodir $infodir' >>$F
-echo ' --mandir) \$mandir $mandir' >>$F
-echo ' --target) \$target $target' >>$F
-echo ' --host) \$host $host' >>$F
-echo ' --build) \$build $build' >>$F
-echo ' --data) -I\$datadir/\$package' >>$F
-echo ' --pkgdatadir) \$datadir/\$package' >>$F
-echo ' --pkglibdir) \$libdir/\$package' >>$F
-echo ' --pkgincludedir) \$includedir/\$package' >>$F
-echo ' --help) generated by ax_create_generic_config.m4' >>$F
-echo ' -I//varname and other inc-targets like --pkgdatainc supported' >>$F
-echo ' -L//varname and other lib-targets, e.g. --pkgdatalib or --libadd' >>$F
-echo 'EOF' >>$F
-echo 'fi' >>$F
-GENERIC_CONFIG="$F"
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking the number of available CPUs" >&5
-$as_echo_n "checking the number of available CPUs... " >&6; }
- CPU_COUNT="0"
-
- # Try generic methods
-
- # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and
- # 'NPROCESSORS_ONLN' are platform-specific
- command -v getconf >/dev/null 2>&1 && \
- CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0"
- if test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1; then :
- : # empty
-else
- # 'nproc' is part of GNU Coreutils and is widely available
- CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0"
-
-fi
- if test "$CPU_COUNT" -gt "0" 2>/dev/null; then :
- : # empty
-else
- # Try platform-specific preferred methods
- case $host_os in #(
- *linux*) :
- CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^[0-9]+,' -c` || CPU_COUNT="0" ;; #(
- *darwin*) :
- CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0" ;; #(
- freebsd*) :
- command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0" ;; #(
- netbsd*) :
- command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0" ;; #(
- solaris*) :
- command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^[0-9].*on-line' -c 2>/dev/null` || CPU_COUNT="0" ;; #(
- mingw*) :
- CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^[0-9]+/' -c` || CPU_COUNT="0" ;; #(
- msys*) :
- CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^[0-9]+/' -c` || CPU_COUNT="0" ;; #(
- cygwin*) :
- CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^[0-9]+/' -c` || CPU_COUNT="0" ;; #(
- *) :
- ;;
-esac
-fi
- if test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1; then :
- : # empty
-else
- # Try less preferred generic method
- # 'hw.ncpu' exist on many platforms, but not on GNU/Linux
- CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0"
-
-fi
- if test "$CPU_COUNT" -gt "0" 2>/dev/null; then :
- : # empty
-else
- # Try platform-specific fallback methods
- # They can be less accurate and slower then preferred methods
- case $host_os in #(
- *linux*) :
- CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0" ;; #(
- *darwin*) :
- CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0" ;; #(
- freebsd*) :
- CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu[0-9]+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0" ;; #(
- netbsd*) :
- CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^[0-9]+ .* online ' -c` || \
- CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu[0-9]+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0" ;; #(
- solaris*) :
- command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \
- CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0" ;; #(
- mingw*) :
- if CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\[0-9]+$' -c`; then :
- : # empty
-else
- test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"
-fi ;; #(
- msys*) :
- test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS" ;; #(
- cygwin*) :
- test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS" ;; #(
- *) :
- ;;
-esac
-fi
- if test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPU_COUNT" >&5
-$as_echo "$CPU_COUNT" >&6; }
-
-else
- CPU_COUNT="1"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to detect (assuming 1)" >&5
-$as_echo "unable to detect (assuming 1)" >&6; }
-
-fi
-
-AX_DOLLAR="\$"
-AX_SRB="\\135"
-AX_SLB="\\133"
-AX_BS="\\\\"
-AX_DQ="\""
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: adding automake macro support" >&5
-$as_echo "$as_me: adding automake macro support" >&6;}
-AMINCLUDE="aminclude.am"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $AMINCLUDE" >&5
-$as_echo "$as_me: creating $AMINCLUDE" >&6;}
-AMINCLUDE_TIME=`LC_ALL=C date`
-
-
-printf "
-# generated automatically by configure from AX_AUTOMAKE_MACROS
-# on $AMINCLUDE_TIME
-
-" > "$AMINCLUDE"
-
-
-INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE"
-
-
-
-
-
- # Check whether --enable-jobserver was given.
-if test "${enable_jobserver+set}" = set; then :
- enableval=$enable_jobserver;
-else
- enable_jobserver=yes
-fi
-
- if test "x$enable_jobserver" = "xyes"; then
- enable_jobserver=$CPU_COUNT
- : $((enable_jobserver+=1))
- fi
-
- if test "x$enable_jobserver" != "xno"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: added jobserver support to make for $enable_jobserver jobs" >&5
-$as_echo "$as_me: added jobserver support to make for $enable_jobserver jobs" >&6;}
-
-
-
-
-printf "%s" "AM_MAKEFLAGS += -j$enable_jobserver " >> "$AMINCLUDE"
-
-
- fi
-
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \.
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- if test ! -f "$cache_file" || test -h "$cache_file"; then
- cat confcache >"$cache_file"
- else
- case $cache_file in #(
- */* | ?:*)
- mv -f confcache "$cache_file"$$ &&
- mv -f "$cache_file"$$ "$cache_file" ;; #(
- *)
- mv -f confcache "$cache_file" ;;
- esac
- fi
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
- if test -n "$am_sleep_pid"; then
- # Hide warnings about reused PIDs.
- wait $am_sleep_pid 2>/dev/null
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error $? "conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
- if test -n "$EXEEXT"; then
- am__EXEEXT_TRUE=
- am__EXEEXT_FALSE='#'
-else
- am__EXEEXT_TRUE='#'
- am__EXEEXT_FALSE=
-fi
-
-
-if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
- as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then
- as_fn_error $? "conditional \"DEBUG\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${IS_VCS_CHECKOUT_TRUE}" && test -z "${IS_VCS_CHECKOUT_FALSE}"; then
- as_fn_error $? "conditional \"IS_VCS_CHECKOUT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_DISTRO_TRUE}" && test -z "${BUILD_DISTRO_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_DISTRO\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ALL_TRUE}" && test -z "${BUILD_ALL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ALL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_TLS13_TRUE}" && test -z "${BUILD_TLS13_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_TLS13\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_RNG_TRUE}" && test -z "${BUILD_RNG_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_RNG\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SCTP_TRUE}" && test -z "${BUILD_SCTP_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SCTP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_MCAST_TRUE}" && test -z "${BUILD_MCAST_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_MCAST\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_IPV6_TRUE}" && test -z "${BUILD_IPV6_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_IPV6\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_LEANPSK_TRUE}" && test -z "${BUILD_LEANPSK_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_LEANPSK\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_LEANTLS_TRUE}" && test -z "${BUILD_LEANTLS_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_LEANTLS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_LOWMEM_TRUE}" && test -z "${BUILD_LOWMEM_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_LOWMEM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PKCALLBACKS_TRUE}" && test -z "${BUILD_PKCALLBACKS_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_PKCALLBACKS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CRYPTOAUTHLIB_TRUE}" && test -z "${BUILD_CRYPTOAUTHLIB_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CRYPTOAUTHLIB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SNIFFER_TRUE}" && test -z "${BUILD_SNIFFER_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SNIFFER\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SNIFFTEST_TRUE}" && test -z "${BUILD_SNIFFTEST_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SNIFFTEST\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_AESGCM_TRUE}" && test -z "${BUILD_AESGCM_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_AESGCM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_AESCCM_TRUE}" && test -z "${BUILD_AESCCM_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_AESCCM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ARMASM_TRUE}" && test -z "${BUILD_ARMASM_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ARMASM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_XILINX_TRUE}" && test -z "${BUILD_XILINX_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_XILINX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_AESNI_TRUE}" && test -z "${BUILD_AESNI_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_AESNI\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_INTELASM_TRUE}" && test -z "${BUILD_INTELASM_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_INTELASM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_AFALG_TRUE}" && test -z "${BUILD_AFALG_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_AFALG\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_DEVCRYPTO_TRUE}" && test -z "${BUILD_DEVCRYPTO_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_DEVCRYPTO\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CAMELLIA_TRUE}" && test -z "${BUILD_CAMELLIA_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CAMELLIA\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_MD2_TRUE}" && test -z "${BUILD_MD2_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_MD2\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_RIPEMD_TRUE}" && test -z "${BUILD_RIPEMD_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_RIPEMD\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_BLAKE2_TRUE}" && test -z "${BUILD_BLAKE2_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_BLAKE2\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_BLAKE2S_TRUE}" && test -z "${BUILD_BLAKE2S_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_BLAKE2S\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SHA512_TRUE}" && test -z "${BUILD_SHA512_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SHA512\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_DSA_TRUE}" && test -z "${BUILD_DSA_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_DSA\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ECC_TRUE}" && test -z "${BUILD_ECC_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ECC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ED25519_TRUE}" && test -z "${BUILD_ED25519_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ED25519\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ED25519_SMALL_TRUE}" && test -z "${BUILD_ED25519_SMALL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ED25519_SMALL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_FEMATH_TRUE}" && test -z "${BUILD_FEMATH_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_FEMATH\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_GEMATH_TRUE}" && test -z "${BUILD_GEMATH_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_GEMATH\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CURVE25519_TRUE}" && test -z "${BUILD_CURVE25519_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CURVE25519\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CURVE25519_SMALL_TRUE}" && test -z "${BUILD_CURVE25519_SMALL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CURVE25519_SMALL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ED448_TRUE}" && test -z "${BUILD_ED448_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ED448\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ED448_SMALL_TRUE}" && test -z "${BUILD_ED448_SMALL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ED448_SMALL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_FE448_TRUE}" && test -z "${BUILD_FE448_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_FE448\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_GE448_TRUE}" && test -z "${BUILD_GE448_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_GE448\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CURVE448_TRUE}" && test -z "${BUILD_CURVE448_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CURVE448\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CURVE448_SMALL_TRUE}" && test -z "${BUILD_CURVE448_SMALL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CURVE448_SMALL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_MEMORY_TRUE}" && test -z "${BUILD_MEMORY_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_MEMORY\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_RSA_TRUE}" && test -z "${BUILD_RSA_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_RSA\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_DH_TRUE}" && test -z "${BUILD_DH_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_DH\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ASN_TRUE}" && test -z "${BUILD_ASN_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ASN\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_AES_TRUE}" && test -z "${BUILD_AES_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_AES\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CODING_TRUE}" && test -z "${BUILD_CODING_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CODING\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_IDEA_TRUE}" && test -z "${BUILD_IDEA_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_IDEA\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_RC4_TRUE}" && test -z "${BUILD_RC4_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_RC4\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_MD5_TRUE}" && test -z "${BUILD_MD5_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_MD5\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SHA_TRUE}" && test -z "${BUILD_SHA_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SHA\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_HC128_TRUE}" && test -z "${BUILD_HC128_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_HC128\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_RABBIT_TRUE}" && test -z "${BUILD_RABBIT_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_RABBIT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_FIPS_TRUE}" && test -z "${BUILD_FIPS_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_FIPS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_FIPS_V1_TRUE}" && test -z "${BUILD_FIPS_V1_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_FIPS_V1\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_FIPS_V2_TRUE}" && test -z "${BUILD_FIPS_V2_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_FIPS_V2\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_FIPS_RAND_TRUE}" && test -z "${BUILD_FIPS_RAND_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_FIPS_RAND\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CMAC_TRUE}" && test -z "${BUILD_CMAC_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CMAC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SELFTEST_TRUE}" && test -z "${BUILD_SELFTEST_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SELFTEST\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SHA224_TRUE}" && test -z "${BUILD_SHA224_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SHA224\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SHA3_TRUE}" && test -z "${BUILD_SHA3_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SHA3\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_POLY1305_TRUE}" && test -z "${BUILD_POLY1305_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_POLY1305\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CHACHA_TRUE}" && test -z "${BUILD_CHACHA_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CHACHA\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_INLINE_TRUE}" && test -z "${BUILD_INLINE_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_INLINE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_OCSP_TRUE}" && test -z "${BUILD_OCSP_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_OCSP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_OCSP_STAPLING_TRUE}" && test -z "${BUILD_OCSP_STAPLING_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_OCSP_STAPLING\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_OCSP_STAPLING_V2_TRUE}" && test -z "${BUILD_OCSP_STAPLING_V2_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_OCSP_STAPLING_V2\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CRL_TRUE}" && test -z "${BUILD_CRL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CRL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CRL_MONITOR_TRUE}" && test -z "${BUILD_CRL_MONITOR_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CRL_MONITOR\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_USER_RSA_TRUE}" && test -z "${BUILD_USER_RSA_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_USER_RSA\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_USER_CRYPTO_TRUE}" && test -z "${BUILD_USER_CRYPTO_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_USER_CRYPTO\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_NTRU_TRUE}" && test -z "${BUILD_NTRU_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_NTRU\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_WNR_TRUE}" && test -z "${BUILD_WNR_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_WNR\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SRP_TRUE}" && test -z "${BUILD_SRP_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SRP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${USE_VALGRIND_TRUE}" && test -z "${USE_VALGRIND_FALSE}"; then
- as_fn_error $? "conditional \"USE_VALGRIND\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_MD4_TRUE}" && test -z "${BUILD_MD4_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_MD4\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PWDBASED_TRUE}" && test -z "${BUILD_PWDBASED_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_PWDBASED\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SCRYPT_TRUE}" && test -z "${BUILD_SCRYPT_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SCRYPT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CRYPTONLY_TRUE}" && test -z "${BUILD_CRYPTONLY_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CRYPTONLY\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_FASTMATH_TRUE}" && test -z "${BUILD_FASTMATH_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_FASTMATH\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SLOWMATH_TRUE}" && test -z "${BUILD_SLOWMATH_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SLOWMATH\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_EXAMPLE_SERVERS_TRUE}" && test -z "${BUILD_EXAMPLE_SERVERS_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_EXAMPLE_SERVERS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_EXAMPLE_CLIENTS_TRUE}" && test -z "${BUILD_EXAMPLE_CLIENTS_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_EXAMPLE_CLIENTS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_TESTS_TRUE}" && test -z "${BUILD_TESTS_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_TESTS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_THREADED_EXAMPLES_TRUE}" && test -z "${BUILD_THREADED_EXAMPLES_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_THREADED_EXAMPLES\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_WOLFCRYPT_TESTS_TRUE}" && test -z "${BUILD_WOLFCRYPT_TESTS_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_WOLFCRYPT_TESTS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_LIBZ_TRUE}" && test -z "${BUILD_LIBZ_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_LIBZ\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PKCS11_TRUE}" && test -z "${BUILD_PKCS11_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_PKCS11\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PKCS12_TRUE}" && test -z "${BUILD_PKCS12_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_PKCS12\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CAVIUM_TRUE}" && test -z "${BUILD_CAVIUM_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CAVIUM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CAVIUM_V_TRUE}" && test -z "${BUILD_CAVIUM_V_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CAVIUM_V\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_OCTEON_SYNC_TRUE}" && test -z "${BUILD_OCTEON_SYNC_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_OCTEON_SYNC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_INTEL_QA_TRUE}" && test -z "${BUILD_INTEL_QA_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_INTEL_QA\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_INTEL_QA_SYNC_TRUE}" && test -z "${BUILD_INTEL_QA_SYNC_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_INTEL_QA_SYNC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SP_TRUE}" && test -z "${BUILD_SP_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SP_C_TRUE}" && test -z "${BUILD_SP_C_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SP_C\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SP_ARM64_TRUE}" && test -z "${BUILD_SP_ARM64_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SP_ARM64\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SP_ARM32_TRUE}" && test -z "${BUILD_SP_ARM32_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SP_ARM32\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SP_ARM_THUMB_TRUE}" && test -z "${BUILD_SP_ARM_THUMB_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SP_ARM_THUMB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SP_ARM_CORTEX_TRUE}" && test -z "${BUILD_SP_ARM_CORTEX_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SP_ARM_CORTEX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SP_X86_64_TRUE}" && test -z "${BUILD_SP_X86_64_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SP_X86_64\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_SP_INT_TRUE}" && test -z "${BUILD_SP_INT_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SP_INT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_FAST_RSA_TRUE}" && test -z "${BUILD_FAST_RSA_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_FAST_RSA\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_MCAPI_TRUE}" && test -z "${BUILD_MCAPI_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_MCAPI\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ASYNCCRYPT_TRUE}" && test -z "${BUILD_ASYNCCRYPT_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ASYNCCRYPT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_WOLFEVENT_TRUE}" && test -z "${BUILD_WOLFEVENT_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_WOLFEVENT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CRYPTOCB_TRUE}" && test -z "${BUILD_CRYPTOCB_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CRYPTOCB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PSK_TRUE}" && test -z "${BUILD_PSK_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_PSK\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_TRUST_PEER_CERT_TRUE}" && test -z "${BUILD_TRUST_PEER_CERT_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_TRUST_PEER_CERT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PKI_TRUE}" && test -z "${BUILD_PKI_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_PKI\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_DES3_TRUE}" && test -z "${BUILD_DES3_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_DES3\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PKCS7_TRUE}" && test -z "${BUILD_PKCS7_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_PKCS7\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_HASHFLAGS_TRUE}" && test -z "${BUILD_HASHFLAGS_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_HASHFLAGS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -pR'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -pR'
- fi
-else
- as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
- test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by wolfssl $as_me 4.5.0, which was
-generated by GNU Autoconf 2.69. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to .
-wolfssl home page: ."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-wolfssl config.status 4.5.0
-configured by $0, generated by GNU Autoconf 2.69,
- with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=?*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_HEADERS " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
- --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
-
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
-enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
-AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
-DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
-shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
-SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
-ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
-PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
-host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
-host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
-host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
-build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
-build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
-build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
-SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
-Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
-GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
-EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
-FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
-LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
-NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
-LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
-exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
-lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
-lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
-file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
-want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
-sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
-AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
-archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
-STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
-lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
-CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
-compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
-GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
-lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
-nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
-lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
-lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
-objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
-need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
-MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
-LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
-libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
-postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
-version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
-install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
-configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
-configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
-striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
-
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
- eval 'cat <<_LTECHO_EOF
-\$1
-_LTECHO_EOF'
-}
-
-# Quote evaled strings.
-for var in AS \
-DLLTOOL \
-OBJDUMP \
-SHELL \
-ECHO \
-PATH_SEPARATOR \
-SED \
-GREP \
-EGREP \
-FGREP \
-LD \
-NM \
-LN_S \
-lt_SP2NL \
-lt_NL2SP \
-reload_flag \
-deplibs_check_method \
-file_magic_cmd \
-file_magic_glob \
-want_nocaseglob \
-sharedlib_from_linklib_cmd \
-AR \
-AR_FLAGS \
-archiver_list_spec \
-STRIP \
-RANLIB \
-CC \
-CFLAGS \
-compiler \
-lt_cv_sys_global_symbol_pipe \
-lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_import \
-lt_cv_sys_global_symbol_to_c_name_address \
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-lt_cv_nm_interface \
-nm_file_list_spec \
-lt_cv_truncate_bin \
-lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_pic \
-lt_prog_compiler_wl \
-lt_prog_compiler_static \
-lt_cv_prog_compiler_c_o \
-need_locks \
-MANIFEST_TOOL \
-DSYMUTIL \
-NMEDIT \
-LIPO \
-OTOOL \
-OTOOL64 \
-shrext_cmds \
-export_dynamic_flag_spec \
-whole_archive_flag_spec \
-compiler_needs_object \
-with_gnu_ld \
-allow_undefined_flag \
-no_undefined_flag \
-hardcode_libdir_flag_spec \
-hardcode_libdir_separator \
-exclude_expsyms \
-include_expsyms \
-file_list_spec \
-variables_saved_for_relink \
-libname_spec \
-library_names_spec \
-soname_spec \
-install_override_mode \
-finish_eval \
-old_striplib \
-striplib; do
- case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in reload_cmds \
-old_postinstall_cmds \
-old_postuninstall_cmds \
-old_archive_cmds \
-extract_expsyms_cmds \
-old_archive_from_new_cmds \
-old_archive_from_expsyms_cmds \
-archive_cmds \
-archive_expsym_cmds \
-module_cmds \
-module_expsym_cmds \
-export_symbols_cmds \
-prelink_cmds \
-postlink_cmds \
-postinstall_cmds \
-postuninstall_cmds \
-finish_cmds \
-sys_lib_search_path_spec \
-configure_time_dlsearch_path \
-configure_time_lt_sys_library_path; do
- case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-ac_aux_dir='$ac_aux_dir'
-
-# See if we are running on zsh, and set the options that allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}"; then
- setopt NO_GLOB_SUBST
-fi
-
-
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- RM='$RM'
- ofile='$ofile'
-
-
-
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
- "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
- "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "wolfssl/version.h") CONFIG_FILES="$CONFIG_FILES wolfssl/version.h" ;;
- "wolfssl/options.h") CONFIG_FILES="$CONFIG_FILES wolfssl/options.h" ;;
- "cyassl/options.h") CONFIG_FILES="$CONFIG_FILES cyassl/options.h" ;;
- "support/wolfssl.pc") CONFIG_FILES="$CONFIG_FILES support/wolfssl.pc" ;;
- "rpm/spec") CONFIG_FILES="$CONFIG_FILES rpm/spec" ;;
-
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp= ac_tmp=
- trap 'exit_status=$?
- : "${ac_tmp:=$tmp}"
- { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' >$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
- ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_tt"; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any. Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[ ]*#[ ]*define[ ][ ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' >$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- for (key in D) D_is_set[key] = 1
- FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
- line = \$ 0
- split(line, arg, " ")
- if (arg[1] == "#") {
- defundef = arg[2]
- mac1 = arg[3]
- } else {
- defundef = substr(arg[1], 2)
- mac1 = arg[2]
- }
- split(mac1, mac2, "(") #)
- macro = mac2[1]
- prefix = substr(line, 1, index(line, defundef) - 1)
- if (D_is_set[macro]) {
- # Preserve the white space surrounding the "#".
- print prefix "define", macro P[macro] D[macro]
- next
- } else {
- # Replace #undef with comments. This is necessary, for example,
- # in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- if (defundef == "undef") {
- print "/*", prefix defundef, macro, "*/"
- next
- }
- }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$ac_tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$ac_tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
- ac_MKDIR_P=$MKDIR_P
- case $MKDIR_P in
- [\\/$]* | ?:[\\/]* ) ;;
- */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
- >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
- "$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
-
- rm -f "$ac_tmp/stdin"
- case $ac_file in
- -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
- *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
- esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
- :H)
- #
- # CONFIG_HEADER
- #
- if test x"$ac_file" != x-; then
- {
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
- } >"$ac_tmp/config.h" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
- else
- rm -f "$ac_file"
- mv "$ac_tmp/config.h" "$ac_file" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- fi
- else
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error $? "could not create -" "$LINENO" 5
- fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_arg="$ac_file"
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $_am_arg | $_am_arg:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$_am_arg" : 'X\(//\)[^/]' \| \
- X"$_am_arg" : 'X\(//\)$' \| \
- X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
- esac
-
-
- case $ac_file$ac_mode in
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Older Autoconf quotes --file arguments for eval, but not when files
- # are listed without --file. Let's play safe and only enable the eval
- # if we detect the quoting.
- # TODO: see whether this extra hack can be removed once we start
- # requiring Autoconf 2.70 or later.
- case $CONFIG_FILES in #(
- *\'*) :
- eval set x "$CONFIG_FILES" ;; #(
- *) :
- set x $CONFIG_FILES ;; #(
- *) :
- ;;
-esac
- shift
- # Used to flag and report bootstrapping failures.
- am_rc=0
- for am_mf
- do
- # Strip MF so we end up with the name of the file.
- am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile which includes
- # dependency-tracking related rules and includes.
- # Grep'ing the whole file directly is not great: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
- || continue
- am_dirpart=`$as_dirname -- "$am_mf" ||
-$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$am_mf" : 'X\(//\)[^/]' \| \
- X"$am_mf" : 'X\(//\)$' \| \
- X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$am_mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- am_filepart=`$as_basename -- "$am_mf" ||
-$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
- X"$am_mf" : 'X\(//\)$' \| \
- X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$am_mf" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { echo "$as_me:$LINENO: cd "$am_dirpart" \
- && sed -e '/# am--include-marker/d' "$am_filepart" \
- | $MAKE -f - am--depfiles" >&5
- (cd "$am_dirpart" \
- && sed -e '/# am--include-marker/d' "$am_filepart" \
- | $MAKE -f - am--depfiles) >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } || am_rc=$?
- done
- if test $am_rc -ne 0; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "Something went wrong bootstrapping makefile fragments
- for automatic dependency tracking. If GNU make was not used, consider
- re-running the configure script with MAKE=\"gmake\" (or whatever is
- necessary). You can also try re-running configure with the
- '--disable-dependency-tracking' option to at least be able to build
- the package (albeit without support for automatic dependency tracking).
-See \`config.log' for more details" "$LINENO" 5; }
- fi
- { am_dirpart=; unset am_dirpart;}
- { am_filepart=; unset am_filepart;}
- { am_mf=; unset am_mf;}
- { am_rc=; unset am_rc;}
- rm -f conftest-deps.mk
-}
- ;;
- "libtool":C)
-
- # See if we are running on zsh, and set the options that allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}"; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile=${ofile}T
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-# Generated automatically by $as_me ($PACKAGE) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-
-# Provide generalized library-building support services.
-# Written by Gordon Matzigkeit, 1996
-
-# Copyright (C) 2014 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of of the License, or
-# (at your option) any later version.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program or library that is built
-# using GNU Libtool, you may include this file under the same
-# distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-
-# The names of the tagged configurations supported by this script.
-available_tags=''
-
-# Configured defaults for sys_lib_dlsearch_path munging.
-: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Which release of libtool.m4 was used?
-macro_version=$macro_version
-macro_revision=$macro_revision
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Assembler program.
-AS=$lt_AS
-
-# DLL creation program.
-DLLTOOL=$lt_DLLTOOL
-
-# Object dumper program.
-OBJDUMP=$lt_OBJDUMP
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# What type of objects to build.
-pic_mode=$pic_mode
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# Shared archive member basename,for filename based shared library versioning on AIX.
-shared_archive_member_spec=$shared_archive_member_spec
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# An echo program that protects backslashes.
-ECHO=$lt_ECHO
-
-# The PATH separator for the build system.
-PATH_SEPARATOR=$lt_PATH_SEPARATOR
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="\$SED -e 1s/^X//"
-
-# A grep program that handles long lines.
-GREP=$lt_GREP
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# A literal string matcher.
-FGREP=$lt_FGREP
-
-# A BSD- or MS-compatible name lister.
-NM=$lt_NM
-
-# Whether we need soft or hard links.
-LN_S=$lt_LN_S
-
-# What is the maximum length of a command?
-max_cmd_len=$max_cmd_len
-
-# Object file suffix (normally "o").
-objext=$ac_objext
-
-# Executable file suffix (normally "").
-exeext=$exeext
-
-# whether the shell understands "unset".
-lt_unset=$lt_unset
-
-# turn spaces into newlines.
-SP2NL=$lt_lt_SP2NL
-
-# turn newlines into spaces.
-NL2SP=$lt_lt_NL2SP
-
-# convert \$build file names to \$host format.
-to_host_file_cmd=$lt_cv_to_host_file_cmd
-
-# convert \$build files to toolchain format.
-to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method = "file_magic".
-file_magic_cmd=$lt_file_magic_cmd
-
-# How to find potential files when deplibs_check_method = "file_magic".
-file_magic_glob=$lt_file_magic_glob
-
-# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
-want_nocaseglob=$lt_want_nocaseglob
-
-# Command to associate shared and link libraries.
-sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
-
-# The archiver.
-AR=$lt_AR
-
-# Flags to create an archive.
-AR_FLAGS=$lt_AR_FLAGS
-
-# How to feed a file listing to the archiver.
-archiver_list_spec=$lt_archiver_list_spec
-
-# A symbol stripping program.
-STRIP=$lt_STRIP
-
-# Commands used to install an old-style archive.
-RANLIB=$lt_RANLIB
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Whether to use a lock for old archive extraction.
-lock_old_archive_extraction=$lock_old_archive_extraction
-
-# A C compiler.
-LTCC=$lt_CC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_CFLAGS
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration.
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm into a list of symbols to manually relocate.
-global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
-
-# Transform the output of nm in a C name address pair.
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# Transform the output of nm in a C name address pair when lib prefix is needed.
-global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
-
-# The name lister interface.
-nm_interface=$lt_lt_cv_nm_interface
-
-# Specify filename containing input files for \$NM.
-nm_file_list_spec=$lt_nm_file_list_spec
-
-# The root where to search for dependent libraries,and where our libraries should be installed.
-lt_sysroot=$lt_sysroot
-
-# Command to truncate a binary pipe.
-lt_truncate_bin=$lt_lt_cv_truncate_bin
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# Used to examine libraries when file_magic_cmd begins with "file".
-MAGIC_CMD=$MAGIC_CMD
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Manifest tool.
-MANIFEST_TOOL=$lt_MANIFEST_TOOL
-
-# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
-DSYMUTIL=$lt_DSYMUTIL
-
-# Tool to change global to local symbols on Mac OS X.
-NMEDIT=$lt_NMEDIT
-
-# Tool to manipulate fat objects and archives on Mac OS X.
-LIPO=$lt_LIPO
-
-# ldd/readelf like tool for Mach-O binaries on Mac OS X.
-OTOOL=$lt_OTOOL
-
-# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
-OTOOL64=$lt_OTOOL64
-
-# Old archive suffix (normally "a").
-libext=$libext
-
-# Shared library suffix (normally ".so").
-shrext_cmds=$lt_shrext_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at link time.
-variables_saved_for_relink=$lt_variables_saved_for_relink
-
-# Do we need the "lib" prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Library versioning type.
-version_type=$version_type
-
-# Shared library runtime path variable.
-runpath_var=$runpath_var
-
-# Shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Permission mode override for installation of shared libraries.
-install_override_mode=$lt_install_override_mode
-
-# Command to use after installation of a shared archive.
-postinstall_cmds=$lt_postinstall_cmds
-
-# Command to use after uninstallation of a shared archive.
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# As "finish_cmds", except a single script fragment to be evaled but
-# not shown.
-finish_eval=$lt_finish_eval
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Compile-time system search path for libraries.
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Detected run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
-
-# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
-configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds
-
-# A language specific compiler.
-CC=$lt_compiler
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds
-
-# Commands necessary for finishing linking programs.
-postlink_cmds=$lt_postlink_cmds
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- cat <<'_LT_EOF' >> "$cfgfile"
-
-# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
-
-# func_munge_path_list VARIABLE PATH
-# -----------------------------------
-# VARIABLE is name of variable containing _space_ separated list of
-# directories to be munged by the contents of PATH, which is string
-# having a format:
-# "DIR[:DIR]:"
-# string "DIR[ DIR]" will be prepended to VARIABLE
-# ":DIR[:DIR]"
-# string "DIR[ DIR]" will be appended to VARIABLE
-# "DIRP[:DIRP]::[DIRA:]DIRA"
-# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
-# "DIRA[ DIRA]" will be appended to VARIABLE
-# "DIR[:DIR]"
-# VARIABLE will be replaced by "DIR[ DIR]"
-func_munge_path_list ()
-{
- case x$2 in
- x)
- ;;
- *:)
- eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
- ;;
- x:*)
- eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
- ;;
- *::*)
- eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
- eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
- ;;
- *)
- eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
- ;;
- esac
-}
-
-
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-func_cc_basename ()
-{
- for cc_temp in $*""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
- done
- func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-}
-
-
-# ### END FUNCTIONS SHARED WITH CONFIGURE
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test set != "${COLLECT_NAMES+set}"; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
-
-ltmain=$ac_aux_dir/ltmain.sh
-
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-
- ;;
- "stamp-h":F) echo timestamp > stamp-h ;;
-
- esac
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-
-# force make clean
-echo "---"
-echo "Running make clean..."
-make clean >/dev/null 2>&1
-
-# generate user options header
-echo "---"
-echo "Generating user options header..."
-
-OPTION_FILE="wolfssl/options.h"
-rm -f $OPTION_FILE
-
-echo "/* wolfssl options.h" > $OPTION_FILE
-echo " * generated from configure options" >> $OPTION_FILE
-echo " *" >> $OPTION_FILE
-echo " * Copyright (C) 2006-2020 wolfSSL Inc." >> $OPTION_FILE
-echo " *" >> $OPTION_FILE
-echo " * This file is part of wolfSSL. (formerly known as CyaSSL)" >> $OPTION_FILE
-echo " *" >> $OPTION_FILE
-echo " */" >> $OPTION_FILE
-
-echo "" >> $OPTION_FILE
-echo "#ifndef WOLFSSL_OPTIONS_H" >> $OPTION_FILE
-echo "#define WOLFSSL_OPTIONS_H" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-echo "#ifdef __cplusplus" >> $OPTION_FILE
-echo "extern \"C\" {" >> $OPTION_FILE
-echo "#endif" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-
-for option in $CPPFLAGS $AM_CPPFLAGS $CFLAGS $AM_CFLAGS; do
- defonly=`echo $option | sed 's/^-D//'`
- if test "$defonly" != "$option"
- then
- noequalsign=`echo $defonly | sed 's/=/ /'`
- if test "$noequalsign" = "NDEBUG" || test "$noequalsign" = "DEBUG"
- then
- echo "not outputting (N)DEBUG to $OPTION_FILE"
- continue
- fi
-
- # allow user to ignore system options
- ignoresys=$(echo "$noequalsign" | grep '^_.*')
- if test -n "$ignoresys"
- then
- echo "#ifndef WOLFSSL_OPTIONS_IGNORE_SYS" >> $OPTION_FILE
- fi
-
- noarg=`echo $defonly | sed 's/=.*//'`
- echo "#undef $noarg" >> $OPTION_FILE
- echo "#define $noequalsign" >> $OPTION_FILE
-
- if test -n "$ignoresys"
- then
- echo "#endif" >> $OPTION_FILE
- fi
-
- echo "" >> $OPTION_FILE
- else
- echo "option w/o begin -D is $option, not saving to $OPTION_FILE"
- fi
-done
-
-echo "" >> $OPTION_FILE
-echo "#ifdef __cplusplus" >> $OPTION_FILE
-echo "}" >> $OPTION_FILE
-echo "#endif" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-echo "#endif /* WOLFSSL_OPTIONS_H */" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-echo
-
-#backwards compatibility for those who have included options or version
-touch cyassl/options.h
-echo "/* cyassl options.h" > cyassl/options.h
-echo " * generated from wolfssl/options.h" >> cyassl/options.h
-echo " */" >> cyassl/options.h
-echo ""
-while read -r line
-do
- echo "$line" >> cyassl/options.h
-done < $OPTION_FILE
-
-# switch ifdef protection in cyassl/option.h to CYASSL_OPTONS_H, remove bak
-sed -i.bak 's/WOLFSSL_OPTIONS_H/CYASSL_OPTIONS_H/g' cyassl/options.h
-
-# workaround for mingw sed that may get "Permission denied" trying to preserver permissions
-case $host_os in
- mingw*)
- chmod u+w cyassl/options.h ;;
-esac
-
-rm cyassl/options.h.bak
-
-
-# output config summary
-echo "---"
-echo "Configuration summary for $PACKAGE_NAME version $VERSION"
-echo ""
-echo " * Installation prefix: $prefix"
-echo " * System type: $host_vendor-$host_os"
-echo " * Host CPU: $host_cpu"
-echo " * C Compiler: $CC"
-echo " * C Flags: $CFLAGS"
-echo " * C++ Compiler: $CXX"
-echo " * C++ Flags: $CXXFLAGS"
-echo " * CPP Flags: $CPPFLAGS"
-echo " * CCAS Flags: $CCASFLAGS"
-echo " * LIB Flags: $LIB"
-echo " * Debug enabled: $ax_enable_debug"
-echo " * Coverage enabled: $ax_enable_coverage"
-echo " * Warnings as failure: $ac_cv_warnings_as_errors"
-echo " * make -j: $enable_jobserver"
-echo " * VCS checkout: $ac_cv_vcs_checkout"
-echo
-echo " Features "
-echo " * Single threaded: $ENABLED_SINGLETHREADED"
-echo " * Filesystem: $ENABLED_FILESYSTEM"
-echo " * OpenSSH Build: $ENABLED_OPENSSH"
-echo " * OpenSSL Extra API: $ENABLED_OPENSSLEXTRA"
-echo " * OpenSSL Coexist: $ENABLED_OPENSSLCOEXIST"
-echo " * Old Names: $ENABLED_OLDNAMES"
-echo " * Max Strength Build: $ENABLED_MAXSTRENGTH"
-echo " * Distro Build: $ENABLED_DISTRO"
-echo " * fastmath: $ENABLED_FASTMATH"
-echo " * Assembly Allowed: $ENABLED_ASM"
-echo " * sniffer: $ENABLED_SNIFFER"
-echo " * snifftest: $ENABLED_SNIFFTEST"
-echo " * ARC4: $ENABLED_ARC4"
-echo " * AES: $ENABLED_AES"
-echo " * AES-NI: $ENABLED_AESNI"
-echo " * AES-CBC: $ENABLED_AESCBC"
-echo " * AES-GCM: $ENABLED_AESGCM"
-echo " * AES-CCM: $ENABLED_AESCCM"
-echo " * AES-CTR: $ENABLED_AESCTR"
-echo " * DES3: $ENABLED_DES3"
-echo " * IDEA: $ENABLED_IDEA"
-echo " * Camellia: $ENABLED_CAMELLIA"
-echo " * NULL Cipher: $ENABLED_NULL_CIPHER"
-echo " * MD5: $ENABLED_MD5"
-echo " * RIPEMD: $ENABLED_RIPEMD"
-echo " * SHA: $ENABLED_SHA"
-echo " * SHA-224: $ENABLED_SHA224"
-echo " * SHA-384: $ENABLED_SHA384"
-echo " * SHA-512: $ENABLED_SHA512"
-echo " * SHA3: $ENABLED_SHA3"
-echo " * SHAKE256: $ENABLED_SHAKE256"
-echo " * BLAKE2: $ENABLED_BLAKE2"
-echo " * CMAC: $ENABLED_CMAC"
-echo " * keygen: $ENABLED_KEYGEN"
-echo " * certgen: $ENABLED_CERTGEN"
-echo " * certreq: $ENABLED_CERTREQ"
-echo " * certext: $ENABLED_CERTEXT"
-echo " * certgencache: $ENABLED_certgencache"
-echo " * HC-128: $ENABLED_HC128"
-echo " * RABBIT: $ENABLED_RABBIT"
-echo " * CHACHA: $ENABLED_CHACHA"
-echo " * Hash DRBG: $ENABLED_HASHDRBG"
-echo " * PWDBASED: $ENABLED_PWDBASED"
-echo " * scrypt: $ENABLED_SCRYPT"
-echo " * wolfCrypt Only: $ENABLED_CRYPTONLY"
-echo " * HKDF: $ENABLED_HKDF"
-echo " * X9.63 KDF: $ENABLED_X963KDF"
-echo " * MD4: $ENABLED_MD4"
-echo " * PSK: $ENABLED_PSK"
-echo " * Poly1305: $ENABLED_POLY1305"
-echo " * LEANPSK: $ENABLED_LEANPSK"
-echo " * LEANTLS: $ENABLED_LEANTLS"
-echo " * RSA: $ENABLED_RSA"
-echo " * RSA-PSS: $ENABLED_RSAPSS"
-echo " * DSA: $ENABLED_DSA"
-echo " * DH: $ENABLED_DH"
-echo " * DH Default Parameters: $ENABLED_DHDEFAULTPARAMS"
-echo " * ECC: $ENABLED_ECC"
-echo " * ECC Custom Curves $ENABLED_ECCCUSTCURVES"
-echo " * CURVE25519: $ENABLED_CURVE25519"
-echo " * ED25519: $ENABLED_ED25519"
-echo " * CURVE448: $ENABLED_CURVE448"
-echo " * ED448: $ENABLED_ED448"
-echo " * FPECC: $ENABLED_FPECC"
-echo " * ECC_ENCRYPT: $ENABLED_ECC_ENCRYPT"
-echo " * ASN: $ENABLED_ASN"
-echo " * Anonymous cipher: $ENABLED_ANON"
-echo " * CODING: $ENABLED_CODING"
-echo " * MEMORY: $ENABLED_MEMORY"
-echo " * I/O POOL: $ENABLED_IOPOOL"
-echo " * LIGHTY: $ENABLED_LIGHTY"
-echo " * HAPROXY: $ENABLED_HAPROXY"
-echo " * STUNNEL: $ENABLED_STUNNEL"
-echo " * Apache httpd: $ENABLED_APACHE_HTTPD"
-echo " * NGINX: $ENABLED_NGINX"
-echo " * ASIO: $ENABLED_ASIO"
-echo " * LIBWEBSOCKETS: $ENABLED_LIBWEBSOCKETS"
-echo " * Qt $ENABLED_QT"
-echo " * Qt Unit Testing $ENABLED_QT_TEST"
-echo " * SIGNAL: $ENABLED_SIGNAL"
-echo " * ERROR_STRINGS: $ENABLED_ERROR_STRINGS"
-echo " * DTLS: $ENABLED_DTLS"
-echo " * SCTP: $ENABLED_SCTP"
-echo " * Indefinite Length: $ENABLED_BER_INDEF"
-echo " * Multicast: $ENABLED_MCAST"
-echo " * SSL v3.0 (Old): $ENABLED_SSLV3"
-echo " * TLS v1.0 (Old): $ENABLED_TLSV10"
-echo " * TLS v1.1 (Old): $ENABLED_OLD_TLS"
-echo " * TLS v1.2: $ENABLED_TLSV12"
-echo " * TLS v1.3: $ENABLED_TLS13"
-echo " * Post-handshake Auth: $ENABLED_TLS13_POST_AUTH"
-echo " * Early Data: $ENABLED_TLS13_EARLY_DATA"
-echo " * Send State in HRR Cookie: $ENABLED_SEND_HRR_COOKIE"
-echo " * OCSP: $ENABLED_OCSP"
-echo " * OCSP Stapling: $ENABLED_CERTIFICATE_STATUS_REQUEST"
-echo " * OCSP Stapling v2: $ENABLED_CERTIFICATE_STATUS_REQUEST_V2"
-echo " * CRL: $ENABLED_CRL"
-echo " * CRL-MONITOR: $ENABLED_CRL_MONITOR"
-echo " * Persistent session cache: $ENABLED_SAVESESSION"
-echo " * Persistent cert cache: $ENABLED_SAVECERT"
-echo " * Atomic User Record Layer: $ENABLED_ATOMICUSER"
-echo " * Public Key Callbacks: $ENABLED_PKCALLBACKS"
-echo " * NTRU: $ENABLED_NTRU"
-echo " * QSH: $ENABLED_QSH"
-echo " * Whitewood netRandom: $ENABLED_WNR"
-echo " * Server Name Indication: $ENABLED_SNI"
-echo " * ALPN: $ENABLED_ALPN"
-echo " * Maximum Fragment Length: $ENABLED_MAX_FRAGMENT"
-echo " * Trusted CA Indication: $ENABLED_TRUSTED_CA"
-echo " * Truncated HMAC: $ENABLED_TRUNCATED_HMAC"
-echo " * Supported Elliptic Curves: $ENABLED_SUPPORTED_CURVES"
-echo " * FFDHE only in client: $ENABLED_FFDHE_ONLY"
-echo " * Session Ticket: $ENABLED_SESSION_TICKET"
-echo " * Extended Master Secret: $ENABLED_EXTENDED_MASTER"
-echo " * Renegotiation Indication: $ENABLED_RENEGOTIATION_INDICATION"
-echo " * Secure Renegotiation: $ENABLED_SECURE_RENEGOTIATION"
-echo " * Fallback SCSV: $ENABLED_FALLBACK_SCSV"
-echo " * All TLS Extensions: $ENABLED_TLSX"
-echo " * PKCS#7 $ENABLED_PKCS7"
-echo " * wolfSSH $ENABLED_WOLFSSH"
-echo " * wolfSCEP $ENABLED_WOLFSCEP"
-echo " * Secure Remote Password $ENABLED_SRP"
-echo " * Small Stack: $ENABLED_SMALL_STACK"
-echo " * valgrind unit tests: $ENABLED_VALGRIND"
-echo " * LIBZ: $ENABLED_LIBZ"
-echo " * Examples: $ENABLED_EXAMPLES"
-echo " * User Crypto: $ENABLED_USER_CRYPTO"
-echo " * Fast RSA: $ENABLED_FAST_RSA"
-echo " * Single Precision: $ENABLED_SP"
-echo " * Async Crypto: $ENABLED_ASYNCCRYPT"
-echo " * PKCS#11: $ENABLED_PKCS11"
-echo " * PKCS#12: $ENABLED_PKCS12"
-echo " * Cavium Nitox: $ENABLED_CAVIUM"
-echo " * Cavium Octeon (Sync): $ENABLED_OCTEON_SYNC"
-echo " * Intel Quick Assist: $ENABLED_INTEL_QA"
-echo " * ARM ASM: $ENABLED_ARMASM"
-echo " * AES Key Wrap: $ENABLED_AESKEYWRAP"
-echo " * Write duplicate: $ENABLED_WRITEDUP"
-echo " * Xilinx Hardware Acc.: $ENABLED_XILINX"
-echo " * Inline Code: $ENABLED_INLINE"
-echo " * Linux AF_ALG: $ENABLED_AFALG"
-echo " * Linux devcrypto: $ENABLED_DEVCRYPTO"
-echo " * Crypto callbacks: $ENABLED_CRYPTOCB"
-echo ""
-echo "---"
-
-################################################################################
-# Show warnings at bottom so they are noticed
-################################################################################
-
-if test "$ENABLED_ASYNCCRYPT" = "yes"
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Make sure real async files are loaded. Contact wolfSSL for details on using the asynccrypt option." >&5
-$as_echo "$as_me: WARNING: Make sure real async files are loaded. Contact wolfSSL for details on using the asynccrypt option." >&2;}
-fi
-
-# MinGW static vs shared library
-# Reference URL from libtool for MinGW is located at
-# http://www.gnu.org/software/libtool/manual/libtool.html#Cygwin-to-MinGW-Cross
-# this allows for not even having dllimport/dllexport on functions
-# with recent libtools, only requiring it with global variables.
-#
-# The following warning is displayed here because if not using "contemporary GNU
-# tools" there is the possibility of export/import issues.
-# wolfSSL uses __declspec(dllexport) and "contemporary GNU tools" handle the
-# case where both static and shared libraries are built.
-#
-# More can be found about the MinGW linker at
-# https://sourceware.org/binutils/docs/ld/WIN32.html
-if test "$MINGW_LIB_WARNING" = "yes"
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building with shared and static library at the same time on this system may cause export/import problems when using non contemporary GNU tools." >&5
-$as_echo "$as_me: WARNING: Building with shared and static library at the same time on this system may cause export/import problems when using non contemporary GNU tools." >&2;}
-fi
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/configure.ac b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/configure.ac
deleted file mode 100644
index 154feca82b..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/configure.ac
+++ /dev/null
@@ -1,5677 +0,0 @@
-# configure.ac
-#
-# Copyright (C) 2006-2020 wolfSSL Inc.
-#
-# This file is part of wolfSSL. (formerly known as CyaSSL)
-#
-#
-AC_COPYRIGHT([Copyright (C) 2006-2020 wolfSSL Inc.])
-AC_PREREQ([2.63])
-AC_INIT([wolfssl],[4.5.0],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[https://www.wolfssl.com])
-AC_CONFIG_AUX_DIR([build-aux])
-
-# The following sets CFLAGS to empty if unset on command line. We do not
-# want the default "-g -O2" that AC_PROG_CC sets automatically.
-: ${CFLAGS=""}
-
-# Test ar for the "U" option. Should be checked before the libtool macros.
-xxx_ar_flags=$(ar --help 2>&1)
-AS_CASE([$xxx_ar_flags],[*'use actual timestamps and uids/gids'*],[: ${AR_FLAGS="Ucru"}])
-
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_CANONICAL_HOST
-AC_CONFIG_MACRO_DIR([m4])
-
-AM_INIT_AUTOMAKE([1.11 -Wall -Werror -Wno-portability foreign tar-ustar subdir-objects no-define color-tests])
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-
-AC_ARG_PROGRAM
-
-AC_CONFIG_HEADERS([config.h:config.in])
-
-LT_PREREQ([2.2])
-LT_INIT([disable-static win32-dll])
-
-#shared library versioning
-WOLFSSL_LIBRARY_VERSION=26:0:2
-# | | |
-# +------+ | +---+
-# | | |
-# current:revision:age
-# | | |
-# | | +- increment if interfaces have been added
-# | | set to zero if interfaces have been removed
-# | | or changed
-# | +- increment if source code has changed
-# | set to zero if current is incremented
-# +- increment if interfaces have been added, removed or changed
-AC_SUBST([WOLFSSL_LIBRARY_VERSION])
-
-# Capture user C_EXTRA_FLAGS from configure line.
-# Use of C_EXTRA_FLAGS is deprecated because CFLAGS was fixed but someone
-# might still be using it.
-CFLAGS="$CFLAGS $C_EXTRA_FLAGS $C_FLAGS"
-
-gl_VISIBILITY
-AS_IF([ test -n "$CFLAG_VISIBILITY" ], [
- AM_CFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY"
- ])
-
-
-# Moved these size of and type checks before the library checks.
-# The library checks add the library to subsequent test compiles
-# and in some rare cases, the networking check causes these sizeof
-# checks to fail.
-AC_CHECK_SIZEOF([long long])
-AC_CHECK_SIZEOF([long])
-AC_CHECK_SIZEOF([time_t])
-AC_CHECK_TYPES([__uint128_t])
-AC_CHECK_FUNCS([gethostbyname getaddrinfo gettimeofday gmtime_r inet_ntoa memset socket])
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h sys/ioctl.h sys/socket.h sys/time.h errno.h])
-AC_CHECK_LIB([network],[socket])
-AC_C_BIGENDIAN
-
-AC_PROG_INSTALL
-AC_TYPE_SIZE_T
-AC_TYPE_UINT8_T
-AM_PROG_AS
-LT_LIB_M
-
-OPTIMIZE_CFLAGS="-Os"
-OPTIMIZE_FAST_CFLAGS="-O2"
-OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET"
-DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_WOLFSSL"
-LIB_ADD=
-LIB_STATIC_ADD=
-
-# Thread local storage
-AX_TLS([thread_ls_on=yes],[thread_ls_on=no])
-AS_IF([test "x$thread_ls_on" = "xyes"],[AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS"])
-
-# DEBUG
-AX_DEBUG
-AS_IF([test "$ax_enable_debug" = "yes"],
- [AM_CFLAGS="$DEBUG_CFLAGS $AM_CFLAGS"],
- [AM_CFLAGS="$AM_CFLAGS -DNDEBUG"])
-
-
-
-# FIPS
-AC_ARG_ENABLE([fips],
- [AS_HELP_STRING([--enable-fips],[Enable FIPS 140-2, Will NOT work w/o FIPS license (default: disabled)])],
- [ENABLED_FIPS=$enableval],
- [ENABLED_FIPS="no"])
-
-AS_CASE([$ENABLED_FIPS],
- ["ready"],[
- ENABLED_FIPS="yes"
- FIPS_VERSION="v2"
- FIPS_READY="yes"
- ],
- ["v2"],[
- # FIPS v2
- ENABLED_FIPS="yes"
- FIPS_VERSION="v2"
- ],
- ["rand"],[
- # FIPS Rand
- ENABLED_FIPS="yes"
- FIPS_VERSION="rand"
- ],
- ["no"],[FIPS_VERSION="none"],
- [
- # FIPS v1
- ENABLED_FIPS="yes"
- FIPS_VERSION="v1"
- ])
-
-
-# Distro build feature subset (Debian, Ubuntu, etc.)
-AC_ARG_ENABLE([distro],
- [AS_HELP_STRING([--enable-distro],[Enable wolfSSL distro build (default: disabled)])],
- [ ENABLED_DISTRO=$enableval ],
- [ ENABLED_DISTRO=no ]
- )
-if test "$ENABLED_DISTRO" = "yes"
-then
- enable_shared=yes
- enable_static=yes
- enable_all=yes
-fi
-
-
-# ALL FEATURES
-AC_ARG_ENABLE([all],
- [AS_HELP_STRING([--enable-all],[Enable all wolfSSL features, except SSLv3 (default: disabled)])],
- [ ENABLED_ALL=$enableval ],
- [ ENABLED_ALL=no ]
- )
-if test "$ENABLED_ALL" = "yes"
-then
- enable_dtls=yes
- if test "x$FIPS_VERSION" != "xv1"
- then
- enable_tls13=yes
- enable_rsapss=yes
- fi
- enable_openssh=yes
- enable_opensslextra=yes
- enable_opensslall=yes
- enable_savesession=yes
- enable_savecert=yes
- enable_atomicuser=yes
- enable_pkcallbacks=yes
- enable_aesgcm=yes
- enable_aesccm=yes
- enable_aesctr=yes
- enable_aesofb=yes
- enable_aescfb=yes
- enable_camellia=yes
- enable_ripemd=yes
- enable_sha512=yes
- enable_sha224=yes
- enable_sha3=yes
- enable_sessioncerts=yes
- enable_keygen=yes
- enable_certgen=yes
- enable_certreq=yes
- enable_certext=yes
- enable_sep=yes
- enable_hkdf=yes
- enable_dsa=yes
- enable_ecccustcurves=yes
- enable_compkey=yes
- enable_curve25519=yes
- enable_curve448=yes
- enable_ed25519=yes
- enable_fpecc=yes
- enable_eccencrypt=yes
- enable_psk=yes
- enable_idea=yes
- enable_cmac=yes
- enable_xts=yes
- enable_webserver=yes
- enable_hc128=yes
- enable_rabbit=yes
- enable_ocsp=yes
- enable_ocspstapling=yes
- enable_ocspstapling2=yes
- enable_crl=yes
- enable_crl_monitor=yes
- enable_sni=yes
- enable_maxfragment=yes
- enable_alpn=yes
- enable_truncatedhmac=yes
- enable_trusted_ca=yes
- enable_supportedcurves=yes
- enable_session_ticket=yes
- enable_tlsx=yes
- enable_pkcs7=yes
- enable_ssh=yes
- enable_scep=yes
- enable_srp=yes
- enable_certservice=yes
- enable_jni=yes
- enable_lighty=yes
- enable_haproxy=yes
- enable_stunnel=yes
- enable_nginx=yes
- enable_openvpn=yes
- enable_asio=yes
- enable_libwebsockets=yes
- enable_qt=yes
- enable_pwdbased=yes
- enable_aeskeywrap=yes
- enable_x963kdf=yes
- enable_scrypt=yes
- enable_indef=yes
- enable_enckeys=yes
- enable_hashflags=yes
- enable_dhdefaultparams=yes
-
- # Enable AES Decrypt, AES ECB, Alt Names, DER Load, Keep Certs, CRL IO with Timeout
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_DECRYPT -DHAVE_AES_ECB -DWOLFSSL_ALT_NAMES -DWOLFSSL_DER_LOAD -DKEEP_OUR_CERT -DKEEP_PEER_CERT -DHAVE_CRL_IO -DHAVE_IO_TIMEOUT"
-
- # Enable DH const table speedups (eliminates `-lm` math lib dependency)
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FFDHE_2048 -DHAVE_FFDHE_3072 -DFP_MAX_BITS=8192"
-
- # Enable ECC Key Gen / Import checks
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_VALIDATE_ECC_IMPORT -DWOLFSSL_VALIDATE_ECC_KEYGEN"
-
- # Enable multiple attribute additions such as DC
- AM_CFLAGS="-DWOLFSSL_MULTI_ATTRIB $AM_CFLAGS"
-fi
-
-
-# Support for forcing 32-bit mode
-# To force 32-bit instructions use:
-# ./configure CFLAGS="-m32" LDFLAGS="-m32" && make
-# The checks for sizeof long and long/long are run at the top of configure and require "-m32" to be set directly in the ./configure statement.
-AC_ARG_ENABLE([32bit],
- [AS_HELP_STRING([--enable-32bit],[Enables 32-bit support (default: disabled)])],
- [ ENABLED_32BIT=$enableval ],
- [ ENABLED_32BIT=no ]
- )
-
-# 16-bit compiler support
-AC_ARG_ENABLE([16bit],
- [AS_HELP_STRING([--enable-16bit],[Enables 16-bit support (default: disabled)])],
- [ ENABLED_16BIT=$enableval ],
- [ ENABLED_16BIT=no ]
- )
-if test "$ENABLED_16BIT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWC_16BIT_CPU"
-fi
-
-
-
-# Support for disabling all ASM
-AC_ARG_ENABLE([asm],
- [AS_HELP_STRING([--enable-asm],[Enables option for assembly (default: enabled)])],
- [ ENABLED_ASM=$enableval ],
- [ ENABLED_ASM=yes ]
- )
-
-if test "$ENABLED_ASM" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DTFM_NO_ASM -DWOLFSSL_NO_ASM"
-fi
-
-
-# SINGLE THREADED
-AC_ARG_ENABLE([singlethreaded],
- [AS_HELP_STRING([--enable-singlethreaded],[Enable wolfSSL single threaded (default: disabled)])],
- [ ENABLED_SINGLETHREADED=$enableval ],
- [ ENABLED_SINGLETHREADED=no ])
-
-AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xno" ],[
- AX_PTHREAD([
- AC_DEFINE([HAVE_PTHREAD], [1], [Define if you have POSIX threads libraries and header files.])
- # If AX_PTHREAD is adding -Qunused-arguments, need to prepend with -Xcompiler libtool will use it. Newer
- # versions of clang don't need the -Q flag when using pthreads.
- AS_CASE([$PTHREAD_CFLAGS],[-Qunused-arguments*],[PTHREAD_CFLAGS="-Xcompiler $PTHREAD_CFLAGS"])
- AM_CFLAGS="-D_POSIX_THREADS $AM_CFLAGS $PTHREAD_CFLAGS"
- LIBS="$LIBS $PTHREAD_LIBS"
- ],[
- ENABLED_SINGLETHREADED=yes
- ])
- ])
-
-AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xyes" ],[ AM_CFLAGS="-DSINGLE_THREADED $AM_CFLAGS" ])
-
-
-# DTLS
-AC_ARG_ENABLE([dtls],
- [AS_HELP_STRING([--enable-dtls],[Enable wolfSSL DTLS (default: disabled)])],
- [ ENABLED_DTLS=$enableval ],
- [ ENABLED_DTLS=no ]
- )
-if test "$ENABLED_DTLS" = "yes"
-then
- AM_CFLAGS="-DWOLFSSL_DTLS $AM_CFLAGS"
-fi
-
-# DTLS change MTU
-AC_ARG_ENABLE([dtls-mtu],
- [AS_HELP_STRING([--enable-dtls-mtu],[Enable setting the MTU size for wolfSSL DTLS (default: disabled)])],
- [ ENABLED_DTLS_MTU=$enableval ],
- [ ENABLED_DTLS_MTU=no ]
- )
-if test "$ENABLED_DTLS_MTU" = "yes"
-then
- AM_CFLAGS="-DWOLFSSL_DTLS_MTU $AM_CFLAGS"
-fi
-
-
-# TLS v1.3 Draft 18 (Note: only final TLS v1.3 supported, here for backwards build compatibility)
-AC_ARG_ENABLE([tls13-draft18],
- [AS_HELP_STRING([--enable-tls13-draft18],[Enable wolfSSL TLS v1.3 Draft 18 (default: disabled)])],
- [ ENABLED_TLS13_DRAFT18=$enableval ],
- [ ENABLED_TLS13_DRAFT18=no ]
- )
-
-# TLS v1.3
-AC_ARG_ENABLE([tls13],
- [AS_HELP_STRING([--enable-tls13],[Enable wolfSSL TLS v1.3 (default: enabled)])],
- [ ENABLED_TLS13=$enableval ],
- [ ENABLED_TLS13=yes ]
- )
-if test "x$FIPS_VERSION" = "xv1"
-then
- ENABLED_TLS13="no"
-fi
-
-# Post-handshake Authentication
-AC_ARG_ENABLE([postauth],
- [AS_HELP_STRING([--enable-postauth],[Enable wolfSSL Post-handshake Authentication (default: disabled)])],
- [ ENABLED_TLS13_POST_AUTH=$enableval ],
- [ ENABLED_TLS13_POST_AUTH=no ]
- )
-if test "$ENABLED_TLS13_POST_AUTH" = "yes"
-then
- if test "x$ENABLED_TLS13" = "xno"
- then
- AC_MSG_ERROR([cannot enable postauth without enabling tls13.])
- fi
- AM_CFLAGS="-DWOLFSSL_POST_HANDSHAKE_AUTH $AM_CFLAGS"
-fi
-
-
-# Hello Retry Request Cookie
-AC_ARG_ENABLE([hrrcookie],
- [AS_HELP_STRING([--enable-hrrcookie],[Enable the server to send Cookie Extension in HRR with state (default: disabled)])],
- [ ENABLED_SEND_HRR_COOKIE=$enableval ],
- [ ENABLED_SEND_HRR_COOKIE=no ]
- )
-if test "$ENABLED_SEND_HRR_COOKIE" = "yes"
-then
- if test "x$ENABLED_TLS13" = "xno"
- then
- AC_MSG_ERROR([cannot enable hrrcookie without enabling tls13.])
- fi
- AM_CFLAGS="-DWOLFSSL_SEND_HRR_COOKIE $AM_CFLAGS"
-fi
-
-
-# RNG
-AC_ARG_ENABLE([rng],
- [AS_HELP_STRING([--enable-rng],[Enable compiling and using RNG (default: enabled)])],
- [ ENABLED_RNG=$enableval ],
- [ ENABLED_RNG=yes ]
- )
-
-if test "$ENABLED_RNG" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DWC_NO_RNG"
-fi
-
-
-# DTLS-SCTP
-AC_ARG_ENABLE([sctp],
- [AS_HELP_STRING([--enable-sctp],[Enable wolfSSL DTLS-SCTP support (default: disabled)])],
- [ENABLED_SCTP=$enableval],
- [ENABLED_SCTP=no])
-
-AS_IF([test "x$ENABLED_SCTP" = "xyes"],
- [AC_MSG_CHECKING([for SCTP])
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
-[[
-#include
-#include
-]],
-[[int s = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP); if (s == -1) return 1;]])],
-[AC_MSG_RESULT(yes)],
-[AC_MSG_RESULT(no)
- AC_MSG_ERROR([SCTP not available, remove enable-sctp from configure])])
-])
-
-
-# DTLS-MULTICAST
-AC_ARG_ENABLE([mcast],
- [AS_HELP_STRING([--enable-mcast],[Enable wolfSSL DTLS multicast support (default: disabled)])],
- [ENABLED_MCAST=$enableval],
- [ENABLED_MCAST=no])
-
-
-# List of open source project defines using our openssl compatibility layer:
-# openssh (--enable-openssh) WOLFSSL_OPENSSH
-# openvpn (--enable-openvpn) WOLFSSL_OPENVPN
-# nginix (--enable-nginx) WOLFSSL_NGINX
-# haproxy (--enable-haproxy) WOLFSSL_HAPROXY
-# wpa_supplicant (--enable-wpas) WOLFSSL_WPAS
-# ssl fortress (--enable-fortress) FORTRESS
-# ssl bump (--enable-bump)
-# signal (--enable-signal)
-# lighty (--enable-lighty) HAVE_LIGHTY
-# stunnel (--enable-stunnel) HAVE_STUNNEL
-# asio (--enable-asio) WOLFSSL_ASIO
-# libwebsockets (--enable-libwebsockets) WOLFSSL_LIBWEBSOCKETS
-# qt (--enable-qt) WOLFSSL_QT
-# qt test (--enable-qt-test) WOLFSSL_QT_TEST
-# HAVE_POCO_LIB
-# WOLFSSL_MYSQL_COMPATIBLE
-# web server (--enable-webserver) HAVE_WEBSERVER
-
-
-# OpenSSH compatibility Build
-AC_ARG_ENABLE([openssh],
- [AS_HELP_STRING([--enable-openssh],[Enable OpenSSH compatibility build (default: disabled)])],
- [ENABLED_OPENSSH=$enableval],
- [ENABLED_OPENSSH=no])
-
-# OpenVPN compatibility Build
-AC_ARG_ENABLE([openvpn],
- [AS_HELP_STRING([--enable-openvpn],[Enable OpenVPN compatibility build (default: disabled)])],
- [ENABLED_OPENVPN=$enableval],
- [ENABLED_OPENVPN=no])
-
-# nginx compatibility build
-AC_ARG_ENABLE([nginx],
- [AS_HELP_STRING([--enable-nginx],[Enable nginx (default: disabled)])],
- [ ENABLED_NGINX=$enableval ],
- [ ENABLED_NGINX=no ]
- )
-
-# haproxy compatibility build
-AC_ARG_ENABLE([haproxy],
- [AS_HELP_STRING([--enable-haproxy],[Enable haproxy (default: disabled)])],
- [ ENABLED_HAPROXY=$enableval ],
- [ ENABLED_HAPROXY=no ]
- )
-
-# wpa_supplicant support
-AC_ARG_ENABLE([wpas],
- [AS_HELP_STRING([--enable-wpas],[Enable wpa_supplicant support (default: disabled)])],
- [ ENABLED_WPAS=$enableval ],
- [ ENABLED_WPAS=no ]
- )
-
-# wpa_supplicant support
-AC_ARG_ENABLE([wpas-dpp],
- [AS_HELP_STRING([--enable-wpas-dpp],[Enable wpa_supplicant support with dpp (default: disabled)])],
- [ ENABLED_WPAS_DPP=$enableval ],
- [ ENABLED_WPAS_DPP=no ]
- )
-
-if test "$ENABLED_WPAS_DPP" = "yes"
-then
- ENABLED_WPAS="yes"
-fi
-
-# Fortress build
-AC_ARG_ENABLE([fortress],
- [AS_HELP_STRING([--enable-fortress],[Enable SSL fortress build (default: disabled)])],
- [ ENABLED_FORTRESS=$enableval ],
- [ ENABLED_FORTRESS=no ]
- )
-
-# libwebsockets Support
-AC_ARG_ENABLE([libwebsockets],
- [AS_HELP_STRING([--enable-libwebsockets],[Enable libwebsockets (default: disabled)])],
- [ ENABLED_LIBWEBSOCKETS=$enableval ],
- [ ENABLED_LIBWEBSOCKETS=no ]
- )
-if test "$ENABLED_LIBWEBSOCKETS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_LIBWEBSOCKETS -DHAVE_EX_DATA -DOPENSSL_NO_EC"
-fi
-
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_FORTRESS="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_OPENSSH -DHAVE_EX_DATA -DWOLFSSL_BASE16"
-fi
-
-#IP alternative name Support
-AC_ARG_ENABLE([ip-alt-name],
- [AS_HELP_STRING([--enable-ip-alt-name],[Enable IP subject alternative name (default: disabled)])],
- [ ENABLE_IP_ALT_NAME=$enableval ],
- [ ENABLE_IP_ALT_NAME=no ]
- )
-
-if test "$ENABLE_IP_ALT_NAME" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_IP_ALT_NAME"
-fi
-
-#Qt Support
-AC_ARG_ENABLE([qt],
- [AS_HELP_STRING([--enable-qt],[Enable qt (default: disabled)])],
- [ ENABLED_QT=$enableval ],
- [ ENABLED_QT=no ]
- )
-
-# ssl bump build
-AC_ARG_ENABLE([bump],
- [AS_HELP_STRING([--enable-bump],[Enable SSL Bump build (default: disabled)])],
- [ ENABLED_BUMP=$enableval ],
- [ ENABLED_BUMP=no ]
- )
-
-# SNIFFER
-AC_ARG_ENABLE([sniffer],
- [AS_HELP_STRING([--enable-sniffer],[Enable wolfSSL sniffer support (default: disabled)])],
- [ ENABLED_SNIFFER=$enableval ],
- [ ENABLED_SNIFFER=no ]
- )
-
-# signal compatibility build
-AC_ARG_ENABLE([signal],
- [AS_HELP_STRING([--enable-signal],[Enable signal (default: disabled)])],
- [ ENABLED_SIGNAL=$enableval ],
- [ ENABLED_SIGNAL=no ]
- )
-
-# OpenSSL Coexist
-AC_ARG_ENABLE([opensslcoexist],
- [AS_HELP_STRING([--enable-opensslcoexist],[Enable coexistence of wolfssl/openssl (default: disabled)])],
- [ ENABLED_OPENSSLCOEXIST=$enableval ],
- [ ENABLED_OPENSSLCOEXIST=no ]
- )
-if test "x$ENABLED_OPENSSLCOEXIST" = "xyes"
-then
- # make sure old names are disabled
- enable_oldnames=no
-
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_COEXIST"
-fi
-
-
-# OPENSSL Compatibility ALL
-AC_ARG_ENABLE([opensslall],
-[AS_HELP_STRING([--enable-opensslall],[Enable all OpenSSL API, size++ (default: disabled)])],
-[ ENABLED_OPENSSLALL=$enableval ],
-[ ENABLED_OPENSSLALL=no ]
-)
-if test "$ENABLED_LIBWEBSOCKETS" = "yes" || test "$ENABLED_OPENVPN" = "yes" || test "$ENABLED_WPAS_DPP" = "yes"
-then
- ENABLED_OPENSSLALL="yes"
-fi
-
-if test "$ENABLED_OPENSSLALL" = "yes"
-then
-AM_CFLAGS="-DOPENSSL_ALL -DWOLFSSL_EITHER_SIDE -DWC_RSA_NO_PADDING -DWC_RSA_PSS $AM_CFLAGS"
-fi
-
-# OPENSSL Extra Compatibility
-AC_ARG_ENABLE([opensslextra],
- [AS_HELP_STRING([--enable-opensslextra],[Enable extra OpenSSL API, size+ (default: disabled)])],
- [ ENABLED_OPENSSLEXTRA=$enableval ],
- [ ENABLED_OPENSSLEXTRA=no ]
- )
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_NGINX" = "yes" || test "$ENABLED_SIGNAL" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_FORTRESS" = "yes" || test "$ENABLED_BUMP" = "yes" || test "$ENABLED_SNIFFER" = "yes" || test "$ENABLED_OPENSSLALL" = "yes" || test "$ENABLED_LIBWEBSOCKETS" = "yes"
-then
- ENABLED_OPENSSLEXTRA="yes"
-fi
-
-if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
-then
- AM_CFLAGS="-DOPENSSL_EXTRA -DWOLFSSL_ALWAYS_VERIFY_CB $AM_CFLAGS"
- AM_CFLAGS="-DWOLFSSL_VERIFY_CB_ALL_CERTS -DWOLFSSL_EXTRA_ALERTS $AM_CFLAGS"
- AM_CFLAGS="-DHAVE_EXT_CACHE $AM_CFLAGS"
-fi
-
-if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "$ENABLED_SMALL" = "yes"
-then
- AC_MSG_ERROR([cannot enable small and opensslextra, only one or the other.])
-fi
-
-if test "$ENABLED_OPENSSLEXTRA" = "x509small"
-then
- AC_MSG_NOTICE([Enabling only a subset of X509 opensslextra])
- AM_CFLAGS="-DOPENSSL_EXTRA_X509_SMALL $AM_CFLAGS"
- AM_CFLAGS="-DWOLFSSL_EKU_OID -DWOLFSSL_MULTI_ATTRIB $AM_CFLAGS"
-fi
-
-# High Strength Build
-AC_ARG_ENABLE([maxstrength],
- [AS_HELP_STRING([--enable-maxstrength],[Enable Max Strength build, allows TLSv1.2-AEAD-PFS ciphers only (default: disabled)])],
- [ENABLED_MAXSTRENGTH=$enableval],
- [ENABLED_MAXSTRENGTH=no])
-
-
-# Harden, enable Timing Resistance and Blinding by default
-AC_ARG_ENABLE([harden],
- [AS_HELP_STRING([--enable-harden],[Enable Hardened build, Enables Timing Resistance and Blinding (default: enabled)])],
- [ENABLED_HARDEN=$enableval],
- [ENABLED_HARDEN=yes])
-
-if test "$ENABLED_HARDEN" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DTFM_TIMING_RESISTANT -DECC_TIMING_RESISTANT"
- if test "$ENABLED_RNG" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWC_RSA_BLINDING"
- fi
-else
- AM_CFLAGS="$AM_CFLAGS -DWC_NO_HARDEN"
-fi
-
-
-# IPv6 Test Apps
-AC_ARG_ENABLE([ipv6],
- [AS_HELP_STRING([--enable-ipv6],[Enable testing of IPV6 (default: disabled)])],
- [ ENABLED_IPV6=$enableval ],
- [ ENABLED_IPV6=no ]
- )
-
-if test "$ENABLED_IPV6" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DTEST_IPV6 -DWOLFSSL_IPV6"
-fi
-
-
-if test "$ENABLED_WPAS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SECRET_CALLBACK -DWOLFSSL_STATIC_RSA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PUBLIC_MP -DWOLFSSL_PUBLIC_ECC_ADD_DBL"
- AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER -DHAVE_EX_DATA -DWOLFSSL_KEEP_PEER_CERT"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_EXT_CACHE"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_VERIFY_CB"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT -DWOLFSSL_DER_LOAD"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN -DWOLFSSL_DES_ECB"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WPAS"
-fi
-
-if test "$ENABLED_WPAS" = "small"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_VERIFY_CB"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_KEEP_SNI"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_EX_DATA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_EITHER_SIDE"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WPAS_SMALL"
-fi
-
-if test "$ENABLED_FORTRESS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DFORTRESS -DWOLFSSL_ALWAYS_VERIFY_CB -DWOLFSSL_AES_COUNTER -DWOLFSSL_AES_DIRECT -DWOLFSSL_DER_LOAD -DWOLFSSL_KEY_GEN"
-fi
-
-
-if test "$ENABLED_BUMP" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DLARGE_STATIC_BUFFERS -DWOLFSSL_CERT_GEN -DWOLFSSL_KEY_GEN -DHUGE_SESSION_CACHE -DFP_MAX_BITS=8192 -DWOLFSSL_DER_LOAD -DWOLFSSL_ALT_NAMES -DWOLFSSL_TEST_CERT"
-fi
-
-ENABLED_SLOWMATH="yes"
-
-# lean psk build
-AC_ARG_ENABLE([leanpsk],
- [AS_HELP_STRING([--enable-leanpsk],[Enable Lean PSK build (default: disabled)])],
- [ ENABLED_LEANPSK=$enableval ],
- [ ENABLED_LEANPSK=no ]
- )
-
-if test "$ENABLED_LEANPSK" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_LEANPSK -DWOLFSSL_STATIC_PSK -DHAVE_NULL_CIPHER -DSINGLE_THREADED -DNO_AES -DNO_FILESYSTEM -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS -DNO_PWDBASED -DNO_MD4 -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_WRITEV -DNO_DEV_RANDOM -DWOLFSSL_USER_IO -DNO_SHA"
- ENABLED_SLOWMATH="no"
- ENABLED_SINGLETHREADED="yes"
- enable_lowresource=yes
-fi
-
-
-# lean TLS build (TLS 1.2 client only (no client auth), ECC256, AES128 and SHA256 w/o Shamir)
-AC_ARG_ENABLE([leantls],
- [AS_HELP_STRING([--enable-leantls],[Enable Lean TLS build (default: disabled)])],
- [ ENABLED_LEANTLS=$enableval ],
- [ ENABLED_LEANTLS=no ]
- )
-
-if test "$ENABLED_LEANTLS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_LEANTLS -DNO_WRITEV -DHAVE_ECC -DTFM_ECC256 -DECC_USER_CURVES -DNO_WOLFSSL_SERVER -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_PWDBASED -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_SHA -DNO_PSK -DNO_WOLFSSL_MEMORY -DNO_WOLFSSL_CM_VERIFY"
- enable_lowresource=yes
-fi
-
-
-# low resource options to reduce flash and memory use
-AC_ARG_ENABLE([lowresource],
- [AS_HELP_STRING([--enable-lowresource],[Enable low resource options for memory/flash (default: disabled)])],
- [ ENABLED_LOWRESOURCE=$enableval ],
- [ ENABLED_LOWRESOURCE=no ]
- )
-
-if test "$ENABLED_LOWRESOURCE" = "yes"
-then
- # low memory / flash flags
- AM_CFLAGS="$AM_CFLAGS -DNO_SESSION_CACHE -DRSA_LOW_MEM -DALT_ECC_SIZE -DGCM_SMALL -DCURVE25519_SMALL -DED25519_SMALL -DWOLFSSL_SMALL_CERT_VERIFY"
-
- # low flash flags
- AM_CFLAGS="$AM_CFLAGS -DUSE_SLOW_SHA -DUSE_SLOW_SHA256 -DUSE_SLOW_SHA512"
-fi
-
-
-# TITAN cache
-AC_ARG_ENABLE([titancache],
- [AS_HELP_STRING([--enable-titancache],[Enable titan session cache (default: disabled)])],
- [ ENABLED_TITANCACHE=$enableval ],
- [ ENABLED_TITANCACHE=no ]
- )
-
-if test "$ENABLED_TITANCACHE" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DTITAN_SESSION_CACHE"
-fi
-
-
-# HUGE cache
-AC_ARG_ENABLE([hugecache],
- [AS_HELP_STRING([--enable-hugecache],[Enable huge session cache (default: disabled)])],
- [ ENABLED_HUGECACHE=$enableval ],
- [ ENABLED_HUGECACHE=no ]
- )
-
-if test "$ENABLED_HUGECACHE" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHUGE_SESSION_CACHE"
-fi
-
-
-# big cache
-AC_ARG_ENABLE([bigcache],
- [AS_HELP_STRING([--enable-bigcache],[Enable big session cache (default: disabled)])],
- [ ENABLED_BIGCACHE=$enableval ],
- [ ENABLED_BIGCACHE=no ]
- )
-
-if test "$ENABLED_BIGCACHE" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DBIG_SESSION_CACHE"
-fi
-
-
-# SMALL cache
-AC_ARG_ENABLE([smallcache],
- [AS_HELP_STRING([--enable-smallcache],[Enable small session cache (default: disabled)])],
- [ ENABLED_SMALLCACHE=$enableval ],
- [ ENABLED_SMALLCACHE=no ]
- )
-
-if test "$ENABLED_SMALLCACHE" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DSMALL_SESSION_CACHE"
-fi
-
-
-# Persistent session cache
-AC_ARG_ENABLE([savesession],
- [AS_HELP_STRING([--enable-savesession],[Enable persistent session cache (default: disabled)])],
- [ ENABLED_SAVESESSION=$enableval ],
- [ ENABLED_SAVESESSION=no ]
- )
-
-if test "$ENABLED_SAVESESSION" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE"
-fi
-
-
-# Persistent cert cache
-AC_ARG_ENABLE([savecert],
- [AS_HELP_STRING([--enable-savecert],[Enable persistent cert cache (default: disabled)])],
- [ ENABLED_SAVECERT=$enableval ],
- [ ENABLED_SAVECERT=no ]
- )
-
-if test "$ENABLED_SAVECERT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE"
-fi
-
-
-# Write duplicate WOLFSSL object
-AC_ARG_ENABLE([writedup],
- [AS_HELP_STRING([--enable-writedup],[Enable write duplication of WOLFSSL objects (default: disabled)])],
- [ ENABLED_WRITEDUP=$enableval ],
- [ ENABLED_WRITEDUP=no ]
- )
-
-if test "$ENABLED_WRITEDUP" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_WRITE_DUP"
-fi
-
-
-# Atomic User Record Layer
-AC_ARG_ENABLE([atomicuser],
- [AS_HELP_STRING([--enable-atomicuser],[Enable Atomic User Record Layer (default: disabled)])],
- [ ENABLED_ATOMICUSER=$enableval ],
- [ ENABLED_ATOMICUSER=no ]
- )
-
-if test "$ENABLED_ATOMICUSER" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER"
-fi
-
-
-# Public Key Callbacks
-AC_ARG_ENABLE([pkcallbacks],
- [AS_HELP_STRING([--enable-pkcallbacks],[Enable Public Key Callbacks (default: disabled)])],
- [ ENABLED_PKCALLBACKS=$enableval ],
- [ ENABLED_PKCALLBACKS=no ]
- )
-
-if test "$ENABLED_PKCALLBACKS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS"
-fi
-
-
-# Microchip/Atmel CryptoAuthLib
-ENABLED_CRYPTOAUTHLIB="no"
-trylibatcadir=""
-AC_ARG_WITH([cryptoauthlib],
- [AS_HELP_STRING([--with-cryptoauthlib=PATH],[PATH to CryptoAuthLib install (default /usr/)])],
- [
- AC_MSG_CHECKING([for cryptoauthlib])
- CPPFLAGS="$CPPFLAGS -DWOLFSSL_ATECC508A"
- LIBS="$LIBS -lcryptoauth"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ atcab_init(0); ]])],[ libatca_linked=yes ],[ libatca_linked=no ])
-
- if test "x$libatca_linked" = "xno" ; then
- if test "x$withval" != "xno" ; then
- trylibatcadir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- trylibatcadir="/usr"
- fi
-
- LDFLAGS="$LDFLAGS -L$trylibatcadir/lib"
- CPPFLAGS="$CPPFLAGS -I$trylibatcadir/lib"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ atcab_init(0); ]])],[ libatca_linked=yes ],[ libatca_linked=no ])
-
- if test "x$libatca_linked" = "xno" ; then
- AC_MSG_ERROR([cryptoauthlib isn't found.
- If it's already installed, specify its path using --with-cryptoauthlib=/dir/])
- fi
-
- AM_LDFLAGS="$AM_LDFLAGS -L$trylibatcadir/lib"
- AM_CFLAGS="$AM_CFLAGS -I$trylibatcadir/lib"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([yes])
- fi
-
- ENABLED_CRYPTOAUTHLIB="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ATECC508A"
- ]
-)
-
-
-# sniffer doesn't work in maxstrength mode
-if test "$ENABLED_SNIFFER" = "yes" && test "$ENABLED_MAXSTRENGTH" = "yes"
-then
- AC_MSG_ERROR([cannot enable maxstrength in sniffer mode.])
-fi
-
-ENABLED_SNIFFTEST=no
-AS_IF([ test "x$ENABLED_SNIFFER" = "xyes" ],
- [
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SNIFFER -DWOLFSSL_STATIC_EPHEMERAL"
- AC_CHECK_HEADERS([pcap/pcap.h],
- [ ENABLED_SNIFFTEST=yes ],
- [ AC_MSG_WARN([cannot enable sniffer test without having libpcap available.]) ]
- )
- ])
-
-
-# AES-CBC
-AC_ARG_ENABLE([aescbc],
- [AS_HELP_STRING([--enable-aescbc],[Enable wolfSSL AES-CBC support (default: enabled)])],
- [ ENABLED_AESCBC=$enableval ],
- [ ENABLED_AESCBC=yes ]
- )
-
-if test "$ENABLED_AESCBC" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_AES_CBC"
-fi
-
-# leanpsk and leantls don't need gcm
-
-# AES-GCM
-AC_ARG_ENABLE([aesgcm],
- [AS_HELP_STRING([--enable-aesgcm],[Enable wolfSSL AES-GCM support (default: enabled)])],
- [ ENABLED_AESGCM=$enableval ],
- [ ENABLED_AESGCM=yes ]
- )
-
-# leanpsk and leantls don't need gcm
-if test "$ENABLED_LEANPSK" = "yes" || ( test "$ENABLED_LEANTLS" = "yes" &&
- test "$ENABLED_TLS13" = "no")
-then
- ENABLED_AESGCM=no
-fi
-
-if test "$ENABLED_AESGCM" != "no"
-then
- if test "$ENABLED_AESGCM" = "word32"
- then
- AM_CFLAGS="$AM_CFLAGS -DGCM_WORD32"
- ENABLED_AESGCM=yes
- fi
-
- if test "$ENABLED_AESGCM" = "small" || test "$ENABLED_LOWRESOURCE" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DGCM_SMALL"
- ENABLED_AESGCM=yes
- fi
-
- if test "$ENABLED_AESGCM" = "table"
- then
- AM_CFLAGS="$AM_CFLAGS -DGCM_TABLE"
- ENABLED_AESGCM=yes
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM"
-fi
-
-
-# AES-CCM
-AC_ARG_ENABLE([aesccm],
- [AS_HELP_STRING([--enable-aesccm],[Enable wolfSSL AES-CCM support (default: disabled)])],
- [ ENABLED_AESCCM=$enableval ],
- [ ENABLED_AESCCM=no ]
- )
-
-if test "$ENABLED_AESCCM" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM"
-fi
-
-
-# AES-CTR
-AC_ARG_ENABLE([aesctr],
- [AS_HELP_STRING([--enable-aesctr],[Enable wolfSSL AES-CTR support (default: disabled)])],
- [ ENABLED_AESCTR=$enableval ],
- [ ENABLED_AESCTR=no ]
- )
-if test "$ENABLED_OPENVPN" = "yes"
-then
- ENABLED_AESCTR=yes
-fi
-
-if test "$ENABLED_AESCTR" = "yes"
-then
- if test "x$ENABLED_FORTRESS" != "xyes"
- then
- # This is already implied by fortress build
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_COUNTER -DWOLFSSL_AES_DIRECT"
- fi
-fi
-
-
-# AES-OFB
-AC_ARG_ENABLE([aesofb],
- [AS_HELP_STRING([--enable-aesofb],[Enable wolfSSL AES-OFB support (default: disabled)])],
- [ ENABLED_AESOFB=$enableval ],
- [ ENABLED_AESOFB=no ]
- )
-
-if test "$ENABLED_AESOFB" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_OFB -DWOLFSSL_AES_DIRECT"
-fi
-
-
-# AES-CFB
-AC_ARG_ENABLE([aescfb],
- [AS_HELP_STRING([--enable-aescfb],[Enable wolfSSL AES-CFB support (default: disabled)])],
- [ ENABLED_AESCFB=$enableval ],
- [ ENABLED_AESCFB=no ]
- )
-
-if test "$ENABLED_AESCFB" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_CFB"
-fi
-
-
-# AES-ARM
-AC_ARG_ENABLE([armasm],
- [AS_HELP_STRING([--enable-armasm],[Enable wolfSSL ARMv8 ASM support (default: disabled)])],
- [ ENABLED_ARMASM=$enableval ],
- [ ENABLED_ARMASM=no ]
- )
-if test "$ENABLED_ARMASM" = "yes" && test "$ENABLED_ASM" = "yes"
-then
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_ARMASM"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ARMASM -DWOLFSSL_NO_HASH_RAW"
- #Check if mcpu and mfpu values already set if not use default
- case $CPPFLAGS in
- *mcpu* | *mfpu*)
- break;; #Do not override user set values
- *)
- case $host_cpu in
- *aarch64*)
- # +crypto needed for hardware acceleration
- AM_CPPFLAGS="$AM_CPPFLAGS -mcpu=generic+crypto"
- # Include options.h
- AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
-
- # Check for and set -mstrict-align compiler flag
- # Used to set assumption that Aarch64 systems will not handle
- # unaligned memory references. The flag -mstrict-align is needed
- # on some compiler versions to avoid an invalid addressing mode
- # error with "m" constraint variables in the inline assembly AES
- # code. Even though unaligned load/store access is permitted on
- # normal memory with Cortex-A series boards with the exception
- # being exclusive and ordered access.
- case $CPPFLAGS in
- *mstrict-align*)
- break;; # already set by user
- *)
- AM_CPPFLAGS="$AM_CPPFLAGS -mstrict-align"
- AC_MSG_NOTICE([64bit ARMv8, setting -mstrict-align]);;
- esac
- AC_MSG_NOTICE([64bit ARMv8 found, setting mcpu to generic+crypto]);;
- *)
- AM_CPPFLAGS="$AM_CPPFLAGS -mfpu=crypto-neon-fp-armv8"
- # Include options.h
- AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
- AC_MSG_NOTICE([32bit ARMv8 found, setting mfpu to crypto-neon-fp-armv8]);;
- esac
- esac
-fi
-
-
-# Xilinx hardened crypto
-AC_ARG_ENABLE([xilinx],
- [AS_HELP_STRING([--enable-xilinx],[Enable wolfSSL support for Xilinx hardened crypto(default: disabled)])],
- [ ENABLED_XILINX=$enableval ],
- [ ENABLED_XILINX=no ]
- )
-if test "$ENABLED_XILINX" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_XILINX -DWOLFSSL_XILINX_CRYPT"
-fi
-
-
-# INTEL AES-NI
-AC_ARG_ENABLE([aesni],
- [AS_HELP_STRING([--enable-aesni],[Enable wolfSSL AES-NI support (default: disabled)])],
- [ ENABLED_AESNI=$enableval ],
- [ ENABLED_AESNI=no ]
- )
-
-# INTEL ASM
-AC_ARG_ENABLE([intelasm],
- [AS_HELP_STRING([--enable-intelasm],[Enable All Intel ASM speedups (default: disabled)])],
- [ ENABLED_INTELASM=$enableval ],
- [ ENABLED_INTELASM=no ]
- )
-
-if test "$ENABLED_ASM" = "yes"
-then
- if test "$ENABLED_AESNI" = "small"
- then
- AM_CFLAGS="$AM_CFLAGS -DAES_GCM_AESNI_NO_UNROLL"
- ENABLED_AESNI=yes
- fi
-
- if test "$ENABLED_AESNI" = "yes" || test "$ENABLED_INTELASM" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AESNI"
- if test "$GCC" = "yes"
- then
- # GCC needs these flags, icc doesn't
- # opt levels greater than 2 may cause problems on systems w/o aesni
- if test "$CC" != "icc"
- then
- AM_CFLAGS="$AM_CFLAGS -maes -msse4 -mpclmul"
- fi
- fi
- AS_IF([test "x$ENABLED_AESGCM" != "xno"],[AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_AESGCM"])
- fi
-
- if test "$ENABLED_INTELASM" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_INTEL_RDSEED -DUSE_INTEL_SPEEDUP"
- ENABLED_AESNI=yes
- fi
-fi
-
-# INTEL RDRAND
-AC_ARG_ENABLE([intelrand],
- [AS_HELP_STRING([--enable-intelrand],[Enable Intel rdrand as preferred RNG source (default: disabled)])],
- [ ENABLED_INTELRDRAND=$enableval ],
- [ ENABLED_INTELRDRAND=no ]
- )
-
-if test "$ENABLED_INTELRDRAND" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_INTEL_RDRAND"
-fi
-
-
-# Linux af_alg
-AC_ARG_ENABLE([afalg],
- [AS_HELP_STRING([--enable-afalg],[Enable Linux af_alg use for crypto (default: disabled)])],
- [ ENABLED_AFALG=$enableval ],
- [ ENABLED_AFALG=no ]
- )
-
-if test "$ENABLED_AFALG" = "yes"
-then
- if test "$ENABLED_AESCCM" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_HASH"
-fi
-
-if test "$ENABLED_AFALG" = "xilinx"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX -DWOLFSSL_AFALG_XILINX_AES"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX_SHA3 -DWOLFSSL_AFALG_XILINX_RSA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NOSHA3_224 -DWOLFSSL_NOSHA3_256 -DWOLFSSL_NOSHA3_512 -DWOLFSSL_NO_SHAKE256"
- ENABLED_AFALG="yes"
- ENABLED_XILINX="yes"
-fi
-
-if test "$ENABLED_AFALG" = "xilinx-aes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX -DWOLFSSL_AFALG_XILINX_AES"
- ENABLED_AFALG="yes"
- ENABLED_XILINX="yes"
-fi
-
-if test "$ENABLED_AFALG" = "xilinx-sha3"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX_SHA3"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NOSHA3_224 -DWOLFSSL_NOSHA3_256 -DWOLFSSL_NOSHA3_512 -DWOLFSSL_NO_SHAKE256"
- ENABLED_AFALG="yes"
- ENABLED_XILINX="yes"
-fi
-
-if test "$ENABLED_AFALG" = "xilinx-rsa"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_XILINX_RSA"
- ENABLED_AFALG="yes"
- ENABLED_XILINX="yes"
-fi
-
-
-# Support for Linux dev/crypto calls
-AC_ARG_ENABLE([devcrypto],
- [AS_HELP_STRING([--enable-devcrypto],[Enable Linux dev crypto calls: all | aes (all aes support) | hash (all hash algos) | cbc (aes-cbc only) (default: disabled)])],
- [ ENABLED_DEVCRYPTO=$enableval ],
- [ ENABLED_DEVCRYPTO=no ]
- )
-
-if test "$ENABLED_DEVCRYPTO" = "yes" || test "$ENABLED_DEVCRYPTO" = "all"
-then
- #enable all devcrypto supported algorithms
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_CBC"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_AES"
- if test "$ENABLED_AESCCM" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_HASH"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_HASH_RAW"
- ENABLED_DEVCRYPTO=yes
-fi
-if test "$ENABLED_DEVCRYPTO" = "aes"
-then
- #enable only AES-CBC algorithm support
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_AES"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_CBC"
- if test "$ENABLED_AESCCM" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
- fi
- ENABLED_DEVCRYPTO=yes
-fi
-if test "$ENABLED_DEVCRYPTO" = "cbc"
-then
- #enable only AES-CBC algorithm support
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_CBC"
- ENABLED_DEVCRYPTO=yes
-fi
-if test "$ENABLED_DEVCRYPTO" = "hash"
-then
- #enable only hash algorithm support
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_HASH"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_HASH_RAW"
- ENABLED_DEVCRYPTO=yes
-fi
-
-
-# Camellia
-AC_ARG_ENABLE([camellia],
- [AS_HELP_STRING([--enable-camellia],[Enable wolfSSL Camellia support (default: disabled)])],
- [ ENABLED_CAMELLIA=$enableval ],
- [ ENABLED_CAMELLIA=no ]
- )
-
-if test "$ENABLED_CAMELLIA" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CAMELLIA"
-fi
-
-
-# MD2
-AC_ARG_ENABLE([md2],
- [AS_HELP_STRING([--enable-md2],[Enable wolfSSL MD2 support (default: disabled)])],
- [ ENABLED_MD2=$enableval ],
- [ ENABLED_MD2=no ]
- )
-
-if test "$ENABLED_BUMP" = "yes"
-then
- ENABLED_MD2="yes"
-fi
-
-if test "$ENABLED_MD2" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_MD2"
-fi
-
-
-# NULL CIPHER
-AC_ARG_ENABLE([nullcipher],
- [AS_HELP_STRING([--enable-nullcipher],[Enable wolfSSL NULL cipher support (default: disabled)])],
- [ ENABLED_NULL_CIPHER=$enableval ],
- [ ENABLED_NULL_CIPHER=no ]
- )
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_NULL_CIPHER="yes"
-fi
-
-if test "$ENABLED_NULL_CIPHER" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_NULL_CIPHER"
-fi
-
-# RIPEMD
-AC_ARG_ENABLE([ripemd],
- [AS_HELP_STRING([--enable-ripemd],[Enable wolfSSL RIPEMD-160 support (default: disabled)])],
- [ ENABLED_RIPEMD=$enableval ],
- [ ENABLED_RIPEMD=no ]
- )
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_RIPEMD="yes"
-fi
-
-if test "$ENABLED_RIPEMD" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RIPEMD"
-fi
-
-
-# BLAKE2
-AC_ARG_ENABLE([blake2],
- [AS_HELP_STRING([--enable-blake2],[Enable wolfSSL BLAKE2b support (default: disabled)])],
- [ ENABLED_BLAKE2=$enableval ],
- [ ENABLED_BLAKE2=no ]
- )
-
-if test "$ENABLED_BLAKE2" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2 -DHAVE_BLAKE2B"
-fi
-
-
-AC_ARG_ENABLE([blake2s],
- [AS_HELP_STRING([--enable-blake2s],[Enable wolfSSL BLAKE2s support (default: disabled)])],
- [ ENABLED_BLAKE2S=$enableval ],
- [ ENABLED_BLAKE2S=Sno ]
- )
-
-if test "$ENABLED_BLAKE2S" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2S"
- ENABLED_BLAKE2="yes"
-fi
-
-
-# SHA512
-AC_ARG_ENABLE([sha512],
- [AS_HELP_STRING([--enable-sha512],[Enable wolfSSL SHA-512 support (default: enabled)])],
- [ ENABLED_SHA512=$enableval ],
- [ ENABLED_SHA512=yes ]
- )
-
-# options that don't require sha512
-if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes" || test "$ENABLED_32BIT" = "yes" || test "$ENABLED_16BIT" = "yes"
-then
- ENABLED_SHA512="no"
-fi
-
-# options that require sha512
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_FORTRESS" = "yes"
-then
- ENABLED_SHA512="yes"
- ENABLED_SHA384="yes"
-fi
-
-if test "$ENABLED_SHA512" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA512"
-fi
-
-
-# SHA384
-AC_ARG_ENABLE([sha384],
- [AS_HELP_STRING([--enable-sha384],[Enable wolfSSL SHA-384 support (default: enabled)])],
- [ ENABLED_SHA384=$enableval ],
- [ ENABLED_SHA384=yes ]
- )
-
-# options that don't require sha384
-if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes" || test "$ENABLED_32BIT" = "yes" || test "$ENABLED_16BIT" = "yes"
-then
- ENABLED_SHA384="no"
-fi
-
-# options that require sha384
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_FORTRESS" = "yes"
-then
- ENABLED_SHA384="yes"
-fi
-if test "$ENABLED_SHA384" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA384"
-fi
-
-
-# SESSION CERTS
-AC_ARG_ENABLE([sessioncerts],
- [AS_HELP_STRING([--enable-sessioncerts],[Enable session cert storing (default: disabled)])],
- [ ENABLED_SESSIONCERTS=$enableval ],
- [ ENABLED_SESSIONCERTS=no ]
- )
-
-if test "x$ENABLED_NGINX" = "xyes" || test "x$ENABLED_OPENVPN" = "xyes"
-then
- ENABLED_SESSIONCERTS=yes
-fi
-if test "$ENABLED_TLS13" = "yes" && test "$ENABLED_PSK" = "yes"
-then
- ENABLED_SESSIONCERTS=yes
-fi
-
-if test "$ENABLED_SESSIONCERTS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS"
-fi
-
-
-# KEY GENERATION
-AC_ARG_ENABLE([keygen],
- [AS_HELP_STRING([--enable-keygen],[Enable key generation (default: disabled)])],
- [ ENABLED_KEYGEN=$enableval ],
- [ ENABLED_KEYGEN=no ]
- )
-
-if test "$ENABLED_KEYGEN" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN"
-fi
-
-
-# CERT GENERATION
-AC_ARG_ENABLE([certgen],
- [AS_HELP_STRING([--enable-certgen],[Enable cert generation (default: disabled)])],
- [ ENABLED_CERTGEN=$enableval ],
- [ ENABLED_CERTGEN=no ]
- )
-if test "$ENABLED_OPENVPN" = "yes" || test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_CERTGEN=yes
-fi
-
-if test "$ENABLED_CERTGEN" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
-fi
-
-
-# CERT REQUEST GENERATION
-AC_ARG_ENABLE([certreq],
- [AS_HELP_STRING([--enable-certreq],[Enable cert request generation (default: disabled)])],
- [ ENABLED_CERTREQ=$enableval ],
- [ ENABLED_CERTREQ=no ]
- )
-
-if test "$ENABLED_CERTREQ" = "yes"
-then
- if test "$ENABLED_CERTGEN" = "no"
- then
- AC_MSG_ERROR([cannot enable certreq without enabling certgen.])
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_REQ"
-fi
-
-
-# CERT REQUEST EXTENSION
-AC_ARG_ENABLE([certext],
- [AS_HELP_STRING([--enable-certext],[Enable cert request extensions (default: disabled)])],
- [ ENABLED_CERTEXT=$enableval ],
- [ ENABLED_CERTEXT=no ]
- )
-if test "$ENABLED_OPENVPN" = "yes"
-then
- ENABLED_CERTEXT=yes
-fi
-
-if test "$ENABLED_CERTEXT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
-fi
-
-
-# DECODED CERT CACHE
-AC_ARG_ENABLE([certgencache],
- [AS_HELP_STRING([--enable-certgencache],[Enable decoded cert caching (default: disabled)])],
- [ ENABLED_certgencache=$enableval ],
- [ ENABLED_certgencache=no ]
- )
-
-if test "$ENABLED_certgencache" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN_CACHE"
-fi
-
-
-# SEP
-AC_ARG_ENABLE([sep],
- [AS_HELP_STRING([--enable-sep],[Enable sep extensions (default: disabled)])],
- [ ENABLED_SEP=$enableval ],
- [ ENABLED_SEP=no ]
- )
-if test "$ENABLED_SEP" = "yes"
-then
- AM_CFLAGS="-DWOLFSSL_SEP -DKEEP_PEER_CERT $AM_CFLAGS"
-fi
-
-
-# HKDF
-AC_ARG_ENABLE([hkdf],
- [AS_HELP_STRING([--enable-hkdf],[Enable HKDF (HMAC-KDF) support (default: disabled)])],
- [ ENABLED_HKDF=$enableval ],
- [ ENABLED_HKDF=no ]
- )
-if test "$ENABLED_TLS13" = "yes"
-then
- ENABLED_HKDF="yes"
-fi
-if test "$ENABLED_HKDF" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF"
-fi
-
-# X9.63 KDF
-AC_ARG_ENABLE([x963kdf],
- [AS_HELP_STRING([--enable-x963kdf],[Enable X9.63 KDF support (default: disabled)])],
- [ ENABLED_X963KDF=$enableval ],
- [ ENABLED_X963KDF=no ]
- )
-if test "$ENABLED_X963KDF" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_X963_KDF"
-fi
-
-# DSA
-AC_ARG_ENABLE([dsa],
- [AS_HELP_STRING([--enable-dsa],[Enable DSA (default: disabled)])],
- [ ENABLED_DSA=$enableval ],
- [ ENABLED_DSA=no ]
- )
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_OPENVPN" = "yes" || test "$ENABLED_NGINX" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_QT" = "yes"
-then
- ENABLED_DSA="yes"
-fi
-
-if test "$ENABLED_DSA" = "no" && test "$ENABLED_OPENSSH" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_DSA"
-fi
-
-# ECC Shamir
-AC_ARG_ENABLE([eccshamir],
- [AS_HELP_STRING([--enable-eccshamir],[Enable ECC Shamir (default: enabled)])],
- [ ENABLED_ECC_SHAMIR=$enableval ],
- [ ENABLED_ECC_SHAMIR=yes ]
- )
-
-
-# ECC
-AC_ARG_ENABLE([ecc],
- [AS_HELP_STRING([--enable-ecc],[Enable ECC (default: enabled)])],
- [ ENABLED_ECC=$enableval ],
- [ ENABLED_ECC=yes ]
- )
-
-# lean psk doesn't need ecc
-if test "$ENABLED_LEANPSK" = "yes"
-then
- ENABLED_ECC=no
-fi
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_NGINX" = "yes" || test "$ENABLED_SIGNAL" = "yes"
-then
- ENABLED_ECC="yes"
-fi
-
-if test "$ENABLED_ECC" != "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256"
- if test "$ENABLED_ECC_SHAMIR" = "yes" && test "$ENABLED_LOWRESOURCE" = "no"
- then
- AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"
- fi
-
- if test "$ENABLED_ECC" = "nonblock"
- then
- AM_CFLAGS="$AM_CFLAGS -DWC_ECC_NONBLOCK"
- fi
-fi
-
-
-# ECC Custom Curves
-AC_ARG_ENABLE([ecccustcurves],
- [AS_HELP_STRING([--enable-ecccustcurves],[Enable ECC custom curves (default: disabled)])],
- [ ENABLED_ECCCUSTCURVES=$enableval ],
- [ ENABLED_ECCCUSTCURVES=no ]
- )
-
-if test "$ENABLED_ECCCUSTCURVES" != "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CUSTOM_CURVES"
-
- # For distro, all or ecccustcurves=all builds, enable all curve types
- if test "$ENABLED_DISTRO" = "yes" || test "$ENABLED_ALL" = "yes" || test "$ENABLED_ECCCUSTCURVES" = "all"
- then
- # Enable ECC SECPR2, SECPR3, BRAINPOOL and KOBLITZ curves
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_SECPR2 -DHAVE_ECC_SECPR3 -DHAVE_ECC_BRAINPOOL -DHAVE_ECC_KOBLITZ"
-
- # Enable ECC Cofactor support
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_CDH"
-
- # If fastmath enabled and on x86 use speedups
- if test "x$ENABLED_FASTMATH" = "xyes" && test "$host_cpu" = "x86_64"
- then
- AM_CFLAGS="$AM_CFLAGS -DTFM_ECC192 -DTFM_ECC224 -DTFM_ECC256 -DTFM_ECC384 -DTFM_ECC521"
- fi
- fi
-fi
-
-
-# Compressed Key
-AC_ARG_ENABLE([compkey],
- [AS_HELP_STRING([--enable-compkey],[Enable compressed keys support (default: disabled)])],
- [ ENABLED_COMPKEY=$enableval ],
- [ ENABLED_COMPKEY=no ]
- )
-
-if test "$ENABLED_WPAS" = "yes"
-then
- ENABLED_COMPKEY=yes
-fi
-if test "$ENABLED_COMPKEY" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_COMP_KEY"
-fi
-
-
-# for using memory optimization setting on both curve25519 and ed25519
-ENABLED_CURVE25519_SMALL=no
-ENABLED_ED25519_SMALL=no
-
-# CURVE25519
-AC_ARG_ENABLE([curve25519],
- [AS_HELP_STRING([--enable-curve25519],[Enable Curve25519 (default: disabled)])],
- [ ENABLED_CURVE25519=$enableval ],
- [ ENABLED_CURVE25519=no ]
- )
-
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_CURVE25519="yes"
-fi
-
-if test "$ENABLED_CURVE25519" != "no"
-then
- if test "$ENABLED_CURVE25519" = "small" || test "$ENABLED_LOWRESOURCE" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DCURVE25519_SMALL"
- ENABLED_CURVE25519_SMALL=yes
- ENABLED_CURVE25519=yes
- fi
-
- if test "$ENABLED_CURVE25519" = "no128bit" || test "$ENABLED_32BIT" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_CURVED25519_128BIT"
- ENABLED_CURVE25519=yes
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CURVE25519"
- ENABLED_FEMATH=yes
-fi
-
-
-# ED25519
-AC_ARG_ENABLE([ed25519],
- [AS_HELP_STRING([--enable-ed25519],[Enable ED25519 (default: disabled)])],
- [ ENABLED_ED25519=$enableval ],
- [ ENABLED_ED25519=no ]
- )
-
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_ED25519="yes"
-fi
-
-if test "$ENABLED_ED25519" != "no" && test "$ENABLED_32BIT" = "no"
-then
- if test "$ENABLED_ED25519" = "small" || test "$ENABLED_LOWRESOURCE" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DED25519_SMALL"
- ENABLED_ED25519_SMALL=yes
- ENABLED_CURVE25519_SMALL=yes
- ENABLED_ED25519=yes
- fi
-
- if test "$ENABLED_SHA512" = "no"
- then
- AC_MSG_ERROR([cannot enable ed25519 without enabling sha512.])
- fi
- ENABLED_FEMATH=yes
- ENABLED_GEMATH=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ED25519"
-fi
-
-
-# for using memory optimization setting on both curve448 and ed448
-ENABLED_CURVE448_SMALL=no
-ENABLED_ED448_SMALL=no
-
-# CURVE448
-AC_ARG_ENABLE([curve448],
- [AS_HELP_STRING([--enable-curve448],[Enable Curve448 (default: disabled)])],
- [ ENABLED_CURVE448=$enableval ],
- [ ENABLED_CURVE448=no ]
- )
-
-if test "$ENABLED_CURVE448" != "no"
-then
- if test "$ENABLED_CURVE448" = "small" || test "$ENABLED_LOWRESOURCE" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DCURVE448_SMALL"
- ENABLED_CURVE448_SMALL=yes
- ENABLED_CURVE448=yes
- fi
-
- if test "$ENABLED_CURVE448" = "no128bit" || test "$ENABLED_32BIT" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_CURVED448_128BIT"
- ENABLED_CURVE448=yes
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CURVE448"
- ENABLED_FE448=yes
-fi
-
-# ED448
-AC_ARG_ENABLE([ed448],
- [AS_HELP_STRING([--enable-ed448],[Enable ED448 (default: disabled)])],
- [ ENABLED_ED448=$enableval ],
- [ ENABLED_ED448=no ]
- )
-
-if test "$ENABLED_ED448" != "no" && test "$ENABLED_32BIT" = "no"
-then
- if test "$ENABLED_ED448" = "small" || test "$ENABLED_LOWRESOURCE" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DED448_SMALL"
- ENABLED_ED448_SMALL=yes
- ENABLED_CURVE448_SMALL=yes
- ENABLED_ED448=yes
- fi
-
- if test "$ENABLED_SHA512" = "no"
- then
- AC_MSG_ERROR([cannot enable ed448 without enabling sha512.])
- fi
- ENABLED_FE448=yes
- ENABLED_GE448=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ED448"
-
- # EdDSA448 requires SHAKE256 which requires SHA-3
- ENABLED_SHAKE3=yes
- ENABLED_SHAKE256=yes
-fi
-
-
-
-# FP ECC, Fixed Point cache ECC
-AC_ARG_ENABLE([fpecc],
- [AS_HELP_STRING([--enable-fpecc],[Enable Fixed Point cache ECC (default: disabled)])],
- [ ENABLED_FPECC=$enableval ],
- [ ENABLED_FPECC=no ]
- )
-
-if test "$ENABLED_FPECC" = "yes"
-then
- if test "$ENABLED_ECC" = "no"
- then
- AC_MSG_ERROR([cannot enable fpecc without enabling ecc.])
- fi
- AM_CFLAGS="$AM_CFLAGS -DFP_ECC"
-fi
-
-
-# ECC encrypt
-AC_ARG_ENABLE([eccencrypt],
- [AS_HELP_STRING([--enable-eccencrypt],[Enable ECC encrypt (default: disabled)])],
- [ ENABLED_ECC_ENCRYPT=$enableval ],
- [ ENABLED_ECC_ENCRYPT=no ]
- )
-
-if test "$ENABLED_ECC_ENCRYPT" = "yes"
-then
- if test "$ENABLED_ECC" = "no"
- then
- AC_MSG_ERROR([cannot enable eccencrypt without enabling ecc.])
- fi
- if test "$ENABLED_HKDF" = "no"
- then
- AC_MSG_ERROR([cannot enable eccencrypt without enabling hkdf.])
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_ENCRYPT"
-fi
-
-
-# PSK
-AC_ARG_ENABLE([psk],
- [AS_HELP_STRING([--enable-psk],[Enable PSK (default: disabled)])],
- [ ENABLED_PSK=$enableval ],
- [ ENABLED_PSK=no ]
- )
-
-# Single PSK identity
-AC_ARG_ENABLE([psk-one-id],
- [AS_HELP_STRING([--enable-psk-one-id],[Enable PSK (default: disabled)])],
- [ ENABLED_PSK_ONE_ID=$enableval ],
- [ ENABLED_PSK_ONE_ID=no ]
- )
-if test "$ENABLED_PSK_ONE_ID" = "yes"
-then
- if test "$ENABLED_PSK" = "no"
- then
- ENABLED_PSK="yes"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PSK_ONE_ID"
-fi
-
-# ERROR STRINGS
-AC_ARG_ENABLE([errorstrings],
- [AS_HELP_STRING([--enable-errorstrings],[Enable error strings table (default: enabled)])],
- [ ENABLED_ERROR_STRINGS=$enableval ],
- [ ENABLED_ERROR_STRINGS=yes ]
- )
-
-if test "$ENABLED_ERROR_STRINGS" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS"
-else
- # turn off error strings if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS"
- ENABLED_ERROR_STRINGS=no
- fi
-fi
-
-
-# ERROR QUEUE
-AC_ARG_ENABLE([errorqueue],
- [AS_HELP_STRING([--disable-errorqueue],[Disables adding nodes to error queue when compiled with OPENSSL_EXTRA (default: enabled)])],
- [ ENABLED_ERROR_QUEUE=$enableval ],
- [ ENABLED_ERROR_QUEUE=yes ]
- )
-
-if test "$ENABLED_ERROR_QUEUE" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_QUEUE"
-fi
-
-
-# OLD TLS
-AC_ARG_ENABLE([oldtls],
- [AS_HELP_STRING([--enable-oldtls],[Enable old TLS versions < 1.2 (default: enabled)])],
- [ ENABLED_OLD_TLS=$enableval ],
- [ ENABLED_OLD_TLS=yes ]
- )
-
-if test "$ENABLED_OLD_TLS" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS"
-else
- # turn off old if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS"
- ENABLED_OLD_TLS=no
- fi
-fi
-
-
-# TLSv1.2
-AC_ARG_ENABLE([tlsv12],
- [AS_HELP_STRING([--enable-tlsv12],[Enable TLS versions 1.2 (default: enabled)])],
- [ ENABLED_TLSV12=$enableval ],
- [ ENABLED_TLSV12=yes ]
- )
-
-if test "$ENABLED_TLSV12" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_TLS12 -DNO_OLD_TLS"
-fi
-
-
-# TLSv1.0
-AC_ARG_ENABLE([tlsv10],
- [AS_HELP_STRING([--enable-tlsv10],[Enable old TLS versions 1.0 (default: disabled)])],
- [ ENABLED_TLSV10=$enableval ],
- [ ENABLED_TLSV10=no ]
- )
-
-if test "$ENABLED_TLSV10" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALLOW_TLSV10"
-fi
-
-
-# SSLv3
-AC_ARG_ENABLE([sslv3],
- [AS_HELP_STRING([--enable-sslv3],[Enable SSL version 3.0 (default: disabled)])],
- [ ENABLED_SSLV3=$enableval ],
- [ ENABLED_SSLV3=no]
- )
-
-if test "x$ENABLED_HAPROXY" = "xyes" && test "x$ENABLED_ALL" = "xno"
-then
- ENABLED_SSLV3="yes"
-fi
-
-if test "$ENABLED_SSLV3" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALLOW_SSLV3"
-fi
-
-
-# STACK SIZE info for examples
-AC_ARG_ENABLE([stacksize],
- [AS_HELP_STRING([--enable-stacksize],[Enable stack size info on examples (default: disabled)])],
- [ ENABLED_STACKSIZE=$enableval ],
- [ ENABLED_STACKSIZE=no ]
- )
-
-if test "$ENABLED_STACKSIZE" = "yes"
-then
- AC_CHECK_FUNC([posix_memalign], [], [AC_MSG_ERROR(stacksize needs posix_memalign)])
- AC_CHECK_FUNC([pthread_attr_setstack], [], AC_CHECK_LIB([pthread],[pthread_attr_setstack]))
- AM_CFLAGS="$AM_CFLAGS -DHAVE_STACK_SIZE"
-fi
-
-
-# MEMORY
-AC_ARG_ENABLE([memory],
- [AS_HELP_STRING([--enable-memory],[Enable memory callbacks (default: enabled)])],
- [ ENABLED_MEMORY=$enableval ],
- [ ENABLED_MEMORY=yes ]
- )
-
-if test "$ENABLED_MEMORY" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_WOLFSSL_MEMORY"
-else
- # turn off memory cb if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- # but don't turn on NO_WOLFSSL_MEMORY because using own
- ENABLED_MEMORY=no
- fi
-fi
-
-
-# MEMORY SIZE info
-AC_ARG_ENABLE([trackmemory],
- [AS_HELP_STRING([--enable-trackmemory],[Enable memory use info on wolfCrypt and wolfSSL cleanup (default: disabled)])],
- [ ENABLED_TRACKMEMORY=$enableval ],
- [ ENABLED_TRACKMEMORY=no ]
- )
-
-if test "$ENABLED_TRACKMEMORY" = "yes"
-then
- if test "$ENABLED_MEMORY" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_TRACK_MEMORY"
- else
- AC_MSG_ERROR([trackmemory requires using wolfSSL memory (--enable-memory).])
- fi
-fi
-
-# MEMORY usage logging
-AC_ARG_ENABLE([memorylog],
- [AS_HELP_STRING([--enable-memorylog],[Enable dynamic memory logging (default: disabled)])],
- [ ENABLED_MEMORYLOG=$enableval ],
- [ ENABLED_MEMORYLOG=no ]
- )
-
-if test "$ENABLED_MEMORYLOG" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_MEMORY_LOG"
-fi
-
-
-# STACK usage logging
-AC_ARG_ENABLE([stacklog],
- [AS_HELP_STRING([--enable-stacklog],[Enable stack logging (default: disabled)])],
- [ ENABLED_STACKLOG=$enableval ],
- [ ENABLED_STACKLOG=no ]
- )
-
-if test "$ENABLED_STACKLOG" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_STACK_LOG -finstrument-functions"
-fi
-
-if test "$ENABLED_QT" = "yes"
-then
- # Requires opensslextra and opensslall
- if test "x$ENABLED_OPENSSLALL" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLALL="yes"
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_EXTRA -DOPENSSL_ALL -DHAVE_EX_DATA"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_QT -DSESSION_CERTS -DOPENSSL_NO_SSL2"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN -DHAVE_EX_DATA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CUSTOM_CURVES -DHAVE_ECC_SECPR2 -DHAVE_ECC_SECPR3 -DHAVE_ECC_BRAINPOOL -DHAVE_ECC_KOBLITZ"
- if test "x$ENABLED_ALL" = "xno"; then
- # Don't enable old SSL/TLS for --enable-all, which is used by distro
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALLOW_SSLV3 -DWOLFSSL_ALLOW_TLSV10"
- fi
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-
- # Requires PSK make sure on
- if test "x$ENABLED_PSK" = "xno"
- then
- ENABLED_PSK="yes"
- fi
-
- # Requires RC4 make sure on
- if test "x$ENABLED_ARC4" = "xno"
- then
- ENABLED_ARC4="yes"
- fi
-
- if test "x$ENABLED_CERTEXT" = "xno"
- then
- ENABLED_CERTEXT="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
- fi
-
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
-
- # requires oldnames disabled
- enable_oldnames=no
-fi
-
-AC_ARG_ENABLE([qt-test],
- [AS_HELP_STRING([--enable-qt-test],[Enable qt tests (default: disabled)])],
- [ ENABLED_QT_TEST=$enableval ],
- [ ENABLED_QT_TEST=no ]
- )
-
-if test "$ENABLED_QT_TEST" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_NO_SSL3 -DWOLFSSL_STATIC_RSA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_STATIC_PSK"
-fi
-
-# RSA
-AC_ARG_ENABLE([rsa],
- [AS_HELP_STRING([--enable-rsa],[Enable RSA (default: enabled)])],
- [ ENABLED_RSA=$enableval ],
- [ ENABLED_RSA=yes ]
- )
-
-if test "$ENABLED_RSA" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_RSA"
-else
- # turn off RSA if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_RSA"
- ENABLED_RSA=no
- fi
-fi
-
-AC_ARG_ENABLE([oaep],
- [AS_HELP_STRING([--enable-oaep],[Enable RSA OAEP (default: enabled)])],
- [ ENABLED_OAEP=$enableval ],
- [ ENABLED_OAEP=yes ]
- )
-
-if test "$ENABLED_OAEP" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DWC_NO_RSA_OAEP"
-fi
-
-AC_ARG_ENABLE([rsapub],
- [AS_HELP_STRING([--enable-rsapub],[Enable RSA Public Only (default: disabled)])],
- [ ENABLED_RSAPUB=$enableval ],
- [ ENABLED_RSAPUB=no ]
- )
-
-if test "$ENABLED_RSAPUB" = "yes"
-then
- if test "$ENABLED_RSA" = "no"
- then
- ENABLED_RSA="yes"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RSA_PUBLIC_ONLY"
-fi
-
-AC_ARG_ENABLE([rsavfy],
- [AS_HELP_STRING([--enable-rsavfy],[Enable RSA Verify Inline Only (default: disabled)])],
- [ ENABLED_RSAVFY=$enableval ],
- [ ENABLED_RSAVFY=no ]
- )
-
-if test "$ENABLED_RSAVFY" = "yes"
-then
- if test "$ENABLED_RSA" = "no"
- then
- ENABLED_RSA="yes"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RSA_PUBLIC_ONLY -DWOLFSSL_RSA_VERIFY_ONLY"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RSA_VERIFY_INLINE -DNO_SIG_WRAPPER"
-fi
-
-
-# RSA-PSS
-AC_ARG_ENABLE([rsapss],
- [ --enable-rsapss Enable RSA-PSS (default: disabled)],
- [ ENABLED_RSAPSS=$enableval ],
- [ ENABLED_RSAPSS=no ]
- )
-
-if test "$ENABLED_RSA" = "no"
-then
- ENABLED_RSAPSS="no"
-else
- if test "$ENABLED_TLS13" = "yes"
- then
- ENABLED_RSAPSS="yes"
- fi
-fi
-if test "$ENABLED_RSAPSS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWC_RSA_PSS"
-fi
-
-
-# DH
-AC_ARG_ENABLE([dh],
- [AS_HELP_STRING([--enable-dh],[Enable DH (default: enabled)])],
- [ ENABLED_DH=$enableval ],
- [ ENABLED_DH=yes ]
- )
-
-if test "$ENABLED_OPENSSH" = "yes"
-then
- ENABLED_DH="yes"
-fi
-
-if test "$ENABLED_DH" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_DH"
-else
- # turn off DH if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_DH"
- ENABLED_DH=no
- fi
-fi
-
-
-# Anonymous
-AC_ARG_ENABLE([anon],
- [AS_HELP_STRING([--enable-anon],[Enable Anonymous (default: disabled)])],
- [ ENABLED_ANON=$enableval ],
- [ ENABLED_ANON=no ]
- )
-
-if test "x$ENABLED_WPAS" = "xyes"
-then
- ENABLED_ANON=yes
-fi
-if test "x$ENABLED_ANON" = "xyes"
-then
- if test "x$ENABLED_DH" != "xyes"
- then
- AC_MSG_ERROR([Anonymous suite requires DH.])
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ANON"
-fi
-
-
-# ASN
-# turn off asn, which means no certs, no rsa, no dsa, no ecc,
-# and no big int (unless dh is on)
-AC_ARG_ENABLE([asn],
- [AS_HELP_STRING([--enable-asn],[Enable ASN (default: enabled)])],
- [ ENABLED_ASN=$enableval ],
- [ ENABLED_ASN=yes ]
- )
-
-if test "$ENABLED_ASN" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS"
- if test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no"
- then
- # DH and ECC need bigint
- AM_CFLAGS="$AM_CFLAGS -DNO_BIG_INT"
- fi
-else
- # turn off ASN if leanpsk on
- if test "$ENABLED_LEANPSK" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT"
- ENABLED_ASN=no
- else
- if test "$ENABLED_ASN" = "nocrypt"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_ASN_CRYPT"
- enable_pwdbased=no
- fi
- fi
-fi
-
-if test "$ENABLED_RSA" = "yes" && test "$ENABLED_RSAVFY" = "no" && test "$ENABLED_ASN" = "no"
-then
- AC_MSG_ERROR([please disable rsa if disabling asn.])
-fi
-
-if test "$ENABLED_DSA" = "yes" && test "$ENABLED_ASN" = "no"
-then
- AC_MSG_ERROR([please disable dsa if disabling asn.])
-fi
-
-# DH and ECC need bigint
-if test "$ENABLED_ASN" = "no" && test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no" && test "$ENABLED_RSA" = "no"
-then
- ENABLED_FASTMATH=no
- ENABLED_SLOWMATH=no
-fi
-
-
-# AES
-AC_ARG_ENABLE([aes],
- [AS_HELP_STRING([--enable-aes],[Enable AES (default: enabled)])],
- [ ENABLED_AES=$enableval ],
- [ ENABLED_AES=yes ]
- )
-
-if test "$ENABLED_AES" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_AES"
- if test "$ENABLED_FORTRESS" = "yes"
- then
- AC_MSG_ERROR([fortress requires aes])
- fi
- if test "$ENABLED_ECC_ENCRYPT" = "yes"
- then
- AC_MSG_ERROR([cannot enable eccencrypt and hkdf without aes.])
- fi
- if test "$ENABLED_AESGCM" = "yes"
- then
- AC_MSG_ERROR([AESGCM requires AES.])
- fi
- if test "$ENABLED_AESCCM" = "yes"
- then
- AC_MSG_ERROR([AESCCM requires AES.])
- fi
- if test "$ENABLED_AESCTR" = "yes"
- then
- AC_MSG_ERROR([AESCTR requires AES.])
- fi
-else
- # turn off AES if leanpsk on
- if test "$ENABLED_LEANPSK" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_AES"
- ENABLED_AES=no
- fi
-fi
-
-
-# CODING
-AC_ARG_ENABLE([coding],
- [AS_HELP_STRING([--enable-coding],[Enable Coding base 16/64 (default: enabled)])],
- [ ENABLED_CODING=$enableval ],
- [ ENABLED_CODING=yes ]
- )
-
-if test "$ENABLED_CODING" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_CODING"
-else
- # turn off CODING if leanpsk on
- if test "$ENABLED_LEANPSK" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_CODING"
- ENABLED_CODING=no
- fi
-fi
-
-
-# Base64 Encode
-BASE64ENCODE_DEFAULT=no
-if test "$host_cpu" = "x86_64"
-then
-BASE64ENCODE_DEFAULT=yes
-fi
-AC_ARG_ENABLE([base64encode],
- [AS_HELP_STRING([--enable-base64encode],[Enable Base64 encoding (default: enabled on x86_64)])],
- [ ENABLED_BASE64ENCODE=$enableval ],
- [ ENABLED_BASE64ENCODE=$BASE64ENCODE_DEFAULT ]
- )
-if test "$ENABLED_BASE64ENCODE" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_BASE64_ENCODE"
-fi
-
-
-# Base16
-AC_ARG_ENABLE([base16],
- [AS_HELP_STRING([--enable-base16],[Enable Base16 encoding/decoding (default: disabled)])],
- [ ENABLED_BASE16=$enableval ],
- [ ENABLED_BASE16=no ]
- )
-if test "$ENABLED_BASE16" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_BASE16"
-fi
-
-
-# DES3
-AC_ARG_ENABLE([des3],
- [AS_HELP_STRING([--enable-des3],[Enable DES3 (default: disabled)])],
- [ ENABLED_DES3=$enableval ],
- [ ENABLED_DES3=no ]
- )
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_QT" = "yes" || test "$ENABLED_OPENVPN" = "yes"
-then
- ENABLED_DES3="yes"
-fi
-
-# IDEA
-AC_ARG_ENABLE([idea],
- [AS_HELP_STRING([--enable-idea],[Enable IDEA Cipher (default: disabled)])],
- [ ENABLED_IDEA=$enableval ],
- [ ENABLED_IDEA=no ]
- )
-
-if test "x$ENABLED_IDEA" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_IDEA"
-fi
-
-# ARC4
-AC_ARG_ENABLE([arc4],
- [AS_HELP_STRING([--enable-arc4],[Enable ARC4 (default: disabled)])],
- [ ENABLED_ARC4=$enableval ],
- [ ENABLED_ARC4=no ]
- )
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_WPAS" = "yes"
-then
- ENABLED_ARC4="yes"
-fi
-
-if test "$ENABLED_ARC4" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_RC4"
-else
- # turn off ARC4 if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_RC4"
- ENABLED_ARC4=no
- fi
-fi
-
-# MD5
-AC_ARG_ENABLE([md5],
- [AS_HELP_STRING([--enable-md5],[Enable MD5 (default: enabled)])],
- [ ENABLED_MD5=$enableval ],
- [ ENABLED_MD5=yes ]
- )
-
-if test "$ENABLED_MD5" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS"
-else
- # turn off MD5 if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS"
- ENABLED_MD5=no
- fi
-fi
-
-
-# SHA
-AC_ARG_ENABLE([sha],
- [AS_HELP_STRING([--enable-sha],[Enable SHA (default: enabled)])],
- [ ENABLED_SHA=$enableval ],
- [ ENABLED_SHA=yes ]
- )
-
-if test "$ENABLED_SHA" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS"
-else
- # turn off SHA if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS"
- ENABLED_SHA=no
- fi
-fi
-
-
-# CMAC
-AC_ARG_ENABLE([cmac],
- [AS_HELP_STRING([--enable-cmac],[Enable CMAC (default: disabled)])],
- [ ENABLED_CMAC=$enableval ],
- [ ENABLED_CMAC=no ]
- )
-
-if test "$ENABLED_WPAS" = "yes"
-then
- ENABLED_CMAC=yes
-fi
-
-AS_IF([test "x$ENABLED_CMAC" = "xyes"],
- [AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CMAC -DWOLFSSL_AES_DIRECT"])
-
-
-# AES-XTS
-AC_ARG_ENABLE([xts],
- [AS_HELP_STRING([--enable-xts],[Enable XTS (default: disabled)])],
- [ ENABLED_XTS=$enableval ],
- [ ENABLED_XTS=no ]
- )
-
-AS_IF([test "x$ENABLED_XTS" = "xyes"],
- [AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_XTS -DWOLFSSL_AES_DIRECT"])
-
-
-# Web Server Build
-AC_ARG_ENABLE([webserver],
- [AS_HELP_STRING([--enable-webserver],[Enable Web Server (default: disabled)])],
- [ ENABLED_WEBSERVER=$enableval ],
- [ ENABLED_WEBSERVER=no ]
- )
-
-if test "$ENABLED_WEBSERVER" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_WEBSERVER"
-fi
-
-# Web Client Build (HTTP Client)
-AC_ARG_ENABLE([webclient],
- [AS_HELP_STRING([--enable-webclient],[Enable Web Client (HTTP) (default: disabled)])],
- [ ENABLED_WEBCLIENT=$enableval ],
- [ ENABLED_WEBCLIENT=no ]
- )
-
-if test "$ENABLED_WEBCLIENT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HTTP_CLIENT"
-fi
-
-
-# HC128
-AC_ARG_ENABLE([hc128],
- [AS_HELP_STRING([--enable-hc128],[Enable HC-128 (default: disabled)])],
- [ ENABLED_HC128=$enableval ],
- [ ENABLED_HC128=no ]
- )
-
-if test "$ENABLED_HC128" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_HC128"
-else
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HC128"
-fi
-
-
-# RABBIT
-AC_ARG_ENABLE([rabbit],
- [AS_HELP_STRING([--enable-rabbit],[Enable RABBIT (default: disabled)])],
- [ ENABLED_RABBIT=$enableval ],
- [ ENABLED_RABBIT=no ]
- )
-
-if test "$ENABLED_RABBIT" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_RABBIT"
-else
- AM_CFLAGS="$AM_CFLAGS -DHAVE_RABBIT"
-fi
-
-
-# FIPS
-AS_CASE([$FIPS_VERSION],
- ["v2"],[
- AS_IF([test "x$FIPS_READY" = "xyes"],
- [AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS_VERSION=3"],
- [AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS_VERSION=2"])
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS -DWOLFSSL_KEY_GEN -DWOLFSSL_SHA224 -DWOLFSSL_AES_DIRECT -DHAVE_AES_ECB -DHAVE_ECC_CDH -DWC_RSA_NO_PADDING -DWOLFSSL_VALIDATE_FFC_IMPORT -DHAVE_FFDHE_Q"
- ENABLED_KEYGEN="yes"
- ENABLED_SHA224="yes"
- # Shake256 is a SHA-3 algorithm not in our FIPS algorithm list
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_SHAKE256"
- AS_IF([test "x$ENABLED_AESCCM" != "xyes"],
- [ENABLED_AESCCM="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM"])
- AS_IF([test "x$ENABLED_RSAPSS" != "xyes"],
- [ENABLED_RSAPSS="yes"
- AM_CFLAGS="$AM_CFLAGS -DWC_RSA_PSS"])
- AS_IF([test "x$ENABLED_ECC" != "xyes"],
- [ENABLED_ECC="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DWOLFSSL_VALIDATE_ECC_IMPORT"
- AS_IF([test "x$ENABLED_ECC_SHAMIR" = "xyes"],
- [AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"])],
- [AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_VALIDATE_ECC_IMPORT"])
- AS_IF([test "x$ENABLED_AESCTR" != "xyes"],
- [ENABLED_AESCTR="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_COUNTER"])
- AS_IF([test "x$ENABLED_CMAC" != "xyes"],
- [ENABLED_CMAC="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CMAC"])
- AS_IF([test "x$ENABLED_HKDF" != "xyes"],
- [ENABLED_HKDF="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF"])
- AS_IF([test "x$ENABLED_INTELASM" = "xyes"],
- [AM_CFLAGS="$AM_CFLAGS -DFORCE_FAILURE_RDSEED"])
- ],
- ["rand"],[
- AM_CFLAGS="$AM_CFLAGS -DWOLFCRYPT_FIPS_RAND -DHAVE_FIPS -DHAVE_FIPS_VERSION=2"
- ],
- ["v1"],[
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS"
- ])
-
-AS_IF([test "x$ENABLED_FIPS" = "xyes" && test "x$thread_ls_on" = "xno"],
- [AC_MSG_ERROR([FIPS requires Thread Local Storage])])
-
-AS_IF([test "x$ENABLED_FIPS" = "xyes" && test "x$FIPS_VERSION" != "xrand"],
-[
- # Force enable the prerequisites.
- AS_IF([test "x$ENABLED_SHA512" = "xno"],
- [ENABLED_SHA512="yes"; AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA512 -DWOLFSSL_SHA384"])
- AS_IF([test "x$ENABLED_AESGCM" = "xno"],
- [ENABLED_AESGCM="yes"; AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM"])
- AS_IF([test "x$ENABLED_DES3" = "xno"],[ENABLED_DES3="yes"])
-],
-[
- AS_IF([test "x$ENABLED_FORTRESS" = "xyes"],[ENABLED_DES3="yes"])
-])
-
-
-# SELFTEST
-AC_ARG_ENABLE([selftest],
- [AS_HELP_STRING([--enable-selftest],[Enable selftest, Will NOT work w/o CAVP selftest license (default: disabled)])],
- [ ENABLED_SELFTEST=$enableval ],
- [ ENABLED_SELFTEST="no" ]
- )
-
-AS_CASE([$ENABLED_SELFTEST],
- ["v2"],[
- # selftest v2 (wolfCrypt 4.1.0)
- ENABLED_SELFTEST="yes"
- SELFTEST_VERSION="v2"
- ],
- ["no"],[SELFTEST_VERSION="none"],
- [
- # selftest v1 (wolfCrypt 3.14.2)
- ENABLED_SELFTEST="yes"
- SELFTEST_VERSION="v1"
- ])
-
-AS_CASE([$SELFTEST_VERSION],
- ["v2"],[
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SELFTEST -DHAVE_SELFTEST_VERSION=2"
- ],
- ["v1"],[
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SELFTEST"
- ])
-
-
-# set sha224 default
-SHA224_DEFAULT=no
-if test "$host_cpu" = "x86_64" || test "$host_cpu" = "aarch64"
-then
- if test "x$ENABLED_AFALG" = "xno" && test "x$ENABLED_DEVCRYPTO" = "xno" && ( test "x$ENABLED_FIPS" = "xno" || test "x$FIPS_VERSION" = "xv2" )
- then
- SHA224_DEFAULT=yes
- fi
-fi
-
-# SHA224
-AC_ARG_ENABLE([sha224],
- [AS_HELP_STRING([--enable-sha224],[Enable wolfSSL SHA-224 support (default: enabled on x86_64/aarch64)])],
- [ ENABLED_SHA224=$enableval ],
- [ ENABLED_SHA224=$SHA224_DEFAULT ]
- )
-
-if test "$ENABLED_SHA224" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA224"
-fi
-
-
-# set sha3 default
-SHA3_DEFAULT=no
-if test "$host_cpu" = "x86_64" || test "$host_cpu" = "aarch64"
-then
- if test "x$ENABLED_FIPS" = "xno" || test "x$FIPS_VERSION" = "xv2"
- then
- SHA3_DEFAULT=yes
- fi
-fi
-
-# SHA3
-AC_ARG_ENABLE([sha3],
- [AS_HELP_STRING([--enable-sha3],[Enable wolfSSL SHA-3 support (default: enabled on x86_64/aarch64)])],
- [ ENABLED_SHA3=$enableval ],
- [ ENABLED_SHA3=$SHA3_DEFAULT ]
- )
-
-if test "$ENABLED_SHA3" = "small"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA3_SMALL"
- ENABLED_SHA3="yes"
-fi
-
-if test "$ENABLED_SHA3" = "yes" && test "$ENABLED_32BIT" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA3"
-fi
-
-# SHAKE256
-AC_ARG_ENABLE([shake256],
- [AS_HELP_STRING([--enable-shake256],[Enable wolfSSL SHAKE256 support (default: enabled on x86_64/aarch64)])],
- [ ENABLED_SHAKE256=$enableval ],
- [ ENABLED_SHAKE256=$ENABLED_SHA3 ]
- )
-
-if test "$ENABLED_SHAKE256" = "yes" || test "$ENABLED_SHAKE256" = "small"
-then
- if test "$ENABLED_32BIT" = "no"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHAKE256"
- if test "$ENABLED_SHA3" = "no"
- then
- AC_MSG_ERROR([Must have SHA-3 enabled: --enable-sha3])
- fi
- fi
-fi
-
-# set POLY1305 default
-POLY1305_DEFAULT=yes
-
-if test "x$ENABLED_FIPS" = "xyes"
-then
-POLY1305_DEFAULT=no
-fi
-
-# POLY1305
-AC_ARG_ENABLE([poly1305],
- [AS_HELP_STRING([--enable-poly1305],[Enable wolfSSL POLY1305 support (default: enabled)])],
- [ ENABLED_POLY1305=$enableval ],
- [ ENABLED_POLY1305=$POLY1305_DEFAULT]
- )
-
-# leanpsk and leantls don't need poly1305
-if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
-then
- ENABLED_POLY1305=no
-fi
-
-if test "$ENABLED_POLY1305" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_POLY1305 -DHAVE_ONE_TIME_AUTH"
-fi
-
-
-# set CHACHA default
-CHACHA_DEFAULT=yes
-
-if test "x$ENABLED_FIPS" = "xyes"
-then
-CHACHA_DEFAULT=no
-fi
-
-# CHACHA
-AC_ARG_ENABLE([chacha],
- [AS_HELP_STRING([--enable-chacha],[Enable CHACHA (default: enabled). Use `=noasm` to disable ASM AVX/AVX2 speedups])],
- [ ENABLED_CHACHA=$enableval ],
- [ ENABLED_CHACHA=$CHACHA_DEFAULT]
- )
-
-# leanpsk and leantls don't need chacha
-if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
-then
- ENABLED_CHACHA=no
-fi
-
-if test "$ENABLED_CHACHA" = "noasm" || test "$ENABLED_ASM" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_CHACHA_ASM"
-fi
-
-if test "$ENABLED_CHACHA" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CHACHA"
-fi
-
-
-# Hash DRBG
-AC_ARG_ENABLE([hashdrbg],
- [AS_HELP_STRING([--enable-hashdrbg],[Enable Hash DRBG support (default: enabled)])],
- [ ENABLED_HASHDRBG=$enableval ],
- [ ENABLED_HASHDRBG=yes ]
- )
-
-if test "x$ENABLED_HASHDRBG" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HASHDRBG"
-else
- # turn on Hash DRBG if FIPS is on
- if test "x$ENABLED_FIPS" = "xyes"
- then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_HASHDRBG"
- ENABLED_HASHDRBG=yes
- else
- AM_CFLAGS="$AM_CFLAGS -DWC_NO_HASHDRBG"
- fi
-fi
-
-
-# Filesystem Build
-AC_ARG_ENABLE([filesystem],
- [AS_HELP_STRING([--enable-filesystem],[Enable Filesystem support (default: enabled)])],
- [ ENABLED_FILESYSTEM=$enableval ],
- [ ENABLED_FILESYSTEM=yes ]
- )
-
-if test "$ENABLED_FILESYSTEM" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM"
-else
- # turn off filesystem if leanpsk on
- if test "$ENABLED_LEANPSK" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM"
- ENABLED_FILESYSTEM=no
- fi
-fi
-
-
-# inline Build
-AC_ARG_ENABLE([inline],
- [AS_HELP_STRING([--enable-inline],[Enable inline functions (default: enabled)])],
- [ ENABLED_INLINE=$enableval ],
- [ ENABLED_INLINE=yes ]
- )
-
-if test "$ENABLED_INLINE" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_INLINE"
-fi
-
-
-# OCSP
-AC_ARG_ENABLE([ocsp],
- [AS_HELP_STRING([--enable-ocsp],[Enable OCSP (default: disabled)])],
- [ ENABLED_OCSP=$enableval ],
- [ ENABLED_OCSP=no ],
- )
-
-if test "x$ENABLED_OPENSSLALL" = "xyes" || test "x$ENABLED_NGINX" = "xyes"
-then
- ENABLED_OCSP=yes
-fi
-
-if test "$ENABLED_OCSP" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
-fi
-
-
-if test "$ENABLED_OCSP" = "yes"
-then
- # check openssl command tool for testing ocsp
- AC_CHECK_PROG([HAVE_OPENSSL_CMD],[openssl],[yes],[no])
-
- if test "$HAVE_OPENSSL_CMD" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD"
- else
- AC_MSG_WARN([openssl command line tool not available for testing ocsp])
- fi
-fi
-
-
-# Certificate Status Request : a.k.a. OCSP Stapling
-AC_ARG_ENABLE([ocspstapling],
- [AS_HELP_STRING([--enable-ocspstapling],[Enable OCSP Stapling (default: disabled)])],
- [ ENABLED_CERTIFICATE_STATUS_REQUEST=$enableval ],
- [ ENABLED_CERTIFICATE_STATUS_REQUEST=no ]
- )
-
-if test "x$ENABLED_NGINX" = "xyes" || test "x$ENABLED_WPAS" = "xyes" || test "x$ENABLED_HAPROXY" = "xyes"
-then
- ENABLED_CERTIFICATE_STATUS_REQUEST="yes"
-fi
-
-if test "x$ENABLED_CERTIFICATE_STATUS_REQUEST" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_CERTIFICATE_STATUS_REQUEST"
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-fi
-
-
-# Certificate Status Request v2 : a.k.a. OCSP stapling v2
-AC_ARG_ENABLE([ocspstapling2],
- [AS_HELP_STRING([--enable-ocspstapling2],[Enable OCSP Stapling v2 (default: disabled)])],
- [ ENABLED_CERTIFICATE_STATUS_REQUEST_V2=$enableval ],
- [ ENABLED_CERTIFICATE_STATUS_REQUEST_V2=no ]
- )
-
-if test "x$ENABLED_NGINX" = "xyes" || test "x$ENABLED_WPAS" = "xyes" || test "x$ENABLED_HAPROXY" = "xyes"
-then
- ENABLED_CERTIFICATE_STATUS_REQUEST_V2=yes
-fi
-
-if test "x$ENABLED_CERTIFICATE_STATUS_REQUEST_V2" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_CERTIFICATE_STATUS_REQUEST_V2"
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-fi
-
-
-# CRL
-AC_ARG_ENABLE([crl],
- [AS_HELP_STRING([--enable-crl],[Enable CRL (default: disabled)])],
- [ ENABLED_CRL=$enableval ],
- [ ENABLED_CRL=no ],
- )
-
-
-if test "x$ENABLED_NGINX" = "xyes" || test "x$ENABLED_HAPROXY" = "xyes" || test "x$ENABLED_OPENVPN" = "xyes"
-then
- ENABLED_CRL=yes
-fi
-
-if test "$ENABLED_CRL" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
-fi
-
-
-# CRL Monitor
-AC_ARG_ENABLE([crl-monitor],
- [AS_HELP_STRING([--enable-crl-monitor],[Enable CRL Monitor (default: disabled)])],
- [ ENABLED_CRL_MONITOR=$enableval ],
- [ ENABLED_CRL_MONITOR=no ],
- )
-
-if test "$ENABLED_CRL_MONITOR" = "yes"
-then
- case $host_os in
- *linux* | *darwin* | *freebsd*)
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;;
- *)
- if test "x$ENABLED_DISTRO" = "xyes" ; then
- ENABLED_CRL_MONITOR="no"
- else
- AC_MSG_ERROR( [crl monitor only allowed on linux, OS X, or freebsd])
- fi
- break;;
- esac
-fi
-
-
-# USER CRYPTO
-ENABLED_USER_CRYPTO="no"
-ENABLED_USER_RSA="no"
-AC_DEFINE([BUILD_USER_RSA], [], [User RSA is being defined])
-trycryptodir=""
-AC_ARG_WITH([user-crypto],
- [AS_HELP_STRING([--with-user-crypto=PATH],[Path to USER_CRYPTO install (default /usr/local)])],
- [
- CPPFLAGS="$CPPFLAGS -DHAVE_USER_CRYPTO"
- LIBS="$LIBS -lusercrypto"
-
- if test "x$withval" != "xno" ; then
- trycryptodir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- trycryptodir="/usr/local"
- fi
-
- LDFLAGS="$LDFLAGS -L$trycryptodir/lib"
- CPPFLAGS="$CPPFLAGS -I$trycryptodir/include"
-
- #Look for RSA Init function in usercrypto lib
- AC_CHECK_LIB([usercrypto], [wc_InitRsaKey], [user_rsa_linked=yes], [user_rsa_linked=no])
-
- if test "x$user_rsa_linked" = "xyes" ; then
- AC_MSG_NOTICE([User user_rsa.h being used])
- AM_CFLAGS="$AM_CFLAGS -DHAVE_USER_RSA"
- ENABLED_USER_RSA=yes
- ENABLED_USER_CRYPTO=yes
- fi
-
-
- #Display check and find result of link attempts
- AC_MSG_CHECKING([for USER_CRYPTO])
- if test "x$ENABLED_USER_CRYPTO" = "xno" ; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([USER_CRYPTO not found. Either move to /usr/include and /usr/lib or
- Specify its path using --with-user-crypto=/dir/])
- else
- AC_MSG_RESULT([yes])
- # Check if .la is available if not then rely on exported path
- AC_CHECK_FILE($trycryptodir/lib/libusercrypto.la, [LIB_ADD="$trycryptodir/lib/libusercrypto.la $LIB_ADD"], [LIB_ADD="-lusercrypto $LIB_ADD"])
- AM_LDFLAGS="$AM_LDFLAGS -L$trycryptodir/lib"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_USER_CRYPTO"
- fi
- ]
-)
-
-if test "$ENABLED_USER_CRYPTO" = "yes" && test "$ENABLED_FIPS" = "yes"
-then
- AC_MSG_ERROR([cannot enable user crypto and fips, user crypto posibility of using code in fips boundary.])
-fi
-
-
-# NTRU
-ENABLED_NTRU="no"
-tryntrudir=""
-AC_ARG_WITH([ntru],
- [AS_HELP_STRING([--with-ntru=PATH],[Path to NTRU install (default /usr/)])],
- [
- AC_MSG_CHECKING([for NTRU])
- CPPFLAGS="$CPPFLAGS -DHAVE_NTRU -DHAVE_TLS_EXTENSIONS"
- LIBS="$LIBS -lntruencrypt"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ ntru_crypto_drbg_instantiate(0, 0, 0, 0, 0); ]])], [ ntru_linked=yes ],[ ntru_linked=no ])
-
- if test "x$ntru_linked" = "xno" ; then
- if test "x$withval" != "xno" ; then
- tryntrudir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- tryntrudir="/usr"
- fi
-
- LDFLAGS="$AM_LDFLAGS $LDFLAGS -L$tryntrudir/lib"
- CPPFLAGS="$CPPFLAGS -I$tryntrudir/include"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ ntru_crypto_drbg_instantiate(0, 0, 0, 0, 0); ]])], [ ntru_linked=yes ],[ ntru_linked=no ])
-
- if test "x$ntru_linked" = "xno" ; then
- AC_MSG_ERROR([NTRU isn't found.
- If it's already installed, specify its path using --with-ntru=/dir/])
- fi
- AC_MSG_RESULT([yes])
- AM_LDFLAGS="$AM_LDFLAGS -L$tryntrudir/lib"
- else
- AC_MSG_RESULT([yes])
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU -DHAVE_TLS_EXTENSIONS -DWOLFSSL_STATIC_RSA"
- ENABLED_NTRU="yes"
- ]
-)
-
-
-# QSH
-AC_ARG_ENABLE([qsh],
- [AS_HELP_STRING([--enable-qsh],[Enable QSH (default: disabled)])],
- [ ENABLED_QSH=$enableval ],
- [ ENABLED_QSH=no ]
- )
-
-if test "x$ENABLED_QSH" = "xyes"
-then
- if test "x$ENABLED_NTRU" = "xno"
- then
- AC_MSG_ERROR([cannot enable qsh without NTRU])
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_QSH"
-fi
-
-
-# Whitewood netRandom client library
-ENABLED_WNR="no"
-trywnrdir=""
-AC_ARG_WITH([wnr],
- [AS_HELP_STRING([--with-wnr=PATH],[Path to Whitewood netRandom install (default /usr/local)])],
- [
- AC_MSG_CHECKING([for Whitewood netRandom])
- CPPFLAGS="$CPPFLAGS -DHAVE_WNR"
- LIBS="$LIBS -lwnr"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ wnr_setup(0, 0); ]])], [ wnr_linked=yes ],[ wnr_linked=no ])
-
- if test "x$wnr_linked" = "xno" ; then
- if test "x$withval" != "xno" ; then
- trywnrdir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- trywnrdir="/usr/local"
- fi
-
- LDFLAGS="$AM_LDFLAGS $LDFLAGS -L$trywnrdir/lib"
- CPPFLAGS="$CPPFLAGS -I$trywnrdir/include"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ wnr_setup(0, 0); ]])], [ wnr_linked=yes ],[ wnr_linked=no ])
-
- if test "x$wnr_linked" = "xno" ; then
- AC_MSG_ERROR([Whitewood netRandom isn't found.
- If it's already installed, specify its path using --with-wnr=/dir/])
- fi
- AC_MSG_RESULT([yes])
- AM_LDFLAGS="$AM_LDFLAGS -L$trywnrdir/lib"
- else
- AC_MSG_RESULT([yes])
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_WNR"
- ENABLED_WNR="yes"
- ]
-)
-
-
-# SNI
-AC_ARG_ENABLE([sni],
- [AS_HELP_STRING([--enable-sni],[Enable SNI (default: disabled)])],
- [ ENABLED_SNI=$enableval ],
- [ ENABLED_SNI=no ]
- )
-if test "x$ENABLED_QT" = "xyes"
-then
- ENABLED_SNI="yes"
-fi
-
-if test "x$ENABLED_SNI" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI"
-fi
-
-# Maximum Fragment Length
-AC_ARG_ENABLE([maxfragment],
- [AS_HELP_STRING([--enable-maxfragment],[Enable Maximum Fragment Length (default: disabled)])],
- [ ENABLED_MAX_FRAGMENT=$enableval ],
- [ ENABLED_MAX_FRAGMENT=no ]
- )
-
-# ALPN
-AC_ARG_ENABLE([alpn],
- [AS_HELP_STRING([--enable-alpn],[Enable ALPN (default: disabled)])],
- [ ENABLED_ALPN=$enableval ],
- [ ENABLED_ALPN=no ]
- )
-
-if test "x$ENABLED_ALPN" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_ALPN"
-fi
-
-# Maximum Fragment Length
-if test "x$ENABLED_MAX_FRAGMENT" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_MAX_FRAGMENT"
-fi
-
-# Trusted CA Indication Extension
-AC_ARG_ENABLE([trustedca],
- [AS_HELP_STRING([--enable-trustedca],[Enable Trusted CA Indication (default: disabled)])],
- [ ENABLED_TRUSTED_CA=$enableval ],[ ENABLED_TRUSTED_CA=no ])
-
-AS_IF([test "x$ENABLED_TRUSTED_CA" = "xyes"],
- [AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUSTED_CA"])
-
-# Truncated HMAC
-AC_ARG_ENABLE([truncatedhmac],
- [AS_HELP_STRING([--enable-truncatedhmac],[Enable Truncated HMAC (default: disabled)])],
- [ ENABLED_TRUNCATED_HMAC=$enableval ],
- [ ENABLED_TRUNCATED_HMAC=no ]
- )
-
-if test "x$ENABLED_TRUNCATED_HMAC" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUNCATED_HMAC"
-fi
-
-# Renegotiation Indication - (FAKE Secure Renegotiation)
-AC_ARG_ENABLE([renegotiation-indication],
- [AS_HELP_STRING([--enable-renegotiation-indication],[Enable Renegotiation Indication (default: disabled)])],
- [ ENABLED_RENEGOTIATION_INDICATION=$enableval ],
- [ ENABLED_RENEGOTIATION_INDICATION=no ]
- )
-
-if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_RENEGOTIATION_INDICATION"
-fi
-
-# Secure Renegotiation
-AC_ARG_ENABLE([secure-renegotiation],
- [AS_HELP_STRING([--enable-secure-renegotiation],[Enable Secure Renegotiation (default: disabled)])],
- [ ENABLED_SECURE_RENEGOTIATION=$enableval ],
- [ ENABLED_SECURE_RENEGOTIATION=no ]
- )
-
-if test "x$ENABLED_SECURE_RENEGOTIATION" = "xyes"
-then
- if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes"
- then
- AC_MSG_ERROR([cannot enable renegotiation-indication and secure-renegotiation.])
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SECURE_RENEGOTIATION -DHAVE_SERVER_RENEGOTIATION_INFO"
-fi
-
-# Fallback SCSV
-AC_ARG_ENABLE([fallback-scsv],
- [AS_HELP_STRING([--enable-fallback-scsv],[Enable Fallback SCSV (default: disabled)])],
- [ ENABLED_FALLBACK_SCSV=$enableval ],
- [ ENABLED_FALLBACK_SCSV=no ]
- )
-
-if test "x$ENABLED_FALLBACK_SCSV" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FALLBACK_SCSV"
-fi
-
-# Supported Elliptic Curves Extensions
-AC_ARG_ENABLE([supportedcurves],
- [AS_HELP_STRING([--enable-supportedcurves],[Enable Supported Elliptic Curves (default: enabled)])],
- [ENABLED_SUPPORTED_CURVES=$enableval],
- [ENABLED_SUPPORTED_CURVES=yes])
-
-if test "x$ENABLED_SUPPORTED_CURVES" = "xyes"
-then
- AS_IF([test "x$ENABLED_ECC" = "xno" && test "x$ENABLED_CURVE25519" = "xno" && test "x$ENABLED_CURVE448" = "xno"],
- [ENABLED_SUPPORTED_CURVES=no],
- [AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES"])
-fi
-
-# Diffie-Hellman
-if test "$ENABLED_DH" = "yes"
-then
- if test "$ENABLED_TLS13" = "yes" || test "$ENABLED_SUPPORTED_CURVES" = "yes"
- then
- AM_CFLAGS="-DHAVE_FFDHE_2048 $AM_CFLAGS"
- fi
-fi
-
-# FFDHE parameters only
-AC_ARG_ENABLE([ffdhe-only],
- [AS_HELP_STRING([--enable-ffdhe-only],[Enable using only FFDHE in client (default: disabled)])],
- [ ENABLED_FFDHE_ONLY=$enableval ],
- [ ENABLED_FFDHE_ONLY=no ]
- )
-
-if test "x$ENABLED_FFDHE_ONLY" = "xyes"
-then
- if test "$ENABLED_DH" = "no"
- then
- AC_MSG_ERROR([FFDHE only support requires DH support])
- fi
- if test "$ENABLED_SUPPORTED_CURVES" = "no"
- then
- AC_MSG_ERROR([FFDHE only support requires Supported Curves extension])
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_REQUIRE_FFDHE"
-fi
-
-# TLS 1.3 Requires either ECC or (RSA/DH), or CURVE25519/ED25519 or CURVE448/ED448
-if test "x$ENABLED_ECC" = "xno" && \
- (test "x$ENABLED_RSA" = "xno" || test "x$ENABLED_DH" = "xno") && \
- (test "x$ENABLED_CURVE25519" = "xno" || test "x$ENABLED_ED25519" = "xno") && \
- (test "x$ENABLED_CURVE448" = "xno" || test "x$ENABLED_ED448" = "xno")
-then
- # disable TLS 1.3
- ENABLED_TLS13=no
-fi
-if test "$ENABLED_TLS13" = "yes"
-then
- AM_CFLAGS="-DWOLFSSL_TLS13 -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES $AM_CFLAGS"
-fi
-
-
-# Session Ticket Extension
-AC_ARG_ENABLE([session-ticket],
- [AS_HELP_STRING([--enable-session-ticket],[Enable Session Ticket (default: disabled)])],
- [ ENABLED_SESSION_TICKET=$enableval ],
- [ ENABLED_SESSION_TICKET=no ]
- )
-
-if test "x$ENABLED_NGINX" = "xyes" || test "$ENABLED_WPAS" != "no" || test "x$ENABLED_HAPROXY" = "xyes"
-then
- ENABLED_SESSION_TICKET=yes
-fi
-
-if test "x$ENABLED_SESSION_TICKET" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SESSION_TICKET"
-fi
-
-# Extended Master Secret Extension
-AC_ARG_ENABLE([extended-master],
- [AS_HELP_STRING([--enable-extended-master],[Enable Extended Master Secret (default: enabled)])],
- [ ENABLED_EXTENDED_MASTER=$enableval ],
- [ ENABLED_EXTENDED_MASTER=yes ]
- )
-
-if test "x$ENABLED_EXTENDED_MASTER" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_EXTENDED_MASTER"
-fi
-
-# TLS Extensions
-AC_ARG_ENABLE([tlsx],
- [AS_HELP_STRING([--enable-tlsx],[Enable all TLS Extensions (default: disabled)])],
- [ ENABLED_TLSX=$enableval ],
- [ ENABLED_TLSX=no ]
- )
-
-if test "x$ENABLED_NGINX" = "xyes" || test "x$ENABLED_HAPROXY" = "xyes" || test "x$ENABLED_SIGNAL" = "xyes"
-then
- ENABLED_TLSX=yes
-fi
-
-if test "x$ENABLED_TLSX" = "xyes"
-then
- ENABLED_SNI=yes
- ENABLED_MAX_FRAGMENT=yes
- ENABLED_TRUNCATED_HMAC=yes
- ENABLED_ALPN=yes
- ENABLED_TRUSTED_CA=yes
- ENABLED_ENCRYPT_THEN_MAC=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC -DHAVE_ALPN -DHAVE_TRUSTED_CA"
- # Check the ECC supported curves prereq
- AS_IF([test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_CURVE25519" = "xyes" || test "x$ENABLED_CURVE448" = "xyes" || test "x$ENABLED_TLS13" = "xyes"],
- [ENABLED_SUPPORTED_CURVES=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SUPPORTED_CURVES"])
-fi
-
-# Early Data handshake in TLS v1.3 and above
-AC_ARG_ENABLE([earlydata],
- [AS_HELP_STRING([--enable-earlydata],[Enable Early Data handshake with wolfSSL TLS v1.3 (default: disabled)])],
- [ ENABLED_TLS13_EARLY_DATA=$enableval ],
- [ ENABLED_TLS13_EARLY_DATA=no ]
- )
-
-if test "$ENABLED_TLS13_EARLY_DATA" = "group"
-then
- ENABLED_TLS13_EARLY_DATA="yes"
- # Group EarlyData with ClientHello
- AM_CFLAGS="-DWOLFSSL_EARLY_DATA_GROUP $AM_CFLAGS"
-fi
-if test "$ENABLED_TLS13_EARLY_DATA" = "yes"
-then
- if test "x$ENABLED_TLS13" = "xno"
- then
- AC_MSG_ERROR([cannot enable earlydata without enabling tls13.])
- fi
- if test "x$ENABLED_SESSION_TICKET" = "xno" && test "x$ENABLED_PSK" = "xno"
- then
- AC_MSG_ERROR([cannot enable earlydata without enabling session tickets and/or PSK.])
- fi
- AM_CFLAGS="-DWOLFSSL_EARLY_DATA $AM_CFLAGS"
-fi
-
-if test "$ENABLED_TLSV12" = "no" && test "$ENABLED_TLS13" = "yes" && test "x$ENABLED_SESSION_TICKET" = "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_SESSION_CACHE"
-fi
-
-
-# PKCS7
-AC_ARG_ENABLE([pkcs7],
- [AS_HELP_STRING([--enable-pkcs7],[Enable PKCS7 (default: disabled)])],
- [ ENABLED_PKCS7=$enableval ],
- [ ENABLED_PKCS7=no ],
- )
-
-
-# wolfSSH Options
-AC_ARG_ENABLE([ssh],
- [AS_HELP_STRING([--enable-ssh],[Enable wolfSSH options (default: disabled)])],
- [ ENABLED_WOLFSSH=$enableval ],
- [ ENABLED_WOLFSSH=no ]
- )
-
-# Simple Certificate Enrollment Protocol (SCEP)
-AC_ARG_ENABLE([scep],
- [AS_HELP_STRING([--enable-scep],[Enable wolfSCEP (default: disabled)])],
- [ ENABLED_WOLFSCEP=$enableval ],
- [ ENABLED_WOLFSCEP=no ]
- )
-
-
-# Secure Remote Password
-AC_ARG_ENABLE([srp],
- [AS_HELP_STRING([--enable-srp],[Enable Secure Remote Password (default: disabled)])],
- [ ENABLED_SRP=$enableval ],
- [ ENABLED_SRP=no ]
- )
-
-if test "x$ENABLED_SRP" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFCRYPT_HAVE_SRP"
-fi
-
-
-# Indefinite length encoded BER message support
-AC_ARG_ENABLE([indef],
- [AS_HELP_STRING([--enable-indef],[Enable parsing of indefinite length encoded msgs (default: disabled)])],
- [ ENABLED_BER_INDEF=$enableval ],
- [ ENABLED_BER_INDEF=no ]
- )
-
-if test "x$ENABLED_BER_INDEF" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DASN_BER_TO_DER"
-fi
-
-
-
-# Small Stack - Cache on object
-AC_ARG_ENABLE([smallstackcache],
- [AS_HELP_STRING([--enable-smallstackcache],[Enable Small Stack Usage Caching (default: disabled)])],
- [ ENABLED_SMALL_STACK_CACHE=$enableval ],
- [ ENABLED_SMALL_STACK_CACHE=no ]
- )
-
-if test "x$ENABLED_SMALL_STACK_CACHE" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SMALL_STACK_CACHE"
-fi
-
-# Small Stack
-AC_ARG_ENABLE([smallstack],
- [AS_HELP_STRING([--enable-smallstack],[Enable Small Stack Usage (default: disabled)])],
- [ ENABLED_SMALL_STACK=$enableval ],
- [ ENABLED_SMALL_STACK=no ]
- )
-
-if test "x$ENABLED_SMALL_STACK_CACHE" = "xyes"
-then
- ENABLED_SMALL_STACK=yes
-fi
-if test "x$ENABLED_SMALL_STACK" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SMALL_STACK"
-fi
-
-
-#valgrind
-AC_ARG_ENABLE([valgrind],
- [AS_HELP_STRING([--enable-valgrind],[Enable valgrind for unit tests (default: disabled)])],
- [ ENABLED_VALGRIND=$enableval ],
- [ ENABLED_VALGRIND=no ]
- )
-
-if test "$ENABLED_VALGRIND" = "yes"
-then
- AC_CHECK_PROG([HAVE_VALGRIND],[valgrind],[yes],[no])
-
- if test "$HAVE_VALGRIND" = "no"
- then
- AC_MSG_ERROR([Valgrind not found.])
- fi
- enable_shared=no
- enable_static=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_VALGRIND"
-fi
-
-
-# Test certs, use internal cert functions for extra testing
-AC_ARG_ENABLE([testcert],
- [AS_HELP_STRING([--enable-testcert],[Enable Test Cert (default: disabled)])],
- [ ENABLED_TESTCERT=$enableval ],
- [ ENABLED_TESTCERT=no ]
- )
-
-if test "$ENABLED_TESTCERT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_TEST_CERT"
-fi
-
-
-# I/O Pool, an example to show user how to override memory handler and use
-# a pool for the input/output buffer requests
-AC_ARG_ENABLE([iopool],
- [AS_HELP_STRING([--enable-iopool],[Enable I/O Pool example (default: disabled)])],
- [ ENABLED_IOPOOL=$enableval ],
- [ ENABLED_IOPOOL=no ]
- )
-
-if test "$ENABLED_IOPOOL" = "yes"
-then
- if test "$thread_ls_on" = "no"
- then
- AC_MSG_ERROR([I/O Pool example requires Thread Local Storage])
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_IO_POOL -DXMALLOC_USER"
-fi
-
-
-# Certificate Service Support
-AC_ARG_ENABLE([certservice],
- [AS_HELP_STRING([--enable-certservice],[Enable cert service (default: disabled)])],
- [ ENABLED_CERT_SERVICE=$enableval ],
- [ ENABLED_CERT_SERVICE=no ]
- )
-if test "$ENABLED_CERT_SERVICE" = "yes"
-then
- # Requires ecc,certgen, and opensslextra make sure on
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
- if test "x$ENABLED_ECC" = "xno"
- then
- ENABLED_ECC="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256"
-
- if test "$ENABLED_ECC_SHAMIR" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"
- fi
- fi
- if test "x$ENABLED_OPENSSLEXTRA" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_CERT_SERVICE"
-fi
-
-
-# wolfSSL JNI
-AC_ARG_ENABLE([jni],
- [AS_HELP_STRING([--enable-jni],[Enable wolfSSL JNI (default: disabled)])],
- [ ENABLED_JNI=$enableval ],
- [ ENABLED_JNI=no ]
- )
-if test "$ENABLED_JNI" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_JNI -DHAVE_EX_DATA"
-
- # Enable prereqs if not already enabled
- if test "x$ENABLED_DTLS" = "xno"
- then
- ENABLED_DTLS="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DTLS"
- fi
- if test "x$ENABLED_OPENSSLEXTRA" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_EXTRA"
- fi
- if test "x$ENABLED_OPENSSLALL" = "xno"
- then
- ENABLED_OPENSSLALL="yes"
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_ALL"
- fi
- if test "x$ENABLED_CRL" = "xno"
- then
- ENABLED_CRL="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
- fi
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
- if test "x$ENABLED_CRL_MONITOR" = "xno" && test "x$ENABLED_DISTRO" = "xno"
- then
- ENABLED_CRL_MONITOR="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR"
- fi
- if test "x$ENABLED_SAVESESSION" = "xno"
- then
- ENABLED_SAVESESSION="yes"
- AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE"
- fi
- if test "x$ENABLED_SAVECERT" = "xno"
- then
- ENABLED_SAVECERT="yes"
- AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE"
- fi
- if test "x$ENABLED_ATOMICUSER" = "xno"
- then
- ENABLED_ATOMICUSER="yes"
- AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER"
- fi
- if test "x$ENABLED_ECC" = "xno"
- then
- ENABLED_ECC="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256"
-
- if test "$ENABLED_ECC_SHAMIR" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"
- fi
- fi
- if test "x$ENABLED_PKCALLBACKS" = "xno"
- then
- ENABLED_PKCALLBACKS="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS"
- fi
- if test "x$ENABLED_DH" = "xno"
- then
- ENABLED_DH="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_DH"
- fi
- if test "x$ENABLED_PSK" = "xno"
- then
- ENABLED_PSK="yes"
- fi
- if test "x$ENABLED_CERTEXT" = "xno"
- then
- ENABLED_CERTEXT="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
- fi
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
- if test "x$ENABLED_SNI" = "xno"
- then
- ENABLED_SNI="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI"
- fi
- if test "x$ENABLED_ALPN" = "xno"
- then
- ENABLED_ALPN="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ALPN"
- fi
-fi
-
-# lighty Support
-AC_ARG_ENABLE([lighty],
- [AS_HELP_STRING([--enable-lighty],[Enable lighttpd/lighty (default: disabled)])],
- [ ENABLED_LIGHTY=$enableval ],
- [ ENABLED_LIGHTY=no ]
- )
-if test "$ENABLED_LIGHTY" = "yes"
-then
- # Requires opensslextra make sure on
- if test "x$ENABLED_OPENSSLEXTRA" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_LIGHTY -DHAVE_WOLFSSL_SSL_H=1"
-fi
-
-if test "$ENABLED_NGINX" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NGINX -DWOLFSSL_SIGNER_DER_CERT"
-fi
-
-if test "$ENABLED_HAPROXY" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAPROXY"
- # Requires opensslextra make sure on
- if test "x$ENABLED_OPENSSLEXTRA" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
- fi
-fi
-
-if test "$ENABLED_SIGNAL" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SIGNAL"
- # Requires opensslextra make sure on
- if test "x$ENABLED_OPENSSLEXTRA" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
- fi
-fi
-
-if test "$ENABLED_OPENVPN" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DES_ECB -DHAVE_EX_DATA -DWOLFSSL_KEY_GEN -DWOLFSSL_OPENVPN"
-fi
-
-
-if test "$ENABLED_NGINX" = "yes"|| test "x$ENABLED_HAPROXY" = "xyes" || test "x$ENABLED_LIGHTY" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_VERIFY_CB"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_KEEP_SNI"
- AM_CFLAGS="$AM_CFLAGS -DKEEP_OUR_CERT -DKEEP_PEER_CERT"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_EXT_CACHE -DHAVE_EX_DATA"
-fi
-
-if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_QT" = "yes"
-then
- ENABLED_ARC4="yes"
-fi
-
-if test "$ENABLED_ARC4" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_RC4"
-else
- # turn off ARC4 if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_RC4"
- ENABLED_ARC4=no
- fi
-fi
-
-# Asio Support
-AC_ARG_ENABLE([asio],
- [AS_HELP_STRING([--enable-asio],[Enable asio (default: disabled)])],
- [ ENABLED_ASIO=$enableval ],
- [ ENABLED_ASIO=no ]
- )
-if test "$ENABLED_ASIO" = "yes"
-then
- # Requires opensslextra and opensslall
- if test "x$ENABLED_OPENSSLALL" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLALL="yes"
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA -DOPENSSL_ALL $AM_CFLAGS"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ASIO -DASIO_USE_WOLFSSL -DWOLFSSL_KEY_GEN"
- AM_CFLAGS="$AM_CFLAGS -DBOOST_ASIO_USE_WOLFSSL -DHAVE_EX_DATA"
- AM_CFLAGS="$AM_CFLAGS -DSSL_TXT_TLSV1_2 -DSSL_TXT_TLSV1_1"
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3"
- if test "$ENABLED_TLSV10" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DSSL_TXT_TLSV1"
- fi
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-fi
-
-# Apache HTTPD
-AC_ARG_ENABLE([apachehttpd],
- [AS_HELP_STRING([--enable-apachehttpd],[Enable Apache httpd (default: disabled)])],
- [ ENABLED_APACHE_HTTPD=$enableval ],
- [ ENABLED_APACHE_HTTPD=no ]
- )
-if test "$ENABLED_APACHE_HTTPD" = "yes"
-then
- # Requires opensslextra and opensslall
- if test "x$ENABLED_OPENSSLALL" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLALL="yes"
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA -DOPENSSL_ALL $AM_CFLAGS"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_APACHE_HTTPD"
- AM_CFLAGS="$AM_CFLAGS -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 -DOPENSSL_NO_COMP"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_EX_DATA -DWOLFSSL_SIGNER_DER_CERT"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT -DWOLFSSL_CERT_GEN"
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-
- # Requires sessioncerts make sure on
- if test "x$ENABLED_SESSIONCERTS" = "xno"
- then
- ENABLED_SESSIONCERTS="yes"
- AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS"
- fi
-
- # Requires ALPN
- if test "x$ENABLED_ALPN" = "xno"
- then
- ENABLED_ALPN="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_ALPN"
- fi
-
- # Requires CRL
- if test "x$ENABLED_CRL" = "xno"
- then
- ENABLED_CRL="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
- fi
-
- # Requires Certificate Generation, Request and Extensions
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
- if test "x$ENABLED_CERTREQ" = "xno"
- then
- ENABLED_CERTREQ="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_REQ"
- fi
- if test "x$ENABLED_CERTEXT" = "xno"
- then
- ENABLED_CERTEXT="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
- fi
-
- # Requires Secure Renegotiation
- if test "x$ENABLED_SECURE_RENEGOTIATION" = "xno"
- then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SECURE_RENEGOTIATION -DHAVE_SERVER_RENEGOTIATION_INFO"
- fi
-fi
-
-# Encrypt-Then-Mac
-AC_ARG_ENABLE([enc-then-mac],
- [AS_HELP_STRING([--enable-enc-then-mac],[Enable Encryptr-Then-Mac extension (default: enabled)])],
- [ ENABLED_ENCRYPT_THEN_MAC=$enableval ],
- [ ENABLED_ENCRYPT_THEN_MAC=yes ]
- )
-
-if test "x$ENABLED_APACHE_HTTPD" = "xyes"
-then
- ENABLED_ENCRYPT_THEN_MAC=no
-fi
-
-if test "x$ENABLED_TLSX" = "xyes"
-then
- ENABLED_ENCRYPT_THEN_MAC=yes
-fi
-
-AS_IF([test "x$ENABLED_SNIFFER" = "xyes"],[ENABLED_ENCRYPT_THEN_MAC="no"])
-
-if test "x$ENABLED_ENCRYPT_THEN_MAC" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ENCRYPT_THEN_MAC"
-fi
-
-
-# stunnel Support
-AC_ARG_ENABLE([stunnel],
- [AS_HELP_STRING([--enable-stunnel],[Enable stunnel (default: disabled)])],
- [ ENABLED_STUNNEL=$enableval ],
- [ ENABLED_STUNNEL=no ]
- )
-if test "$ENABLED_WPAS" = "yes"
-then
- ENABLED_STUNNEL="yes"
-fi
-if test "$ENABLED_STUNNEL" = "yes"
-then
- # Requires opensslextra make sure on
- if test "x$ENABLED_OPENSSLEXTRA" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
- fi
-
- # Requires OCSP make sure on
- if test "x$ENABLED_OCSP" = "xno"
- then
- ENABLED_OCSP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
- fi
-
- # Requires coding make sure on
- if test "x$ENABLED_CODING" = "xno"
- then
- ENABLED_CODING="yes"
- fi
-
- # Requires sessioncerts make sure on
- if test "x$ENABLED_SESSIONCERTS" = "xno"
- then
- ENABLED_SESSIONCERTS="yes"
- AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS"
- fi
-
- # Requires crls, make sure on
- if test "x$ENABLED_CRL" = "xno"
- then
- ENABLED_CRL="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
- fi
-
- # Requires DES3, make sure on
- if test "x$ENABLED_DES3" = "xno"
- then
- ENABLED_DES3="yes"
- fi
-
- # Requires tlsx, make sure on
- if test "x$ENABLED_TLSX" = "xno"
- then
- ENABLED_TLSX="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC"
-
- # Check the ECC supported curves prereq
- AS_IF([test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_CURVE25519" = "xyes"],
- [ENABLED_SUPPORTED_CURVES=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SUPPORTED_CURVES"])
- fi
-
- # Requires ecc make sure on
- if test "x$ENABLED_ECC" = "xno"
- then
- ENABLED_OPENSSLEXTRA="yes"
- ENABLED_ECC="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256"
-
- if test "$ENABLED_ECC_SHAMIR" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"
- fi
- fi
-
- # Requires wolfSSL_OBJ_txt2nid
- if test "x$ENABLED_CERTEXT" = "xno"
- then
- ENABLED_CERTEXT="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
- fi
-
- # Requires certgen
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_STUNNEL -DWOLFSSL_ALWAYS_VERIFY_CB"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_KEEP_SNI -DHAVE_EX_DATA"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DES_ECB"
-fi
-
-if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "no" \
- && test "x$ENABLED_STUNNEL" = "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_PSK"
-fi
-
-if test "$ENABLED_PSK" = "no" && \
- (test "$ENABLED_LEANPSK" = "yes" || test "x$ENABLED_STUNNEL" = "xyes")
-then
- ENABLED_PSK=yes
-fi
-
-# MD4
-AC_ARG_ENABLE([md4],
- [AS_HELP_STRING([--enable-md4],[Enable MD4 (default: disabled)])],
- [ ENABLED_MD4=$enableval ],
- [ ENABLED_MD4=no ]
- )
-
-
-if test "$ENABLED_MD4" = "no"
-then
- #turn on MD4 if using stunnel
- if test "x$ENABLED_STUNNEL" = "xyes"
- then
- ENABLED_MD4="yes"
- else
- AM_CFLAGS="$AM_CFLAGS -DNO_MD4"
- fi
-fi
-
-
-# Encrypted keys
-AC_ARG_ENABLE([enckeys],
- [AS_HELP_STRING([--enable-enckeys],[Enable PEM encrypted private key support (default: disabled)])],
- [ ENABLED_ENCKEYS=$enableval ],
- [ ENABLED_ENCKEYS=no ]
- )
-
-if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_WEBSERVER" = "yes" || test "$ENABLED_WPAS" != "no"
-then
- ENABLED_ENCKEYS=yes
-fi
-
-if test "$ENABLED_ENCKEYS" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ENCRYPTED_KEYS"
-fi
-
-
-# PWDBASED has to come after certservice since we want it on w/o explicit on
-# PWDBASED
-AC_ARG_ENABLE([pwdbased],
- [AS_HELP_STRING([--enable-pwdbased],[Enable PWDBASED (default: disabled)])],
- [ ENABLED_PWDBASED=$enableval ],
- [ ENABLED_PWDBASED=no ]
- )
-
-if test "$ENABLED_PWDBASED" = "no"
-then
- if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_OPENSSLALL" = "yes" || test "$ENABLED_WEBSERVER" = "yes" || test "$ENABLED_ENCKEYS" = "yes"
- then
- # opensslextra, opensslall, webserver, and enckeys needs pwdbased
- ENABLED_PWDBASED=yes
- else
- AM_CFLAGS="$AM_CFLAGS -DNO_PWDBASED"
- fi
-fi
-
-
-AC_ARG_ENABLE([scrypt],
- [AS_HELP_STRING([--enable-scrypt],[Enable SCRYPT (default: disabled)])],
- [ ENABLED_SCRYPT=$enableval ],
- [ ENABLED_SCRYPT=no ]
- )
-
-if test "$ENABLED_SCRYPT" = "yes"
-then
- if test "$ENABLED_PWDBASED" = "no"
- then
- AC_MSG_ERROR([cannot enable scrypt without enabling pwdbased.])
- fi
- AM_CFLAGS="$AM_CFLAGS -DHAVE_SCRYPT"
-fi
-
-
-# wolfCrypt Only Build
-AC_ARG_ENABLE([cryptonly],
- [AS_HELP_STRING([--enable-cryptonly],[Enable wolfCrypt Only build (default: disabled)])],
- [ENABLED_CRYPTONLY=$enableval],
- [ENABLED_CRYPTONLY=no])
-
-AS_IF([test "x$FIPS_VERSION" = "xrand"],[ENABLED_CRYPTONLY="yes"])
-
-if test "$ENABLED_CRYPTONLY" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFCRYPT_ONLY"
-fi
-
-if test "x$ENABLED_CRYPTONLY" = "xno"
-then
- if test "x$ENABLED_PSK" = "xno" && test "x$ENABLED_ASN" = "xno"
- then
- AC_MSG_ERROR([please enable psk if disabling asn.])
- fi
-
- if test "x$ENABLED_ECC" != "xno" && test "x$ENABLED_ASN" = "xno"
- then
- AC_MSG_ERROR([please disable ecc if disabling asn.])
- fi
-
- if test "$ENABLED_AFALG" = "yes"
- then
- # for TLS connections the intermediate hash needs to store buffer
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_HASH_KEEP"
- fi
-
- if test "$ENABLED_DEVCRYPTO" = "yes"
- then
- # for TLS connections the intermediate hash needs to store buffer
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_HASH_KEEP"
- fi
-fi
-
-# set fastmath default
-FASTMATH_DEFAULT=no
-
-if test "$host_cpu" = "x86_64" || test "$host_cpu" = "aarch64"
-then
- FASTMATH_DEFAULT=yes
-fi
-if test "$ENABLED_SP_MATH" = "yes"
-then
- FASTMATH_DEFAULT=no
-fi
-
-# fastmath
-AC_ARG_ENABLE([fastmath],
- [AS_HELP_STRING([--enable-fastmath],[Enable fast math ops (default: enabled on x86_64/aarch64)])],
- [ ENABLED_FASTMATH=$enableval ],
- [ ENABLED_FASTMATH=$FASTMATH_DEFAULT]
- )
-
-if test "x$ENABLED_FASTMATH" = "xyes"
-then
- # turn off fastmth if leanpsk on or asn off (w/o DH and ECC)
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_ASN" = "no"
- then
- if test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no" && test "$ENABLED_RSA" = "no"
- then
- ENABLED_FASTMATH=no
- else
- AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH"
- ENABLED_SLOWMATH="no"
- fi
- else
- AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH"
- ENABLED_SLOWMATH="no"
- fi
- if test "$host_cpu" = "x86_64"
- then
- # Have settings.h set FP_MAX_BITS higher if user didn't set directly
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_X86_64_BUILD"
- fi
-fi
-
-
-# fast HUGE math
-AC_ARG_ENABLE([fasthugemath],
- [AS_HELP_STRING([--enable-fasthugemath],[Enable fast math + huge code (default: disabled)])],
- [ ENABLED_FASTHUGEMATH=$enableval ],
- [ ENABLED_FASTHUGEMATH=no ]
- )
-
-if test "$ENABLED_BUMP" = "yes"
-then
- ENABLED_FASTHUGEMATH="yes"
-fi
-
-if test "$ENABLED_FASTHUGEMATH" = "yes"
-then
- ENABLED_FASTMATH="yes"
- AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH"
- ENABLED_SLOWMATH="no"
-fi
-
-
-# Enable Examples, used to disable examples
-AC_ARG_ENABLE([examples],
- [AS_HELP_STRING([--enable-examples],[Enable Examples (default: enabled)])],
- [ ENABLED_EXAMPLES=$enableval ],
- [ ENABLED_EXAMPLES=yes ]
- )
-
-AS_IF([test "x$ENABLED_FILESYSTEM" = "xno"], [ENABLED_EXAMPLES="no"])
-AS_IF([test "x$ENABLED_INLINE" = "xno"], [ENABLED_EXAMPLES="no"])
-AS_IF([test "x$ENABLED_CRYPTONLY" = "xyes"], [ENABLED_EXAMPLES="no"])
-
-
-# Enable wolfCrypt test and benchmark
-AC_ARG_ENABLE([crypttests],
- [AS_HELP_STRING([--enable-crypttests],[Enable Crypt Bench/Test (default: enabled)])],
- [ ENABLED_CRYPT_TESTS=$enableval ],
- [ ENABLED_CRYPT_TESTS=yes ]
- )
-
-
-# LIBZ
-ENABLED_LIBZ="no"
-trylibzdir=""
-AC_ARG_WITH([libz],
- [ --with-libz=PATH PATH to libz install (default /usr/) ],
- [
- AC_MSG_CHECKING([for libz])
- CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ"
- LIBS="$LIBS -lz"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ deflateInit(0, 8); ]])],[ libz_linked=yes ],[ libz_linked=no ])
-
- if test "x$libz_linked" = "xno" ; then
- if test "x$withval" != "xno" ; then
- trylibzdir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- trylibzdir="/usr"
- fi
-
- LDFLAGS="$LDFLAGS -L$trylibzdir/lib"
- CPPFLAGS="$CPPFLAGS -I$trylibzdir/include"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ deflateInit(0, 8); ]])],[ libz_linked=yes ],[ libz_linked=no ])
-
- if test "x$libz_linked" = "xno" ; then
- AC_MSG_ERROR([libz isn't found.
- If it's already installed, specify its path using --with-libz=/dir/])
- fi
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([yes])
- fi
- ENABLED_LIBZ="yes"
- ]
-)
-
-
-# PKCS#11
-AC_ARG_ENABLE([pkcs11],
- [AS_HELP_STRING([--enable-pkcs11],[Enable pkcs11 access (default: disabled)])],
- [ ENABLED_PKCS11=$enableval ],
- [ ENABLED_PKCS11=no ]
- )
-
-if test "x$ENABLED_PKCS11" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS11 -DHAVE_WOLF_BIGINT"
- LIBS="$LIBS -ldl"
-fi
-
-
-# PKCS#12
-AC_ARG_ENABLE([pkcs12],
- [AS_HELP_STRING([--enable-pkcs12],[Enable pkcs12 (default: enabled)])],
- [ ENABLED_PKCS12=$enableval ],
- [ ENABLED_PKCS12=yes ]
- )
-
-if test "x$ENABLED_PKCS12" = "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_PKCS12"
-fi
-
-
-# cavium
-trycaviumdir=""
-AC_ARG_WITH([cavium],
- [ --with-cavium=PATH PATH to cavium/software dir ],
- [
- AC_MSG_CHECKING([for cavium])
- CPPFLAGS="$CPPFLAGS -DHAVE_CAVIUM"
- LIB_ADD="-lrt $LIB_ADD"
-
- if test "x$withval" = "xyes" ; then
- AC_MSG_ERROR([need a PATH for --with-cavium])
- fi
- if test "x$withval" != "xno" ; then
- trycaviumdir=$withval
- fi
-
- LDFLAGS="$AM_LDFLAGS $trycaviumdir/api/cavium_common.o"
- CPPFLAGS="$CPPFLAGS -I$trycaviumdir/include"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "cavium_common.h"]], [[ CspShutdown(CAVIUM_DEV_ID); ]])],[ cavium_linked=yes ],[ cavium_linked=no ])
-
- if test "x$cavium_linked" = "xno" ; then
- AC_MSG_ERROR([cavium isn't found.
- If it's already installed, specify its path using --with-cavium=/dir/])
- else
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CAVIUM"
- fi
- AC_MSG_RESULT([yes])
- enable_shared=no
- enable_static=yes
- ENABLED_CAVIUM=yes
- ],
- [ ENABLED_CAVIUM=no ]
-)
-
-# cavium V
-trycaviumdir=""
-AC_ARG_WITH([cavium-v],
- [ --with-cavium-v=PATH PATH to Cavium V/software dir ],
- [
- AC_MSG_CHECKING([for cavium])
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CAVIUM -DHAVE_CAVIUM_V"
- LIB_ADD="-lrt -lcrypto $LIB_ADD"
-
- if test "x$withval" = "xyes" ; then
- AC_MSG_ERROR([need a PATH for --with-cavium])
- fi
- if test "x$withval" != "xno" ; then
- trycaviumdir=$withval
- fi
-
- AC_CHECK_FILES([$trycaviumdir/lib/libnitrox.a], [AM_CPPFLAGS="-I$trycaviumdir/include $AM_CPPFLAGS"], [ENABLED_CAVIUM_V=no])
- LIB_STATIC_ADD="$trycaviumdir/lib/libnitrox.a $LIB_STATIC_ADD"
-
- if test "$ENABLED_CAVIUM_V" = "no"; then
- AC_MSG_ERROR([Could not find Nitrox library])
- fi
-
- enable_shared=no
- enable_static=yes
- enable_opensslextra=yes
-
- ENABLED_CAVIUM=yes
- ENABLED_CAVIUM_V=yes
- ],
- [
- ENABLED_CAVIUM_=no
- ENABLED_CAVIUM_V=no
- ]
-)
-
-
-# Cavium Octeon
-OCTEON_ROOT=""
-: ${OCTEON_OBJ="obj-octeon2"}
-: ${OCTEON_HOST="standalone"}
-
-AC_ARG_WITH([octeon-sync],
- [AS_HELP_STRING([--with-octeon-sync=PATH],[PATH to Cavium Octeon SDK dir (sync)])],
- [
- AC_MSG_CHECKING([for octeon])
-
- if test "x$withval" = "xyes" ; then
- AC_MSG_ERROR([need a PATH for --with-octeon])
- fi
- if test "x$withval" != "xno" ; then
- OCTEON_ROOT=$withval
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DHAVE_CAVIUM_OCTEON_SYNC"
- AM_CFLAGS="$AM_CFLAGS -DOCTEON_MODEL=$OCTEON_MODEL"
- AM_CFLAGS="$AM_CFLAGS -I$OCTEON_ROOT/executive"
- AS_CASE([$OCTEON_HOST],['linux'],[AM_CFLAGS="$AM_CFLAGS -DCVMX_BUILD_FOR_LINUX_HOST"])
-
- #-I$OCTEON_ROOT/target/include
- AM_LDFLAGS="$AM_LDFLAGS -lrt -Xlinker -T -Xlinker $OCTEON_ROOT/executive/cvmx-shared-linux.ld"
- AM_LDFLAGS="$AM_LDFLAGS -L$OCTEON_ROOT/executive/$OCTEON_OBJ -lcvmx -lfdt"
-
- enable_shared=no
- enable_static=yes
-
- ENABLED_OCTEON_SYNC=yes
- AC_MSG_RESULT([yes])
- ],
- [ENABLED_OCTEON_SYNC=no]
-)
-
-
-# Intel QuickAssist
-QAT_DIR=""
-BUILD_INTEL_QAT_VERSION=2
-
-AC_ARG_WITH([intelqa],
- [AS_HELP_STRING([--with-intelqa=PATH],[PATH to Intel QuickAssist (QAT) driver dir])],
- [ENABLED_INTEL_QA=yes; QAT_DIR=$withval],
- [ENABLED_INTEL_QA=no])
-
-AC_ARG_WITH([intelqa-sync],
- [AS_HELP_STRING([--with-intelqa-sync=PATH],[PATH to Intel QuickAssist (QAT) driver dir (sync)])],
- [ENABLED_INTEL_QA_SYNC=yes; QAT_DIR=$withval],
- [ENABLED_INTEL_QA_SYNC=no])
-
-AS_IF([test "x$ENABLED_INTEL_QA" = "xyes" && test "x$ENABLED_INTEL_QA_SYNC" = "xyes"],
- [AC_MSG_ERROR([Both Intel QA Async and Sync are selected, only select one.])])
-
-AS_IF([test "x$ENABLED_INTEL_QA" = "xyes" || test "x$ENABLED_INTEL_QA_SYNC" = "xyes"],
- [AC_MSG_CHECKING([for intelqa])
- AS_IF([test "x$ENABLED_INTEL_QA" = "xyes"],
- [AM_CPPFLAGS="$AM_CPPFLAGS -DHAVE_INTEL_QA -DDO_CRYPTO -DUSER_SPACE"; intelqa_opt=""],
- [AM_CPPFLAGS="$AM_CPPFLAGS -DHAVE_INTEL_QA_SYNC -DQAT_USE_POLLING_THREAD -DO_CRYPTO -DUSER_SPACE"; intelqa_opt="-sync"])
- OLD_LIBS="$LIBS"
- OLD_CPPFLAGS="$CPPFLAGS"
-
- AS_IF([test "x$QAT_DIR" = "xyes"],[AC_MSG_ERROR([need a PATH for --with-intelqa$intelqa_opt])])
-
- AM_CPPFLAGS="$AM_CPPFLAGS -I$QAT_DIR/quickassist/include -I$QAT_DIR/quickassist/include/lac -I$QAT_DIR/quickassist/utilities/osal/include \
- -I$QAT_DIR/quickassist/utilities/osal/src/linux/user_space/include -I$QAT_DIR/quickassist/lookaside/access_layer/include \
- -I$QAT_DIR/quickassist/lookaside/access_layer/src/common/include -I$srcdir/wolfssl -I$srcdir/wolfssl/wolfcrypt/port/intel \
- -I$QAT_DIR/quickassist/utilities/libusdm_drv"
- CPPFLAGS="$AM_CPPFLAGS"
-
- LDFLAGS="$LDFLAGS -L$QAT_DIR/build"
- LIBS="$LIBS -lqat_s -lusdm_drv_s"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "cpa_cy_common.h"]],[[Cpa16U count = 0; cpaCyGetNumInstances(&count);]])],[intelqa_linked=yes],[intelqa_linked=no])
-
- AS_IF([test "x$intelqa_linked" = "xno"],
- [# Try old QAT driver libraries
- LIBS="$OLD_LIBS -licp_qa_al_s"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "cpa_cy_common.h"]],[[Cpa16U count = 0; cpaCyGetNumInstances(&count);]])],[intelqa_linked=yes],[intelqa_linked=no])
- AS_IF([test "x$intelqa_linked" = "xno"],
- [AC_MSG_ERROR([Intel QuickAssist not found. If it's already installed, specify its path using --with-intelqa$intelqa_opt=/dir/])],
- [BUILD_INTEL_QAT_VERSION=1])
- ])
-
- AC_MSG_RESULT([yes])
-
- AS_IF([test "x$BUILD_INTEL_QAT_VERSION" = "x1"],
- [LIB_ADD="-ladf_proxy -losal -lrt $LIB_ADD"],
- [LIB_ADD="-losal -lrt $LIB_ADD"])
- CPPFLAGS="$OLD_CPPFLAGS"
-])
-
-
-# Single Precision maths implementation
-AC_ARG_ENABLE([sp],
- [AS_HELP_STRING([--enable-sp],[Enable Single Precision maths implementation (default: disabled)])],
- [ ENABLED_SP=$enableval ],
- [ ENABLED_SP=no ],
- )
-
-ENABLED_SP_RSA=no
-ENABLED_SP_DH=no
-ENABLED_SP_FF_2048=no
-ENABLED_SP_FF_3072=no
-ENABLED_SP_FF_4096=no
-ENABLED_SP_ECC=no
-ENABLED_SP_EC_256=no
-ENABLED_SP_EC_384=no
-ENABLED_SP_NO_MALLOC=no
-ENABLED_SP_NONBLOCK=no
-for v in `echo $ENABLED_SP | tr "," " "`
-do
- case $v in
- small)
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_2048=yes
- ENABLED_SP_FF_3072=yes
- ENABLED_SP_ECC=yes
- ENABLED_SP_SMALL=yes
- ENABLED_SP_EC_256=yes
- if test "$host_cpu" = "x86_64"; then
- ENABLED_SP_FF_4096=yes
- ENABLED_SP_EC_384=yes
- fi
- ;;
-
- yes)
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_2048=yes
- ENABLED_SP_FF_3072=yes
- ENABLED_SP_ECC=yes
- ENABLED_SP_EC_256=yes
- if test "$host_cpu" = "x86_64"; then
- ENABLED_SP_FF_4096=yes
- ENABLED_SP_EC_384=yes
- fi
- ;;
-
- no)
- ;;
-
- smallec256 | smallp256 | small256)
- ENABLED_SP_ECC=yes
- ENABLED_SP_SMALL=yes
- ENABLED_SP_EC_256=yes
- ;;
- ec256 | p256 | 256)
- ENABLED_SP_ECC=yes
- ENABLED_SP_EC_256=yes
- ;;
- smallec384 | smallp384 | small384)
- ENABLED_SP_ECC=yes
- ENABLED_SP_SMALL=yes
- ENABLED_SP_EC_384=yes
- ;;
- ec384 | p384 | 384)
- ENABLED_SP_ECC=yes
- ENABLED_SP_EC_384=yes
- ;;
-
- small2048)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_2048=yes
- ;;
- 2048)
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_2048=yes
- ;;
- smallrsa2048)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_2048=yes
- ;;
- rsa2048)
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_2048=yes
- ;;
-
- small3072)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_3072=yes
- ;;
- 3072)
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_3072=yes
- ;;
- smallrsa3072)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_3072=yes
- ;;
- rsa3072)
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_3072=yes
- ;;
-
- small4096)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_4096=yes
- ;;
- 4096 | +4096)
- ENABLED_SP_RSA=yes
- ENABLED_SP_DH=yes
- ENABLED_SP_FF_4096=yes
- ;;
- smallrsa4096)
- ENABLED_SP_SMALL=yes
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_4096=yes
- ;;
- rsa4096)
- ENABLED_SP_RSA=yes
- ENABLED_SP_FF_4096=yes
- ;;
-
- nomalloc)
- ENABLED_SP_NO_MALLOC=yes
- ;;
-
- nonblock)
- # Requires small and no malloc
- ENABLED_SP_NONBLOCK=yes
- ENABLED_SP_NO_MALLOC=yes
- ENABLED_SP_SMALL=yes
- ;;
-
- *)
- AC_MSG_ERROR([Invalid choice of Single Precision length in bits [256, 2048, 3072]: $ENABLED_SP.])
- break;;
- esac
-done
-
-ENABLED_SP=no
-if test "$ENABLED_RSA" = "yes" && test "$ENABLED_SP_RSA" = "yes"; then
- ENABLED_SP=yes
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_SP_RSA"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_HAVE_SP_RSA"
-fi
-if test "$ENABLED_DH" = "yes" && test "$ENABLED_SP_DH" = "yes"; then
- ENABLED_SP=yes
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_SP_DH"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_HAVE_SP_DH"
-fi
-if test "$ENABLED_SP_RSA" = "yes" || test "$ENABLED_SP_DH" = "yes"; then
- if test "$ENABLED_SP_FF_2048" = "no"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NO_2048"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NO_2048"
- fi
- if test "$ENABLED_SP_FF_3072" = "no"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NO_3072"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NO_3072"
- fi
- if test "$ENABLED_SP_FF_4096" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_4096"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_4096"
- fi
-fi
-if test "$ENABLED_ECC" != "no" && test "$ENABLED_SP_ECC" = "yes"; then
- ENABLED_SP=yes
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_SP_ECC"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_HAVE_SP_ECC"
- if test "$ENABLED_SP_EC_256" = "no"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NO_256"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NO_256"
- fi
- if test "$ENABLED_SP_EC_384" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC384 -DWOLFSSL_SP_384"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_384"
- fi
-fi
-if test "$ENABLED_SP_SMALL" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_SMALL"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_SMALL"
-fi
-if test "$ENABLED_SP_NO_MALLOC" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NO_MALLOC"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NO_MALLOC"
-fi
-if test "$ENABLED_SP_NONBLOCK" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NONBLOCK"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NONBLOCK"
-fi
-
-
-AC_ARG_ENABLE([sp-asm],
- [AS_HELP_STRING([--enable-sp-asm],[Enable Single Precision assembly implementation (default: disabled)])],
- [ ENABLED_SP_ASM=$enableval ],
- [ ENABLED_SP_ASM=no ],
- )
-if test "$ENABLED_SP_ASM" = "yes"; then
- if test "$ENABLED_SP" = "no"; then
- AC_MSG_ERROR([Must have SP enabled: --enable-sp])
- fi
- if test "$ENABLED_SP_NONBLOCK" = "yes"; then
- AC_MSG_ERROR([SP non-blocking not supported with sp-asm])
- fi
- if test "$ENABLED_ASM" = "no"; then
- AC_MSG_ERROR([Assembly code turned off])
- fi
-
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_ASM"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ASM"
- case $host_cpu in
- *aarch64*)
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_ARM64_ASM"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ARM64_ASM"
- ENABLED_SP_ARM64_ASM=yes
- ;;
- *arm*)
- if test $host_alias = "thumb"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_ARM_THUMB_ASM -mthumb -march=armv6"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ARM_THUMB_ASM"
- ENABLED_SP_ARM_THUMB_ASM=yes
- else
- if test $host_alias = "cortex"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_ARM_CORTEX_M_ASM -mcpu=cortex-r5"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ARM_CORTEX_M_ASM"
- ENABLED_SP_ARM_CORTEX_ASM=yes
- else
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_ARM32_ASM"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ARM32_ASM"
- ENABLED_SP_ARM32_ASM=yes
- fi
- fi
- ;;
- *x86_64*)
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_X86_64_ASM"
- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_X86_64_ASM"
- ENABLED_SP_X86_64_ASM=yes
- ;;
- *)
- AC_MSG_ERROR([ASM not available for CPU. Supported CPUs: x86_64, aarch64, arm])
- ;;
- esac
-fi
-
-AC_ARG_ENABLE([sp-math],
- [AS_HELP_STRING([--enable-sp-math],[Enable Single Precision math implementation only (default: disabled)])],
- [ ENABLED_SP_MATH=$enableval ],
- [ ENABLED_SP_MATH=no ],
- )
-if test "$ENABLED_SP_MATH" = "yes"; then
- if test "$ENABLED_SP" = "no"; then
- AC_MSG_ERROR([Must have SP enabled: --enable-sp])
- fi
- if test "$ENABLED_ECCCUSTCURVES" = "yes"; then
- AC_MSG_ERROR([Cannot use single precision math and custom curves])
- fi
- if test "$ENABLED_OPENSSLEXTRA" = "yes"; then
- AC_MSG_ERROR([Cannot use single precision math and OpenSSL extra])
- fi
- if test "$ENABLED_DSA" = "yes"; then
- AC_MSG_ERROR([Cannot use single precision math and DSA])
- fi
- if test "$ENABLED_SRP" = "yes"; then
- AC_MSG_ERROR([Cannot use single precision math and SRP])
- fi
- if test "$ENABLED_SP_RSA" = "no" && test "$ENABLED_RSA" = "yes"; then
- AC_MSG_ERROR([Cannot use RSA single precision only math and RSA])
- fi
- if test "$ENABLED_SP_DH" = "no" && test "$ENABLED_DH" = "yes"; then
- AC_MSG_ERROR([Cannot use DH single precision only math and DH])
- fi
-
- ENABLED_FASTMATH="no"
- ENABLED_SLOWMATH="no"
-fi
-if test "$ENABLED_SP_MATH" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_MATH"
-fi
-
-
-# Fast RSA using Intel IPP
-ippdir="${srcdir}/IPP"
-ipplib="lib" # if autoconf guesses 32bit system changes lib directory
-fastRSA_found=no
-abs_path=`pwd`
-
-# set up variables used
-IPPLIBS=
-IPPHEADERS=
-IPPLINK=
-
-AC_ARG_ENABLE([fast-rsa],
- [AS_HELP_STRING([--enable-fast-rsa],[Enable RSA using Intel IPP (default: disabled)])],
- [ ENABLED_FAST_RSA=$enableval ],
- [ ENABLED_FAST_RSA=no ],
- )
-
-# Fast RSA does not support RSA-PSS
-if test "$ENABLED_RSAPSS" = "yes"; then
- ENABLED_FAST_RSA=no
-fi
-
-if test "$ENABLED_USER_RSA" = "no" && test "$ENABLED_FIPS" = "no"; then
-
- if test "$ac_cv_sizeof_long" = "4" && test "$ac_cv_sizeof_long_long" = "8"; then
- ipplib="lib_32" # 32 bit OS detected
- fi
-
-# Use static IPP Libraries
-if test "$enable_shared" = "no" && test "$ENABLED_FAST_RSA" = "yes"; then
- case $host_os in
- *darwin*)
- ipplib="$ipplib/mac_static"
- AC_MSG_ERROR([Issue with static linking to libippcp.a on Mac.
- Dynamic IPP libraries supported on Mac])
- break;;
-
- *linux*)
- ipplib="$ipplib/linux_static"
- break;;
- *)
- ENABLED_FAST_RSA=no
- esac
-
- AC_CHECK_FILES([$srcdir/IPP/$ipplib/libippcore.a $srcdir/IPP/$ipplib/libippcp.a], [], [ENABLED_FAST_RSA=no])
- AC_CHECK_FILES([$srcdir/IPP/include/ipp.h $srcdir/IPP/include/ippcp.h], [AM_CPPFLAGS="-I$srcdir/IPP/include $AM_CPPFLAGS"], [ENABLED_FAST_RSA=no])
- LIB_STATIC_ADD="$srcdir/IPP/$ipplib/libippcp.a $srcdir/IPP/$ipplib/libippcore.a $LIB_STATIC_ADD"
- if test "$ENABLED_FAST_RSA" = "no"; then
- AC_MSG_ERROR([Could not find fast rsa libraries])
- fi
-else
-
-# Check for and use bundled IPP libraries
-if test "$ENABLED_FAST_RSA" = "yes"; then
- AC_MSG_NOTICE([Using local IPP crypto library])
-
- AC_CHECK_FILES([$abs_path/IPP/include/ippcp.h],
- [
- # build and default locations on linux and mac
- STORE_LDFLAGS=${LDFLAGS}
- STORE_CPPFLAGS=${CPPFLAGS}
-
- # using LDFLAGS instead of AM_ temporarily to test link to library
- LDFLAGS="-L$ippdir/$ipplib -lippcp -lippcore"
- CPPFLAGS="-I$ippdir/include"
- AC_CHECK_HEADERS([ippcp.h], [AC_CHECK_LIB([ippcp], [ippsRSAEncrypt_PKCSv15], [fastRSA_found=yes], [fastRSA_found=no])], [fastRSA_found=no])
- name="$ippdir/$ipplib/libippcp"
- case $host_os in
- *darwin*)
- # check file existence and conditionally set variables
- AC_CHECK_FILES([$abs_path/IPP/$ipplib/libippcp.dylib], [
- IPPLIBS="${name}.dylib ${name}-9.0.dylib ${name}e9-9.0.dylib ${name}g9-9.0.dylib ${name}h9-9.0.dylib ${name}k0-9.0.dylib ${name}l9-9.0.dylib ${name}n8-9.0.dylib ${name}p8-9.0.dylib ${name}s8-9.0.dylib ${name}y8-9.0.dylib IPP/lib/libippcore.dylib IPP/lib/libippcore-9.0.dylib"
- IPPLINK="mkdir -p src/.libs && ln -f ${name}.dylib src/.libs/libippcp.dylib && ln -f ${srcdir}/${name}-9.0.dylib src/.libs/libippcp-9.0.dylib && ln -f ${srcdir}/${name}e9-9.0.dylib src/.libs/libippcpe9-9.0.dylib && ln -f ${srcdir}/${name}g9-9.0.dylib src/.libs/libippcpg9-9.0.dylib && ln -f ${srcdir}/${name}h9-9.0.dylib src/.libs/libippcph9-9.0.dylib && ln -f ${srcdir}/${name}k0-9.0.dylib src/.libs/libippcpk0-9.0.dylib && ln -f ${srcdir}/${name}l9-9.0.dylib src/.libs/libippcpl9-9.0.dylib && ln -f ${srcdir}/${name}n8-9.0.dylib src/.libs/libippcpn8-9.0.dylib && ln -f ${srcdir}/${name}p8-9.0.dylib src/.libs/libippcpp8-9.0.dylib && ln -f ${srcdir}/${name}s8-9.0.dylib src/.libs/libippcps8-9.0.dylib && ln -f ${srcdir}/${name}y8-9.0.dylib src/.libs/libippcpy8-9.0.dylib && ln -f ${srcdir}/IPP/lib/libippcore.dylib src/.libs/libippcore.dylib && ln -f ${srcdir}/IPP/lib/libippcore-9.0.dylib src/.libs/libippcore-9.0.dylib"
- ], [fastRSA_found=no])
- break;;
-
- *linux*)
- # check file existence and conditionally set variables
- AC_CHECK_FILES([$abs_path/IPP/$ipplib/libippcp.so.9.0], [
- if test "$ac_cv_sizeof_long" = "4" && test "$ac_cv_sizeof_long_long" = "8"; then
- IPPLIBS="${name}.so.9.0 ${name}g9.so.9.0 ${name}h9.so.9.0 ${name}p8.so.9.0 ${name}px.so.9.0 ${name}s8.so.9.0 ${name}.so ${name}w7.so.9.0 IPP/$ipplib/libippcore.so IPP/$ipplib/libippcore.so.9.0"
- IPPLINK="mkdir -p src/.libs && ln -f ${name}.so.9.0 src/.libs/libippcp.so.9.0 && ln -f ${name}g9.so.9.0 src/.libs/libippcpg9.so.9.0 && ln -f ${name}h9.so.9.0 src/.libs/libippcph9.so.9.0 && ln -f ${name}p8.so.9.0 src/.libs/libippcpp8.so.9.0 && ln -f ${name}px.so.9.0 src/.libs/libippcppx.so.9.0 && ln -f ${name}s8.so.9.0 src/.libs/libippcps8.so.9.0 && ln -f ${name}.so src/.libs/libippcp.so && ln -f ${name}w7.so.9.0 src/.libs/libippcpw7.so.9.0 && ln -f IPP/$ipplib/libippcore.so src/.libs/libippcore.so && ln -f IPP/$ipplib/libippcore.so.9.0 src/.libs/libippcore.so.9.0"
- else
- IPPLIBS="${name}.so.9.0 ${name}e9.so.9.0 ${name}k0.so.9.0 ${name}l9.so.9.0 ${name}m7.so.9.0 ${name}mx.so.9.0 ${name}.so ${name}n8.so.9.0 ${name}y8.so.9.0 IPP/lib/libippcore.so IPP/lib/libippcore.so.9.0"
- IPPLINK="mkdir -p src/.libs && ln -f ${name}.so.9.0 src/.libs/libippcp.so.9.0 && ln -f ${name}e9.so.9.0 src/.libs/libippcpe9.so.9.0 && ln -f ${name}k0.so.9.0 src/.libs/libippcpk0.so.9.0 && ln -f ${name}l9.so.9.0 src/.libs/libippcpl9.so.9.0 && ln -f ${name}m7.so.9.0 src/.libs/libippcpm7.so.9.0 && ln -f ${name}mx.so.9.0 src/.libs/libippcpmx.so.9.0 && ln -f ${name}.so src/.libs/libippcp.so && ln -f ${name}n8.so.9.0 src/.libs/libippcpn8.so.9.0 && ln -f ${name}y8.so.9.0 src/.libs/libippcpy8.so.9.0 && ln -f IPP/lib/libippcore.so src/.libs/libippcore.so && ln -f IPP/lib/libippcore.so.9.0 src/.libs/libippcore.so.9.0"
- fi
- ], [fastRSA_found=no])
- break;;
- *)
- fastRSA_found=no
- esac
-
- if test "$fastRSA_found" = "yes"; then
- # was succesfull so add tested LDFLAGS to AM_ flags
- AM_LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}"
- AM_CPPFLAGS="${AM_CPPFLAGS} ${CPPFLAGS}"
- IPPHEADERS="${srcdir}/IPP/include/*.h"
- fi
-
- # restore LDFLAGS to user set
- LDFLAGS=${STORE_LDFLAGS}
- CPPFLAGS=${STORE_CPPFLAGS}
- ], [fastRSA_found=no])
-fi
-
-# Don't cache the result so it can be checked
-AS_UNSET([ac_cv_header_ippcp_h])
-AS_UNSET([ac_cv_header_ipp_h])
-AS_UNSET([ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15]);
-
-# Check link and see if user has pre-existing IPP Libraries if not using local
-if test "$ENABLED_FAST_RSA" = "yes" && test "$fastRSA_found" = "no"; then
- AC_MSG_NOTICE([Checking if IPP crypto library installed])
- AC_CHECK_HEADER([ippcp.h], [AC_CHECK_LIB([ippcp], [ippsRSAEncrypt_PKCSv15],
- [
- fastRSA_found=yes
- AM_LDFLAGS="${AM_LDFLAGS} -lippcore -lippcp"
- ], [ fastRSA_found=no])
- ], [fastRSA_found=no])
-
- # Error out on not finding libraries
- if test "$fastRSA_found" = "no"; then
- AC_MSG_ERROR([Could not find fast rsa libraries])
- fi
-fi
-fi # end of if for shared library
-else # if user rsa is set than do not use fast rsa option
- if test "$ENABLED_FAST_RSA" = "yes"; then
- AC_MSG_ERROR([Could not use fast rsa libraries with user crypto or fips])
- fi
-fi # end of if for user rsa crypto or fips
-
-# End result of checking for IPP Libraries
-AC_MSG_CHECKING([for fast RSA])
-if test "$ENABLED_FAST_RSA" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FAST_RSA -DHAVE_USER_RSA"
- # add in user crypto header that uses Intel IPP
- AM_CPPFLAGS="$AM_CPPFLAGS -I$srcdir/wolfcrypt/user-crypto/include"
- if test "$enable_shared" = "yes"; then
- LIBS="$LIBS -lippcore -lippcp"
- LIB_ADD="-lippcp -lippcore $LIB_ADD"
- else
- LIB_ADD="$srcdir/IPP/$ipplib/libippcp.a $srcdir/IPP/$ipplib/libippcore.a $LIB_ADD"
- fi
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST([IPPLIBS])
-AC_SUBST([IPPHEADERS])
-AC_SUBST([IPPLINK])
-
-
-# static memory use
-AC_ARG_ENABLE([staticmemory],
- [AS_HELP_STRING([--enable-staticmemory],[Enable static memory use (default: disabled)])],
- [ ENABLED_STATICMEMORY=$enableval ],
- [ ENABLED_STATICMEMORY=no ]
- )
-
-if test "x$ENABLED_STATICMEMORY" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_STATIC_MEMORY"
- if test "x$ENABLED_FASTMATH" = "xno"
- then
- AC_MSG_ERROR([please use --enable-fastmath if enabling staticmemory.])
- fi
- if test "$ENABLED_LOWRESOURCE" = "yes" && test "$ENABLED_RSA" = "no"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_STATIC_MEMORY_SMALL"
- fi
-fi
-
-
-# microchip api
-AC_ARG_ENABLE([mcapi],
- [AS_HELP_STRING([--enable-mcapi],[Enable Microchip API (default: disabled)])],
- [ ENABLED_MCAPI=$enableval ],
- [ ENABLED_MCAPI=no ]
- )
-
-if test "$ENABLED_MCAPI" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_MCAPI"
- if test "x$ENABLED_AESCTR" != "xyes"
- then
- # These flags are already implied by --enable-aesctr
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_COUNTER -DWOLFSSL_AES_DIRECT"
- fi
-fi
-
-if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_SHA512" = "no"
-then
- AC_MSG_ERROR([please enable sha512 if enabling mcapi.])
-fi
-
-if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_ECC" = "no"
-then
- AC_MSG_ERROR([please enable ecc if enabling mcapi.])
-fi
-
-if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_LIBZ" = "no"
-then
- AC_MSG_ERROR([please use --with-libz if enabling mcapi.])
-fi
-
-
-# Asynchronous Crypto
-AC_ARG_ENABLE([asynccrypt],
- [AS_HELP_STRING([--enable-asynccrypt],[Enable Asynchronous Crypto (default: disabled)])],
- [ ENABLED_ASYNCCRYPT=$enableval ],
- [ ENABLED_ASYNCCRYPT=no ]
- )
-
-if test "$ENABLED_ASYNCCRYPT" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ASYNC_CRYPT -DHAVE_WOLF_EVENT -DHAVE_WOLF_BIGINT -DWOLFSSL_NO_HASH_RAW"
-
- # if no async hardware then use simulator for testing
- if test "x$ENABLED_CAVIUM" = "xno" && test "x$ENABLED_INTEL_QA" = "xno"
- then
- # Async threading is Linux specific
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ASYNC_CRYPT_TEST"
- fi
-fi
-
-
-# check for async if using Intel QuckAssist or Cavium
-if test "x$ENABLED_INTEL_QA" = "xyes" || test "x$ENABLED_CAVIUM" = "xyes" ; then
- if test "x$ENABLED_ASYNCCRYPT" = "xno" ; then
- AC_MSG_ERROR([Please enable asynchronous support using --enable-asynccrypt])
- fi
-fi
-
-
-# Asynchronous threading
-AC_ARG_ENABLE([asyncthreads],
- [AS_HELP_STRING([--enable-asyncthreads],[Enable Asynchronous Threading (default: enabled)])],
- [ ENABLED_ASYNCTHREADS=$enableval ],
- [ ENABLED_ASYNCTHREADS=yes ]
- )
-
-if test "$ENABLED_ASYNCCRYPT" = "yes" && test "$ENABLED_ASYNCTHREADS" = "yes"
-then
- AX_PTHREAD([ENABLED_ASYNCTHREADS=yes],[ENABLED_ASYNCTHREADS=no])
-else
- ENABLED_ASYNCTHREADS=no
-fi
-
-if test "$ENABLED_ASYNCTHREADS" = "yes"
-then
- LIB_ADD="-lpthread $LIB_ADD"
- AM_CFLAGS="$AM_CFLAGS -D_GNU_SOURCE"
-else
- AM_CFLAGS="$AM_CFLAGS -DWC_NO_ASYNC_THREADING"
-fi
-
-
-# cryptodev is old name, replaced with cryptocb
-AC_ARG_ENABLE([cryptodev],
- [AS_HELP_STRING([--enable-cryptodev],[DEPRECATED, use cryptocb instead])],
- [ ENABLED_CRYPTOCB=$enableval ],[ ENABLED_CRYPTOCB=no ])
-
-# Support for crypto callbacks
-AC_ARG_ENABLE([cryptocb],
- [AS_HELP_STRING([--enable-cryptocb],[Enable crypto callbacks (default: disabled)])],
- [ ENABLED_CRYPTOCB=$enableval ],
- [ ENABLED_CRYPTOCB=no ]
- )
-
-if test "x$ENABLED_PKCS11" = "xyes"
-then
- ENABLED_CRYPTOCB=yes
-fi
-if test "$ENABLED_CRYPTOCB" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLF_CRYPTO_CB"
-fi
-
-
-# Session Export
-AC_ARG_ENABLE([sessionexport],
- [AS_HELP_STRING([--enable-sessionexport],[Enable export and import of sessions (default: disabled)])],
- [ ENABLED_SESSIONEXPORT=$enableval ],
- [ ENABLED_SESSIONEXPORT=no ]
- )
-
-if test "$ENABLED_SESSIONEXPORT" = "yes" ||
- test "$ENABLED_SESSIONEXPORT" = "nopeer"
-then
- if test "$ENABLED_DTLS" = "no"
- then
- AC_MSG_ERROR([Only DTLS supported with session export])
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SESSION_EXPORT"
-
- if test "$ENABLED_SESSIONEXPORT" = "nopeer"
- then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SESSION_EXPORT_NOPEER"
- fi
-fi
-
-
-# AES key wrap
-AC_ARG_ENABLE([aeskeywrap],
- [AS_HELP_STRING([--enable-aeskeywrap],[Enable AES key wrap support (default: disabled)])],
- [ ENABLED_AESKEYWRAP=$enableval ],
- [ ENABLED_AESKEYWRAP=no ]
- )
-
-if test "$ENABLED_WPAS" = "yes" && test "$ENABLED_FIPS" = "no"
-then
- ENABLED_AESKEYWRAP="yes"
-fi
-
-if test "$ENABLED_AESKEYWRAP" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_KEYWRAP -DWOLFSSL_AES_DIRECT"
-fi
-
-
-# Old name support for backwards compatibility
-AC_ARG_ENABLE([oldnames],
- [AS_HELP_STRING([--enable-oldnames],[Keep backwards compat with old names (default: enabled)])],
- [ ENABLED_OLDNAMES=$enableval ],
- [ ENABLED_OLDNAMES=yes ]
- )
-
-if test "x$ENABLED_OLDNAMES" = "xno" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_OLD_RNGNAME -DNO_OLD_WC_NAMES -DNO_OLD_SSL_NAMES"
- AM_CFLAGS="$AM_CFLAGS -DNO_OLD_SHA_NAMES"
-fi
-
-
-# Memory Tests
-AC_ARG_ENABLE([memtest],
- [AS_HELP_STRING([--enable-memtest],[Memory testing option, for internal use (default: disabled)])],
- [ ENABLED_MEMTEST=$enableval ],
- [ ENABLED_MEMTEST=no ]
- )
-
-if test "x$ENABLED_MEMTEST" != "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY -DWOLFSSL_FORCE_MALLOC_FAIL_TEST"
-fi
-
-
-# Enable hash flags support
-# Hash flags are useful for runtime options such as SHA3 KECCAK256 selection
-AC_ARG_ENABLE([hashflags],
- [AS_HELP_STRING([--enable-hashflags],[Enable support for hash flags (default: disabled)])],
- [ ENABLED_HASHFLAGS=$enableval ],
- [ ENABLED_HASHFLAGS=no ]
- )
-
-if test "x$ENABLED_HASHFLAGS" != "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HASH_FLAGS"
-fi
-
-# Support for enabling setting default DH parameters in
-AC_ARG_ENABLE([defaultdhparams],
- [AS_HELP_STRING([--enable-dhdefaultparams],[Enables option for default dh parameters (default: disabled)])],
- [ ENABLED_DHDEFAULTPARAMS=$enableval ],
- [ ENABLED_DHDEFAULTPARAMS=no ]
- )
-if test "$ENABLED_DHDEFAULTPARAMS" = "yes" || test "$ENABLED_QT" = "no"
-then
- ENABLED_DHDEFAULTPARAMS=yes
- AM_CFLAGS="$AM_CFLAGS -DHAVE_DH_DEFAULT_PARAMS"
-fi
-
-# User Settings
-AC_ARG_ENABLE([usersettings],
- [AS_HELP_STRING([--enable-usersettings],[Use your own user_settings.h and do not add Makefile CFLAGS (default: disabled)])],
- [ ENABLED_USERSETTINGS=$enableval ],
- [ ENABLED_USERSETTINGS=no ]
- )
-
-
-# Default optimization CFLAGS enable
-AC_ARG_ENABLE([optflags],
- [AS_HELP_STRING([--enable-optflags],[Enable default optimization CFLAGS for the compiler (default: enabled)])],
- [ ENABLED_OPTFLAGS=$enableval ],
- [ ENABLED_OPTFLAGS=yes ]
- )
-
-
-# check if should run the trusted peer certs test
-# (for now checking both C_FLAGS and C_EXTRA_FLAGS)
-AS_CASE(["$CFLAGS $CPPFLAGS"],[*'WOLFSSL_TRUST_PEER_CERT'*],[ENABLED_TRUSTED_PEER_CERT=yes])
-
-
-# dertermine if we have key validation mechanism
-if test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_RSA" = "xyes"
-then
- if test "x$ENABLED_ASN" = "xyes"
- then
- ENABLED_PKI="yes"
- fi
-fi
-
-
-# When building for wolfRand, strip out all options to disable everything.
-AS_IF([test "x$ENABLED_FIPS" = "xyes" && test "x$FIPS_VERSION" = "xrand"],
-[NEW_AM_CFLAGS="-DNO_AES -DNO_DH -DNO_ASN -DNO_RSA -DNO_SHA -DNO_MD5 -DNO_BIG_INT"
-for v in $AM_CFLAGS
-do
- case $v in
--DHAVE_FFDHE_2048 | -DTFM_TIMING_RESISTANT | -DECC_TIMING_RESISTANT | \
--DWC_RSA_BLINDING | -DHAVE_AESGCM | -DWOLFSSL_SHA512 | -DWOLFSSL_SHA384 | \
--DHAVE_ECC | -DTFM_ECC256 | -DECC_SHAMIR | -DHAVE_TLS_EXTENSIONS | \
--DHAVE_SUPPORTED_CURVES | -DHAVE_EXTENDED_MASTER | -DUSE_FAST_MATH)
- AS_ECHO(["ignoring $v"])
- ;;
- *)
- NEW_AM_CFLAGS="$NEW_AM_CFLAGS $v"
- ;;
- esac
-done
-AM_CFLAGS=$NEW_AM_CFLAGS])
-
-
-################################################################################
-# Check for build-type conflicts #
-################################################################################
-
-AS_IF([test "x$ENABLED_MAXSTRENGTH" = "xyes" && \
- test "x$ENABLED_LEANPSK" = "xyes"],
- [AC_MSG_ERROR([Cannot use Max Strength and Lean PSK at the same time.])])
-
-AS_IF([test "x$ENABLED_OCSP" = "xyes" && \
- test "x$ENABLED_ASN" = "xno"],
- [AC_MSG_ERROR([please enable asn if enabling ocsp.])])
-
-AS_IF([test "x$ENABLED_OCSP" = "xyes" && \
- test "x$ENABLED_RSA" = "xno" && \
- test "x$ENABLED_ECC" = "xno"],
- [AC_MSG_ERROR([please enable rsa or ecc if enabling ocsp.])])
-
-# Sync Intel QA and Sync Cavium Octeon require the crypto callback
-AS_IF([test "x$ENABLED_INTEL_QA_SYNC" = "xyes" || test "x$ENABLED_OCTEON_SYNC" = "xyes"],
- [AS_IF([test "x$ENABLED_CRYPTOCB" = "xno"],
- [AC_MSG_ERROR([please enable the crypto callback support using --enable-cryptocb])])])
-
-# checks for pkcs7 needed enables
-AS_IF([test "x$ENABLED_PKCS7" = "xyes" && \
- test "x$ENABLED_RSA" = "xno" && \
- test "x$ENABLED_ECC" = "xno"],
- [AC_MSG_ERROR([please enable ecc or rsa if enabling pkcs7.])])
-
-AS_IF([test "x$ENABLED_PKCS7" = "xyes" && \
- test "x$ENABLED_SHA" = "xno"],
- [AC_MSG_ERROR([please enable sha if enabling pkcs7.])])
-
-AS_IF([test "x$ENABLED_PKCS7" = "xyes" && \
- test "x$ENABLED_AES" = "xno" && \
- test "x$ENABLED_DES3" = "xno"],
- [AC_MSG_ERROR([please enable either AES or 3DES if enabling pkcs7.])])
-
-AS_IF([test "x$ENABLED_WOLFSCEP" = "xyes" && \
- test "x$ENABLED_AES" = "xno" && \
- test "x$ENABLED_DES3" = "xno"],
- [AC_MSG_ERROR([please enable either AES or 3DES if enabling scep.])])
-
-AS_IF([test "x$ENABLED_LEANTLS" = "xyes" && \
- test "x$ENABLED_ECC" = "xno"],
- [AC_MSG_ERROR([please enable ecc if enabling leantls.])])
-
-AS_IF([test "x$ENABLED_SNIFFER" = "xyes" && \
- test "x$ENABLED_RSA" = "xno" && \
- test "x$ENABLED_ECC" = "xno"],
- [AC_MSG_ERROR([please enable ecc or rsa if enabling sniffer.])])
-
-# Lean TLS forces off prereqs of SCEP.
-AS_IF([test "x$ENABLED_SCEP" = "xyes" && \
- test "x$ENABLED_LEANTLS" = "xyes"],
- [AC_MSG_ERROR([Cannot use SCEP and Lean TLS at the same time.])])
-
-# CMAC currently requires AES.
-AS_IF([test "x$ENABLED_CMAC" = "xyes" && \
- test "x$ENABLED_AES" = "xno"],
- [AC_MSG_ERROR([cannot use CMAC without AES.])])
-
-################################################################################
-# Update CFLAGS based on options #
-################################################################################
-
-AS_IF([test "x$ENABLED_MCAPI" = "xyes"],
- [AS_IF([test "x$ENABLED_DES3" = "xno"],[ENABLED_DES3="yes"])])
-
-if test "$ENABLED_WOLFSCEP" = "yes"
-then
- # Enable prereqs if not already enabled
- if test "x$ENABLED_KEYGEN" = "xno"
- then
- ENABLED_KEYGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN"
- fi
- if test "x$ENABLED_CERTGEN" = "xno"
- then
- ENABLED_CERTGEN="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
- fi
- if test "x$ENABLED_CERTREQ" = "xno"
- then
- ENABLED_CERTREQ="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_REQ"
- fi
- if test "x$ENABLED_CERTEXT" = "xno"
- then
- ENABLED_CERTEXT="yes"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_EXT"
- fi
- if test "x$ENABLED_PKCS7" = "xno"
- then
- ENABLED_PKCS7="yes"
- fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_WOLFSCEP"
-fi
-#if test "$ENABLED_SP_MATH" = "yes" && test "$ENABLED_KEYGEN" = "yes"; then
-# AC_MSG_ERROR([Cannot use single precision math and key generation])
-#fi
-
-if test "x$ENABLED_PKCS7" = "xyes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7"
- # Enable prereqs if not already enabled
- if test "x$ENABLED_AESKEYWRAP" = "xno"
- then
- ENABLED_AESKEYWRAP="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_KEYWRAP -DWOLFSSL_AES_DIRECT"
- fi
- if test "x$ENABLED_X963KDF" = "xno" && test "$ENABLED_ECC" != "no"
- then
- ENABLED_X963KDF="yes"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_X963_KDF"
- fi
-fi
-
-if test "x$ENABLED_DES3" = "xno"
-then
- AM_CFLAGS="$AM_CFLAGS -DNO_DES3"
-else
- # turn off DES3 if leanpsk or leantls on
- if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_LEANTLS" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS -DNO_DES3"
- ENABLED_DES3=no
- fi
-fi
-
-
-AS_IF([test "x$ENABLED_MAXSTRENGTH" = "xyes"],
- [AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_MAX_STRENGTH"])
-
-AS_IF([test "x$ENABLED_MAXSTRENGTH" = "xyes" && \
- test "x$ENABLED_OLD_TLS" = "xyes"],
- [AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS"
- ENABLED_OLD_TLS=no])
-
-AS_IF([test "x$ENABLED_MAXSTRENGTH" = "xyes" && \
- test "x$ENABLED_SSLV3" = "xyes"],
- [AC_MSG_ERROR([Cannot use Max Strength and SSLv3 at the same time.])])
-
-AS_IF([test "x$ENABLED_SCTP" = "xyes"],
- [AM_CFLAGS="-DWOLFSSL_SCTP $AM_CFLAGS"])
-
-AS_IF([test "x$ENABLED_MCAST" = "xyes"],
- [AM_CFLAGS="-DWOLFSSL_MULTICAST $AM_CFLAGS"])
-
-# WOLFSSL_AFALG does not support SHA224 yet
-AS_IF([(test "x$ENABLED_AFALG" = "xyes") && (test "x$ENABLED_SHA224" = "xyes")],
- [AC_MSG_ERROR([--enable-sha224 with --enable-afalg not yet supported])])
-
-# WOLFSSL_DEVCRYPTO does not support SHA224 yet
-AS_IF([(test "x$ENABLED_DEVCRYPTO" = "xyes") && (test "x$ENABLED_SHA224" = "xyes")],
- [AC_MSG_ERROR([--enable-sha224 with --enable-devcrypto not yet supported])])
-
-# SCTP and Multicast require DTLS
-AS_IF([(test "x$ENABLED_DTLS" = "xno") && \
- (test "x$ENABLED_SCTP" = "xyes" || test "x$ENABLED_MCAST" = "xyes")],
- [AM_CFLAGS="-DWOLFSSL_DTLS $AM_CFLAGS"
- ENABLED_DTLS=yes])
-
-# Multicast requires the null cipher
-AS_IF([test "x$ENABLED_NULL_CIPHER" = "xno" && \
- test "x$ENABLED_MCAST" = "xyes"],
- [AM_CFLAGS="-DHAVE_NULL_CIPHER $AM_CFLAGS"
- ENABLED_NULL_CIPHER=yes])
-
-# wolfSSH and WPA Supplicant both need Public MP, only enable once.
-# This will let you know if you enabled wolfSSH but have any of the prereqs
-# disabled. Some of these options, disabling them adds things to the FLAGS and
-# you need to check and add items in two places depending on the option.
-AS_IF([test "x$ENABLED_WOLFSSH" = "xyes"],
- [AS_IF([test "x$ENABLED_WPAS" = "xno"],[AM_CFLAGS="-DWOLFSSL_PUBLIC_MP $AM_CFLAGS"])
- AS_IF([test "x$ENABLED_AESGCM" = "xno"],[AC_MSG_ERROR([cannot enable wolfSSH with AES-GCM disabled])])
- AS_IF([test "x$ENABLED_ECC" = "xno"],[AC_MSG_ERROR([cannot enable wolfSSH with ECC disabled])])
- AS_IF([test "x$ENABLED_SHA" = "xno"],[AC_MSG_ERROR([cannot enable wolfSSH with SHA-1 disabled])])
- AS_IF([test "x$ENABLED_SHA512" = "xno"],[AC_MSG_ERROR([cannot enable wolfSSH with SHA-512/384 disabled])])
- ])
-
-if test "x$ENABLED_OPENSSLCOEXIST" = "xyes"; then
- if test "x$ENABLED_OPENSSLALL" = "xyes"; then
- AC_MSG_ERROR([Cannot use --enable-opensslcoexist with --enable-opensslall])
- fi
- if test "x$ENABLED_OPENSSLEXTRA" = "xyes"; then
- AC_MSG_ERROR([Cannot use --enable-opensslcoexist with --enable-opensslextra])
- fi
-fi
-################################################################################
-
-# USER SETTINGS
-if test "x$ENABLED_USERSETTINGS" = "xyes"
-then
- # Replace all options and just use WOLFSSL_USER_SETTINGS
- AM_CFLAGS="-DWOLFSSL_USER_SETTINGS"
-fi
-
-# OPTIMIZE FLAGS
-# For distro disable custom build options that interfere with symbol generation
-if test "$GCC" = "yes" && test "$ENABLED_DISTRO" = "no"
-then
- AM_CFLAGS="$AM_CFLAGS -Wall -Wno-unused"
- if test "$ax_enable_debug" = "no"
- then
- AS_IF([test "x$ENABLED_OPTFLAGS" = "xyes"], [
- if test "$ENABLED_FASTMATH" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_FAST_CFLAGS"
- if test "$ENABLED_FASTHUGEMATH" = "yes"
- then
- AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_HUGE_CFLAGS"
- fi
- else
- AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_CFLAGS"
- fi
- ])
- fi
-fi
-
-# ICC command line warning for non supported warning flags
-if test "$CC" = "icc"
-then
- AM_CFLAGS="$AM_CFLAGS -wd10006"
-fi
-
-# Expose HAVE___UINT128_T to options flags"
-if test "$ac_cv_type___uint128_t" = "yes"
-then
- AM_CFLAGS="$AM_CFLAGS -DHAVE___UINT128_T=1"
-fi
-
-
-LIB_SOCKET_NSL
-AX_HARDEN_CC_COMPILER_FLAGS
-
-# if mingw then link to ws2_32 for sockets
-case $host_os in
- mingw*)
- LDFLAGS="$LDFLAGS -lws2_32"
- if test "$enable_shared" = "yes"
- then
- AC_DEFINE([WOLFSSL_DLL], [1], [Use __declspec(dllexport) when building library])
- if test "$enable_static" = "yes"
- then
- MINGW_LIB_WARNING="yes"
- fi
- fi ;;
-esac
-
-
-# The following AM_CONDITIONAL statements set flags for use in the Makefiles.
-# Some of these affect build targets and objects, some trigger different
-# test scripts for make check.
-AM_CONDITIONAL([BUILD_DISTRO],[test "x$ENABLED_DISTRO" = "xyes"])
-AM_CONDITIONAL([BUILD_ALL],[test "x$ENABLED_ALL" = "xyes"])
-AM_CONDITIONAL([BUILD_TLS13],[test "x$ENABLED_TLS13" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_RNG],[test "x$ENABLED_RNG" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SCTP],[test "x$ENABLED_SCTP" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_MCAST],[test "x$ENABLED_MCAST" = "xyes"])
-AM_CONDITIONAL([BUILD_IPV6],[test "x$ENABLED_IPV6" = "xyes"])
-AM_CONDITIONAL([BUILD_LEANPSK],[test "x$ENABLED_LEANPSK" = "xyes"])
-AM_CONDITIONAL([BUILD_LEANTLS],[test "x$ENABLED_LEANTLS" = "xyes"])
-AM_CONDITIONAL([BUILD_LOWMEM],[test "x$ENABLED_LOWRESOURCE" = "xyes"])
-AM_CONDITIONAL([BUILD_PKCALLBACKS], [ test "x$ENABLED_PKCALLBACKS" = "xyes"])
-AM_CONDITIONAL([BUILD_CRYPTOAUTHLIB],[test "x$ENABLED_CRYPTOAUTHLIB" = "xyes"])
-AM_CONDITIONAL([BUILD_SNIFFER], [ test "x$ENABLED_SNIFFER" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SNIFFTEST],[ test "x$ENABLED_SNIFFTEST" = "xyes"])
-AM_CONDITIONAL([BUILD_AESGCM],[test "x$ENABLED_AESGCM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_AESCCM],[test "x$ENABLED_AESCCM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_ARMASM],[test "x$ENABLED_ARMASM" = "xyes"])
-AM_CONDITIONAL([BUILD_XILINX],[test "x$ENABLED_XILINX" = "xyes"])
-AM_CONDITIONAL([BUILD_AESNI],[test "x$ENABLED_AESNI" = "xyes"])
-AM_CONDITIONAL([BUILD_INTELASM],[test "x$ENABLED_INTELASM" = "xyes"])
-AM_CONDITIONAL([BUILD_AFALG],[test "x$ENABLED_AFALG" = "xyes"])
-AM_CONDITIONAL([BUILD_DEVCRYPTO],[test "x$ENABLED_DEVCRYPTO" = "xyes"])
-AM_CONDITIONAL([BUILD_CAMELLIA],[test "x$ENABLED_CAMELLIA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_MD2],[test "x$ENABLED_MD2" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_RIPEMD],[test "x$ENABLED_RIPEMD" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_BLAKE2],[test "x$ENABLED_BLAKE2" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_BLAKE2S],[test "x$ENABLED_BLAKE2S" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SHA512],[test "x$ENABLED_SHA512" = "xyes" || test "x$ENABLED_SHA384" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_DSA],[test "x$ENABLED_DSA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_ECC],[test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_ED25519],[test "x$ENABLED_ED25519" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_ED25519_SMALL],[test "x$ENABLED_ED25519_SMALL" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_FEMATH], [test "x$ENABLED_FEMATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_GEMATH], [test "x$ENABLED_GEMATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_CURVE25519],[test "x$ENABLED_CURVE25519" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_CURVE25519_SMALL],[test "x$ENABLED_CURVE25519_SMALL" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_ED448],[test "x$ENABLED_ED448" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_ED448_SMALL],[test "x$ENABLED_ED448_SMALL" = "xyes"])
-AM_CONDITIONAL([BUILD_FE448], [test "x$ENABLED_FE448" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_GE448], [test "x$ENABLED_GE448" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_CURVE448],[test "x$ENABLED_CURVE448" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_CURVE448_SMALL],[test "x$ENABLED_CURVE448_SMALL" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_MEMORY],[test "x$ENABLED_MEMORY" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_RSA],[test "x$ENABLED_RSA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_DH],[test "x$ENABLED_DH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_ASN],[test "x$ENABLED_ASN" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_AES],[test "x$ENABLED_AES" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_CODING],[test "x$ENABLED_CODING" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_IDEA],[test "x$ENABLED_IDEA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_RC4],[test "x$ENABLED_ARC4" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_MD5],[test "x$ENABLED_MD5" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SHA],[test "x$ENABLED_SHA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_HC128],[test "x$ENABLED_HC128" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_RABBIT],[test "x$ENABLED_RABBIT" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_FIPS],[test "x$ENABLED_FIPS" = "xyes"])
-AM_CONDITIONAL([BUILD_FIPS_V1],[test "x$FIPS_VERSION" = "xv1"])
-AM_CONDITIONAL([BUILD_FIPS_V2],[test "x$FIPS_VERSION" = "xv2"])
-AM_CONDITIONAL([BUILD_FIPS_RAND],[test "x$FIPS_VERSION" = "xrand"])
-AM_CONDITIONAL([BUILD_CMAC],[test "x$ENABLED_CMAC" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SELFTEST],[test "x$ENABLED_SELFTEST" = "xyes"])
-AM_CONDITIONAL([BUILD_SHA224],[test "x$ENABLED_SHA224" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SHA3],[test "x$ENABLED_SHA3" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_POLY1305],[test "x$ENABLED_POLY1305" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_CHACHA],[test "x$ENABLED_CHACHA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_INLINE],[test "x$ENABLED_INLINE" = "xyes"])
-AM_CONDITIONAL([BUILD_OCSP],[test "x$ENABLED_OCSP" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_OCSP_STAPLING],[test "x$ENABLED_CERTIFICATE_STATUS_REQUEST" = "xyes"])
-AM_CONDITIONAL([BUILD_OCSP_STAPLING_V2],[test "x$ENABLED_CERTIFICATE_STATUS_REQUEST_V2" = "xyes"])
-AM_CONDITIONAL([BUILD_CRL],[test "x$ENABLED_CRL" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_CRL_MONITOR],[test "x$ENABLED_CRL_MONITOR" = "xyes"])
-AM_CONDITIONAL([BUILD_USER_RSA],[test "x$ENABLED_USER_RSA" = "xyes"] )
-AM_CONDITIONAL([BUILD_USER_CRYPTO],[test "x$ENABLED_USER_CRYPTO" = "xyes"])
-AM_CONDITIONAL([BUILD_NTRU],[test "x$ENABLED_NTRU" = "xyes"])
-AM_CONDITIONAL([BUILD_WNR],[test "x$ENABLED_WNR" = "xyes"])
-AM_CONDITIONAL([BUILD_SRP],[test "x$ENABLED_SRP" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([USE_VALGRIND],[test "x$ENABLED_VALGRIND" = "xyes"])
-AM_CONDITIONAL([BUILD_MD4],[test "x$ENABLED_MD4" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_PWDBASED],[test "x$ENABLED_PWDBASED" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SCRYPT],[test "x$ENABLED_SCRYPT" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_CRYPTONLY],[test "x$ENABLED_CRYPTONLY" = "xyes" && test "x$ENABLED_OPENSSLEXTRA" = "xno"])
-AM_CONDITIONAL([BUILD_FASTMATH],[test "x$ENABLED_FASTMATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SLOWMATH],[test "x$ENABLED_SLOWMATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_EXAMPLE_SERVERS],[test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_LEANTLS" = "xno"])
-AM_CONDITIONAL([BUILD_EXAMPLE_CLIENTS],[test "x$ENABLED_EXAMPLES" = "xyes"])
-AM_CONDITIONAL([BUILD_TESTS],[test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_LEANTLS" = "xno"])
-AM_CONDITIONAL([BUILD_THREADED_EXAMPLES],[test "x$ENABLED_SINGLETHREADED" = "xno" && test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_LEANTLS" = "xno"])
-AM_CONDITIONAL([BUILD_WOLFCRYPT_TESTS],[test "x$ENABLED_CRYPT_TESTS" = "xyes"])
-AM_CONDITIONAL([BUILD_LIBZ],[test "x$ENABLED_LIBZ" = "xyes"])
-AM_CONDITIONAL([BUILD_PKCS11],[test "x$ENABLED_PKCS11" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_PKCS12],[test "x$ENABLED_PKCS12" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_CAVIUM],[test "x$ENABLED_CAVIUM" = "xyes"])
-AM_CONDITIONAL([BUILD_CAVIUM_V],[test "x$ENABLED_CAVIUM_V" = "xyes"])
-AM_CONDITIONAL([BUILD_OCTEON_SYNC],[test "x$ENABLED_OCTEON_SYNC" = "xyes"])
-AM_CONDITIONAL([BUILD_INTEL_QA],[test "x$ENABLED_INTEL_QA" = "xyes"])
-AM_CONDITIONAL([BUILD_INTEL_QA_SYNC],[test "x$ENABLED_INTEL_QA_SYNC" = "xyes"])
-AM_CONDITIONAL([BUILD_SP],[test "x$ENABLED_SP" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SP_C],[(test "x$ENABLED_SP" = "xyes" && test "x$ENABLED_SP_ASM" = "xno") || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SP_ARM64],[test "x$ENABLED_SP_ARM64_ASM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SP_ARM32],[test "x$ENABLED_SP_ARM32_ASM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SP_ARM_THUMB],[test "x$ENABLED_SP_ARM_THUMB_ASM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SP_ARM_CORTEX],[test "x$ENABLED_SP_ARM_CORTEX_ASM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SP_X86_64],[test "x$ENABLED_SP_X86_64_ASM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_SP_INT],[test "x$ENABLED_SP_MATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_FAST_RSA],[test "x$ENABLED_FAST_RSA" = "xyes"])
-AM_CONDITIONAL([BUILD_MCAPI],[test "x$ENABLED_MCAPI" = "xyes"])
-AM_CONDITIONAL([BUILD_ASYNCCRYPT],[test "x$ENABLED_ASYNCCRYPT" = "xyes"])
-AM_CONDITIONAL([BUILD_WOLFEVENT],[test "x$ENABLED_ASYNCCRYPT" = "xyes"])
-AM_CONDITIONAL([BUILD_CRYPTOCB],[test "x$ENABLED_CRYPTOCB" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_PSK],[test "x$ENABLED_PSK" = "xyes"])
-AM_CONDITIONAL([BUILD_TRUST_PEER_CERT],[test "x$ENABLED_TRUSTED_PEER_CERT" = "xyes"])
-AM_CONDITIONAL([BUILD_PKI],[test "x$ENABLED_PKI" = "xyes"])
-AM_CONDITIONAL([BUILD_DES3],[test "x$ENABLED_DES3" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_PKCS7],[test "x$ENABLED_PKCS7" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_HASHFLAGS],[test "x$ENABLED_HASHFLAGS" = "xyes"])
-
-
-CREATE_HEX_VERSION
-AC_SUBST([AM_CPPFLAGS])
-AC_SUBST([AM_CFLAGS])
-AC_SUBST([AM_LDFLAGS])
-AC_SUBST([AM_CCASFLAGS])
-AC_SUBST([LIB_ADD])
-AC_SUBST([LIB_STATIC_ADD])
-
-# FINAL
-AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
-AC_CONFIG_FILES([Makefile wolfssl/version.h wolfssl/options.h cyassl/options.h support/wolfssl.pc rpm/spec])
-
-AX_CREATE_GENERIC_CONFIG
-AX_AM_JOBSERVER([yes])
-
-AC_OUTPUT
-
-
-# force make clean
-echo "---"
-echo "Running make clean..."
-make clean >/dev/null 2>&1
-
-# generate user options header
-echo "---"
-echo "Generating user options header..."
-
-OPTION_FILE="wolfssl/options.h"
-rm -f $OPTION_FILE
-
-echo "/* wolfssl options.h" > $OPTION_FILE
-echo " * generated from configure options" >> $OPTION_FILE
-echo " *" >> $OPTION_FILE
-echo " * Copyright (C) 2006-2020 wolfSSL Inc." >> $OPTION_FILE
-echo " *" >> $OPTION_FILE
-echo " * This file is part of wolfSSL. (formerly known as CyaSSL)" >> $OPTION_FILE
-echo " *" >> $OPTION_FILE
-echo " */" >> $OPTION_FILE
-
-echo "" >> $OPTION_FILE
-echo "#ifndef WOLFSSL_OPTIONS_H" >> $OPTION_FILE
-echo "#define WOLFSSL_OPTIONS_H" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-echo "#ifdef __cplusplus" >> $OPTION_FILE
-echo "extern \"C\" {" >> $OPTION_FILE
-echo "#endif" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-
-for option in $CPPFLAGS $AM_CPPFLAGS $CFLAGS $AM_CFLAGS; do
- defonly=`echo $option | sed 's/^-D//'`
- if test "$defonly" != "$option"
- then
- noequalsign=`echo $defonly | sed 's/=/ /'`
- if test "$noequalsign" = "NDEBUG" || test "$noequalsign" = "DEBUG"
- then
- echo "not outputting (N)DEBUG to $OPTION_FILE"
- continue
- fi
-
- # allow user to ignore system options
- ignoresys=$(echo "$noequalsign" | grep '^_.*')
- if test -n "$ignoresys"
- then
- echo "#ifndef WOLFSSL_OPTIONS_IGNORE_SYS" >> $OPTION_FILE
- fi
-
- noarg=`echo $defonly | sed 's/=.*//'`
- echo "#undef $noarg" >> $OPTION_FILE
- echo "#define $noequalsign" >> $OPTION_FILE
-
- if test -n "$ignoresys"
- then
- echo "#endif" >> $OPTION_FILE
- fi
-
- echo "" >> $OPTION_FILE
- else
- echo "option w/o begin -D is $option, not saving to $OPTION_FILE"
- fi
-done
-
-echo "" >> $OPTION_FILE
-echo "#ifdef __cplusplus" >> $OPTION_FILE
-echo "}" >> $OPTION_FILE
-echo "#endif" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-echo "#endif /* WOLFSSL_OPTIONS_H */" >> $OPTION_FILE
-echo "" >> $OPTION_FILE
-echo
-
-#backwards compatibility for those who have included options or version
-touch cyassl/options.h
-echo "/* cyassl options.h" > cyassl/options.h
-echo " * generated from wolfssl/options.h" >> cyassl/options.h
-echo " */" >> cyassl/options.h
-echo ""
-while read -r line
-do
- echo "$line" >> cyassl/options.h
-done < $OPTION_FILE
-
-# switch ifdef protection in cyassl/option.h to CYASSL_OPTONS_H, remove bak
-sed -i.bak 's/WOLFSSL_OPTIONS_H/CYASSL_OPTIONS_H/g' cyassl/options.h
-
-# workaround for mingw sed that may get "Permission denied" trying to preserver permissions
-case $host_os in
- mingw*)
- chmod u+w cyassl/options.h ;;
-esac
-
-rm cyassl/options.h.bak
-
-
-# output config summary
-echo "---"
-echo "Configuration summary for $PACKAGE_NAME version $VERSION"
-echo ""
-echo " * Installation prefix: $prefix"
-echo " * System type: $host_vendor-$host_os"
-echo " * Host CPU: $host_cpu"
-echo " * C Compiler: $CC"
-echo " * C Flags: $CFLAGS"
-echo " * C++ Compiler: $CXX"
-echo " * C++ Flags: $CXXFLAGS"
-echo " * CPP Flags: $CPPFLAGS"
-echo " * CCAS Flags: $CCASFLAGS"
-echo " * LIB Flags: $LIB"
-echo " * Debug enabled: $ax_enable_debug"
-echo " * Coverage enabled: $ax_enable_coverage"
-echo " * Warnings as failure: $ac_cv_warnings_as_errors"
-echo " * make -j: $enable_jobserver"
-echo " * VCS checkout: $ac_cv_vcs_checkout"
-echo
-echo " Features "
-echo " * Single threaded: $ENABLED_SINGLETHREADED"
-echo " * Filesystem: $ENABLED_FILESYSTEM"
-echo " * OpenSSH Build: $ENABLED_OPENSSH"
-echo " * OpenSSL Extra API: $ENABLED_OPENSSLEXTRA"
-echo " * OpenSSL Coexist: $ENABLED_OPENSSLCOEXIST"
-echo " * Old Names: $ENABLED_OLDNAMES"
-echo " * Max Strength Build: $ENABLED_MAXSTRENGTH"
-echo " * Distro Build: $ENABLED_DISTRO"
-echo " * fastmath: $ENABLED_FASTMATH"
-echo " * Assembly Allowed: $ENABLED_ASM"
-echo " * sniffer: $ENABLED_SNIFFER"
-echo " * snifftest: $ENABLED_SNIFFTEST"
-echo " * ARC4: $ENABLED_ARC4"
-echo " * AES: $ENABLED_AES"
-echo " * AES-NI: $ENABLED_AESNI"
-echo " * AES-CBC: $ENABLED_AESCBC"
-echo " * AES-GCM: $ENABLED_AESGCM"
-echo " * AES-CCM: $ENABLED_AESCCM"
-echo " * AES-CTR: $ENABLED_AESCTR"
-echo " * DES3: $ENABLED_DES3"
-echo " * IDEA: $ENABLED_IDEA"
-echo " * Camellia: $ENABLED_CAMELLIA"
-echo " * NULL Cipher: $ENABLED_NULL_CIPHER"
-echo " * MD5: $ENABLED_MD5"
-echo " * RIPEMD: $ENABLED_RIPEMD"
-echo " * SHA: $ENABLED_SHA"
-echo " * SHA-224: $ENABLED_SHA224"
-echo " * SHA-384: $ENABLED_SHA384"
-echo " * SHA-512: $ENABLED_SHA512"
-echo " * SHA3: $ENABLED_SHA3"
-echo " * SHAKE256: $ENABLED_SHAKE256"
-echo " * BLAKE2: $ENABLED_BLAKE2"
-echo " * CMAC: $ENABLED_CMAC"
-echo " * keygen: $ENABLED_KEYGEN"
-echo " * certgen: $ENABLED_CERTGEN"
-echo " * certreq: $ENABLED_CERTREQ"
-echo " * certext: $ENABLED_CERTEXT"
-echo " * certgencache: $ENABLED_certgencache"
-echo " * HC-128: $ENABLED_HC128"
-echo " * RABBIT: $ENABLED_RABBIT"
-echo " * CHACHA: $ENABLED_CHACHA"
-echo " * Hash DRBG: $ENABLED_HASHDRBG"
-echo " * PWDBASED: $ENABLED_PWDBASED"
-echo " * scrypt: $ENABLED_SCRYPT"
-echo " * wolfCrypt Only: $ENABLED_CRYPTONLY"
-echo " * HKDF: $ENABLED_HKDF"
-echo " * X9.63 KDF: $ENABLED_X963KDF"
-echo " * MD4: $ENABLED_MD4"
-echo " * PSK: $ENABLED_PSK"
-echo " * Poly1305: $ENABLED_POLY1305"
-echo " * LEANPSK: $ENABLED_LEANPSK"
-echo " * LEANTLS: $ENABLED_LEANTLS"
-echo " * RSA: $ENABLED_RSA"
-echo " * RSA-PSS: $ENABLED_RSAPSS"
-echo " * DSA: $ENABLED_DSA"
-echo " * DH: $ENABLED_DH"
-echo " * DH Default Parameters: $ENABLED_DHDEFAULTPARAMS"
-echo " * ECC: $ENABLED_ECC"
-echo " * ECC Custom Curves $ENABLED_ECCCUSTCURVES"
-echo " * CURVE25519: $ENABLED_CURVE25519"
-echo " * ED25519: $ENABLED_ED25519"
-echo " * CURVE448: $ENABLED_CURVE448"
-echo " * ED448: $ENABLED_ED448"
-echo " * FPECC: $ENABLED_FPECC"
-echo " * ECC_ENCRYPT: $ENABLED_ECC_ENCRYPT"
-echo " * ASN: $ENABLED_ASN"
-echo " * Anonymous cipher: $ENABLED_ANON"
-echo " * CODING: $ENABLED_CODING"
-echo " * MEMORY: $ENABLED_MEMORY"
-echo " * I/O POOL: $ENABLED_IOPOOL"
-echo " * LIGHTY: $ENABLED_LIGHTY"
-echo " * HAPROXY: $ENABLED_HAPROXY"
-echo " * STUNNEL: $ENABLED_STUNNEL"
-echo " * Apache httpd: $ENABLED_APACHE_HTTPD"
-echo " * NGINX: $ENABLED_NGINX"
-echo " * ASIO: $ENABLED_ASIO"
-echo " * LIBWEBSOCKETS: $ENABLED_LIBWEBSOCKETS"
-echo " * Qt $ENABLED_QT"
-echo " * Qt Unit Testing $ENABLED_QT_TEST"
-echo " * SIGNAL: $ENABLED_SIGNAL"
-echo " * ERROR_STRINGS: $ENABLED_ERROR_STRINGS"
-echo " * DTLS: $ENABLED_DTLS"
-echo " * SCTP: $ENABLED_SCTP"
-echo " * Indefinite Length: $ENABLED_BER_INDEF"
-echo " * Multicast: $ENABLED_MCAST"
-echo " * SSL v3.0 (Old): $ENABLED_SSLV3"
-echo " * TLS v1.0 (Old): $ENABLED_TLSV10"
-echo " * TLS v1.1 (Old): $ENABLED_OLD_TLS"
-echo " * TLS v1.2: $ENABLED_TLSV12"
-echo " * TLS v1.3: $ENABLED_TLS13"
-echo " * Post-handshake Auth: $ENABLED_TLS13_POST_AUTH"
-echo " * Early Data: $ENABLED_TLS13_EARLY_DATA"
-echo " * Send State in HRR Cookie: $ENABLED_SEND_HRR_COOKIE"
-echo " * OCSP: $ENABLED_OCSP"
-echo " * OCSP Stapling: $ENABLED_CERTIFICATE_STATUS_REQUEST"
-echo " * OCSP Stapling v2: $ENABLED_CERTIFICATE_STATUS_REQUEST_V2"
-echo " * CRL: $ENABLED_CRL"
-echo " * CRL-MONITOR: $ENABLED_CRL_MONITOR"
-echo " * Persistent session cache: $ENABLED_SAVESESSION"
-echo " * Persistent cert cache: $ENABLED_SAVECERT"
-echo " * Atomic User Record Layer: $ENABLED_ATOMICUSER"
-echo " * Public Key Callbacks: $ENABLED_PKCALLBACKS"
-echo " * NTRU: $ENABLED_NTRU"
-echo " * QSH: $ENABLED_QSH"
-echo " * Whitewood netRandom: $ENABLED_WNR"
-echo " * Server Name Indication: $ENABLED_SNI"
-echo " * ALPN: $ENABLED_ALPN"
-echo " * Maximum Fragment Length: $ENABLED_MAX_FRAGMENT"
-echo " * Trusted CA Indication: $ENABLED_TRUSTED_CA"
-echo " * Truncated HMAC: $ENABLED_TRUNCATED_HMAC"
-echo " * Supported Elliptic Curves: $ENABLED_SUPPORTED_CURVES"
-echo " * FFDHE only in client: $ENABLED_FFDHE_ONLY"
-echo " * Session Ticket: $ENABLED_SESSION_TICKET"
-echo " * Extended Master Secret: $ENABLED_EXTENDED_MASTER"
-echo " * Renegotiation Indication: $ENABLED_RENEGOTIATION_INDICATION"
-echo " * Secure Renegotiation: $ENABLED_SECURE_RENEGOTIATION"
-echo " * Fallback SCSV: $ENABLED_FALLBACK_SCSV"
-echo " * All TLS Extensions: $ENABLED_TLSX"
-echo " * PKCS#7 $ENABLED_PKCS7"
-echo " * wolfSSH $ENABLED_WOLFSSH"
-echo " * wolfSCEP $ENABLED_WOLFSCEP"
-echo " * Secure Remote Password $ENABLED_SRP"
-echo " * Small Stack: $ENABLED_SMALL_STACK"
-echo " * valgrind unit tests: $ENABLED_VALGRIND"
-echo " * LIBZ: $ENABLED_LIBZ"
-echo " * Examples: $ENABLED_EXAMPLES"
-echo " * User Crypto: $ENABLED_USER_CRYPTO"
-echo " * Fast RSA: $ENABLED_FAST_RSA"
-echo " * Single Precision: $ENABLED_SP"
-echo " * Async Crypto: $ENABLED_ASYNCCRYPT"
-echo " * PKCS#11: $ENABLED_PKCS11"
-echo " * PKCS#12: $ENABLED_PKCS12"
-echo " * Cavium Nitox: $ENABLED_CAVIUM"
-echo " * Cavium Octeon (Sync): $ENABLED_OCTEON_SYNC"
-echo " * Intel Quick Assist: $ENABLED_INTEL_QA"
-echo " * ARM ASM: $ENABLED_ARMASM"
-echo " * AES Key Wrap: $ENABLED_AESKEYWRAP"
-echo " * Write duplicate: $ENABLED_WRITEDUP"
-echo " * Xilinx Hardware Acc.: $ENABLED_XILINX"
-echo " * Inline Code: $ENABLED_INLINE"
-echo " * Linux AF_ALG: $ENABLED_AFALG"
-echo " * Linux devcrypto: $ENABLED_DEVCRYPTO"
-echo " * Crypto callbacks: $ENABLED_CRYPTOCB"
-echo ""
-echo "---"
-
-################################################################################
-# Show warnings at bottom so they are noticed
-################################################################################
-
-if test "$ENABLED_ASYNCCRYPT" = "yes"
-then
- AC_MSG_WARN([Make sure real async files are loaded. Contact wolfSSL for details on using the asynccrypt option.])
-fi
-
-# MinGW static vs shared library
-# Reference URL from libtool for MinGW is located at
-# http://www.gnu.org/software/libtool/manual/libtool.html#Cygwin-to-MinGW-Cross
-# this allows for not even having dllimport/dllexport on functions
-# with recent libtools, only requiring it with global variables.
-#
-# The following warning is displayed here because if not using "contemporary GNU
-# tools" there is the possibility of export/import issues.
-# wolfSSL uses __declspec(dllexport) and "contemporary GNU tools" handle the
-# case where both static and shared libraries are built.
-#
-# More can be found about the MinGW linker at
-# https://sourceware.org/binutils/docs/ld/WIN32.html
-if test "$MINGW_LIB_WARNING" = "yes"
-then
- AC_MSG_WARN([Building with shared and static library at the same time on this system may cause export/import problems when using non contemporary GNU tools.])
-fi
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/fips-hash.sh b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/fips-hash.sh
deleted file mode 100644
index 8bb6de4ecf..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/fips-hash.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-if test ! -x ./wolfcrypt/test/testwolfcrypt
-then
- echo "fips-hash: wolfCrypt test missing"
- exit 1
-fi
-
-if test ! -s ./wolfcrypt/src/fips_test.c
-then
- echo "fips-hash: fips_test.c missing"
- exit 1
-fi
-
-NEWHASH=$(./wolfcrypt/test/testwolfcrypt | sed -n 's/hash = \(.*\)/\1/p')
-if test -n "$NEWHASH"
-then
- cp wolfcrypt/src/fips_test.c wolfcrypt/src/fips_test.c.bak
- sed "s/^\".*\";/\"${NEWHASH}\";/" wolfcrypt/src/fips_test.c.bak >wolfcrypt/src/fips_test.c
-fi
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/gencertbuf.pl b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/gencertbuf.pl
deleted file mode 100644
index 6b71fffad5..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/gencertbuf.pl
+++ /dev/null
@@ -1,283 +0,0 @@
-#!/usr/bin/perl
-
-# gencertbuf.pl
-# version 1.1
-# Updated 07/01/2014
-#
-# Copyright (C) 2006-2015 wolfSSL Inc.
-#
-
-use strict;
-use warnings;
-
-# ---- SCRIPT SETTINGS -------------------------------------------------------
-
-# output C header file to write cert/key buffers to
-my $outputFile = "./wolfssl/certs_test.h";
-
-# ecc keys and certs to be converted
-# Used with HAVE_ECC && USE_CERT_BUFFERS_256
-
-my @fileList_ecc = (
- [ "./certs/ecc-client-key.der", "ecc_clikey_der_256" ],
- [ "./certs/ecc-client-keyPub.der", "ecc_clikeypub_der_256" ],
- [ "./certs/client-ecc-cert.der", "cliecc_cert_der_256" ],
- [ "./certs/ecc-key.der", "ecc_key_der_256" ],
- [ "./certs/ecc-keyPub.der", "ecc_key_pub_der_256" ],
- [ "./certs/server-ecc-comp.der", "serv_ecc_comp_der_256" ],
- [ "./certs/server-ecc-rsa.der", "serv_ecc_rsa_der_256" ],
- [ "./certs/server-ecc.der", "serv_ecc_der_256" ],
- [ "./certs/ca-ecc-key.der", "ca_ecc_key_der_256" ],
- [ "./certs/ca-ecc-cert.der", "ca_ecc_cert_der_256" ],
- [ "./certs/ca-ecc384-key.der", "ca_ecc_key_der_384" ],
- [ "./certs/ca-ecc384-cert.der", "ca_ecc_cert_der_384" ]
- );
-
-
-# ed25519 keys and certs
-# Used with HAVE_ED25519 define.
-my @fileList_ed = (
- [ "./certs/ed25519/server-ed25519.der", "server_ed25519_cert" ],
- [ "./certs/ed25519/server-ed25519-key.der", "server_ed25519_key" ],
- [ "./certs/ed25519/ca-ed25519.der", "ca_ed25519_cert" ],
- [ "./certs/ed25519/client-ed25519.der", "client_ed25519_cert" ],
- [ "./certs/ed25519/client-ed25519-key.der", "client_ed25519_key" ]
- );
-
-# 1024-bit certs/keys to be converted
-# Used with USE_CERT_BUFFERS_1024 define.
-
-my @fileList_1024 = (
- [ "./certs/1024/client-key.der", "client_key_der_1024" ],
- [ "./certs/1024/client-keyPub.der", "client_keypub_der_1024" ],
- [ "./certs/1024/client-cert.der", "client_cert_der_1024" ],
- [ "./certs/1024/dh1024.der", "dh_key_der_1024" ],
- [ "./certs/1024/dsa1024.der", "dsa_key_der_1024" ],
- [ "./certs/1024/rsa1024.der", "rsa_key_der_1024" ],
- [ "./certs/1024/ca-key.der", "ca_key_der_1024"],
- [ "./certs/1024/ca-cert.der", "ca_cert_der_1024" ],
- [ "./certs/1024/server-key.der", "server_key_der_1024" ],
- [ "./certs/1024/server-cert.der", "server_cert_der_1024" ]
- );
-
-# 2048-bit certs/keys to be converted
-# Used with USE_CERT_BUFFERS_2048 define.
-my @fileList_2048 = (
- [ "./certs/client-key.der", "client_key_der_2048" ],
- [ "./certs/client-keyPub.der", "client_keypub_der_2048" ],
- [ "./certs/client-cert.der", "client_cert_der_2048" ],
- [ "./certs/dh2048.der", "dh_key_der_2048" ],
- [ "./certs/dsa2048.der", "dsa_key_der_2048" ],
- [ "./certs/rsa2048.der", "rsa_key_der_2048" ],
- [ "./certs/ca-key.der", "ca_key_der_2048" ],
- [ "./certs/ca-cert.der", "ca_cert_der_2048" ],
- [ "./certs/ca-cert-chain.der", "ca_cert_chain_der" ],
- [ "./certs/server-key.der", "server_key_der_2048" ],
- [ "./certs/server-cert.der", "server_cert_der_2048" ]
- );
-
-# 3072-bit certs/keys to be converted
-# Used with USE_CERT_BUFFERS_3072 define.
-my @fileList_3072 = (
- [ "./certs/dh3072.der", "dh_key_der_3072" ],
- [ "./certs/dsa3072.der", "dsa_key_der_3072" ],
- [ "./certs/rsa3072.der", "rsa_key_der_3072" ],
- [ "./certs/3072/client-key.der", "client_key_der_3072" ],
- [ "./certs/3072/client-keyPub.der", "client_keypub_der_3072" ],
- [ "./certs/3072/client-cert.der", "client_cert_der_3072" ],
- );
-
-# 4096-bit certs/keys to be converted
-# Used with USE_CERT_BUFFERS_4096 define.
-my @fileList_4096 = (
- [ "./certs/4096/client-key.der", "client_key_der_4096" ],
- [ "./certs/4096/client-keyPub.der", "client_keypub_der_4096" ],
- [ "./certs/4096/client-cert.der", "client_cert_der_4096" ],
- [ "./certs/dh4096.der", "dh_key_der_4096" ],
- );
-
-# ----------------------------------------------------------------------------
-
-my $num_ecc = @fileList_ecc;
-my $num_ed = @fileList_ed;
-my $num_1024 = @fileList_1024;
-my $num_2048 = @fileList_2048;
-my $num_3072 = @fileList_3072;
-my $num_4096 = @fileList_4096;
-
-# open our output file, "+>" creates and/or truncates
-open OUT_FILE, "+>", $outputFile or die $!;
-
-print OUT_FILE "/* certs_test.h */\n\n";
-print OUT_FILE "#ifndef WOLFSSL_CERTS_TEST_H\n";
-print OUT_FILE "#define WOLFSSL_CERTS_TEST_H\n\n";
-
-
-# convert and print 1024-bit cert/keys
-print OUT_FILE "#ifdef USE_CERT_BUFFERS_1024\n\n";
-for (my $i = 0; $i < $num_1024; $i++) {
-
- my $fname = $fileList_1024[$i][0];
- my $sname = $fileList_1024[$i][1];
-
- print OUT_FILE "/* $fname, 1024-bit */\n";
- print OUT_FILE "static const unsigned char $sname\[] =\n";
- print OUT_FILE "{\n";
- file_to_hex($fname);
- print OUT_FILE "};\n";
- print OUT_FILE "static const int sizeof_$sname = sizeof($sname);\n\n";
-}
-print OUT_FILE "#endif /* USE_CERT_BUFFERS_1024 */\n\n";
-
-
-# convert and print 2048-bit certs/keys
-print OUT_FILE "#ifdef USE_CERT_BUFFERS_2048\n\n";
-for (my $i = 0; $i < $num_2048; $i++) {
-
- my $fname = $fileList_2048[$i][0];
- my $sname = $fileList_2048[$i][1];
-
- print OUT_FILE "/* $fname, 2048-bit */\n";
- print OUT_FILE "static const unsigned char $sname\[] =\n";
- print OUT_FILE "{\n";
- file_to_hex($fname);
- print OUT_FILE "};\n";
- print OUT_FILE "static const int sizeof_$sname = sizeof($sname);\n\n";
-}
-
-
-print OUT_FILE "#endif /* USE_CERT_BUFFERS_2048 */\n\n";
-
-
-# convert and print 3072-bit certs/keys
-print OUT_FILE "#ifdef USE_CERT_BUFFERS_3072\n\n";
-for (my $i = 0; $i < $num_3072; $i++) {
-
- my $fname = $fileList_3072[$i][0];
- my $sname = $fileList_3072[$i][1];
-
- print OUT_FILE "/* $fname, 3072-bit */\n";
- print OUT_FILE "static const unsigned char $sname\[] =\n";
- print OUT_FILE "{\n";
- file_to_hex($fname);
- print OUT_FILE "};\n";
- print OUT_FILE "static const int sizeof_$sname = sizeof($sname);\n\n";
-}
-
-print OUT_FILE "#endif /* USE_CERT_BUFFERS_3072 */\n\n";
-
-
-# convert and print 4096-bit certs/keys
-print OUT_FILE "#ifdef USE_CERT_BUFFERS_4096\n\n";
-for (my $i = 0; $i < $num_4096; $i++) {
-
- my $fname = $fileList_4096[$i][0];
- my $sname = $fileList_4096[$i][1];
-
- print OUT_FILE "/* $fname, 4096-bit */\n";
- print OUT_FILE "static const unsigned char $sname\[] =\n";
- print OUT_FILE "{\n";
- file_to_hex($fname);
- print OUT_FILE "};\n";
- print OUT_FILE "static const int sizeof_$sname = sizeof($sname);\n\n";
-}
-
-print OUT_FILE "#endif /* USE_CERT_BUFFERS_4096 */\n\n";
-
-
-# convert and print 256-bit cert/keys
-print OUT_FILE "#if defined(HAVE_ECC) && defined(USE_CERT_BUFFERS_256)\n\n";
-for (my $i = 0; $i < $num_ecc; $i++) {
-
- my $fname = $fileList_ecc[$i][0];
- my $sname = $fileList_ecc[$i][1];
-
- print OUT_FILE "/* $fname, ECC */\n";
- print OUT_FILE "static const unsigned char $sname\[] =\n";
- print OUT_FILE "{\n";
- file_to_hex($fname);
- print OUT_FILE "};\n";
- print OUT_FILE "static const int sizeof_$sname = sizeof($sname);\n\n";
-}
-print OUT_FILE "#endif /* HAVE_ECC && USE_CERT_BUFFERS_256 */\n\n";
-
-
-print OUT_FILE "/* dh1024 p */
-static const unsigned char dh_p[] =
-{
- 0xE6, 0x96, 0x9D, 0x3D, 0x49, 0x5B, 0xE3, 0x2C, 0x7C, 0xF1, 0x80, 0xC3,
- 0xBD, 0xD4, 0x79, 0x8E, 0x91, 0xB7, 0x81, 0x82, 0x51, 0xBB, 0x05, 0x5E,
- 0x2A, 0x20, 0x64, 0x90, 0x4A, 0x79, 0xA7, 0x70, 0xFA, 0x15, 0xA2, 0x59,
- 0xCB, 0xD5, 0x23, 0xA6, 0xA6, 0xEF, 0x09, 0xC4, 0x30, 0x48, 0xD5, 0xA2,
- 0x2F, 0x97, 0x1F, 0x3C, 0x20, 0x12, 0x9B, 0x48, 0x00, 0x0E, 0x6E, 0xDD,
- 0x06, 0x1C, 0xBC, 0x05, 0x3E, 0x37, 0x1D, 0x79, 0x4E, 0x53, 0x27, 0xDF,
- 0x61, 0x1E, 0xBB, 0xBE, 0x1B, 0xAC, 0x9B, 0x5C, 0x60, 0x44, 0xCF, 0x02,
- 0x3D, 0x76, 0xE0, 0x5E, 0xEA, 0x9B, 0xAD, 0x99, 0x1B, 0x13, 0xA6, 0x3C,
- 0x97, 0x4E, 0x9E, 0xF1, 0x83, 0x9E, 0xB5, 0xDB, 0x12, 0x51, 0x36, 0xF7,
- 0x26, 0x2E, 0x56, 0xA8, 0x87, 0x15, 0x38, 0xDF, 0xD8, 0x23, 0xC6, 0x50,
- 0x50, 0x85, 0xE2, 0x1F, 0x0D, 0xD5, 0xC8, 0x6B,
-};
-
-/* dh1024 g */
-static const unsigned char dh_g[] =
-{
- 0x02,
-};\n\n";
-
-# convert and print ed25519 cert/keys
-print OUT_FILE "#if defined(HAVE_ED25519)\n\n";
-for (my $i = 0; $i < $num_ed; $i++) {
-
- my $fname = $fileList_ed[$i][0];
- my $sname = $fileList_ed[$i][1];
-
- print OUT_FILE "/* $fname, ED25519 */\n";
- print OUT_FILE "static const unsigned char $sname\[] =\n";
- print OUT_FILE "{\n";
- file_to_hex($fname);
- print OUT_FILE "};\n";
- print OUT_FILE "static const int sizeof_$sname = sizeof($sname);\n\n";
-}
-print OUT_FILE "#endif /* HAVE_ED25519 */\n\n";
-
-print OUT_FILE "#endif /* WOLFSSL_CERTS_TEST_H */\n\n";
-
-# close certs_test.h file
-close OUT_FILE or die $!;
-
-# print file as hex, comma-separated, as needed by C buffer
-sub file_to_hex {
- my $fileName = $_[0];
-
- open my $fp, "<", $fileName or die $!;
- binmode($fp);
-
- my $fileLen = -s $fileName;
- my $byte;
-
- for (my $i = 0, my $j = 1; $i < $fileLen; $i++, $j++)
- {
- if ($j == 1) {
- print OUT_FILE " ";
- }
- if ($j != 1) {
- print OUT_FILE " ";
- }
- read($fp, $byte, 1) or die "Error reading $fileName";
- my $output = sprintf("0x%02X", ord($byte));
- print OUT_FILE $output;
-
- if ($i != ($fileLen - 1)) {
- print OUT_FILE ",";
- }
-
- if ($j == 10) {
- $j = 0;
- print OUT_FILE "\n";
- }
- }
-
- print OUT_FILE "\n";
-
- close($fp);
-}
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/gpl-3.0.txt b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/gpl-3.0.txt
deleted file mode 100644
index 94a9ed024d..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/gpl-3.0.txt
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/input b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/input
deleted file mode 100644
index a8cdf06c16..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/input
+++ /dev/null
@@ -1,89 +0,0 @@
-/* echoclient.c */
-
-#include "openssl/ssl.h"
-#include "../test.h"
-
-
-int main(int argc, char** argv)
-{
- SOCKET_T sockfd = 0;
-
- FILE* fin = stdin;
- FILE* fout = stdout;
-
- int inCreated = 0;
- int outCreated = 0;
-
- char send[1024];
- char reply[1024];
-
- SSL_METHOD* method = 0;
- SSL_CTX* ctx = 0;
- SSL* ssl = 0;
-
-#ifdef _WIN32
- WSADATA wsd;
- WSAStartup(0x0002, &wsd);
-#endif
-
- if (argc >= 2) {
- fin = fopen(argv[1], "r");
- inCreated = 1;
- }
- if (argc >= 3) {
- fout = fopen(argv[2], "w");
- outCreated = 1;
- }
-
- if (!fin) err_sys("can't open input file");
- if (!fout) err_sys("can't open output file");
-
- tcp_connect(&sockfd);
-
- method = SSLv3_client_method();
- ctx = SSL_CTX_new(method);
-
- if (SSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS)
- err_sys("can't load ca file");
-
- ssl = SSL_new(ctx);
-
- if (SSL_set_fd(ssl, sockfd) != SSL_SUCCESS)
- err_sys("can't set ssl fd");
-
- if (SSL_connect(ssl) != SSL_SUCCESS) err_sys("SSL_connect failed");
-
- while (fgets(send, sizeof(send), fin)) {
-
- int sendSz = strlen(send) + 1;
-
- if (SSL_write(ssl, send, sendSz) != sendSz)
- err_sys("SSL_write failed");
-
- if (strncmp(send, "quit", 4) == 0) {
- fputs("sending server shutdown command: quit!\n", fout);
- break;
- }
-
- if (SSL_read(ssl, reply, sizeof(reply)) > 0)
- fputs(reply, fout);
- }
-
- SSL_shutdown(ssl);
- SSL_free(ssl);
- SSL_CTX_free(ctx);
-
- fflush(fout);
- if (inCreated) fclose(fin);
- if (outCreated) fclose(fout);
-
-#ifdef _WIN32
- closesocket(sockfd);
-#else
- close(sockfd);
-#endif
-
- return 0;
-}
-
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/quit b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/quit
deleted file mode 100644
index 3db49b3ad1..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/quit
+++ /dev/null
@@ -1,2 +0,0 @@
-quit
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/bio.c b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/bio.c
deleted file mode 100644
index 1b234f74ba..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/bio.c
+++ /dev/null
@@ -1,1706 +0,0 @@
-/* bio.c
- *
- * Copyright (C) 2006-2020 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * wolfSSL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
- */
-
-#include
-
-#if !defined(WOLFSSL_BIO_INCLUDED)
- #ifndef WOLFSSL_IGNORE_FILE_WARN
- #warning bio.c does not need to be compiled separately from ssl.c
- #endif
-#else
-
-
-/* Helper function to decode a base64 input
- *
- * returns size of resulting buffer on success
- */
-static int wolfSSL_BIO_BASE64_read(WOLFSSL_BIO* bio, void* buf, int len)
-{
- word32 frmtSz = len;
-
- WOLFSSL_ENTER("wolfSSL_BIO_BASE64_read");
-
- if (Base64_Decode((const byte*)buf, (word32)len, (byte*)buf, &frmtSz) !=0) {
- WOLFSSL_MSG("Err doing base64 decode");
- return SSL_FATAL_ERROR;
- }
-
- (void)bio;
- return (int)frmtSz;
-}
-
-
-/* Helper function to read from WOLFSSL_BIO_BIO type
- *
- * returns amount in bytes read on success
- */
-static int wolfSSL_BIO_BIO_read(WOLFSSL_BIO* bio, void* buf, int len)
-{
- int sz;
- char* pt;
-
- sz = wolfSSL_BIO_nread(bio, &pt, len);
-
- if (sz > 0) {
- XMEMCPY(buf, pt, sz);
- }
-
- return sz;
-}
-
-
-/* Handles reading from a memory type BIO and advancing the state.
- *
- * bio WOLFSSL_BIO to read from
- * buf buffer to put data from bio in
- * len amount of data to be read
- *
- * returns size read on success
- */
-static int wolfSSL_BIO_MEMORY_read(WOLFSSL_BIO* bio, void* buf, int len)
-{
- int sz;
- WOLFSSL_ENTER("wolfSSL_BIO_MEMORY_read");
-
- sz = wolfSSL_BIO_pending(bio);
- if (sz > 0) {
- const unsigned char* pt = NULL;
- int memSz;
-
- if (sz > len) {
- sz = len;
- }
- memSz = wolfSSL_BIO_get_mem_data(bio, (void*)&pt);
- if (memSz >= sz && pt != NULL) {
- byte* tmp;
-
- XMEMCPY(buf, (void*)pt, sz);
- if (memSz - sz > 0) {
- tmp = (byte*)XMALLOC(memSz-sz, bio->heap, DYNAMIC_TYPE_OPENSSL);
- if (tmp == NULL) {
- WOLFSSL_MSG("Memory error");
- return WOLFSSL_BIO_ERROR;
- }
- XMEMCPY(tmp, (void*)(pt + sz), memSz - sz);
-
- /* reset internal bio->mem */
- XFREE(bio->ptr, bio->heap, DYNAMIC_TYPE_OPENSSL);
- bio->ptr = tmp;
- bio->num = memSz-sz;
- if (bio->mem_buf != NULL) {
- bio->mem_buf->data = (char*)bio->ptr;
- bio->mem_buf->length = bio->num;
- }
- }
- bio->wrSz -= sz;
- }
- else {
- WOLFSSL_MSG("Issue with getting bio mem pointer");
- return 0;
- }
- }
- else {
- return WOLFSSL_BIO_ERROR;
- }
-
- return sz;
-}
-
-#ifndef WOLFCRYPT_ONLY
-/* Helper function to read from WOLFSSL_BIO_SSL type
- *
- * returns the number of bytes read on success
- */
-static int wolfSSL_BIO_SSL_read(WOLFSSL_BIO* bio, void* buf,
- int len, WOLFSSL_BIO* front)
-{
- int ret;
-
- WOLFSSL_ENTER("wolfSSL_BIO_SSL_read");
-
- /* already got eof, again is error */
- if ((front == NULL) || front->eof)
- return WOLFSSL_FATAL_ERROR;
-
- bio->flags &= ~(WOLFSSL_BIO_FLAG_RETRY); /* default no retry */
- ret = wolfSSL_read((WOLFSSL*)bio->ptr, buf, len);
- if (ret == 0)
- front->eof = 1;
- else if (ret < 0) {
- int err = wolfSSL_get_error((WOLFSSL*)bio->ptr, 0);
- if ( !(err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) ) {
- front->eof = 1;
- }
- else {
- bio->flags |= WOLFSSL_BIO_FLAG_RETRY; /* should retry */
- }
- }
-
- return ret;
-}
-
-static int wolfSSL_BIO_MD_read(WOLFSSL_BIO* bio, void* buf, int sz)
-{
- if (wolfSSL_EVP_MD_CTX_type((WOLFSSL_EVP_MD_CTX*)bio->ptr) == NID_hmac) {
- if (wolfSSL_EVP_DigestSignUpdate((WOLFSSL_EVP_MD_CTX*)bio->ptr, buf,
- sz) != WOLFSSL_SUCCESS)
- {
- return WOLFSSL_FATAL_ERROR;
- }
- }
- else {
- if (wolfSSL_EVP_DigestUpdate((WOLFSSL_EVP_MD_CTX*)bio->ptr, buf, sz)
- != WOLFSSL_SUCCESS) {
- return WOLFSSL_FATAL_ERROR;
- }
- }
- return sz;
-}
-#endif /* WOLFCRYPT_ONLY */
-
-
-/* Used to read data from a WOLFSSL_BIO structure
- *
- * bio structure to read data from
- * buf buffer to hold the result
- * len length of buf buffer
- *
- * returns the number of bytes read on success
- */
-int wolfSSL_BIO_read(WOLFSSL_BIO* bio, void* buf, int len)
-{
- int ret = 0;
- WOLFSSL_BIO* front = bio;
- int sz = 0;
-
- WOLFSSL_ENTER("wolfSSL_BIO_read");
-
- /* info cb, abort if user returns <= 0*/
- if (front != NULL && front->infoCb != NULL) {
- ret = (int)front->infoCb(front, WOLFSSL_BIO_CB_READ, (const char*)buf,
- len, 0, 1);
- if (ret <= 0) {
- return ret;
- }
- }
-
- /* start at end of list and work backwards */
- while ((bio != NULL) && (bio->next != NULL)) {
- bio = bio->next;
- }
-
- while (bio != NULL && ret >= 0) {
- /* check for custom read */
- if (bio->method && bio->method->readCb) {
- ret = bio->method->readCb(bio, (char*)buf, len);
- }
-
- /* formatting data */
- if (bio->type == WOLFSSL_BIO_BASE64 && ret > 0 && sz > 0) {
- ret = wolfSSL_BIO_BASE64_read(bio, buf, sz);
- }
-
- /* write BIOs */
- if (bio && bio->type == WOLFSSL_BIO_BIO) {
- ret = wolfSSL_BIO_BIO_read(bio, buf, len);
- }
-
- if (bio && bio->type == WOLFSSL_BIO_MEMORY) {
- ret = wolfSSL_BIO_MEMORY_read(bio, buf, len);
- }
-
- #ifndef NO_FILESYSTEM
- if (bio && bio->type == WOLFSSL_BIO_FILE) {
- ret = (int)XFREAD(buf, 1, len, (XFILE)bio->ptr);
- }
- #endif
-
- #ifndef WOLFCRYPT_ONLY
- if (bio && bio->type == WOLFSSL_BIO_SSL) {
- ret = wolfSSL_BIO_SSL_read(bio, buf, len, front);
- }
-
- /* data passing through BIO MD wrapper */
- if (bio && bio->type == WOLFSSL_BIO_MD && ret > 0) {
- ret = wolfSSL_BIO_MD_read(bio, buf, ret);
- }
- #endif
-
- /* case where front of list is done */
- if (bio == front) {
- break; /* at front of list so be done */
- }
-
- if (ret > 0) {
- sz = ret; /* adjust size for formatting */
- }
-
- /* previous WOLFSSL_BIO in list working towards head of list */
- bio = bio->prev;
- }
-
- /* info cb, user can override return value */
- if (front != NULL && front->infoCb != NULL) {
- ret = (int)front->infoCb(front,
- WOLFSSL_BIO_CB_READ | WOLFSSL_BIO_CB_RETURN,
- (const char*)buf, len, 0, ret);
- }
-
- return ret;
-}
-
-
-/* Converts data into base64 output
- *
- * returns the resulting buffer size on success.
- */
-static int wolfSSL_BIO_BASE64_write(WOLFSSL_BIO* bio, const void* data,
- word32 inLen, byte* out, word32* outLen)
-{
- byte* tmp = NULL;
- int ret = 0;
-
- WOLFSSL_ENTER("wolfSSL_BIO_BASE64_write");
-
- if (bio == NULL || data == NULL || out == NULL || outLen == NULL) {
- return BAD_FUNC_ARG;
- }
-
-#if defined(WOLFSSL_BASE64_ENCODE)
- tmp = (byte*)XMALLOC(*outLen, bio->heap, DYNAMIC_TYPE_TMP_BUFFER);
- if (tmp == NULL) {
- return WOLFSSL_FATAL_ERROR;
- }
-
- if ((bio->flags & WOLFSSL_BIO_FLAG_BASE64_NO_NL) ==
- WOLFSSL_BIO_FLAG_BASE64_NO_NL) {
- if (Base64_Encode_NoNl((const byte*)data, inLen,
- tmp, outLen) < 0) {
- ret = WOLFSSL_FATAL_ERROR;
- }
- }
- else {
- if (Base64_Encode((const byte*)data, inLen,
- tmp, outLen) < 0) {
- ret = WOLFSSL_FATAL_ERROR;
- }
- }
-
- if (ret != WOLFSSL_FATAL_ERROR) {
- ret = (int) inLen;
- XMEMCPY(out, tmp, *outLen);
-
- }
- XFREE(tmp, bio->heap, DYNAMIC_TYPE_TMP_BUFFER);
-#else
- (void)bio;
- (void)data;
- (void)inLen;
- (void)out;
- (void)outLen;
- (void)tmp;
- WOLFSSL_MSG("BASE64 encoding not compiled in");
-#endif
- return ret;
-}
-
-
-#ifndef WOLFCRYPT_ONLY
-/* Helper function for writing to a WOLFSSL_BIO_SSL type
- *
- * returns the amount written in bytes on success
- */
-static int wolfSSL_BIO_SSL_write(WOLFSSL_BIO* bio, const void* data,
- int len, WOLFSSL_BIO* front)
-{
- int ret;
-
- WOLFSSL_ENTER("wolfSSL_BIO_SSL_write");
-
- if (bio->ptr == NULL) {
- return BAD_FUNC_ARG;
- }
-
- bio->flags &= ~(WOLFSSL_BIO_FLAG_RETRY); /* default no retry */
- ret = wolfSSL_write((WOLFSSL*)bio->ptr, data, len);
- if (ret == 0)
- front->eof = 1;
- else if (ret < 0) {
- int err = wolfSSL_get_error((WOLFSSL*)bio->ptr, 0);
- if ( !(err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) ) {
- front->eof = 1;
- }
- else {
- bio->flags |= WOLFSSL_BIO_FLAG_RETRY; /* should retry */
- }
- }
- return ret;
-}
-#endif /* WOLFCRYPT_ONLY */
-
-
-/* Writes to a WOLFSSL_BIO_BIO type.
- *
- * returns the amount written on success
- */
-static int wolfSSL_BIO_BIO_write(WOLFSSL_BIO* bio, const void* data,
- int len)
-{
- int sz;
- char* buf;
-
- WOLFSSL_ENTER("wolfSSL_BIO_BIO_write");
-
- /* adding in sanity checks for static analysis tools */
- if (bio == NULL || data == NULL) {
- return BAD_FUNC_ARG;
- }
-
- sz = wolfSSL_BIO_nwrite(bio, &buf, len);
-
- /* test space for write */
- if (sz <= 0) {
- WOLFSSL_MSG("No room left to write");
- return sz;
- }
-
- XMEMCPY(buf, data, sz);
-
- return sz;
-}
-
-
-/* for complete compatibility a bio memory write allocs its own memory
- * until the application runs out ....
- *
- * bio structure to hold incoming data
- * data buffer holding the data to be written
- * len length of data buffer
- *
- * returns the amount of data written on success and WOLFSSL_FAILURE or
- * WOLFSSL_BIO_ERROR for failure cases.
- */
-static int wolfSSL_BIO_MEMORY_write(WOLFSSL_BIO* bio, const void* data,
- int len)
-{
- int sz;
- const unsigned char* buf;
-
- WOLFSSL_ENTER("wolfSSL_BIO_MEMORY_write");
-
- if (bio == NULL || data == NULL) {
- return BAD_FUNC_ARG;
- }
-
- sz = wolfSSL_BIO_pending(bio);
- if (sz < 0) {
- WOLFSSL_MSG("Error getting memory data");
- return sz;
- }
-
- if (bio->ptr == NULL) {
- bio->ptr = (byte*)XMALLOC(len, bio->heap, DYNAMIC_TYPE_OPENSSL);
- if (bio->ptr == NULL) {
- WOLFSSL_MSG("Error on malloc");
- return WOLFSSL_FAILURE;
- }
- bio->num = len;
- if (bio->mem_buf != NULL) {
- bio->mem_buf->data = (char*)bio->ptr;
- bio->mem_buf->length = bio->num;
- }
- }
-
- /* check if will fit in current buffer size */
- if (wolfSSL_BIO_get_mem_data(bio, (void*)&buf) < 0) {
- return WOLFSSL_BIO_ERROR;
- }
- if (bio->num < sz + len) {
- bio->ptr = (byte*)XREALLOC(bio->ptr, sz + len, bio->heap,
- DYNAMIC_TYPE_OPENSSL);
- if (bio->ptr == NULL) {
- WOLFSSL_MSG("Error on realloc");
- return WOLFSSL_FAILURE;
- }
- bio->num = sz + len;
- if (bio->mem_buf != NULL) {
- bio->mem_buf->data = (char*)bio->ptr;
- bio->mem_buf->length = bio->num;
- }
- }
-
- XMEMCPY((byte*)bio->ptr + sz, data, len);
- bio->wrSz += len;
-
- return len;
-}
-
-
-#ifndef WOLFCRYPT_ONLY
-/* Helper function for writing to a WOLFSSL_BIO_MD type
- *
- * returns the amount written in bytes on success (0)
- */
-static int wolfSSL_BIO_MD_write(WOLFSSL_BIO* bio, const void* data, int len)
-{
- int ret = 0;
-
- if (bio == NULL || data == NULL) {
- return BAD_FUNC_ARG;
- }
-
- if (wolfSSL_EVP_MD_CTX_type((WOLFSSL_EVP_MD_CTX*)bio->ptr) == NID_hmac) {
- if (wolfSSL_EVP_DigestSignUpdate((WOLFSSL_EVP_MD_CTX*)bio->ptr, data,
- len) != WOLFSSL_SUCCESS) {
- ret = WOLFSSL_BIO_ERROR;
- }
- }
- else {
- if (wolfSSL_EVP_DigestUpdate((WOLFSSL_EVP_MD_CTX*)bio->ptr, data, len)
- != WOLFSSL_SUCCESS) {
- ret = WOLFSSL_BIO_ERROR;
- }
- }
- return ret;
-}
-#endif /* WOLFCRYPT_ONLY */
-
-
-/* Writes data to a WOLFSSL_BIO structure
- *
- * bio structure to write to
- * data holds the data to be written
- * len length of data buffer
- *
- * returns the amount written in bytes on success
- */
-int wolfSSL_BIO_write(WOLFSSL_BIO* bio, const void* data, int len)
-{
- int ret = 0;
- int retB64 = 0;
- WOLFSSL_BIO* front = bio;
- void* frmt = NULL;
- word32 frmtSz = 0;
-
- WOLFSSL_ENTER("wolfSSL_BIO_write");
-
- /* info cb, abort if user returns <= 0*/
- if (front != NULL && front->infoCb != NULL) {
- ret = (int)front->infoCb(front, WOLFSSL_BIO_CB_WRITE,
- (const char*)data, len, 0, 1);
- if (ret <= 0) {
- return ret;
- }
- }
-
- while (bio != NULL && ret >= 0) {
- /* check for custom write */
- if (bio->method && bio->method->writeCb) {
- ret = bio->method->writeCb(bio, (const char*)data, len);
- }
-
- /* check for formatting */
- if (bio->type == WOLFSSL_BIO_BASE64) {
-#if defined(WOLFSSL_BASE64_ENCODE)
- word32 sz = 0;
-
- if (bio->flags & WOLFSSL_BIO_FLAG_BASE64_NO_NL) {
- if (Base64_Encode_NoNl((const byte*)data, len, NULL,
- &sz) != LENGTH_ONLY_E) {
- WOLFSSL_MSG("Error with base 64 get length");
- ret = SSL_FATAL_ERROR;
- }
- }
- else {
- if (Base64_Encode((const byte*)data, len, NULL, &sz) !=
- LENGTH_ONLY_E) {
- WOLFSSL_MSG("Error with base 64 get length");
- ret = SSL_FATAL_ERROR;
- }
- }
-
- if (frmt == NULL && sz > 0 && ret != SSL_FATAL_ERROR) {
- frmt = (void*)XMALLOC(sz, front->heap,
- DYNAMIC_TYPE_TMP_BUFFER);
- if (frmt == NULL) {
- WOLFSSL_MSG("Memory error");
- ret = SSL_FATAL_ERROR;
- }
- frmtSz = sz;
- }
- else if (sz > frmtSz) {
- frmt = (void*)XREALLOC(frmt, sz, front->heap,
- DYNAMIC_TYPE_TMP_BUFFER);
- if (frmt == NULL) {
- WOLFSSL_MSG("Memory error");
- ret = SSL_FATAL_ERROR;
- }
- /* since frmt already existed then data should point to knew
- formatted buffer */
- data = frmt;
- len = frmtSz;
- frmtSz = sz;
- }
-#endif /* defined(WOLFSSL_BASE64_ENCODE) */
-
- if (ret >= 0) {
- /* change so that data is formatted buffer */
- retB64 = wolfSSL_BIO_BASE64_write(bio, data, (word32)len,
- (byte*)frmt, &frmtSz);
- data = frmt;
- len = frmtSz;
- }
- }
-
- /* write bios */
- if (bio && bio->type == WOLFSSL_BIO_BIO) {
- ret = wolfSSL_BIO_BIO_write(bio, data, len);
- }
-
- if (bio && bio->type == WOLFSSL_BIO_MEMORY) {
- ret = wolfSSL_BIO_MEMORY_write(bio, data, len);
- }
-
- #ifndef NO_FILESYSTEM
- if (bio && bio->type == WOLFSSL_BIO_FILE) {
- ret = (int)XFWRITE(data, 1, len, (XFILE)bio->ptr);
- }
- #endif
-
- #ifndef WOLFCRYPT_ONLY
- if (bio && bio->type == WOLFSSL_BIO_SSL) {
- /* already got eof, again is error */
- if (front->eof) {
- ret = SSL_FATAL_ERROR;
- }
- else {
- ret = wolfSSL_BIO_SSL_write(bio, data, len, front);
- }
- }
-
- if (bio && bio->type == WOLFSSL_BIO_MD) {
- if (bio->next != NULL) { /* data passing through MD BIO */
- ret = wolfSSL_BIO_MD_write(bio, data, len);
- }
- }
- #endif /* WOLFCRYPT_ONLY */
-
- /* advance to the next bio in list */
- bio = bio->next;
- }
-
- /* info cb, user can override return value */
- if (front != NULL && front->infoCb != NULL) {
- ret = (int)front->infoCb(front,
- WOLFSSL_BIO_CB_WRITE | WOLFSSL_BIO_CB_RETURN,
- (const char*)data, 0, 0, ret);
- }
-
- if (frmt != NULL) {
- XFREE(frmt, front->heap, DYNAMIC_TYPE_TMP_BUFFER);
- }
-
- if (retB64 != 0)
- return retB64;
- else
- return ret;
-}
-
-
-/* Wrapper for other BIO type functions, expected to grow as OpenSSL compatibility
- * layer grows.
- *
- * return info. specific to the cmd that is passed in.
- */
-#if defined(OPENSSL_ALL) || defined(OPENSSL_EXTRA)
-long wolfSSL_BIO_ctrl(WOLFSSL_BIO *bio, int cmd, long larg, void *parg)
-{
- long ret;
-
- (void)larg; /* not currently used */
-
- WOLFSSL_ENTER("wolfSSL_BIO_ctrl");
-
- if (bio && bio->method && bio->method->ctrlCb) {
- return bio->method->ctrlCb(bio, cmd, larg, parg);
- }
-
- switch(cmd) {
- case BIO_CTRL_PENDING:
- case BIO_CTRL_WPENDING:
- ret = (long)wolfSSL_BIO_ctrl_pending(bio);
- break;
- case BIO_CTRL_INFO:
- ret = (long)wolfSSL_BIO_get_mem_data(bio, parg);
- break;
- case BIO_CTRL_FLUSH:
- ret = (long)wolfSSL_BIO_flush(bio);
- break;
- case BIO_CTRL_RESET:
- ret = (long)wolfSSL_BIO_reset(bio);
- break;
- default:
- WOLFSSL_MSG("CMD not yet implemented");
- ret = WOLFSSL_FAILURE;
- break;
- }
- return ret;
-}
-#endif
-
-
-/* helper function for wolfSSL_BIO_gets
- * size till a newline is hit
- * returns the number of bytes including the new line character
- */
-static int wolfSSL_getLineLength(char* in, int inSz)
-{
- int i;
-
- for (i = 0; i < inSz; i++) {
- if (in[i] == '\n') {
- return i + 1; /* includes new line character */
- }
- }
-
- return inSz; /* rest of buffer is all one line */
-}
-
-
-/* Gets the next line from bio. Goes until a new line character or end of
- * buffer is reached.
- *
- * bio the structure to read a new line from
- * buf buffer to hold the result
- * sz the size of "buf" buffer
- *
- * returns the size of the result placed in buf on success and a 0 or negative
- * value in an error case.
- */
-int wolfSSL_BIO_gets(WOLFSSL_BIO* bio, char* buf, int sz)
-{
- int ret = WOLFSSL_BIO_UNSET;
-
- WOLFSSL_ENTER("wolfSSL_BIO_gets");
-
- if (bio == NULL || buf == NULL) {
- return WOLFSSL_FAILURE;
- }
-
- /* not enough space for character plus terminator */
- if (sz <= 1) {
- return 0;
- }
-
- /* info cb, abort if user returns <= 0*/
- if (bio->infoCb != NULL) {
- ret = (int)bio->infoCb(bio, WOLFSSL_BIO_CB_GETS, buf, sz, 0, 1);
- if (ret <= 0) {
- return ret;
- }
- }
-
- /* check if is custom method */
- if (bio->method && bio->method->getsCb) {
- return bio->method->getsCb(bio, buf, sz);
- }
-
- switch (bio->type) {
-#ifndef NO_FILESYSTEM
- case WOLFSSL_BIO_FILE:
- if (((XFILE)bio->ptr) == XBADFILE) {
- return WOLFSSL_BIO_ERROR;
- }
-
- #if defined(MICRIUM) || defined(LSR_FS) || defined(EBSNET)
- WOLFSSL_MSG("XFGETS not ported for this system yet");
- ret = XFGETS(buf, sz, (XFILE)bio->ptr);
- #else
- if (XFGETS(buf, sz, (XFILE)bio->ptr) != NULL) {
- ret = (int)XSTRLEN(buf);
- }
- else {
- ret = WOLFSSL_BIO_ERROR;
- }
- #endif
- break;
-#endif /* NO_FILESYSTEM */
- case WOLFSSL_BIO_MEMORY:
- {
- const byte* c;
- int cSz;
- cSz = wolfSSL_BIO_pending(bio);
- if (cSz == 0) {
- ret = 0; /* Nothing to read */
- buf[0] = '\0';
- break;
- }
-
- if (wolfSSL_BIO_get_mem_data(bio, (void*)&c) <= 0) {
- ret = WOLFSSL_BIO_ERROR;
- break;
- }
-
- cSz = wolfSSL_getLineLength((char*)c, cSz);
- /* check case where line was bigger then buffer and buffer
- * needs end terminator */
- if (cSz >= sz) {
- cSz = sz - 1;
- buf[cSz] = '\0';
- }
- else {
- /* not minus 1 here because placing terminator after
- msg and have checked that sz is large enough */
- buf[cSz] = '\0';
- }
-
- ret = wolfSSL_BIO_MEMORY_read(bio, (void*)buf, cSz);
- /* ret is read after the switch statement */
- break;
- }
- case WOLFSSL_BIO_BIO:
- {
- char* c;
- int cSz;
- cSz = wolfSSL_BIO_nread0(bio, &c);
- if (cSz == 0) {
- ret = 0; /* Nothing to read */
- buf[0] = '\0';
- break;
- }
-
- cSz = wolfSSL_getLineLength(c, cSz);
- /* check case where line was bigger then buffer and buffer
- * needs end terminator */
- if (cSz >= sz) {
- cSz = sz - 1;
- buf[cSz] = '\0';
- }
- else {
- /* not minus 1 here because placing terminator after
- msg and have checked that sz is large enough */
- buf[cSz] = '\0';
- }
-
- ret = wolfSSL_BIO_nread(bio, &c, cSz);
- if (ret > 0 && ret < sz) {
- XMEMCPY(buf, c, ret);
- }
- break;
- }
-
-#ifndef WOLFCRYPT_ONLY
- /* call final on hash */
- case WOLFSSL_BIO_MD:
- if (wolfSSL_EVP_MD_CTX_size((WOLFSSL_EVP_MD_CTX*)bio->ptr) > sz) {
- WOLFSSL_MSG("Output buffer was too small for digest");
- ret = WOLFSSL_FAILURE;
- }
- else {
- unsigned int szOut = 0;
- ret = wolfSSL_EVP_DigestFinal((WOLFSSL_EVP_MD_CTX*)bio->ptr,
- (unsigned char*)buf, &szOut);
- if (ret == WOLFSSL_SUCCESS) {
- ret = szOut;
- }
- }
- break;
-#endif /* WOLFCRYPT_ONLY */
-
- default:
- WOLFSSL_MSG("BIO type not supported yet with wolfSSL_BIO_gets");
- }
-
- /* info cb, user can override return value */
- if (bio->infoCb != NULL) {
- ret = (int)bio->infoCb(bio, WOLFSSL_BIO_CB_GETS | WOLFSSL_BIO_CB_RETURN,
- buf, sz, 0, ret);
- }
-
- return ret;
-}
-
-
-/* Writes a null terminated string to bio.
- *
- * bio the structure to write to
- * buf buffer to holding input string
- *
- * returns the size of the result placed in bio on success and a 0 or negative
- * value in an error case. -2 is returned if the implementation is not
- * supported for the BIO type.
- */
-int wolfSSL_BIO_puts(WOLFSSL_BIO* bio, const char* buf)
-{
- int sz;
-
- if (bio == NULL || buf == NULL) {
- return WOLFSSL_FATAL_ERROR;
- }
-
- /* check if is custom method */
- if (bio->method && bio->method->putsCb) {
- return bio->method->putsCb(bio, buf);
- }
-
- sz = (int)XSTRLEN(buf);
- if (sz <= 0) {
- return WOLFSSL_FATAL_ERROR;
- }
-
- return wolfSSL_BIO_write(bio, buf, sz);
-}
-
-
-/* searches through bio list for a BIO of type "type"
- * returns NULL on failure to find a given type */
-WOLFSSL_BIO* wolfSSL_BIO_find_type(WOLFSSL_BIO* bio, int type)
-{
- WOLFSSL_BIO* local = NULL;
- WOLFSSL_BIO* current;
-
- WOLFSSL_ENTER("wolfSSL_BIO_find_type");
-
- if (bio == NULL) {
- return local;
- }
-
- current = bio;
- while (current != NULL) {
- if (current->type == type) {
- WOLFSSL_MSG("Found matching WOLFSSL_BIO type");
- local = current;
- break;
- }
- current = current->next;
- }
-
- return local;
-}
-
-
-/* returns a pointer to the next WOLFSSL_BIO in the chain on success.
- * If a failure case then NULL is returned */
-WOLFSSL_BIO* wolfSSL_BIO_next(WOLFSSL_BIO* bio)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_next");
-
- if (bio == NULL) {
- WOLFSSL_MSG("Bad argument passed in");
- return NULL;
- }
-
- return bio->next;
-}
-
-/* BIO_wpending returns the number of bytes pending to be written. */
-size_t wolfSSL_BIO_wpending(const WOLFSSL_BIO *bio)
-{
- WOLFSSL_ENTER("BIO_wpending");
-
- if (bio == NULL)
- return 0;
-
- if (bio->type == WOLFSSL_BIO_MEMORY) {
- return bio->wrSz;
- }
-
- /* type BIO_BIO then check paired buffer */
- if (bio->type == WOLFSSL_BIO_BIO && bio->pair != NULL) {
- WOLFSSL_BIO* pair = bio->pair;
- return pair->wrIdx;
- }
-
- return 0;
-}
-
-/* Return the number of pending bytes in read and write buffers */
-size_t wolfSSL_BIO_ctrl_pending(WOLFSSL_BIO *bio)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_ctrl_pending");
- if (bio == NULL) {
- return 0;
- }
-
- if (bio->type == WOLFSSL_BIO_MD) {
- /* MD is a wrapper only get next bio */
- while (bio->next != NULL) {
- bio = bio->next;
- if (bio->type != WOLFSSL_BIO_MD) {
- break;
- }
- }
- }
-
-#ifndef WOLFCRYPT_ONLY
- if (bio->type == WOLFSSL_BIO_SSL && bio->ptr != NULL) {
- return (long)wolfSSL_pending((WOLFSSL*)bio->ptr);
- }
-#endif
-
- if (bio->type == WOLFSSL_BIO_MEMORY) {
- return bio->wrSz;
- }
-
- /* type BIO_BIO then check paired buffer */
- if (bio->type == WOLFSSL_BIO_BIO && bio->pair != NULL) {
- WOLFSSL_BIO* pair = bio->pair;
- if (pair->wrIdx > 0 && pair->wrIdx <= pair->rdIdx) {
- /* in wrap around state where beginning of buffer is being
- * overwritten */
- return pair->wrSz - pair->rdIdx + pair->wrIdx;
- }
- else {
- /* simple case where has not wrapped around */
- return pair->wrIdx - pair->rdIdx;
- }
- }
- return 0;
-}
-
-
-long wolfSSL_BIO_get_mem_ptr(WOLFSSL_BIO *bio, WOLFSSL_BUF_MEM **ptr)
-{
- WOLFSSL_BIO* front = bio;
- long ret = WOLFSSL_FAILURE;
-
- WOLFSSL_ENTER("wolfSSL_BIO_get_mem_ptr");
-
- if (bio == NULL || ptr == NULL) {
- return WOLFSSL_FAILURE;
- }
-
- /* start at end and work backwards to find a memory BIO in the BIO chain */
- while ((bio != NULL) && (bio->next != NULL)) {
- bio = bio->next;
- }
-
- while (bio != NULL) {
-
- if (bio->type == WOLFSSL_BIO_MEMORY) {
- *ptr = bio->mem_buf;
- ret = WOLFSSL_SUCCESS;
- }
-
- if (bio == front) {
- break;
- }
- bio = bio->prev;
- }
-
- return ret;
-}
-
-WOLFSSL_API long wolfSSL_BIO_int_ctrl(WOLFSSL_BIO *bp, int cmd, long larg, int iarg)
-{
- (void) bp;
- (void) cmd;
- (void) larg;
- (void) iarg;
- WOLFSSL_STUB("BIO_int_ctrl");
- return 0;
-}
-
-
-int wolfSSL_BIO_set_write_buf_size(WOLFSSL_BIO *bio, long size)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_set_write_buf_size");
-
- if (bio == NULL || bio->type != WOLFSSL_BIO_BIO || size < 0) {
- return WOLFSSL_FAILURE;
- }
-
- /* if already in pair then do not change size */
- if (bio->pair != NULL) {
- WOLFSSL_MSG("WOLFSSL_BIO is paired, free from pair before changing");
- return WOLFSSL_FAILURE;
- }
-
- bio->wrSz = (int)size;
- if (bio->wrSz < 0) {
- WOLFSSL_MSG("Unexpected negative size value");
- return WOLFSSL_FAILURE;
- }
-
- if (bio->ptr != NULL) {
- XFREE(bio->ptr, bio->heap, DYNAMIC_TYPE_OPENSSL);
- }
-
- bio->ptr = (byte*)XMALLOC(bio->wrSz, bio->heap, DYNAMIC_TYPE_OPENSSL);
- if (bio->ptr == NULL) {
- WOLFSSL_MSG("Memory allocation error");
- return WOLFSSL_FAILURE;
- }
- bio->num = bio->wrSz;
- bio->wrIdx = 0;
- bio->rdIdx = 0;
- if (bio->mem_buf != NULL) {
- bio->mem_buf->data = (char*)bio->ptr;
- bio->mem_buf->length = bio->num;
- }
-
- return WOLFSSL_SUCCESS;
-}
-
-
-/* Joins two BIO_BIO types. The write of b1 goes to the read of b2 and vice
- * versa. Creating something similar to a two way pipe.
- * Reading and writing between the two BIOs is not thread safe, they are
- * expected to be used by the same thread. */
-int wolfSSL_BIO_make_bio_pair(WOLFSSL_BIO *b1, WOLFSSL_BIO *b2)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_make_bio_pair");
-
- if (b1 == NULL || b2 == NULL) {
- WOLFSSL_LEAVE("wolfSSL_BIO_make_bio_pair", BAD_FUNC_ARG);
- return WOLFSSL_FAILURE;
- }
-
- /* both are expected to be of type BIO and not already paired */
- if (b1->type != WOLFSSL_BIO_BIO || b2->type != WOLFSSL_BIO_BIO ||
- b1->pair != NULL || b2->pair != NULL) {
- WOLFSSL_MSG("Expected type BIO and not already paired");
- return WOLFSSL_FAILURE;
- }
-
- /* set default write size if not already set */
- if (b1->ptr == NULL && wolfSSL_BIO_set_write_buf_size(b1,
- WOLFSSL_BIO_SIZE) != WOLFSSL_SUCCESS) {
- return WOLFSSL_FAILURE;
- }
-
- if (b2->ptr == NULL && wolfSSL_BIO_set_write_buf_size(b2,
- WOLFSSL_BIO_SIZE) != WOLFSSL_SUCCESS) {
- return WOLFSSL_FAILURE;
- }
-
- b1->pair = b2;
- b2->pair = b1;
-
- return WOLFSSL_SUCCESS;
-}
-
-
-int wolfSSL_BIO_ctrl_reset_read_request(WOLFSSL_BIO *b)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_ctrl_reset_read_request");
-
- if (b == NULL || b->type == WOLFSSL_BIO_MEMORY) {
- return SSL_FAILURE;
- }
-
- b->readRq = 0;
-
- return WOLFSSL_SUCCESS;
-}
-
-
-/* Does not advance read index pointer */
-int wolfSSL_BIO_nread0(WOLFSSL_BIO *bio, char **buf)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_nread0");
-
- if (bio == NULL || buf == NULL) {
- WOLFSSL_MSG("NULL argument passed in");
- return 0;
- }
-
- /* if paired read from pair */
- if (bio->pair != NULL) {
- WOLFSSL_BIO* pair = bio->pair;
-
- /* case where have wrapped around write buffer */
- *buf = (char*)pair->ptr + pair->rdIdx;
- if (pair->wrIdx > 0 && pair->rdIdx >= pair->wrIdx) {
- return pair->wrSz - pair->rdIdx;
- }
- else {
- return pair->wrIdx - pair->rdIdx;
- }
- }
-
- return 0;
-}
-
-
-/* similar to wolfSSL_BIO_nread0 but advances the read index */
-int wolfSSL_BIO_nread(WOLFSSL_BIO *bio, char **buf, int num)
-{
- int sz = WOLFSSL_BIO_UNSET;
-
- WOLFSSL_ENTER("wolfSSL_BIO_nread");
-
- if (bio == NULL || buf == NULL) {
- WOLFSSL_MSG("NULL argument passed in");
- return WOLFSSL_FAILURE;
- }
-
- if (bio->type == WOLFSSL_BIO_MEMORY) {
- return SSL_FAILURE;
- }
-
- if (bio->pair != NULL) {
- /* special case if asking to read 0 bytes */
- if (num == 0) {
- *buf = (char*)bio->pair->ptr + bio->pair->rdIdx;
- return 0;
- }
-
- /* get amount able to read and set buffer pointer */
- sz = wolfSSL_BIO_nread0(bio, buf);
- if (sz == 0) {
- return WOLFSSL_BIO_ERROR;
- }
-
- if (num < sz) {
- sz = num;
- }
- bio->pair->rdIdx += sz;
-
- /* check if have read to the end of the buffer and need to reset */
- if (bio->pair->rdIdx == bio->pair->wrSz) {
- bio->pair->rdIdx = 0;
- if (bio->pair->wrIdx == bio->pair->wrSz) {
- bio->pair->wrIdx = 0;
- }
- }
-
- /* check if read up to write index, if so then reset index */
- if (bio->pair->rdIdx == bio->pair->wrIdx) {
- bio->pair->rdIdx = 0;
- bio->pair->wrIdx = 0;
- }
- }
-
- return sz;
-}
-
-
-int wolfSSL_BIO_nwrite(WOLFSSL_BIO *bio, char **buf, int num)
-{
- int sz = WOLFSSL_BIO_UNSET;
-
- WOLFSSL_ENTER("wolfSSL_BIO_nwrite");
-
- if (bio == NULL || buf == NULL) {
- WOLFSSL_MSG("NULL argument passed in");
- return 0;
- }
-
- if (bio->type != WOLFSSL_BIO_BIO) {
- return SSL_FAILURE;
- }
-
- if (bio->pair != NULL) {
- if (num == 0) {
- *buf = (char*)bio->ptr + bio->wrIdx;
- return 0;
- }
-
- if (bio->wrIdx < bio->rdIdx) {
- /* if wrapped around only write up to read index. In this case
- * rdIdx is always greater then wrIdx so sz will not be negative. */
- sz = bio->rdIdx - bio->wrIdx;
- }
- else if (bio->rdIdx > 0 && bio->wrIdx == bio->rdIdx) {
- return WOLFSSL_BIO_ERROR; /* no more room to write */
- }
- else {
- /* write index is past read index so write to end of buffer */
- sz = bio->wrSz - bio->wrIdx;
-
- if (sz <= 0) {
- /* either an error has occurred with write index or it is at the
- * end of the write buffer. */
- if (bio->rdIdx == 0) {
- /* no more room, nothing has been read */
- return WOLFSSL_BIO_ERROR;
- }
-
- bio->wrIdx = 0;
-
- /* check case where read index is not at 0 */
- if (bio->rdIdx > 0) {
- sz = bio->rdIdx; /* can write up to the read index */
- }
- else {
- sz = bio->wrSz; /* no restriction other then buffer size */
- }
- }
- }
-
- if (num < sz) {
- sz = num;
- }
- *buf = (char*)bio->ptr + bio->wrIdx;
- bio->wrIdx += sz;
-
- /* if at the end of the buffer and space for wrap around then set
- * write index back to 0 */
- if (bio->wrIdx == bio->wrSz && bio->rdIdx > 0) {
- bio->wrIdx = 0;
- }
- }
-
- return sz;
-}
-
-
-/* Reset BIO to initial state */
-int wolfSSL_BIO_reset(WOLFSSL_BIO *bio)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_reset");
-
- if (bio == NULL) {
- WOLFSSL_MSG("NULL argument passed in");
- /* -1 is consistent failure even for FILE type */
- return WOLFSSL_BIO_ERROR;
- }
-
- switch (bio->type) {
- #ifndef NO_FILESYSTEM
- case WOLFSSL_BIO_FILE:
- XREWIND((XFILE)bio->ptr);
- return 0;
- #endif
-
- case WOLFSSL_BIO_BIO:
- bio->rdIdx = 0;
- bio->wrIdx = 0;
- return 0;
-
- case WOLFSSL_BIO_MEMORY:
- bio->rdIdx = 0;
- bio->wrIdx = 0;
- bio->wrSz = 0;
- XFREE(bio->ptr, bio->heap, DYNAMIC_TYPE_OPENSSL);
- bio->ptr = NULL;
- bio->num = 0;
- if (bio->mem_buf != NULL) {
- bio->mem_buf->data = (char*)bio->ptr;
- bio->mem_buf->length = bio->num;
- }
- return 0;
-
-#ifndef WOLFCRYPT_ONLY
- case WOLFSSL_BIO_MD:
- if (bio->ptr != NULL) {
- const WOLFSSL_EVP_MD* md =
- wolfSSL_EVP_MD_CTX_md((WOLFSSL_EVP_MD_CTX*)bio->ptr);
- wolfSSL_EVP_MD_CTX_init((WOLFSSL_EVP_MD_CTX*)bio->ptr);
- wolfSSL_EVP_DigestInit((WOLFSSL_EVP_MD_CTX*)bio->ptr, md);
- }
- return 0;
-#endif /* WOLFCRYPT_ONLY */
-
- default:
- WOLFSSL_MSG("Unknown BIO type needs added to reset function");
- }
-
- return WOLFSSL_BIO_ERROR;
-}
-
-#ifndef NO_FILESYSTEM
-long wolfSSL_BIO_set_fp(WOLFSSL_BIO *bio, XFILE fp, int c)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_set_fp");
-
- if (bio == NULL || fp == XBADFILE) {
- WOLFSSL_LEAVE("wolfSSL_BIO_set_fp", BAD_FUNC_ARG);
- return WOLFSSL_FAILURE;
- }
-
- if (bio->type != WOLFSSL_BIO_FILE) {
- return WOLFSSL_FAILURE;
- }
-
- bio->shutdown = (byte)c;
- bio->ptr = (XFILE)fp;
-
- return WOLFSSL_SUCCESS;
-}
-
-
-long wolfSSL_BIO_get_fp(WOLFSSL_BIO *bio, XFILE* fp)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_get_fp");
-
- if (bio == NULL || fp == XBADFILE) {
- return WOLFSSL_FAILURE;
- }
-
- if (bio->type != WOLFSSL_BIO_FILE) {
- return SSL_FAILURE;
- }
-
- *fp = (XFILE)bio->ptr;
-
- return WOLFSSL_SUCCESS;
-}
-
-/* overwrites file */
-int wolfSSL_BIO_write_filename(WOLFSSL_BIO *bio, char *name)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_write_filename");
-
- if (bio == NULL || name == NULL) {
- return WOLFSSL_FAILURE;
- }
-
- if (bio->type == WOLFSSL_BIO_FILE) {
- if (((XFILE)bio->ptr) != XBADFILE && bio->shutdown == BIO_CLOSE) {
- XFCLOSE((XFILE)bio->ptr);
- }
-
- bio->ptr = XFOPEN(name, "w");
- if (((XFILE)bio->ptr) == XBADFILE) {
- return WOLFSSL_FAILURE;
- }
- bio->shutdown = BIO_CLOSE;
-
- return WOLFSSL_SUCCESS;
- }
-
- return WOLFSSL_FAILURE;
-}
-
-
-int wolfSSL_BIO_seek(WOLFSSL_BIO *bio, int ofs)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_seek");
-
- if (bio == NULL) {
- return -1;
- }
-
- /* offset ofs from beginning of file */
- if (bio->type == WOLFSSL_BIO_FILE &&
- XFSEEK((XFILE)bio->ptr, ofs, SEEK_SET) < 0) {
- return -1;
- }
-
- return 0;
-}
-#endif /* NO_FILESYSTEM */
-
-
-long wolfSSL_BIO_set_mem_eof_return(WOLFSSL_BIO *bio, int v)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_set_mem_eof_return");
-
- if (bio != NULL) {
- bio->eof = v;
- }
-
- return 0;
-}
-
-int wolfSSL_BIO_get_len(WOLFSSL_BIO *bio)
-{
- int len;
-#ifndef NO_FILESYSTEM
- long memSz = 0, curr = 0;
- XFILE file;
-#endif
-
- WOLFSSL_ENTER("wolfSSL_BIO_get_len");
-
- if ((len = wolfSSL_BIO_pending(bio)) > 0) {
- }
-#ifndef NO_FILESYSTEM
- else if (bio->type == WOLFSSL_BIO_FILE) {
- if (wolfSSL_BIO_get_fp(bio, &file) != WOLFSSL_SUCCESS)
- len = BAD_FUNC_ARG;
- if (len == 0) {
- curr = XFTELL(file);
- if (curr < 0) {
- len = WOLFSSL_BAD_FILE;
- }
- if (XFSEEK(file, 0, XSEEK_END) != 0)
- len = WOLFSSL_BAD_FILE;
- }
- if (len == 0) {
- memSz = XFTELL(file);
- if (memSz > MAX_WOLFSSL_FILE_SIZE || memSz < 0)
- len = WOLFSSL_BAD_FILE;
- }
- if (len == 0) {
- memSz -= curr;
- len = (int)memSz;
- if (XFSEEK(file, curr, SEEK_SET) != 0)
- len = WOLFSSL_BAD_FILE;
- }
- }
-#endif
- return len;
-}
-
-
-void wolfSSL_BIO_set_callback(WOLFSSL_BIO *bio, wolf_bio_info_cb callback_func)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_set_callback");
-
- if (bio != NULL) {
- bio->infoCb = callback_func;
- }
-}
-
-
-wolf_bio_info_cb wolfSSL_BIO_get_callback(WOLFSSL_BIO *bio)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_get_callback");
-
- if (bio != NULL) {
- return bio->infoCb;
- }
-
- return NULL;
-}
-
-
-void wolfSSL_BIO_set_callback_arg(WOLFSSL_BIO *bio, char *arg)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_set_callback_arg");
-
- if (bio != NULL) {
- bio->infoArg = arg;
- }
-}
-
-
-char* wolfSSL_BIO_get_callback_arg(const WOLFSSL_BIO *bio)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_get_callback_arg");
-
- if (bio != NULL) {
- return bio->infoArg;
- }
-
- return NULL;
-}
-
-
-/* store a user pointer in the WOLFSSL_BIO structure */
-void wolfSSL_BIO_set_data(WOLFSSL_BIO* bio, void *ptr)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_set_data");
-
- if (bio != NULL) {
- bio->usrCtx = ptr;
- }
-}
-
-
-void* wolfSSL_BIO_get_data(WOLFSSL_BIO* bio)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_get_data");
-
- if (bio != NULL)
- return bio->usrCtx;
-
- WOLFSSL_MSG("WOLFSSL_BIO was null");
- return NULL;
-}
-
-/* If flag is 0 then blocking is set, if 1 then non blocking.
- * Always returns 1
- */
-long wolfSSL_BIO_set_nbio(WOLFSSL_BIO* bio, long on)
-{
- int ret = 0;
- #ifndef WOLFSSL_DTLS
- (void)on;
- #endif
- WOLFSSL_ENTER("wolfSSL_BIO_set_nbio");
-
- switch (bio->type) {
- case WOLFSSL_BIO_SOCKET:
- #ifdef XFCNTL
- {
- int flag = XFCNTL(bio->num, F_GETFL, 0);
- if (on)
- ret = XFCNTL(bio->num, F_SETFL, flag | O_NONBLOCK);
- else
- ret = XFCNTL(bio->num, F_SETFL, flag & ~O_NONBLOCK);
- }
- #endif
- break;
- case WOLFSSL_BIO_SSL:
- #ifdef WOLFSSL_DTLS
- wolfSSL_dtls_set_using_nonblock((WOLFSSL*)bio->ptr, (int)on);
- #endif
- break;
-
- default:
- WOLFSSL_MSG("Unsupported bio type for non blocking");
- break;
- }
- if (ret != -1)
- return 1;
- else
- return 0;
-}
-
-
-
-/* creates a new custom WOLFSSL_BIO_METHOD */
-WOLFSSL_BIO_METHOD *wolfSSL_BIO_meth_new(int type, const char *name)
-{
- WOLFSSL_BIO_METHOD* meth;
-
- WOLFSSL_ENTER("wolfSSL_BIO_meth_new");
-
- meth = (WOLFSSL_BIO_METHOD*)XMALLOC(sizeof(WOLFSSL_BIO_METHOD), NULL,
- DYNAMIC_TYPE_OPENSSL);
- if (meth == NULL) {
- WOLFSSL_MSG("Error allocating memory for WOLFSSL_BIO_METHOD");
- return NULL;
- }
- XMEMSET(meth, 0, sizeof(WOLFSSL_BIO_METHOD));
- meth->type = (byte)type;
- XSTRNCPY(meth->name, name, MAX_BIO_METHOD_NAME - 1);
-
- return meth;
-}
-
-
-void wolfSSL_BIO_meth_free(WOLFSSL_BIO_METHOD *biom)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_meth_free");
- if (biom) {
- XFREE(biom, NULL, DYNAMIC_TYPE_OPENSSL);
- }
-}
-
-
-int wolfSSL_BIO_meth_set_write(WOLFSSL_BIO_METHOD *biom,
- wolfSSL_BIO_meth_write_cb biom_write)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_meth_set_write");
- if (biom) {
- biom->writeCb = biom_write;
- return WOLFSSL_SUCCESS;
- }
- return WOLFSSL_FAILURE;
-}
-
-
-int wolfSSL_BIO_meth_set_read(WOLFSSL_BIO_METHOD *biom,
- wolfSSL_BIO_meth_read_cb biom_read)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_meth_set_read");
- if (biom) {
- biom->readCb = biom_read;
- return WOLFSSL_SUCCESS;
- }
- return WOLFSSL_FAILURE;
-}
-
-
-int wolfSSL_BIO_meth_set_puts(WOLFSSL_BIO_METHOD *biom,
- wolfSSL_BIO_meth_puts_cb biom_puts)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_meth_set_puts");
- if (biom) {
- biom->putsCb = biom_puts;
- return WOLFSSL_SUCCESS;
- }
- return WOLFSSL_FAILURE;
-}
-
-
-int wolfSSL_BIO_meth_set_gets(WOLFSSL_BIO_METHOD *biom,
- wolfSSL_BIO_meth_gets_cb biom_gets)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_meth_set_gets");
- if (biom) {
- biom->getsCb = biom_gets;
- return WOLFSSL_SUCCESS;
- }
- return WOLFSSL_FAILURE;
-}
-
-
-int wolfSSL_BIO_meth_set_ctrl(WOLFSSL_BIO_METHOD *biom,
- wolfSSL_BIO_meth_ctrl_get_cb biom_ctrl)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_meth_set_ctrl");
- if (biom) {
- biom->ctrlCb = biom_ctrl;
- return WOLFSSL_SUCCESS;
- }
- return WOLFSSL_FAILURE;
-}
-
-
-int wolfSSL_BIO_meth_set_create(WOLFSSL_BIO_METHOD *biom,
- wolfSSL_BIO_meth_create_cb biom_create)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_meth_set_create");
- if (biom) {
- biom->createCb = biom_create;
- return WOLFSSL_SUCCESS;
- }
- return WOLFSSL_FAILURE;
-}
-
-
-int wolfSSL_BIO_meth_set_destroy(WOLFSSL_BIO_METHOD *biom,
- wolfSSL_BIO_meth_destroy_cb biom_destroy)
-{
- WOLFSSL_STUB("wolfSSL_BIO_meth_set_destroy");
- if (biom) {
- biom->freeCb = biom_destroy;
- return WOLFSSL_SUCCESS;
- }
- return WOLFSSL_FAILURE;
-}
-
-
-/* this compatibility function can be used for multiple BIO types */
-int wolfSSL_BIO_get_mem_data(WOLFSSL_BIO* bio, void* p)
-{
- WOLFSSL_ENTER("wolfSSL_BIO_get_mem_data");
-
- if (bio == NULL)
- return WOLFSSL_FATAL_ERROR;
-
- if (p) {
- *(byte**)p = (byte*)bio->ptr;
- }
-
- return bio->num;
-}
-
-int wolfSSL_BIO_pending(WOLFSSL_BIO* bio)
-{
- return (int)wolfSSL_BIO_ctrl_pending(bio);
-}
-
-
-int wolfSSL_BIO_flush(WOLFSSL_BIO* bio)
-{
- /* for wolfSSL no flushing needed */
- WOLFSSL_ENTER("BIO_flush");
- (void)bio;
- return 1;
-}
-#endif /* WOLFSSL_BIO_INCLUDED */
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/crl.c b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/crl.c
deleted file mode 100644
index 9200da0c6b..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/crl.c
+++ /dev/null
@@ -1,1309 +0,0 @@
-/* crl.c
- *
- * Copyright (C) 2006-2020 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * wolfSSL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
- */
-
-
- /* Name change compatibility layer no longer needs included here */
-
-#ifdef HAVE_CONFIG_H
- #include
-#endif
-
-#include
-
-#ifndef WOLFCRYPT_ONLY
-#ifdef HAVE_CRL
-
-#include
-#include
-
-#include
-
-#ifdef HAVE_CRL_MONITOR
- #if (defined(__MACH__) || defined(__FreeBSD__) || defined(__linux__))
- static int StopMonitor(int mfd);
- #else
- #error "CRL monitor only currently supported on linux or mach"
- #endif
-#endif /* HAVE_CRL_MONITOR */
-
-
-/* Initialize CRL members */
-int InitCRL(WOLFSSL_CRL* crl, WOLFSSL_CERT_MANAGER* cm)
-{
- WOLFSSL_ENTER("InitCRL");
- if(cm != NULL)
- crl->heap = cm->heap;
- else
- crl->heap = NULL;
- crl->cm = cm;
- crl->crlList = NULL;
- crl->monitors[0].path = NULL;
- crl->monitors[1].path = NULL;
-#ifdef HAVE_CRL_MONITOR
- crl->tid = 0;
- crl->mfd = -1; /* mfd for bsd is kqueue fd, eventfd for linux */
- crl->setup = 0; /* thread setup done predicate */
- if (pthread_cond_init(&crl->cond, 0) != 0) {
- WOLFSSL_MSG("Pthread condition init failed");
- return BAD_COND_E;
- }
-#endif
- if (wc_InitMutex(&crl->crlLock) != 0) {
- WOLFSSL_MSG("Init Mutex failed");
- return BAD_MUTEX_E;
- }
-
- return 0;
-}
-
-
-/* Initialize CRL Entry */
-static int InitCRL_Entry(CRL_Entry* crle, DecodedCRL* dcrl, const byte* buff,
- int verified, void* heap)
-{
- WOLFSSL_ENTER("InitCRL_Entry");
-
- XMEMCPY(crle->issuerHash, dcrl->issuerHash, CRL_DIGEST_SIZE);
- /* XMEMCPY(crle->crlHash, dcrl->crlHash, CRL_DIGEST_SIZE);
- * copy the hash here if needed for optimized comparisons */
- XMEMCPY(crle->lastDate, dcrl->lastDate, MAX_DATE_SIZE);
- XMEMCPY(crle->nextDate, dcrl->nextDate, MAX_DATE_SIZE);
- crle->lastDateFormat = dcrl->lastDateFormat;
- crle->nextDateFormat = dcrl->nextDateFormat;
-
- crle->certs = dcrl->certs; /* take ownsership */
- dcrl->certs = NULL;
- crle->totalCerts = dcrl->totalCerts;
- crle->verified = verified;
- if (!verified) {
- crle->tbsSz = dcrl->sigIndex - dcrl->certBegin;
- crle->signatureSz = dcrl->sigLength;
- crle->signatureOID = dcrl->signatureOID;
- crle->toBeSigned = (byte*)XMALLOC(crle->tbsSz, heap,
- DYNAMIC_TYPE_CRL_ENTRY);
- if (crle->toBeSigned == NULL)
- return -1;
- crle->signature = (byte*)XMALLOC(crle->signatureSz, heap,
- DYNAMIC_TYPE_CRL_ENTRY);
- if (crle->signature == NULL) {
- XFREE(crle->toBeSigned, heap, DYNAMIC_TYPE_CRL_ENTRY);
- return -1;
- }
- XMEMCPY(crle->toBeSigned, buff + dcrl->certBegin, crle->tbsSz);
- XMEMCPY(crle->signature, dcrl->signature, crle->signatureSz);
- #ifndef NO_SKID
- crle->extAuthKeyIdSet = dcrl->extAuthKeyIdSet;
- if (crle->extAuthKeyIdSet)
- XMEMCPY(crle->extAuthKeyId, dcrl->extAuthKeyId, KEYID_SIZE);
- #endif
- }
- else {
- crle->toBeSigned = NULL;
- crle->signature = NULL;
- }
-
- (void)verified;
- (void)heap;
-
- return 0;
-}
-
-
-/* Free all CRL Entry resources */
-static void FreeCRL_Entry(CRL_Entry* crle, void* heap)
-{
- RevokedCert* tmp = crle->certs;
- RevokedCert* next;
-
- WOLFSSL_ENTER("FreeCRL_Entry");
-
- while (tmp) {
- next = tmp->next;
- XFREE(tmp, heap, DYNAMIC_TYPE_REVOKED);
- tmp = next;
- }
- if (crle->signature != NULL)
- XFREE(crle->signature, heap, DYNAMIC_TYPE_REVOKED);
- if (crle->toBeSigned != NULL)
- XFREE(crle->toBeSigned, heap, DYNAMIC_TYPE_REVOKED);
-
- (void)heap;
-}
-
-
-
-/* Free all CRL resources */
-void FreeCRL(WOLFSSL_CRL* crl, int dynamic)
-{
- CRL_Entry* tmp = crl->crlList;
-
- WOLFSSL_ENTER("FreeCRL");
- if (crl->monitors[0].path)
- XFREE(crl->monitors[0].path, crl->heap, DYNAMIC_TYPE_CRL_MONITOR);
-
- if (crl->monitors[1].path)
- XFREE(crl->monitors[1].path, crl->heap, DYNAMIC_TYPE_CRL_MONITOR);
-
- while(tmp) {
- CRL_Entry* next = tmp->next;
- FreeCRL_Entry(tmp, crl->heap);
- XFREE(tmp, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
- tmp = next;
- }
-
-#ifdef HAVE_CRL_MONITOR
- if (crl->tid != 0) {
- WOLFSSL_MSG("stopping monitor thread");
- if (StopMonitor(crl->mfd) == 0)
- pthread_join(crl->tid, NULL);
- else {
- WOLFSSL_MSG("stop monitor failed");
- }
- }
- pthread_cond_destroy(&crl->cond);
-#endif
- wc_FreeMutex(&crl->crlLock);
- if (dynamic) /* free self */
- XFREE(crl, crl->heap, DYNAMIC_TYPE_CRL);
-}
-
-
-static int CheckCertCRLList(WOLFSSL_CRL* crl, DecodedCert* cert, int *pFoundEntry)
-{
- CRL_Entry* crle;
- int foundEntry = 0;
- int ret = 0;
-
- if (wc_LockMutex(&crl->crlLock) != 0) {
- WOLFSSL_MSG("wc_LockMutex failed");
- return BAD_MUTEX_E;
- }
-
- crle = crl->crlList;
-
- while (crle) {
- if (XMEMCMP(crle->issuerHash, cert->issuerHash, CRL_DIGEST_SIZE) == 0) {
- WOLFSSL_MSG("Found CRL Entry on list");
-
- if (crle->verified == 0) {
- Signer* ca = NULL;
- #ifndef NO_SKID
- byte extAuthKeyId[KEYID_SIZE];
- #endif
- byte issuerHash[CRL_DIGEST_SIZE];
- byte* tbs;
- word32 tbsSz = crle->tbsSz;
- byte* sig = NULL;
- word32 sigSz = crle->signatureSz;
- word32 sigOID = crle->signatureOID;
- SignatureCtx sigCtx;
-
- tbs = (byte*)XMALLOC(tbsSz, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
- if (tbs == NULL) {
- wc_UnLockMutex(&crl->crlLock);
- return MEMORY_E;
- }
- sig = (byte*)XMALLOC(sigSz, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
- if (sig == NULL) {
- XFREE(tbs, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
- wc_UnLockMutex(&crl->crlLock);
- return MEMORY_E;
- }
-
- XMEMCPY(tbs, crle->toBeSigned, tbsSz);
- XMEMCPY(sig, crle->signature, sigSz);
- #ifndef NO_SKID
- XMEMCPY(extAuthKeyId, crle->extAuthKeyId,
- sizeof(extAuthKeyId));
- #endif
- XMEMCPY(issuerHash, crle->issuerHash, sizeof(issuerHash));
-
- wc_UnLockMutex(&crl->crlLock);
-
- #ifndef NO_SKID
- if (crle->extAuthKeyIdSet)
- ca = GetCA(crl->cm, extAuthKeyId);
- if (ca == NULL)
- ca = GetCAByName(crl->cm, issuerHash);
- #else /* NO_SKID */
- ca = GetCA(crl->cm, issuerHash);
- #endif /* NO_SKID */
- if (ca == NULL) {
- XFREE(sig, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
- XFREE(tbs, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
- WOLFSSL_MSG("Did NOT find CRL issuer CA");
- return ASN_CRL_NO_SIGNER_E;
- }
-
- ret = VerifyCRL_Signature(&sigCtx, tbs, tbsSz, sig, sigSz,
- sigOID, ca, crl->heap);
-
- XFREE(sig, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
- XFREE(tbs, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
-
- if (wc_LockMutex(&crl->crlLock) != 0) {
- WOLFSSL_MSG("wc_LockMutex failed");
- return BAD_MUTEX_E;
- }
-
- crle = crl->crlList;
- while (crle) {
- if (XMEMCMP(crle->issuerHash, cert->issuerHash,
- CRL_DIGEST_SIZE) == 0) {
-
- if (ret == 0)
- crle->verified = 1;
- else
- crle->verified = ret;
-
- XFREE(crle->toBeSigned, crl->heap,
- DYNAMIC_TYPE_CRL_ENTRY);
- crle->toBeSigned = NULL;
- XFREE(crle->signature, crl->heap,
- DYNAMIC_TYPE_CRL_ENTRY);
- crle->signature = NULL;
- break;
- }
- crle = crle->next;
- }
- if (crle == NULL || crle->verified < 0)
- break;
- }
- else if (crle->verified < 0) {
- WOLFSSL_MSG("Cannot use CRL as it didn't verify");
- ret = crle->verified;
- break;
- }
-
- WOLFSSL_MSG("Checking next date validity");
-
- #ifdef WOLFSSL_NO_CRL_NEXT_DATE
- if (crle->nextDateFormat != ASN_OTHER_TYPE)
- #endif
- {
- #ifndef NO_ASN_TIME
- if (!XVALIDATE_DATE(crle->nextDate,crle->nextDateFormat, AFTER)) {
- WOLFSSL_MSG("CRL next date is no longer valid");
- ret = ASN_AFTER_DATE_E;
- }
- #endif
- }
- if (ret == 0) {
- foundEntry = 1;
- }
- break;
- }
- crle = crle->next;
- }
-
- if (foundEntry) {
- RevokedCert* rc = crle->certs;
-
- while (rc) {
- if (rc->serialSz == cert->serialSz &&
- XMEMCMP(rc->serialNumber, cert->serial, rc->serialSz) == 0) {
- WOLFSSL_MSG("Cert revoked");
- ret = CRL_CERT_REVOKED;
- break;
- }
- rc = rc->next;
- }
- }
-
- wc_UnLockMutex(&crl->crlLock);
-
- *pFoundEntry = foundEntry;
-
- return ret;
-}
-
-/* Is the cert ok with CRL, return 0 on success */
-int CheckCertCRL(WOLFSSL_CRL* crl, DecodedCert* cert)
-{
- int foundEntry = 0;
- int ret = 0;
-
- WOLFSSL_ENTER("CheckCertCRL");
-
- ret = CheckCertCRLList(crl, cert, &foundEntry);
-
-#ifdef HAVE_CRL_IO
- if (foundEntry == 0) {
- /* perform embedded lookup */
- if (crl->crlIOCb) {
- ret = crl->crlIOCb(crl, (const char*)cert->extCrlInfo,
- cert->extCrlInfoSz);
- if (ret == WOLFSSL_CBIO_ERR_WANT_READ) {
- ret = WANT_READ;
- }
- else if (ret >= 0) {
- /* try again */
- ret = CheckCertCRLList(crl, cert, &foundEntry);
- }
- }
- }
-#endif
-
- if (foundEntry == 0) {
- WOLFSSL_MSG("Couldn't find CRL for status check");
- ret = CRL_MISSING;
-
- if (crl->cm->cbMissingCRL) {
- char url[256];
-
- WOLFSSL_MSG("Issuing missing CRL callback");
- url[0] = '\0';
- if (cert->extCrlInfo) {
- if (cert->extCrlInfoSz < (int)sizeof(url) -1 ) {
- XMEMCPY(url, cert->extCrlInfo, cert->extCrlInfoSz);
- url[cert->extCrlInfoSz] = '\0';
- }
- else {
- WOLFSSL_MSG("CRL url too long");
- }
- }
-
- crl->cm->cbMissingCRL(url);
- }
- }
-
- return ret;
-}
-
-
-/* Add Decoded CRL, 0 on success */
-static int AddCRL(WOLFSSL_CRL* crl, DecodedCRL* dcrl, const byte* buff,
- int verified)
-{
- CRL_Entry* crle;
-
- WOLFSSL_ENTER("AddCRL");
-
- crle = (CRL_Entry*)XMALLOC(sizeof(CRL_Entry), crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
- if (crle == NULL) {
- WOLFSSL_MSG("alloc CRL Entry failed");
- return -1;
- }
-
- if (InitCRL_Entry(crle, dcrl, buff, verified, crl->heap) < 0) {
- WOLFSSL_MSG("Init CRL Entry failed");
- XFREE(crle, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
- return -1;
- }
-
- if (wc_LockMutex(&crl->crlLock) != 0) {
- WOLFSSL_MSG("wc_LockMutex failed");
- FreeCRL_Entry(crle, crl->heap);
- XFREE(crle, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
- return BAD_MUTEX_E;
- }
- crle->next = crl->crlList;
- crl->crlList = crle;
- wc_UnLockMutex(&crl->crlLock);
-
- return 0;
-}
-
-
-/* Load CRL File of type, WOLFSSL_SUCCESS on ok */
-int BufferLoadCRL(WOLFSSL_CRL* crl, const byte* buff, long sz, int type,
- int verify)
-{
- int ret = WOLFSSL_SUCCESS;
- const byte* myBuffer = buff; /* if DER ok, otherwise switch */
- DerBuffer* der = NULL;
-#ifdef WOLFSSL_SMALL_STACK
- DecodedCRL* dcrl;
-#else
- DecodedCRL dcrl[1];
-#endif
-
- WOLFSSL_ENTER("BufferLoadCRL");
-
- if (crl == NULL || buff == NULL || sz == 0)
- return BAD_FUNC_ARG;
-
- if (type == WOLFSSL_FILETYPE_PEM) {
- #ifdef WOLFSSL_PEM_TO_DER
- ret = PemToDer(buff, sz, CRL_TYPE, &der, NULL, NULL, NULL);
- if (ret == 0) {
- myBuffer = der->buffer;
- sz = der->length;
- }
- else {
- WOLFSSL_MSG("Pem to Der failed");
- FreeDer(&der);
- return -1;
- }
- #else
- ret = NOT_COMPILED_IN;
- #endif
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- dcrl = (DecodedCRL*)XMALLOC(sizeof(DecodedCRL), NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (dcrl == NULL) {
- FreeDer(&der);
- return MEMORY_E;
- }
-#endif
-
- InitDecodedCRL(dcrl, crl->heap);
- ret = ParseCRL(dcrl, myBuffer, (word32)sz, crl->cm);
- if (ret != 0 && !(ret == ASN_CRL_NO_SIGNER_E && verify == NO_VERIFY)) {
- WOLFSSL_MSG("ParseCRL error");
- }
- else {
- ret = AddCRL(crl, dcrl, myBuffer, ret != ASN_CRL_NO_SIGNER_E);
- if (ret != 0) {
- WOLFSSL_MSG("AddCRL error");
- }
- }
-
- FreeDecodedCRL(dcrl);
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(dcrl, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
-
- FreeDer(&der);
-
- return ret ? ret : WOLFSSL_SUCCESS; /* convert 0 to WOLFSSL_SUCCESS */
-}
-
-#if defined(OPENSSL_EXTRA) && defined(HAVE_CRL)
-/* helper function to create a new dynamic WOLFSSL_X509_CRL structure */
-static WOLFSSL_X509_CRL* wolfSSL_X509_crl_new(WOLFSSL_CERT_MANAGER* cm)
-{
- WOLFSSL_X509_CRL* ret;
-
- ret = (WOLFSSL_X509_CRL*)XMALLOC(sizeof(WOLFSSL_X509_CRL), cm->heap,
- DYNAMIC_TYPE_CRL);
- if (ret != NULL) {
- if (InitCRL(ret, cm) < 0) {
- WOLFSSL_MSG("Unable to initialize new CRL structure");
- XFREE(ret, cm->heap, DYNAMIC_TYPE_CRL);
- ret = NULL;
- }
- }
- return ret;
-}
-
-
-/* returns head of copied list that was alloc'd */
-static RevokedCert *DupRevokedCertList(RevokedCert* in, void* heap)
-{
- RevokedCert* head = NULL;
- RevokedCert* current = in;
- RevokedCert* prev = NULL;
- while (current) {
- RevokedCert* tmp = (RevokedCert*)XMALLOC(sizeof(RevokedCert), heap,
- DYNAMIC_TYPE_REVOKED);
- if (tmp != NULL) {
- XMEMCPY(tmp->serialNumber, current->serialNumber,
- EXTERNAL_SERIAL_SIZE);
- tmp->serialSz = current->serialSz;
- tmp->next = NULL;
- if (prev != NULL)
- prev->next = tmp;
- if (head == NULL)
- head = tmp;
- prev = tmp;
- }
- else {
- WOLFSSL_MSG("Failed to allocate new RevokedCert structure");
- /* free up any existing list */
- while (head != NULL) {
- current = head;
- head = head->next;
- XFREE(current, heap, DYNAMIC_TYPE_REVOKED);
- }
- return NULL;
- }
- current = current->next;
- }
- return head;
-}
-
-
-/* returns a deep copy of ent on success and null on fail */
-static CRL_Entry* DupCRL_Entry(const CRL_Entry* ent, void* heap)
-{
- CRL_Entry *dup;
-
- dup = (CRL_Entry*)XMALLOC(sizeof(CRL_Entry), heap, DYNAMIC_TYPE_CRL_ENTRY);
- if (dup == NULL) {
- WOLFSSL_MSG("alloc CRL Entry failed");
- return NULL;
- }
- XMEMSET(dup, 0, sizeof(CRL_Entry));
-
- XMEMCPY(dup->issuerHash, ent->issuerHash, CRL_DIGEST_SIZE);
- XMEMCPY(dup->lastDate, ent->lastDate, MAX_DATE_SIZE);
- XMEMCPY(dup->nextDate, ent->nextDate, MAX_DATE_SIZE);
- dup->lastDateFormat = ent->lastDateFormat;
- dup->nextDateFormat = ent->nextDateFormat;
- dup->certs = DupRevokedCertList(ent->certs, heap);
-
- dup->totalCerts = ent->totalCerts;
- dup->verified = ent->verified;
-
- if (!ent->verified) {
- dup->tbsSz = ent->tbsSz;
- dup->signatureSz = ent->signatureSz;
- dup->signatureOID = ent->signatureOID;
- dup->toBeSigned = (byte*)XMALLOC(dup->tbsSz, heap,
- DYNAMIC_TYPE_CRL_ENTRY);
- if (dup->toBeSigned == NULL) {
- FreeCRL_Entry(dup, heap);
- XFREE(dup, heap, DYNAMIC_TYPE_CRL_ENTRY);
- return NULL;
- }
-
- dup->signature = (byte*)XMALLOC(dup->signatureSz, heap,
- DYNAMIC_TYPE_CRL_ENTRY);
- if (dup->signature == NULL) {
- FreeCRL_Entry(dup, heap);
- XFREE(dup, heap, DYNAMIC_TYPE_CRL_ENTRY);
- return NULL;
- }
- XMEMCPY(dup->toBeSigned, ent->toBeSigned, dup->tbsSz);
- XMEMCPY(dup->signature, ent->signature, dup->signatureSz);
- #ifndef NO_SKID
- dup->extAuthKeyIdSet = ent->extAuthKeyIdSet;
- if (dup->extAuthKeyIdSet)
- XMEMCPY(dup->extAuthKeyId, ent->extAuthKeyId, KEYID_SIZE);
- #endif
- }
- else {
- dup->toBeSigned = NULL;
- dup->tbsSz = 0;
- dup->signature = NULL;
- dup->signatureSz = 0;
- }
-
- return dup;
-}
-
-
-/* returns the head of a deep copy of the list on success and null on fail */
-static CRL_Entry* DupCRL_list(CRL_Entry* crl, void* heap)
-{
- CRL_Entry* current;
- CRL_Entry* head = NULL;
- CRL_Entry* prev = NULL;
-
- current = crl;
- while (current != NULL) {
- CRL_Entry* tmp = DupCRL_Entry(current, heap);
- if (tmp != NULL) {
- tmp->next = NULL;
- if (head == NULL)
- head = tmp;
- if (prev != NULL)
- prev->next = tmp;
- prev = tmp;
- }
- else {
- WOLFSSL_MSG("Failed to allocate new CRL_Entry structure");
- /* free up any existing list */
- while (head != NULL) {
- current = head;
- head = head->next;
- FreeCRL_Entry(current, heap);
- }
-
- return NULL;
- }
- current = current->next;
- }
- return head;
-}
-
-
-/* Duplicates everything except the parent cm pointed to.
- * Expects that Init has already been done to 'dup'
- * return 0 on success */
-static int DupX509_CRL(WOLFSSL_X509_CRL *dup, const WOLFSSL_X509_CRL* crl)
-{
- if (dup == NULL || crl == NULL) {
- return BAD_FUNC_ARG;
- }
-
- if (crl->monitors[0].path) {
- int pathSz = (int)XSTRLEN(crl->monitors[0].path) + 1;
- dup->monitors[0].path = (char*)XMALLOC(pathSz, dup->heap,
- DYNAMIC_TYPE_CRL_MONITOR);
- if (dup->monitors[0].path != NULL) {
- XSTRNCPY(dup->monitors[0].path, crl->monitors[0].path, pathSz);
- }
- else {
- return MEMORY_E;
- }
- }
-
- if (crl->monitors[1].path) {
- int pathSz = (int)XSTRLEN(crl->monitors[1].path) + 1;
- dup->monitors[1].path = (char*)XMALLOC(pathSz, dup->heap,
- DYNAMIC_TYPE_CRL_MONITOR);
- if (dup->monitors[1].path != NULL) {
- XSTRNCPY(dup->monitors[1].path, crl->monitors[1].path, pathSz);
- }
- else {
- if (dup->monitors[0].path != NULL) {
- XFREE(dup->monitors[0].path, dup->heap,
- DYNAMIC_TYPE_CRL_MONITOR);
- }
- return MEMORY_E;
- }
- }
-
- dup->crlList = DupCRL_list(crl->crlList, dup->heap);
-#ifdef HAVE_CRL_IO
- dup->crlIOCb = crl->crlIOCb;
-#endif
-
- return 0;
-}
-
-/* returns WOLFSSL_SUCCESS on success. Does not take ownership of newcrl */
-int wolfSSL_X509_STORE_add_crl(WOLFSSL_X509_STORE *store, WOLFSSL_X509_CRL *newcrl)
-{
- CRL_Entry *crle;
- WOLFSSL_X509_CRL *crl;
-
- WOLFSSL_ENTER("wolfSSL_X509_STORE_add_crl");
- if (store == NULL || newcrl == NULL || store->cm == NULL)
- return BAD_FUNC_ARG;
-
- if (store->cm->crl == NULL) {
- crl = wolfSSL_X509_crl_new(store->cm);
- if (DupX509_CRL(crl, newcrl) != 0) {
- FreeCRL(crl, 1);
- return WOLFSSL_FAILURE;
- }
- store->crl = store->cm->crl = crl;
- return WOLFSSL_SUCCESS;
- }
-
- /* find tail of current list and add new list */
- crl = store->cm->crl;
- crle = crl->crlList;
- if (newcrl->crlList != NULL) {
- CRL_Entry *tail = crle;
- CRL_Entry *toAdd;
-
- if (wc_LockMutex(&crl->crlLock) != 0)
- {
- WOLFSSL_MSG("wc_LockMutex failed");
- return BAD_MUTEX_E;
- }
-
- toAdd = DupCRL_list(newcrl->crlList, crl->heap);
- if (tail == NULL) {
- crl->crlList = toAdd;
- }
- else {
- while (tail->next != NULL) tail = tail->next;
- tail->next = toAdd;
- }
- wc_UnLockMutex(&crl->crlLock);
- }
-
- WOLFSSL_LEAVE("wolfSSL_X509_STORE_add_crl", WOLFSSL_SUCCESS);
-
- return WOLFSSL_SUCCESS;
-}
-#endif
-
-#ifdef HAVE_CRL_MONITOR
-
-
-/* Signal Monitor thread is setup, save status to setup flag, 0 on success */
-static int SignalSetup(WOLFSSL_CRL* crl, int status)
-{
- int ret;
-
- /* signal to calling thread we're setup */
- if (wc_LockMutex(&crl->crlLock) != 0) {
- WOLFSSL_MSG("wc_LockMutex crlLock failed");
- return BAD_MUTEX_E;
- }
-
- crl->setup = status;
- ret = pthread_cond_signal(&crl->cond);
-
- wc_UnLockMutex(&crl->crlLock);
-
- if (ret != 0)
- return BAD_COND_E;
-
- return 0;
-}
-
-
-/* read in new CRL entries and save new list */
-static int SwapLists(WOLFSSL_CRL* crl)
-{
- int ret;
- CRL_Entry* newList;
-#ifdef WOLFSSL_SMALL_STACK
- WOLFSSL_CRL* tmp;
-#else
- WOLFSSL_CRL tmp[1];
-#endif
-
-#ifdef WOLFSSL_SMALL_STACK
- tmp = (WOLFSSL_CRL*)XMALLOC(sizeof(WOLFSSL_CRL), NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (tmp == NULL)
- return MEMORY_E;
-#endif
-
- if (InitCRL(tmp, crl->cm) < 0) {
- WOLFSSL_MSG("Init tmp CRL failed");
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
- return -1;
- }
-
- if (crl->monitors[0].path) {
- ret = LoadCRL(tmp, crl->monitors[0].path, WOLFSSL_FILETYPE_PEM, 0);
- if (ret != WOLFSSL_SUCCESS) {
- WOLFSSL_MSG("PEM LoadCRL on dir change failed");
- FreeCRL(tmp, 0);
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
- return -1;
- }
- }
-
- if (crl->monitors[1].path) {
- ret = LoadCRL(tmp, crl->monitors[1].path, WOLFSSL_FILETYPE_ASN1, 0);
- if (ret != WOLFSSL_SUCCESS) {
- WOLFSSL_MSG("DER LoadCRL on dir change failed");
- FreeCRL(tmp, 0);
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
- return -1;
- }
- }
-
- if (wc_LockMutex(&crl->crlLock) != 0) {
- WOLFSSL_MSG("wc_LockMutex failed");
- FreeCRL(tmp, 0);
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
- return -1;
- }
-
- newList = tmp->crlList;
-
- /* swap lists */
- tmp->crlList = crl->crlList;
- crl->crlList = newList;
-
- wc_UnLockMutex(&crl->crlLock);
-
- FreeCRL(tmp, 0);
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
-
- return 0;
-}
-
-
-#if (defined(__MACH__) || defined(__FreeBSD__))
-
-#include
-#include
-#include
-#include
-#include
-
-#ifdef __MACH__
- #define XEVENT_MODE O_EVTONLY
-#elif defined(__FreeBSD__)
- #define XEVENT_MODE EVFILT_VNODE
-#endif
-
-
-/* we need a unique kqueue user filter fd for crl in case user is doing custom
- * events too */
-#ifndef CRL_CUSTOM_FD
- #define CRL_CUSTOM_FD 123456
-#endif
-
-
-/* shutdown monitor thread, 0 on success */
-static int StopMonitor(int mfd)
-{
- struct kevent change;
-
- /* trigger custom shutdown */
- EV_SET(&change, CRL_CUSTOM_FD, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL);
- if (kevent(mfd, &change, 1, NULL, 0, NULL) < 0) {
- WOLFSSL_MSG("kevent trigger customer event failed");
- return -1;
- }
-
- return 0;
-}
-
-
-/* OS X monitoring */
-static void* DoMonitor(void* arg)
-{
- int fPEM, fDER;
- struct kevent change;
-
- WOLFSSL_CRL* crl = (WOLFSSL_CRL*)arg;
-
- WOLFSSL_ENTER("DoMonitor");
-
- crl->mfd = kqueue();
- if (crl->mfd == -1) {
- WOLFSSL_MSG("kqueue failed");
- SignalSetup(crl, MONITOR_SETUP_E);
- return NULL;
- }
-
- /* listen for custom shutdown event */
- EV_SET(&change, CRL_CUSTOM_FD, EVFILT_USER, EV_ADD, 0, 0, NULL);
- if (kevent(crl->mfd, &change, 1, NULL, 0, NULL) < 0) {
- WOLFSSL_MSG("kevent monitor customer event failed");
- SignalSetup(crl, MONITOR_SETUP_E);
- close(crl->mfd);
- return NULL;
- }
-
- fPEM = -1;
- fDER = -1;
-
- if (crl->monitors[0].path) {
- fPEM = open(crl->monitors[0].path, XEVENT_MODE);
- if (fPEM == -1) {
- WOLFSSL_MSG("PEM event dir open failed");
- SignalSetup(crl, MONITOR_SETUP_E);
- close(crl->mfd);
- return NULL;
- }
- }
-
- if (crl->monitors[1].path) {
- fDER = open(crl->monitors[1].path, XEVENT_MODE);
- if (fDER == -1) {
- WOLFSSL_MSG("DER event dir open failed");
- if (fPEM != -1)
- close(fPEM);
- close(crl->mfd);
- SignalSetup(crl, MONITOR_SETUP_E);
- return NULL;
- }
- }
-
- if (fPEM != -1)
- EV_SET(&change, fPEM, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_ONESHOT,
- NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_ATTRIB, 0, 0);
-
- if (fDER != -1)
- EV_SET(&change, fDER, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_ONESHOT,
- NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_ATTRIB, 0, 0);
-
- /* signal to calling thread we're setup */
- if (SignalSetup(crl, 1) != 0) {
- if (fPEM != -1)
- close(fPEM);
- if (fDER != -1)
- close(fDER);
- close(crl->mfd);
- return NULL;
- }
-
- for (;;) {
- struct kevent event;
- int numEvents = kevent(crl->mfd, &change, 1, &event, 1, NULL);
-
- WOLFSSL_MSG("Got kevent");
-
- if (numEvents == -1) {
- WOLFSSL_MSG("kevent problem, continue");
- continue;
- }
-
- if (event.filter == EVFILT_USER) {
- WOLFSSL_MSG("Got user shutdown event, breaking out");
- break;
- }
-
- if (SwapLists(crl) < 0) {
- WOLFSSL_MSG("SwapLists problem, continue");
- }
- }
-
- if (fPEM != -1)
- close(fPEM);
- if (fDER != -1)
- close(fDER);
-
- close(crl->mfd);
-
- return NULL;
-}
-
-
-#elif defined(__linux__)
-
-#include
-#include
-#include
-#include
-
-
-#ifndef max
- static WC_INLINE int max(int a, int b)
- {
- return a > b ? a : b;
- }
-#endif /* max */
-
-
-/* shutdown monitor thread, 0 on success */
-static int StopMonitor(int mfd)
-{
- word64 w64 = 1;
-
- /* write to our custom event */
- if (write(mfd, &w64, sizeof(w64)) < 0) {
- WOLFSSL_MSG("StopMonitor write failed");
- return -1;
- }
-
- return 0;
-}
-
-
-/* linux monitoring */
-static void* DoMonitor(void* arg)
-{
- int notifyFd;
- int wd = -1;
- WOLFSSL_CRL* crl = (WOLFSSL_CRL*)arg;
-#ifdef WOLFSSL_SMALL_STACK
- char* buff;
-#else
- char buff[8192];
-#endif
-
- WOLFSSL_ENTER("DoMonitor");
-
- crl->mfd = eventfd(0, 0); /* our custom shutdown event */
- if (crl->mfd < 0) {
- WOLFSSL_MSG("eventfd failed");
- SignalSetup(crl, MONITOR_SETUP_E);
- return NULL;
- }
-
- notifyFd = inotify_init();
- if (notifyFd < 0) {
- WOLFSSL_MSG("inotify failed");
- close(crl->mfd);
- SignalSetup(crl, MONITOR_SETUP_E);
- return NULL;
- }
-
- if (crl->monitors[0].path) {
- wd = inotify_add_watch(notifyFd, crl->monitors[0].path, IN_CLOSE_WRITE |
- IN_DELETE);
- if (wd < 0) {
- WOLFSSL_MSG("PEM notify add watch failed");
- close(crl->mfd);
- close(notifyFd);
- SignalSetup(crl, MONITOR_SETUP_E);
- return NULL;
- }
- }
-
- if (crl->monitors[1].path) {
- wd = inotify_add_watch(notifyFd, crl->monitors[1].path, IN_CLOSE_WRITE |
- IN_DELETE);
- if (wd < 0) {
- WOLFSSL_MSG("DER notify add watch failed");
- close(crl->mfd);
- close(notifyFd);
- SignalSetup(crl, MONITOR_SETUP_E);
- return NULL;
- }
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- buff = (char*)XMALLOC(8192, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (buff == NULL)
- return NULL;
-#endif
-
- /* signal to calling thread we're setup */
- if (SignalSetup(crl, 1) != 0) {
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(buff, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- #endif
-
- if (wd > 0)
- inotify_rm_watch(notifyFd, wd);
- close(crl->mfd);
- close(notifyFd);
- return NULL;
- }
-
- for (;;) {
- fd_set readfds;
- int result;
- int length;
-
- FD_ZERO(&readfds);
- FD_SET(notifyFd, &readfds);
- FD_SET(crl->mfd, &readfds);
-
- result = select(max(notifyFd, crl->mfd) + 1, &readfds, NULL, NULL,NULL);
-
- WOLFSSL_MSG("Got notify event");
-
- if (result < 0) {
- WOLFSSL_MSG("select problem, continue");
- continue;
- }
-
- if (FD_ISSET(crl->mfd, &readfds)) {
- WOLFSSL_MSG("got custom shutdown event, breaking out");
- break;
- }
-
- length = (int) read(notifyFd, buff, 8192);
- if (length < 0) {
- WOLFSSL_MSG("notify read problem, continue");
- continue;
- }
-
- if (SwapLists(crl) < 0) {
- WOLFSSL_MSG("SwapLists problem, continue");
- }
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(buff, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
-
- if (wd > 0)
- inotify_rm_watch(notifyFd, wd);
- close(crl->mfd);
- close(notifyFd);
-
- return NULL;
-}
-
-#endif /* MACH or linux */
-
-
-/* Start Monitoring the CRL path(s) in a thread */
-static int StartMonitorCRL(WOLFSSL_CRL* crl)
-{
- int ret = WOLFSSL_SUCCESS;
-
- WOLFSSL_ENTER("StartMonitorCRL");
-
- if (crl == NULL)
- return BAD_FUNC_ARG;
-
- if (crl->tid != 0) {
- WOLFSSL_MSG("Monitor thread already running");
- return ret; /* that's ok, someone already started */
- }
-
- if (pthread_create(&crl->tid, NULL, DoMonitor, crl) != 0) {
- WOLFSSL_MSG("Thread creation error");
- return THREAD_CREATE_E;
- }
-
- /* wait for setup to complete */
- if (wc_LockMutex(&crl->crlLock) != 0) {
- WOLFSSL_MSG("wc_LockMutex crlLock error");
- return BAD_MUTEX_E;
- }
-
- while (crl->setup == 0) {
- if (pthread_cond_wait(&crl->cond, &crl->crlLock) != 0) {
- ret = BAD_COND_E;
- break;
- }
- }
-
- if (crl->setup < 0)
- ret = crl->setup; /* store setup error */
-
- wc_UnLockMutex(&crl->crlLock);
-
- if (ret < 0) {
- WOLFSSL_MSG("DoMonitor setup failure");
- crl->tid = 0; /* thread already done */
- }
-
- return ret;
-}
-
-
-#else /* HAVE_CRL_MONITOR */
-
-#if !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
-
-static int StartMonitorCRL(WOLFSSL_CRL* crl)
-{
- (void)crl;
-
- WOLFSSL_ENTER("StartMonitorCRL");
- WOLFSSL_MSG("Not compiled in");
-
- return NOT_COMPILED_IN;
-}
-
-#endif /* !NO_FILESYSTEM && !NO_WOLFSSL_DIR */
-
-#endif /* HAVE_CRL_MONITOR */
-
-#if !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
-
-/* Load CRL path files of type, WOLFSSL_SUCCESS on ok */
-int LoadCRL(WOLFSSL_CRL* crl, const char* path, int type, int monitor)
-{
- int ret = WOLFSSL_SUCCESS;
- char* name = NULL;
-#ifdef WOLFSSL_SMALL_STACK
- ReadDirCtx* readCtx = NULL;
-#else
- ReadDirCtx readCtx[1];
-#endif
-
- WOLFSSL_ENTER("LoadCRL");
- if (crl == NULL)
- return BAD_FUNC_ARG;
-
-#ifdef WOLFSSL_SMALL_STACK
- readCtx = (ReadDirCtx*)XMALLOC(sizeof(ReadDirCtx), crl->heap,
- DYNAMIC_TYPE_TMP_BUFFER);
- if (readCtx == NULL)
- return MEMORY_E;
-#endif
-
- /* try to load each regular file in path */
- ret = wc_ReadDirFirst(readCtx, path, &name);
- while (ret == 0 && name) {
- int skip = 0;
- if (type == WOLFSSL_FILETYPE_PEM) {
- if (XSTRSTR(name, ".pem") == NULL) {
- WOLFSSL_MSG("not .pem file, skipping");
- skip = 1;
- }
- }
- else {
- if (XSTRSTR(name, ".der") == NULL &&
- XSTRSTR(name, ".crl") == NULL)
- {
- WOLFSSL_MSG("not .der or .crl file, skipping");
- skip = 1;
- }
- }
-
- if (!skip && ProcessFile(NULL, name, type, CRL_TYPE, NULL, 0, crl,
- VERIFY) != WOLFSSL_SUCCESS) {
- WOLFSSL_MSG("CRL file load failed, continuing");
- }
-
- ret = wc_ReadDirNext(readCtx, path, &name);
- }
- wc_ReadDirClose(readCtx);
- ret = WOLFSSL_SUCCESS; /* load failures not reported, for backwards compat */
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(readCtx, crl->heap, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
-
- if (monitor & WOLFSSL_CRL_MONITOR) {
- word32 pathLen;
- char* pathBuf;
-
- WOLFSSL_MSG("monitor path requested");
-
- pathLen = (word32)XSTRLEN(path);
- pathBuf = (char*)XMALLOC(pathLen+1, crl->heap,DYNAMIC_TYPE_CRL_MONITOR);
- if (pathBuf) {
- XSTRNCPY(pathBuf, path, pathLen+1);
-
- if (type == WOLFSSL_FILETYPE_PEM) {
- /* free old path before setting a new one */
- if (crl->monitors[0].path) {
- XFREE(crl->monitors[0].path, crl->heap,
- DYNAMIC_TYPE_CRL_MONITOR);
- }
- crl->monitors[0].path = pathBuf;
- crl->monitors[0].type = WOLFSSL_FILETYPE_PEM;
- } else {
- /* free old path before setting a new one */
- if (crl->monitors[1].path) {
- XFREE(crl->monitors[1].path, crl->heap,
- DYNAMIC_TYPE_CRL_MONITOR);
- }
- crl->monitors[1].path = pathBuf;
- crl->monitors[1].type = WOLFSSL_FILETYPE_ASN1;
- }
-
- if (monitor & WOLFSSL_CRL_START_MON) {
- WOLFSSL_MSG("start monitoring requested");
-
- ret = StartMonitorCRL(crl);
- }
- }
- else {
- ret = MEMORY_E;
- }
- }
-
- return ret;
-}
-
-#else
-int LoadCRL(WOLFSSL_CRL* crl, const char* path, int type, int monitor)
-{
- (void)crl;
- (void)path;
- (void)type;
- (void)monitor;
-
- /* stub for scenario where file system is not supported */
- return NOT_COMPILED_IN;
-}
-#endif /* !NO_FILESYSTEM && !NO_WOLFSSL_DIR */
-
-#endif /* HAVE_CRL */
-#endif /* !WOLFCRYPT_ONLY */
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/include.am b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/include.am
deleted file mode 100644
index 506671dca6..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/include.am
+++ /dev/null
@@ -1,533 +0,0 @@
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-lib_LTLIBRARIES+= src/libwolfssl.la
-src_libwolfssl_la_SOURCES =
-src_libwolfssl_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${WOLFSSL_LIBRARY_VERSION}
-src_libwolfssl_la_LIBADD = $(LIBM) $(LIB_ADD) $(LIB_STATIC_ADD)
-src_libwolfssl_la_CFLAGS = -DBUILDING_WOLFSSL $(AM_CFLAGS)
-src_libwolfssl_la_CPPFLAGS = -DBUILDING_WOLFSSL $(AM_CPPFLAGS)
-
-# install the packaged IPP libraries
-if BUILD_FAST_RSA
-
-# Link needed IPP libraries
-noinst_SCRIPTS+=IPP_links
-IPP_links:
- @$(IPPLINK)
-
-ippdir = $(libdir)
-ipp_DATA = $(IPPLIBS)
-
-include_HEADERS+=$(IPPHEADERS)
-endif # BUILD_FAST_RSA
-
-if BUILD_FIPS
-
-if BUILD_FIPS_V1
-# fips first file
-src_libwolfssl_la_SOURCES += ctaocrypt/src/wolfcrypt_first.c
-
-src_libwolfssl_la_SOURCES += \
- ctaocrypt/src/hmac.c \
- ctaocrypt/src/random.c \
- ctaocrypt/src/sha256.c
-
-if BUILD_RSA
-src_libwolfssl_la_SOURCES += ctaocrypt/src/rsa.c
-endif
-
-if BUILD_AES
-src_libwolfssl_la_SOURCES += ctaocrypt/src/aes.c
-endif
-
-if BUILD_DES3
-src_libwolfssl_la_SOURCES += ctaocrypt/src/des3.c
-endif
-
-if BUILD_SHA
-src_libwolfssl_la_SOURCES += ctaocrypt/src/sha.c
-endif
-
-if BUILD_SHA512
-src_libwolfssl_la_SOURCES += ctaocrypt/src/sha512.c
-endif
-
-src_libwolfssl_la_SOURCES += ctaocrypt/src/fips.c
-src_libwolfssl_la_SOURCES += ctaocrypt/src/fips_test.c
-
-# fips last file
-src_libwolfssl_la_SOURCES += ctaocrypt/src/wolfcrypt_last.c
-endif
-
-if BUILD_FIPS_V2
-# FIPSv2 first file
-src_libwolfssl_la_SOURCES += \
- wolfcrypt/src/wolfcrypt_first.c
-
-src_libwolfssl_la_SOURCES += \
- wolfcrypt/src/hmac.c \
- wolfcrypt/src/random.c \
- wolfcrypt/src/sha256.c
-
-if BUILD_RSA
-src_libwolfssl_la_SOURCES += wolfcrypt/src/rsa.c
-endif
-
-if BUILD_ECC
-src_libwolfssl_la_SOURCES += wolfcrypt/src/ecc.c
-endif
-
-if BUILD_AES
-src_libwolfssl_la_SOURCES += wolfcrypt/src/aes.c
-endif
-
-if BUILD_AESNI
-src_libwolfssl_la_SOURCES += wolfcrypt/src/aes_asm.S
-if BUILD_INTELASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/aes_gcm_asm.S
-endif
-endif
-
-if BUILD_DES3
-src_libwolfssl_la_SOURCES += wolfcrypt/src/des3.c
-endif
-
-if BUILD_SHA
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha.c
-if BUILD_INTELASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha256_asm.S
-endif
-endif
-
-if BUILD_SHA512
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha512.c
-if BUILD_INTELASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha512_asm.S
-endif
-endif
-
-if BUILD_SHA3
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha3.c
-endif
-
-if BUILD_DH
-src_libwolfssl_la_SOURCES += wolfcrypt/src/dh.c
-endif
-
-if BUILD_CMAC
-src_libwolfssl_la_SOURCES += wolfcrypt/src/cmac.c
-endif
-
-src_libwolfssl_la_SOURCES += wolfcrypt/src/fips.c \
- wolfcrypt/src/fips_test.c
-
-# fips last file
-src_libwolfssl_la_SOURCES += wolfcrypt/src/wolfcrypt_last.c
-endif
-
-if BUILD_FIPS_RAND
-src_libwolfssl_la_SOURCES += \
- wolfcrypt/src/wolfcrypt_first.c \
- wolfcrypt/src/hmac.c \
- wolfcrypt/src/random.c \
- wolfcrypt/src/sha256.c \
- wolfcrypt/src/sha256_asm.S \
- wolfcrypt/src/fips.c \
- wolfcrypt/src/fips_test.c \
- wolfcrypt/src/wolfcrypt_last.c
-endif BUILD_FIPS_RAND
-
-endif BUILD_FIPS
-
-# For wolfRand, exclude everything else.
-if !BUILD_FIPS_RAND
-
-# For FIPSV2, exclude the wolfCrypt files included above.
-# For wolfRand, exclude just a couple files.
-# For old FIPS, keep the wolfCrypt versions of the
-# CtaoCrypt files included above.
-if !BUILD_FIPS_V2
-src_libwolfssl_la_SOURCES += wolfcrypt/src/hmac.c
-endif
-
-# CAVP self test
-if BUILD_SELFTEST
-src_libwolfssl_la_SOURCES += wolfcrypt/src/selftest.c
-endif
-
-endif !BUILD_FIPS_RAND
-
-src_libwolfssl_la_SOURCES += \
- wolfcrypt/src/hash.c \
- wolfcrypt/src/cpuid.c
-
-if !BUILD_FIPS_RAND
-
-if !BUILD_FIPS_V2
-if BUILD_RNG
-src_libwolfssl_la_SOURCES += wolfcrypt/src/random.c
-endif
-endif
-
-if !BUILD_FIPS_V2
-if BUILD_ARMASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-sha256.c
-else
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha256.c
-if BUILD_INTELASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha256_asm.S
-endif
-endif
-endif
-
-if BUILD_AFALG
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/af_alg/afalg_hash.c
-endif
-
-if BUILD_WOLFEVENT
-src_libwolfssl_la_SOURCES += wolfcrypt/src/wolfevent.c
-endif
-
-if BUILD_ASYNCCRYPT
-src_libwolfssl_la_SOURCES += wolfcrypt/src/async.c
-endif
-
-if !BUILD_USER_RSA
-if BUILD_RSA
-if BUILD_FAST_RSA
-src_libwolfssl_la_SOURCES += wolfcrypt/user-crypto/src/rsa.c
-else
-if !BUILD_FIPS_V2
-src_libwolfssl_la_SOURCES += wolfcrypt/src/rsa.c
-endif
-endif
-endif
-endif
-
-if BUILD_SP
-if BUILD_SP_C
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sp_c32.c
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sp_c64.c
-endif
-if BUILD_SP_X86_64
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sp_x86_64.c
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sp_x86_64_asm.S
-endif
-if !BUILD_FIPS_V2
-if BUILD_SP_ARM32
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sp_arm32.c
-endif
-endif
-if BUILD_SP_ARM_THUMB
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sp_armthumb.c
-endif
-if BUILD_SP_ARM64
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sp_arm64.c
-endif
-if BUILD_SP_INT
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sp_int.c
-endif
-if BUILD_SP_ARM_CORTEX
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sp_cortexm.c
-endif
-endif
-
-if !BUILD_FIPS_V2
-if BUILD_AES
-src_libwolfssl_la_SOURCES += wolfcrypt/src/aes.c
-if BUILD_ARMASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-aes.c
-endif
-if BUILD_AFALG
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/af_alg/afalg_aes.c
-endif
-endif
-endif
-
-if !BUILD_FIPS_V2
-if BUILD_CMAC
-src_libwolfssl_la_SOURCES += wolfcrypt/src/cmac.c
-endif
-endif
-
-if !BUILD_FIPS_V2
-if BUILD_DES3
-src_libwolfssl_la_SOURCES += wolfcrypt/src/des3.c
-endif
-endif
-
-if !BUILD_FIPS_V2
-if BUILD_SHA
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha.c
-endif
-endif
-
-if !BUILD_FIPS_V2
-if BUILD_SHA512
-if BUILD_ARMASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-sha512.c
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-sha512-asm.S
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-32-sha512-asm.S
-else
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha512.c
-if BUILD_INTELASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha512_asm.S
-endif
-endif
-endif
-endif
-
-if !BUILD_FIPS_V2
-if BUILD_SHA3
-src_libwolfssl_la_SOURCES += wolfcrypt/src/sha3.c
-endif
-endif
-
-
-endif !BUILD_FIPS_RAND
-
-src_libwolfssl_la_SOURCES += \
- wolfcrypt/src/logging.c \
- wolfcrypt/src/wc_port.c \
- wolfcrypt/src/error.c
-
-if !BUILD_FIPS_RAND
-src_libwolfssl_la_SOURCES += \
- wolfcrypt/src/wc_encrypt.c \
- wolfcrypt/src/signature.c \
- wolfcrypt/src/wolfmath.c
-endif !BUILD_FIPS_RAND
-
-if BUILD_MEMORY
-src_libwolfssl_la_SOURCES += wolfcrypt/src/memory.c
-endif
-
-if !BUILD_FIPS_RAND
-if !BUILD_FIPS_V2
-if BUILD_DH
-src_libwolfssl_la_SOURCES += wolfcrypt/src/dh.c
-endif
-endif
-
-if BUILD_ASN
-src_libwolfssl_la_SOURCES += wolfcrypt/src/asn.c
-endif
-
-endif !BUILD_FIPS_RAND
-
-if BUILD_CODING
-src_libwolfssl_la_SOURCES += wolfcrypt/src/coding.c
-endif
-
-if !BUILD_FIPS_RAND
-
-if BUILD_POLY1305
-if BUILD_ARMASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-poly1305.c
-endif
-src_libwolfssl_la_SOURCES += wolfcrypt/src/poly1305.c
-if BUILD_INTELASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/poly1305_asm.S
-endif
-endif
-
-if BUILD_RC4
-src_libwolfssl_la_SOURCES += wolfcrypt/src/arc4.c
-endif
-
-if BUILD_MD4
-src_libwolfssl_la_SOURCES += wolfcrypt/src/md4.c
-endif
-
-if BUILD_MD5
-src_libwolfssl_la_SOURCES += wolfcrypt/src/md5.c
-endif
-
-if BUILD_PWDBASED
-src_libwolfssl_la_SOURCES += wolfcrypt/src/pwdbased.c
-src_libwolfssl_la_SOURCES += wolfcrypt/src/pkcs12.c
-endif
-
-if BUILD_DSA
-src_libwolfssl_la_SOURCES += wolfcrypt/src/dsa.c
-endif
-
-if !BUILD_FIPS_V2
-if BUILD_AESNI
-src_libwolfssl_la_SOURCES += wolfcrypt/src/aes_asm.S
-src_libwolfssl_la_SOURCES += wolfcrypt/src/aes_gcm_asm.S
-endif
-endif
-
-if BUILD_CAMELLIA
-src_libwolfssl_la_SOURCES += wolfcrypt/src/camellia.c
-endif
-
-if BUILD_MD2
-src_libwolfssl_la_SOURCES += wolfcrypt/src/md2.c
-endif
-
-if BUILD_RIPEMD
-src_libwolfssl_la_SOURCES += wolfcrypt/src/ripemd.c
-endif
-
-if BUILD_BLAKE2
-src_libwolfssl_la_SOURCES += wolfcrypt/src/blake2b.c
-endif
-if BUILD_BLAKE2S
-src_libwolfssl_la_SOURCES += wolfcrypt/src/blake2s.c
-endif
-
-if BUILD_HC128
-src_libwolfssl_la_SOURCES += wolfcrypt/src/hc128.c
-endif
-
-if BUILD_RABBIT
-src_libwolfssl_la_SOURCES += wolfcrypt/src/rabbit.c
-endif
-
-if BUILD_CHACHA
-if BUILD_ARMASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-chacha.c
-else
-src_libwolfssl_la_SOURCES += wolfcrypt/src/chacha.c
-if BUILD_INTELASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/chacha_asm.S
-endif
-endif
-if BUILD_POLY1305
-src_libwolfssl_la_SOURCES += wolfcrypt/src/chacha20_poly1305.c
-endif
-endif
-
-if !BUILD_INLINE
-src_libwolfssl_la_SOURCES += wolfcrypt/src/misc.c
-endif
-
-if BUILD_FASTMATH
-src_libwolfssl_la_SOURCES += wolfcrypt/src/tfm.c
-endif
-
-if BUILD_SLOWMATH
-src_libwolfssl_la_SOURCES += wolfcrypt/src/integer.c
-endif
-
-if !BUILD_FIPS_V2
-if BUILD_ECC
-src_libwolfssl_la_SOURCES += wolfcrypt/src/ecc.c
-endif
-endif
-
-if BUILD_CURVE25519
-src_libwolfssl_la_SOURCES += wolfcrypt/src/curve25519.c
-endif
-
-if BUILD_ED25519
-src_libwolfssl_la_SOURCES += wolfcrypt/src/ed25519.c
-endif
-
-if BUILD_FEMATH
-if BUILD_CURVE25519_SMALL
-src_libwolfssl_la_SOURCES += wolfcrypt/src/fe_low_mem.c
-else
-if BUILD_INTELASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/fe_x25519_asm.S
-else
-if BUILD_ARMASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-32-curve25519.S
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-curve25519.S
-else
-src_libwolfssl_la_SOURCES += wolfcrypt/src/fe_operations.c
-endif
-endif
-endif
-endif
-
-if BUILD_GEMATH
-if BUILD_ED25519_SMALL
-src_libwolfssl_la_SOURCES += wolfcrypt/src/ge_low_mem.c
-else
-src_libwolfssl_la_SOURCES += wolfcrypt/src/ge_operations.c
-if !BUILD_FEMATH
-if BUILD_INTELASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/fe_x25519_asm.S
-else
-if BUILD_ARMASM
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-curve25519.S
-else
-src_libwolfssl_la_SOURCES += wolfcrypt/src/fe_operations.c
-endif
-endif
-endif
-endif
-endif
-
-if BUILD_CURVE448
-src_libwolfssl_la_SOURCES += wolfcrypt/src/curve448.c
-endif
-
-if BUILD_ED448
-src_libwolfssl_la_SOURCES += wolfcrypt/src/ed448.c
-endif
-
-if BUILD_FE448
-src_libwolfssl_la_SOURCES += wolfcrypt/src/fe_448.c
-endif
-
-if BUILD_GE448
-src_libwolfssl_la_SOURCES += wolfcrypt/src/ge_448.c
-if !BUILD_FE448
-src_libwolfssl_la_SOURCES += wolfcrypt/src/fe_448.c
-endif
-endif
-
-if BUILD_LIBZ
-src_libwolfssl_la_SOURCES += wolfcrypt/src/compress.c
-endif
-
-if BUILD_PKCS7
-src_libwolfssl_la_SOURCES += wolfcrypt/src/pkcs7.c
-endif
-
-if BUILD_SRP
-src_libwolfssl_la_SOURCES += wolfcrypt/src/srp.c
-endif
-
-if BUILD_IDEA
-src_libwolfssl_la_SOURCES += wolfcrypt/src/idea.c
-endif
-
-if BUILD_AFALG
-src_libwolfssl_la_SOURCES += wolfcrypt/src/port/af_alg/wc_afalg.c
-endif
-
-if !BUILD_CRYPTONLY
-# ssl files
-src_libwolfssl_la_SOURCES += \
- src/internal.c \
- src/wolfio.c \
- src/keys.c \
- src/ssl.c \
- src/tls.c
-
-if BUILD_TLS13
-src_libwolfssl_la_SOURCES += src/tls13.c
-endif
-
-if BUILD_OCSP
-src_libwolfssl_la_SOURCES += src/ocsp.c
-endif
-
-if BUILD_CRL
-src_libwolfssl_la_SOURCES += src/crl.c
-endif
-
-if BUILD_SNIFFER
-src_libwolfssl_la_SOURCES += src/sniffer.c
-endif
-
-endif !BUILD_CRYPTONLY
-
-endif !BUILD_FIPS_RAND
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/internal.c b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/internal.c
deleted file mode 100644
index 020da1b82a..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/internal.c
+++ /dev/null
@@ -1,30012 +0,0 @@
-/* internal.c
- *
- * Copyright (C) 2006-2020 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * wolfSSL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
- */
-
-
-
-#ifdef HAVE_CONFIG_H
- #include
-#endif
-
-#include
-
-/*
- * WOLFSSL_SMALL_CERT_VERIFY:
- * Verify the certificate signature without using DecodedCert. Doubles up
- * on some code but allows smaller peak heap memory usage.
- * Cannot be used with WOLFSSL_NONBLOCK_OCSP.
- * WOLFSSL_ALT_CERT_CHAINS:
- * Allows CA's to be presented by peer, but not part of a valid chain.
- * Default wolfSSL behavior is to require validation of all presented peer
- * certificates. This also allows loading intermediate CA's as trusted
- * and ignoring no signer failures for CA's up the chain to root.
- */
-
-
-#ifdef EXTERNAL_OPTS_OPENVPN
-#error EXTERNAL_OPTS_OPENVPN should not be defined\
- when building wolfSSL
-#endif
-
-#ifndef WOLFCRYPT_ONLY
-
-#include
-#include
-#include
-#include
-#ifdef NO_INLINE
- #include
-#else
- #define WOLFSSL_MISC_INCLUDED
- #include
-#endif
-#if defined(OPENSSL_EXTRA) && defined(WOLFCRYPT_HAVE_SRP) && !defined(NO_SHA)
- #include
-#endif
-
-#ifdef HAVE_LIBZ
- #include "zlib.h"
-#endif
-
-#ifdef HAVE_NTRU
- #include "libntruencrypt/ntru_crypto.h"
-#endif
-
-#if defined(DEBUG_WOLFSSL) || defined(SHOW_SECRETS) || \
- defined(CHACHA_AEAD_TEST) || defined(WOLFSSL_SESSION_EXPORT_DEBUG)
- #ifndef NO_STDIO_FILESYSTEM
- #include
- #endif
-#endif
-
-#ifdef __sun
- #include
-#endif
-
-
-#define ERROR_OUT(err, eLabel) { ret = (err); goto eLabel; }
-
-#ifdef _MSC_VER
- /* disable for while(0) cases at the .c level for now */
- #pragma warning(disable:4127)
-#endif
-
-#if defined(WOLFSSL_CALLBACKS) && !defined(LARGE_STATIC_BUFFERS)
- #error \
-WOLFSSL_CALLBACKS needs LARGE_STATIC_BUFFERS, please add LARGE_STATIC_BUFFERS
-#endif
-
-#if defined(HAVE_SECURE_RENEGOTIATION) && defined(HAVE_RENEGOTIATION_INDICATION)
- #error Cannot use both secure-renegotiation and renegotiation-indication
-#endif
-
-#ifndef WOLFSSL_NO_TLS12
-
-#ifndef NO_WOLFSSL_CLIENT
- static int DoHelloVerifyRequest(WOLFSSL* ssl, const byte* input, word32*,
- word32);
- static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input, word32*,
- word32);
- #ifndef NO_CERTS
- static int DoCertificateRequest(WOLFSSL* ssl, const byte* input, word32*,
- word32);
- #endif
- #ifdef HAVE_SESSION_TICKET
- static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32*,
- word32);
- #endif
-#endif
-
-
-#ifndef NO_WOLFSSL_SERVER
- static int DoClientKeyExchange(WOLFSSL* ssl, byte* input, word32*, word32);
- #if (!defined(NO_RSA) || defined(HAVE_ECC) || defined(HAVE_ED25519) || \
- defined(HAVE_ED448)) && !defined(WOLFSSL_NO_CLIENT_AUTH)
- static int DoCertificateVerify(WOLFSSL* ssl, byte*, word32*, word32);
- #endif
- #ifdef WOLFSSL_DTLS
- static int SendHelloVerifyRequest(WOLFSSL*, const byte*, byte);
- #endif /* WOLFSSL_DTLS */
-#endif
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#ifdef WOLFSSL_DTLS
- static WC_INLINE int DtlsCheckWindow(WOLFSSL* ssl);
- static WC_INLINE int DtlsUpdateWindow(WOLFSSL* ssl);
-#endif
-
-
-enum processReply {
- doProcessInit = 0,
-#ifndef NO_WOLFSSL_SERVER
- runProcessOldClientHello,
-#endif
- getRecordLayerHeader,
- getData,
- verifyEncryptedMessage,
- decryptMessage,
- verifyMessage,
- runProcessingOneMessage
-};
-
-
-#ifndef WOLFSSL_NO_TLS12
-#if !defined(NO_WOLFSSL_SERVER) || !defined(NO_WOLFSSL_CLIENT)
-
-/* Server random bytes for TLS v1.3 described downgrade protection mechanism. */
-static const byte tls13Downgrade[7] = {
- 0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44
-};
-#define TLS13_DOWNGRADE_SZ sizeof(tls13Downgrade)
-
-#endif /* !NO_WOLFSSL_SERVER || !NO_WOLFSSL_CLIENT */
-
-#if !defined(NO_OLD_TLS) && !defined(WOLFSSL_AEAD_ONLY)
-static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
- int padSz, int content, int verify, int epochOrder);
-
-#endif
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#ifdef HAVE_QSH
- int QSH_Init(WOLFSSL* ssl);
-#endif
-
-#ifdef WOLFSSL_RENESAS_TSIP_TLS
- int tsip_useable(const WOLFSSL *ssl);
- int tsip_generatePremasterSecret();
- int tsip_generateEncryptPreMasterSecret(WOLFSSL *ssl, byte *out, word32 *outSz);
-#endif
-int IsTLS(const WOLFSSL* ssl)
-{
- if (ssl->version.major == SSLv3_MAJOR && ssl->version.minor >=TLSv1_MINOR)
- return 1;
-
- return 0;
-}
-
-
-int IsAtLeastTLSv1_2(const WOLFSSL* ssl)
-{
- if (ssl->version.major == SSLv3_MAJOR && ssl->version.minor >=TLSv1_2_MINOR)
- return 1;
-#ifdef WOLFSSL_DTLS
- if (ssl->version.major == DTLS_MAJOR && ssl->version.minor <= DTLSv1_2_MINOR)
- return 1;
-#endif
-
- return 0;
-}
-
-int IsAtLeastTLSv1_3(const ProtocolVersion pv)
-{
- return (pv.major == SSLv3_MAJOR && pv.minor >= TLSv1_3_MINOR);
-}
-
-static WC_INLINE int IsEncryptionOn(WOLFSSL* ssl, int isSend)
-{
- (void)isSend;
-
- #ifdef WOLFSSL_DTLS
- /* For DTLS, epoch 0 is always not encrypted. */
- if (ssl->options.dtls && !isSend && ssl->keys.curEpoch == 0)
- return 0;
- #endif /* WOLFSSL_DTLS */
-
- return ssl->keys.encryptionOn;
-}
-
-
-#if defined(WOLFSSL_DTLS) || !defined(WOLFSSL_NO_TLS12)
-/* If SCTP is not enabled returns the state of the dtls option.
- * If SCTP is enabled returns dtls && !sctp. */
-static WC_INLINE int IsDtlsNotSctpMode(WOLFSSL* ssl)
-{
-#ifdef WOLFSSL_SCTP
- return ssl->options.dtls && !ssl->options.dtlsSctp;
-#else
- return ssl->options.dtls;
-#endif
-}
-#endif /* DTLS || !WOLFSSL_NO_TLS12 */
-
-
-#ifdef HAVE_QSH
-/* free all structs that where used with QSH */
-static int QSH_FreeAll(WOLFSSL* ssl)
-{
- QSHKey* key = ssl->QSH_Key;
- QSHKey* preKey = NULL;
- QSHSecret* secret = ssl->QSH_secret;
- QSHScheme* list = NULL;
- QSHScheme* preList = NULL;
-
- /* free elements in struct */
- while (key) {
- preKey = key;
- if (key->pri.buffer) {
- ForceZero(key->pri.buffer, key->pri.length);
- XFREE(key->pri.buffer, ssl->heap, DYNAMIC_TYPE_PRIVATE_KEY);
- }
- if (key->pub.buffer)
- XFREE(key->pub.buffer, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- key = (QSHKey*)key->next;
-
- /* free struct */
- XFREE(preKey, ssl->heap, DYNAMIC_TYPE_QSH);
- }
-
-
- /* free all of peers QSH keys */
- key = ssl->peerQSHKey;
- while (key) {
- preKey = key;
- if (key->pri.buffer) {
- ForceZero(key->pri.buffer, key->pri.length);
- XFREE(key->pri.buffer, ssl->heap, DYNAMIC_TYPE_PRIVATE_KEY);
- }
- if (key->pub.buffer)
- XFREE(key->pub.buffer, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- key = (QSHKey*)key->next;
-
- /* free struct */
- XFREE(preKey, ssl->heap, DYNAMIC_TYPE_QSH);
- }
- key = NULL;
-
- /* free secret information */
- if (secret) {
- /* free up the QSHScheme list in QSHSecret */
- if (secret->list)
- list = secret->list;
- while (list) {
- preList = list;
- if (list->PK)
- XFREE(list->PK, ssl->heap, DYNAMIC_TYPE_SECRET);
- list = (QSHScheme*)list->next;
- XFREE(preList, ssl->heap, DYNAMIC_TYPE_QSH);
- }
-
- /* free secret buffers */
- if (secret->SerSi) {
- if (secret->SerSi->buffer) {
- /* clear extra secret material that supplemented Master Secret*/
- ForceZero(secret->SerSi->buffer, secret->SerSi->length);
- XFREE(secret->SerSi->buffer, ssl->heap, DYNAMIC_TYPE_SECRET);
- }
- XFREE(secret->SerSi, ssl->heap, DYNAMIC_TYPE_SECRET);
- }
- if (secret->CliSi) {
- if (secret->CliSi->buffer) {
- /* clear extra secret material that supplemented Master Secret*/
- ForceZero(secret->CliSi->buffer, secret->CliSi->length);
- XFREE(secret->CliSi->buffer, ssl->heap, DYNAMIC_TYPE_SECRET);
- }
- XFREE(secret->CliSi, ssl->heap, DYNAMIC_TYPE_SECRET);
- }
- }
- XFREE(secret, ssl->heap, DYNAMIC_TYPE_QSH);
- secret = NULL;
-
- return 0;
-}
-#endif
-
-
-#ifdef HAVE_NTRU
-static WOLFSSL_GLOBAL WC_RNG* rng;
-static WOLFSSL_GLOBAL wolfSSL_Mutex* rngMutex;
-
-static word32 GetEntropy(unsigned char* out, word32 num_bytes)
-{
- int ret = 0;
-
- if (rng == NULL) {
- if ((rng = (WC_RNG*)XMALLOC(sizeof(WC_RNG), 0,
- DYNAMIC_TYPE_RNG)) == NULL)
- return DRBG_OUT_OF_MEMORY;
- wc_InitRng(rng);
- }
-
- if (rngMutex == NULL) {
- if ((rngMutex = (wolfSSL_Mutex*)XMALLOC(sizeof(wolfSSL_Mutex), 0,
- DYNAMIC_TYPE_MUTEX)) == NULL)
- return DRBG_OUT_OF_MEMORY;
- wc_InitMutex(rngMutex);
- }
-
- ret |= wc_LockMutex(rngMutex);
- ret |= wc_RNG_GenerateBlock(rng, out, num_bytes);
- ret |= wc_UnLockMutex(rngMutex);
-
- if (ret != 0)
- return DRBG_ENTROPY_FAIL;
-
- return DRBG_OK;
-}
-#endif /* HAVE_NTRU */
-
-#ifdef HAVE_LIBZ
-
- /* alloc user allocs to work with zlib */
- static void* myAlloc(void* opaque, unsigned int item, unsigned int size)
- {
- (void)opaque;
- return XMALLOC(item * size, opaque, DYNAMIC_TYPE_LIBZ);
- }
-
-
- static void myFree(void* opaque, void* memory)
- {
- (void)opaque;
- XFREE(memory, opaque, DYNAMIC_TYPE_LIBZ);
- }
-
-
- /* init zlib comp/decomp streams, 0 on success */
- static int InitStreams(WOLFSSL* ssl)
- {
- ssl->c_stream.zalloc = (alloc_func)myAlloc;
- ssl->c_stream.zfree = (free_func)myFree;
- ssl->c_stream.opaque = (voidpf)ssl->heap;
-
- if (deflateInit(&ssl->c_stream, Z_DEFAULT_COMPRESSION) != Z_OK)
- return ZLIB_INIT_ERROR;
-
- ssl->didStreamInit = 1;
-
- ssl->d_stream.zalloc = (alloc_func)myAlloc;
- ssl->d_stream.zfree = (free_func)myFree;
- ssl->d_stream.opaque = (voidpf)ssl->heap;
-
- if (inflateInit(&ssl->d_stream) != Z_OK) return ZLIB_INIT_ERROR;
-
- return 0;
- }
-
-
- static void FreeStreams(WOLFSSL* ssl)
- {
- if (ssl->didStreamInit) {
- deflateEnd(&ssl->c_stream);
- inflateEnd(&ssl->d_stream);
- }
- }
-
-
- /* compress in to out, return out size or error */
- static int myCompress(WOLFSSL* ssl, byte* in, int inSz, byte* out, int outSz)
- {
- int err;
- int currTotal = (int)ssl->c_stream.total_out;
-
- ssl->c_stream.next_in = in;
- ssl->c_stream.avail_in = inSz;
- ssl->c_stream.next_out = out;
- ssl->c_stream.avail_out = outSz;
-
- err = deflate(&ssl->c_stream, Z_SYNC_FLUSH);
- if (err != Z_OK && err != Z_STREAM_END) return ZLIB_COMPRESS_ERROR;
-
- return (int)ssl->c_stream.total_out - currTotal;
- }
-
-
- /* decompress in to out, return out size or error */
- static int myDeCompress(WOLFSSL* ssl, byte* in,int inSz, byte* out,int outSz)
- {
- int err;
- int currTotal = (int)ssl->d_stream.total_out;
-
- ssl->d_stream.next_in = in;
- ssl->d_stream.avail_in = inSz;
- ssl->d_stream.next_out = out;
- ssl->d_stream.avail_out = outSz;
-
- err = inflate(&ssl->d_stream, Z_SYNC_FLUSH);
- if (err != Z_OK && err != Z_STREAM_END) return ZLIB_DECOMPRESS_ERROR;
-
- return (int)ssl->d_stream.total_out - currTotal;
- }
-
-#endif /* HAVE_LIBZ */
-
-
-#ifdef WOLFSSL_SESSION_EXPORT
-#ifdef WOLFSSL_DTLS
-/* serializes the cipher specs struct for exporting */
-static int ExportCipherSpecState(WOLFSSL* ssl, byte* exp, word32 len, byte ver)
-{
- word32 idx = 0;
- CipherSpecs* specs;
-
- WOLFSSL_ENTER("ExportCipherSpecState");
-
- if (exp == NULL || ssl == NULL) {
- return BAD_FUNC_ARG;
- }
-
- specs= &(ssl->specs);
-
- if (DTLS_EXPORT_SPC_SZ > len) {
- return BUFFER_E;
- }
-
- XMEMSET(exp, 0, DTLS_EXPORT_SPC_SZ);
-
- c16toa(specs->key_size, exp + idx); idx += OPAQUE16_LEN;
- c16toa(specs->iv_size, exp + idx); idx += OPAQUE16_LEN;
- c16toa(specs->block_size, exp + idx); idx += OPAQUE16_LEN;
- c16toa(specs->aead_mac_size, exp + idx); idx += OPAQUE16_LEN;
- exp[idx++] = specs->bulk_cipher_algorithm;
- exp[idx++] = specs->cipher_type;
- exp[idx++] = specs->mac_algorithm;
- exp[idx++] = specs->kea;
- exp[idx++] = specs->sig_algo;
- exp[idx++] = specs->hash_size;
- exp[idx++] = specs->pad_size;
- exp[idx++] = specs->static_ecdh;
-
- if (idx != DTLS_EXPORT_SPC_SZ) {
- WOLFSSL_MSG("DTLS_EXPORT_SPC_SZ needs updated and export version");
- return DTLS_EXPORT_VER_E;
- }
-
- WOLFSSL_LEAVE("ExportCipherSpecState", idx);
- (void)ver;
- return idx;
-}
-
-
-/* serializes the key struct for exporting */
-static int ExportKeyState(WOLFSSL* ssl, byte* exp, word32 len, byte ver,
- byte small)
-{
- word32 idx = 0;
- byte sz;
- Keys* keys;
-
- WOLFSSL_ENTER("ExportKeyState");
-
- if (exp == NULL || ssl == NULL) {
- return BAD_FUNC_ARG;
- }
-
- keys = &(ssl->keys);
-
- if (DTLS_EXPORT_MIN_KEY_SZ > len) {
- WOLFSSL_MSG("Buffer not large enough for minimum key struct size");
- return BUFFER_E;
- }
-
- XMEMSET(exp, 0, DTLS_EXPORT_MIN_KEY_SZ);
-
- c32toa(keys->peer_sequence_number_hi, exp + idx); idx += OPAQUE32_LEN;
- c32toa(keys->peer_sequence_number_lo, exp + idx); idx += OPAQUE32_LEN;
- c32toa(keys->sequence_number_hi, exp + idx); idx += OPAQUE32_LEN;
- c32toa(keys->sequence_number_lo, exp + idx); idx += OPAQUE32_LEN;
-
- c16toa(keys->peerSeq[0].nextEpoch, exp + idx); idx += OPAQUE16_LEN;
- c16toa(keys->peerSeq[0].nextSeq_hi, exp + idx); idx += OPAQUE16_LEN;
- c32toa(keys->peerSeq[0].nextSeq_lo, exp + idx); idx += OPAQUE32_LEN;
- c16toa(keys->curEpoch, exp + idx); idx += OPAQUE16_LEN;
- c16toa(keys->curSeq_hi, exp + idx); idx += OPAQUE16_LEN;
- c32toa(keys->curSeq_lo, exp + idx); idx += OPAQUE32_LEN;
- c16toa(keys->peerSeq[0].prevSeq_hi, exp + idx); idx += OPAQUE16_LEN;
- c32toa(keys->peerSeq[0].prevSeq_lo, exp + idx); idx += OPAQUE32_LEN;
-
- c16toa(keys->dtls_peer_handshake_number, exp + idx); idx += OPAQUE16_LEN;
- c16toa(keys->dtls_expected_peer_handshake_number, exp + idx);
- idx += OPAQUE16_LEN;
-
- c16toa(keys->dtls_sequence_number_hi, exp + idx); idx += OPAQUE16_LEN;
- c32toa(keys->dtls_sequence_number_lo, exp + idx); idx += OPAQUE32_LEN;
- c16toa(keys->dtls_prev_sequence_number_hi, exp + idx); idx += OPAQUE16_LEN;
- c32toa(keys->dtls_prev_sequence_number_lo, exp + idx); idx += OPAQUE32_LEN;
- c16toa(keys->dtls_epoch, exp + idx); idx += OPAQUE16_LEN;
- c16toa(keys->dtls_handshake_number, exp + idx); idx += OPAQUE16_LEN;
- c32toa(keys->encryptSz, exp + idx); idx += OPAQUE32_LEN;
- c32toa(keys->padSz, exp + idx); idx += OPAQUE32_LEN;
- exp[idx++] = keys->encryptionOn;
- exp[idx++] = keys->decryptedCur;
-
- /* from here on the buffer needs checked because is variable length that
- * can be larger than DTLS_EXPORT_MIN_KEY_SZ */
- {
- word32 i;
- if ((OPAQUE16_LEN * 2) + idx +
- (2 * (WOLFSSL_DTLS_WINDOW_WORDS * OPAQUE32_LEN)) > len) {
- WOLFSSL_MSG("Buffer not large enough for WOLFSSL_DTLS_WINDOW_WORDS");
- return BUFFER_E;
- }
-
- c16toa(WOLFSSL_DTLS_WINDOW_WORDS, exp + idx); idx += OPAQUE16_LEN;
- for (i = 0; i < WOLFSSL_DTLS_WINDOW_WORDS; i++) {
- c32toa(keys->peerSeq[0].window[i], exp + idx);
- idx += OPAQUE32_LEN;
- }
- c16toa(WOLFSSL_DTLS_WINDOW_WORDS, exp + idx); idx += OPAQUE16_LEN;
- for (i = 0; i < WOLFSSL_DTLS_WINDOW_WORDS; i++) {
- c32toa(keys->peerSeq[0].prevWindow[i], exp + idx);
- idx += OPAQUE32_LEN;
- }
- }
-
- if (idx >= len) {
- WOLFSSL_MSG("Buffer not large enough for truncated hmac flag");
- return BUFFER_E;
- }
-
-#ifdef HAVE_TRUNCATED_HMAC
- sz = ssl->truncated_hmac ? TRUNCATED_HMAC_SZ: ssl->specs.hash_size;
- exp[idx++] = ssl->truncated_hmac;
-#else
- sz = ssl->specs.hash_size;
- exp[idx++] = 0; /* no truncated hmac */
-#endif
-
- sz = (small)? 0: sz;
- if (idx + (sz * 2) + OPAQUE8_LEN > len) {
- WOLFSSL_MSG("Buffer not large enough for MAC secret");
- return BUFFER_E;
- }
-
- exp[idx++] = sz;
- if (sz > 0) {
- #ifndef WOLFSSL_AEAD_ONLY
- XMEMCPY(exp + idx, keys->client_write_MAC_secret, sz); idx += sz;
- XMEMCPY(exp + idx, keys->server_write_MAC_secret, sz); idx += sz;
- #else
- XMEMSET(exp + idx, 0, sz); idx += sz;
- XMEMSET(exp + idx, 0, sz); idx += sz;
- #endif
- }
-
- sz = (small)? 0: ssl->specs.key_size;
- if (idx + (sz * 2) + OPAQUE8_LEN > len) {
- WOLFSSL_MSG("Buffer not large enough for write key");
- return BUFFER_E;
- }
-
- exp[idx++] = sz;
- if (sz > 0) {
- XMEMCPY(exp + idx, keys->client_write_key, sz); idx += sz;
- XMEMCPY(exp + idx, keys->server_write_key, sz); idx += sz;
- }
-
- sz = (small)? 0: ssl->specs.iv_size;
- if (idx + (sz * 2) + OPAQUE8_LEN + AEAD_MAX_EXP_SZ > len) {
- WOLFSSL_MSG("Buffer not large enough for IVs");
- return BUFFER_E;
- }
-
- exp[idx++] = sz;
- if (sz > 0) {
- XMEMCPY(exp + idx, keys->client_write_IV, sz); idx += sz;
- XMEMCPY(exp + idx, keys->server_write_IV, sz); idx += sz;
- }
- XMEMCPY(exp + idx, keys->aead_exp_IV, AEAD_MAX_EXP_SZ);
- idx += AEAD_MAX_EXP_SZ;
-
- sz = (small)? 0: AEAD_MAX_IMP_SZ;
- if (idx + (sz * 2) + OPAQUE8_LEN > len) {
- WOLFSSL_MSG("Buffer not large enough for imp IVs");
- return BUFFER_E;
- }
- exp[idx++] = sz;
- if (sz > 0) {
- XMEMCPY(exp + idx, keys->aead_enc_imp_IV, sz); idx += sz;
- XMEMCPY(exp + idx, keys->aead_dec_imp_IV, sz); idx += sz;
- }
-
- /* DTLS_EXPORT_KEY_SZ is max value. idx size can vary */
- if (idx > DTLS_EXPORT_KEY_SZ) {
- WOLFSSL_MSG("DTLS_EXPORT_KEY_SZ needs updated and export version");
- return DTLS_EXPORT_VER_E;
- }
-
- WOLFSSL_LEAVE("ExportKeyState", idx);
- (void)ver;
- return idx;
-}
-
-static int ImportCipherSpecState(WOLFSSL* ssl, byte* exp, word32 len, byte ver)
-{
- word32 idx = 0;
- CipherSpecs* specs;
-
- WOLFSSL_ENTER("ImportCipherSpecState");
-
- if (exp == NULL || ssl == NULL) {
- return BAD_FUNC_ARG;
- }
-
- specs= &(ssl->specs);
-
- if (DTLS_EXPORT_SPC_SZ > len) {
- WOLFSSL_MSG("Buffer not large enough for max spec struct size");
- return BUFFER_E;
- }
-
- ato16(exp + idx, &specs->key_size); idx += OPAQUE16_LEN;
- ato16(exp + idx, &specs->iv_size); idx += OPAQUE16_LEN;
- ato16(exp + idx, &specs->block_size); idx += OPAQUE16_LEN;
- ato16(exp + idx, &specs->aead_mac_size); idx += OPAQUE16_LEN;
- specs->bulk_cipher_algorithm = exp[idx++];
- specs->cipher_type = exp[idx++];
- specs->mac_algorithm = exp[idx++];
- specs->kea = exp[idx++];
- specs->sig_algo = exp[idx++];
- specs->hash_size = exp[idx++];
- specs->pad_size = exp[idx++];
- specs->static_ecdh = exp[idx++];
-
- WOLFSSL_LEAVE("ImportCipherSpecState", idx);
- (void)ver;
- return idx;
-}
-
-
-static int ImportKeyState(WOLFSSL* ssl, byte* exp, word32 len, byte ver)
-{
- word32 idx = 0;
- byte sz;
- Keys* keys;
-
- WOLFSSL_ENTER("ImportKeyState");
-
- if (exp == NULL || ssl == NULL) {
- return BAD_FUNC_ARG;
- }
-
- keys = &(ssl->keys);
-
- /* check minimum length -- includes byte used for size indicators */
- if (len < DTLS_EXPORT_MIN_KEY_SZ) {
- WOLFSSL_MSG("Buffer not large enough for minimum expected size");
- return BUFFER_E;
- }
- ato32(exp + idx, &keys->peer_sequence_number_hi); idx += OPAQUE32_LEN;
- ato32(exp + idx, &keys->peer_sequence_number_lo); idx += OPAQUE32_LEN;
- ato32(exp + idx, &keys->sequence_number_hi); idx += OPAQUE32_LEN;
- ato32(exp + idx, &keys->sequence_number_lo); idx += OPAQUE32_LEN;
-
- ato16(exp + idx, &keys->peerSeq[0].nextEpoch); idx += OPAQUE16_LEN;
- ato16(exp + idx, &keys->peerSeq[0].nextSeq_hi); idx += OPAQUE16_LEN;
- ato32(exp + idx, &keys->peerSeq[0].nextSeq_lo); idx += OPAQUE32_LEN;
- ato16(exp + idx, &keys->curEpoch); idx += OPAQUE16_LEN;
- ato16(exp + idx, &keys->curSeq_hi); idx += OPAQUE16_LEN;
- ato32(exp + idx, &keys->curSeq_lo); idx += OPAQUE32_LEN;
- ato16(exp + idx, &keys->peerSeq[0].prevSeq_hi); idx += OPAQUE16_LEN;
- ato32(exp + idx, &keys->peerSeq[0].prevSeq_lo); idx += OPAQUE32_LEN;
-
- ato16(exp + idx, &keys->dtls_peer_handshake_number); idx += OPAQUE16_LEN;
- ato16(exp + idx, &keys->dtls_expected_peer_handshake_number);
- idx += OPAQUE16_LEN;
-
- ato16(exp + idx, &keys->dtls_sequence_number_hi); idx += OPAQUE16_LEN;
- ato32(exp + idx, &keys->dtls_sequence_number_lo); idx += OPAQUE32_LEN;
- ato16(exp + idx, &keys->dtls_prev_sequence_number_hi); idx += OPAQUE16_LEN;
- ato32(exp + idx, &keys->dtls_prev_sequence_number_lo); idx += OPAQUE32_LEN;
- ato16(exp + idx, &keys->dtls_epoch); idx += OPAQUE16_LEN;
- ato16(exp + idx, &keys->dtls_handshake_number); idx += OPAQUE16_LEN;
- ato32(exp + idx, &keys->encryptSz); idx += OPAQUE32_LEN;
- ato32(exp + idx, &keys->padSz); idx += OPAQUE32_LEN;
- keys->encryptionOn = exp[idx++];
- keys->decryptedCur = exp[idx++];
-
- {
- word16 i, wordCount, wordAdj = 0;
-
- /* do window */
- ato16(exp + idx, &wordCount);
- idx += OPAQUE16_LEN;
-
- if (wordCount > WOLFSSL_DTLS_WINDOW_WORDS) {
- wordCount = WOLFSSL_DTLS_WINDOW_WORDS;
- wordAdj = (WOLFSSL_DTLS_WINDOW_WORDS - wordCount) * sizeof(word32);
- }
-
- XMEMSET(keys->peerSeq[0].window, 0xFF, DTLS_SEQ_SZ);
- for (i = 0; i < wordCount; i++) {
- ato32(exp + idx, &keys->peerSeq[0].window[i]);
- idx += OPAQUE32_LEN;
- }
- idx += wordAdj;
-
- /* do prevWindow */
- ato16(exp + idx, &wordCount);
- idx += OPAQUE16_LEN;
-
- if (wordCount > WOLFSSL_DTLS_WINDOW_WORDS) {
- wordCount = WOLFSSL_DTLS_WINDOW_WORDS;
- wordAdj = (WOLFSSL_DTLS_WINDOW_WORDS - wordCount) * sizeof(word32);
- }
-
- XMEMSET(keys->peerSeq[0].prevWindow, 0xFF, DTLS_SEQ_SZ);
- for (i = 0; i < wordCount; i++) {
- ato32(exp + idx, &keys->peerSeq[0].prevWindow[i]);
- idx += OPAQUE32_LEN;
- }
- idx += wordAdj;
-
- }
-
-#ifdef HAVE_TRUNCATED_HMAC
- ssl->truncated_hmac = exp[idx++];
-#else
- idx++; /* no truncated hmac */
-#endif
- sz = exp[idx++];
-#ifndef WOLFSSL_AEAD_ONLY
- if (sz > sizeof(keys->client_write_MAC_secret) || (sz * 2) + idx > len) {
- WOLFSSL_MSG("Buffer not large enough for MAC import");
- return BUFFER_E;
- }
- if (sz > 0) {
- XMEMCPY(keys->client_write_MAC_secret, exp + idx, sz); idx += sz;
- XMEMCPY(keys->server_write_MAC_secret, exp + idx, sz); idx += sz;
- }
-#else
- if (sz + idx > len) {
- return BUFFER_E;
- }
- idx += sz; idx += sz;
-#endif
-
- sz = exp[idx++];
- if (sz > sizeof(keys->client_write_key) || (sz * 2) + idx > len) {
- WOLFSSL_MSG("Buffer not large enough for key import");
- return BUFFER_E;
- }
- if (sz > 0) {
- XMEMCPY(keys->client_write_key, exp + idx, sz); idx += sz;
- XMEMCPY(keys->server_write_key, exp + idx, sz); idx += sz;
- }
-
- sz = exp[idx++];
- if (sz > sizeof(keys->client_write_IV) || (sz * 2) + idx > len) {
- WOLFSSL_MSG("Buffer not large enough for write IV import");
- return BUFFER_E;
- }
- if (sz > 0) {
- XMEMCPY(keys->client_write_IV, exp + idx, sz); idx += sz;
- XMEMCPY(keys->server_write_IV, exp + idx, sz); idx += sz;
- }
- XMEMCPY(keys->aead_exp_IV, exp + idx, AEAD_MAX_EXP_SZ);
- idx += AEAD_MAX_EXP_SZ;
-
- sz = exp[idx++];
- if (sz > sizeof(keys->aead_enc_imp_IV) || (sz * 2) + idx > len) {
- WOLFSSL_MSG("Buffer not large enough for imp IV import");
- return BUFFER_E;
- }
- if (sz > 0) {
- XMEMCPY(keys->aead_enc_imp_IV, exp + idx, sz); idx += sz;
- XMEMCPY(keys->aead_dec_imp_IV, exp + idx, sz); idx += sz;
- }
-
- WOLFSSL_LEAVE("ImportKeyState", idx);
- (void)ver;
- return idx;
-}
-
-
-/* copy over necessary information from Options struct to buffer
- * On success returns size of buffer used on failure returns a negative value */
-static int dtls_export_new(WOLFSSL* ssl, byte* exp, word32 len, byte ver)
-{
- int idx = 0;
- word16 zero = 0;
- Options* options = &ssl->options;
-
- WOLFSSL_ENTER("dtls_export_new");
-
- if (exp == NULL || options == NULL || len < DTLS_EXPORT_OPT_SZ) {
- return BAD_FUNC_ARG;
- }
-
- XMEMSET(exp, 0, DTLS_EXPORT_OPT_SZ);
-
- /* these options are kept and sent to indicate verify status and strength
- * of handshake */
- exp[idx++] = options->sendVerify;
- exp[idx++] = options->verifyPeer;
- exp[idx++] = options->verifyNone;
- exp[idx++] = options->downgrade;
-#ifndef NO_DH
- c16toa(options->minDhKeySz, exp + idx); idx += OPAQUE16_LEN;
- c16toa(options->maxDhKeySz, exp + idx); idx += OPAQUE16_LEN;
- c16toa(options->dhKeySz, exp + idx); idx += OPAQUE16_LEN;
-#else
- c16toa(zero, exp + idx); idx += OPAQUE16_LEN;
- c16toa(zero, exp + idx); idx += OPAQUE16_LEN;
- c16toa(zero, exp + idx); idx += OPAQUE16_LEN;
-#endif
-#ifndef NO_RSA
- c16toa((word16)(options->minRsaKeySz), exp + idx); idx += OPAQUE16_LEN;
-#else
- c16toa(zero, exp + idx); idx += OPAQUE16_LEN;
-#endif
-#ifdef HAVE_ECC
- c16toa((word16)(options->minEccKeySz), exp + idx); idx += OPAQUE16_LEN;
-#else
- c16toa(zero, exp + idx); idx += OPAQUE16_LEN;
-#endif
-
- /* these options are kept to indicate state and behavior */
-#ifndef NO_PSK
- exp[idx++] = options->havePSK;
-#else
- exp[idx++] = 0;
-#endif
- exp[idx++] = options->sessionCacheOff;
- exp[idx++] = options->sessionCacheFlushOff;
- exp[idx++] = options->side;
- exp[idx++] = options->resuming;
- exp[idx++] = options->haveSessionId;
- exp[idx++] = options->tls;
- exp[idx++] = options->tls1_1;
- exp[idx++] = options->dtls;
- exp[idx++] = options->connReset;
- exp[idx++] = options->isClosed;
- exp[idx++] = options->closeNotify;
- exp[idx++] = options->sentNotify;
- exp[idx++] = options->usingCompression;
- exp[idx++] = options->haveRSA;
- exp[idx++] = options->haveECC;
- exp[idx++] = options->haveDH;
- exp[idx++] = options->haveNTRU;
- exp[idx++] = options->haveQSH;
- exp[idx++] = options->haveECDSAsig;
- exp[idx++] = options->haveStaticECC;
- exp[idx++] = options->havePeerVerify;
- exp[idx++] = options->usingPSK_cipher;
- exp[idx++] = options->usingAnon_cipher;
- exp[idx++] = options->sendAlertState;
- exp[idx++] = options->partialWrite;
- exp[idx++] = options->quietShutdown;
- exp[idx++] = options->groupMessages;
-#ifdef HAVE_POLY1305
- exp[idx++] = options->oldPoly;
-#else
- exp[idx++] = 0;
-#endif
-#ifdef HAVE_ANON
- exp[idx++] = options->haveAnon;
-#else
- exp[idx++] = 0;
-#endif
-#ifdef HAVE_SESSION_TICKET
- exp[idx++] = options->createTicket;
- exp[idx++] = options->useTicket;
-#ifdef WOLFSSL_TLS13
- if (ver > DTLS_EXPORT_VERSION_3) {
- exp[idx++] = options->noTicketTls13;
- }
-#else
- if (ver > DTLS_EXPORT_VERSION_3) {
- exp[idx++] = 0;
- }
-#endif
-#else
- exp[idx++] = 0;
- exp[idx++] = 0;
- if (ver > DTLS_EXPORT_VERSION_3) {
- exp[idx++] = 0;
- }
-#endif
- exp[idx++] = options->processReply;
- exp[idx++] = options->cipherSuite0;
- exp[idx++] = options->cipherSuite;
- exp[idx++] = options->serverState;
- exp[idx++] = options->clientState;
- exp[idx++] = options->handShakeState;
- exp[idx++] = options->handShakeDone;
- exp[idx++] = options->minDowngrade;
- exp[idx++] = options->connectState;
- exp[idx++] = options->acceptState;
- exp[idx++] = options->asyncState;
-
- /* version of connection */
- exp[idx++] = ssl->version.major;
- exp[idx++] = ssl->version.minor;
-
- (void)zero;
-
- /* check if changes were made and notify of need to update export version */
- switch (ver) {
- case DTLS_EXPORT_VERSION_3:
- if (idx != DTLS_EXPORT_OPT_SZ_3) {
- WOLFSSL_MSG("Update DTLS_EXPORT_OPT_SZ and version of export");
- return DTLS_EXPORT_VER_E;
- }
- break;
-
- case DTLS_EXPORT_VERSION:
- if (idx != DTLS_EXPORT_OPT_SZ) {
- WOLFSSL_MSG("Update DTLS_EXPORT_OPT_SZ and version of export");
- return DTLS_EXPORT_VER_E;
- }
- break;
-
- default:
- WOLFSSL_MSG("New version case needs added to wolfSSL export");
- return DTLS_EXPORT_VER_E;
- }
-
- WOLFSSL_LEAVE("dtls_export_new", idx);
-
- return idx;
-}
-
-
-/* copy items from Export struct to Options struct
- * On success returns size of buffer used on failure returns a negative value */
-static int dtls_export_load(WOLFSSL* ssl, byte* exp, word32 len, byte ver)
-{
- int idx = 0;
- Options* options = &ssl->options;
-
- switch (ver) {
- case DTLS_EXPORT_VERSION:
- if (len < DTLS_EXPORT_OPT_SZ) {
- WOLFSSL_MSG("Sanity check on buffer size failed");
- return BAD_FUNC_ARG;
- }
- break;
-
- case DTLS_EXPORT_VERSION_3:
- if (len < DTLS_EXPORT_OPT_SZ_3) {
- WOLFSSL_MSG("Sanity check on buffer size failed");
- return BAD_FUNC_ARG;
- }
- break;
-
- default:
- WOLFSSL_MSG("Export version not supported");
- return BAD_FUNC_ARG;
- }
-
- if (exp == NULL || options == NULL) {
- return BAD_FUNC_ARG;
- }
-
-
- /* these options are kept and sent to indicate verify status and strength
- * of handshake */
- options->sendVerify = exp[idx++];
- options->verifyPeer = exp[idx++];
- options->verifyNone = exp[idx++];
- options->downgrade = exp[idx++];
-#ifndef NO_DH
- ato16(exp + idx, &(options->minDhKeySz)); idx += OPAQUE16_LEN;
- ato16(exp + idx, &(options->maxDhKeySz)); idx += OPAQUE16_LEN;
- ato16(exp + idx, &(options->dhKeySz)); idx += OPAQUE16_LEN;
-#else
- idx += OPAQUE16_LEN;
- idx += OPAQUE16_LEN;
- idx += OPAQUE16_LEN;
-#endif
-#ifndef NO_RSA
- ato16(exp + idx, (word16*)&(options->minRsaKeySz)); idx += OPAQUE16_LEN;
-#else
- idx += OPAQUE16_LEN;
-#endif
-#ifdef HAVE_ECC
- ato16(exp + idx, (word16*)&(options->minEccKeySz)); idx += OPAQUE16_LEN;
-#else
- idx += OPAQUE16_LEN;
-#endif
-
- /* these options are kept to indicate state and behavior */
-#ifndef NO_PSK
- options->havePSK = exp[idx++];
-#else
- idx++;
-#endif
- options->sessionCacheOff = exp[idx++];
- options->sessionCacheFlushOff = exp[idx++];
- options->side = exp[idx++];
- options->resuming = exp[idx++];
- options->haveSessionId = exp[idx++];
- options->tls = exp[idx++];
- options->tls1_1 = exp[idx++];
- options->dtls = exp[idx++];
- options->connReset = exp[idx++];
- options->isClosed = exp[idx++];
- options->closeNotify = exp[idx++];
- options->sentNotify = exp[idx++];
- options->usingCompression = exp[idx++];
- options->haveRSA = exp[idx++];
- options->haveECC = exp[idx++];
- options->haveDH = exp[idx++];
- options->haveNTRU = exp[idx++];
- options->haveQSH = exp[idx++];
- options->haveECDSAsig = exp[idx++];
- options->haveStaticECC = exp[idx++];
- options->havePeerVerify = exp[idx++];
- options->usingPSK_cipher = exp[idx++];
- options->usingAnon_cipher = exp[idx++];
- options->sendAlertState = exp[idx++];
- options->partialWrite = exp[idx++];
- options->quietShutdown = exp[idx++];
- options->groupMessages = exp[idx++];
-#ifdef HAVE_POLY1305
- options->oldPoly = exp[idx++]; /* set when to use old rfc way of poly*/
-#else
- idx++;
-#endif
-#ifdef HAVE_ANON
- options->haveAnon = exp[idx++]; /* User wants to allow Anon suites */
-#else
- idx++;
-#endif
-#ifdef HAVE_SESSION_TICKET
- options->createTicket = exp[idx++]; /* Server to create new Ticket */
- options->useTicket = exp[idx++]; /* Use Ticket not session cache */
-#ifdef WOLFSSL_TLS13
- if (ver > DTLS_EXPORT_VERSION_3) {
- options->noTicketTls13 = exp[idx++];/* Server won't create new Ticket */
- }
-#else
- if (ver > DTLS_EXPORT_VERSION_3) {
- exp[idx++] = 0;
- }
-#endif
-#else
- idx++;
- idx++;
- if (ver > DTLS_EXPORT_VERSION_3) {
- idx++;
- }
-#endif
- options->processReply = exp[idx++];
- options->cipherSuite0 = exp[idx++];
- options->cipherSuite = exp[idx++];
- options->serverState = exp[idx++];
- options->clientState = exp[idx++];
- options->handShakeState = exp[idx++];
- options->handShakeDone = exp[idx++];
- options->minDowngrade = exp[idx++];
- options->connectState = exp[idx++];
- options->acceptState = exp[idx++];
- options->asyncState = exp[idx++];
-
- /* version of connection */
- if (ssl->version.major != exp[idx++] || ssl->version.minor != exp[idx++]) {
- WOLFSSL_MSG("Version mismatch ie DTLS v1 vs v1.2");
- return VERSION_ERROR;
- }
-
- return idx;
-}
-
-#ifndef WOLFSSL_SESSION_EXPORT_NOPEER
-static int ExportPeerInfo(WOLFSSL* ssl, byte* exp, word32 len, byte ver)
-{
- int idx = 0;
- int ipSz = DTLS_EXPORT_IP; /* start as max size */
- int fam = 0;
- word16 port = 0;
- char ip[DTLS_EXPORT_IP];
-
- if (ver != DTLS_EXPORT_VERSION) {
- WOLFSSL_MSG("Export version not supported");
- return BAD_FUNC_ARG;
- }
-
- if (ssl == NULL || exp == NULL || len < sizeof(ip) + 3 * DTLS_EXPORT_LEN) {
- return BAD_FUNC_ARG;
- }
-
- if (ssl->ctx->CBGetPeer == NULL) {
- WOLFSSL_MSG("No get peer call back set");
- return BAD_FUNC_ARG;
- }
- if (ssl->ctx->CBGetPeer(ssl, ip, &ipSz, &port, &fam) != WOLFSSL_SUCCESS) {
- WOLFSSL_MSG("Get peer callback error");
- return SOCKET_ERROR_E;
- }
-
- /* check that ipSz/fam is not negative or too large since user can set cb */
- if (ipSz < 0 || ipSz > DTLS_EXPORT_IP || fam < 0) {
- WOLFSSL_MSG("Bad ipSz or fam returned from get peer callback");
- return SOCKET_ERROR_E;
- }
-
- c16toa((word16)fam, exp + idx); idx += DTLS_EXPORT_LEN;
- c16toa((word16)ipSz, exp + idx); idx += DTLS_EXPORT_LEN;
- XMEMCPY(exp + idx, ip, ipSz); idx += ipSz;
- c16toa(port, exp + idx); idx += DTLS_EXPORT_LEN;
-
- return idx;
-}
-#endif /* !WOLFSSL_SESSION_EXPORT_NOPEER */
-
-
-static int ImportPeerInfo(WOLFSSL* ssl, byte* buf, word32 len, byte ver)
-{
- word16 idx = 0;
- word16 ipSz;
- word16 fam;
- word16 port;
- char ip[DTLS_EXPORT_IP];
-
- if (ver != DTLS_EXPORT_VERSION && ver != DTLS_EXPORT_VERSION_3) {
- WOLFSSL_MSG("Export version not supported");
- return BAD_FUNC_ARG;
- }
-
- if (len == 0) {
- WOLFSSL_MSG("No peer info sent");
- return 0;
- }
-
- if (ssl == NULL || buf == NULL || len < 3 * DTLS_EXPORT_LEN) {
- return BAD_FUNC_ARG;
- }
-
- /* import sin family */
- ato16(buf + idx, &fam); idx += DTLS_EXPORT_LEN;
-
- /* import ip address idx, and ipSz are unsigned but cast for enum */
- ato16(buf + idx, &ipSz); idx += DTLS_EXPORT_LEN;
- if (ipSz >= sizeof(ip) || (word16)(idx + ipSz + DTLS_EXPORT_LEN) > len) {
- return BUFFER_E;
- }
- XMEMSET(ip, 0, sizeof(ip));
- XMEMCPY(ip, buf + idx, ipSz); idx += ipSz;
- ip[ipSz] = '\0'; /* with check that ipSz less than ip this is valid */
- ato16(buf + idx, &port); idx += DTLS_EXPORT_LEN;
-
- /* sanity check for a function to call, then use it to import peer info */
- if (ssl->ctx->CBSetPeer == NULL) {
- WOLFSSL_MSG("No set peer function");
- return BAD_FUNC_ARG;
- }
- if (ssl->ctx->CBSetPeer(ssl, ip, ipSz, port, fam) != WOLFSSL_SUCCESS) {
- WOLFSSL_MSG("Error setting peer info");
- return SOCKET_ERROR_E;
- }
-
- return idx;
-}
-
-
-/* WOLFSSL_LOCAL function that serializes the current WOLFSSL session state only
- * buf is used to hold the serialized WOLFSSL struct and sz is the size of buf
- * passed in.
- * On success returns the size of serialized session state.*/
-int wolfSSL_dtls_export_state_internal(WOLFSSL* ssl, byte* buf, word32 sz)
-{
- int ret;
- word32 idx = 0;
- word32 totalLen = 0;
-
- WOLFSSL_ENTER("wolfSSL_dtls_export_state_internal");
-
- if (buf == NULL || ssl == NULL) {
- WOLFSSL_LEAVE("wolfSSL_dtls_export_state_internal", BAD_FUNC_ARG);
- return BAD_FUNC_ARG;
- }
-
- totalLen += DTLS_EXPORT_LEN * 2; /* 2 protocol bytes and 2 length bytes */
- /* each of the following have a 2 byte length before data */
- totalLen += DTLS_EXPORT_LEN + DTLS_EXPORT_MIN_KEY_SZ;
- if (totalLen > sz) {
- WOLFSSL_LEAVE("wolfSSL_dtls_export_state_internal", BUFFER_E);
- return BUFFER_E;
- }
-
- buf[idx++] = (byte)DTLS_EXPORT_STATE_PRO;
- buf[idx++] = ((byte)DTLS_EXPORT_STATE_PRO & 0xF0) |
- ((byte)DTLS_EXPORT_VERSION & 0X0F);
- idx += DTLS_EXPORT_LEN; /* leave room for total length */
-
- /* export keys struct and dtls state -- variable length stored in ret */
- idx += DTLS_EXPORT_LEN; /* leave room for length */
- if ((ret = ExportKeyState(ssl, buf + idx, sz - idx,
- DTLS_EXPORT_VERSION, 1)) < 0) {
- WOLFSSL_LEAVE("wolfSSL_dtls_export_state_internal", ret);
- return ret;
- }
- c16toa((word16)ret, buf + idx - DTLS_EXPORT_LEN); idx += ret;
-
- /* place total length of exported buffer minus 2 bytes protocol/version */
- c16toa((word16)(idx - DTLS_EXPORT_LEN), buf + DTLS_EXPORT_LEN);
-
-#ifdef WOLFSSL_SESSION_EXPORT_DEBUG
- /* if compiled with debug options then print the version, protocol, size */
- {
- char debug[256];
- XSNPRINTF(debug, sizeof(debug), "Exporting DTLS session state\n"
- "\tVersion : %d\n\tProtocol : %02X%01X\n\tLength of: %d\n\n"
- , (int)DTLS_EXPORT_VERSION, buf[0], (buf[1] >> 4), idx - 2);
- WOLFSSL_MSG(debug);
- }
-#endif /* WOLFSSL_SESSION_EXPORT_DEBUG */
-
- WOLFSSL_LEAVE("wolfSSL_dtls_export_state_internal", idx);
- return idx;
-}
-
-
-/* WOLFSSL_LOCAL function that serializes the current WOLFSSL session
- * buf is used to hold the serialized WOLFSSL struct and sz is the size of buf
- * passed in.
- * On success returns the size of serialized session.*/
-int wolfSSL_dtls_export_internal(WOLFSSL* ssl, byte* buf, word32 sz)
-{
- int ret;
- word32 idx = 0;
- word32 totalLen = 0;
-
- WOLFSSL_ENTER("wolfSSL_dtls_export_internal");
-
- if (buf == NULL || ssl == NULL) {
- WOLFSSL_LEAVE("wolfSSL_dtls_export_internal", BAD_FUNC_ARG);
- return BAD_FUNC_ARG;
- }
-
- totalLen += DTLS_EXPORT_LEN * 2; /* 2 protocol bytes and 2 length bytes */
- /* each of the following have a 2 byte length before data */
- totalLen += DTLS_EXPORT_LEN + DTLS_EXPORT_OPT_SZ;
- totalLen += DTLS_EXPORT_LEN + DTLS_EXPORT_KEY_SZ;
- totalLen += DTLS_EXPORT_LEN + DTLS_EXPORT_SPC_SZ;
- totalLen += DTLS_EXPORT_LEN + ssl->buffers.dtlsCtx.peer.sz;
-
- if (totalLen > sz) {
- WOLFSSL_LEAVE("wolfSSL_dtls_export_internal", BUFFER_E);
- return BUFFER_E;
- }
-
- buf[idx++] = (byte)DTLS_EXPORT_PRO;
- buf[idx++] = ((byte)DTLS_EXPORT_PRO & 0xF0) |
- ((byte)DTLS_EXPORT_VERSION & 0X0F);
-
- idx += DTLS_EXPORT_LEN; /* leave spot for length */
-
- c16toa((word16)DTLS_EXPORT_OPT_SZ, buf + idx); idx += DTLS_EXPORT_LEN;
- if ((ret = dtls_export_new(ssl, buf + idx, sz - idx,
- DTLS_EXPORT_VERSION)) < 0) {
- WOLFSSL_LEAVE("wolfSSL_dtls_export_internal", ret);
- return ret;
- }
- idx += ret;
-
- /* export keys struct and dtls state -- variable length stored in ret */
- idx += DTLS_EXPORT_LEN; /* leave room for length */
- if ((ret = ExportKeyState(ssl, buf + idx, sz - idx,
- DTLS_EXPORT_VERSION, 0)) < 0) {
- WOLFSSL_LEAVE("wolfSSL_dtls_export_internal", ret);
- return ret;
- }
- c16toa((word16)ret, buf + idx - DTLS_EXPORT_LEN); idx += ret;
-
- /* export of cipher specs struct */
- c16toa((word16)DTLS_EXPORT_SPC_SZ, buf + idx); idx += DTLS_EXPORT_LEN;
- if ((ret = ExportCipherSpecState(ssl, buf + idx, sz - idx,
- DTLS_EXPORT_VERSION)) < 0) {
- WOLFSSL_LEAVE("wolfSSL_dtls_export_internal", ret);
- return ret;
- }
- idx += ret;
-
- /* export of dtls peer information */
- idx += DTLS_EXPORT_LEN;
-#ifdef WOLFSSL_SESSION_EXPORT_NOPEER
- ret = 0; /* not saving peer port/ip information */
-#else
- if ((ret = ExportPeerInfo(ssl, buf + idx, sz - idx,
- DTLS_EXPORT_VERSION)) < 0) {
- WOLFSSL_LEAVE("wolfSSL_dtls_export_internal", ret);
- return ret;
- }
-#endif
- c16toa(ret, buf + idx - DTLS_EXPORT_LEN);
- idx += ret;
-
- /* place total length of exported buffer minus 2 bytes protocol/version */
- c16toa((word16)(idx - DTLS_EXPORT_LEN), buf + DTLS_EXPORT_LEN);
-
- /* if compiled with debug options then print the version, protocol, size */
-#ifdef WOLFSSL_SESSION_EXPORT_DEBUG
- {
- char debug[256];
- XSNPRINTF(debug, sizeof(debug), "Exporting DTLS session\n"
- "\tVersion : %d\n\tProtocol : %02X%01X\n\tLength of: %d\n\n"
- , (int)DTLS_EXPORT_VERSION, buf[0], (buf[1] >> 4), idx - 2);
- WOLFSSL_MSG(debug);
- }
-#endif /* WOLFSSL_SESSION_EXPORT_DEBUG */
-
- WOLFSSL_LEAVE("wolfSSL_dtls_export_internal", idx);
- return idx;
-}
-
-
-/* On success return amount of buffer consumed */
-int wolfSSL_dtls_import_state_internal(WOLFSSL* ssl, byte* buf, word32 sz)
-{
- word32 idx = 0;
- word16 length = 0;
- int version;
- int ret;
-
- WOLFSSL_ENTER("wolfSSL_dtls_import_state_internal");
- /* check at least enough room for protocol and length */
- if (sz < DTLS_EXPORT_LEN * 2 || ssl == NULL) {
- WOLFSSL_LEAVE("wolfSSL_dtls_import_state_internal", BAD_FUNC_ARG);
- return BAD_FUNC_ARG;
- }
-
- if (buf[idx++] != (byte)DTLS_EXPORT_STATE_PRO ||
- (buf[idx] & 0xF0) != ((byte)DTLS_EXPORT_PRO & 0xF0)) {
- WOLFSSL_MSG("Incorrect protocol");
- return BAD_FUNC_ARG;
- }
- version = buf[idx++] & 0x0F;
-
- ato16(buf + idx, &length); idx += DTLS_EXPORT_LEN;
- if (length > sz - DTLS_EXPORT_LEN) { /* subtract 2 for protocol */
- WOLFSSL_MSG("Buffer size sanity check failed");
- return BUFFER_E;
- }
-
-#ifdef WOLFSSL_SESSION_EXPORT_DEBUG
- /* if compiled with debug options then print the version, protocol, size */
- {
- char debug[256];
- XSNPRINTF(debug, sizeof(debug), "Importing DTLS session state\n"
- "\tVersion : %d\n\tProtocol : %02X%01X\n\tLength of: %d\n\n"
- , (int)version, buf[0], (buf[1] >> 4), length);
- WOLFSSL_MSG(debug);
- }
-#endif /* WOLFSSL_SESSION_EXPORT_DEBUG */
-
- /* perform sanity checks and extract Options information used */
- switch (version) {
- case DTLS_EXPORT_VERSION:
- break;
-
- default:
- WOLFSSL_MSG("Bad export state version");
- return BAD_FUNC_ARG;
-
- }
-
- /* perform sanity checks and extract Keys struct */
- if (DTLS_EXPORT_LEN + idx > sz) {
- WOLFSSL_MSG("Import Key struct error");
- return BUFFER_E;
- }
- ato16(buf + idx, &length); idx += DTLS_EXPORT_LEN;
- if (length > DTLS_EXPORT_KEY_SZ || length + idx > sz) {
- WOLFSSL_MSG("Import Key struct error");
- return BUFFER_E;
- }
- if ((ret = ImportKeyState(ssl, buf + idx, length, version)) < 0) {
- WOLFSSL_MSG("Import Key struct error");
- WOLFSSL_LEAVE("wolfSSL_dtls_import_state_internal", ret);
- return ret;
- }
- idx += ret;
-
- WOLFSSL_LEAVE("wolfSSL_dtls_import_state_internal", ret);
- return ret;
-}
-
-
-/* On success return amount of buffer consumed */
-int wolfSSL_dtls_import_internal(WOLFSSL* ssl, byte* buf, word32 sz)
-{
- word32 idx = 0;
- word16 length = 0;
- int version;
- int ret;
- int optSz;
-
- WOLFSSL_ENTER("wolfSSL_dtls_import_internal");
- /* check at least enough room for protocol and length */
- if (sz < DTLS_EXPORT_LEN * 2 || ssl == NULL) {
- return BAD_FUNC_ARG;
- }
-
- /* sanity check on protocol ID and size of buffer */
- if (buf[idx++] != (byte)DTLS_EXPORT_PRO ||
- (buf[idx] & 0xF0) != ((byte)DTLS_EXPORT_PRO & 0xF0)) {
- /* don't increment on second idx to next get version */
-
- /* check if importing state only */
- return wolfSSL_dtls_import_state_internal(ssl, buf, sz);
- }
- version = buf[idx++] & 0x0F;
-
- ato16(buf + idx, &length); idx += DTLS_EXPORT_LEN;
- if (length > sz - DTLS_EXPORT_LEN) { /* subtract 2 for protocol */
- return BUFFER_E;
- }
-
- /* if compiled with debug options then print the version, protocol, size */
-#ifdef WOLFSSL_SESSION_EXPORT_DEBUG
- {
- char debug[256];
- XSNPRINTF(debug, sizeof(debug), "Importing DTLS session\n"
- "\tVersion : %d\n\tProtocol : %02X%01X\n\tLength of: %d\n\n"
- , (int)version, buf[0], (buf[1] >> 4), length);
- WOLFSSL_MSG(debug);
- }
-#endif /* WOLFSSL_SESSION_EXPORT_DEBUG */
-
- /* perform sanity checks and extract Options information used */
- switch (version) {
- case DTLS_EXPORT_VERSION:
- optSz = DTLS_EXPORT_OPT_SZ;
- break;
-
- case DTLS_EXPORT_VERSION_3:
- WOLFSSL_MSG("Importing older version 3");
- optSz = DTLS_EXPORT_OPT_SZ_3;
- break;
-
- default:
- WOLFSSL_MSG("Bad export version");
- return BAD_FUNC_ARG;
-
- }
-
- if (DTLS_EXPORT_LEN + optSz + idx > sz) {
- WOLFSSL_MSG("Import Options struct error");
- return BUFFER_E;
- }
- ato16(buf + idx, &length); idx += DTLS_EXPORT_LEN;
- if (length != optSz) {
- WOLFSSL_MSG("Import Options struct error");
- return BUFFER_E;
- }
- if ((ret = dtls_export_load(ssl, buf + idx, length, version)) < 0) {
- WOLFSSL_MSG("Import Options struct error");
- return ret;
- }
- idx += length;
-
- /* perform sanity checks and extract Keys struct */
- if (DTLS_EXPORT_LEN + idx > sz) {
- WOLFSSL_MSG("Import Key struct error");
- return BUFFER_E;
- }
- ato16(buf + idx, &length); idx += DTLS_EXPORT_LEN;
- if (length > DTLS_EXPORT_KEY_SZ || length + idx > sz) {
- WOLFSSL_MSG("Import Key struct error");
- return BUFFER_E;
- }
- if ((ret = ImportKeyState(ssl, buf + idx, length, version)) < 0) {
- WOLFSSL_MSG("Import Key struct error");
- return ret;
- }
- idx += ret;
-
- /* perform sanity checks and extract CipherSpecs struct */
- if (DTLS_EXPORT_LEN + DTLS_EXPORT_SPC_SZ + idx > sz) {
- WOLFSSL_MSG("Import CipherSpecs struct error");
- return BUFFER_E;
- }
- ato16(buf + idx, &length); idx += DTLS_EXPORT_LEN;
- if ( length != DTLS_EXPORT_SPC_SZ) {
- WOLFSSL_MSG("Import CipherSpecs struct error");
- return BUFFER_E;
- }
- if ((ret = ImportCipherSpecState(ssl, buf + idx, length, version)) < 0) {
- WOLFSSL_MSG("Import CipherSpecs struct error");
- return ret;
- }
- idx += ret;
-
- /* perform sanity checks and extract DTLS peer info */
- if (DTLS_EXPORT_LEN + idx > sz) {
- WOLFSSL_MSG("Import DTLS peer info error");
- return BUFFER_E;
- }
- ato16(buf + idx, &length); idx += DTLS_EXPORT_LEN;
- if (idx + length > sz) {
- WOLFSSL_MSG("Import DTLS peer info error");
- return BUFFER_E;
- }
- if ((ret = ImportPeerInfo(ssl, buf + idx, length, version)) < 0) {
- WOLFSSL_MSG("Import Peer Addr error");
- return ret;
- }
- idx += ret;
-
- SetKeysSide(ssl, ENCRYPT_AND_DECRYPT_SIDE);
- /* make sure is a valid suite used */
- if (wolfSSL_get_cipher(ssl) == NULL) {
- WOLFSSL_MSG("Can not match cipher suite imported");
- return MATCH_SUITE_ERROR;
- }
-
-#ifndef WOLFSSL_AEAD_ONLY
- /* set hmac function to use when verifying */
- if (ssl->options.tls == 1 || ssl->options.tls1_1 == 1 ||
- ssl->options.dtls == 1) {
- ssl->hmac = TLS_hmac;
- }
-
- /* do not allow stream ciphers with DTLS, except for NULL cipher */
- if (ssl->specs.cipher_type == stream &&
- ssl->specs.bulk_cipher_algorithm != wolfssl_cipher_null) {
- WOLFSSL_MSG("Can not import stream ciphers for DTLS");
- return SANITY_CIPHER_E;
- }
-#endif /* !WOLFSSL_AEAD_ONLY */
-
- return idx;
-}
-#endif /* WOLFSSL_DTLS */
-#endif /* WOLFSSL_SESSION_EXPORT */
-
-
-void InitSSL_Method(WOLFSSL_METHOD* method, ProtocolVersion pv)
-{
- method->version = pv;
- method->side = WOLFSSL_CLIENT_END;
- method->downgrade = 0;
-}
-
-#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_EITHER_SIDE)
-int InitSSL_Side(WOLFSSL* ssl, word16 side)
-{
- if (ssl == NULL)
- return BAD_FUNC_ARG;
-
- /* set side */
- ssl->options.side = side;
-
- /* reset options that are side specific */
-#ifdef HAVE_NTRU
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- ssl->options.haveNTRU = 1; /* always on client side */
- /* server can turn on by loading key */
- }
-#endif
-#ifdef HAVE_ECC
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- ssl->options.haveECDSAsig = 1; /* always on client side */
- ssl->options.haveECC = 1; /* server turns on with ECC key cert */
- ssl->options.haveStaticECC = 1; /* server can turn on by loading key */
- }
-#elif defined(HAVE_ED25519) || defined(HAVE_ED448)
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- ssl->options.haveECDSAsig = 1; /* always on client side */
- ssl->options.haveECC = 1; /* server turns on with ECC key cert */
- }
-#endif
-
-#if defined(HAVE_EXTENDED_MASTER) && !defined(NO_WOLFSSL_CLIENT)
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- if ((ssl->ctx->method->version.major == SSLv3_MAJOR) &&
- (ssl->ctx->method->version.minor >= TLSv1_MINOR)) {
- ssl->options.haveEMS = 1;
- }
- #ifdef WOLFSSL_DTLS
- if (ssl->ctx->method->version.major == DTLS_MAJOR)
- ssl->options.haveEMS = 1;
- #endif /* WOLFSSL_DTLS */
- }
-#endif /* HAVE_EXTENDED_MASTER && !NO_WOLFSSL_CLIENT */
-
-#if defined(WOLFSSL_DTLS) && !defined(NO_WOLFSSL_SERVER)
- if (ssl->options.dtls && ssl->options.side == WOLFSSL_SERVER_END) {
- int ret;
- ret = wolfSSL_DTLS_SetCookieSecret(ssl, NULL, 0);
- if (ret != 0) {
- WOLFSSL_MSG("DTLS Cookie Secret error");
- return ret;
- }
- }
-#endif /* WOLFSSL_DTLS && !NO_WOLFSSL_SERVER */
-
- return InitSSL_Suites(ssl);
-}
-#endif /* OPENSSL_EXTRA || WOLFSSL_EITHER_SIDE */
-
-/* Initialize SSL context, return 0 on success */
-int InitSSL_Ctx(WOLFSSL_CTX* ctx, WOLFSSL_METHOD* method, void* heap)
-{
- int ret = 0;
-
- XMEMSET(ctx, 0, sizeof(WOLFSSL_CTX));
-
- ctx->method = method;
- ctx->refCount = 1; /* so either CTX_free or SSL_free can release */
- ctx->heap = ctx; /* defaults to self */
- ctx->timeout = WOLFSSL_SESSION_TIMEOUT;
- ctx->minDowngrade = WOLFSSL_MIN_DOWNGRADE; /* current default: TLSv1_MINOR */
-
- if (wc_InitMutex(&ctx->countMutex) < 0) {
- WOLFSSL_MSG("Mutex error on CTX init");
- ctx->err = CTX_INIT_MUTEX_E;
- return BAD_MUTEX_E;
- }
-
-#ifndef NO_DH
- ctx->minDhKeySz = MIN_DHKEY_SZ;
- ctx->maxDhKeySz = MAX_DHKEY_SZ;
-#endif
-#ifndef NO_RSA
- ctx->minRsaKeySz = MIN_RSAKEY_SZ;
-#endif
-#ifdef HAVE_ECC
- ctx->minEccKeySz = MIN_ECCKEY_SZ;
- ctx->eccTempKeySz = ECDHE_SIZE;
-#endif
-#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- ctx->verifyDepth = MAX_CHAIN_DEPTH;
-#endif
-#ifdef OPENSSL_EXTRA
- ctx->cbioFlag = WOLFSSL_CBIO_NONE;
-#endif
-
-#ifndef WOLFSSL_USER_IO
- #ifdef MICRIUM
- ctx->CBIORecv = MicriumReceive;
- ctx->CBIOSend = MicriumSend;
- #ifdef WOLFSSL_DTLS
- if (method->version.major == DTLS_MAJOR) {
- ctx->CBIORecv = MicriumReceiveFrom;
- ctx->CBIOSend = MicriumSendTo;
- }
- #ifdef WOLFSSL_SESSION_EXPORT
- #error Micrium port does not support DTLS session export yet
- #endif
- #endif
- #elif defined WOLFSSL_UIP
- ctx->CBIORecv = uIPReceive;
- ctx->CBIOSend = uIPSend;
- #ifdef WOLFSSL_DTLS
- if (method->version.major == DTLS_MAJOR) {
- ctx->CBIOSendTo = uIPSendTo;
- ctx->CBIORecvFrom = uIPRecvFrom;
- }
- #endif
- #else
- ctx->CBIORecv = EmbedReceive;
- ctx->CBIOSend = EmbedSend;
- #ifdef WOLFSSL_DTLS
- if (method->version.major == DTLS_MAJOR) {
- ctx->CBIORecv = EmbedReceiveFrom;
- ctx->CBIOSend = EmbedSendTo;
- }
- #ifdef WOLFSSL_SESSION_EXPORT
- ctx->CBGetPeer = EmbedGetPeer;
- ctx->CBSetPeer = EmbedSetPeer;
- #endif
- #endif
- #endif /* MICRIUM */
-#endif /* WOLFSSL_USER_IO */
-
-#ifdef HAVE_NETX
- ctx->CBIORecv = NetX_Receive;
- ctx->CBIOSend = NetX_Send;
-#elif defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP)
- ctx->CBIORecv = Mynewt_Receive;
- ctx->CBIOSend = Mynewt_Send;
-#elif defined(WOLFSSL_GNRC)
- ctx->CBIORecv = GNRC_ReceiveFrom;
- ctx->CBIOSend = GNRC_SendTo;
-#endif
-
-#ifdef HAVE_NTRU
- if (method->side == WOLFSSL_CLIENT_END)
- ctx->haveNTRU = 1; /* always on client side */
- /* server can turn on by loading key */
-#endif
-#ifdef HAVE_ECC
- if (method->side == WOLFSSL_CLIENT_END) {
- ctx->haveECDSAsig = 1; /* always on client side */
- ctx->haveECC = 1; /* server turns on with ECC key cert */
- ctx->haveStaticECC = 1; /* server can turn on by loading key */
- }
-#elif defined(HAVE_ED25519) || defined(HAVE_ED448)
- if (method->side == WOLFSSL_CLIENT_END) {
- ctx->haveECDSAsig = 1; /* always on client side */
- ctx->haveECC = 1; /* server turns on with ECC key cert */
- }
-#endif
-
- ctx->devId = INVALID_DEVID;
-
-#if defined(WOLFSSL_DTLS)
- #ifdef WOLFSSL_SCTP
- ctx->dtlsMtuSz = MAX_RECORD_SIZE;
- #elif defined(WOLFSSL_DTLS_MTU)
- ctx->dtlsMtuSz = MAX_MTU;
- #endif
-#endif
-
-#ifndef NO_CERTS
- ctx->cm = wolfSSL_CertManagerNew_ex(heap);
- if (ctx->cm == NULL) {
- WOLFSSL_MSG("Bad Cert Manager New");
- return BAD_CERT_MANAGER_ERROR;
- }
- #ifdef OPENSSL_EXTRA
- /* setup WOLFSSL_X509_STORE */
- ctx->x509_store.cm = ctx->cm;
- #endif
-#endif
-
-#if defined(HAVE_EXTENDED_MASTER) && !defined(NO_WOLFSSL_CLIENT)
- if (method->side == WOLFSSL_CLIENT_END) {
- if ((method->version.major == SSLv3_MAJOR) &&
- (method->version.minor >= TLSv1_MINOR)) {
-
- ctx->haveEMS = 1;
- }
-#ifdef WOLFSSL_DTLS
- if (method->version.major == DTLS_MAJOR)
- ctx->haveEMS = 1;
-#endif /* WOLFSSL_DTLS */
- }
-#endif /* HAVE_EXTENDED_MASTER && !NO_WOLFSSL_CLIENT */
-
-#if defined(HAVE_SESSION_TICKET) && !defined(NO_WOLFSSL_SERVER)
- ctx->ticketHint = SESSION_TICKET_HINT_DEFAULT;
-#endif
-
-#ifdef HAVE_WOLF_EVENT
- ret = wolfEventQueue_Init(&ctx->event_queue);
-#endif /* HAVE_WOLF_EVENT */
-
-#ifdef WOLFSSL_EARLY_DATA
- ctx->maxEarlyDataSz = MAX_EARLY_DATA_SZ;
-#endif
-
- ctx->heap = heap; /* wolfSSL_CTX_load_static_memory sets */
- ctx->verifyDepth = MAX_CHAIN_DEPTH;
-
- return ret;
-}
-
-
-/* In case contexts are held in array and don't want to free actual ctx */
-void SSL_CtxResourceFree(WOLFSSL_CTX* ctx)
-{
-#if defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2) && \
- defined(HAVE_TLS_EXTENSIONS) && !defined(NO_WOLFSSL_SERVER)
- int i;
-#endif
-
-#ifdef HAVE_WOLF_EVENT
- wolfEventQueue_Free(&ctx->event_queue);
-#endif /* HAVE_WOLF_EVENT */
-
-#ifdef WOLFSSL_STATIC_MEMORY
- if (ctx->onHeap == 1) {
- XFREE(ctx->method, ctx->heap, DYNAMIC_TYPE_METHOD);
- }
- else {
- XFREE(ctx->method, NULL, DYNAMIC_TYPE_METHOD);
- }
-#else
- XFREE(ctx->method, ctx->heap, DYNAMIC_TYPE_METHOD);
-#endif
- ctx->method = NULL;
- if (ctx->suites) {
- XFREE(ctx->suites, ctx->heap, DYNAMIC_TYPE_SUITES);
- ctx->suites = NULL;
- }
-
-#ifndef NO_DH
- XFREE(ctx->serverDH_G.buffer, ctx->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- ctx->serverDH_G.buffer = NULL;
- XFREE(ctx->serverDH_P.buffer, ctx->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- ctx->serverDH_P.buffer = NULL;
-#endif /* !NO_DH */
-
-#ifdef SINGLE_THREADED
- if (ctx->rng) {
- wc_FreeRng(ctx->rng);
- XFREE(ctx->rng, ctx->heap, DYNAMIC_TYPE_RNG);
- ctx->rng = NULL;
- }
-#endif /* SINGLE_THREADED */
-
-#ifndef NO_CERTS
- FreeDer(&ctx->privateKey);
- FreeDer(&ctx->certificate);
- #ifdef KEEP_OUR_CERT
- if (ctx->ourCert && ctx->ownOurCert) {
- FreeX509(ctx->ourCert);
- XFREE(ctx->ourCert, ctx->heap, DYNAMIC_TYPE_X509);
- ctx->ourCert = NULL;
- }
- #endif /* KEEP_OUR_CERT */
- FreeDer(&ctx->certChain);
- wolfSSL_CertManagerFree(ctx->cm);
- ctx->cm = NULL;
- #ifdef OPENSSL_EXTRA
- /* ctx->cm was free'd so cm of x509 store should now be NULL */
- if (ctx->x509_store_pt != NULL) {
- ctx->x509_store_pt->cm = NULL;
- }
- wolfSSL_X509_STORE_free(ctx->x509_store_pt);
- while (ctx->ca_names != NULL) {
- WOLFSSL_STACK *next = ctx->ca_names->next;
- wolfSSL_X509_NAME_free(ctx->ca_names->data.name);
- XFREE(ctx->ca_names, NULL, DYNAMIC_TYPE_OPENSSL);
- ctx->ca_names = next;
- }
- #endif
- #if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
- if (ctx->x509Chain) {
- wolfSSL_sk_X509_free(ctx->x509Chain);
- ctx->x509Chain = NULL;
- }
- #endif
-#endif /* !NO_CERTS */
-
-#ifdef HAVE_TLS_EXTENSIONS
- TLSX_FreeAll(ctx->extensions, ctx->heap);
-
-#ifndef NO_WOLFSSL_SERVER
-#if defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
- || defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2)
- if (ctx->certOcspRequest) {
- FreeOcspRequest(ctx->certOcspRequest);
- XFREE(ctx->certOcspRequest, ctx->heap, DYNAMIC_TYPE_OCSP_REQUEST);
- }
-#endif
-
-#ifdef HAVE_CERTIFICATE_STATUS_REQUEST_V2
- for (i = 0; i < MAX_CHAIN_DEPTH; i++) {
- if (ctx->chainOcspRequest[i]) {
- FreeOcspRequest(ctx->chainOcspRequest[i]);
- XFREE(ctx->chainOcspRequest[i], ctx->heap, DYNAMIC_TYPE_OCSP_REQUEST);
- ctx->chainOcspRequest[i] = NULL;
- }
- }
-#endif /* HAVE_CERTIFICATE_STATUS_REQUEST_V2 */
-#endif /* !NO_WOLFSSL_SERVER */
-
-#endif /* HAVE_TLS_EXTENSIONS */
-#ifdef OPENSSL_EXTRA
- if(ctx->alpn_cli_protos) {
- XFREE((void *)ctx->alpn_cli_protos, NULL, DYNAMIC_TYPE_OPENSSL);
- ctx->alpn_cli_protos = NULL;
- }
-#endif
-#ifdef WOLFSSL_STATIC_EPHEMERAL
- if (ctx->staticKE.key) {
- FreeDer(&ctx->staticKE.key);
- }
-#endif
-#ifdef WOLFSSL_STATIC_MEMORY
- if (ctx->heap != NULL) {
-#ifdef WOLFSSL_HEAP_TEST
- /* avoid dereferencing a test value */
- if (ctx->heap != (void*)WOLFSSL_HEAP_TEST)
-#endif
- {
- WOLFSSL_HEAP_HINT* hint = (WOLFSSL_HEAP_HINT*)(ctx->heap);
- wc_FreeMutex(&((WOLFSSL_HEAP*)(hint->memory))->memory_mutex);
- }
- }
-#endif /* WOLFSSL_STATIC_MEMORY */
-}
-
-
-void FreeSSL_Ctx(WOLFSSL_CTX* ctx)
-{
- int refCount;
-
- /* decrement CTX reference count */
- if ((refCount = SSL_CTX_RefCount(ctx, -1)) < 0) {
- /* check error state, if mutex error code then mutex init failed but
- * CTX was still malloc'd */
- if (ctx->err == CTX_INIT_MUTEX_E) {
- SSL_CtxResourceFree(ctx);
- XFREE(ctx, ctx->heap, DYNAMIC_TYPE_CTX);
- }
- return;
- }
-
- if (refCount == 0) {
- void* heap = ctx->heap;
- WOLFSSL_MSG("CTX ref count down to 0, doing full free");
- SSL_CtxResourceFree(ctx);
- wc_FreeMutex(&ctx->countMutex);
-#ifdef WOLFSSL_STATIC_MEMORY
- if (ctx->onHeap == 0) {
- heap = NULL;
- }
-#endif
- XFREE(ctx, heap, DYNAMIC_TYPE_CTX);
- (void)heap; /* not used in some builds */
- }
- else {
- (void)ctx;
- WOLFSSL_MSG("CTX ref count not 0 yet, no free");
- }
-}
-
-
-/* Set cipher pointers to null */
-void InitCiphers(WOLFSSL* ssl)
-{
-#ifdef BUILD_ARC4
- ssl->encrypt.arc4 = NULL;
- ssl->decrypt.arc4 = NULL;
-#endif
-#ifdef BUILD_DES3
- ssl->encrypt.des3 = NULL;
- ssl->decrypt.des3 = NULL;
-#endif
-#ifdef BUILD_AES
- ssl->encrypt.aes = NULL;
- ssl->decrypt.aes = NULL;
-#endif
-#ifdef HAVE_CAMELLIA
- ssl->encrypt.cam = NULL;
- ssl->decrypt.cam = NULL;
-#endif
-#ifdef HAVE_HC128
- ssl->encrypt.hc128 = NULL;
- ssl->decrypt.hc128 = NULL;
-#endif
-#ifdef BUILD_RABBIT
- ssl->encrypt.rabbit = NULL;
- ssl->decrypt.rabbit = NULL;
-#endif
-#ifdef HAVE_CHACHA
- ssl->encrypt.chacha = NULL;
- ssl->decrypt.chacha = NULL;
-#endif
-#if defined(HAVE_POLY1305) && defined(HAVE_ONE_TIME_AUTH)
- ssl->auth.poly1305 = NULL;
-#endif
- ssl->encrypt.setup = 0;
- ssl->decrypt.setup = 0;
-#ifdef HAVE_ONE_TIME_AUTH
- ssl->auth.setup = 0;
-#endif
-#ifdef HAVE_IDEA
- ssl->encrypt.idea = NULL;
- ssl->decrypt.idea = NULL;
-#endif
-}
-
-
-/* Free ciphers */
-void FreeCiphers(WOLFSSL* ssl)
-{
- (void)ssl;
-#ifdef BUILD_ARC4
- wc_Arc4Free(ssl->encrypt.arc4);
- wc_Arc4Free(ssl->decrypt.arc4);
- XFREE(ssl->encrypt.arc4, ssl->heap, DYNAMIC_TYPE_CIPHER);
- XFREE(ssl->decrypt.arc4, ssl->heap, DYNAMIC_TYPE_CIPHER);
-#endif
-#ifdef BUILD_DES3
- wc_Des3Free(ssl->encrypt.des3);
- wc_Des3Free(ssl->decrypt.des3);
- XFREE(ssl->encrypt.des3, ssl->heap, DYNAMIC_TYPE_CIPHER);
- XFREE(ssl->decrypt.des3, ssl->heap, DYNAMIC_TYPE_CIPHER);
-#endif
-#if defined(BUILD_AES) || defined(BUILD_AESGCM) /* See: InitKeys() in keys.c
- * on addition of BUILD_AESGCM
- * check (enc->aes, dec->aes) */
- wc_AesFree(ssl->encrypt.aes);
- wc_AesFree(ssl->decrypt.aes);
- #if (defined(BUILD_AESGCM) || defined(HAVE_AESCCM)) && \
- !defined(WOLFSSL_NO_TLS12)
- XFREE(ssl->decrypt.additional, ssl->heap, DYNAMIC_TYPE_AES_BUFFER);
- XFREE(ssl->encrypt.additional, ssl->heap, DYNAMIC_TYPE_AES_BUFFER);
- #endif
- XFREE(ssl->encrypt.aes, ssl->heap, DYNAMIC_TYPE_CIPHER);
- XFREE(ssl->decrypt.aes, ssl->heap, DYNAMIC_TYPE_CIPHER);
-#endif
-#ifdef CIPHER_NONCE
- XFREE(ssl->decrypt.nonce, ssl->heap, DYNAMIC_TYPE_AES_BUFFER);
- XFREE(ssl->encrypt.nonce, ssl->heap, DYNAMIC_TYPE_AES_BUFFER);
-#endif
-#ifdef HAVE_CAMELLIA
- XFREE(ssl->encrypt.cam, ssl->heap, DYNAMIC_TYPE_CIPHER);
- XFREE(ssl->decrypt.cam, ssl->heap, DYNAMIC_TYPE_CIPHER);
-#endif
-#ifdef HAVE_HC128
- XFREE(ssl->encrypt.hc128, ssl->heap, DYNAMIC_TYPE_CIPHER);
- XFREE(ssl->decrypt.hc128, ssl->heap, DYNAMIC_TYPE_CIPHER);
-#endif
-#ifdef BUILD_RABBIT
- XFREE(ssl->encrypt.rabbit, ssl->heap, DYNAMIC_TYPE_CIPHER);
- XFREE(ssl->decrypt.rabbit, ssl->heap, DYNAMIC_TYPE_CIPHER);
-#endif
-#ifdef HAVE_CHACHA
- XFREE(ssl->encrypt.chacha, ssl->heap, DYNAMIC_TYPE_CIPHER);
- XFREE(ssl->decrypt.chacha, ssl->heap, DYNAMIC_TYPE_CIPHER);
-#endif
-#if defined(HAVE_POLY1305) && defined(HAVE_ONE_TIME_AUTH)
- XFREE(ssl->auth.poly1305, ssl->heap, DYNAMIC_TYPE_CIPHER);
-#endif
-#ifdef HAVE_IDEA
- XFREE(ssl->encrypt.idea, ssl->heap, DYNAMIC_TYPE_CIPHER);
- XFREE(ssl->decrypt.idea, ssl->heap, DYNAMIC_TYPE_CIPHER);
-#endif
-#if defined(WOLFSSL_TLS13) && defined(HAVE_NULL_CIPHER)
- wc_HmacFree(ssl->encrypt.hmac);
- wc_HmacFree(ssl->decrypt.hmac);
- XFREE(ssl->encrypt.hmac, ssl->heap, DYNAMIC_TYPE_CIPHER);
- XFREE(ssl->decrypt.hmac, ssl->heap, DYNAMIC_TYPE_CIPHER);
-#endif
-}
-
-
-void InitCipherSpecs(CipherSpecs* cs)
-{
- XMEMSET(cs, 0, sizeof(CipherSpecs));
-
- cs->bulk_cipher_algorithm = INVALID_BYTE;
- cs->cipher_type = INVALID_BYTE;
- cs->mac_algorithm = INVALID_BYTE;
- cs->kea = INVALID_BYTE;
- cs->sig_algo = INVALID_BYTE;
-}
-
-#if defined(USE_ECDSA_KEYSZ_HASH_ALGO) || (defined(WOLFSSL_TLS13) && \
- defined(HAVE_ECC))
-static int GetMacDigestSize(byte macAlgo)
-{
- switch (macAlgo) {
- #ifndef NO_SHA
- case sha_mac:
- return WC_SHA_DIGEST_SIZE;
- #endif
- #ifndef NO_SHA256
- case sha256_mac:
- return WC_SHA256_DIGEST_SIZE;
- #endif
- #ifdef WOLFSSL_SHA384
- case sha384_mac:
- return WC_SHA384_DIGEST_SIZE;
- #endif
- #ifdef WOLFSSL_SHA512
- case sha512_mac:
- return WC_SHA512_DIGEST_SIZE;
- #endif
- default:
- break;
- }
- return NOT_COMPILED_IN;
-}
-#endif /* USE_ECDSA_KEYSZ_HASH_ALGO */
-
-static WC_INLINE void AddSuiteHashSigAlgo(Suites* suites, byte macAlgo, byte sigAlgo,
- int keySz, word16* inOutIdx)
-{
- int addSigAlgo = 1;
-
-#ifdef USE_ECDSA_KEYSZ_HASH_ALGO
- if (sigAlgo == ecc_dsa_sa_algo) {
- int digestSz = GetMacDigestSize(macAlgo);
- /* do not add sig/algos with digest size larger than key size */
- if (digestSz <= 0 || (keySz > 0 && digestSz > keySz)) {
- addSigAlgo = 0;
- }
- }
-#else
- (void)keySz;
-#endif /* USE_ECDSA_KEYSZ_HASH_ALGO */
-
- if (addSigAlgo) {
-#ifdef WC_RSA_PSS
- if (sigAlgo == rsa_pss_sa_algo) {
- /* RSA PSS is sig then mac */
- suites->hashSigAlgo[*inOutIdx] = sigAlgo;
- *inOutIdx += 1;
- suites->hashSigAlgo[*inOutIdx] = macAlgo;
- *inOutIdx += 1;
- #ifdef WOLFSSL_TLS13
- /* Add the certificate algorithm as well */
- suites->hashSigAlgo[*inOutIdx] = sigAlgo;
- *inOutIdx += 1;
- suites->hashSigAlgo[*inOutIdx] = PSS_RSAE_TO_PSS_PSS(macAlgo);
- *inOutIdx += 1;
- #endif
- }
- else
-#endif
- {
- suites->hashSigAlgo[*inOutIdx] = macAlgo;
- *inOutIdx += 1;
- suites->hashSigAlgo[*inOutIdx] = sigAlgo;
- *inOutIdx += 1;
- }
- }
-}
-
-void InitSuitesHashSigAlgo(Suites* suites, int haveECDSAsig, int haveRSAsig,
- int haveAnon, int tls1_2, int keySz)
-{
- word16 idx = 0;
-
- (void)tls1_2;
- (void)keySz;
-
-#if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448)
- if (haveECDSAsig) {
-#ifdef HAVE_ECC
- #ifdef WOLFSSL_SHA512
- AddSuiteHashSigAlgo(suites, sha512_mac, ecc_dsa_sa_algo, keySz, &idx);
- #endif
- #ifdef WOLFSSL_SHA384
- AddSuiteHashSigAlgo(suites, sha384_mac, ecc_dsa_sa_algo, keySz, &idx);
- #endif
- #ifndef NO_SHA256
- AddSuiteHashSigAlgo(suites, sha256_mac, ecc_dsa_sa_algo, keySz, &idx);
- #endif
- #if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
- defined(WOLFSSL_ALLOW_TLS_SHA1))
- AddSuiteHashSigAlgo(suites, sha_mac, ecc_dsa_sa_algo, keySz, &idx);
- #endif
-#endif
- #ifdef HAVE_ED25519
- AddSuiteHashSigAlgo(suites, ED25519_SA_MAJOR, ED25519_SA_MINOR, keySz,
- &idx);
- #endif
- #ifdef HAVE_ED448
- AddSuiteHashSigAlgo(suites, ED448_SA_MAJOR, ED448_SA_MINOR, keySz,
- &idx);
- #endif
- }
-#endif /* HAVE_ECC || HAVE_ED25519 || defined(HAVE_ED448 */
-
- if (haveRSAsig) {
- #ifdef WC_RSA_PSS
- if (tls1_2) {
- #ifdef WOLFSSL_SHA512
- AddSuiteHashSigAlgo(suites, sha512_mac, rsa_pss_sa_algo, keySz,
- &idx);
- #endif
- #ifdef WOLFSSL_SHA384
- AddSuiteHashSigAlgo(suites, sha384_mac, rsa_pss_sa_algo, keySz,
- &idx);
- #endif
- #ifndef NO_SHA256
- AddSuiteHashSigAlgo(suites, sha256_mac, rsa_pss_sa_algo, keySz,
- &idx);
- #endif
- }
- #endif
- #ifdef WOLFSSL_SHA512
- AddSuiteHashSigAlgo(suites, sha512_mac, rsa_sa_algo, keySz, &idx);
- #endif
- #ifdef WOLFSSL_SHA384
- AddSuiteHashSigAlgo(suites, sha384_mac, rsa_sa_algo, keySz, &idx);
- #endif
- #ifndef NO_SHA256
- AddSuiteHashSigAlgo(suites, sha256_mac, rsa_sa_algo, keySz, &idx);
- #endif
- #ifdef WOLFSSL_SHA224
- AddSuiteHashSigAlgo(suites, sha224_mac, rsa_sa_algo, keySz, &idx);
- #endif
- #if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
- defined(WOLFSSL_ALLOW_TLS_SHA1))
- AddSuiteHashSigAlgo(suites, sha_mac, rsa_sa_algo, keySz, &idx);
- #endif
- }
-
-#ifdef HAVE_ANON
- if (haveAnon) {
- AddSuiteHashSigAlgo(suites, sha_mac, anonymous_sa_algo, keySz, &idx);
- }
-#endif
-
- (void)haveAnon;
- (void)haveECDSAsig;
- suites->hashSigAlgoSz = idx;
-}
-
-void InitSuites(Suites* suites, ProtocolVersion pv, int keySz, word16 haveRSA,
- word16 havePSK, word16 haveDH, word16 haveNTRU,
- word16 haveECDSAsig, word16 haveECC,
- word16 haveStaticECC, int side)
-{
- word16 idx = 0;
- int tls = pv.major == SSLv3_MAJOR && pv.minor >= TLSv1_MINOR;
- int tls1_2 = pv.major == SSLv3_MAJOR && pv.minor >= TLSv1_2_MINOR;
-#ifdef WOLFSSL_TLS13
- int tls1_3 = IsAtLeastTLSv1_3(pv);
-#endif
- int dtls = 0;
- int haveRSAsig = 1;
-
- (void)tls; /* shut up compiler */
- (void)tls1_2;
- (void)dtls;
- (void)haveDH;
- (void)havePSK;
- (void)haveNTRU;
- (void)haveStaticECC;
- (void)haveECC;
- (void)side;
- (void)haveRSA; /* some builds won't read */
- (void)haveRSAsig; /* non ecc builds won't read */
-
- if (suites == NULL) {
- WOLFSSL_MSG("InitSuites pointer error");
- return;
- }
-
- if (suites->setSuites)
- return; /* trust user settings, don't override */
-
-#ifdef WOLFSSL_TLS13
-#ifdef BUILD_TLS_AES_128_GCM_SHA256
- if (tls1_3) {
- suites->suites[idx++] = TLS13_BYTE;
- suites->suites[idx++] = TLS_AES_128_GCM_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_AES_256_GCM_SHA384
- if (tls1_3) {
- suites->suites[idx++] = TLS13_BYTE;
- suites->suites[idx++] = TLS_AES_256_GCM_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_CHACHA20_POLY1305_SHA256
- if (tls1_3) {
- suites->suites[idx++] = TLS13_BYTE;
- suites->suites[idx++] = TLS_CHACHA20_POLY1305_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_AES_128_CCM_SHA256
- if (tls1_3) {
- suites->suites[idx++] = TLS13_BYTE;
- suites->suites[idx++] = TLS_AES_128_CCM_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_AES_128_CCM_8_SHA256
- if (tls1_3) {
- suites->suites[idx++] = TLS13_BYTE;
- suites->suites[idx++] = TLS_AES_128_CCM_8_SHA256;
- }
-#endif
-
-#ifdef HAVE_NULL_CIPHER
- #ifdef BUILD_TLS_SHA256_SHA256
- if (tls1_3) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_SHA256_SHA256;
- }
- #endif
-
- #ifdef BUILD_TLS_SHA384_SHA384
- if (tls1_3) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_SHA384_SHA384;
- }
- #endif
-#endif
-#endif /* WOLFSSL_TLS13 */
-
-#ifndef WOLFSSL_NO_TLS12
-
-#if !defined(NO_WOLFSSL_SERVER) && !defined(NO_RSA)
- if (side == WOLFSSL_SERVER_END && haveStaticECC) {
- haveRSA = 0; /* can't do RSA with ECDSA key */
- }
-
- if (side == WOLFSSL_SERVER_END && haveECDSAsig) {
- haveRSAsig = 0; /* can't have RSA sig if signed by ECDSA */
- }
-#endif /* !NO_WOLFSSL_SERVER */
-
-#ifdef WOLFSSL_DTLS
- if (pv.major == DTLS_MAJOR) {
- dtls = 1;
- tls = 1;
- /* May be dead assignments dependent upon configuration */
- (void) dtls;
- (void) tls;
- tls1_2 = pv.minor <= DTLSv1_2_MINOR;
- }
-#endif
-
-#ifdef HAVE_RENEGOTIATION_INDICATION
- if (side == WOLFSSL_CLIENT_END) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_EMPTY_RENEGOTIATION_INFO_SCSV;
- }
-#endif
-
-#ifdef BUILD_TLS_QSH
- if (tls) {
- suites->suites[idx++] = QSH_BYTE;
- suites->suites[idx++] = TLS_QSH;
- }
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA
- if (tls && haveNTRU && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_NTRU_RSA_WITH_AES_256_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA
- if (tls && haveNTRU && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_NTRU_RSA_WITH_AES_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA
- if (!dtls && tls && haveNTRU && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_NTRU_RSA_WITH_RC4_128_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA
- if (tls && haveNTRU && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- if (tls1_2 && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- if (tls1_2 && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
- if (tls1_2 && haveDH && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_256_GCM_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
- if (tls1_2 && haveDH && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_128_GCM_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_AES_256_GCM_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_AES_128_GCM_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
- if (tls1_2 && haveECC && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
- if (tls1_2 && haveECC && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
- if (tls1_2 && haveRSAsig && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
- if (tls1_2 && haveRSAsig && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
- if (tls1_2 && haveDH && havePSK) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_PSK_WITH_AES_256_GCM_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_DH_anon_WITH_AES_128_CBC_SHA
- if (tls1_2 && haveDH) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DH_anon_WITH_AES_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_DH_anon_WITH_AES_256_GCM_SHA384
- if (tls1_2 && haveDH) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DH_anon_WITH_AES_256_GCM_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
- if (tls1_2 && haveDH && havePSK) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_PSK_WITH_AES_128_GCM_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_GCM_SHA384
- if (tls1_2 && havePSK) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_AES_256_GCM_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_GCM_SHA256
- if (tls1_2 && havePSK) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_AES_128_GCM_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
- if (tls1_2 && haveECC) {
- suites->suites[idx++] = CHACHA_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = CHACHA_BYTE;
- suites->suites[idx++] = TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = CHACHA_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256;
- }
-#endif
-
-/* Place as higher priority for MYSQL */
-#if defined(WOLFSSL_MYSQL_COMPATIBLE)
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
- if (tls && haveDH && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA;
- }
-#endif
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
- if (tls1_2 && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
- if (tls1_2 && haveRSAsig && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
- if (tls1_2 && haveECC && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
- if (tls1_2 && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
- if (tls1_2 && haveRSAsig && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
- if (tls1_2 && haveECC && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
- if (tls && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
- if (tls && haveECC && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
- if (tls && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
- if (tls && haveECC && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
- if (!dtls && tls && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_RC4_128_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
- if (!dtls && tls && haveECC && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_RC4_128_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
- if (tls && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
- if (tls && haveECC && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
- if (tls && haveRSA) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
- if (tls && haveRSAsig && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_256_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
- if (tls && haveRSA) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
- if (tls && haveRSAsig && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_RSA_WITH_AES_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA
- if (!dtls && tls && haveRSA) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_RSA_WITH_RC4_128_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA
- if (!dtls && tls && haveRSAsig && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_RSA_WITH_RC4_128_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
- if (tls && haveRSA) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
- if (tls && haveRSAsig && haveStaticECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM
- if (tls1_2 && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_CCM;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
- if (tls1_2 && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8
- if (tls1_2 && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_AES_128_CCM_8;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_AES_256_CCM_8;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveDH && haveRSA)
-#else
- if (tls && haveDH && haveRSA)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveDH && haveRSA)
-#else
- if (tls && haveDH && haveRSA)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_128_CBC_SHA256;
- }
-#endif
-
-/* Place as higher priority for MYSQL testing */
-#if !defined(WOLFSSL_MYSQL_COMPATIBLE)
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
- if (tls && haveDH && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA;
- }
-#endif
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
- if (tls && haveDH && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_AES_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
- if (tls && haveDH && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveRSA)
-#else
- if (tls && haveRSA)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_AES_256_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveRSA)
-#else
- if (tls && haveRSA)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_AES_128_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA
- if (tls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_AES_256_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA
- if (tls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_AES_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_CHACHA20_OLD_POLY1305_SHA256
- if (tls1_2 && haveECC) {
- suites->suites[idx++] = CHACHA_BYTE;
- suites->suites[idx++] =
- TLS_ECDHE_ECDSA_WITH_CHACHA20_OLD_POLY1305_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = CHACHA_BYTE;
- suites->suites[idx++] = TLS_ECDHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256
- if (tls1_2 && haveRSA) {
- suites->suites[idx++] = CHACHA_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_NULL_SHA
- if (tls && haveECC) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_ECDSA_WITH_NULL_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_NULL_MD5
- if (tls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_NULL_MD5;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_NULL_SHA
- if (tls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_NULL_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveRSA)
-#else
- if (tls && haveRSA)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_NULL_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA
- if (tls && havePSK) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_AES_256_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveDH && havePSK)
-#else
- if (tls && haveDH && havePSK)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_PSK_WITH_AES_256_CBC_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA384
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && havePSK)
-#else
- if (tls && havePSK)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_AES_256_CBC_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveDH && havePSK)
-#else
- if (tls && haveDH && havePSK)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_PSK_WITH_AES_128_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && havePSK)
-#else
- if (tls1 && havePSK)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_AES_128_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA
- if (tls && havePSK) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_AES_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_128_CCM
- if (tls && haveDH && havePSK) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_DHE_PSK_WITH_AES_128_CCM;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_256_CCM
- if (tls && haveDH && havePSK) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_DHE_PSK_WITH_AES_256_CCM;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && havePSK)
-#else
- if (tls && havePSK)
-#endif
- {
- suites->suites[idx++] = CHACHA_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_CHACHA20_POLY1305_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && havePSK)
-#else
- if (tls && havePSK)
-#endif
- {
- suites->suites[idx++] = CHACHA_BYTE;
- suites->suites[idx++] = TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && havePSK)
-#else
- if (tls && havePSK)
-#endif
- {
- suites->suites[idx++] = CHACHA_BYTE;
- suites->suites[idx++] = TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && havePSK)
-#else
- if (tls && havePSK)
-#endif
- {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM
- if (tls && havePSK) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_AES_128_CCM;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM
- if (tls && havePSK) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_AES_256_CCM;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8
- if (tls && havePSK) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_AES_128_CCM_8;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8
- if (tls && havePSK) {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_AES_256_CCM_8;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_NULL_SHA384
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveDH && havePSK)
-#else
- if (tls && haveDH && havePSK)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_PSK_WITH_NULL_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_NULL_SHA384
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && havePSK)
-#else
- if (tls && havePSK)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_NULL_SHA384;
- }
-#endif
-
-#ifdef BUILD_TLS_ECDHE_PSK_WITH_NULL_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && havePSK)
-#else
- if (tls && havePSK)
-#endif
- {
- suites->suites[idx++] = ECC_BYTE;
- suites->suites[idx++] = TLS_ECDHE_PSK_WITH_NULL_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_NULL_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveDH && havePSK)
-#else
- if (tls && haveDH && havePSK)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_PSK_WITH_NULL_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && havePSK)
-#else
- if (tls && havePSK)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_NULL_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_NULL_SHA
- if (tls && havePSK) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_PSK_WITH_NULL_SHA;
- }
-#endif
-
-#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA
- if (!dtls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = SSL_RSA_WITH_RC4_128_SHA;
- }
-#endif
-
-#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5
- if (!dtls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = SSL_RSA_WITH_RC4_128_MD5;
- }
-#endif
-
-#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA
- if (haveRSA ) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = SSL_RSA_WITH_3DES_EDE_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5
- if (!dtls && tls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_HC_128_MD5;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA
- if (!dtls && tls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_HC_128_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA
- if (!dtls && tls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_RABBIT_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
- if (tls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
- if (tls && haveDH && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
- if (tls && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_256_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
- if (tls && haveDH && haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveRSA)
-#else
- if (tls && haveRSA)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveDH && haveRSA)
-#else
- if (tls && haveDH && haveRSA)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveRSA)
-#else
- if (tls && haveRSA)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
-#ifndef WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
- if (tls1_2 && haveDH && haveRSA)
-#else
- if (tls && haveDH && haveRSA)
-#endif
- {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256;
- }
-#endif
-
-#ifdef BUILD_SSL_RSA_WITH_IDEA_CBC_SHA
- if (haveRSA) {
- suites->suites[idx++] = CIPHER_BYTE;
- suites->suites[idx++] = SSL_RSA_WITH_IDEA_CBC_SHA;
- }
-#endif
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
- suites->suiteSz = idx;
-
- InitSuitesHashSigAlgo(suites, haveECDSAsig | haveECC, haveRSAsig | haveRSA,
- 0, tls1_2, keySz);
-}
-
-#if !defined(NO_WOLFSSL_SERVER) || !defined(NO_CERTS) || \
- (!defined(NO_WOLFSSL_CLIENT) && (!defined(NO_DH) || defined(HAVE_ECC)))
-
-/* Decode the signature algorithm.
- *
- * input The encoded signature algorithm.
- * hashalgo The hash algorithm.
- * hsType The signature type.
- */
-static WC_INLINE void DecodeSigAlg(const byte* input, byte* hashAlgo, byte* hsType)
-{
- switch (input[0]) {
- case NEW_SA_MAJOR:
- #ifdef HAVE_ED25519
- /* ED25519: 0x0807 */
- if (input[1] == ED25519_SA_MINOR) {
- *hsType = ed25519_sa_algo;
- /* Hash performed as part of sign/verify operation. */
- *hashAlgo = sha512_mac;
- }
- else
- #endif
- #ifdef HAVE_ED448
- /* ED448: 0x0808 */
- if (input[1] == ED448_SA_MINOR) {
- *hsType = ed448_sa_algo;
- /* Hash performed as part of sign/verify operation. */
- *hashAlgo = sha512_mac;
- }
- else
- #endif
- #ifdef WC_RSA_PSS
- /* PSS PSS signatures: 0x080[9-b] */
- if (input[1] >= pss_sha256 && input[1] <= pss_sha512) {
- *hsType = rsa_pss_pss_algo;
- *hashAlgo = PSS_PSS_HASH_TO_MAC(input[1]);
- }
- else
- #endif
- {
- *hsType = input[0];
- *hashAlgo = input[1];
- }
- break;
- default:
- *hashAlgo = input[0];
- *hsType = input[1];
- break;
- }
-}
-#endif /* !NO_WOLFSSL_SERVER || !NO_CERTS */
-
-#ifndef WOLFSSL_NO_TLS12
-#if !defined(NO_WOLFSSL_SERVER) || !defined(NO_WOLFSSL_CLIENT)
-#if !defined(NO_DH) || defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448) || (!defined(NO_RSA) && defined(WC_RSA_PSS))
-
-static enum wc_HashType HashAlgoToType(int hashAlgo)
-{
- switch (hashAlgo) {
- #ifdef WOLFSSL_SHA512
- case sha512_mac:
- return WC_HASH_TYPE_SHA512;
- #endif
- #ifdef WOLFSSL_SHA384
- case sha384_mac:
- return WC_HASH_TYPE_SHA384;
- #endif
- #ifndef NO_SHA256
- case sha256_mac:
- return WC_HASH_TYPE_SHA256;
- #endif
- #ifdef WOLFSSL_SHA224
- case sha224_mac:
- return WC_HASH_TYPE_SHA224;
- #endif
- #if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
- defined(WOLFSSL_ALLOW_TLS_SHA1))
- case sha_mac:
- return WC_HASH_TYPE_SHA;
- #endif
- default:
- WOLFSSL_MSG("Bad hash sig algo");
- break;
- }
-
- return WC_HASH_TYPE_NONE;
-}
-#endif /* !NO_DH || HAVE_ECC || (!NO_RSA && WC_RSA_PSS) */
-#endif /* !NO_WOLFSSL_SERVER || !NO_WOLFSSL_CLIENT */
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#ifndef NO_CERTS
-
-void InitX509Name(WOLFSSL_X509_NAME* name, int dynamicFlag, void* heap)
-{
- (void)dynamicFlag;
- (void)heap;
-
- if (name != NULL) {
- name->name = name->staticName;
- name->dynamicName = 0;
- name->sz = 0;
- name->heap = heap;
-#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- XMEMSET(&name->entry, 0, sizeof(name->entry));
- name->x509 = NULL;
- name->entrySz = 0;
-#endif /* OPENSSL_EXTRA */
- }
-}
-
-
-void FreeX509Name(WOLFSSL_X509_NAME* name)
-{
- if (name != NULL) {
- if (name->dynamicName) {
- XFREE(name->name, name->heap, DYNAMIC_TYPE_SUBJECT_CN);
- name->name = NULL;
- }
-#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- {
- int i;
- for (i = 0; i < MAX_NAME_ENTRIES; i++) {
- if (name->entry[i].set) {
- wolfSSL_ASN1_OBJECT_free(&name->entry[i].object);
- wolfSSL_ASN1_STRING_free(name->entry[i].value);
- }
- }
- }
-#endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
- }
-}
-
-
-/* Initialize wolfSSL X509 type */
-void InitX509(WOLFSSL_X509* x509, int dynamicFlag, void* heap)
-{
- if (x509 == NULL) {
- WOLFSSL_MSG("Null parameter passed in!");
- return;
- }
-
- XMEMSET(x509, 0, sizeof(WOLFSSL_X509));
-
- x509->heap = heap;
- InitX509Name(&x509->issuer, 0, heap);
- InitX509Name(&x509->subject, 0, heap);
- x509->dynamicMemory = (byte)dynamicFlag;
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)
- x509->refCount = 1;
- (void)wc_InitMutex(&x509->refMutex);
- #endif
-}
-
-
-/* Free wolfSSL X509 type */
-void FreeX509(WOLFSSL_X509* x509)
-{
- if (x509 == NULL)
- return;
-
- FreeX509Name(&x509->issuer);
- FreeX509Name(&x509->subject);
- if (x509->pubKey.buffer) {
- XFREE(x509->pubKey.buffer, x509->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- x509->pubKey.buffer = NULL;
- }
- FreeDer(&x509->derCert);
- XFREE(x509->sig.buffer, x509->heap, DYNAMIC_TYPE_SIGNATURE);
- x509->sig.buffer = NULL;
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- XFREE(x509->authKeyId, x509->heap, DYNAMIC_TYPE_X509_EXT);
- x509->authKeyId = NULL;
- XFREE(x509->subjKeyId, x509->heap, DYNAMIC_TYPE_X509_EXT);
- x509->subjKeyId = NULL;
- if (x509->authInfo != NULL) {
- XFREE(x509->authInfo, x509->heap, DYNAMIC_TYPE_X509_EXT);
- x509->authInfo = NULL;
- }
- #if defined(OPENSSL_ALL) || defined(WOLFSSL_QT)
- if (x509->authInfoCaIssuer != NULL) {
- XFREE(x509->authInfoCaIssuer, x509->heap, DYNAMIC_TYPE_X509_EXT);
- }
- if (x509->ext_sk != NULL) {
- wolfSSL_sk_X509_EXTENSION_free(x509->ext_sk);
- }
- #endif /* OPENSSL_ALL || WOLFSSL_QT */
- #ifdef OPENSSL_EXTRA
- /* Free serialNumber that was set by wolfSSL_X509_get_serialNumber */
- if (x509->serialNumber != NULL) {
- wolfSSL_ASN1_INTEGER_free(x509->serialNumber);
- }
- #endif
- if (x509->extKeyUsageSrc != NULL) {
- XFREE(x509->extKeyUsageSrc, x509->heap, DYNAMIC_TYPE_X509_EXT);
- x509->extKeyUsageSrc= NULL;
- }
- #endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
- #if defined(OPENSSL_ALL)
- if (x509->algor.algorithm) {
- wolfSSL_ASN1_OBJECT_free(x509->algor.algorithm);
- x509->algor.algorithm = NULL;
- }
- if (x509->key.algor) {
- wolfSSL_X509_ALGOR_free(x509->key.algor);
- x509->key.algor = NULL;
- }
- if (x509->key.pkey) {
- wolfSSL_EVP_PKEY_free(x509->key.pkey);
- x509->key.pkey = NULL;
- }
- #endif /* OPENSSL_ALL */
- if (x509->altNames) {
- FreeAltNames(x509->altNames, x509->heap);
- x509->altNames = NULL;
- }
-
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)
- wc_FreeMutex(&x509->refMutex);
- #endif
-}
-
-
-#if !defined(NO_WOLFSSL_SERVER) || !defined(NO_WOLFSSL_CLIENT)
-#if !defined(WOLFSSL_NO_TLS12)
-/* Encode the signature algorithm into buffer.
- *
- * hashalgo The hash algorithm.
- * hsType The signature type.
- * output The buffer to encode into.
- */
-static WC_INLINE void EncodeSigAlg(byte hashAlgo, byte hsType, byte* output)
-{
- switch (hsType) {
-#ifdef HAVE_ECC
- case ecc_dsa_sa_algo:
- output[0] = hashAlgo;
- output[1] = ecc_dsa_sa_algo;
- break;
-#endif
-#ifdef HAVE_ED25519
- case ed25519_sa_algo:
- output[0] = ED25519_SA_MAJOR;
- output[1] = ED25519_SA_MINOR;
- (void)hashAlgo;
- break;
-#endif
-#ifdef HAVE_ED448
- case ed448_sa_algo:
- output[0] = ED448_SA_MAJOR;
- output[1] = ED448_SA_MINOR;
- (void)hashAlgo;
- break;
-#endif
-#ifndef NO_RSA
- case rsa_sa_algo:
- output[0] = hashAlgo;
- output[1] = rsa_sa_algo;
- break;
- #ifdef WC_RSA_PSS
- /* PSS signatures: 0x080[4-6] */
- case rsa_pss_sa_algo:
- output[0] = rsa_pss_sa_algo;
- output[1] = hashAlgo;
- break;
- #endif
-#endif
- }
- (void)hashAlgo;
- (void)output;
-}
-#endif
-
-#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_NO_CLIENT_AUTH)
-static void SetDigest(WOLFSSL* ssl, int hashAlgo)
-{
- switch (hashAlgo) {
- #ifndef NO_SHA
- case sha_mac:
- ssl->buffers.digest.buffer = ssl->hsHashes->certHashes.sha;
- ssl->buffers.digest.length = WC_SHA_DIGEST_SIZE;
- break;
- #endif /* !NO_SHA */
- #ifndef NO_SHA256
- case sha256_mac:
- ssl->buffers.digest.buffer = ssl->hsHashes->certHashes.sha256;
- ssl->buffers.digest.length = WC_SHA256_DIGEST_SIZE;
- break;
- #endif /* !NO_SHA256 */
- #ifdef WOLFSSL_SHA384
- case sha384_mac:
- ssl->buffers.digest.buffer = ssl->hsHashes->certHashes.sha384;
- ssl->buffers.digest.length = WC_SHA384_DIGEST_SIZE;
- break;
- #endif /* WOLFSSL_SHA384 */
- #ifdef WOLFSSL_SHA512
- case sha512_mac:
- ssl->buffers.digest.buffer = ssl->hsHashes->certHashes.sha512;
- ssl->buffers.digest.length = WC_SHA512_DIGEST_SIZE;
- break;
- #endif /* WOLFSSL_SHA512 */
- } /* switch */
-}
-#endif /* !WOLFSSL_NO_TLS12 && !WOLFSSL_NO_CLIENT_AUTH */
-#endif /* !NO_WOLFSSL_SERVER || !NO_WOLFSSL_CLIENT */
-#endif /* !NO_CERTS */
-
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
-static word32 MacSize(WOLFSSL* ssl)
-{
-#ifdef HAVE_TRUNCATED_HMAC
- word32 digestSz = ssl->truncated_hmac ? (byte)TRUNCATED_HMAC_SZ
- : ssl->specs.hash_size;
-#else
- word32 digestSz = ssl->specs.hash_size;
-#endif
-
- return digestSz;
-}
-#endif /* HAVE_ENCRYPT_THEN_MAC && !WOLFSSL_AEAD_ONLY */
-
-#ifndef NO_RSA
-#ifndef WOLFSSL_NO_TLS12
-#if !defined(NO_WOLFSSL_SERVER) || (!defined(NO_WOLFSSL_CLIENT) && \
- !defined(WOLFSSL_NO_CLIENT_AUTH))
-static int TypeHash(int hashAlgo)
-{
- switch (hashAlgo) {
- #ifdef WOLFSSL_SHA512
- case sha512_mac:
- return SHA512h;
- #endif
- #ifdef WOLFSSL_SHA384
- case sha384_mac:
- return SHA384h;
- #endif
- #ifndef NO_SHA256
- case sha256_mac:
- return SHA256h;
- #endif
- #ifdef WOLFSSL_SHA224
- case sha224_mac:
- return SHA224h;
- #endif
- #ifndef NO_SHA
- case sha_mac:
- return SHAh;
- #endif
- }
-
- return 0;
-}
-#endif /* !NO_WOLFSSL_SERVER && !NO_WOLFSSL_CLIENT */
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#if defined(WC_RSA_PSS)
-int ConvertHashPss(int hashAlgo, enum wc_HashType* hashType, int* mgf)
-{
- switch (hashAlgo) {
- #ifdef WOLFSSL_SHA512
- case sha512_mac:
- *hashType = WC_HASH_TYPE_SHA512;
- if (mgf != NULL)
- *mgf = WC_MGF1SHA512;
- break;
- #endif
- #ifdef WOLFSSL_SHA384
- case sha384_mac:
- *hashType = WC_HASH_TYPE_SHA384;
- if (mgf != NULL)
- *mgf = WC_MGF1SHA384;
- break;
- #endif
- #ifndef NO_SHA256
- case sha256_mac:
- *hashType = WC_HASH_TYPE_SHA256;
- if (mgf != NULL)
- *mgf = WC_MGF1SHA256;
- break;
- #endif
- default:
- return BAD_FUNC_ARG;
- }
-
- return 0;
-}
-#endif
-
-#if !defined(NO_WOLFSSL_SERVER) || !defined(WOLFSSL_NO_CLIENT_AUTH)
-int RsaSign(WOLFSSL* ssl, const byte* in, word32 inSz, byte* out,
- word32* outSz, int sigAlgo, int hashAlgo, RsaKey* key,
- DerBuffer* keyBufInfo)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
- (void)sigAlgo;
- (void)hashAlgo;
-
- WOLFSSL_ENTER("RsaSign");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- if (key) {
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
- }
-#endif
-
-#if defined(WC_RSA_PSS)
- if (sigAlgo == rsa_pss_sa_algo) {
- enum wc_HashType hashType = WC_HASH_TYPE_NONE;
- int mgf = 0;
-
- ret = ConvertHashPss(hashAlgo, &hashType, &mgf);
- if (ret != 0)
- return ret;
-
- #if defined(HAVE_PK_CALLBACKS)
- if (ssl->ctx->RsaPssSignCb) {
- void* ctx = wolfSSL_GetRsaPssSignCtx(ssl);
- ret = ssl->ctx->RsaPssSignCb(ssl, in, inSz, out, outSz,
- TypeHash(hashAlgo), mgf,
- keyBuf, keySz, ctx);
- }
- else
- #endif
- {
- ret = wc_RsaPSS_Sign(in, inSz, out, *outSz, hashType, mgf, key,
- ssl->rng);
- }
- }
- else
-#endif
-#if defined(HAVE_PK_CALLBACKS)
- if (ssl->ctx->RsaSignCb) {
- void* ctx = wolfSSL_GetRsaSignCtx(ssl);
- ret = ssl->ctx->RsaSignCb(ssl, in, inSz, out, outSz, keyBuf, keySz,
- ctx);
- }
- else
-#endif /*HAVE_PK_CALLBACKS */
- ret = wc_RsaSSL_Sign(in, inSz, out, *outSz, key, ssl->rng);
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (key && ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- /* For positive response return in outSz */
- if (ret > 0) {
- *outSz = ret;
- ret = 0;
- }
-
- WOLFSSL_LEAVE("RsaSign", ret);
-
- return ret;
-}
-#endif
-
-int RsaVerify(WOLFSSL* ssl, byte* in, word32 inSz, byte** out, int sigAlgo,
- int hashAlgo, RsaKey* key, buffer* keyBufInfo)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
- (void)sigAlgo;
- (void)hashAlgo;
-
- WOLFSSL_ENTER("RsaVerify");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#if defined(WC_RSA_PSS)
- if (sigAlgo == rsa_pss_sa_algo) {
- enum wc_HashType hashType = WC_HASH_TYPE_NONE;
- int mgf = 0;
-
- ret = ConvertHashPss(hashAlgo, &hashType, &mgf);
- if (ret != 0)
- return ret;
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->RsaPssVerifyCb) {
- void* ctx = wolfSSL_GetRsaPssVerifyCtx(ssl);
- ret = ssl->ctx->RsaPssVerifyCb(ssl, in, inSz, out,
- TypeHash(hashAlgo), mgf,
- keyBuf, keySz, ctx);
- }
- else
-#endif /*HAVE_PK_CALLBACKS */
- ret = wc_RsaPSS_VerifyInline(in, inSz, out, hashType, mgf, key);
- }
- else
-#endif
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->RsaVerifyCb) {
- void* ctx = wolfSSL_GetRsaVerifyCtx(ssl);
- ret = ssl->ctx->RsaVerifyCb(ssl, in, inSz, out, keyBuf, keySz, ctx);
- }
- else
-#endif /*HAVE_PK_CALLBACKS */
- {
- ret = wc_RsaSSL_VerifyInline(in, inSz, out, key);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("RsaVerify", ret);
-
- return ret;
-}
-
-/* Verify RSA signature, 0 on success */
-/* This function is used to check the sign result */
-int VerifyRsaSign(WOLFSSL* ssl, byte* verifySig, word32 sigSz,
- const byte* plain, word32 plainSz, int sigAlgo, int hashAlgo, RsaKey* key,
- DerBuffer* keyBufInfo)
-{
- byte* out = NULL; /* inline result */
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
- (void)sigAlgo;
- (void)hashAlgo;
-
- WOLFSSL_ENTER("VerifyRsaSign");
-
- if (verifySig == NULL || plain == NULL) {
- return BAD_FUNC_ARG;
- }
-
- if (sigSz > ENCRYPT_LEN) {
- WOLFSSL_MSG("Signature buffer too big");
- return BUFFER_E;
- }
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- if (key) {
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
- }
-#endif
-
-#if defined(WC_RSA_PSS)
- if (sigAlgo == rsa_pss_sa_algo) {
- enum wc_HashType hashType = WC_HASH_TYPE_NONE;
- int mgf = 0;
-
- ret = ConvertHashPss(hashAlgo, &hashType, &mgf);
- if (ret != 0)
- return ret;
- #ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->RsaPssSignCheckCb) {
- /* The key buffer includes private/public portion,
- but only public is used */
- /* If HSM hardware is checking the signature result you can
- optionally skip the sign check and return 0 */
- /* The ctx here is the RsaSignCtx set using wolfSSL_SetRsaSignCtx */
- void* ctx = wolfSSL_GetRsaPssSignCtx(ssl);
- ret = ssl->ctx->RsaPssSignCheckCb(ssl, verifySig, sigSz, &out,
- TypeHash(hashAlgo), mgf,
- keyBuf, keySz, ctx);
- if (ret > 0) {
- ret = wc_RsaPSS_CheckPadding(plain, plainSz, out, ret,
- hashType);
- if (ret != 0)
- ret = VERIFY_CERT_ERROR;
- }
- }
- else
- #endif /* HAVE_PK_CALLBACKS */
- {
- ret = wc_RsaPSS_VerifyInline(verifySig, sigSz, &out, hashType, mgf,
- key);
- if (ret > 0) {
- #ifdef HAVE_SELFTEST
- ret = wc_RsaPSS_CheckPadding(plain, plainSz, out, ret,
- hashType);
- #else
- ret = wc_RsaPSS_CheckPadding_ex(plain, plainSz, out, ret,
- hashType, -1,
- mp_count_bits(&key->n));
- #endif
- if (ret != 0)
- ret = VERIFY_CERT_ERROR;
- }
- }
-
- }
- else
-#endif /* WC_RSA_PSS */
- {
- #ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->RsaSignCheckCb) {
- /* The key buffer includes private/public portion,
- but only public is used */
- /* If HSM hardware is checking the signature result you can
- optionally skip the sign check and return 0 */
- /* The ctx here is the RsaSignCtx set using wolfSSL_SetRsaSignCtx */
- void* ctx = wolfSSL_GetRsaSignCtx(ssl);
- ret = ssl->ctx->RsaSignCheckCb(ssl, verifySig, sigSz, &out,
- keyBuf, keySz, ctx);
- }
- else
- #endif /* HAVE_PK_CALLBACKS */
- {
- ret = wc_RsaSSL_VerifyInline(verifySig, sigSz, &out, key);
- }
-
- if (ret > 0) {
- if (ret != (int)plainSz || !out ||
- XMEMCMP(plain, out, plainSz) != 0) {
- WOLFSSL_MSG("RSA Signature verification failed");
- ret = RSA_SIGN_FAULT;
- } else {
- ret = 0; /* RSA reset */
- }
- }
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (key && ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("VerifyRsaSign", ret);
-
- return ret;
-}
-
-#ifndef WOLFSSL_NO_TLS12
-
-#if !defined(NO_WOLFSSL_SERVER) || !defined(WOLFSSL_NO_CLIENT_AUTH)
-int RsaDec(WOLFSSL* ssl, byte* in, word32 inSz, byte** out, word32* outSz,
- RsaKey* key, DerBuffer* keyBufInfo)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
-
- WOLFSSL_ENTER("RsaDec");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->RsaDecCb) {
- void* ctx = wolfSSL_GetRsaDecCtx(ssl);
- ret = ssl->ctx->RsaDecCb(ssl, in, inSz, out, keyBuf, keySz, ctx);
- }
- else
-#endif /* HAVE_PK_CALLBACKS */
- {
- #ifdef WC_RSA_BLINDING
- ret = wc_RsaSetRNG(key, ssl->rng);
- if (ret != 0)
- return ret;
- #endif
- ret = wc_RsaPrivateDecryptInline(in, inSz, out, key);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- /* For positive response return in outSz */
- if (ret > 0) {
- *outSz = ret;
- ret = 0;
- }
-
- WOLFSSL_LEAVE("RsaDec", ret);
-
- return ret;
-}
-#endif /* !NO_WOLFSSL_SERVER) || !WOLFSSL_NO_CLIENT_AUTH */
-
-int RsaEnc(WOLFSSL* ssl, const byte* in, word32 inSz, byte* out, word32* outSz,
- RsaKey* key, buffer* keyBufInfo)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
-
- WOLFSSL_ENTER("RsaEnc");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->RsaEncCb) {
- void* ctx = wolfSSL_GetRsaEncCtx(ssl);
- ret = ssl->ctx->RsaEncCb(ssl, in, inSz, out, outSz, keyBuf, keySz, ctx);
- }
- else
-#endif /* HAVE_PK_CALLBACKS */
- {
- ret = wc_RsaPublicEncrypt(in, inSz, out, *outSz, key, ssl->rng);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- /* For positive response return in outSz */
- if (ret > 0) {
- *outSz = ret;
- ret = 0;
- }
-
- WOLFSSL_LEAVE("RsaEnc", ret);
-
- return ret;
-}
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#endif /* NO_RSA */
-
-#ifdef HAVE_ECC
-
-int EccSign(WOLFSSL* ssl, const byte* in, word32 inSz, byte* out,
- word32* outSz, ecc_key* key, DerBuffer* keyBufInfo)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
-
- WOLFSSL_ENTER("EccSign");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- if (key) {
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
- }
-#endif
-
-#if defined(HAVE_PK_CALLBACKS)
- if (ssl->ctx->EccSignCb) {
- void* ctx = wolfSSL_GetEccSignCtx(ssl);
- ret = ssl->ctx->EccSignCb(ssl, in, inSz, out, outSz, keyBuf,
- keySz, ctx);
- }
- else
-#endif /* HAVE_PK_CALLBACKS */
- {
- ret = wc_ecc_sign_hash(in, inSz, out, outSz, ssl->rng, key);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (key && ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("EccSign", ret);
-
- return ret;
-}
-
-int EccVerify(WOLFSSL* ssl, const byte* in, word32 inSz, const byte* out,
- word32 outSz, ecc_key* key, buffer* keyBufInfo)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
-
- WOLFSSL_ENTER("EccVerify");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->EccVerifyCb) {
- void* ctx = wolfSSL_GetEccVerifyCtx(ssl);
- ret = ssl->ctx->EccVerifyCb(ssl, in, inSz, out, outSz, keyBuf, keySz,
- &ssl->eccVerifyRes, ctx);
- }
- else
-#endif /* HAVE_PK_CALLBACKS */
- {
- ret = wc_ecc_verify_hash(in, inSz, out, outSz, &ssl->eccVerifyRes, key);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
- else
-#endif /* WOLFSSL_ASYNC_CRYPT */
- {
- ret = (ret != 0 || ssl->eccVerifyRes == 0) ? VERIFY_SIGN_ERROR : 0;
- }
-
- WOLFSSL_LEAVE("EccVerify", ret);
-
- return ret;
-}
-
-#ifdef HAVE_PK_CALLBACKS
- /* Gets ECC key for shared secret callback testing
- * Client side: returns peer key
- * Server side: returns private key
- */
- static int EccGetKey(WOLFSSL* ssl, ecc_key** otherKey)
- {
- int ret = NO_PEER_KEY;
- ecc_key* tmpKey = NULL;
-
- if (ssl == NULL || otherKey == NULL) {
- return BAD_FUNC_ARG;
- }
-
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- if (ssl->specs.static_ecdh) {
- if (!ssl->peerEccDsaKey || !ssl->peerEccDsaKeyPresent ||
- !ssl->peerEccDsaKey->dp) {
- return NO_PEER_KEY;
- }
- tmpKey = (struct ecc_key*)ssl->peerEccDsaKey;
- }
- else {
- if (!ssl->peerEccKey || !ssl->peerEccKeyPresent ||
- !ssl->peerEccKey->dp) {
- return NO_PEER_KEY;
- }
- tmpKey = (struct ecc_key*)ssl->peerEccKey;
- }
- }
- else if (ssl->options.side == WOLFSSL_SERVER_END) {
- if (ssl->specs.static_ecdh) {
- if (ssl->hsKey == NULL) {
- return NO_PRIVATE_KEY;
- }
- tmpKey = (struct ecc_key*)ssl->hsKey;
- }
- else {
- if (!ssl->eccTempKeyPresent) {
- return NO_PRIVATE_KEY;
- }
- tmpKey = (struct ecc_key*)ssl->eccTempKey;
- }
- }
-
- if (tmpKey) {
- *otherKey = tmpKey;
- ret = 0;
- }
-
- return ret;
- }
-#endif /* HAVE_PK_CALLBACKS */
-
-int EccSharedSecret(WOLFSSL* ssl, ecc_key* priv_key, ecc_key* pub_key,
- byte* pubKeyDer, word32* pubKeySz, byte* out, word32* outlen,
- int side)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- ecc_key* otherKey = NULL;
-#endif
-#ifdef WOLFSSL_ASYNC_CRYPT
- WC_ASYNC_DEV* asyncDev = &priv_key->asyncDev;
-#endif
-
- (void)ssl;
- (void)pubKeyDer;
- (void)pubKeySz;
- (void)side;
-
- WOLFSSL_ENTER("EccSharedSecret");
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->EccSharedSecretCb) {
- ret = EccGetKey(ssl, &otherKey);
- if (ret != 0)
- return ret;
- #ifdef WOLFSSL_ASYNC_CRYPT
- asyncDev = &otherKey->asyncDev;
- #endif
- }
-#endif
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->EccSharedSecretCb) {
- void* ctx = wolfSSL_GetEccSharedSecretCtx(ssl);
- ret = ssl->ctx->EccSharedSecretCb(ssl, otherKey, pubKeyDer,
- pubKeySz, out, outlen, side, ctx);
- }
- else
-#endif
- {
-#if defined(ECC_TIMING_RESISTANT) && (!defined(HAVE_FIPS) || \
- (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION != 2))) && \
- !defined(HAVE_SELFTEST)
- ret = wc_ecc_set_rng(priv_key, ssl->rng);
- if (ret == 0)
-#endif
- ret = wc_ecc_shared_secret(priv_key, pub_key, out, outlen);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("EccSharedSecret", ret);
-
- return ret;
-}
-
-int EccMakeKey(WOLFSSL* ssl, ecc_key* key, ecc_key* peer)
-{
- int ret = 0;
- int keySz = 0;
- int ecc_curve = ECC_CURVE_DEF;
-
- WOLFSSL_ENTER("EccMakeKey");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_NONE);
- if (ret != 0)
- return ret;
-#endif
-
- /* get key size */
- if (peer == NULL) {
- keySz = ssl->eccTempKeySz;
- }
- else {
- keySz = peer->dp->size;
- }
-
- /* get curve type */
- if (ssl->ecdhCurveOID > 0) {
- ecc_curve = wc_ecc_get_oid(ssl->ecdhCurveOID, NULL, NULL);
- }
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->EccKeyGenCb) {
- void* ctx = wolfSSL_GetEccKeyGenCtx(ssl);
- ret = ssl->ctx->EccKeyGenCb(ssl, key, keySz, ecc_curve, ctx);
- }
- else
-#endif
- {
- ret = wc_ecc_make_key_ex(ssl->rng, keySz, key, ecc_curve);
- }
-
- /* make sure the curve is set for TLS */
- if (ret == 0 && key->dp) {
- ssl->ecdhCurveOID = key->dp->oidSum;
- #if defined(WOLFSSL_TLS13) || defined(HAVE_FFDHE)
- ssl->namedGroup = 0;
- #endif
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("EccMakeKey", ret);
-
- return ret;
-}
-#endif /* HAVE_ECC */
-
-#ifdef HAVE_ED25519
-/* Check whether the key contains a public key.
- * If not then pull it out of the leaf certificate.
- *
- * ssl SSL/TLS object.
- * returns MEMORY_E when unable to allocate memory, a parsing error, otherwise
- * 0 on success.
- */
-int Ed25519CheckPubKey(WOLFSSL* ssl)
-{
- ed25519_key* key = (ed25519_key*)ssl->hsKey;
- int ret = 0;
-
- /* Public key required for signing. */
- if (!key->pubKeySet) {
- DerBuffer* leaf = ssl->buffers.certificate;
- DecodedCert* cert = (DecodedCert*)XMALLOC(sizeof(*cert),
- ssl->heap, DYNAMIC_TYPE_DCERT);
- if (cert == NULL)
- ret = MEMORY_E;
-
- if (ret == 0) {
- InitDecodedCert(cert, leaf->buffer, leaf->length, ssl->heap);
- ret = DecodeToKey(cert, 0);
- }
- if (ret == 0) {
- ret = wc_ed25519_import_public(cert->publicKey, cert->pubKeySize,
- key);
- }
- if (cert != NULL) {
- FreeDecodedCert(cert);
- XFREE(cert, ssl->heap, DYNAMIC_TYPE_DCERT);
- }
- }
-
- return ret;
-}
-
-/* Sign the data using EdDSA and key using Ed25519.
- *
- * ssl SSL object.
- * in Data or message to sign.
- * inSz Length of the data.
- * out Buffer to hold signature.
- * outSz On entry, size of the buffer. On exit, the size of the signature.
- * key The private Ed25519 key data.
- * keySz The length of the private key data in bytes.
- * ctx The callback context.
- * returns 0 on success, otherwise the value is an error.
- */
-int Ed25519Sign(WOLFSSL* ssl, const byte* in, word32 inSz, byte* out,
- word32* outSz, ed25519_key* key, DerBuffer* keyBufInfo)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
-
- WOLFSSL_ENTER("Ed25519Sign");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#if defined(HAVE_PK_CALLBACKS)
- if (ssl->ctx->Ed25519SignCb) {
- void* ctx = wolfSSL_GetEd25519SignCtx(ssl);
- ret = ssl->ctx->Ed25519SignCb(ssl, in, inSz, out, outSz, keyBuf,
- keySz, ctx);
- }
- else
-#endif /* HAVE_PK_CALLBACKS */
- {
- ret = wc_ed25519_sign_msg(in, inSz, out, outSz, key);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("Ed25519Sign", ret);
-
- return ret;
-}
-
-/* Verify the data using EdDSA and key using Ed25519.
- *
- * ssl SSL object.
- * in Signature data.
- * inSz Length of the signature data in bytes.
- * msg Message to verify.
- * outSz Length of message in bytes.
- * key The public Ed25519 key data.
- * keySz The length of the private key data in bytes.
- * ctx The callback context.
- * returns 0 on success, otherwise the value is an error.
- */
-int Ed25519Verify(WOLFSSL* ssl, const byte* in, word32 inSz, const byte* msg,
- word32 msgSz, ed25519_key* key, buffer* keyBufInfo)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
-
- WOLFSSL_ENTER("Ed25519Verify");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->Ed25519VerifyCb) {
- void* ctx = wolfSSL_GetEd25519VerifyCtx(ssl);
- ret = ssl->ctx->Ed25519VerifyCb(ssl, in, inSz, msg, msgSz, keyBuf,
- keySz, &ssl->eccVerifyRes, ctx);
- }
- else
-#endif /* HAVE_PK_CALLBACKS */
- {
- ret = wc_ed25519_verify_msg(in, inSz, msg, msgSz,
- &ssl->eccVerifyRes, key);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
- else
-#endif /* WOLFSSL_ASYNC_CRYPT */
- {
- ret = (ret != 0 || ssl->eccVerifyRes == 0) ? VERIFY_SIGN_ERROR : 0;
- }
-
- WOLFSSL_LEAVE("Ed25519Verify", ret);
-
- return ret;
-}
-#endif /* HAVE_ED25519 */
-
-#ifndef WOLFSSL_NO_TLS12
-
-#ifdef HAVE_CURVE25519
-#ifdef HAVE_PK_CALLBACKS
- /* Gets X25519 key for shared secret callback testing
- * Client side: returns peer key
- * Server side: returns private key
- */
- static int X25519GetKey(WOLFSSL* ssl, curve25519_key** otherKey)
- {
- int ret = NO_PEER_KEY;
- struct curve25519_key* tmpKey = NULL;
-
- if (ssl == NULL || otherKey == NULL) {
- return BAD_FUNC_ARG;
- }
-
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- if (!ssl->peerX25519Key || !ssl->peerX25519KeyPresent ||
- !ssl->peerX25519Key->dp) {
- return NO_PEER_KEY;
- }
- tmpKey = (struct curve25519_key*)ssl->peerX25519Key;
- }
- else if (ssl->options.side == WOLFSSL_SERVER_END) {
- if (!ssl->eccTempKeyPresent) {
- return NO_PRIVATE_KEY;
- }
- tmpKey = (struct curve25519_key*)ssl->eccTempKey;
- }
-
- if (tmpKey) {
- *otherKey = (curve25519_key *)tmpKey;
- ret = 0;
- }
-
- return ret;
- }
-#endif /* HAVE_PK_CALLBACKS */
-
-static int X25519SharedSecret(WOLFSSL* ssl, curve25519_key* priv_key,
- curve25519_key* pub_key, byte* pubKeyDer, word32* pubKeySz,
- byte* out, word32* outlen, int side)
-{
- int ret;
-
- (void)ssl;
- (void)pubKeyDer;
- (void)pubKeySz;
- (void)side;
-
- WOLFSSL_ENTER("X25519SharedSecret");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &priv_key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->X25519SharedSecretCb) {
- curve25519_key* otherKey = NULL;
-
- ret = X25519GetKey(ssl, &otherKey);
- if (ret == 0) {
- void* ctx = wolfSSL_GetX25519SharedSecretCtx(ssl);
- ret = ssl->ctx->X25519SharedSecretCb(ssl, otherKey, pubKeyDer,
- pubKeySz, out, outlen, side, ctx);
- }
- }
- else
-#endif
- {
- ret = wc_curve25519_shared_secret_ex(priv_key, pub_key, out, outlen,
- EC25519_LITTLE_ENDIAN);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &priv_key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("X25519SharedSecret", ret);
-
- return ret;
-}
-
-static int X25519MakeKey(WOLFSSL* ssl, curve25519_key* key,
- curve25519_key* peer)
-{
- int ret = 0;
-
- (void)peer;
-
- WOLFSSL_ENTER("X25519MakeKey");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_NONE);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->X25519KeyGenCb) {
- void* ctx = wolfSSL_GetX25519KeyGenCtx(ssl);
- ret = ssl->ctx->X25519KeyGenCb(ssl, key, CURVE25519_KEYSIZE, ctx);
- }
- else
-#endif
- {
- ret = wc_curve25519_make_key(ssl->rng, CURVE25519_KEYSIZE, key);
- }
-
- if (ret == 0) {
- ssl->ecdhCurveOID = ECC_X25519_OID;
- #if defined(WOLFSSL_TLS13) || defined(HAVE_FFDHE)
- ssl->namedGroup = 0;
- #endif
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("X25519MakeKey", ret);
-
- return ret;
-}
-#endif /* HAVE_CURVE25519 */
-
-#ifdef HAVE_ED448
-/* Check whether the key contains a public key.
- * If not then pull it out of the leaf certificate.
- *
- * ssl SSL/TLS object.
- * returns MEMORY_E when unable to allocate memory, a parsing error, otherwise
- * 0 on success.
- */
-int Ed448CheckPubKey(WOLFSSL* ssl)
-{
- ed448_key* key = (ed448_key*)ssl->hsKey;
- int ret = 0;
-
- /* Public key required for signing. */
- if (!key->pubKeySet) {
- DerBuffer* leaf = ssl->buffers.certificate;
- DecodedCert* cert = (DecodedCert*)XMALLOC(sizeof(*cert), ssl->heap,
- DYNAMIC_TYPE_DCERT);
- if (cert == NULL)
- ret = MEMORY_E;
-
- if (ret == 0) {
- InitDecodedCert(cert, leaf->buffer, leaf->length, ssl->heap);
- ret = DecodeToKey(cert, 0);
- }
- if (ret == 0) {
- ret = wc_ed448_import_public(cert->publicKey, cert->pubKeySize,
- key);
- }
- if (cert != NULL) {
- FreeDecodedCert(cert);
- XFREE(cert, ssl->heap, DYNAMIC_TYPE_DCERT);
- }
- }
-
- return ret;
-}
-
-/* Sign the data using EdDSA and key using Ed448.
- *
- * ssl SSL object.
- * in Data or message to sign.
- * inSz Length of the data.
- * out Buffer to hold signature.
- * outSz On entry, size of the buffer. On exit, the size of the signature.
- * key The private Ed448 key data.
- * keySz The length of the private key data in bytes.
- * ctx The callback context.
- * returns 0 on success, otherwise the value is an error.
- */
-int Ed448Sign(WOLFSSL* ssl, const byte* in, word32 inSz, byte* out,
- word32* outSz, ed448_key* key, DerBuffer* keyBufInfo)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
-
- WOLFSSL_ENTER("Ed448Sign");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#if defined(HAVE_PK_CALLBACKS)
- if (ssl->ctx->Ed448SignCb) {
- void* ctx = wolfSSL_GetEd448SignCtx(ssl);
- ret = ssl->ctx->Ed448SignCb(ssl, in, inSz, out, outSz, keyBuf, keySz,
- ctx);
- }
- else
-#endif /* HAVE_PK_CALLBACKS */
- {
- ret = wc_ed448_sign_msg(in, inSz, out, outSz, key, NULL, 0);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("Ed448Sign", ret);
-
- return ret;
-}
-
-/* Verify the data using EdDSA and key using Ed448.
- *
- * ssl SSL object.
- * in Signature data.
- * inSz Length of the signature data in bytes.
- * msg Message to verify.
- * outSz Length of message in bytes.
- * key The public Ed448 key data.
- * keySz The length of the private key data in bytes.
- * ctx The callback context.
- * returns 0 on success, otherwise the value is an error.
- */
-int Ed448Verify(WOLFSSL* ssl, const byte* in, word32 inSz, const byte* msg,
- word32 msgSz, ed448_key* key, buffer* keyBufInfo)
-{
- int ret;
-#ifdef HAVE_PK_CALLBACKS
- const byte* keyBuf = NULL;
- word32 keySz = 0;
-
- if (keyBufInfo) {
- keyBuf = keyBufInfo->buffer;
- keySz = keyBufInfo->length;
- }
-#endif
-
- (void)ssl;
- (void)keyBufInfo;
-
- WOLFSSL_ENTER("Ed448Verify");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->Ed448VerifyCb) {
- void* ctx = wolfSSL_GetEd448VerifyCtx(ssl);
- ret = ssl->ctx->Ed448VerifyCb(ssl, in, inSz, msg, msgSz, keyBuf, keySz,
- &ssl->eccVerifyRes, ctx);
- }
- else
-#endif /* HAVE_PK_CALLBACKS */
- {
- ret = wc_ed448_verify_msg(in, inSz, msg, msgSz, &ssl->eccVerifyRes, key,
- NULL, 0);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
- else
-#endif /* WOLFSSL_ASYNC_CRYPT */
- {
- ret = (ret != 0 || ssl->eccVerifyRes == 0) ? VERIFY_SIGN_ERROR : 0;
- }
-
- WOLFSSL_LEAVE("Ed448Verify", ret);
-
- return ret;
-}
-#endif /* HAVE_ED448 */
-
-#ifdef HAVE_CURVE448
-#ifdef HAVE_PK_CALLBACKS
- /* Gets X448 key for shared secret callback testing
- * Client side: returns peer key
- * Server side: returns private key
- */
- static int X448GetKey(WOLFSSL* ssl, curve448_key** otherKey)
- {
- int ret = NO_PEER_KEY;
- struct curve448_key* tmpKey = NULL;
-
- if (ssl == NULL || otherKey == NULL) {
- return BAD_FUNC_ARG;
- }
-
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- if (!ssl->peerX448Key || !ssl->peerX448KeyPresent) {
- return NO_PEER_KEY;
- }
- tmpKey = (struct curve448_key*)ssl->peerX448Key;
- }
- else if (ssl->options.side == WOLFSSL_SERVER_END) {
- if (!ssl->eccTempKeyPresent) {
- return NO_PRIVATE_KEY;
- }
- tmpKey = (struct curve448_key*)ssl->eccTempKey;
- }
-
- if (tmpKey) {
- *otherKey = (curve448_key *)tmpKey;
- ret = 0;
- }
-
- return ret;
- }
-#endif /* HAVE_PK_CALLBACKS */
-
-static int X448SharedSecret(WOLFSSL* ssl, curve448_key* priv_key,
- curve448_key* pub_key, byte* pubKeyDer,
- word32* pubKeySz, byte* out, word32* outlen,
- int side)
-{
- int ret;
-
- (void)ssl;
- (void)pubKeyDer;
- (void)pubKeySz;
- (void)side;
-
- WOLFSSL_ENTER("X448SharedSecret");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &priv_key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->X448SharedSecretCb) {
- curve448_key* otherKey = NULL;
-
- ret = X448GetKey(ssl, &otherKey);
- if (ret == 0) {
- void* ctx = wolfSSL_GetX448SharedSecretCtx(ssl);
- ret = ssl->ctx->X448SharedSecretCb(ssl, otherKey, pubKeyDer,
- pubKeySz, out, outlen, side, ctx);
- }
- }
- else
-#endif
- {
- ret = wc_curve448_shared_secret_ex(priv_key, pub_key, out, outlen,
- EC448_LITTLE_ENDIAN);
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &priv_key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("X448SharedSecret", ret);
-
- return ret;
-}
-
-static int X448MakeKey(WOLFSSL* ssl, curve448_key* key, curve448_key* peer)
-{
- int ret = 0;
-
- (void)peer;
-
- WOLFSSL_ENTER("X448MakeKey");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &key->asyncDev, WC_ASYNC_FLAG_NONE);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->X448KeyGenCb) {
- void* ctx = wolfSSL_GetX448KeyGenCtx(ssl);
- ret = ssl->ctx->X448KeyGenCb(ssl, key, CURVE448_KEY_SIZE, ctx);
- }
- else
-#endif
- {
- ret = wc_curve448_make_key(ssl->rng, CURVE448_KEY_SIZE, key);
- }
-
- if (ret == 0) {
- ssl->ecdhCurveOID = ECC_X448_OID;
- #if defined(WOLFSSL_TLS13) || defined(HAVE_FFDHE)
- ssl->namedGroup = 0;
- #endif
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &key->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("X448MakeKey", ret);
-
- return ret;
-}
-#endif /* HAVE_CURVE448 */
-
-#if !defined(NO_CERTS) || !defined(NO_PSK)
-#if !defined(NO_DH)
-
-int DhGenKeyPair(WOLFSSL* ssl, DhKey* dhKey,
- byte* priv, word32* privSz,
- byte* pub, word32* pubSz)
-{
- int ret;
-
- WOLFSSL_ENTER("DhGenKeyPair");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &dhKey->asyncDev, WC_ASYNC_FLAG_NONE);
- if (ret != 0)
- return ret;
-#endif
-
- ret = wc_DhGenerateKeyPair(dhKey, ssl->rng, priv, privSz, pub, pubSz);
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &dhKey->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("DhGenKeyPair", ret);
-
- return ret;
-}
-
-int DhAgree(WOLFSSL* ssl, DhKey* dhKey,
- const byte* priv, word32 privSz,
- const byte* otherPub, word32 otherPubSz,
- byte* agree, word32* agreeSz)
-{
- int ret;
-
- (void)ssl;
-
- WOLFSSL_ENTER("DhAgree");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &dhKey->asyncDev, WC_ASYNC_FLAG_NONE);
- if (ret != 0)
- return ret;
-#endif
-
-#ifdef HAVE_PK_CALLBACKS
- if (ssl->ctx->DhAgreeCb) {
- void* ctx = wolfSSL_GetDhAgreeCtx(ssl);
-
- WOLFSSL_MSG("Calling DhAgree Callback Function");
- ret = ssl->ctx->DhAgreeCb(ssl, dhKey, priv, privSz,
- otherPub, otherPubSz, agree, agreeSz, ctx);
- }
- else
-#endif
- {
-#if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
- ret = wc_DhCheckPubValue(ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length, otherPub, otherPubSz);
- if (ret != 0) {
- #ifdef OPENSSL_EXTRA
- SendAlert(ssl, alert_fatal, illegal_parameter);
- #endif
- }
- else
-#endif
- {
- ret = wc_DhAgree(dhKey, agree, agreeSz, priv, privSz, otherPub,
- otherPubSz);
- }
- }
-
- /* Handle async pending response */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &dhKey->asyncDev);
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- WOLFSSL_LEAVE("DhAgree", ret);
-
- return ret;
-}
-#endif /* !NO_DH */
-#endif /* !NO_CERTS || !NO_PSK */
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-
-#ifdef HAVE_PK_CALLBACKS
-int wolfSSL_IsPrivatePkSet(WOLFSSL* ssl)
-{
- int pkcbset = 0;
- (void)ssl;
-
-#if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) || \
- !defined(NO_RSA)
- if (0
- #ifdef HAVE_ECC
- || (ssl->ctx->EccSignCb != NULL &&
- ssl->buffers.keyType == ecc_dsa_sa_algo)
- #endif
- #ifdef HAVE_ED25519
- || (ssl->ctx->Ed25519SignCb != NULL &&
- ssl->buffers.keyType == ed25519_sa_algo)
- #endif
- #ifdef HAVE_ED448
- || (ssl->ctx->Ed448SignCb != NULL &&
- ssl->buffers.keyType == ed448_sa_algo)
- #endif
- #ifndef NO_RSA
- || (ssl->ctx->RsaSignCb != NULL && ssl->buffers.keyType == rsa_sa_algo)
- || (ssl->ctx->RsaDecCb != NULL && ssl->buffers.keyType == rsa_kea)
- #ifdef WC_RSA_PSS
- || (ssl->ctx->RsaPssSignCb != NULL &&
- ssl->buffers.keyType == rsa_pss_sa_algo)
- #endif
- #endif
- ) {
- pkcbset = 1;
- }
-#endif
- return pkcbset;
-}
-
-int wolfSSL_CTX_IsPrivatePkSet(WOLFSSL_CTX* ctx)
-{
- int pkcbset = 0;
- (void)ctx;
-#if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) || \
- !defined(NO_RSA)
- if (0
- #ifdef HAVE_ECC
- || ctx->EccSignCb != NULL
- #endif
- #ifdef HAVE_ED25519
- || ctx->Ed25519SignCb != NULL
- #endif
- #ifdef HAVE_ED448
- || ctx->Ed448SignCb != NULL
- #endif
- #ifndef NO_RSA
- || ctx->RsaSignCb != NULL
- || ctx->RsaDecCb != NULL
- #ifdef WC_RSA_PSS
- || ctx->RsaPssSignCb != NULL
- #endif
- #endif
- ) {
- pkcbset = 1;
- }
-#endif
- return pkcbset;
-}
-#endif /* HAVE_PK_CALLBACKS */
-
-
-int InitSSL_Suites(WOLFSSL* ssl)
-{
- int keySz = 0;
- byte havePSK = 0;
- byte haveAnon = 0;
- byte haveRSA = 0;
- byte haveMcast = 0;
-
- (void)haveAnon; /* Squash unused var warnings */
- (void)haveMcast;
-
- if (!ssl)
- return BAD_FUNC_ARG;
-
-#ifndef NO_RSA
- haveRSA = 1;
-#endif
-#ifndef NO_PSK
- havePSK = (byte)ssl->options.havePSK;
-#endif /* NO_PSK */
-#ifdef HAVE_ANON
- haveAnon = (byte)ssl->options.haveAnon;
-#endif /* HAVE_ANON*/
-#ifdef WOLFSSL_MULTICAST
- haveMcast = (byte)ssl->options.haveMcast;
-#endif /* WOLFSSL_MULTICAST */
-
-#ifdef WOLFSSL_EARLY_DATA
- if (ssl->options.side == WOLFSSL_SERVER_END)
- ssl->options.maxEarlyDataSz = ssl->ctx->maxEarlyDataSz;
-#endif
-#if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
- ((defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
- (defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
- ssl->options.cacheMessages = ssl->options.side == WOLFSSL_SERVER_END ||
- ssl->buffers.keyType == ed25519_sa_algo ||
- ssl->buffers.keyType == ed448_sa_algo;
-#endif
-
-#ifndef NO_CERTS
- keySz = ssl->buffers.keySz;
-#endif
-
- /* make sure server has DH parms, and add PSK if there, add NTRU too */
- if (ssl->options.side == WOLFSSL_SERVER_END) {
- InitSuites(ssl->suites, ssl->version, keySz, haveRSA, havePSK,
- ssl->options.haveDH, ssl->options.haveNTRU,
- ssl->options.haveECDSAsig, ssl->options.haveECC,
- ssl->options.haveStaticECC, ssl->options.side);
- }
- else {
- InitSuites(ssl->suites, ssl->version, keySz, haveRSA, havePSK,
- TRUE, ssl->options.haveNTRU,
- ssl->options.haveECDSAsig, ssl->options.haveECC,
- ssl->options.haveStaticECC, ssl->options.side);
- }
-
-#if !defined(NO_CERTS) && !defined(WOLFSSL_SESSION_EXPORT)
- /* make sure server has cert and key unless using PSK, Anon, or
- * Multicast. This should be true even if just switching ssl ctx */
- if (ssl->options.side == WOLFSSL_SERVER_END &&
- !havePSK && !haveAnon && !haveMcast) {
-
- /* server certificate must be loaded */
- if (!ssl->buffers.certificate || !ssl->buffers.certificate->buffer) {
- WOLFSSL_MSG("Server missing certificate");
- return NO_PRIVATE_KEY;
- }
-
- /* allow no private key if using PK callbacks and CB is set */
- #ifdef HAVE_PK_CALLBACKS
- if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx)) {
- WOLFSSL_MSG("Using PK for server private key");
- }
- else
- #endif
- if (!ssl->buffers.key || !ssl->buffers.key->buffer) {
- WOLFSSL_MSG("Server missing private key");
- return NO_PRIVATE_KEY;
- }
- }
-#endif
-
- return WOLFSSL_SUCCESS;
-}
-
-/* returns new reference count. Arg incr positive=up or negative=down */
-int SSL_CTX_RefCount(WOLFSSL_CTX* ctx, int incr)
-{
- int refCount;
-
- if (ctx == NULL) {
- return BAD_FUNC_ARG;
- }
-
- if (wc_LockMutex(&ctx->countMutex) != 0) {
- WOLFSSL_MSG("Couldn't lock CTX count mutex");
- return BAD_MUTEX_E;
- }
-
- ctx->refCount += incr;
- /* make sure refCount is never negative */
- if (ctx->refCount < 0) {
- ctx->refCount = 0;
- }
- refCount = ctx->refCount;
-
- wc_UnLockMutex(&ctx->countMutex);
-
- return refCount;
-}
-
-/* This function inherits a WOLFSSL_CTX's fields into an SSL object.
- It is used during initialization and to switch an ssl's CTX with
- wolfSSL_Set_SSL_CTX. Requires ssl->suites alloc and ssl-arrays with PSK
- unless writeDup is on.
-
- ssl object to initialize
- ctx parent factory
- writeDup flag indicating this is a write dup only
-
- WOLFSSL_SUCCESS return value on success */
-int SetSSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
-{
- int ret;
- byte newSSL;
-
- if (!ssl || !ctx)
- return BAD_FUNC_ARG;
-
-#ifndef SINGLE_THREADED
- if (ssl->suites == NULL && !writeDup)
- return BAD_FUNC_ARG;
-#endif
-
- newSSL = ssl->ctx == NULL; /* Assign after null check */
-
-#ifndef NO_PSK
- if (ctx->server_hint[0] && ssl->arrays == NULL && !writeDup) {
- return BAD_FUNC_ARG; /* needed for copy below */
- }
-#endif
-
- /* decrement previous CTX reference count if exists.
- * This should only happen if switching ctxs!*/
- if (!newSSL) {
- WOLFSSL_MSG("freeing old ctx to decrement reference count. Switching ctx.");
- wolfSSL_CTX_free(ssl->ctx);
- }
-
- /* increment CTX reference count */
- if ((ret = SSL_CTX_RefCount(ctx, 1)) < 0) {
- return ret;
- }
- ret = WOLFSSL_SUCCESS; /* set default ret */
-
- ssl->ctx = ctx; /* only for passing to calls, options could change */
- ssl->version = ctx->method->version;
-
-#ifdef HAVE_ECC
- ssl->eccTempKeySz = ctx->eccTempKeySz;
- ssl->ecdhCurveOID = ctx->ecdhCurveOID;
-#endif
-#if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448)
- ssl->pkCurveOID = ctx->pkCurveOID;
-#endif
-
-#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL)
- ssl->options.mask = ctx->mask;
-#endif
-#ifdef OPENSSL_EXTRA
- ssl->CBIS = ctx->CBIS;
-#endif
- ssl->timeout = ctx->timeout;
- ssl->verifyCallback = ctx->verifyCallback;
- ssl->options.side = ctx->method->side;
- ssl->options.downgrade = ctx->method->downgrade;
- ssl->options.minDowngrade = ctx->minDowngrade;
-
- ssl->options.haveDH = ctx->haveDH;
- ssl->options.haveNTRU = ctx->haveNTRU;
- ssl->options.haveECDSAsig = ctx->haveECDSAsig;
- ssl->options.haveECC = ctx->haveECC;
- ssl->options.haveStaticECC = ctx->haveStaticECC;
-
-#ifndef NO_PSK
- ssl->options.havePSK = ctx->havePSK;
- ssl->options.client_psk_cb = ctx->client_psk_cb;
- ssl->options.server_psk_cb = ctx->server_psk_cb;
- ssl->options.psk_ctx = ctx->psk_ctx;
-#ifdef WOLFSSL_TLS13
- ssl->options.client_psk_tls13_cb = ctx->client_psk_tls13_cb;
- ssl->options.server_psk_tls13_cb = ctx->server_psk_tls13_cb;
-#endif
-#endif /* NO_PSK */
-#ifdef WOLFSSL_EARLY_DATA
- if (ssl->options.side == WOLFSSL_SERVER_END)
- ssl->options.maxEarlyDataSz = ctx->maxEarlyDataSz;
-#endif
-
-#ifdef HAVE_ANON
- ssl->options.haveAnon = ctx->haveAnon;
-#endif
-#ifndef NO_DH
- ssl->options.minDhKeySz = ctx->minDhKeySz;
- ssl->options.maxDhKeySz = ctx->maxDhKeySz;
-#endif
-#ifndef NO_RSA
- ssl->options.minRsaKeySz = ctx->minRsaKeySz;
-#endif
-#ifdef HAVE_ECC
- ssl->options.minEccKeySz = ctx->minEccKeySz;
-#endif
-#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- ssl->options.verifyDepth = ctx->verifyDepth;
-#endif
-
- ssl->options.sessionCacheOff = ctx->sessionCacheOff;
- ssl->options.sessionCacheFlushOff = ctx->sessionCacheFlushOff;
-#ifdef HAVE_EXT_CACHE
- ssl->options.internalCacheOff = ctx->internalCacheOff;
-#endif
-
- ssl->options.verifyPeer = ctx->verifyPeer;
- ssl->options.verifyNone = ctx->verifyNone;
- ssl->options.failNoCert = ctx->failNoCert;
- ssl->options.failNoCertxPSK = ctx->failNoCertxPSK;
- ssl->options.sendVerify = ctx->sendVerify;
-
- ssl->options.partialWrite = ctx->partialWrite;
- ssl->options.quietShutdown = ctx->quietShutdown;
- ssl->options.groupMessages = ctx->groupMessages;
-
-#ifndef NO_DH
- #if !defined(WOLFSSL_OLD_PRIME_CHECK) && !defined(HAVE_FIPS) && \
- !defined(HAVE_SELFTEST)
- ssl->options.dhKeyTested = ctx->dhKeyTested;
- #endif
- ssl->buffers.serverDH_P = ctx->serverDH_P;
- ssl->buffers.serverDH_G = ctx->serverDH_G;
-#endif
-
-#ifndef NO_CERTS
- /* ctx still owns certificate, certChain, key, dh, and cm */
- ssl->buffers.certificate = ctx->certificate;
- ssl->buffers.certChain = ctx->certChain;
-#ifdef WOLFSSL_TLS13
- ssl->buffers.certChainCnt = ctx->certChainCnt;
-#endif
- ssl->buffers.key = ctx->privateKey;
- ssl->buffers.keyType = ctx->privateKeyType;
- ssl->buffers.keyId = ctx->privateKeyId;
- ssl->buffers.keySz = ctx->privateKeySz;
- ssl->buffers.keyDevId = ctx->privateKeyDevId;
-#endif
-#if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
- ((defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
- (defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
- ssl->options.cacheMessages = ssl->options.side == WOLFSSL_SERVER_END ||
- ssl->buffers.keyType == ed25519_sa_algo ||
- ssl->buffers.keyType == ed448_sa_algo;
-#endif
-
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- ssl->devId = ctx->devId;
-#endif
-
- if (writeDup == 0) {
-#ifndef NO_PSK
- if (ctx->server_hint[0]) { /* set in CTX */
- XSTRNCPY(ssl->arrays->server_hint, ctx->server_hint,
- sizeof(ssl->arrays->server_hint));
- ssl->arrays->server_hint[MAX_PSK_ID_LEN] = '\0'; /* null term */
- }
-#endif /* NO_PSK */
-
- if (ctx->suites) {
-#ifndef SINGLE_THREADED
- *ssl->suites = *ctx->suites;
-#else
- ssl->suites = ctx->suites;
-#endif
- }
- else {
- XMEMSET(ssl->suites, 0, sizeof(Suites));
- }
-
- if (ssl->options.side != WOLFSSL_NEITHER_END) {
- /* Defer initializing suites until accept or connect */
- ret = InitSSL_Suites(ssl);
- }
- } /* writeDup check */
-
-#ifdef WOLFSSL_SESSION_EXPORT
- #ifdef WOLFSSL_DTLS
- ssl->dtls_export = ctx->dtls_export; /* export function for session */
- #endif
-#endif
-
- ssl->CBIORecv = ctx->CBIORecv;
- ssl->CBIOSend = ctx->CBIOSend;
-#ifdef OPENSSL_EXTRA
- ssl->readAhead = ctx->readAhead;
-#endif
- ssl->verifyDepth = ctx->verifyDepth;
-
- return ret;
-}
-
-int InitHandshakeHashes(WOLFSSL* ssl)
-{
- int ret;
-
- /* make sure existing handshake hashes are free'd */
- if (ssl->hsHashes != NULL) {
- FreeHandshakeHashes(ssl);
- }
-
- /* allocate handshake hashes */
- ssl->hsHashes = (HS_Hashes*)XMALLOC(sizeof(HS_Hashes), ssl->heap,
- DYNAMIC_TYPE_HASHES);
- if (ssl->hsHashes == NULL) {
- WOLFSSL_MSG("HS_Hashes Memory error");
- return MEMORY_E;
- }
- XMEMSET(ssl->hsHashes, 0, sizeof(HS_Hashes));
-
-#ifndef NO_OLD_TLS
-#ifndef NO_MD5
- ret = wc_InitMd5_ex(&ssl->hsHashes->hashMd5, ssl->heap, ssl->devId);
- if (ret != 0)
- return ret;
- #if defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB)
- wc_Md5SetFlags(&ssl->hsHashes->hashMd5, WC_HASH_FLAG_WILLCOPY);
- #endif
-#endif
-#ifndef NO_SHA
- ret = wc_InitSha_ex(&ssl->hsHashes->hashSha, ssl->heap, ssl->devId);
- if (ret != 0)
- return ret;
- #if defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB)
- wc_ShaSetFlags(&ssl->hsHashes->hashSha, WC_HASH_FLAG_WILLCOPY);
- #endif
-#endif
-#endif /* !NO_OLD_TLS */
-#ifndef NO_SHA256
- ret = wc_InitSha256_ex(&ssl->hsHashes->hashSha256, ssl->heap, ssl->devId);
- if (ret != 0)
- return ret;
- #if defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB)
- wc_Sha256SetFlags(&ssl->hsHashes->hashSha256, WC_HASH_FLAG_WILLCOPY);
- #endif
-#endif
-#ifdef WOLFSSL_SHA384
- ret = wc_InitSha384_ex(&ssl->hsHashes->hashSha384, ssl->heap, ssl->devId);
- if (ret != 0)
- return ret;
- #if defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB)
- wc_Sha384SetFlags(&ssl->hsHashes->hashSha384, WC_HASH_FLAG_WILLCOPY);
- #endif
-#endif
-#ifdef WOLFSSL_SHA512
- ret = wc_InitSha512_ex(&ssl->hsHashes->hashSha512, ssl->heap, ssl->devId);
- if (ret != 0)
- return ret;
- #if defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB)
- wc_Sha512SetFlags(&ssl->hsHashes->hashSha512, WC_HASH_FLAG_WILLCOPY);
- #endif
-#endif
-
- return ret;
-}
-
-void FreeHandshakeHashes(WOLFSSL* ssl)
-{
- if (ssl->hsHashes) {
-#ifndef NO_OLD_TLS
- #ifndef NO_MD5
- wc_Md5Free(&ssl->hsHashes->hashMd5);
- #endif
- #ifndef NO_SHA
- wc_ShaFree(&ssl->hsHashes->hashSha);
- #endif
-#endif /* !NO_OLD_TLS */
- #ifndef NO_SHA256
- wc_Sha256Free(&ssl->hsHashes->hashSha256);
- #endif
- #ifdef WOLFSSL_SHA384
- wc_Sha384Free(&ssl->hsHashes->hashSha384);
- #endif
- #ifdef WOLFSSL_SHA512
- wc_Sha512Free(&ssl->hsHashes->hashSha512);
- #endif
- #if (defined(HAVE_ED25519) || defined(HAVE_ED448)) && \
- !defined(WOLFSSL_NO_CLIENT_AUTH)
- if (ssl->hsHashes->messages != NULL) {
- XFREE(ssl->hsHashes->messages, ssl->heap, DYNAMIC_TYPE_HASHES);
- ssl->hsHashes->messages = NULL;
- }
- #endif
-
- XFREE(ssl->hsHashes, ssl->heap, DYNAMIC_TYPE_HASHES);
- ssl->hsHashes = NULL;
- }
-}
-
-
-/* init everything to 0, NULL, default values before calling anything that may
- fail so that destructor has a "good" state to cleanup
-
- ssl object to initialize
- ctx parent factory
- writeDup flag indicating this is a write dup only
-
- 0 on success */
-int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
-{
- int ret;
-
- XMEMSET(ssl, 0, sizeof(WOLFSSL));
-
-#if defined(WOLFSSL_STATIC_MEMORY)
- if (ctx->heap != NULL) {
- WOLFSSL_HEAP_HINT* ssl_hint;
- WOLFSSL_HEAP_HINT* ctx_hint;
-
- /* avoid dereferencing a test value */
- #ifdef WOLFSSL_HEAP_TEST
- if (ctx->heap == (void*)WOLFSSL_HEAP_TEST) {
- ssl->heap = ctx->heap;
- }
- else {
- #endif
- ssl->heap = (WOLFSSL_HEAP_HINT*)XMALLOC(sizeof(WOLFSSL_HEAP_HINT),
- ctx->heap, DYNAMIC_TYPE_SSL);
- if (ssl->heap == NULL) {
- return MEMORY_E;
- }
- XMEMSET(ssl->heap, 0, sizeof(WOLFSSL_HEAP_HINT));
- ssl_hint = ((WOLFSSL_HEAP_HINT*)(ssl->heap));
- ctx_hint = ((WOLFSSL_HEAP_HINT*)(ctx->heap));
-
- /* lock and check IO count / handshake count */
- if (wc_LockMutex(&(ctx_hint->memory->memory_mutex)) != 0) {
- WOLFSSL_MSG("Bad memory_mutex lock");
- XFREE(ssl->heap, ctx->heap, DYNAMIC_TYPE_SSL);
- ssl->heap = NULL; /* free and set to NULL for IO counter */
- return BAD_MUTEX_E;
- }
- if (ctx_hint->memory->maxHa > 0 &&
- ctx_hint->memory->maxHa <= ctx_hint->memory->curHa) {
- WOLFSSL_MSG("At max number of handshakes for static memory");
- wc_UnLockMutex(&(ctx_hint->memory->memory_mutex));
- XFREE(ssl->heap, ctx->heap, DYNAMIC_TYPE_SSL);
- ssl->heap = NULL; /* free and set to NULL for IO counter */
- return MEMORY_E;
- }
-
- if (ctx_hint->memory->maxIO > 0 &&
- ctx_hint->memory->maxIO <= ctx_hint->memory->curIO) {
- WOLFSSL_MSG("At max number of IO allowed for static memory");
- wc_UnLockMutex(&(ctx_hint->memory->memory_mutex));
- XFREE(ssl->heap, ctx->heap, DYNAMIC_TYPE_SSL);
- ssl->heap = NULL; /* free and set to NULL for IO counter */
- return MEMORY_E;
- }
- ctx_hint->memory->curIO++;
- ctx_hint->memory->curHa++;
- ssl_hint->memory = ctx_hint->memory;
- ssl_hint->haFlag = 1;
- wc_UnLockMutex(&(ctx_hint->memory->memory_mutex));
-
- /* check if tracking stats */
- if (ctx_hint->memory->flag & WOLFMEM_TRACK_STATS) {
- ssl_hint->stats = (WOLFSSL_MEM_CONN_STATS*)XMALLOC(
- sizeof(WOLFSSL_MEM_CONN_STATS), ctx->heap, DYNAMIC_TYPE_SSL);
- if (ssl_hint->stats == NULL) {
- return MEMORY_E;
- }
- XMEMSET(ssl_hint->stats, 0, sizeof(WOLFSSL_MEM_CONN_STATS));
- }
-
- /* check if using fixed IO buffers */
- if (ctx_hint->memory->flag & WOLFMEM_IO_POOL_FIXED) {
- if (wc_LockMutex(&(ctx_hint->memory->memory_mutex)) != 0) {
- WOLFSSL_MSG("Bad memory_mutex lock");
- return BAD_MUTEX_E;
- }
- if (SetFixedIO(ctx_hint->memory, &(ssl_hint->inBuf)) != 1) {
- wc_UnLockMutex(&(ctx_hint->memory->memory_mutex));
- return MEMORY_E;
- }
- if (SetFixedIO(ctx_hint->memory, &(ssl_hint->outBuf)) != 1) {
- wc_UnLockMutex(&(ctx_hint->memory->memory_mutex));
- return MEMORY_E;
- }
- if (ssl_hint->outBuf == NULL || ssl_hint->inBuf == NULL) {
- WOLFSSL_MSG("Not enough memory to create fixed IO buffers");
- wc_UnLockMutex(&(ctx_hint->memory->memory_mutex));
- return MEMORY_E;
- }
- wc_UnLockMutex(&(ctx_hint->memory->memory_mutex));
- }
- #ifdef WOLFSSL_HEAP_TEST
- }
- #endif
- }
- else {
- ssl->heap = ctx->heap;
- }
-#else
- ssl->heap = ctx->heap; /* carry over user heap without static memory */
-#endif /* WOLFSSL_STATIC_MEMORY */
-
- ssl->buffers.inputBuffer.buffer = ssl->buffers.inputBuffer.staticBuffer;
- ssl->buffers.inputBuffer.bufferSize = STATIC_BUFFER_LEN;
-
- ssl->buffers.outputBuffer.buffer = ssl->buffers.outputBuffer.staticBuffer;
- ssl->buffers.outputBuffer.bufferSize = STATIC_BUFFER_LEN;
-
-#ifdef KEEP_PEER_CERT
- InitX509(&ssl->peerCert, 0, ssl->heap);
-#endif
-
- ssl->rfd = -1; /* set to invalid descriptor */
- ssl->wfd = -1;
- ssl->devId = ctx->devId; /* device for async HW (from wolfAsync_DevOpen) */
-
- ssl->IOCB_ReadCtx = &ssl->rfd; /* prevent invalid pointer access if not */
- ssl->IOCB_WriteCtx = &ssl->wfd; /* correctly set */
-
-#ifdef HAVE_NETX
- ssl->IOCB_ReadCtx = &ssl->nxCtx; /* default NetX IO ctx, same for read */
- ssl->IOCB_WriteCtx = &ssl->nxCtx; /* and write */
-#elif defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP)
- ssl->mnCtx = mynewt_ctx_new();
- if(!ssl->mnCtx) {
- return MEMORY_E;
- }
- ssl->IOCB_ReadCtx = ssl->mnCtx; /* default Mynewt IO ctx, same for read */
- ssl->IOCB_WriteCtx = ssl->mnCtx; /* and write */
-#elif defined (WOLFSSL_GNRC)
- ssl->IOCB_ReadCtx = ssl->gnrcCtx;
- ssl->IOCB_WriteCtx = ssl->gnrcCtx;
-#endif
- /* initialize states */
- ssl->options.serverState = NULL_STATE;
- ssl->options.clientState = NULL_STATE;
- ssl->options.connectState = CONNECT_BEGIN;
- ssl->options.acceptState = ACCEPT_BEGIN;
- ssl->options.handShakeState = NULL_STATE;
- ssl->options.processReply = doProcessInit;
- ssl->options.asyncState = TLS_ASYNC_BEGIN;
- ssl->options.buildMsgState = BUILD_MSG_BEGIN;
- ssl->encrypt.state = CIPHER_STATE_BEGIN;
- ssl->decrypt.state = CIPHER_STATE_BEGIN;
-#ifndef NO_DH
- #if !defined(WOLFSSL_OLD_PRIME_CHECK) && !defined(HAVE_FIPS) && \
- !defined(HAVE_SELFTEST)
- ssl->options.dhDoKeyTest = 1;
- #endif
-#endif
-
-#ifdef WOLFSSL_DTLS
- #ifdef WOLFSSL_SCTP
- ssl->options.dtlsSctp = ctx->dtlsSctp;
- #endif
- #if defined(WOLFSSL_SCTP) || defined(WOLFSSL_DTLS_MTU)
- ssl->dtlsMtuSz = ctx->dtlsMtuSz;
- ssl->dtls_expected_rx = ssl->dtlsMtuSz;
- #else
- ssl->dtls_expected_rx = MAX_MTU;
- #endif
- ssl->dtls_timeout_init = DTLS_TIMEOUT_INIT;
- ssl->dtls_timeout_max = DTLS_TIMEOUT_MAX;
- ssl->dtls_timeout = ssl->dtls_timeout_init;
- ssl->buffers.dtlsCtx.rfd = -1;
- ssl->buffers.dtlsCtx.wfd = -1;
-#endif
-
-#ifndef WOLFSSL_AEAD_ONLY
- #ifndef NO_OLD_TLS
- ssl->hmac = SSL_hmac; /* default to SSLv3 */
- #elif !defined(WOLFSSL_NO_TLS12)
- ssl->hmac = TLS_hmac;
- #endif
-#endif
-
-
- ssl->cipher.ssl = ssl;
-
-#ifdef HAVE_EXTENDED_MASTER
- ssl->options.haveEMS = ctx->haveEMS;
-#endif
- ssl->options.useClientOrder = ctx->useClientOrder;
- ssl->options.mutualAuth = ctx->mutualAuth;
-
-#ifdef WOLFSSL_STATIC_EPHEMERAL
- ssl->staticKE = ctx->staticKE;
-#endif
-
-#ifdef WOLFSSL_TLS13
- #ifdef HAVE_SESSION_TICKET
- ssl->options.noTicketTls13 = ctx->noTicketTls13;
- #endif
- ssl->options.noPskDheKe = ctx->noPskDheKe;
- #if defined(WOLFSSL_POST_HANDSHAKE_AUTH)
- ssl->options.postHandshakeAuth = ctx->postHandshakeAuth;
- #endif
-
- if (ctx->numGroups > 0) {
- XMEMCPY(ssl->group, ctx->group, sizeof(*ctx->group) * ctx->numGroups);
- ssl->numGroups = ctx->numGroups;
- }
-#endif
-
-#ifdef HAVE_TLS_EXTENSIONS
-#ifdef HAVE_MAX_FRAGMENT
- ssl->max_fragment = MAX_RECORD_SIZE;
-#endif
-#ifdef HAVE_ALPN
- ssl->alpn_client_list = NULL;
- #if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
- ssl->alpnSelect = ctx->alpnSelect;
- ssl->alpnSelectArg = ctx->alpnSelectArg;
- #endif
-#endif
-#ifdef HAVE_SUPPORTED_CURVES
- ssl->options.userCurves = ctx->userCurves;
-#endif
-#endif /* HAVE_TLS_EXTENSIONS */
-
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- ssl->options.disallowEncThenMac = ctx->disallowEncThenMac;
-#endif
-
- /* default alert state (none) */
- ssl->alert_history.last_rx.code = -1;
- ssl->alert_history.last_rx.level = -1;
- ssl->alert_history.last_tx.code = -1;
- ssl->alert_history.last_tx.level = -1;
-
-#ifdef OPENSSL_EXTRA
- /* copy over application session context ID */
- ssl->sessionCtxSz = ctx->sessionCtxSz;
- XMEMCPY(ssl->sessionCtx, ctx->sessionCtx, ctx->sessionCtxSz);
- ssl->cbioFlag = ctx->cbioFlag;
-
-#endif
-
- InitCiphers(ssl);
- InitCipherSpecs(&ssl->specs);
-
- /* all done with init, now can return errors, call other stuff */
-
- if (!writeDup) {
- /* arrays */
- ssl->arrays = (Arrays*)XMALLOC(sizeof(Arrays), ssl->heap,
- DYNAMIC_TYPE_ARRAYS);
- if (ssl->arrays == NULL) {
- WOLFSSL_MSG("Arrays Memory error");
- return MEMORY_E;
- }
- XMEMSET(ssl->arrays, 0, sizeof(Arrays));
-#if defined(WOLFSSL_TLS13) || defined(WOLFSSL_SNIFFER)
- ssl->arrays->preMasterSz = ENCRYPT_LEN;
- ssl->arrays->preMasterSecret = (byte*)XMALLOC(ENCRYPT_LEN, ssl->heap,
- DYNAMIC_TYPE_SECRET);
- if (ssl->arrays->preMasterSecret == NULL) {
- return MEMORY_E;
- }
- XMEMSET(ssl->arrays->preMasterSecret, 0, ENCRYPT_LEN);
-#endif
-
-#ifdef OPENSSL_EXTRA
- if ((ssl->param = (WOLFSSL_X509_VERIFY_PARAM*)XMALLOC(
- sizeof(WOLFSSL_X509_VERIFY_PARAM),
- ssl->heap, DYNAMIC_TYPE_OPENSSL)) == NULL) {
- WOLFSSL_MSG("ssl->param memory error");
- return MEMORY_E;
- }
- XMEMSET(ssl->param, 0, sizeof(WOLFSSL_X509_VERIFY_PARAM));
-#endif
-
-#ifdef SINGLE_THREADED
- if (ctx->suites == NULL)
-#endif
- {
- /* suites */
- ssl->suites = (Suites*)XMALLOC(sizeof(Suites), ssl->heap,
- DYNAMIC_TYPE_SUITES);
- if (ssl->suites == NULL) {
- WOLFSSL_MSG("Suites Memory error");
- return MEMORY_E;
- }
- #ifdef OPENSSL_ALL
- ssl->suites->stack = NULL;
- #endif
-#ifdef SINGLE_THREADED
- ssl->options.ownSuites = 1;
-#endif
- }
-#ifdef SINGLE_THREADED
- else {
- ssl->options.ownSuites = 0;
- }
-#endif
- }
-
- /* Initialize SSL with the appropriate fields from it's ctx */
- /* requires valid arrays and suites unless writeDup ing */
- if ((ret = SetSSL_CTX(ssl, ctx, writeDup)) != WOLFSSL_SUCCESS)
- return ret;
-
- ssl->options.dtls = ssl->version.major == DTLS_MAJOR;
-
-#ifdef SINGLE_THREADED
- ssl->rng = ctx->rng; /* CTX may have one, if so use it */
-#endif
-
- if (ssl->rng == NULL) {
- /* RNG */
- ssl->rng = (WC_RNG*)XMALLOC(sizeof(WC_RNG), ssl->heap,DYNAMIC_TYPE_RNG);
- if (ssl->rng == NULL) {
- WOLFSSL_MSG("RNG Memory error");
- return MEMORY_E;
- }
- XMEMSET(ssl->rng, 0, sizeof(WC_RNG));
- ssl->options.weOwnRng = 1;
-
- /* FIPS RNG API does not accept a heap hint */
-#ifndef HAVE_FIPS
- if ( (ret = wc_InitRng_ex(ssl->rng, ssl->heap, ssl->devId)) != 0) {
- WOLFSSL_MSG("RNG Init error");
- return ret;
- }
-#else
- if ( (ret = wc_InitRng(ssl->rng)) != 0) {
- WOLFSSL_MSG("RNG Init error");
- return ret;
- }
-#endif
- }
-
-#ifdef HAVE_WRITE_DUP
- if (writeDup) {
- /* all done */
- return 0;
- }
-#endif
-
- /* hsHashes */
- ret = InitHandshakeHashes(ssl);
- if (ret != 0)
- return ret;
-
-#if defined(WOLFSSL_DTLS) && !defined(NO_WOLFSSL_SERVER)
- if (ssl->options.dtls && ssl->options.side == WOLFSSL_SERVER_END) {
- ret = wolfSSL_DTLS_SetCookieSecret(ssl, NULL, 0);
- if (ret != 0) {
- WOLFSSL_MSG("DTLS Cookie Secret error");
- return ret;
- }
- }
-#endif /* WOLFSSL_DTLS && !NO_WOLFSSL_SERVER */
-
-#ifdef HAVE_SECRET_CALLBACK
- ssl->sessionSecretCb = NULL;
- ssl->sessionSecretCtx = NULL;
-#ifdef WOLFSSL_TLS13
- ssl->tls13SecretCb = NULL;
- ssl->tls13SecretCtx = NULL;
-#endif
-#endif
-
-#ifdef HAVE_SESSION_TICKET
- ssl->session.ticket = ssl->session.staticTicket;
-#endif
-
-#ifdef WOLFSSL_MULTICAST
- if (ctx->haveMcast) {
- int i;
-
- ssl->options.haveMcast = 1;
- ssl->options.mcastID = ctx->mcastID;
-
- /* Force the state to look like handshake has completed. */
- /* Keying material is supplied externally. */
- ssl->options.serverState = SERVER_FINISHED_COMPLETE;
- ssl->options.clientState = CLIENT_FINISHED_COMPLETE;
- ssl->options.connectState = SECOND_REPLY_DONE;
- ssl->options.acceptState = ACCEPT_THIRD_REPLY_DONE;
- ssl->options.handShakeState = HANDSHAKE_DONE;
- ssl->options.handShakeDone = 1;
-
- for (i = 0; i < WOLFSSL_DTLS_PEERSEQ_SZ; i++)
- ssl->keys.peerSeq[i].peerId = INVALID_PEER_ID;
- }
-#endif
-
-#ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- int useSecureReneg = ssl->ctx->useSecureReneg;
- /* use secure renegotiation by default (not recommend) */
- #ifdef WOLFSSL_SECURE_RENEGOTIATION_ON_BY_DEFAULT
- useSecureReneg = 1;
- #endif
- if (useSecureReneg) {
- ret = wolfSSL_UseSecureRenegotiation(ssl);
- if (ret != WOLFSSL_SUCCESS)
- return ret;
- }
- }
-#endif /* HAVE_SECURE_RENEGOTIATION */
-
- return 0;
-}
-
-
-/* free use of temporary arrays */
-void FreeArrays(WOLFSSL* ssl, int keep)
-{
- if (ssl->arrays) {
- if (keep) {
- /* keeps session id for user retrieval */
- XMEMCPY(ssl->session.sessionID, ssl->arrays->sessionID, ID_LEN);
- ssl->session.sessionIDSz = ssl->arrays->sessionIDSz;
- }
- if (ssl->arrays->preMasterSecret) {
- XFREE(ssl->arrays->preMasterSecret, ssl->heap, DYNAMIC_TYPE_SECRET);
- ssl->arrays->preMasterSecret = NULL;
- }
- XFREE(ssl->arrays->pendingMsg, ssl->heap, DYNAMIC_TYPE_ARRAYS);
- ssl->arrays->pendingMsg = NULL;
- ForceZero(ssl->arrays, sizeof(Arrays)); /* clear arrays struct */
- }
- XFREE(ssl->arrays, ssl->heap, DYNAMIC_TYPE_ARRAYS);
- ssl->arrays = NULL;
-}
-
-void FreeKey(WOLFSSL* ssl, int type, void** pKey)
-{
- if (ssl && pKey && *pKey) {
- switch (type) {
- #ifndef NO_RSA
- case DYNAMIC_TYPE_RSA:
- wc_FreeRsaKey((RsaKey*)*pKey);
- break;
- #endif /* ! NO_RSA */
- #ifdef HAVE_ECC
- case DYNAMIC_TYPE_ECC:
- wc_ecc_free((ecc_key*)*pKey);
- break;
- #endif /* HAVE_ECC */
- #ifdef HAVE_ED25519
- case DYNAMIC_TYPE_ED25519:
- wc_ed25519_free((ed25519_key*)*pKey);
- break;
- #endif /* HAVE_ED25519 */
- #ifdef HAVE_CURVE25519
- case DYNAMIC_TYPE_CURVE25519:
- wc_curve25519_free((curve25519_key*)*pKey);
- break;
- #endif /* HAVE_CURVE25519 */
- #ifdef HAVE_ED448
- case DYNAMIC_TYPE_ED448:
- wc_ed448_free((ed448_key*)*pKey);
- break;
- #endif /* HAVE_ED448 */
- #ifdef HAVE_CURVE448
- case DYNAMIC_TYPE_CURVE448:
- wc_curve448_free((curve448_key*)*pKey);
- break;
- #endif /* HAVE_CURVE448 */
- #ifndef NO_DH
- case DYNAMIC_TYPE_DH:
- wc_FreeDhKey((DhKey*)*pKey);
- break;
- #endif /* !NO_DH */
- default:
- break;
- }
- XFREE(*pKey, ssl->heap, type);
-
- /* Reset pointer */
- *pKey = NULL;
- }
-}
-
-int AllocKey(WOLFSSL* ssl, int type, void** pKey)
-{
- int ret = BAD_FUNC_ARG;
- int sz = 0;
-
- if (ssl == NULL || pKey == NULL) {
- return BAD_FUNC_ARG;
- }
-
- /* Sanity check key destination */
- if (*pKey != NULL) {
- WOLFSSL_MSG("Key already present!");
- return BAD_STATE_E;
- }
-
- /* Determine size */
- switch (type) {
- #ifndef NO_RSA
- case DYNAMIC_TYPE_RSA:
- sz = sizeof(RsaKey);
- break;
- #endif /* ! NO_RSA */
- #ifdef HAVE_ECC
- case DYNAMIC_TYPE_ECC:
- sz = sizeof(ecc_key);
- break;
- #endif /* HAVE_ECC */
- #ifdef HAVE_ED25519
- case DYNAMIC_TYPE_ED25519:
- sz = sizeof(ed25519_key);
- break;
- #endif /* HAVE_ED25519 */
- #ifdef HAVE_CURVE25519
- case DYNAMIC_TYPE_CURVE25519:
- sz = sizeof(curve25519_key);
- break;
- #endif /* HAVE_CURVE25519 */
- #ifdef HAVE_ED448
- case DYNAMIC_TYPE_ED448:
- sz = sizeof(ed448_key);
- break;
- #endif /* HAVE_ED448 */
- #ifdef HAVE_CURVE448
- case DYNAMIC_TYPE_CURVE448:
- sz = sizeof(curve448_key);
- break;
- #endif /* HAVE_CURVE448 */
- #ifndef NO_DH
- case DYNAMIC_TYPE_DH:
- sz = sizeof(DhKey);
- break;
- #endif /* !NO_DH */
- default:
- return BAD_FUNC_ARG;
- }
-
- if (sz == 0) {
- return NOT_COMPILED_IN;
- }
-
- /* Allocate memory for key */
- *pKey = XMALLOC(sz, ssl->heap, type);
- if (*pKey == NULL) {
- return MEMORY_E;
- }
-
- /* Initialize key */
- switch (type) {
- #ifndef NO_RSA
- case DYNAMIC_TYPE_RSA:
- ret = wc_InitRsaKey_ex((RsaKey*)*pKey, ssl->heap, ssl->devId);
- break;
- #endif /* ! NO_RSA */
- #ifdef HAVE_ECC
- case DYNAMIC_TYPE_ECC:
- ret = wc_ecc_init_ex((ecc_key*)*pKey, ssl->heap, ssl->devId);
- break;
- #endif /* HAVE_ECC */
- #ifdef HAVE_ED25519
- case DYNAMIC_TYPE_ED25519:
- wc_ed25519_init((ed25519_key*)*pKey);
- ret = 0;
- break;
- #endif /* HAVE_CURVE25519 */
- #ifdef HAVE_CURVE25519
- case DYNAMIC_TYPE_CURVE25519:
- wc_curve25519_init((curve25519_key*)*pKey);
- ret = 0;
- break;
- #endif /* HAVE_CURVE25519 */
- #ifdef HAVE_ED448
- case DYNAMIC_TYPE_ED448:
- wc_ed448_init((ed448_key*)*pKey);
- ret = 0;
- break;
- #endif /* HAVE_CURVE448 */
- #ifdef HAVE_CURVE448
- case DYNAMIC_TYPE_CURVE448:
- wc_curve448_init((curve448_key*)*pKey);
- ret = 0;
- break;
- #endif /* HAVE_CURVE448 */
- #ifndef NO_DH
- case DYNAMIC_TYPE_DH:
- ret = wc_InitDhKey_ex((DhKey*)*pKey, ssl->heap, ssl->devId);
- break;
- #endif /* !NO_DH */
- default:
- return BAD_FUNC_ARG;
- }
-
- /* On error free handshake key */
- if (ret != 0) {
- FreeKey(ssl, type, pKey);
- }
-
- return ret;
-}
-
-#if !defined(NO_RSA) || defined(HAVE_ECC) || defined(HAVE_ED25519) || \
- defined(HAVE_CURVE25519) || defined(HHAVE_ED448) || defined(HAVE_CURVE448)
-static int ReuseKey(WOLFSSL* ssl, int type, void* pKey)
-{
- int ret = 0;
-
- (void)ssl;
-
- switch (type) {
- #ifndef NO_RSA
- case DYNAMIC_TYPE_RSA:
- wc_FreeRsaKey((RsaKey*)pKey);
- ret = wc_InitRsaKey_ex((RsaKey*)pKey, ssl->heap, ssl->devId);
- break;
- #endif /* ! NO_RSA */
- #ifdef HAVE_ECC
- case DYNAMIC_TYPE_ECC:
- wc_ecc_free((ecc_key*)pKey);
- ret = wc_ecc_init_ex((ecc_key*)pKey, ssl->heap, ssl->devId);
- break;
- #endif /* HAVE_ECC */
- #ifdef HAVE_ED25519
- case DYNAMIC_TYPE_ED25519:
- wc_ed25519_free((ed25519_key*)pKey);
- ret = wc_ed25519_init((ed25519_key*)pKey);
- break;
- #endif /* HAVE_CURVE25519 */
- #ifdef HAVE_CURVE25519
- case DYNAMIC_TYPE_CURVE25519:
- wc_curve25519_free((curve25519_key*)pKey);
- ret = wc_curve25519_init((curve25519_key*)pKey);
- break;
- #endif /* HAVE_CURVE25519 */
- #ifdef HAVE_ED448
- case DYNAMIC_TYPE_ED448:
- wc_ed448_free((ed448_key*)pKey);
- ret = wc_ed448_init((ed448_key*)pKey);
- break;
- #endif /* HAVE_CURVE448 */
- #ifdef HAVE_CURVE448
- case DYNAMIC_TYPE_CURVE448:
- wc_curve448_free((curve448_key*)pKey);
- ret = wc_curve448_init((curve448_key*)pKey);
- break;
- #endif /* HAVE_CURVE448 */
- #ifndef NO_DH
- case DYNAMIC_TYPE_DH:
- wc_FreeDhKey((DhKey*)pKey);
- ret = wc_InitDhKey_ex((DhKey*)pKey, ssl->heap, ssl->devId);
- break;
- #endif /* !NO_DH */
- default:
- return BAD_FUNC_ARG;
- }
-
- return ret;
-}
-#endif
-
-void FreeKeyExchange(WOLFSSL* ssl)
-{
- /* Cleanup signature buffer */
- if (ssl->buffers.sig.buffer) {
- XFREE(ssl->buffers.sig.buffer, ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- ssl->buffers.sig.buffer = NULL;
- ssl->buffers.sig.length = 0;
- }
-
- /* Cleanup digest buffer */
- if (ssl->buffers.digest.buffer) {
- XFREE(ssl->buffers.digest.buffer, ssl->heap, DYNAMIC_TYPE_DIGEST);
- ssl->buffers.digest.buffer = NULL;
- ssl->buffers.digest.length = 0;
- }
-
- /* Free handshake key */
- FreeKey(ssl, ssl->hsType, &ssl->hsKey);
-
-#ifndef NO_DH
- /* Free temp DH key */
- FreeKey(ssl, DYNAMIC_TYPE_DH, (void**)&ssl->buffers.serverDH_Key);
-#endif
-
- /* Cleanup async */
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ssl->async.freeArgs) {
- ssl->async.freeArgs(ssl, ssl->async.args);
- ssl->async.freeArgs = NULL;
- }
- FreeBuildMsgArgs(ssl, &ssl->async.buildArgs);
-#endif
-}
-
-
-/* Free up all memory used by Suites structure from WOLFSSL */
-void FreeSuites(WOLFSSL* ssl)
-{
-#ifdef SINGLE_THREADED
- if (ssl->options.ownSuites)
-#endif
- {
- #ifdef OPENSSL_ALL
- wolfSSL_sk_SSL_CIPHER_free(ssl->suites->stack);
- #endif
- XFREE(ssl->suites, ssl->heap, DYNAMIC_TYPE_SUITES);
- }
- ssl->suites = NULL;
-}
-
-
-/* In case holding SSL object in array and don't want to free actual ssl */
-void SSL_ResourceFree(WOLFSSL* ssl)
-{
- /* Note: any resources used during the handshake should be released in the
- * function FreeHandshakeResources(). Be careful with the special cases
- * like the RNG which may optionally be kept for the whole session. (For
- * example with the RNG, it isn't used beyond the handshake except when
- * using stream ciphers where it is retained. */
-
- FreeCiphers(ssl);
- FreeArrays(ssl, 0);
- FreeKeyExchange(ssl);
- if (ssl->options.weOwnRng) {
- wc_FreeRng(ssl->rng);
- XFREE(ssl->rng, ssl->heap, DYNAMIC_TYPE_RNG);
- }
- FreeSuites(ssl);
- FreeHandshakeHashes(ssl);
- XFREE(ssl->buffers.domainName.buffer, ssl->heap, DYNAMIC_TYPE_DOMAIN);
-
- /* clear keys struct after session */
- ForceZero(&ssl->keys, sizeof(Keys));
-
-#ifdef WOLFSSL_TLS13
- if (ssl->options.tls1_3) {
- ForceZero(&ssl->clientSecret, sizeof(ssl->clientSecret));
- ForceZero(&ssl->serverSecret, sizeof(ssl->serverSecret));
- }
-#endif
-
-#ifndef NO_DH
- if (ssl->buffers.serverDH_Priv.buffer) {
- ForceZero(ssl->buffers.serverDH_Priv.buffer,
- ssl->buffers.serverDH_Priv.length);
- }
- XFREE(ssl->buffers.serverDH_Priv.buffer, ssl->heap, DYNAMIC_TYPE_PRIVATE_KEY);
- XFREE(ssl->buffers.serverDH_Pub.buffer, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- /* parameters (p,g) may be owned by ctx */
- if (ssl->buffers.weOwnDH) {
- XFREE(ssl->buffers.serverDH_G.buffer, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- XFREE(ssl->buffers.serverDH_P.buffer, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- }
-#endif /* !NO_DH */
-#ifndef NO_CERTS
- ssl->keepCert = 0; /* make sure certificate is free'd */
- wolfSSL_UnloadCertsKeys(ssl);
-#endif
-#ifndef NO_RSA
- FreeKey(ssl, DYNAMIC_TYPE_RSA, (void**)&ssl->peerRsaKey);
- ssl->peerRsaKeyPresent = 0;
-#endif
-#ifdef WOLFSSL_RENESAS_TSIP_TLS
- XFREE(ssl->peerTsipEncRsaKeyIndex, ssl->heap, DYNAMIC_TYPE_RSA);
-#endif
- if (ssl->buffers.inputBuffer.dynamicFlag)
- ShrinkInputBuffer(ssl, FORCED_FREE);
- if (ssl->buffers.outputBuffer.dynamicFlag)
- ShrinkOutputBuffer(ssl);
-#if defined(WOLFSSL_SEND_HRR_COOKIE) && !defined(NO_WOLFSSL_SERVER)
- XFREE(ssl->buffers.tls13CookieSecret.buffer, ssl->heap,
- DYNAMIC_TYPE_COOKIE_PWD);
-#endif
-#ifdef WOLFSSL_DTLS
- DtlsMsgPoolReset(ssl);
- if (ssl->dtls_rx_msg_list != NULL) {
- DtlsMsgListDelete(ssl->dtls_rx_msg_list, ssl->heap);
- ssl->dtls_rx_msg_list = NULL;
- ssl->dtls_rx_msg_list_sz = 0;
- }
- XFREE(ssl->buffers.dtlsCtx.peer.sa, ssl->heap, DYNAMIC_TYPE_SOCKADDR);
- ssl->buffers.dtlsCtx.peer.sa = NULL;
-#ifndef NO_WOLFSSL_SERVER
- XFREE(ssl->buffers.dtlsCookieSecret.buffer, ssl->heap,
- DYNAMIC_TYPE_COOKIE_PWD);
-#endif
-#endif /* WOLFSSL_DTLS */
-#ifdef OPENSSL_EXTRA
- if (ssl->biord != ssl->biowr) /* only free write if different */
- wolfSSL_BIO_free(ssl->biowr);
- wolfSSL_BIO_free(ssl->biord); /* always free read bio */
- ssl->biowr = NULL;
- ssl->biord = NULL;
-#endif
-#ifdef HAVE_LIBZ
- FreeStreams(ssl);
-#endif
-#ifdef HAVE_ECC
- FreeKey(ssl, DYNAMIC_TYPE_ECC, (void**)&ssl->peerEccKey);
- ssl->peerEccKeyPresent = 0;
- FreeKey(ssl, DYNAMIC_TYPE_ECC, (void**)&ssl->peerEccDsaKey);
- ssl->peerEccDsaKeyPresent = 0;
-#endif
-#if defined(HAVE_ECC) || defined(HAVE_CURVE25519) ||defined(HAVE_CURVE448)
- {
- int dtype = 0;
- #ifdef HAVE_ECC
- dtype = DYNAMIC_TYPE_ECC;
- #endif
- #ifdef HAVE_CURVE25519
- if (ssl->peerX25519KeyPresent
- #ifdef HAVE_ECC
- || ssl->eccTempKeyPresent == DYNAMIC_TYPE_CURVE25519
- #endif /* HAVE_ECC */
- )
- {
- dtype = DYNAMIC_TYPE_CURVE25519;
- }
- #endif /* HAVE_CURVE25519 */
- #ifdef HAVE_CURVE448
- if (ssl->peerX448KeyPresent
- #ifdef HAVE_ECC
- || ssl->eccTempKeyPresent == DYNAMIC_TYPE_CURVE448
- #endif /* HAVE_ECC */
- )
- {
- dtype = DYNAMIC_TYPE_CURVE448;
- }
- #endif /* HAVE_CURVE448 */
- FreeKey(ssl, dtype, (void**)&ssl->eccTempKey);
- ssl->eccTempKeyPresent = 0;
- }
-#endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-#ifdef HAVE_CURVE25519
- FreeKey(ssl, DYNAMIC_TYPE_CURVE25519, (void**)&ssl->peerX25519Key);
- ssl->peerX25519KeyPresent = 0;
-#endif
-#ifdef HAVE_ED25519
- FreeKey(ssl, DYNAMIC_TYPE_ED25519, (void**)&ssl->peerEd25519Key);
- ssl->peerEd25519KeyPresent = 0;
- #ifdef HAVE_PK_CALLBACKS
- if (ssl->buffers.peerEd25519Key.buffer != NULL) {
- XFREE(ssl->buffers.peerEd25519Key.buffer, ssl->heap,
- DYNAMIC_TYPE_ED25519);
- ssl->buffers.peerEd25519Key.buffer = NULL;
- }
- #endif
-#endif
-#ifdef HAVE_CURVE448
- FreeKey(ssl, DYNAMIC_TYPE_CURVE448, (void**)&ssl->peerX448Key);
- ssl->peerX448KeyPresent = 0;
-#endif
-#ifdef HAVE_ED448
- FreeKey(ssl, DYNAMIC_TYPE_ED448, (void**)&ssl->peerEd448Key);
- ssl->peerEd448KeyPresent = 0;
- #ifdef HAVE_PK_CALLBACKS
- if (ssl->buffers.peerEd448Key.buffer != NULL) {
- XFREE(ssl->buffers.peerEd448Key.buffer, ssl->heap,
- DYNAMIC_TYPE_ED448);
- ssl->buffers.peerEd448Key.buffer = NULL;
- }
- #endif
-#endif
-#ifdef HAVE_PK_CALLBACKS
- #ifdef HAVE_ECC
- XFREE(ssl->buffers.peerEccDsaKey.buffer, ssl->heap, DYNAMIC_TYPE_ECC);
- #endif /* HAVE_ECC */
- #ifndef NO_RSA
- XFREE(ssl->buffers.peerRsaKey.buffer, ssl->heap, DYNAMIC_TYPE_RSA);
- #endif /* NO_RSA */
-#endif /* HAVE_PK_CALLBACKS */
-#ifdef HAVE_TLS_EXTENSIONS
- TLSX_FreeAll(ssl->extensions, ssl->heap);
-
-#ifdef HAVE_ALPN
- if (ssl->alpn_client_list != NULL) {
- XFREE(ssl->alpn_client_list, ssl->heap, DYNAMIC_TYPE_ALPN);
- ssl->alpn_client_list = NULL;
- }
-#endif
-#endif /* HAVE_TLS_EXTENSIONS */
-#if defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP)
- if (ssl->mnCtx) {
- mynewt_ctx_clear(ssl->mnCtx);
- ssl->mnCtx = NULL;
- }
-#endif
-#ifdef HAVE_NETX
- if (ssl->nxCtx.nxPacket)
- nx_packet_release(ssl->nxCtx.nxPacket);
-#endif
-#ifdef KEEP_PEER_CERT
- FreeX509(&ssl->peerCert);
-#endif
-
-#ifdef HAVE_SESSION_TICKET
- if (ssl->session.isDynamic) {
- XFREE(ssl->session.ticket, ssl->heap, DYNAMIC_TYPE_SESSION_TICK);
- ssl->session.ticket = ssl->session.staticTicket;
- ssl->session.isDynamic = 0;
- ssl->session.ticketLen = 0;
- }
-#endif
-#ifdef HAVE_EXT_CACHE
- wolfSSL_SESSION_free(ssl->extSession);
-#endif
-#ifdef HAVE_WRITE_DUP
- if (ssl->dupWrite) {
- FreeWriteDup(ssl);
- }
-#endif
-#ifdef OPENSSL_EXTRA
- if (ssl->param) {
- XFREE(ssl->param, ssl->heap, DYNAMIC_TYPE_OPENSSL);
- }
-#endif
-#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH)
- while (ssl->certReqCtx != NULL) {
- CertReqCtx* curr = ssl->certReqCtx;
- ssl->certReqCtx = curr->next;
- XFREE(curr, ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
- }
-#endif
-#ifdef WOLFSSL_STATIC_EPHEMERAL
- if (ssl->staticKE.key != NULL && ssl->staticKE.key != ssl->ctx->staticKE.key) {
- FreeDer(&ssl->staticKE.key);
- }
-#endif
-
-#ifdef WOLFSSL_STATIC_MEMORY
- /* check if using fixed io buffers and free them */
- if (ssl->heap != NULL) {
- #ifdef WOLFSSL_HEAP_TEST
- /* avoid dereferencing a test value */
- if (ssl->heap != (void*)WOLFSSL_HEAP_TEST) {
- #endif
- WOLFSSL_HEAP_HINT* ssl_hint = (WOLFSSL_HEAP_HINT*)ssl->heap;
- WOLFSSL_HEAP* ctx_heap;
- void* heap = ssl->ctx ? ssl->ctx->heap : ssl->heap;
-
- ctx_heap = ssl_hint->memory;
- if (wc_LockMutex(&(ctx_heap->memory_mutex)) != 0) {
- WOLFSSL_MSG("Bad memory_mutex lock");
- }
- ctx_heap->curIO--;
- if (FreeFixedIO(ctx_heap, &(ssl_hint->outBuf)) != 1) {
- WOLFSSL_MSG("Error freeing fixed output buffer");
- }
- if (FreeFixedIO(ctx_heap, &(ssl_hint->inBuf)) != 1) {
- WOLFSSL_MSG("Error freeing fixed output buffer");
- }
- if (ssl_hint->haFlag) { /* check if handshake count has been decreased*/
- ctx_heap->curHa--;
- }
- wc_UnLockMutex(&(ctx_heap->memory_mutex));
-
- /* check if tracking stats */
- if (ctx_heap->flag & WOLFMEM_TRACK_STATS) {
- XFREE(ssl_hint->stats, heap, DYNAMIC_TYPE_SSL);
- }
- XFREE(ssl->heap, heap, DYNAMIC_TYPE_SSL);
- #ifdef WOLFSSL_HEAP_TEST
- }
- #endif
- }
-#endif /* WOLFSSL_STATIC_MEMORY */
-#if defined(OPENSSL_ALL) || defined(WOLFSSL_QT)
- wolfSSL_sk_CIPHER_free(ssl->supportedCiphers);
- wolfSSL_sk_X509_free(ssl->peerCertChain);
-#endif
-}
-
-/* Free any handshake resources no longer needed */
-void FreeHandshakeResources(WOLFSSL* ssl)
-{
-
-#ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation && ssl->secure_renegotiation->enabled) {
- WOLFSSL_MSG("Secure Renegotiation needs to retain handshake resources");
- return;
- }
-#endif
-
- /* input buffer */
- if (ssl->buffers.inputBuffer.dynamicFlag)
- ShrinkInputBuffer(ssl, NO_FORCED_FREE);
-
-#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH)
- if (!ssl->options.tls1_3)
-#endif
- {
- #ifndef OPENSSL_ALL
- /* free suites unless using compatibility layer */
- FreeSuites(ssl);
- #endif
- /* hsHashes */
- FreeHandshakeHashes(ssl);
- }
-
- /* RNG */
- if (ssl->options.tls1_1 == 0
-#ifndef WOLFSSL_AEAD_ONLY
- || ssl->specs.cipher_type == stream
-#endif
-#if defined(WOLFSSL_TLS13)
- #if !defined(WOLFSSL_POST_HANDSHAKE_AUTH)
- || ssl->options.tls1_3
- #elif !defined(HAVE_SESSION_TICKET)
- || (ssl->options.tls1_3 && ssl->options.side == WOLFSSL_SERVER_END)
- #endif
-#endif
- ) {
- if (ssl->options.weOwnRng) {
- wc_FreeRng(ssl->rng);
- XFREE(ssl->rng, ssl->heap, DYNAMIC_TYPE_RNG);
- ssl->rng = NULL;
- ssl->options.weOwnRng = 0;
- }
- }
-
-#ifdef WOLFSSL_DTLS
- /* DTLS_POOL */
- if (ssl->options.dtls) {
- DtlsMsgPoolReset(ssl);
- DtlsMsgListDelete(ssl->dtls_rx_msg_list, ssl->heap);
- ssl->dtls_rx_msg_list = NULL;
- ssl->dtls_rx_msg_list_sz = 0;
- }
-#endif
-
-#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH) && \
- defined(HAVE_SESSION_TICKET)
- if (!ssl->options.tls1_3)
-#endif
- /* arrays */
- if (ssl->options.saveArrays == 0)
- FreeArrays(ssl, 1);
-
-#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH)
- if (!ssl->options.tls1_3 || ssl->options.side == WOLFSSL_CLIENT_END)
-#endif
- {
-#ifndef NO_RSA
- /* peerRsaKey */
- FreeKey(ssl, DYNAMIC_TYPE_RSA, (void**)&ssl->peerRsaKey);
- ssl->peerRsaKeyPresent = 0;
-#endif
-#ifdef HAVE_ECC
- FreeKey(ssl, DYNAMIC_TYPE_ECC, (void**)&ssl->peerEccDsaKey);
- ssl->peerEccDsaKeyPresent = 0;
-#endif /* HAVE_ECC */
-#ifdef HAVE_ED25519
- FreeKey(ssl, DYNAMIC_TYPE_ED25519, (void**)&ssl->peerEd25519Key);
- ssl->peerEd25519KeyPresent = 0;
-#endif /* HAVE_ED25519 */
-#ifdef HAVE_ED448
- FreeKey(ssl, DYNAMIC_TYPE_ED448, (void**)&ssl->peerEd448Key);
- ssl->peerEd448KeyPresent = 0;
-#endif /* HAVE_ED448 */
- }
-
-#ifdef HAVE_ECC
- FreeKey(ssl, DYNAMIC_TYPE_ECC, (void**)&ssl->peerEccKey);
- ssl->peerEccKeyPresent = 0;
-#endif
-#if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
- {
- int dtype;
- #ifdef HAVE_ECC
- dtype = DYNAMIC_TYPE_ECC;
- #endif
- #ifdef HAVE_CURVE25519
- #ifdef HAVE_ECC
- if (ssl->peerX25519KeyPresent ||
- ssl->eccTempKeyPresent == DYNAMIC_TYPE_CURVE25519)
- #endif /* HAVE_ECC */
- {
- dtype = DYNAMIC_TYPE_CURVE25519;
- }
- #endif /* HAVE_CURVE25519 */
- #ifdef HAVE_CURVE448
- #ifdef HAVE_ECC
- if (ssl->peerX448KeyPresent ||
- ssl->eccTempKeyPresent == DYNAMIC_TYPE_CURVE448)
- #endif /* HAVE_ECC */
- {
- dtype = DYNAMIC_TYPE_CURVE448;
- }
- #endif /* HAVE_CURVE448 */
- FreeKey(ssl, dtype, (void**)&ssl->eccTempKey);
- ssl->eccTempKeyPresent = 0;
- }
-#endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-#ifdef HAVE_CURVE25519
- FreeKey(ssl, DYNAMIC_TYPE_CURVE25519, (void**)&ssl->peerX25519Key);
- ssl->peerX25519KeyPresent = 0;
-#endif
-#ifdef HAVE_CURVE448
- FreeKey(ssl, DYNAMIC_TYPE_CURVE448, (void**)&ssl->peerX448Key);
- ssl->peerX448KeyPresent = 0;
-#endif
-
-#ifndef NO_DH
- if (ssl->buffers.serverDH_Priv.buffer) {
- ForceZero(ssl->buffers.serverDH_Priv.buffer,
- ssl->buffers.serverDH_Priv.length);
- }
- XFREE(ssl->buffers.serverDH_Priv.buffer, ssl->heap, DYNAMIC_TYPE_PRIVATE_KEY);
- ssl->buffers.serverDH_Priv.buffer = NULL;
- XFREE(ssl->buffers.serverDH_Pub.buffer, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- ssl->buffers.serverDH_Pub.buffer = NULL;
- /* parameters (p,g) may be owned by ctx */
- if (ssl->buffers.weOwnDH) {
- XFREE(ssl->buffers.serverDH_G.buffer, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- ssl->buffers.serverDH_G.buffer = NULL;
- XFREE(ssl->buffers.serverDH_P.buffer, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- ssl->buffers.serverDH_P.buffer = NULL;
- }
-#endif /* !NO_DH */
-
-#ifndef NO_CERTS
- wolfSSL_UnloadCertsKeys(ssl);
-#endif
-#ifdef HAVE_PK_CALLBACKS
-#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH)
- if (!ssl->options.tls1_3 || ssl->options.side == WOLFSSL_CLIENT_END)
-#endif
- {
- #ifdef HAVE_ECC
- XFREE(ssl->buffers.peerEccDsaKey.buffer, ssl->heap, DYNAMIC_TYPE_ECC);
- ssl->buffers.peerEccDsaKey.buffer = NULL;
- #endif /* HAVE_ECC */
- #ifndef NO_RSA
- XFREE(ssl->buffers.peerRsaKey.buffer, ssl->heap, DYNAMIC_TYPE_RSA);
- ssl->buffers.peerRsaKey.buffer = NULL;
- #endif /* NO_RSA */
- #ifdef HAVE_ED25519
- XFREE(ssl->buffers.peerEd25519Key.buffer, ssl->heap,
- DYNAMIC_TYPE_ED25519);
- ssl->buffers.peerEd25519Key.buffer = NULL;
- #endif
- #ifdef HAVE_ED448
- XFREE(ssl->buffers.peerEd448Key.buffer, ssl->heap, DYNAMIC_TYPE_ED448);
- ssl->buffers.peerEd448Key.buffer = NULL;
- #endif
- }
-#endif /* HAVE_PK_CALLBACKS */
-
-#ifdef HAVE_QSH
- QSH_FreeAll(ssl);
-#endif
-
-#ifdef HAVE_SESSION_TICKET
- if (ssl->session.isDynamic) {
- XFREE(ssl->session.ticket, ssl->heap, DYNAMIC_TYPE_SESSION_TICK);
- ssl->session.ticket = ssl->session.staticTicket;
- ssl->session.isDynamic = 0;
- ssl->session.ticketLen = 0;
- }
-#endif
-
-#if defined(HAVE_TLS_EXTENSIONS) && !defined(HAVE_SNI) && \
- !defined(HAVE_ALPN) && !defined(WOLFSSL_POST_HANDSHAKE_AUTH)
- /* Some extensions need to be kept for post-handshake querying. */
- TLSX_FreeAll(ssl->extensions, ssl->heap);
- ssl->extensions = NULL;
-#endif
-
-#ifdef WOLFSSL_STATIC_MEMORY
- /* when done with handshake decrement current handshake count */
- if (ssl->heap != NULL) {
- #ifdef WOLFSSL_HEAP_TEST
- /* avoid dereferencing a test value */
- if (ssl->heap != (void*)WOLFSSL_HEAP_TEST) {
- #endif
- WOLFSSL_HEAP_HINT* ssl_hint = (WOLFSSL_HEAP_HINT*)ssl->heap;
- WOLFSSL_HEAP* ctx_heap;
-
- ctx_heap = ssl_hint->memory;
- if (wc_LockMutex(&(ctx_heap->memory_mutex)) != 0) {
- WOLFSSL_MSG("Bad memory_mutex lock");
- }
- ctx_heap->curHa--;
- ssl_hint->haFlag = 0; /* set to zero since handshake has been dec */
- wc_UnLockMutex(&(ctx_heap->memory_mutex));
- #ifdef WOLFSSL_HEAP_TEST
- }
- #endif
- }
-#endif /* WOLFSSL_STATIC_MEMORY */
-}
-
-
-/* heap argument is the heap hint used when creating SSL */
-void FreeSSL(WOLFSSL* ssl, void* heap)
-{
- if (ssl->ctx) {
- FreeSSL_Ctx(ssl->ctx); /* will decrement and free underlying CTX if 0 */
- }
- SSL_ResourceFree(ssl);
- XFREE(ssl, heap, DYNAMIC_TYPE_SSL);
- (void)heap;
-}
-
-#if !defined(NO_OLD_TLS) || defined(WOLFSSL_DTLS) || \
- ((defined(HAVE_CHACHA) || defined(HAVE_AESCCM) || defined(HAVE_AESGCM)) \
- && defined(HAVE_AEAD))
-
-#if defined(WOLFSSL_DTLS) || !defined(WOLFSSL_NO_TLS12)
-static WC_INLINE void GetSEQIncrement(WOLFSSL* ssl, int verify, word32 seq[2])
-{
- if (verify) {
- seq[0] = ssl->keys.peer_sequence_number_hi;
- seq[1] = ssl->keys.peer_sequence_number_lo++;
- if (seq[1] > ssl->keys.peer_sequence_number_lo) {
- /* handle rollover */
- ssl->keys.peer_sequence_number_hi++;
- }
- }
- else {
- seq[0] = ssl->keys.sequence_number_hi;
- seq[1] = ssl->keys.sequence_number_lo++;
- if (seq[1] > ssl->keys.sequence_number_lo) {
- /* handle rollover */
- ssl->keys.sequence_number_hi++;
- }
- }
-}
-#endif /* WOLFSSL_DTLS || !WOLFSSL_NO_TLS12 */
-
-
-#ifdef WOLFSSL_DTLS
-static WC_INLINE void DtlsGetSEQ(WOLFSSL* ssl, int order, word32 seq[2])
-{
-#ifdef HAVE_SECURE_RENEGOTIATION
- order = DtlsCheckOrder(ssl, order);
-#endif
- if (order == PREV_ORDER) {
- /* Previous epoch case */
- if (ssl->options.haveMcast) {
- #ifdef WOLFSSL_MULTICAST
- seq[0] = (((word32)ssl->keys.dtls_epoch - 1) << 16) |
- (ssl->options.mcastID << 8) |
- (ssl->keys.dtls_prev_sequence_number_hi & 0xFF);
- #endif
- }
- else
- seq[0] = (((word32)ssl->keys.dtls_epoch - 1) << 16) |
- (ssl->keys.dtls_prev_sequence_number_hi & 0xFFFF);
- seq[1] = ssl->keys.dtls_prev_sequence_number_lo;
- }
- else if (order == PEER_ORDER) {
- if (ssl->options.haveMcast) {
- #ifdef WOLFSSL_MULTICAST
- seq[0] = ((word32)ssl->keys.curEpoch << 16) |
- (ssl->keys.curPeerId << 8) |
- (ssl->keys.curSeq_hi & 0xFF);
- #endif
- }
- else
- seq[0] = ((word32)ssl->keys.curEpoch << 16) |
- (ssl->keys.curSeq_hi & 0xFFFF);
- seq[1] = ssl->keys.curSeq_lo; /* explicit from peer */
- }
- else {
- if (ssl->options.haveMcast) {
- #ifdef WOLFSSL_MULTICAST
- seq[0] = ((word32)ssl->keys.dtls_epoch << 16) |
- (ssl->options.mcastID << 8) |
- (ssl->keys.dtls_sequence_number_hi & 0xFF);
- #endif
- }
- else
- seq[0] = ((word32)ssl->keys.dtls_epoch << 16) |
- (ssl->keys.dtls_sequence_number_hi & 0xFFFF);
- seq[1] = ssl->keys.dtls_sequence_number_lo;
- }
-}
-
-static WC_INLINE void DtlsSEQIncrement(WOLFSSL* ssl, int order)
-{
- word32 seq;
-#ifdef HAVE_SECURE_RENEGOTIATION
- order = DtlsCheckOrder(ssl, order);
-#endif
-
- if (order == PREV_ORDER) {
- seq = ssl->keys.dtls_prev_sequence_number_lo++;
- if (seq > ssl->keys.dtls_prev_sequence_number_lo) {
- /* handle rollover */
- ssl->keys.dtls_prev_sequence_number_hi++;
- }
- }
- else if (order == PEER_ORDER) {
- seq = ssl->keys.peer_sequence_number_lo++;
- if (seq > ssl->keys.peer_sequence_number_lo) {
- /* handle rollover */
- ssl->keys.peer_sequence_number_hi++;
- }
- }
- else {
- seq = ssl->keys.dtls_sequence_number_lo++;
- if (seq > ssl->keys.dtls_sequence_number_lo) {
- /* handle rollover */
- ssl->keys.dtls_sequence_number_hi++;
- }
- }
-}
-#endif /* WOLFSSL_DTLS */
-
-#if defined(WOLFSSL_DTLS) || !defined(WOLFSSL_NO_TLS12)
-void WriteSEQ(WOLFSSL* ssl, int verifyOrder, byte* out)
-{
- word32 seq[2] = {0, 0};
-
- if (!ssl->options.dtls) {
- GetSEQIncrement(ssl, verifyOrder, seq);
- }
- else {
-#ifdef WOLFSSL_DTLS
- DtlsGetSEQ(ssl, verifyOrder, seq);
-#endif
- }
-
- c32toa(seq[0], out);
- c32toa(seq[1], out + OPAQUE32_LEN);
-}
-#endif /* WOLFSSL_DTLS || !WOLFSSL_NO_TLS12 */
-#endif /* !NO_OLD_TLS || WOLFSSL_DTLS ||
- * ((HAVE_CHACHA || HAVE_AESCCM || HAVE_AESGCM) && HAVE_AEAD) */
-
-#ifdef WOLFSSL_DTLS
-
-/* functions for managing DTLS datagram reordering */
-
-/* Need to allocate space for the handshake message header. The hashing
- * routines assume the message pointer is still within the buffer that
- * has the headers, and will include those headers in the hash. The store
- * routines need to take that into account as well. New will allocate
- * extra space for the headers. */
-DtlsMsg* DtlsMsgNew(word32 sz, void* heap)
-{
- DtlsMsg* msg;
-
- (void)heap;
- msg = (DtlsMsg*)XMALLOC(sizeof(DtlsMsg), heap, DYNAMIC_TYPE_DTLS_MSG);
-
- if (msg != NULL) {
- XMEMSET(msg, 0, sizeof(DtlsMsg));
- msg->buf = (byte*)XMALLOC(sz + DTLS_HANDSHAKE_HEADER_SZ,
- heap, DYNAMIC_TYPE_DTLS_BUFFER);
- if (msg->buf != NULL) {
- msg->sz = sz;
- msg->type = no_shake;
- msg->msg = msg->buf + DTLS_HANDSHAKE_HEADER_SZ;
- }
- else {
- XFREE(msg, heap, DYNAMIC_TYPE_DTLS_MSG);
- msg = NULL;
- }
- }
-
- return msg;
-}
-
-void DtlsMsgDelete(DtlsMsg* item, void* heap)
-{
- (void)heap;
-
- if (item != NULL) {
- DtlsFrag* cur = item->fragList;
- while (cur != NULL) {
- DtlsFrag* next = cur->next;
- XFREE(cur, heap, DYNAMIC_TYPE_DTLS_FRAG);
- cur = next;
- }
- if (item->buf != NULL)
- XFREE(item->buf, heap, DYNAMIC_TYPE_DTLS_BUFFER);
- XFREE(item, heap, DYNAMIC_TYPE_DTLS_MSG);
- }
-}
-
-
-void DtlsMsgListDelete(DtlsMsg* head, void* heap)
-{
- DtlsMsg* next;
- while (head) {
- next = head->next;
- DtlsMsgDelete(head, heap);
- head = next;
- }
-}
-
-/**
- * Drop messages when they are no longer going to be retransmitted
- */
-void DtlsTxMsgListClean(WOLFSSL* ssl)
-{
- DtlsMsg* head = ssl->dtls_tx_msg_list;
- DtlsMsg* next;
- while (head) {
- next = head->next;
- if (VerifyForTxDtlsMsgDelete(ssl, head))
- DtlsMsgDelete(head, ssl->heap);
- else
- /* Stored packets should be in order so break on first failed
- * verify */
- break;
- ssl->dtls_tx_msg_list_sz--;
- /* Reset timer as deleting a node means that state has progressed */
- ssl->dtls_timeout = ssl->dtls_timeout_init;
- head = next;
- }
- ssl->dtls_tx_msg_list = head;
-}
-
-/* Create a DTLS Fragment from *begin - end, adjust new *begin and bytesLeft */
-static DtlsFrag* CreateFragment(word32* begin, word32 end, const byte* data,
- byte* buf, word32* bytesLeft, void* heap)
-{
- DtlsFrag* newFrag;
- word32 added = end - *begin + 1;
-
- (void)heap;
- newFrag = (DtlsFrag*)XMALLOC(sizeof(DtlsFrag), heap,
- DYNAMIC_TYPE_DTLS_FRAG);
- if (newFrag != NULL) {
- newFrag->next = NULL;
- newFrag->begin = *begin;
- newFrag->end = end;
-
- XMEMCPY(buf + *begin, data, added);
- *bytesLeft -= added;
- *begin = newFrag->end + 1;
- }
-
- return newFrag;
-}
-
-
-int DtlsMsgSet(DtlsMsg* msg, word32 seq, word16 epoch, const byte* data, byte type,
- word32 fragOffset, word32 fragSz, void* heap)
-{
- if (msg != NULL && data != NULL && msg->fragSz <= msg->sz &&
- (fragOffset + fragSz) <= msg->sz) {
- DtlsFrag* cur = msg->fragList;
- DtlsFrag* prev = cur;
- DtlsFrag* newFrag;
- word32 bytesLeft = fragSz; /* could be overlapping fragment */
- word32 startOffset = fragOffset;
- word32 added;
-
- msg->seq = seq;
- msg->epoch = epoch;
- msg->type = type;
-
- if (fragOffset == 0) {
- XMEMCPY(msg->buf, data - DTLS_HANDSHAKE_HEADER_SZ,
- DTLS_HANDSHAKE_HEADER_SZ);
- c32to24(msg->sz, msg->msg - DTLS_HANDSHAKE_FRAG_SZ);
- }
-
- /* if no message data, just return */
- if (fragSz == 0)
- return 0;
-
- /* if list is empty add full fragment to front */
- if (cur == NULL) {
- newFrag = CreateFragment(&fragOffset, fragOffset + fragSz - 1, data,
- msg->msg, &bytesLeft, heap);
- if (newFrag == NULL)
- return MEMORY_E;
-
- msg->fragSz = fragSz;
- msg->fragList = newFrag;
-
- return 0;
- }
-
- /* add to front if before current front, up to next->begin */
- if (fragOffset < cur->begin) {
- word32 end = fragOffset + fragSz - 1;
-
- if (end >= cur->begin)
- end = cur->begin - 1;
-
- added = end - fragOffset + 1;
- newFrag = CreateFragment(&fragOffset, end, data, msg->msg,
- &bytesLeft, heap);
- if (newFrag == NULL)
- return MEMORY_E;
-
- msg->fragSz += added;
-
- newFrag->next = cur;
- msg->fragList = newFrag;
- }
-
- /* while we have bytes left, try to find a gap to fill */
- while (bytesLeft > 0) {
- /* get previous packet in list */
- while (cur && (fragOffset >= cur->begin)) {
- prev = cur;
- cur = cur->next;
- }
-
- /* don't add duplicate data */
- if (prev->end >= fragOffset) {
- if ( (fragOffset + bytesLeft - 1) <= prev->end)
- return 0;
- fragOffset = prev->end + 1;
- bytesLeft = startOffset + fragSz - fragOffset;
- }
-
- if (cur == NULL)
- /* we're at the end */
- added = bytesLeft;
- else
- /* we're in between two frames */
- added = min(bytesLeft, cur->begin - fragOffset);
-
- /* data already there */
- if (added == 0)
- continue;
-
- newFrag = CreateFragment(&fragOffset, fragOffset + added - 1,
- data + fragOffset - startOffset,
- msg->msg, &bytesLeft, heap);
- if (newFrag == NULL)
- return MEMORY_E;
-
- msg->fragSz += added;
-
- newFrag->next = prev->next;
- prev->next = newFrag;
- }
- }
-
- return 0;
-}
-
-
-DtlsMsg* DtlsMsgFind(DtlsMsg* head, word32 epoch, word32 seq)
-{
- while (head != NULL && !(head->epoch == epoch && head->seq == seq)) {
- head = head->next;
- }
- return head;
-}
-
-
-void DtlsMsgStore(WOLFSSL* ssl, word32 epoch, word32 seq, const byte* data,
- word32 dataSz, byte type, word32 fragOffset, word32 fragSz, void* heap)
-{
- /* See if seq exists in the list. If it isn't in the list, make
- * a new item of size dataSz, copy fragSz bytes from data to msg->msg
- * starting at offset fragOffset, and add fragSz to msg->fragSz. If
- * the seq is in the list and it isn't full, copy fragSz bytes from
- * data to msg->msg starting at offset fragOffset, and add fragSz to
- * msg->fragSz. Insertions take into account data already in the list
- * in case there are overlaps in the handshake message due to retransmit
- * messages. The new item should be inserted into the list in its
- * proper position.
- *
- * 1. Find seq in list, or where seq should go in list. If seq not in
- * list, create new item and insert into list. Either case, keep
- * pointer to item.
- * 2. Copy the data from the message to the stored message where it
- * belongs without overlaps.
- */
-
- DtlsMsg* head = ssl->dtls_rx_msg_list;
-
- if (head != NULL) {
- DtlsMsg* cur = DtlsMsgFind(head, epoch, seq);
- if (cur == NULL) {
- cur = DtlsMsgNew(dataSz, heap);
- if (cur != NULL) {
- if (DtlsMsgSet(cur, seq, epoch, data, type,
- fragOffset, fragSz, heap) < 0) {
- DtlsMsgDelete(cur, heap);
- }
- else {
- ssl->dtls_rx_msg_list_sz++;
- head = DtlsMsgInsert(head, cur);
- }
- }
- }
- else {
- /* If this fails, the data is just dropped. */
- DtlsMsgSet(cur, seq, epoch, data, type, fragOffset,
- fragSz, heap);
- }
- }
- else {
- head = DtlsMsgNew(dataSz, heap);
- if (DtlsMsgSet(head, seq, epoch, data, type, fragOffset,
- fragSz, heap) < 0) {
- DtlsMsgDelete(head, heap);
- head = NULL;
- }
- else {
- ssl->dtls_rx_msg_list_sz++;
- }
- }
-
- ssl->dtls_rx_msg_list = head;
-}
-
-
-/* DtlsMsgInsert() is an in-order insert. */
-DtlsMsg* DtlsMsgInsert(DtlsMsg* head, DtlsMsg* item)
-{
- if (head == NULL || (item->epoch <= head->epoch &&
- item->seq < head->seq)) {
- item->next = head;
- head = item;
- }
- else if (head->next == NULL) {
- head->next = item;
- }
- else {
- DtlsMsg* cur = head->next;
- DtlsMsg* prev = head;
- while (cur) {
- if (item->epoch <= head->epoch &&
- item->seq < head->seq) {
- item->next = cur;
- prev->next = item;
- break;
- }
- prev = cur;
- cur = cur->next;
- }
- if (cur == NULL) {
- prev->next = item;
- }
- }
-
- return head;
-}
-
-
-/**
- * DtlsMsgPoolSave() adds the message to the end of the stored transmit
- * list. Must be called BEFORE BuildMessage or DtlsSEQIncrement or
- * anything else that increments ssl->keys.dtls_handshake_number.
- */
-int DtlsMsgPoolSave(WOLFSSL* ssl, const byte* data, word32 dataSz,
- enum HandShakeType type)
-{
- DtlsMsg* item;
- int ret = 0;
-
- WOLFSSL_ENTER("DtlsMsgPoolSave()");
-
- if (ssl->dtls_tx_msg_list_sz > DTLS_POOL_SZ) {
- WOLFSSL_ERROR(DTLS_POOL_SZ_E);
- return DTLS_POOL_SZ_E;
- }
-
- item = DtlsMsgNew(dataSz, ssl->heap);
-
- if (item != NULL) {
- DtlsMsg* cur = ssl->dtls_tx_msg_list;
-
- XMEMCPY(item->buf, data, dataSz);
- item->sz = dataSz;
- item->epoch = ssl->keys.dtls_epoch;
- item->seq = ssl->keys.dtls_handshake_number;
- item->type = type;
-
- if (cur == NULL)
- ssl->dtls_tx_msg_list = item;
- else {
- while (cur->next)
- cur = cur->next;
- cur->next = item;
- }
- ssl->dtls_tx_msg_list_sz++;
- }
- else
- ret = MEMORY_E;
-
- WOLFSSL_LEAVE("DtlsMsgPoolSave()", ret);
- return ret;
-}
-
-
-/* DtlsMsgPoolTimeout() updates the timeout time. */
-int DtlsMsgPoolTimeout(WOLFSSL* ssl)
-{
- int result = -1;
- if (ssl->dtls_timeout < ssl->dtls_timeout_max) {
- ssl->dtls_timeout *= DTLS_TIMEOUT_MULTIPLIER;
- result = 0;
- }
- WOLFSSL_LEAVE("DtlsMsgPoolTimeout()", result);
- return result;
-}
-
-
-/* DtlsMsgPoolReset() deletes the stored transmit list and resets the timeout
- * value. */
-void DtlsMsgPoolReset(WOLFSSL* ssl)
-{
- WOLFSSL_ENTER("DtlsMsgPoolReset()");
- if (ssl->dtls_tx_msg_list) {
- DtlsMsgListDelete(ssl->dtls_tx_msg_list, ssl->heap);
- ssl->dtls_tx_msg_list = NULL;
- ssl->dtls_tx_msg = NULL;
- ssl->dtls_tx_msg_list_sz = 0;
- }
- ssl->dtls_timeout = ssl->dtls_timeout_init;
-}
-
-
-int VerifyForDtlsMsgPoolSend(WOLFSSL* ssl, byte type, word32 fragOffset)
-{
- /**
- * only the first message from previous flight should be valid
- * to be used for triggering retransmission of whole DtlsMsgPool.
- * change cipher suite type is not verified here
- */
- return ((fragOffset == 0) &&
- (((ssl->options.side == WOLFSSL_SERVER_END) &&
- ((type == client_hello) ||
- ((ssl->options.verifyPeer) && (type == certificate)) ||
- ((!ssl->options.verifyPeer) && (type == client_key_exchange)))) ||
- ((ssl->options.side == WOLFSSL_CLIENT_END) &&
- (type == server_hello))));
-}
-
-
-/**
- * Verify if message `item` from `ssl->dtls_tx_msg_list` should be deleted
- * depending on the current state of the handshake negotiation.
- */
-int VerifyForTxDtlsMsgDelete(WOLFSSL* ssl, DtlsMsg* item)
-{
- if (item->epoch < ssl->keys.dtls_epoch - 1)
- /* Messages not from current or previous epoch can be deleted */
- return 1;
- switch (ssl->options.side) {
- case WOLFSSL_CLIENT_END:
- if (item->type == client_hello &&
- ssl->options.serverState >= SERVER_HELLODONE_COMPLETE)
- return 1; /* client can forget first client_hello if received full
- * flight of packets from server */
- else
- return 0;
- case WOLFSSL_SERVER_END:
- if (ssl->options.clientState >= CLIENT_FINISHED_COMPLETE &&
- item->type <= server_hello_done)
- return 1; /* server can forget everything up to ServerHelloDone if
- * a client finished message has been received and
- * successfully processed */
- else
- return 0;
- default:
- return 0;
- }
-}
-
-
-/* DtlsMsgPoolSend() will send the stored transmit list. The stored list is
- * updated with new sequence numbers, and will be re-encrypted if needed. */
-int DtlsMsgPoolSend(WOLFSSL* ssl, int sendOnlyFirstPacket)
-{
- int ret = 0;
- DtlsMsg* pool;
- int epochOrder;
-
- WOLFSSL_ENTER("DtlsMsgPoolSend()");
-
- pool = ssl->dtls_tx_msg == NULL ? ssl->dtls_tx_msg_list : ssl->dtls_tx_msg;
-
- if (pool != NULL) {
- if ((ssl->options.side == WOLFSSL_SERVER_END &&
- !(ssl->options.acceptState == SERVER_HELLO_DONE ||
- ssl->options.acceptState == ACCEPT_FINISHED_DONE ||
- ssl->options.acceptState == ACCEPT_THIRD_REPLY_DONE)) ||
- (ssl->options.side == WOLFSSL_CLIENT_END &&
- !(ssl->options.connectState == CLIENT_HELLO_SENT ||
- ssl->options.connectState == HELLO_AGAIN_REPLY ||
- ssl->options.connectState == FINISHED_DONE ||
- ssl->options.connectState == SECOND_REPLY_DONE))) {
-
- WOLFSSL_ERROR(DTLS_RETX_OVER_TX);
- ssl->error = DTLS_RETX_OVER_TX;
- return WOLFSSL_FATAL_ERROR;
- }
-
- while (pool != NULL) {
- if (pool->epoch == 0) {
- DtlsRecordLayerHeader* dtls;
-
- dtls = (DtlsRecordLayerHeader*)pool->buf;
- /* If the stored record's epoch is 0, and the currently set
- * epoch is 0, use the "current order" sequence number.
- * If the stored record's epoch is 0 and the currently set
- * epoch is not 0, the stored record is considered a "previous
- * order" sequence number. */
- epochOrder = (ssl->keys.dtls_epoch == 0) ?
- CUR_ORDER : PREV_ORDER;
-
- WriteSEQ(ssl, epochOrder, dtls->sequence_number);
- DtlsSEQIncrement(ssl, epochOrder);
- if ((ret = CheckAvailableSize(ssl, pool->sz)) != 0) {
- WOLFSSL_ERROR(ret);
- return ret;
- }
-
- XMEMCPY(ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.idx +
- ssl->buffers.outputBuffer.length,
- pool->buf, pool->sz);
- ssl->buffers.outputBuffer.length += pool->sz;
- }
- else {
- /* Handle sending packets from previous epoch */
- byte* input;
- byte* output;
- int inputSz, sendSz;
-
- input = pool->buf;
- inputSz = pool->sz;
- sendSz = inputSz + MAX_MSG_EXTRA;
-
-#ifdef HAVE_SECURE_RENEGOTIATION
- /*
- * CUR_ORDER will use ssl->secure_renegotiation from epoch 2+.
- * ssl->keys otherwise
- * PREV_ORDER will always use ssl->keys
- */
- if (DtlsSCRKeysSet(ssl)) {
- if (pool->epoch == ssl->secure_renegotiation->tmp_keys.dtls_epoch)
- epochOrder = CUR_ORDER;
- else
- epochOrder = PREV_ORDER;
- }
- else {
- epochOrder = CUR_ORDER;
- }
-#else
- epochOrder = CUR_ORDER;
-#endif
-
-
- if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) {
- WOLFSSL_ERROR(ret);
- return ret;
- }
-
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
- if (inputSz != ENUM_LEN)
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 0, 0, 0, epochOrder);
- else
- /* inputSz == ENUM_LEN must mean that this is a change cipher
- * spec message */
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- change_cipher_spec, 0, 0, 0, epochOrder);
-
- if (sendSz < 0) {
- WOLFSSL_ERROR(BUILD_MSG_ERROR);
- return BUILD_MSG_ERROR;
- }
-
- ssl->buffers.outputBuffer.length += sendSz;
- }
-
-
- if (!ssl->options.groupMessages)
- ret = SendBuffered(ssl);
-
- /**
- * on server side, retransmission is being triggered only by sending
- * first message of given flight, in order to trigger client
- * to retransmit its whole flight. Sending the whole previous flight
- * could lead to retransmission of previous client flight for each
- * server message from previous flight. Therefore one message should
- * be enough to do the trick.
- */
- if (sendOnlyFirstPacket &&
- ssl->options.side == WOLFSSL_SERVER_END)
- pool = NULL;
- else
- pool = pool->next;
- ssl->dtls_tx_msg = pool;
- }
-
- if (ret == 0 && ssl->options.groupMessages)
- ret = SendBuffered(ssl);
- }
-
- WOLFSSL_LEAVE("DtlsMsgPoolSend()", ret);
- return ret;
-}
-
-#endif /* WOLFSSL_DTLS */
-
-#if defined(WOLFSSL_ALLOW_SSLV3) && !defined(NO_OLD_TLS)
-
-ProtocolVersion MakeSSLv3(void)
-{
- ProtocolVersion pv;
- pv.major = SSLv3_MAJOR;
- pv.minor = SSLv3_MINOR;
-
- return pv;
-}
-
-#endif /* WOLFSSL_ALLOW_SSLV3 && !NO_OLD_TLS */
-
-
-#ifdef WOLFSSL_DTLS
-
-ProtocolVersion MakeDTLSv1(void)
-{
- ProtocolVersion pv;
- pv.major = DTLS_MAJOR;
- pv.minor = DTLS_MINOR;
-
- return pv;
-}
-
-#ifndef WOLFSSL_NO_TLS12
-
-ProtocolVersion MakeDTLSv1_2(void)
-{
- ProtocolVersion pv;
- pv.major = DTLS_MAJOR;
- pv.minor = DTLSv1_2_MINOR;
-
- return pv;
-}
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#endif /* WOLFSSL_DTLS */
-
-
-#ifndef NO_ASN_TIME
-#if defined(USER_TICKS)
-#if 0
- word32 LowResTimer(void)
- {
- /*
- write your own clock tick function if don't want time(0)
- needs second accuracy but doesn't have to correlated to EPOCH
- */
- }
-#endif
-
-#elif defined(TIME_OVERRIDES)
-
- /* use same asn time overrides unless user wants tick override above */
-
- #ifndef HAVE_TIME_T_TYPE
- typedef long time_t;
- #endif
- extern time_t XTIME(time_t * timer);
-
- word32 LowResTimer(void)
- {
- return (word32) XTIME(0);
- }
-
-#elif defined(USE_WINDOWS_API)
-
- word32 LowResTimer(void)
- {
- static int init = 0;
- static LARGE_INTEGER freq;
- LARGE_INTEGER count;
-
- if (!init) {
- QueryPerformanceFrequency(&freq);
- init = 1;
- }
-
- QueryPerformanceCounter(&count);
-
- return (word32)(count.QuadPart / freq.QuadPart);
- }
-
-#elif defined(HAVE_RTP_SYS)
-
- #include "rtptime.h"
-
- word32 LowResTimer(void)
- {
- return (word32)rtp_get_system_sec();
- }
-
-#elif defined(WOLFSSL_DEOS)
-
- word32 LowResTimer(void)
- {
- const uint32_t systemTickTimeInHz = 1000000 / systemTickInMicroseconds();
- uint32_t *systemTickPtr = systemTickPointer();
-
- return (word32) *systemTickPtr/systemTickTimeInHz;
- }
-
-#elif defined(MICRIUM)
-
- word32 LowResTimer(void)
- {
- OS_TICK ticks = 0;
- OS_ERR err;
-
- ticks = OSTimeGet(&err);
-
- return (word32) (ticks / OSCfg_TickRate_Hz);
- }
-
-
-#elif defined(MICROCHIP_TCPIP_V5)
-
- word32 LowResTimer(void)
- {
- return (word32) (TickGet() / TICKS_PER_SECOND);
- }
-
-
-#elif defined(MICROCHIP_TCPIP)
-
- #if defined(MICROCHIP_MPLAB_HARMONY)
-
- #include
-
- word32 LowResTimer(void)
- {
- return (word32) (SYS_TMR_TickCountGet() /
- SYS_TMR_TickCounterFrequencyGet());
- }
-
- #else
-
- word32 LowResTimer(void)
- {
- return (word32) (SYS_TICK_Get() / SYS_TICK_TicksPerSecondGet());
- }
-
- #endif
-
-#elif defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
-
- word32 LowResTimer(void)
- {
- TIME_STRUCT mqxTime;
-
- _time_get_elapsed(&mqxTime);
-
- return (word32) mqxTime.SECONDS;
- }
-#elif defined(FREESCALE_FREE_RTOS) || defined(FREESCALE_KSDK_FREERTOS)
-
- #include "include/task.h"
-
- unsigned int LowResTimer(void)
- {
- return (unsigned int)(((float)xTaskGetTickCount())/configTICK_RATE_HZ);
- }
-
-#elif defined(FREERTOS)
-
- #include "task.h"
-
- unsigned int LowResTimer(void)
- {
- return (unsigned int)(((float)xTaskGetTickCount())/configTICK_RATE_HZ);
- }
-
-#elif defined(FREESCALE_KSDK_BM)
-
- #include "lwip/sys.h" /* lwIP */
- word32 LowResTimer(void)
- {
- return sys_now()/1000;
- }
-
-#elif defined(WOLFSSL_TIRTOS)
-
- word32 LowResTimer(void)
- {
- return (word32) Seconds_get();
- }
-#elif defined(WOLFSSL_XILINX)
- #include "xrtcpsu.h"
-
- word32 LowResTimer(void)
- {
- XRtcPsu_Config* con;
- XRtcPsu rtc;
-
- con = XRtcPsu_LookupConfig(XPAR_XRTCPSU_0_DEVICE_ID);
- if (con != NULL) {
- if (XRtcPsu_CfgInitialize(&rtc, con, con->BaseAddr)
- == XST_SUCCESS) {
- return (word32)XRtcPsu_GetCurrentTime(&rtc);
- }
- else {
- WOLFSSL_MSG("Unable to initialize RTC");
- }
- }
-
- return 0;
- }
-
-#elif defined(WOLFSSL_UTASKER)
-
- word32 LowResTimer(void)
- {
- return (word32)(uTaskerSystemTick / TICK_RESOLUTION);
- }
-
-#elif defined(WOLFSSL_NUCLEUS_1_2)
-
- #define NU_TICKS_PER_SECOND 100
-
- word32 LowResTimer(void)
- {
- /* returns number of 10ms ticks, so 100 ticks/sec */
- return NU_Retrieve_Clock() / NU_TICKS_PER_SECOND;
- }
-#elif defined(WOLFSSL_APACHE_MYNEWT)
-
- #include "os/os_time.h"
- word32 LowResTimer(void)
- {
- word32 now;
- struct os_timeval tv;
- os_gettimeofday(&tv, NULL);
- now = (word32)tv.tv_sec;
- return now;
- }
-
-#elif defined(WOLFSSL_ZEPHYR)
-
- word32 LowResTimer(void)
- {
- return k_uptime_get() / 1000;
- }
-
-#else
- /* Posix style time */
- #if !defined(USER_TIME) && !defined(USE_WOLF_TM)
- #include
- #endif
-
- word32 LowResTimer(void)
- {
- return (word32)XTIME(0);
- }
-#endif
-#endif /* !NO_ASN_TIME */
-#if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
- ((defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
- (defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
-/* Store the message for use with CertificateVerify using EdDSA.
- *
- * ssl SSL/TLS object.
- * data Message to store.
- * sz Size of message to store.
- * returns MEMORY_E if not able to reallocate, otherwise 0.
- */
-static int EdDSA_Update(WOLFSSL* ssl, const byte* data, int sz)
-{
- int ret = 0;
- byte* msgs;
-
- if (ssl->options.cacheMessages) {
- msgs = (byte*)XREALLOC(ssl->hsHashes->messages,
- ssl->hsHashes->length + sz,
- ssl->heap, DYNAMIC_TYPE_HASHES);
- if (msgs == NULL)
- ret = MEMORY_E;
- if (ret == 0) {
- ssl->hsHashes->messages = msgs;
- XMEMCPY(msgs + ssl->hsHashes->length, data, sz);
- ssl->hsHashes->prevLen = ssl->hsHashes->length;
- ssl->hsHashes->length += sz;
- }
- }
-
- return ret;
-}
-#endif /* (HAVE_ED25519 || HAVE_ED448) && !WOLFSSL_NO_CLIENT_AUTH */
-
-int HashRaw(WOLFSSL* ssl, const byte* data, int sz)
-{
- int ret = 0;
-
- (void)data;
- (void)sz;
-
- if (ssl->hsHashes == NULL) {
- return BAD_FUNC_ARG;
- }
-
-#ifndef NO_OLD_TLS
- #ifndef NO_SHA
- wc_ShaUpdate(&ssl->hsHashes->hashSha, data, sz);
- #endif
- #ifndef NO_MD5
- wc_Md5Update(&ssl->hsHashes->hashMd5, data, sz);
- #endif
-#endif /* NO_OLD_TLS */
-
- if (IsAtLeastTLSv1_2(ssl)) {
- #ifndef NO_SHA256
- ret = wc_Sha256Update(&ssl->hsHashes->hashSha256, data, sz);
- if (ret != 0)
- return ret;
- #endif
- #ifdef WOLFSSL_SHA384
- ret = wc_Sha384Update(&ssl->hsHashes->hashSha384, data, sz);
- if (ret != 0)
- return ret;
- #endif
- #ifdef WOLFSSL_SHA512
- ret = wc_Sha512Update(&ssl->hsHashes->hashSha512, data, sz);
- if (ret != 0)
- return ret;
- #endif
- #if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
- ((defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
- (defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
- ret = EdDSA_Update(ssl, data, sz);
- if (ret != 0)
- return ret;
- #endif
- }
-
- return ret;
-}
-
-/* add output to md5 and sha handshake hashes, exclude record header */
-int HashOutput(WOLFSSL* ssl, const byte* output, int sz, int ivSz)
-{
- const byte* adj;
-
- if (ssl->hsHashes == NULL)
- return BAD_FUNC_ARG;
-
- adj = output + RECORD_HEADER_SZ + ivSz;
- sz -= RECORD_HEADER_SZ;
-
-#ifdef HAVE_FUZZER
- if (ssl->fuzzerCb)
- ssl->fuzzerCb(ssl, output, sz, FUZZ_HASH, ssl->fuzzerCtx);
-#endif
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- adj += DTLS_RECORD_EXTRA;
- sz -= DTLS_RECORD_EXTRA;
- }
-#endif
-
- return HashRaw(ssl, adj, sz);
-}
-
-
-/* add input to md5 and sha handshake hashes, include handshake header */
-int HashInput(WOLFSSL* ssl, const byte* input, int sz)
-{
- const byte* adj;
-
- if (ssl->hsHashes == NULL) {
- return BAD_FUNC_ARG;
- }
-
- adj = input - HANDSHAKE_HEADER_SZ;
- sz += HANDSHAKE_HEADER_SZ;
-
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- adj -= DTLS_HANDSHAKE_EXTRA;
- sz += DTLS_HANDSHAKE_EXTRA;
- }
-#endif
-
- return HashRaw(ssl, adj, sz);
-}
-
-
-/* add record layer header for message */
-static void AddRecordHeader(byte* output, word32 length, byte type, WOLFSSL* ssl, int epochOrder)
-{
- RecordLayerHeader* rl;
-
- (void)epochOrder;
-
- /* record layer header */
- rl = (RecordLayerHeader*)output;
- if (rl == NULL) {
- return;
- }
- rl->type = type;
- rl->pvMajor = ssl->version.major; /* type and version same in each */
-#ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(ssl->version)) {
- rl->pvMinor = TLSv1_2_MINOR;
- }
- else
-#endif
- rl->pvMinor = ssl->version.minor;
-
-#ifdef WOLFSSL_ALTERNATIVE_DOWNGRADE
- if (ssl->options.side == WOLFSSL_CLIENT_END
- && ssl->options.connectState == CONNECT_BEGIN
- && !ssl->options.resuming) {
- rl->pvMinor = ssl->options.downgrade ? ssl->options.minDowngrade
- : ssl->version.minor;
- }
-#endif
-
- if (!ssl->options.dtls) {
- c16toa((word16)length, rl->length);
- }
- else {
-#ifdef WOLFSSL_DTLS
- DtlsRecordLayerHeader* dtls;
-
- /* dtls record layer header extensions */
- dtls = (DtlsRecordLayerHeader*)output;
- WriteSEQ(ssl, epochOrder, dtls->sequence_number);
- c16toa((word16)length, dtls->length);
-#endif
- }
-}
-
-
-#if !defined(WOLFSSL_NO_TLS12) || (defined(HAVE_SESSION_TICKET) && \
- !defined(NO_WOLFSSL_SERVER))
-/* add handshake header for message */
-static void AddHandShakeHeader(byte* output, word32 length,
- word32 fragOffset, word32 fragLength,
- byte type, WOLFSSL* ssl)
-{
- HandShakeHeader* hs;
- (void)fragOffset;
- (void)fragLength;
- (void)ssl;
-
- /* handshake header */
- hs = (HandShakeHeader*)output;
- if (hs == NULL)
- return;
-
- hs->type = type;
- c32to24(length, hs->length); /* type and length same for each */
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- DtlsHandShakeHeader* dtls;
-
- /* dtls handshake header extensions */
- dtls = (DtlsHandShakeHeader*)output;
- c16toa(ssl->keys.dtls_handshake_number++, dtls->message_seq);
- c32to24(fragOffset, dtls->fragment_offset);
- c32to24(fragLength, dtls->fragment_length);
- }
-#endif
-}
-
-/* add both headers for handshake message */
-static void AddHeaders(byte* output, word32 length, byte type, WOLFSSL* ssl)
-{
- word32 lengthAdj = HANDSHAKE_HEADER_SZ;
- word32 outputAdj = RECORD_HEADER_SZ;
-
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- lengthAdj += DTLS_HANDSHAKE_EXTRA;
- outputAdj += DTLS_RECORD_EXTRA;
- }
-#endif
-
- AddRecordHeader(output, length + lengthAdj, handshake, ssl, CUR_ORDER);
- AddHandShakeHeader(output + outputAdj, length, 0, length, type, ssl);
-}
-#endif /* !WOLFSSL_NO_TLS12 || (HAVE_SESSION_TICKET && !NO_WOLFSSL_SERVER) */
-
-
-#ifndef WOLFSSL_NO_TLS12
-#if !defined(NO_CERTS) && (!defined(NO_WOLFSSL_SERVER) || \
- !defined(WOLFSSL_NO_CLIENT_AUTH))
-static void AddFragHeaders(byte* output, word32 fragSz, word32 fragOffset,
- word32 length, byte type, WOLFSSL* ssl)
-{
- word32 lengthAdj = HANDSHAKE_HEADER_SZ;
- word32 outputAdj = RECORD_HEADER_SZ;
- (void)fragSz;
-
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- lengthAdj += DTLS_HANDSHAKE_EXTRA;
- outputAdj += DTLS_RECORD_EXTRA;
- }
-#endif
-
- AddRecordHeader(output, fragSz + lengthAdj, handshake, ssl, CUR_ORDER);
- AddHandShakeHeader(output + outputAdj, length, fragOffset, fragSz, type, ssl);
-}
-#endif /* NO_CERTS */
-#endif /* !WOLFSSL_NO_TLS12 */
-
-
-/* return bytes received, -1 on error */
-static int wolfSSLReceive(WOLFSSL* ssl, byte* buf, word32 sz)
-{
- int recvd;
-
- if (ssl->CBIORecv == NULL) {
- WOLFSSL_MSG("Your IO Recv callback is null, please set");
- return -1;
- }
-
-retry:
- recvd = ssl->CBIORecv(ssl, (char *)buf, (int)sz, ssl->IOCB_ReadCtx);
- if (recvd < 0) {
- switch (recvd) {
- case WOLFSSL_CBIO_ERR_GENERAL: /* general/unknown error */
- #if defined(OPENSSL_ALL) || defined(WOLFSSL_APACHE_HTTPD)
- if (ssl->biord) {
- /* If retry and read flags are set, return WANT_READ */
- if ((ssl->biord->flags & WOLFSSL_BIO_FLAG_READ) &&
- (ssl->biord->flags & WOLFSSL_BIO_FLAG_RETRY)) {
- return WANT_READ;
- }
- }
- #endif
- return -1;
-
- case WOLFSSL_CBIO_ERR_WANT_READ: /* want read, would block */
- return WANT_READ;
-
- case WOLFSSL_CBIO_ERR_CONN_RST: /* connection reset */
- #ifdef USE_WINDOWS_API
- if (ssl->options.dtls) {
- goto retry;
- }
- #endif
- ssl->options.connReset = 1;
- return -1;
-
- case WOLFSSL_CBIO_ERR_ISR: /* interrupt */
- /* see if we got our timeout */
- #ifdef WOLFSSL_CALLBACKS
- if (ssl->toInfoOn) {
- struct itimerval timeout;
- getitimer(ITIMER_REAL, &timeout);
- if (timeout.it_value.tv_sec == 0 &&
- timeout.it_value.tv_usec == 0) {
- XSTRNCPY(ssl->timeoutInfo.timeoutName,
- "recv() timeout", MAX_TIMEOUT_NAME_SZ);
- ssl->timeoutInfo.timeoutName[
- MAX_TIMEOUT_NAME_SZ] = '\0';
-
- WOLFSSL_MSG("Got our timeout");
- return WANT_READ;
- }
- }
- #endif
- goto retry;
-
- case WOLFSSL_CBIO_ERR_CONN_CLOSE: /* peer closed connection */
- ssl->options.isClosed = 1;
- return -1;
-
- case WOLFSSL_CBIO_ERR_TIMEOUT:
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) &&
- ssl->options.handShakeState != HANDSHAKE_DONE &&
- DtlsMsgPoolTimeout(ssl) == 0 &&
- DtlsMsgPoolSend(ssl, 0) == 0) {
-
- /* retry read for DTLS during handshake only */
- goto retry;
- }
- #endif
- return -1;
-
- default:
- WOLFSSL_MSG("Unexpected recv return code");
- return recvd;
- }
- }
-
- return recvd;
-}
-
-
-/* Switch dynamic output buffer back to static, buffer is assumed clear */
-void ShrinkOutputBuffer(WOLFSSL* ssl)
-{
- WOLFSSL_MSG("Shrinking output buffer\n");
- XFREE(ssl->buffers.outputBuffer.buffer - ssl->buffers.outputBuffer.offset,
- ssl->heap, DYNAMIC_TYPE_OUT_BUFFER);
- ssl->buffers.outputBuffer.buffer = ssl->buffers.outputBuffer.staticBuffer;
- ssl->buffers.outputBuffer.bufferSize = STATIC_BUFFER_LEN;
- ssl->buffers.outputBuffer.dynamicFlag = 0;
- ssl->buffers.outputBuffer.offset = 0;
-}
-
-
-/* Switch dynamic input buffer back to static, keep any remaining input */
-/* forced free means cleaning up */
-void ShrinkInputBuffer(WOLFSSL* ssl, int forcedFree)
-{
- int usedLength = ssl->buffers.inputBuffer.length -
- ssl->buffers.inputBuffer.idx;
- if (!forcedFree && usedLength > STATIC_BUFFER_LEN)
- return;
-
- WOLFSSL_MSG("Shrinking input buffer\n");
-
- if (!forcedFree && usedLength > 0)
- XMEMCPY(ssl->buffers.inputBuffer.staticBuffer,
- ssl->buffers.inputBuffer.buffer + ssl->buffers.inputBuffer.idx,
- usedLength);
-
- XFREE(ssl->buffers.inputBuffer.buffer - ssl->buffers.inputBuffer.offset,
- ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- ssl->buffers.inputBuffer.buffer = ssl->buffers.inputBuffer.staticBuffer;
- ssl->buffers.inputBuffer.bufferSize = STATIC_BUFFER_LEN;
- ssl->buffers.inputBuffer.dynamicFlag = 0;
- ssl->buffers.inputBuffer.offset = 0;
- ssl->buffers.inputBuffer.idx = 0;
- ssl->buffers.inputBuffer.length = usedLength;
-}
-
-int SendBuffered(WOLFSSL* ssl)
-{
- if (ssl->CBIOSend == NULL) {
- WOLFSSL_MSG("Your IO Send callback is null, please set");
- return SOCKET_ERROR_E;
- }
-
-#ifdef WOLFSSL_DEBUG_TLS
- if (ssl->buffers.outputBuffer.idx == 0) {
- WOLFSSL_MSG("Data to send");
- WOLFSSL_BUFFER(ssl->buffers.outputBuffer.buffer,
- ssl->buffers.outputBuffer.length);
- }
-#endif
-
- while (ssl->buffers.outputBuffer.length > 0) {
- int sent = ssl->CBIOSend(ssl,
- (char*)ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.idx,
- (int)ssl->buffers.outputBuffer.length,
- ssl->IOCB_WriteCtx);
- if (sent < 0) {
- switch (sent) {
-
- case WOLFSSL_CBIO_ERR_WANT_WRITE: /* would block */
- return WANT_WRITE;
-
- case WOLFSSL_CBIO_ERR_CONN_RST: /* connection reset */
- ssl->options.connReset = 1;
- break;
-
- case WOLFSSL_CBIO_ERR_ISR: /* interrupt */
- /* see if we got our timeout */
- #ifdef WOLFSSL_CALLBACKS
- if (ssl->toInfoOn) {
- struct itimerval timeout;
- getitimer(ITIMER_REAL, &timeout);
- if (timeout.it_value.tv_sec == 0 &&
- timeout.it_value.tv_usec == 0) {
- XSTRNCPY(ssl->timeoutInfo.timeoutName,
- "send() timeout", MAX_TIMEOUT_NAME_SZ);
- ssl->timeoutInfo.timeoutName[
- MAX_TIMEOUT_NAME_SZ] = '\0';
-
- WOLFSSL_MSG("Got our timeout");
- return WANT_WRITE;
- }
- }
- #endif
- continue;
-
- case WOLFSSL_CBIO_ERR_CONN_CLOSE: /* epipe / conn closed */
- ssl->options.connReset = 1; /* treat same as reset */
- break;
-
- default:
- return SOCKET_ERROR_E;
- }
-
- return SOCKET_ERROR_E;
- }
-
- if (sent > (int)ssl->buffers.outputBuffer.length) {
- WOLFSSL_MSG("SendBuffered() out of bounds read");
- return SEND_OOB_READ_E;
- }
-
- ssl->buffers.outputBuffer.idx += sent;
- ssl->buffers.outputBuffer.length -= sent;
- }
-
- ssl->buffers.outputBuffer.idx = 0;
-
- if (ssl->buffers.outputBuffer.dynamicFlag)
- ShrinkOutputBuffer(ssl);
-
- return 0;
-}
-
-
-/* Grow the output buffer */
-static WC_INLINE int GrowOutputBuffer(WOLFSSL* ssl, int size)
-{
- byte* tmp;
-#if WOLFSSL_GENERAL_ALIGNMENT > 0
- byte hdrSz = ssl->options.dtls ? DTLS_RECORD_HEADER_SZ :
- RECORD_HEADER_SZ;
- byte align = WOLFSSL_GENERAL_ALIGNMENT;
-#else
- const byte align = WOLFSSL_GENERAL_ALIGNMENT;
-#endif
-
-#if WOLFSSL_GENERAL_ALIGNMENT > 0
- /* the encrypted data will be offset from the front of the buffer by
- the header, if the user wants encrypted alignment they need
- to define their alignment requirement */
-
- if (align) {
- while (align < hdrSz)
- align *= 2;
- }
-#endif
-
- tmp = (byte*)XMALLOC(size + ssl->buffers.outputBuffer.length + align,
- ssl->heap, DYNAMIC_TYPE_OUT_BUFFER);
- WOLFSSL_MSG("growing output buffer\n");
-
- if (tmp == NULL)
- return MEMORY_E;
-
-#if WOLFSSL_GENERAL_ALIGNMENT > 0
- if (align)
- tmp += align - hdrSz;
-#endif
-
-#ifdef WOLFSSL_STATIC_MEMORY
- /* can be from IO memory pool which does not need copy if same buffer */
- if (ssl->buffers.outputBuffer.length &&
- tmp == ssl->buffers.outputBuffer.buffer) {
- ssl->buffers.outputBuffer.bufferSize =
- size + ssl->buffers.outputBuffer.length;
- return 0;
- }
-#endif
-
- if (ssl->buffers.outputBuffer.length)
- XMEMCPY(tmp, ssl->buffers.outputBuffer.buffer,
- ssl->buffers.outputBuffer.length);
-
- if (ssl->buffers.outputBuffer.dynamicFlag)
- XFREE(ssl->buffers.outputBuffer.buffer -
- ssl->buffers.outputBuffer.offset, ssl->heap,
- DYNAMIC_TYPE_OUT_BUFFER);
- ssl->buffers.outputBuffer.dynamicFlag = 1;
-
-#if WOLFSSL_GENERAL_ALIGNMENT > 0
- if (align)
- ssl->buffers.outputBuffer.offset = align - hdrSz;
- else
-#endif
- ssl->buffers.outputBuffer.offset = 0;
-
- ssl->buffers.outputBuffer.buffer = tmp;
- ssl->buffers.outputBuffer.bufferSize = size +
- ssl->buffers.outputBuffer.length;
- return 0;
-}
-
-
-/* Grow the input buffer, should only be to read cert or big app data */
-int GrowInputBuffer(WOLFSSL* ssl, int size, int usedLength)
-{
- byte* tmp;
-#if defined(WOLFSSL_DTLS) || WOLFSSL_GENERAL_ALIGNMENT > 0
- byte align = ssl->options.dtls ? WOLFSSL_GENERAL_ALIGNMENT : 0;
- byte hdrSz = DTLS_RECORD_HEADER_SZ;
-#else
- const byte align = WOLFSSL_GENERAL_ALIGNMENT;
-#endif
-
-#if defined(WOLFSSL_DTLS) || WOLFSSL_GENERAL_ALIGNMENT > 0
- /* the encrypted data will be offset from the front of the buffer by
- the dtls record header, if the user wants encrypted alignment they need
- to define their alignment requirement. in tls we read record header
- to get size of record and put actual data back at front, so don't need */
-
- if (align) {
- while (align < hdrSz)
- align *= 2;
- }
-#endif
-
- if (usedLength < 0 || size < 0) {
- WOLFSSL_MSG("GrowInputBuffer() called with negative number");
- return BAD_FUNC_ARG;
- }
-
- tmp = (byte*)XMALLOC(size + usedLength + align,
- ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- WOLFSSL_MSG("growing input buffer\n");
-
- if (tmp == NULL)
- return MEMORY_E;
-
-#if defined(WOLFSSL_DTLS) || WOLFSSL_GENERAL_ALIGNMENT > 0
- if (align)
- tmp += align - hdrSz;
-#endif
-
-#ifdef WOLFSSL_STATIC_MEMORY
- /* can be from IO memory pool which does not need copy if same buffer */
- if (usedLength && tmp == ssl->buffers.inputBuffer.buffer) {
- ssl->buffers.inputBuffer.bufferSize = size + usedLength;
- ssl->buffers.inputBuffer.idx = 0;
- ssl->buffers.inputBuffer.length = usedLength;
- return 0;
- }
-#endif
-
- if (usedLength)
- XMEMCPY(tmp, ssl->buffers.inputBuffer.buffer +
- ssl->buffers.inputBuffer.idx, usedLength);
-
- if (ssl->buffers.inputBuffer.dynamicFlag)
- XFREE(ssl->buffers.inputBuffer.buffer - ssl->buffers.inputBuffer.offset,
- ssl->heap,DYNAMIC_TYPE_IN_BUFFER);
-
- ssl->buffers.inputBuffer.dynamicFlag = 1;
-#if defined(WOLFSSL_DTLS) || WOLFSSL_GENERAL_ALIGNMENT > 0
- if (align)
- ssl->buffers.inputBuffer.offset = align - hdrSz;
- else
-#endif
- ssl->buffers.inputBuffer.offset = 0;
-
- ssl->buffers.inputBuffer.buffer = tmp;
- ssl->buffers.inputBuffer.bufferSize = size + usedLength;
- ssl->buffers.inputBuffer.idx = 0;
- ssl->buffers.inputBuffer.length = usedLength;
-
- return 0;
-}
-
-
-/* Check available size into output buffer, make room if needed.
- * This function needs to be called before anything gets put
- * into the output buffers since it flushes pending data if it
- * predicts that the msg will exceed MTU. */
-int CheckAvailableSize(WOLFSSL *ssl, int size)
-{
- if (size < 0) {
- WOLFSSL_MSG("CheckAvailableSize() called with negative number");
- return BAD_FUNC_ARG;
- }
-
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls &&
- size + ssl->buffers.outputBuffer.length -
- ssl->buffers.outputBuffer.idx > ssl->dtls_expected_rx) {
- int ret;
- WOLFSSL_MSG("CheckAvailableSize() flushing buffer "
- "to make room for new message");
- if ((ret = SendBuffered(ssl)) != 0) {
- return ret;
- }
- }
-#endif
-
- if (ssl->buffers.outputBuffer.bufferSize - ssl->buffers.outputBuffer.length
- < (word32)size) {
- if (GrowOutputBuffer(ssl, size) < 0)
- return MEMORY_E;
- }
-
- return 0;
-}
-
-
-/* do all verify and sanity checks on record header */
-static int GetRecordHeader(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
- RecordLayerHeader* rh, word16 *size)
-{
- if (!ssl->options.dtls) {
-#ifdef HAVE_FUZZER
- if (ssl->fuzzerCb)
- ssl->fuzzerCb(ssl, input + *inOutIdx, RECORD_HEADER_SZ, FUZZ_HEAD,
- ssl->fuzzerCtx);
-#endif
- XMEMCPY(rh, input + *inOutIdx, RECORD_HEADER_SZ);
- *inOutIdx += RECORD_HEADER_SZ;
- ato16(rh->length, size);
- }
- else {
-#ifdef WOLFSSL_DTLS
-#ifdef HAVE_FUZZER
- if (ssl->fuzzerCb)
- ssl->fuzzerCb(ssl, input + *inOutIdx, DTLS_RECORD_HEADER_SZ,
- FUZZ_HEAD, ssl->fuzzerCtx);
-#endif
- /* type and version in same sport */
- XMEMCPY(rh, input + *inOutIdx, ENUM_LEN + VERSION_SZ);
- *inOutIdx += ENUM_LEN + VERSION_SZ;
- ato16(input + *inOutIdx, &ssl->keys.curEpoch);
- *inOutIdx += OPAQUE16_LEN;
- if (ssl->options.haveMcast) {
- #ifdef WOLFSSL_MULTICAST
- ssl->keys.curPeerId = input[*inOutIdx];
- ssl->keys.curSeq_hi = input[*inOutIdx+1];
- #endif
- }
- else
- ato16(input + *inOutIdx, &ssl->keys.curSeq_hi);
- *inOutIdx += OPAQUE16_LEN;
- ato32(input + *inOutIdx, &ssl->keys.curSeq_lo);
- *inOutIdx += OPAQUE32_LEN; /* advance past rest of seq */
- ato16(input + *inOutIdx, size);
- *inOutIdx += LENGTH_SZ;
-#endif
- }
-
-#ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- if (!DtlsCheckWindow(ssl) ||
- (rh->type == application_data && ssl->keys.curEpoch == 0) ||
- (rh->type == alert && ssl->options.handShakeDone &&
- ssl->keys.curEpoch == 0 && ssl->keys.dtls_epoch != 0)) {
- WOLFSSL_LEAVE("GetRecordHeader()", SEQUENCE_ERROR);
- return SEQUENCE_ERROR;
- }
- }
-#endif
-
- /* catch version mismatch */
-#ifndef WOLFSSL_TLS13
- if (rh->pvMajor != ssl->version.major || rh->pvMinor != ssl->version.minor)
-#else
- if (rh->pvMajor != ssl->version.major ||
- (rh->pvMinor != ssl->version.minor &&
- (!IsAtLeastTLSv1_3(ssl->version) || rh->pvMinor != TLSv1_2_MINOR)
- ))
-#endif
- {
- if (ssl->options.side == WOLFSSL_SERVER_END &&
- ssl->options.acceptState < ACCEPT_FIRST_REPLY_DONE)
-
- WOLFSSL_MSG("Client attempting to connect with different version");
- else if (ssl->options.side == WOLFSSL_CLIENT_END &&
- ssl->options.downgrade &&
- ssl->options.connectState < FIRST_REPLY_DONE)
- WOLFSSL_MSG("Server attempting to accept with different version");
- else if (ssl->options.dtls && rh->type == handshake)
- /* Check the DTLS handshake message RH version later. */
- WOLFSSL_MSG("DTLS handshake, skip RH version number check");
- else {
- WOLFSSL_MSG("SSL version error");
- /* send alert per RFC5246 Appendix E. Backward Compatibility */
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
-#ifdef WOLFSSL_MYSQL_COMPATIBLE
- SendAlert(ssl, alert_fatal, wc_protocol_version);
-#else
- SendAlert(ssl, alert_fatal, protocol_version);
-#endif
- }
- return VERSION_ERROR; /* only use requested version */
- }
- }
-
- /* record layer length check */
-#ifdef HAVE_MAX_FRAGMENT
- if (*size > (ssl->max_fragment + MAX_COMP_EXTRA + MAX_MSG_EXTRA)) {
- SendAlert(ssl, alert_fatal, record_overflow);
- return LENGTH_ERROR;
- }
-#else
- if (*size > (MAX_RECORD_SIZE + MAX_COMP_EXTRA + MAX_MSG_EXTRA))
- return LENGTH_ERROR;
-#endif
-
- /* verify record type here as well */
- switch (rh->type) {
- case handshake:
- case change_cipher_spec:
- case application_data:
- case alert:
- break;
- case no_type:
- default:
- WOLFSSL_MSG("Unknown Record Type");
- return UNKNOWN_RECORD_TYPE;
- }
-
- /* haven't decrypted this record yet */
- ssl->keys.decryptedCur = 0;
-
- return 0;
-}
-
-#ifndef WOLFSSL_NO_TLS12
-static int GetHandShakeHeader(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
- byte *type, word32 *size, word32 totalSz)
-{
- const byte *ptr = input + *inOutIdx;
- (void)ssl;
-
- *inOutIdx += HANDSHAKE_HEADER_SZ;
- if (*inOutIdx > totalSz)
- return BUFFER_E;
-
- *type = ptr[0];
- c24to32(&ptr[1], size);
-
- return 0;
-}
-#endif
-
-#ifdef WOLFSSL_DTLS
-static int GetDtlsHandShakeHeader(WOLFSSL* ssl, const byte* input,
- word32* inOutIdx, byte *type, word32 *size,
- word32 *fragOffset, word32 *fragSz,
- word32 totalSz)
-{
- word32 idx = *inOutIdx;
-
- *inOutIdx += HANDSHAKE_HEADER_SZ + DTLS_HANDSHAKE_EXTRA;
- if (*inOutIdx > totalSz) {
- WOLFSSL_ERROR(BUFFER_E);
- return BUFFER_E;
- }
-
- *type = input[idx++];
- c24to32(input + idx, size);
- idx += OPAQUE24_LEN;
-
- ato16(input + idx, &ssl->keys.dtls_peer_handshake_number);
- idx += DTLS_HANDSHAKE_SEQ_SZ;
-
- c24to32(input + idx, fragOffset);
- idx += DTLS_HANDSHAKE_FRAG_SZ;
- c24to32(input + idx, fragSz);
-
- if (ssl->curRL.pvMajor != ssl->version.major ||
- ssl->curRL.pvMinor != ssl->version.minor) {
-
- if (*type != client_hello && *type != hello_verify_request) {
- WOLFSSL_ERROR(VERSION_ERROR);
- return VERSION_ERROR;
- }
- else {
- WOLFSSL_MSG("DTLS Handshake ignoring hello or verify version");
- }
- }
- return 0;
-}
-#endif
-
-
-#if !defined(NO_OLD_TLS) || \
- (defined(NO_OLD_TLS) && defined(WOLFSSL_ALLOW_TLS_SHA1))
-/* fill with MD5 pad size since biggest required */
-static const byte PAD1[PAD_MD5] =
- { 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
- 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
- 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
- 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
- 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
- 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36
- };
-static const byte PAD2[PAD_MD5] =
- { 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
- 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
- 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
- 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
- 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
- 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c
- };
-#endif /* !NO_OLD_TLS || (NO_OLD_TLS && WOLFSSL_ALLOW_TLS_SHA1) */
-
-#ifndef NO_OLD_TLS
-
-/* calculate MD5 hash for finished */
-#ifdef WOLFSSL_TI_HASH
-#include
-#endif
-
-static int BuildMD5(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
-{
- int ret;
- byte md5_result[WC_MD5_DIGEST_SIZE];
-#ifdef WOLFSSL_SMALL_STACK
- wc_Md5* md5 = (wc_Md5*)XMALLOC(sizeof(wc_Md5), ssl->heap, DYNAMIC_TYPE_HASHCTX);
- if (md5 == NULL)
- return MEMORY_E;
-#else
- wc_Md5 md5[1];
-#endif
-
- /* make md5 inner */
- ret = wc_Md5Copy(&ssl->hsHashes->hashMd5, md5);
- if (ret == 0)
- ret = wc_Md5Update(md5, sender, SIZEOF_SENDER);
- if (ret == 0)
- ret = wc_Md5Update(md5, ssl->arrays->masterSecret,SECRET_LEN);
- if (ret == 0)
- ret = wc_Md5Update(md5, PAD1, PAD_MD5);
- if (ret == 0)
- ret = wc_Md5Final(md5, md5_result);
-
- /* make md5 outer */
- if (ret == 0) {
- ret = wc_InitMd5_ex(md5, ssl->heap, ssl->devId);
- if (ret == 0) {
- ret = wc_Md5Update(md5, ssl->arrays->masterSecret,SECRET_LEN);
- if (ret == 0)
- ret = wc_Md5Update(md5, PAD2, PAD_MD5);
- if (ret == 0)
- ret = wc_Md5Update(md5, md5_result, WC_MD5_DIGEST_SIZE);
- if (ret == 0)
- ret = wc_Md5Final(md5, hashes->md5);
- wc_Md5Free(md5);
- }
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(md5, ssl->heap, DYNAMIC_TYPE_HASHCTX);
-#endif
-
- return ret;
-}
-
-
-/* calculate SHA hash for finished */
-static int BuildSHA(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
-{
- int ret;
- byte sha_result[WC_SHA_DIGEST_SIZE];
-#ifdef WOLFSSL_SMALL_STACK
- wc_Sha* sha = (wc_Sha*)XMALLOC(sizeof(wc_Sha), ssl->heap, DYNAMIC_TYPE_HASHCTX);
- if (sha == NULL)
- return MEMORY_E;
-#else
- wc_Sha sha[1];
-#endif
- /* make sha inner */
- ret = wc_ShaCopy(&ssl->hsHashes->hashSha, sha); /* Save current position */
- if (ret == 0)
- ret = wc_ShaUpdate(sha, sender, SIZEOF_SENDER);
- if (ret == 0)
- ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret,SECRET_LEN);
- if (ret == 0)
- ret = wc_ShaUpdate(sha, PAD1, PAD_SHA);
- if (ret == 0)
- ret = wc_ShaFinal(sha, sha_result);
-
- /* make sha outer */
- if (ret == 0) {
- ret = wc_InitSha_ex(sha, ssl->heap, ssl->devId);
- if (ret == 0) {
- ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret,SECRET_LEN);
- if (ret == 0)
- ret = wc_ShaUpdate(sha, PAD2, PAD_SHA);
- if (ret == 0)
- ret = wc_ShaUpdate(sha, sha_result, WC_SHA_DIGEST_SIZE);
- if (ret == 0)
- ret = wc_ShaFinal(sha, hashes->sha);
- wc_ShaFree(sha);
- }
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(sha, ssl->heap, DYNAMIC_TYPE_HASHCTX);
-#endif
-
- return ret;
-}
-#endif
-
-#ifndef WOLFSSL_NO_TLS12
-
-/* Finished doesn't support SHA512, not SHA512 cipher suites yet */
-static int BuildFinished(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
-{
- int ret = 0;
-
- if (ssl == NULL)
- return BAD_FUNC_ARG;
-
-#ifndef NO_TLS
- if (ssl->options.tls) {
- ret = BuildTlsFinished(ssl, hashes, sender);
- }
-#endif
-#ifndef NO_OLD_TLS
- if (!ssl->options.tls) {
- ret = BuildMD5(ssl, hashes, sender);
- if (ret == 0) {
- ret = BuildSHA(ssl, hashes, sender);
- }
- }
-#endif
-
- return ret;
-}
-
-#endif /* WOLFSSL_NO_TLS12 */
-
-#if !defined(NO_WOLFSSL_SERVER) || !defined(NO_WOLFSSL_CLIENT)
- /* cipher requirements */
- enum {
- REQUIRES_RSA,
- REQUIRES_DHE,
- REQUIRES_ECC,
- REQUIRES_ECC_STATIC,
- REQUIRES_PSK,
- REQUIRES_NTRU,
- REQUIRES_RSA_SIG,
- REQUIRES_AEAD
- };
-
-
-
- /* Does this cipher suite (first, second) have the requirement
- an ephemeral key exchange will still require the key for signing
- the key exchange so ECHDE_RSA requires an rsa key thus rsa_kea */
- static int CipherRequires(byte first, byte second, int requirement)
- {
-
- (void)requirement;
-
-#ifndef WOLFSSL_NO_TLS12
-
-#ifdef HAVE_CHACHA
- if (first == CHACHA_BYTE) {
-
- switch (second) {
- case TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 :
- if (requirement == REQUIRES_ECC)
- return 1;
- break;
-
- case TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- break;
-
- case TLS_ECDHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_ECDHE_ECDSA_WITH_CHACHA20_OLD_POLY1305_SHA256 :
- if (requirement == REQUIRES_ECC)
- return 1;
- break;
-
- case TLS_DHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- break;
-
-
- case TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 :
- if (requirement == REQUIRES_PSK)
- return 1;
- break;
-
- case TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 :
- if (requirement == REQUIRES_PSK)
- return 1;
- break;
-
- case TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 :
- if (requirement == REQUIRES_PSK)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- break;
- }
-
- if (requirement == REQUIRES_AEAD)
- return 1;
-
- }
-#endif /* HAVE_CHACHA */
-
- /* ECC extensions */
- if (first == ECC_BYTE) {
-
- switch (second) {
-#if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
- #ifndef NO_RSA
- case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- if (requirement == REQUIRES_RSA_SIG)
- return 1;
- break;
-
- #ifndef NO_DES3
- case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- if (requirement == REQUIRES_RSA_SIG)
- return 1;
- break;
- #endif /* !NO_DES3 */
-
- #ifndef NO_RC4
- case TLS_ECDHE_RSA_WITH_RC4_128_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_ECDH_RSA_WITH_RC4_128_SHA :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- if (requirement == REQUIRES_RSA_SIG)
- return 1;
- break;
- #endif /* !NO_RC4 */
- #endif /* NO_RSA */
-
- #ifndef NO_DES3
- case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA :
- if (requirement == REQUIRES_ECC)
- return 1;
- break;
-
- case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- break;
- #endif /* !NO_DES3 */
- #ifndef NO_RC4
- case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA :
- if (requirement == REQUIRES_ECC)
- return 1;
- break;
-
- case TLS_ECDH_ECDSA_WITH_RC4_128_SHA :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- break;
- #endif /* !NO_RC4 */
- #ifndef NO_RSA
- case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- if (requirement == REQUIRES_RSA_SIG)
- return 1;
- break;
- #endif /* !NO_RSA */
-
- case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA :
- if (requirement == REQUIRES_ECC)
- return 1;
- break;
-
- case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- break;
-
- case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA :
- if (requirement == REQUIRES_ECC)
- return 1;
- break;
-
- case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- break;
-
- case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 :
- if (requirement == REQUIRES_ECC)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 :
- if (requirement == REQUIRES_ECC)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-#endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
-#ifndef NO_RSA
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
- case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- if (requirement == REQUIRES_RSA_SIG)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 :
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- if (requirement == REQUIRES_RSA_SIG)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
- #ifdef HAVE_AESCCM
- case TLS_RSA_WITH_AES_128_CCM_8 :
- case TLS_RSA_WITH_AES_256_CCM_8 :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_RSA_SIG)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
- #endif /* HAVE_AESCCM */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
-
- case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 :
- case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 :
- case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 :
- if (requirement == REQUIRES_RSA_SIG)
- return 1;
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- break;
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-#endif /* !NO_RSA */
-
-#if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
- case TLS_ECDHE_ECDSA_WITH_AES_128_CCM :
- case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 :
- case TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 :
- if (requirement == REQUIRES_ECC)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 :
- case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 :
- if (requirement == REQUIRES_ECC)
- return 1;
- break;
-
- case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 :
- case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 :
- if (requirement == REQUIRES_ECC)
- return 1;
- if (requirement == REQUIRES_ECC_STATIC)
- return 1;
- break;
-#endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
-#ifndef NO_PSK
- case TLS_PSK_WITH_AES_128_CCM:
- case TLS_PSK_WITH_AES_256_CCM:
- case TLS_PSK_WITH_AES_128_CCM_8:
- case TLS_PSK_WITH_AES_256_CCM_8:
- if (requirement == REQUIRES_PSK)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_DHE_PSK_WITH_AES_128_CCM:
- case TLS_DHE_PSK_WITH_AES_256_CCM:
- if (requirement == REQUIRES_PSK)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-#endif /* !NO_PSK */
-#if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
- case TLS_ECDHE_ECDSA_WITH_NULL_SHA :
- if (requirement == REQUIRES_ECC)
- return 1;
- break;
-
- case TLS_ECDHE_PSK_WITH_NULL_SHA256 :
- if (requirement == REQUIRES_PSK)
- return 1;
- break;
-
- case TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 :
- if (requirement == REQUIRES_PSK)
- return 1;
- break;
-#endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
-#if defined(WOLFSSL_TLS13) && defined(HAVE_NULL_CIPHER)
- case TLS_SHA256_SHA256:
- break;
- case TLS_SHA384_SHA384:
- break;
-#endif
-
- default:
- WOLFSSL_MSG("Unsupported cipher suite, CipherRequires ECC");
- return 0;
- } /* switch */
- } /* if */
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
- /* Distinct TLS v1.3 cipher suites with cipher and digest only. */
- if (first == TLS13_BYTE) {
-
- switch (second) {
-#ifdef WOLFSSL_TLS13
- case TLS_AES_128_GCM_SHA256:
- case TLS_AES_256_GCM_SHA384:
- case TLS_CHACHA20_POLY1305_SHA256:
- case TLS_AES_128_CCM_SHA256:
- case TLS_AES_128_CCM_8_SHA256:
- break;
-#endif
-
- default:
- WOLFSSL_MSG("Unsupported cipher suite, CipherRequires "
- "TLS v1.3");
- return 0;
- }
- }
-
-#ifndef WOLFSSL_NO_TLS12
-
- if (first != ECC_BYTE && first != CHACHA_BYTE &&
- first != TLS13_BYTE) { /* normal suites */
- switch (second) {
-
-#ifndef NO_RSA
- #ifndef NO_RC4
- case SSL_RSA_WITH_RC4_128_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case SSL_RSA_WITH_RC4_128_MD5 :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
- #endif /* NO_RC4 */
-
- case SSL_RSA_WITH_3DES_EDE_CBC_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- #ifdef HAVE_NTRU
- case TLS_NTRU_RSA_WITH_RC4_128_SHA :
- if (requirement == REQUIRES_NTRU)
- return 1;
- break;
- #endif /* HAVE_NTRU */
-
- case TLS_RSA_WITH_AES_128_CBC_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_RSA_WITH_AES_128_CBC_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- #ifdef HAVE_NTRU
- case TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA :
- if (requirement == REQUIRES_NTRU)
- return 1;
- break;
- #endif /* HAVE_NTRU */
-
- case TLS_RSA_WITH_AES_256_CBC_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- #ifdef HAVE_NTRU
- case TLS_NTRU_RSA_WITH_AES_128_CBC_SHA :
- if (requirement == REQUIRES_NTRU)
- return 1;
- break;
- #endif /* HAVE_NTRU */
-
- case TLS_RSA_WITH_AES_256_CBC_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_RSA_WITH_NULL_MD5 :
- case TLS_RSA_WITH_NULL_SHA :
- case TLS_RSA_WITH_NULL_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- #ifdef HAVE_NTRU
- case TLS_NTRU_RSA_WITH_AES_256_CBC_SHA :
- if (requirement == REQUIRES_NTRU)
- return 1;
- break;
- #endif /* HAVE_NTRU */
-
- #ifdef HAVE_IDEA
- case SSL_RSA_WITH_IDEA_CBC_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
- #endif /* HAVE_IDEA */
-#endif /* !NO_RSA */
-
-#ifndef NO_PSK
- case TLS_PSK_WITH_AES_128_GCM_SHA256 :
- if (requirement == REQUIRES_PSK)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_PSK_WITH_AES_256_GCM_SHA384 :
- if (requirement == REQUIRES_PSK)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_PSK_WITH_AES_128_CBC_SHA256 :
- case TLS_PSK_WITH_AES_256_CBC_SHA384 :
- case TLS_PSK_WITH_AES_128_CBC_SHA :
- case TLS_PSK_WITH_AES_256_CBC_SHA :
- case TLS_PSK_WITH_NULL_SHA384 :
- case TLS_PSK_WITH_NULL_SHA256 :
- case TLS_PSK_WITH_NULL_SHA :
- if (requirement == REQUIRES_PSK)
- return 1;
- break;
-
- case TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 :
- case TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 :
- if (requirement == REQUIRES_DHE)
- return 1;
- if (requirement == REQUIRES_PSK)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 :
- case TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 :
- case TLS_DHE_PSK_WITH_NULL_SHA384 :
- case TLS_DHE_PSK_WITH_NULL_SHA256 :
- if (requirement == REQUIRES_DHE)
- return 1;
- if (requirement == REQUIRES_PSK)
- return 1;
- break;
-#endif /* NO_PSK */
-
-#ifndef NO_RSA
- case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- break;
-
- case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- break;
-
- case TLS_DHE_RSA_WITH_AES_128_CBC_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- break;
-
- case TLS_DHE_RSA_WITH_AES_256_CBC_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- break;
-
-#ifndef NO_HC128
- case TLS_RSA_WITH_HC_128_MD5 :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_RSA_WITH_HC_128_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-#endif /* NO_HC128 */
-
-#ifndef NO_RABBIT
- case TLS_RSA_WITH_RABBIT_SHA :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-#endif /* !NO_RABBIT */
-
- case TLS_RSA_WITH_AES_128_GCM_SHA256 :
- case TLS_RSA_WITH_AES_256_GCM_SHA384 :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
- case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 :
- case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-
-#ifdef HAVE_CAMELLIA
- case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA :
- case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA :
- case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 :
- case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- break;
-
- case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA :
- case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA :
- case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 :
- case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 :
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_RSA_SIG)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- break;
-#endif /* HAVE_CAMELLIA */
-
- case TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA:
- if (requirement == REQUIRES_RSA)
- return 1;
- if (requirement == REQUIRES_RSA_SIG)
- return 1;
- if (requirement == REQUIRES_DHE)
- return 1;
- break;
-#endif
-#ifdef HAVE_ANON
- case TLS_DH_anon_WITH_AES_128_CBC_SHA :
- if (requirement == REQUIRES_DHE)
- return 1;
- break;
- case TLS_DH_anon_WITH_AES_256_GCM_SHA384:
- if (requirement == REQUIRES_DHE)
- return 1;
- if (requirement == REQUIRES_AEAD)
- return 1;
- break;
-#endif
-#ifdef WOLFSSL_MULTICAST
- case WDM_WITH_NULL_SHA256 :
- break;
-#endif
-
- default:
- WOLFSSL_MSG("Unsupported cipher suite, CipherRequires");
- return 0;
- } /* switch */
- } /* if ECC / Normal suites else */
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
- return 0;
- }
-
-#endif /* !NO_WOLFSSL_SERVER && !NO_WOLFSSL_CLIENT */
-
-
-#ifndef NO_CERTS
-
-
-/* Match names with wildcards, each wildcard can represent a single name
- component or fragment but not multiple names, i.e.,
- *.z.com matches y.z.com but not x.y.z.com
-
- return 1 on success */
-int MatchDomainName(const char* pattern, int len, const char* str)
-{
- int ret = 0;
- char p, s;
-
- if (pattern == NULL || str == NULL || len <= 0)
- return 0;
-
- while (len > 0) {
-
- p = (char)XTOLOWER((unsigned char)*pattern++);
- if (p == '\0')
- break;
-
- if (p == '*') {
- while (--len > 0 &&
- (p = (char)XTOLOWER((unsigned char)*pattern++)) == '*') {
- }
-
- if (len == 0)
- p = '\0';
-
- while ( (s = (char)XTOLOWER((unsigned char) *str)) != '\0') {
- if (s == p)
- break;
- if (s == '.')
- return 0;
- str++;
- }
- }
- else {
- if (p != (char)XTOLOWER((unsigned char) *str))
- return 0;
- }
-
-
- if (len > 0) {
- str++;
- len--;
- }
- }
-
- if (*str == '\0' && len == 0) {
- ret = 1; /* success */
- }
-
- return ret;
-}
-
-
-/* Check that alternative names, if they exists, match the domain.
- * Fail if there are wild patterns and they didn't match.
- * Check the common name if no alternative names matched.
- *
- * dCert Decoded cert to get the alternative names from.
- * domain Domain name to compare against.
- * checkCN Whether to check the common name.
- * returns 1 : match was found.
- * 0 : no match found.
- * -1 : No matches and wild pattern match failed.
- */
-int CheckForAltNames(DecodedCert* dCert, const char* domain, int* checkCN)
-{
- int match = 0;
- DNS_entry* altName = NULL;
- char *buf;
- word32 len;
-
- WOLFSSL_MSG("Checking AltNames");
-
- if (dCert)
- altName = dCert->altNames;
-
- if (checkCN != NULL) {
- *checkCN = altName == NULL;
- }
-
- while (altName) {
- WOLFSSL_MSG("\tindividual AltName check");
-
-#if defined(OPENSSL_ALL) || defined(WOLFSSL_IP_ALT_NAME)
- char name[WOLFSSL_MAX_IPSTR] = {0};
- /* check if alt name is stored as IP addr octet */
- if (altName->type == ASN_IP_TYPE) {
- char tmp[4];
- int i;
- word32 idx = 0;
- for (i = 0; (idx < WOLFSSL_MAX_IPSTR) && (i < altName->len); i++) {
- XMEMSET(tmp, 0, sizeof(tmp));
- XSNPRINTF(tmp, sizeof(tmp), (altName->len <= 4) ? "%u" : "%02X",
- altName->name[i]);
- idx += XSTRLEN(tmp);
- XSTRNCAT(name, tmp, (altName->len <= 4) ? 3 : 2);
- if ((idx < WOLFSSL_MAX_IPSTR ) && ((i + 1) < altName->len)) {
- name[idx++] = (altName->len <= 4) ? '.' : ':';
- }
- }
- if (idx >= WOLFSSL_MAX_IPSTR) {
- idx = WOLFSSL_MAX_IPSTR -1;
- }
- name[idx] = '\0';
- buf = name;
- len = (word32)XSTRLEN(name);
- }
- else
-#endif /* OPENSSL_ALL || WOLFSSL_IP_ALT_NAME */
- {
- buf = altName->name;
- len = altName->len;
- }
-
- if (MatchDomainName(buf, len, domain)) {
- match = 1;
- if (checkCN != NULL) {
- *checkCN = 0;
- }
- WOLFSSL_MSG("\tmatch found");
- break;
- }
- /* No matches and wild pattern match failed. */
- else if (buf && (len >=1) && (buf[0] == '*')) {
- match = -1;
- WOLFSSL_MSG("\twildcard match failed");
- }
-
- altName = altName->next;
- }
-
- return match;
-}
-
-
-/* Check the domain name matches the subject alternative name or the subject
- * name.
- *
- * dcert Decoded certificate.
- * domainName The domain name.
- * domainNameLen The length of the domain name.
- * returns DOMAIN_NAME_MISMATCH when no match found and 0 on success.
- */
-int CheckHostName(DecodedCert* dCert, const char *domainName, size_t domainNameLen)
-{
- int checkCN;
-
- /* Assume name is NUL terminated. */
- (void)domainNameLen;
-
- if (CheckForAltNames(dCert, domainName, &checkCN) != 1) {
- WOLFSSL_MSG("DomainName match on alt names failed too");
- return DOMAIN_NAME_MISMATCH;
- }
- if (checkCN == 1) {
- if (MatchDomainName(dCert->subjectCN, dCert->subjectCNLen,
- domainName) == 0) {
- WOLFSSL_MSG("DomainName match on common name failed");
- return DOMAIN_NAME_MISMATCH;
- }
- }
-
- return 0;
-}
-
-int CheckIPAddr(DecodedCert* dCert, const char* ipasc)
-{
- WOLFSSL_MSG("Checking IPAddr");
-
- return CheckHostName(dCert, ipasc, (size_t)XSTRLEN(ipasc));
-}
-
-
-#ifdef SESSION_CERTS
-static void AddSessionCertToChain(WOLFSSL_X509_CHAIN* chain,
- byte* certBuf, word32 certSz)
-{
- if (chain->count < MAX_CHAIN_DEPTH &&
- certSz < MAX_X509_SIZE) {
- chain->certs[chain->count].length = certSz;
- XMEMCPY(chain->certs[chain->count].buffer, certBuf, certSz);
- chain->count++;
- }
- else {
- WOLFSSL_MSG("Couldn't store chain cert for session");
- }
-}
-#endif
-
-#if defined(KEEP_PEER_CERT) || defined(SESSION_CERTS) || \
- defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
-/* Copy parts X509 needs from Decoded cert, 0 on success */
-/* The same DecodedCert cannot be copied to WOLFSSL_X509 twice otherwise the
- * altNames pointers could be free'd by second x509 still active by first */
-int CopyDecodedToX509(WOLFSSL_X509* x509, DecodedCert* dCert)
-{
- int ret = 0;
-
- if (x509 == NULL || dCert == NULL ||
- dCert->subjectCNLen < 0)
- return BAD_FUNC_ARG;
-
- if (x509->issuer.name == NULL || x509->subject.name == NULL) {
- WOLFSSL_MSG("Either init was not called on X509 or programming error");
- return BAD_FUNC_ARG;
- }
-
- x509->version = dCert->version + 1;
-
- XSTRNCPY(x509->issuer.name, dCert->issuer, ASN_NAME_MAX);
- x509->issuer.name[ASN_NAME_MAX - 1] = '\0';
- x509->issuer.sz = (int)XSTRLEN(x509->issuer.name) + 1;
-#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- if (dCert->issuerName != NULL) {
- wolfSSL_X509_set_issuer_name(x509,
- (WOLFSSL_X509_NAME*)dCert->issuerName);
- x509->issuer.x509 = x509;
- }
-#endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
-
- XSTRNCPY(x509->subject.name, dCert->subject, ASN_NAME_MAX);
- x509->subject.name[ASN_NAME_MAX - 1] = '\0';
- x509->subject.sz = (int)XSTRLEN(x509->subject.name) + 1;
-#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- if (dCert->subjectName != NULL) {
- wolfSSL_X509_set_subject_name(x509,
- (WOLFSSL_X509_NAME*)dCert->subjectName);
- x509->subject.x509 = x509;
- }
-#endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
-#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX)
- x509->subject.rawLen = min(dCert->subjectRawLen, sizeof(x509->subject.raw));
- XMEMCPY(x509->subject.raw, dCert->subjectRaw, x509->subject.rawLen);
-#ifdef WOLFSSL_CERT_EXT
- x509->issuer.rawLen = min(dCert->issuerRawLen, sizeof(x509->issuer.raw));
- XMEMCPY(x509->issuer.raw, dCert->issuerRaw, x509->issuer.rawLen);
-#endif
-#endif
-
- XMEMCPY(x509->serial, dCert->serial, EXTERNAL_SERIAL_SIZE);
- x509->serialSz = dCert->serialSz;
- if (dCert->subjectCN && dCert->subjectCNLen < ASN_NAME_MAX) {
- XMEMCPY(x509->subjectCN, dCert->subjectCN, dCert->subjectCNLen);
- x509->subjectCN[dCert->subjectCNLen] = '\0';
- }
- else
- x509->subjectCN[0] = '\0';
-
-#ifdef WOLFSSL_SEP
- {
- int minSz = min(dCert->deviceTypeSz, EXTERNAL_SERIAL_SIZE);
- if (minSz > 0) {
- x509->deviceTypeSz = minSz;
- XMEMCPY(x509->deviceType, dCert->deviceType, minSz);
- }
- else
- x509->deviceTypeSz = 0;
- minSz = min(dCert->hwTypeSz, EXTERNAL_SERIAL_SIZE);
- if (minSz > 0) {
- x509->hwTypeSz = minSz;
- XMEMCPY(x509->hwType, dCert->hwType, minSz);
- }
- else
- x509->hwTypeSz = 0;
- minSz = min(dCert->hwSerialNumSz, EXTERNAL_SERIAL_SIZE);
- if (minSz > 0) {
- x509->hwSerialNumSz = minSz;
- XMEMCPY(x509->hwSerialNum, dCert->hwSerialNum, minSz);
- }
- else
- x509->hwSerialNumSz = 0;
- }
-#endif /* WOLFSSL_SEP */
- {
- int minSz;
- if (dCert->beforeDateLen > 0) {
- minSz = min(dCert->beforeDate[1], MAX_DATE_SZ);
- x509->notBefore.type = dCert->beforeDate[0];
- x509->notBefore.length = minSz;
- XMEMCPY(x509->notBefore.data, &dCert->beforeDate[2], minSz);
- }
- else
- x509->notBefore.length = 0;
- if (dCert->afterDateLen > 0) {
- minSz = min(dCert->afterDate[1], MAX_DATE_SZ);
- x509->notAfter.type = dCert->afterDate[0];
- x509->notAfter.length = minSz;
- XMEMCPY(x509->notAfter.data, &dCert->afterDate[2], minSz);
- }
- else
- x509->notAfter.length = 0;
- }
-
- if (dCert->publicKey != NULL && dCert->pubKeySize != 0) {
- x509->pubKey.buffer = (byte*)XMALLOC(
- dCert->pubKeySize, x509->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- if (x509->pubKey.buffer != NULL) {
- x509->pubKeyOID = dCert->keyOID;
- x509->pubKey.length = dCert->pubKeySize;
- XMEMCPY(x509->pubKey.buffer, dCert->publicKey, dCert->pubKeySize);
- }
- else
- ret = MEMORY_E;
-#if defined(OPENSSL_ALL)
- if (ret == 0) {
- x509->key.pubKeyOID = dCert->keyOID;
-
- if (!x509->key.algor) {
- x509->key.algor = wolfSSL_X509_ALGOR_new();
- } else {
- wolfSSL_ASN1_OBJECT_free(x509->key.algor->algorithm);
- }
- if (!(x509->key.algor->algorithm =
- wolfSSL_OBJ_nid2obj(dCert->keyOID))) {
- ret = PUBLIC_KEY_E;
- }
-
- wolfSSL_EVP_PKEY_free(x509->key.pkey);
- if (!(x509->key.pkey = wolfSSL_d2i_PUBKEY(NULL,
- &dCert->publicKey,
- dCert->pubKeySize))) {
- ret = PUBLIC_KEY_E;
- }
- }
-#endif
- }
-
- if (dCert->signature != NULL && dCert->sigLength != 0 &&
- dCert->sigLength <= MAX_ENCODED_SIG_SZ) {
- x509->sig.buffer = (byte*)XMALLOC(
- dCert->sigLength, x509->heap, DYNAMIC_TYPE_SIGNATURE);
- if (x509->sig.buffer == NULL) {
- ret = MEMORY_E;
- }
- else {
- XMEMCPY(x509->sig.buffer, dCert->signature, dCert->sigLength);
- x509->sig.length = dCert->sigLength;
- x509->sigOID = dCert->signatureOID;
- }
-#if defined(OPENSSL_ALL)
- wolfSSL_ASN1_OBJECT_free(x509->algor.algorithm);
- if (!(x509->algor.algorithm =
- wolfSSL_OBJ_nid2obj(dCert->signatureOID))) {
- ret = PUBLIC_KEY_E;
- }
-#endif
- }
-
- /* store cert for potential retrieval */
- if (AllocDer(&x509->derCert, dCert->maxIdx, CERT_TYPE, x509->heap) == 0) {
- XMEMCPY(x509->derCert->buffer, dCert->source, dCert->maxIdx);
- }
- else {
- ret = MEMORY_E;
- }
-
- x509->altNames = dCert->altNames;
- dCert->weOwnAltNames = 0;
- x509->altNamesNext = x509->altNames; /* index hint */
-
-#if (defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)) && \
- !defined(IGNORE_NAME_CONSTRAINTS)
- /* add copies of alternate emails from dCert to X509 */
- if (dCert->altEmailNames != NULL) {
- DNS_entry* cur = dCert->altEmailNames;
-
- while (cur != NULL) {
- if (cur->type == ASN_RFC822_TYPE) {
- DNS_entry* dnsEntry;
- int strLen = cur->len;
-
- dnsEntry = (DNS_entry*)XMALLOC(sizeof(DNS_entry), x509->heap,
- DYNAMIC_TYPE_ALTNAME);
- if (dnsEntry == NULL) {
- WOLFSSL_MSG("\tOut of Memory");
- return MEMORY_E;
- }
-
- dnsEntry->type = ASN_RFC822_TYPE;
- dnsEntry->name = (char*)XMALLOC(strLen + 1, x509->heap,
- DYNAMIC_TYPE_ALTNAME);
- if (dnsEntry->name == NULL) {
- WOLFSSL_MSG("\tOut of Memory");
- XFREE(dnsEntry, x509->heap, DYNAMIC_TYPE_ALTNAME);
- return MEMORY_E;
- }
- dnsEntry->len = strLen;
- XMEMCPY(dnsEntry->name, cur->name, strLen);
- dnsEntry->name[strLen] = '\0';
-
- dnsEntry->next = x509->altNames;
- x509->altNames = dnsEntry;
- }
- cur = cur->next;
- }
- }
-#endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
-
- x509->isCa = dCert->isCA;
-#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- x509->pathLength = dCert->pathLength;
- x509->keyUsage = dCert->extKeyUsage;
-
- x509->CRLdistSet = dCert->extCRLdistSet;
- x509->CRLdistCrit = dCert->extCRLdistCrit;
- x509->CRLInfo = dCert->extCrlInfo;
- x509->CRLInfoSz = dCert->extCrlInfoSz;
- x509->authInfoSet = dCert->extAuthInfoSet;
- x509->authInfoCrit = dCert->extAuthInfoCrit;
- if (dCert->extAuthInfo != NULL && dCert->extAuthInfoSz > 0) {
- x509->authInfo = (byte*)XMALLOC(dCert->extAuthInfoSz, x509->heap,
- DYNAMIC_TYPE_X509_EXT);
- if (x509->authInfo != NULL) {
- XMEMCPY(x509->authInfo, dCert->extAuthInfo, dCert->extAuthInfoSz);
- x509->authInfoSz = dCert->extAuthInfoSz;
- }
- else {
- ret = MEMORY_E;
- }
- }
- #if defined(OPENSSL_ALL) || defined(WOLFSSL_QT)
- if (dCert->extAuthInfoCaIssuer != NULL && dCert->extAuthInfoCaIssuerSz > 0) {
- x509->authInfoCaIssuer = (byte*)XMALLOC(dCert->extAuthInfoCaIssuerSz, x509->heap,
- DYNAMIC_TYPE_X509_EXT);
- if (x509->authInfoCaIssuer != NULL) {
- XMEMCPY(x509->authInfoCaIssuer, dCert->extAuthInfoCaIssuer, dCert->extAuthInfoCaIssuerSz);
- x509->authInfoCaIssuerSz = dCert->extAuthInfoCaIssuerSz;
- }
- else {
- ret = MEMORY_E;
- }
- }
- #endif
- x509->basicConstSet = dCert->extBasicConstSet;
- x509->basicConstCrit = dCert->extBasicConstCrit;
- x509->basicConstPlSet = dCert->pathLengthSet;
- x509->subjAltNameSet = dCert->extSubjAltNameSet;
- x509->subjAltNameCrit = dCert->extSubjAltNameCrit;
- x509->authKeyIdSet = dCert->extAuthKeyIdSet;
- x509->authKeyIdCrit = dCert->extAuthKeyIdCrit;
- if (dCert->extAuthKeyIdSrc != NULL && dCert->extAuthKeyIdSz != 0) {
- x509->authKeyId = (byte*)XMALLOC(dCert->extAuthKeyIdSz, x509->heap,
- DYNAMIC_TYPE_X509_EXT);
- if (x509->authKeyId != NULL) {
- XMEMCPY(x509->authKeyId,
- dCert->extAuthKeyIdSrc, dCert->extAuthKeyIdSz);
- x509->authKeyIdSz = dCert->extAuthKeyIdSz;
- }
- else
- ret = MEMORY_E;
- }
- x509->subjKeyIdSet = dCert->extSubjKeyIdSet;
- x509->subjKeyIdCrit = dCert->extSubjKeyIdCrit;
- if (dCert->extSubjKeyIdSrc != NULL && dCert->extSubjKeyIdSz != 0) {
- x509->subjKeyId = (byte*)XMALLOC(dCert->extSubjKeyIdSz, x509->heap,
- DYNAMIC_TYPE_X509_EXT);
- if (x509->subjKeyId != NULL) {
- XMEMCPY(x509->subjKeyId,
- dCert->extSubjKeyIdSrc, dCert->extSubjKeyIdSz);
- x509->subjKeyIdSz = dCert->extSubjKeyIdSz;
- }
- else
- ret = MEMORY_E;
- }
- x509->keyUsageSet = dCert->extKeyUsageSet;
- x509->keyUsageCrit = dCert->extKeyUsageCrit;
- if (dCert->extExtKeyUsageSrc != NULL && dCert->extExtKeyUsageSz > 0) {
- x509->extKeyUsageSrc = (byte*)XMALLOC(dCert->extExtKeyUsageSz,
- x509->heap, DYNAMIC_TYPE_X509_EXT);
- if (x509->extKeyUsageSrc != NULL) {
- XMEMCPY(x509->extKeyUsageSrc, dCert->extExtKeyUsageSrc,
- dCert->extExtKeyUsageSz);
- x509->extKeyUsageSz = dCert->extExtKeyUsageSz;
- x509->extKeyUsageCrit = dCert->extExtKeyUsageCrit;
- x509->extKeyUsageCount = dCert->extExtKeyUsageCount;
- }
- else {
- ret = MEMORY_E;
- }
- }
- #if defined(WOLFSSL_SEP) || defined(WOLFSSL_QT)
- x509->certPolicySet = dCert->extCertPolicySet;
- x509->certPolicyCrit = dCert->extCertPolicyCrit;
- #endif /* WOLFSSL_SEP || WOLFSSL_QT */
- #ifdef WOLFSSL_CERT_EXT
- {
- int i;
- for (i = 0; i < dCert->extCertPoliciesNb && i < MAX_CERTPOL_NB; i++)
- XMEMCPY(x509->certPolicies[i], dCert->extCertPolicies[i],
- MAX_CERTPOL_SZ);
- x509->certPoliciesNb = dCert->extCertPoliciesNb;
- }
- #endif /* WOLFSSL_CERT_EXT */
-#endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
-#if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448)
- x509->pkCurveOID = dCert->pkCurveOID;
-#endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
- return ret;
-}
-
-#endif /* KEEP_PEER_CERT || SESSION_CERTS */
-
-#if defined(HAVE_CERTIFICATE_STATUS_REQUEST) || \
- (defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2) && !defined(WOLFSSL_NO_TLS12))
-static int ProcessCSR(WOLFSSL* ssl, byte* input, word32* inOutIdx,
- word32 status_length)
-{
- int ret = 0;
- OcspRequest* request;
-
- #ifdef WOLFSSL_SMALL_STACK
- CertStatus* status;
- OcspResponse* response;
- #else
- CertStatus status[1];
- OcspResponse response[1];
- #endif
-
- do {
- #ifdef HAVE_CERTIFICATE_STATUS_REQUEST
- if (ssl->status_request) {
- request = (OcspRequest*)TLSX_CSR_GetRequest(ssl->extensions);
- ssl->status_request = 0;
- break;
- }
- #endif
-
- #ifdef HAVE_CERTIFICATE_STATUS_REQUEST_V2
- if (ssl->status_request_v2) {
- request = (OcspRequest*)TLSX_CSR2_GetRequest(ssl->extensions,
- WOLFSSL_CSR2_OCSP, 0);
- ssl->status_request_v2 = 0;
- break;
- }
- #endif
-
- return BUFFER_ERROR;
- } while(0);
-
- if (request == NULL)
- return BAD_CERTIFICATE_STATUS_ERROR; /* not expected */
-
- #ifdef WOLFSSL_SMALL_STACK
- status = (CertStatus*)XMALLOC(sizeof(CertStatus), ssl->heap,
- DYNAMIC_TYPE_OCSP_STATUS);
- response = (OcspResponse*)XMALLOC(sizeof(OcspResponse), ssl->heap,
- DYNAMIC_TYPE_OCSP_REQUEST);
-
- if (status == NULL || response == NULL) {
- if (status)
- XFREE(status, NULL, DYNAMIC_TYPE_OCSP_STATUS);
- if (response)
- XFREE(response, NULL, DYNAMIC_TYPE_OCSP_REQUEST);
-
- return MEMORY_ERROR;
- }
- #endif
-
- InitOcspResponse(response, status, input +*inOutIdx, status_length);
-
- if (OcspResponseDecode(response, ssl->ctx->cm, ssl->heap, 0) != 0)
- ret = BAD_CERTIFICATE_STATUS_ERROR;
- else if (CompareOcspReqResp(request, response) != 0)
- ret = BAD_CERTIFICATE_STATUS_ERROR;
- else if (response->responseStatus != OCSP_SUCCESSFUL)
- ret = BAD_CERTIFICATE_STATUS_ERROR;
- else if (response->status->status == CERT_REVOKED)
- ret = OCSP_CERT_REVOKED;
- else if (response->status->status != CERT_GOOD)
- ret = BAD_CERTIFICATE_STATUS_ERROR;
-
- *inOutIdx += status_length;
-
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(status, ssl->heap, DYNAMIC_TYPE_OCSP_STATUS);
- XFREE(response, ssl->heap, DYNAMIC_TYPE_OCSP_REQUEST);
- #endif
-
- return ret;
-}
-#endif
-
-
-
-#ifdef HAVE_PK_CALLBACKS
-
-#ifdef HAVE_ECC
- static int SigPkCbEccVerify(const unsigned char* sig, unsigned int sigSz,
- const unsigned char* hash, unsigned int hashSz,
- const unsigned char* keyDer, unsigned int keySz,
- int* result, void* ctx)
- {
- int ret = NOT_COMPILED_IN;
- WOLFSSL* ssl = (WOLFSSL*)ctx;
-
- if (ssl && ssl->ctx->EccVerifyCb) {
- ret = ssl->ctx->EccVerifyCb(ssl, sig, sigSz, hash, hashSz,
- keyDer, keySz, result, ssl->EccVerifyCtx);
- }
- return ret;
- }
-#endif
-#ifndef NO_RSA
- static int SigPkCbRsaVerify(unsigned char* sig, unsigned int sigSz,
- unsigned char** out, const unsigned char* keyDer, unsigned int keySz,
- void* ctx)
- {
- int ret = NOT_COMPILED_IN;
- WOLFSSL* ssl = (WOLFSSL*)ctx;
-
- if (ssl && ssl->ctx->RsaVerifyCb) {
- ret = ssl->ctx->RsaVerifyCb(ssl, sig, sigSz, out, keyDer, keySz,
- ssl->RsaVerifyCtx);
- }
- return ret;
- }
-#endif
-
-int InitSigPkCb(WOLFSSL* ssl, SignatureCtx* sigCtx)
-{
- if (ssl == NULL || sigCtx == NULL)
- return BAD_FUNC_ARG;
-
- /* only setup the verify callback if a PK is set */
-#ifdef HAVE_ECC
- if (ssl->ctx->EccVerifyCb) {
- sigCtx->pkCbEcc = SigPkCbEccVerify;
- sigCtx->pkCtxEcc = ssl;
- }
-#endif
-#ifndef NO_RSA
- /* only setup the verify callback if a PK is set */
- if (ssl->ctx->RsaVerifyCb) {
- sigCtx->pkCbRsa = SigPkCbRsaVerify;
- sigCtx->pkCtxRsa = ssl;
- }
-#endif
-
- return 0;
-}
-
-#endif /* HAVE_PK_CALLBACKS */
-
-
-#if !defined(NO_WOLFSSL_CLIENT) || !defined(WOLFSSL_NO_CLIENT_AUTH)
-static void DoCertFatalAlert(WOLFSSL* ssl, int ret)
-{
- int alertWhy;
- if (ssl == NULL || ret == 0) {
- return;
- }
-
- /* Determine alert reason */
- alertWhy = bad_certificate;
- if (ret == ASN_AFTER_DATE_E || ret == ASN_BEFORE_DATE_E) {
- alertWhy = certificate_expired;
- } else if (ret == ASN_NO_SIGNER_E) {
- alertWhy = unknown_ca;
- }
-#if (defined(OPENSSL_ALL) || defined(WOLFSSL_APACHE_HTTPD))
- else if (ret == CRL_CERT_REVOKED) {
- alertWhy = certificate_revoked;
- }
-#endif
- else if (ret == NO_PEER_CERT) {
-#ifdef WOLFSSL_TLS13
- if (ssl->options.tls1_3) {
- alertWhy = certificate_required;
- }
- else
-#endif
- {
- alertWhy = handshake_failure;
- }
- }
-
- /* send fatal alert and mark connection closed */
- SendAlert(ssl, alert_fatal, alertWhy); /* try to send */
- ssl->options.isClosed = 1;
-}
-
-/* WOLFSSL_ALWAYS_VERIFY_CB: Use verify callback for success or failure cases */
-/* WOLFSSL_VERIFY_CB_ALL_CERTS: Issue callback for all intermediate certificates */
-
-/* Callback is issued for certificate presented in TLS Certificate (11) packet.
- * The intermediates are done first then peer leaf cert last. Use the
- * store->error_depth member to determine index (0=peer, >1 intermediates)
- */
-
-int DoVerifyCallback(WOLFSSL_CERT_MANAGER* cm, WOLFSSL* ssl, int ret,
- ProcPeerCertArgs* args)
-{
- int verify_ok = 0, use_cb = 0;
- void *heap = (ssl != NULL) ? ssl->heap : cm->heap;
-
- /* Determine if verify was okay */
- if (ret == 0) {
- verify_ok = 1;
- use_cb = 1; /* use verify callback on success, in case callback
- * could force fail a cert */
- }
-
- /* Determine if verify callback should be used */
- if (ret != 0) {
- if ((ssl != NULL) && (!ssl->options.verifyNone)) {
- use_cb = 1; /* always report errors */
- }
- }
-#ifdef WOLFSSL_ALWAYS_VERIFY_CB
- /* always use verify callback on peer leaf cert */
- if (args->certIdx == 0) {
- use_cb = 1;
- }
-#endif
-#ifdef WOLFSSL_VERIFY_CB_ALL_CERTS
- /* perform verify callback on other intermediate certs (not just peer) */
- if (args->certIdx > 0) {
- use_cb = 1;
- }
-#endif
-#if defined(OPENSSL_EXTRA)
- /* perform domain name check on the peer certificate */
- if (args->dCertInit && args->dCert && (ssl != NULL) &&
- ssl->param && ssl->param->hostName[0]) {
- /* If altNames names is present, then subject common name is ignored */
- if (args->dCert->altNames != NULL) {
- if (CheckForAltNames(args->dCert, ssl->param->hostName, NULL) != 1) {
- if (ret == 0) {
- ret = DOMAIN_NAME_MISMATCH;
- }
- }
- }
- else {
- if (args->dCert->subjectCN) {
- if (MatchDomainName(args->dCert->subjectCN,
- args->dCert->subjectCNLen,
- ssl->param->hostName) == 0) {
- if (ret == 0) {
- ret = DOMAIN_NAME_MISMATCH;
- }
- }
- }
- }
- }
-
- /* perform IP address check on the peer certificate */
- if ((args->dCertInit != 0) && (args->dCert != NULL) && (ssl != NULL) &&
- (ssl->param != NULL) && (XSTRLEN(ssl->param->ipasc) > 0)) {
- if (CheckIPAddr(args->dCert, ssl->param->ipasc) != 0) {
- if (ret == 0) {
- ret = IPADDR_MISMATCH;
- }
- }
- }
-#endif
- /* if verify callback has been set */
- if ((use_cb && (ssl != NULL) && ((ssl->verifyCallback != NULL)
- #ifdef OPENSSL_ALL
- || (ssl->ctx->verifyCertCb != NULL)
- #endif
- ))
- #ifndef NO_WOLFSSL_CM_VERIFY
- || (cm->verifyCallback != NULL)
- #endif
- ) {
- int verifyFail = 0;
- #ifdef WOLFSSL_SMALL_STACK
- WOLFSSL_X509_STORE_CTX* store;
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- WOLFSSL_X509* x509;
- #endif
- char* domain = NULL;
- #else
- WOLFSSL_X509_STORE_CTX store[1];
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- WOLFSSL_X509 x509[1];
- #endif
- char domain[ASN_NAME_MAX];
- #endif
-
- #ifdef WOLFSSL_SMALL_STACK
- store = (WOLFSSL_X509_STORE_CTX*)XMALLOC(
- sizeof(WOLFSSL_X509_STORE_CTX), heap, DYNAMIC_TYPE_X509_STORE);
- if (store == NULL) {
- return MEMORY_E;
- }
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- x509 = (WOLFSSL_X509*)XMALLOC(sizeof(WOLFSSL_X509), heap,
- DYNAMIC_TYPE_X509);
- if (x509 == NULL) {
- XFREE(store, heap, DYNAMIC_TYPE_X509);
- return MEMORY_E;
- }
- #endif
- domain = (char*)XMALLOC(ASN_NAME_MAX, heap, DYNAMIC_TYPE_STRING);
- if (domain == NULL) {
- XFREE(store, heap, DYNAMIC_TYPE_X509);
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- XFREE(x509, heap, DYNAMIC_TYPE_X509);
- #endif
- return MEMORY_E;
- }
- #endif /* WOLFSSL_SMALL_STACK */
-
- XMEMSET(store, 0, sizeof(WOLFSSL_X509_STORE_CTX));
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- XMEMSET(x509, 0, sizeof(WOLFSSL_X509));
- #endif
- domain[0] = '\0';
-
- /* build subject CN as string to return in store */
- if (args->dCertInit && args->dCert && args->dCert->subjectCN) {
- int subjectCNLen = args->dCert->subjectCNLen;
- if (subjectCNLen > ASN_NAME_MAX-1)
- subjectCNLen = ASN_NAME_MAX-1;
- if (subjectCNLen > 0) {
- XMEMCPY(domain, args->dCert->subjectCN, subjectCNLen);
- domain[subjectCNLen] = '\0';
- }
- }
-
- store->error = ret;
- store->error_depth = args->certIdx;
- store->discardSessionCerts = 0;
- store->domain = domain;
- store->userCtx = (ssl != NULL) ? ssl->verifyCbCtx : cm;
- store->certs = args->certs;
- store->totalCerts = args->totalCerts;
- #if (defined(HAVE_EX_DATA) || defined(FORTRESS)) && \
- (defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL))
- if (wolfSSL_CRYPTO_set_ex_data(&store->ex_data, 0, ssl)
- != WOLFSSL_SUCCESS) {
- WOLFSSL_MSG("Failed to store ssl context in WOLFSSL_X509_STORE_CTX");
- }
- #endif
-
- if (ssl != NULL) {
- #if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)
- if (ssl->ctx->x509_store_pt != NULL) {
- store->store = ssl->ctx->x509_store_pt;
- }
- else {
- store->store = &ssl->ctx->x509_store;
- }
- #if defined(OPENSSL_EXTRA)
- store->depth = args->count;
- store->param = (WOLFSSL_X509_VERIFY_PARAM*)XMALLOC(
- sizeof(WOLFSSL_X509_VERIFY_PARAM),
- heap, DYNAMIC_TYPE_OPENSSL);
- if (store->param == NULL) {
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(domain, heap, DYNAMIC_TYPE_STRING);
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- XFREE(x509, heap, DYNAMIC_TYPE_X509);
- #endif
- XFREE(store, heap, DYNAMIC_TYPE_X509_STORE);
- #endif
- return MEMORY_E;
- }
- XMEMSET(store->param, 0, sizeof(WOLFSSL_X509_VERIFY_PARAM));
- /* Overwrite with non-default param values in SSL */
- if (ssl->param) {
- if (ssl->param->check_time)
- store->param->check_time = ssl->param->check_time;
-
- if (ssl->param->flags)
- store->param->flags = ssl->param->flags;
-
- if (ssl->param->hostName[0])
- XMEMCPY(store->param->hostName, ssl->param->hostName,
- WOLFSSL_HOST_NAME_MAX);
-
- }
- #endif /* defined(OPENSSL_EXTRA) */
- #endif /* defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)*/
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- #ifdef KEEP_PEER_CERT
- if (args->certIdx == 0) {
- store->current_cert = &ssl->peerCert; /* use existing X509 */
- }
- else
- #endif
- {
- InitX509(x509, 0, heap);
- if (CopyDecodedToX509(x509, args->dCert) == 0) {
- store->current_cert = x509;
- }
- else {
- FreeX509(x509);
- }
- }
- #endif
- #ifdef SESSION_CERTS
- store->sesChain = &ssl->session.chain;
- #endif
- }
- #ifndef NO_WOLFSSL_CM_VERIFY
- /* non-zero return code indicates failure override */
- if ((cm != NULL) && (cm->verifyCallback != NULL)) {
- store->userCtx = cm;
- if (cm->verifyCallback(verify_ok, store)) {
- if (ret != 0) {
- WOLFSSL_MSG("Verify CM callback overriding error!");
- ret = 0;
- }
- }
- else {
- verifyFail = 1;
- }
- }
- #endif
-
- if (ssl != NULL) {
- #ifdef OPENSSL_ALL
- /* non-zero return code indicates failure override */
- if (ssl->ctx->verifyCertCb) {
- if (ssl->ctx->verifyCertCb(store, ssl->ctx->verifyCertCbArg)) {
- if (ret != 0) {
- WOLFSSL_MSG("Verify Cert callback overriding error!");
- ret = 0;
- }
- }
- else {
- verifyFail = 1;
- }
- }
- #endif
-
- /* non-zero return code indicates failure override */
- if (ssl->verifyCallback) {
- if (ssl->verifyCallback(verify_ok, store)) {
- if (ret != 0) {
- WOLFSSL_MSG("Verify callback overriding error!");
- ret = 0;
- }
- }
- else {
- verifyFail = 1;
- }
- }
- }
-
- if (verifyFail) {
- /* induce error if one not present */
- if (ret == 0) {
- ret = VERIFY_CERT_ERROR;
- }
-
- /* mark as verify error */
- args->verifyErr = 1;
- }
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- if (args->certIdx > 0)
- FreeX509(x509);
- #endif
- #if defined(SESSION_CERTS) && defined(OPENSSL_EXTRA)
- wolfSSL_sk_X509_free(store->chain);
- store->chain = NULL;
- #endif
- #ifdef SESSION_CERTS
- if ((ssl != NULL) && (store->discardSessionCerts)) {
- WOLFSSL_MSG("Verify callback requested discard sess certs");
- ssl->session.chain.count = 0;
- #ifdef WOLFSSL_ALT_CERT_CHAINS
- ssl->session.altChain.count = 0;
- #endif
- }
- #endif /* SESSION_CERTS */
-#ifdef OPENSSL_EXTRA
- if ((ssl != NULL) && (store->param)) {
- XFREE(store->param, heap, DYNAMIC_TYPE_OPENSSL);
- }
-#endif
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(domain, heap, DYNAMIC_TYPE_STRING);
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- XFREE(x509, heap, DYNAMIC_TYPE_X509);
- #endif
- XFREE(store, heap, DYNAMIC_TYPE_X509_STORE);
- #endif
- }
-
- (void)heap;
-
- return ret;
-}
-
-static void FreeProcPeerCertArgs(WOLFSSL* ssl, void* pArgs)
-{
- ProcPeerCertArgs* args = (ProcPeerCertArgs*)pArgs;
-
- (void)ssl;
-
- if (args->certs) {
- XFREE(args->certs, ssl->heap, DYNAMIC_TYPE_DER);
- args->certs = NULL;
- }
-#ifdef WOLFSSL_TLS13
- if (args->exts) {
- XFREE(args->exts, ssl->heap, DYNAMIC_TYPE_CERT_EXT);
- args->exts = NULL;
- }
-#endif
- if (args->dCert) {
- if (args->dCertInit) {
- FreeDecodedCert(args->dCert);
- args->dCertInit = 0;
- }
- XFREE(args->dCert, ssl->heap, DYNAMIC_TYPE_DCERT);
- args->dCert = NULL;
- }
-}
-
-static int ProcessPeerCertParse(WOLFSSL* ssl, ProcPeerCertArgs* args,
- int certType, int verify, byte** pSubjectHash, int* pAlreadySigner)
-{
- int ret = 0;
- buffer* cert;
- byte* subjectHash = NULL;
- int alreadySigner = 0;
-#ifdef WOLFSSL_SMALL_CERT_VERIFY
- int sigRet = 0;
-#endif
-
- if (ssl == NULL || args == NULL)
- return BAD_FUNC_ARG;
-
- /* check to make sure certificate index is valid */
- if (args->certIdx > args->count)
- return BUFFER_E;
-
- /* check if returning from non-blocking OCSP */
- /* skip this section because cert is already initialized and parsed */
-#ifdef WOLFSSL_NONBLOCK_OCSP
- if (args->lastErr == OCSP_WANT_READ) {
- args->lastErr = 0; /* clear error */
- return 0;
- }
-#endif
-
-#ifdef WOLFSSL_TRUST_PEER_CERT
- /* we have trusted peer */
- if (args->haveTrustPeer) {
- return 0;
- }
-#endif
-
- /* get certificate buffer */
- cert = &args->certs[args->certIdx];
-
-#ifdef WOLFSSL_SMALL_CERT_VERIFY
- if (verify == VERIFY) {
- /* for small cert verify, release decoded cert during signature check to
- reduce peak memory usage */
- if (args->dCert != NULL) {
- if (args->dCertInit) {
- FreeDecodedCert(args->dCert);
- args->dCertInit = 0;
- }
- XFREE(args->dCert, ssl->heap, DYNAMIC_TYPE_DCERT);
- args->dCert = NULL;
- }
-
- /* perform cert parsing and signature check */
- sigRet = CheckCertSignature(cert->buffer, cert->length,
- ssl->heap, ssl->ctx->cm);
- /* fail on errors here after the ParseCertRelative call, so dCert is populated */
-
- /* verify name only in ParseCertRelative below, signature check done */
- verify = VERIFY_NAME;
- }
-#endif /* WOLFSSL_SMALL_CERT_VERIFY */
-
- /* make sure the decoded cert structure is allocated and initialized */
- if (!args->dCertInit
- #ifdef WOLFSSL_SMALL_CERT_VERIFY
- || args->dCert == NULL
- #endif
- ) {
- #ifdef WOLFSSL_SMALL_CERT_VERIFY
- if (args->dCert == NULL) {
- args->dCert = (DecodedCert*)XMALLOC(
- sizeof(DecodedCert), ssl->heap,
- DYNAMIC_TYPE_DCERT);
- if (args->dCert == NULL) {
- return MEMORY_E;
- }
- }
- #endif
-
- InitDecodedCert(args->dCert, cert->buffer, cert->length, ssl->heap);
-
- args->dCertInit = 1;
- args->dCert->sigCtx.devId = ssl->devId;
- #ifdef WOLFSSL_ASYNC_CRYPT
- args->dCert->sigCtx.asyncCtx = ssl;
- #endif
-
- #ifdef HAVE_PK_CALLBACKS
- /* setup the PK callback context */
- ret = InitSigPkCb(ssl, &args->dCert->sigCtx);
- if (ret != 0)
- return ret;
- #endif
- }
-
- /* Parse Certificate */
- ret = ParseCertRelative(args->dCert, certType, verify, ssl->ctx->cm);
- /* perform below checks for date failure cases */
- if (ret == 0 || ret == ASN_BEFORE_DATE_E || ret == ASN_AFTER_DATE_E) {
- /* get subject and determine if already loaded */
- #ifndef NO_SKID
- if (args->dCert->extAuthKeyIdSet)
- subjectHash = args->dCert->extSubjKeyId;
- else
- #endif
- subjectHash = args->dCert->subjectHash;
- alreadySigner = AlreadySigner(ssl->ctx->cm, subjectHash);
- }
-
-#ifdef WOLFSSL_SMALL_CERT_VERIFY
- /* get signature check failures from above */
- if (ret == 0)
- ret = sigRet;
-#endif
-
- if (pSubjectHash)
- *pSubjectHash = subjectHash;
- if (pAlreadySigner)
- *pAlreadySigner = alreadySigner;
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl,
- args->dCert->sigCtx.asyncDev);
- }
-#endif
-
- return ret;
-}
-
-/* Check key sizes for certs. Is redundant check since
- ProcessBuffer also performs this check. */
-static int ProcessPeerCertCheckKey(WOLFSSL* ssl, ProcPeerCertArgs* args)
-{
- int ret = 0;
-
- if (ssl->options.verifyNone) {
- return ret;
- }
-
- switch (args->dCert->keyOID) {
- #ifndef NO_RSA
- case RSAk:
- if (ssl->options.minRsaKeySz < 0 ||
- args->dCert->pubKeySize <
- (word16)ssl->options.minRsaKeySz) {
- WOLFSSL_MSG(
- "RSA key size in cert chain error");
- ret = RSA_KEY_SIZE_E;
- }
- break;
- #endif /* !NO_RSA */
- #ifdef HAVE_ECC
- case ECDSAk:
- if (ssl->options.minEccKeySz < 0 ||
- args->dCert->pubKeySize <
- (word16)ssl->options.minEccKeySz) {
- WOLFSSL_MSG(
- "ECC key size in cert chain error");
- ret = ECC_KEY_SIZE_E;
- }
- break;
- #endif /* HAVE_ECC */
- #ifdef HAVE_ED25519
- case ED25519k:
- if (ssl->options.minEccKeySz < 0 ||
- ED25519_KEY_SIZE < (word16)ssl->options.minEccKeySz) {
- WOLFSSL_MSG(
- "ECC key size in cert chain error");
- ret = ECC_KEY_SIZE_E;
- }
- break;
- #endif /* HAVE_ED25519 */
- #ifdef HAVE_ED448
- case ED448k:
- if (ssl->options.minEccKeySz < 0 ||
- ED448_KEY_SIZE < (word16)ssl->options.minEccKeySz) {
- WOLFSSL_MSG(
- "ECC key size in cert chain error");
- ret = ECC_KEY_SIZE_E;
- }
- break;
- #endif /* HAVE_ED448 */
- default:
- WOLFSSL_MSG("Key size not checked");
- /* key not being checked for size if not in
- switch */
- break;
- }
-
- return ret;
-}
-
-int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
- word32 totalSz)
-{
- int ret = 0;
-#ifdef WOLFSSL_ASYNC_CRYPT
- ProcPeerCertArgs* args = (ProcPeerCertArgs*)ssl->async.args;
- typedef char args_test[sizeof(ssl->async.args) >= sizeof(*args) ? 1 : -1];
- (void)sizeof(args_test);
-#elif defined(WOLFSSL_NONBLOCK_OCSP)
- ProcPeerCertArgs* args = ssl->nonblockarg;
-#elif defined(WOLFSSL_SMALL_STACK)
- ProcPeerCertArgs* args = NULL;
-#else
- ProcPeerCertArgs args[1];
-#endif
- byte* subjectHash = NULL;
- int alreadySigner = 0;
-
- WOLFSSL_ENTER("ProcessPeerCerts");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
- if (ret != WC_NOT_PENDING_E) {
- /* Check for error */
- if (ret < 0)
- goto exit_ppc;
- }
- else
-#elif defined(WOLFSSL_NONBLOCK_OCSP)
- if (args == NULL) {
- args = (ProcPeerCertArgs*)XMALLOC(
- sizeof(ProcPeerCertArgs), ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
- if (args == NULL) {
- ERROR_OUT(MEMORY_E, exit_ppc);
- }
- }
- if (ssl->nonblockarg == NULL) /* new args */
-#elif defined(WOLFSSL_SMALL_STACK)
- args = (ProcPeerCertArgs*)XMALLOC(
- sizeof(ProcPeerCertArgs), ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
- if (args == NULL) {
- ERROR_OUT(MEMORY_E, exit_ppc);
- }
-#endif
- {
- /* Reset state */
- ret = 0;
- ssl->options.asyncState = TLS_ASYNC_BEGIN;
- XMEMSET(args, 0, sizeof(ProcPeerCertArgs));
- args->idx = *inOutIdx;
- args->begin = *inOutIdx;
- #ifdef WOLFSSL_ASYNC_CRYPT
- ssl->async.freeArgs = FreeProcPeerCertArgs;
- #elif defined(WOLFSSL_NONBLOCK_OCSP)
- ssl->nonblockarg = args;
- #endif
- }
-
- switch (ssl->options.asyncState)
- {
- case TLS_ASYNC_BEGIN:
- {
- word32 listSz;
-
- #ifdef WOLFSSL_CALLBACKS
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "Certificate");
- if (ssl->toInfoOn)
- AddLateName("Certificate", &ssl->timeoutInfo);
- #endif
-
- #ifdef WOLFSSL_TLS13
- if (ssl->options.tls1_3) {
- byte ctxSz;
-
- /* Certificate Request Context */
- if ((args->idx - args->begin) + OPAQUE8_LEN > totalSz)
- ERROR_OUT(BUFFER_ERROR, exit_ppc);
- ctxSz = *(input + args->idx);
- args->idx++;
- if ((args->idx - args->begin) + ctxSz > totalSz)
- ERROR_OUT(BUFFER_ERROR, exit_ppc);
- #ifndef NO_WOLFSSL_CLIENT
- /* Must be empty when received from server. */
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- if (ctxSz != 0) {
- ERROR_OUT(INVALID_CERT_CTX_E, exit_ppc);
- }
- }
- #endif
- #ifndef NO_WOLFSSL_SERVER
- /* Must contain value sent in request. */
- if (ssl->options.side == WOLFSSL_SERVER_END) {
- if (ssl->options.handShakeState != HANDSHAKE_DONE &&
- ctxSz != 0) {
- ERROR_OUT(INVALID_CERT_CTX_E, exit_ppc);
- }
- else if (ssl->options.handShakeState == HANDSHAKE_DONE) {
- #ifdef WOLFSSL_POST_HANDSHAKE_AUTH
- CertReqCtx* curr = ssl->certReqCtx;
- CertReqCtx* prev = NULL;
- while (curr != NULL) {
- if ((ctxSz == curr->len) &&
- XMEMCMP(&curr->ctx, input + args->idx, ctxSz)
- == 0) {
- if (prev != NULL)
- prev->next = curr->next;
- else
- ssl->certReqCtx = curr->next;
- XFREE(curr, ssl->heap,
- DYNAMIC_TYPE_TMP_BUFFER);
- break;
- }
- prev = curr;
- curr = curr->next;
- }
- if (curr == NULL)
- #endif
- ERROR_OUT(INVALID_CERT_CTX_E, exit_ppc);
- }
- }
- #endif
- args->idx += ctxSz;
-
- #ifdef OPENSSL_EXTRA
- /* allocate buffer for cert extensions */
- args->exts = (buffer*)XMALLOC(sizeof(buffer) *
- (ssl->verifyDepth + 1), ssl->heap, DYNAMIC_TYPE_CERT_EXT);
- if (args->exts == NULL) {
- ERROR_OUT(MEMORY_E, exit_ppc);
- }
- #else
- /* allocate buffer for cert extensions */
- args->exts = (buffer*)XMALLOC(sizeof(buffer) * MAX_CHAIN_DEPTH,
- ssl->heap, DYNAMIC_TYPE_CERT_EXT);
- if (args->exts == NULL) {
- ERROR_OUT(MEMORY_E, exit_ppc);
- }
- #endif
- }
- #endif
-
- /* allocate buffer for certs */
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- args->certs = (buffer*)XMALLOC(sizeof(buffer) *
- (ssl->verifyDepth + 1), ssl->heap, DYNAMIC_TYPE_DER);
- if (args->certs == NULL) {
- ERROR_OUT(MEMORY_E, exit_ppc);
- }
- XMEMSET(args->certs, 0, sizeof(buffer) * (ssl->verifyDepth + 1));
- #else
- args->certs = (buffer*)XMALLOC(sizeof(buffer) * MAX_CHAIN_DEPTH,
- ssl->heap, DYNAMIC_TYPE_DER);
- if (args->certs == NULL) {
- ERROR_OUT(MEMORY_E, exit_ppc);
- }
- XMEMSET(args->certs, 0, sizeof(buffer) * MAX_CHAIN_DEPTH);
- #endif /* OPENSSL_EXTRA */
-
- /* Certificate List */
- if ((args->idx - args->begin) + OPAQUE24_LEN > totalSz) {
- ERROR_OUT(BUFFER_ERROR, exit_ppc);
- }
- c24to32(input + args->idx, &listSz);
- args->idx += OPAQUE24_LEN;
- if (listSz > MAX_CERTIFICATE_SZ) {
- ERROR_OUT(BUFFER_ERROR, exit_ppc);
- }
- if ((args->idx - args->begin) + listSz != totalSz) {
- ERROR_OUT(BUFFER_ERROR, exit_ppc);
- }
-
- WOLFSSL_MSG("Loading peer's cert chain");
- /* first put cert chain into buffer so can verify top down
- we're sent bottom up */
- while (listSz) {
- word32 certSz;
-
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- if (args->totalCerts > ssl->verifyDepth) {
- ssl->peerVerifyRet = X509_V_ERR_CERT_CHAIN_TOO_LONG;
- ERROR_OUT(MAX_CHAIN_ERROR, exit_ppc);
- }
- #else
- if (args->totalCerts >= ssl->verifyDepth ||
- args->totalCerts >= MAX_CHAIN_DEPTH) {
- ERROR_OUT(MAX_CHAIN_ERROR, exit_ppc);
- }
- #endif
-
- if ((args->idx - args->begin) + OPAQUE24_LEN > totalSz) {
- ERROR_OUT(BUFFER_ERROR, exit_ppc);
- }
-
- c24to32(input + args->idx, &certSz);
- args->idx += OPAQUE24_LEN;
-
- if ((args->idx - args->begin) + certSz > totalSz) {
- ERROR_OUT(BUFFER_ERROR, exit_ppc);
- }
-
- args->certs[args->totalCerts].length = certSz;
- args->certs[args->totalCerts].buffer = input + args->idx;
-
- #ifdef SESSION_CERTS
- AddSessionCertToChain(&ssl->session.chain,
- input + args->idx, certSz);
- #endif /* SESSION_CERTS */
-
- args->idx += certSz;
- listSz -= certSz + CERT_HEADER_SZ;
-
- #ifdef WOLFSSL_TLS13
- /* Extensions */
- if (ssl->options.tls1_3) {
- word16 extSz;
-
- if ((args->idx - args->begin) + OPAQUE16_LEN > totalSz) {
- ERROR_OUT(BUFFER_ERROR, exit_ppc);
- }
- ato16(input + args->idx, &extSz);
- args->idx += OPAQUE16_LEN;
- if ((args->idx - args->begin) + extSz > totalSz) {
- ERROR_OUT(BUFFER_ERROR, exit_ppc);
- }
- /* Store extension data info for later processing. */
- args->exts[args->totalCerts].length = extSz;
- args->exts[args->totalCerts].buffer = input + args->idx;
- args->idx += extSz;
- listSz -= extSz + OPAQUE16_LEN;
- ret = TLSX_Parse(ssl, args->exts[args->totalCerts].buffer,
- args->exts[args->totalCerts].length, certificate, NULL);
- if (ret < 0) {
- ERROR_OUT(ret, exit_ppc);
- }
- }
- #endif
-
- args->totalCerts++;
- WOLFSSL_MSG("\tPut another cert into chain");
- } /* while (listSz) */
-
- args->count = args->totalCerts;
- args->certIdx = 0; /* select peer cert (first one) */
-
- if (args->count == 0 && (ssl->options.mutualAuth ||
- (ssl->options.failNoCert && IsAtLeastTLSv1_3(ssl->version))) &&
- ssl->options.side == WOLFSSL_SERVER_END) {
- ret = NO_PEER_CERT;
- DoCertFatalAlert(ssl, ret);
- }
-
- args->dCertInit = 0;
- #ifndef WOLFSSL_SMALL_CERT_VERIFY
- args->dCert = (DecodedCert*)XMALLOC(sizeof(DecodedCert), ssl->heap,
- DYNAMIC_TYPE_DCERT);
- if (args->dCert == NULL) {
- ERROR_OUT(MEMORY_E, exit_ppc);
- }
- XMEMSET(args->dCert, 0, sizeof(DecodedCert));
- #endif
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_BUILD;
- } /* case TLS_ASYNC_BEGIN */
- FALL_THROUGH;
-
- case TLS_ASYNC_BUILD:
- {
- if (args->count > 0) {
-
- /* check for trusted peer and get untrustedDepth */
- #if defined(WOLFSSL_TRUST_PEER_CERT) || defined(OPENSSL_EXTRA)
- if (args->certIdx == 0) {
- #ifdef WOLFSSL_TRUST_PEER_CERT
- TrustedPeerCert* tp;
- int matchType = WC_MATCH_NAME;
- #endif
-
- ret = ProcessPeerCertParse(ssl, args, CERT_TYPE, NO_VERIFY,
- &subjectHash, &alreadySigner);
- if (ret != 0)
- goto exit_ppc;
-
- #ifdef OPENSSL_EXTRA
- /* Determine untrusted depth */
- if (!alreadySigner && (!args->dCert ||
- !args->dCertInit || !args->dCert->selfSigned)) {
- args->untrustedDepth = 1;
- }
- #endif
-
- #ifdef WOLFSSL_TRUST_PEER_CERT
- #ifndef NO_SKID
- if (args->dCert->extAuthKeyIdSet)
- matchType = WC_MATCH_SKID;
- #endif
- tp = GetTrustedPeer(ssl->ctx->cm, subjectHash, matchType);
- WOLFSSL_MSG("Checking for trusted peer cert");
-
- if (tp && MatchTrustedPeer(tp, args->dCert)) {
- WOLFSSL_MSG("Found matching trusted peer cert");
- args->haveTrustPeer = 1;
- }
- else if (tp == NULL) {
- /* no trusted peer cert */
- WOLFSSL_MSG("No matching trusted peer cert. Checking CAs");
- }
- else {
- WOLFSSL_MSG("Trusted peer cert did not match!");
- }
- if (!args->haveTrustPeer)
- #endif
- {
- /* free cert if not trusted peer */
- FreeDecodedCert(args->dCert);
- args->dCertInit = 0;
- }
- }
- #endif /* WOLFSSL_TRUST_PEER_CERT || OPENSSL_EXTRA */
-
- /* check certificate up to peer's first */
- /* do not verify chain if trusted peer cert found */
- while (args->count > 1
- #ifdef WOLFSSL_TRUST_PEER_CERT
- && !args->haveTrustPeer
- #endif /* WOLFSSL_TRUST_PEER_CERT */
- ) {
- int skipAddCA = 0;
-
- /* select last certificate */
- args->certIdx = args->count - 1;
-
- ret = ProcessPeerCertParse(ssl, args, CERT_TYPE,
- !ssl->options.verifyNone ? VERIFY : NO_VERIFY,
- &subjectHash, &alreadySigner);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E)
- goto exit_ppc;
- #endif
- if (ret == 0) {
- ret = ProcessPeerCertCheckKey(ssl, args);
- }
-
- if (ret == 0 && args->dCert->isCA == 0) {
- WOLFSSL_MSG("Chain cert is not a CA, not adding as one");
- }
- else if (ret == 0 && ssl->options.verifyNone) {
- WOLFSSL_MSG("Chain cert not verified by option, "
- "not adding as CA");
- }
- else if (ret == 0) {
- #ifdef OPENSSL_EXTRA
- if (args->certIdx > args->untrustedDepth) {
- args->untrustedDepth = (char)args->certIdx + 1;
- }
- #endif
-
- if (alreadySigner) {
- WOLFSSL_MSG("Verified CA from chain and already had it");
- }
- }
- else {
- WOLFSSL_MSG("Failed to verify CA from chain");
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- ssl->peerVerifyRet = X509_V_ERR_INVALID_CA;
- #endif
- }
-
- #if defined(HAVE_OCSP) || defined(HAVE_CRL)
- if (ret == 0) {
- int doCrlLookup = 1;
- #ifdef HAVE_OCSP
- #ifdef HAVE_CERTIFICATE_STATUS_REQUEST_V2
- if (ssl->status_request_v2) {
- ret = TLSX_CSR2_InitRequests(ssl->extensions,
- args->dCert, 0, ssl->heap);
- }
- else /* skips OCSP and force CRL check */
- #endif /* HAVE_CERTIFICATE_STATUS_REQUEST_V2 */
- if (ssl->ctx->cm->ocspEnabled &&
- ssl->ctx->cm->ocspCheckAll) {
- WOLFSSL_MSG("Doing Non Leaf OCSP check");
- ret = CheckCertOCSP_ex(ssl->ctx->cm->ocsp,
- args->dCert, NULL, ssl);
- #ifdef WOLFSSL_NONBLOCK_OCSP
- if (ret == OCSP_WANT_READ) {
- args->lastErr = ret;
- goto exit_ppc;
- }
- #endif
- doCrlLookup = (ret == OCSP_CERT_UNKNOWN);
- if (ret != 0) {
- doCrlLookup = 0;
- WOLFSSL_MSG("\tOCSP Lookup not ok");
- }
- }
- #endif /* HAVE_OCSP */
-
- #ifdef HAVE_CRL
- if (ret == 0 && doCrlLookup &&
- ssl->ctx->cm->crlEnabled &&
- ssl->ctx->cm->crlCheckAll) {
- WOLFSSL_MSG("Doing Non Leaf CRL check");
- ret = CheckCertCRL(ssl->ctx->cm->crl, args->dCert);
- #ifdef WOLFSSL_NONBLOCK_OCSP
- if (ret == OCSP_WANT_READ) {
- args->lastErr = ret;
- goto exit_ppc;
- }
- #endif
- if (ret != 0) {
- WOLFSSL_MSG("\tCRL check not ok");
- }
- }
- #endif /* HAVE_CRL */
- (void)doCrlLookup;
- }
- #endif /* HAVE_OCSP || HAVE_CRL */
-
- /* Do verify callback */
- ret = DoVerifyCallback(ssl->ctx->cm, ssl, ret, args);
- if (ssl->options.verifyNone &&
- (ret == CRL_MISSING || ret == CRL_CERT_REVOKED)) {
- WOLFSSL_MSG("Ignoring CRL problem based on verify setting");
- ret = ssl->error = 0;
- }
-
- #ifdef WOLFSSL_ALT_CERT_CHAINS
- /* For alternate cert chain, its okay for a CA cert to fail
- with ASN_NO_SIGNER_E here. The "alternate" certificate
- chain mode only requires that the peer certificate
- validate to a trusted CA */
- if (ret != 0 && args->dCert->isCA) {
- if (ret == ASN_NO_SIGNER_E) {
- if (!ssl->options.usingAltCertChain) {
- WOLFSSL_MSG("Trying alternate cert chain");
- ssl->options.usingAltCertChain = 1;
- }
-
- ret = 0; /* clear errors and continue */
- args->verifyErr = 0;
- }
-
- /* do not add to certificate manager */
- skipAddCA = 1;
- }
- #endif /* WOLFSSL_ALT_CERT_CHAINS */
-
- /* If valid CA then add to Certificate Manager */
- if (ret == 0 && args->dCert->isCA &&
- !ssl->options.verifyNone && !skipAddCA) {
- buffer* cert = &args->certs[args->certIdx];
-
- /* Is valid CA */
- #if defined(SESSION_CERTS) && defined(WOLFSSL_ALT_CERT_CHAINS)
- /* if using alternate chain, store the cert used */
- if (ssl->options.usingAltCertChain) {
- AddSessionCertToChain(&ssl->session.altChain,
- cert->buffer, cert->length);
- }
- #endif /* SESSION_CERTS && WOLFSSL_ALT_CERT_CHAINS */
- if (!alreadySigner) {
- DerBuffer* add = NULL;
- ret = AllocDer(&add, cert->length, CA_TYPE, ssl->heap);
- if (ret < 0)
- goto exit_ppc;
-
- XMEMCPY(add->buffer, cert->buffer, cert->length);
-
- /* CA already verified above in ParseCertRelative */
- WOLFSSL_MSG("Adding CA from chain");
- ret = AddCA(ssl->ctx->cm, &add, WOLFSSL_CHAIN_CA,
- NO_VERIFY);
- if (ret == WOLFSSL_SUCCESS) {
- ret = 0;
- }
- }
- }
-
- /* Handle error codes */
- if (ret != 0) {
- if (!ssl->options.verifyNone) {
- DoCertFatalAlert(ssl, ret);
- }
- ssl->error = ret; /* Report SSL error */
-
- if (args->lastErr == 0) {
- args->lastErr = ret; /* save error from last time */
- ret = 0; /* reset error */
- }
- }
-
- FreeDecodedCert(args->dCert);
- args->dCertInit = 0;
- args->count--;
- } /* while (count > 0 && !args->haveTrustPeer) */
- } /* if (count > 0) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_ppc;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_DO;
- } /* case TLS_ASYNC_BUILD */
- FALL_THROUGH;
-
- case TLS_ASYNC_DO:
- {
- /* peer's, may not have one if blank client cert sent by TLSv1.2 */
- if (args->count > 0) {
- WOLFSSL_MSG("Verifying Peer's cert");
-
- /* select peer cert (first one) */
- args->certIdx = 0;
-
- ret = ProcessPeerCertParse(ssl, args, CERT_TYPE,
- !ssl->options.verifyNone ? VERIFY : NO_VERIFY,
- &subjectHash, &alreadySigner);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E)
- goto exit_ppc;
- #endif
- if (ret == 0) {
- WOLFSSL_MSG("Verified Peer's cert");
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- ssl->peerVerifyRet = X509_V_OK;
- #endif
- #if defined(SESSION_CERTS) && defined(WOLFSSL_ALT_CERT_CHAINS)
- /* if using alternate chain, store the cert used */
- if (ssl->options.usingAltCertChain) {
- buffer* cert = &args->certs[args->certIdx];
- AddSessionCertToChain(&ssl->session.altChain,
- cert->buffer, cert->length);
- }
- #endif /* SESSION_CERTS && WOLFSSL_ALT_CERT_CHAINS */
-
- /* check if fatal error */
- if (args->verifyErr) {
- args->fatal = 1;
- if (ret == 0) {
- ret = args->lastErr;
- }
- }
- else {
- args->fatal = 0;
- }
- }
- else if (ret == ASN_PARSE_E || ret == BUFFER_E) {
- WOLFSSL_MSG("Got Peer cert ASN PARSE or BUFFER ERROR");
- #if defined(WOLFSSL_EXTRA_ALERTS) || defined(OPENSSL_EXTRA) || \
- defined(OPENSSL_EXTRA_X509_SMALL)
- DoCertFatalAlert(ssl, ret);
- #endif
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- ssl->peerVerifyRet = X509_V_ERR_CERT_REJECTED;
- #endif
- args->fatal = 1;
- }
- else {
- WOLFSSL_MSG("Failed to verify Peer's cert");
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- ssl->peerVerifyRet = X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE;
- #endif
- if (ssl->verifyCallback) {
- WOLFSSL_MSG(
- "\tCallback override available, will continue");
- /* check if fatal error */
- args->fatal = (args->verifyErr) ? 1 : 0;
- #if defined(WOLFSSL_EXTRA_ALERTS) || \
- defined(OPENSSL_EXTRA) || \
- defined(OPENSSL_EXTRA_X509_SMALL)
- if (args->fatal)
- DoCertFatalAlert(ssl, ret);
- #endif
- }
- else {
- WOLFSSL_MSG("\tNo callback override available, fatal");
- args->fatal = 1;
- #if defined(WOLFSSL_EXTRA_ALERTS) || \
- defined(OPENSSL_EXTRA) || \
- defined(OPENSSL_EXTRA_X509_SMALL)
- DoCertFatalAlert(ssl, ret);
- #endif
- }
- }
-
- #ifdef HAVE_SECURE_RENEGOTIATION
- if (args->fatal == 0 && !IsAtLeastTLSv1_3(ssl->version)
- && ssl->secure_renegotiation
- && ssl->secure_renegotiation->enabled) {
-
- if (IsEncryptionOn(ssl, 0)) {
- /* compare against previous time */
- if (ssl->secure_renegotiation->subject_hash_set) {
- if (XMEMCMP(args->dCert->subjectHash,
- ssl->secure_renegotiation->subject_hash,
- KEYID_SIZE) != 0) {
- WOLFSSL_MSG(
- "Peer sent different cert during scr, fatal");
- args->fatal = 1;
- ret = SCR_DIFFERENT_CERT_E;
- }
- }
- }
-
- /* cache peer's hash */
- if (args->fatal == 0) {
- XMEMCPY(ssl->secure_renegotiation->subject_hash,
- args->dCert->subjectHash, KEYID_SIZE);
- ssl->secure_renegotiation->subject_hash_set = 1;
- }
- }
- #endif /* HAVE_SECURE_RENEGOTIATION */
- } /* if (count > 0) */
-
- /* Check for error */
- if (args->fatal && ret != 0) {
- goto exit_ppc;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_VERIFY;
- } /* case TLS_ASYNC_DO */
- FALL_THROUGH;
-
- case TLS_ASYNC_VERIFY:
- {
- if (args->count > 0) {
- #if defined(HAVE_OCSP) || defined(HAVE_CRL)
- if (args->fatal == 0) {
- int doLookup = 1;
-
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- #ifdef HAVE_CERTIFICATE_STATUS_REQUEST
- if (ssl->status_request) {
- args->fatal = TLSX_CSR_InitRequest(ssl->extensions,
- args->dCert, ssl->heap);
- doLookup = 0;
- #if defined(WOLFSSL_TLS13) && !defined(NO_WOLFSSL_SERVER)
- if (ssl->options.tls1_3) {
- TLSX* ext = TLSX_Find(ssl->extensions,
- TLSX_STATUS_REQUEST);
- if (ext != NULL) {
- word32 idx = 0;
- CertificateStatusRequest* csr =
- (CertificateStatusRequest*)ext->data;
- ret = ProcessCSR(ssl, csr->response.buffer,
- &idx, csr->response.length);
- if (ret < 0)
- goto exit_ppc;
- }
- }
- #endif
- }
- #endif /* HAVE_CERTIFICATE_STATUS_REQUEST */
- #ifdef HAVE_CERTIFICATE_STATUS_REQUEST_V2
- if (ssl->status_request_v2) {
- args->fatal = TLSX_CSR2_InitRequests(ssl->extensions,
- args->dCert, 1, ssl->heap);
- doLookup = 0;
- }
- #endif /* HAVE_CERTIFICATE_STATUS_REQUEST_V2 */
- }
-
- #ifdef HAVE_OCSP
- if (doLookup && ssl->ctx->cm->ocspEnabled) {
- WOLFSSL_MSG("Doing Leaf OCSP check");
- ret = CheckCertOCSP_ex(ssl->ctx->cm->ocsp,
- args->dCert, NULL, ssl);
- #ifdef WOLFSSL_NONBLOCK_OCSP
- if (ret == OCSP_WANT_READ) {
- goto exit_ppc;
- }
- #endif
- doLookup = (ret == OCSP_CERT_UNKNOWN);
- if (ret != 0) {
- WOLFSSL_MSG("\tOCSP Lookup not ok");
- args->fatal = 0;
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- ssl->peerVerifyRet = X509_V_ERR_CERT_REJECTED;
- #endif
- }
- }
- #endif /* HAVE_OCSP */
-
- #ifdef HAVE_CRL
- if (doLookup && ssl->ctx->cm->crlEnabled) {
- WOLFSSL_MSG("Doing Leaf CRL check");
- ret = CheckCertCRL(ssl->ctx->cm->crl, args->dCert);
- #ifdef WOLFSSL_NONBLOCK_OCSP
- if (ret == OCSP_WANT_READ) {
- goto exit_ppc;
- }
- #endif
- if (ret != 0) {
- WOLFSSL_MSG("\tCRL check not ok");
- args->fatal = 0;
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- ssl->peerVerifyRet = X509_V_ERR_CERT_REJECTED;
- #endif
- }
- }
- #endif /* HAVE_CRL */
- (void)doLookup;
- }
- #endif /* HAVE_OCSP || HAVE_CRL */
-
- #ifdef KEEP_PEER_CERT
- if (args->fatal == 0) {
- int copyRet = 0;
-
- #ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation &&
- ssl->secure_renegotiation->enabled) {
- /* free old peer cert */
- FreeX509(&ssl->peerCert);
- InitX509(&ssl->peerCert, 0, ssl->heap);
- }
- #endif
-
- /* set X509 format for peer cert */
- copyRet = CopyDecodedToX509(&ssl->peerCert, args->dCert);
- if (copyRet == MEMORY_E) {
- args->fatal = 1;
- }
- }
- #endif /* KEEP_PEER_CERT */
-
- #ifndef IGNORE_KEY_EXTENSIONS
- #if defined(OPENSSL_EXTRA)
- /* when compatibility layer is turned on and no verify is
- * set then ignore the certificate key extension */
- if (args->dCert->extKeyUsageSet &&
- args->dCert->extKeyUsageCrit == 0 &&
- ssl->options.verifyNone) {
- WOLFSSL_MSG("Not verifying certificate key usage");
- }
- else
- #endif
- if (args->dCert->extKeyUsageSet) {
- if ((ssl->specs.kea == rsa_kea) &&
- (ssl->options.side == WOLFSSL_CLIENT_END) &&
- (args->dCert->extKeyUsage & KEYUSE_KEY_ENCIPHER) == 0) {
- ret = KEYUSE_ENCIPHER_E;
- }
- if ((ssl->specs.sig_algo == rsa_sa_algo ||
- (ssl->specs.sig_algo == ecc_dsa_sa_algo &&
- !ssl->specs.static_ecdh)) &&
- (args->dCert->extKeyUsage & KEYUSE_DIGITAL_SIG) == 0) {
- WOLFSSL_MSG("KeyUse Digital Sig not set");
- ret = KEYUSE_SIGNATURE_E;
- }
- }
-
- #if defined(OPENSSL_EXTRA)
- /* when compatibility layer is turned on and no verify is
- * set then ignore the certificate key extension */
- if (args->dCert->extExtKeyUsageSet &&
- args->dCert->extExtKeyUsageCrit == 0 &&
- ssl->options.verifyNone) {
- WOLFSSL_MSG("Not verifying certificate ext key usage");
- }
- else
- #endif
- if (args->dCert->extExtKeyUsageSet) {
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- if ((args->dCert->extExtKeyUsage &
- (EXTKEYUSE_ANY | EXTKEYUSE_SERVER_AUTH)) == 0) {
- WOLFSSL_MSG("ExtKeyUse Server Auth not set");
- ret = EXTKEYUSE_AUTH_E;
- }
- }
- else {
- if ((args->dCert->extExtKeyUsage &
- (EXTKEYUSE_ANY | EXTKEYUSE_CLIENT_AUTH)) == 0) {
- WOLFSSL_MSG("ExtKeyUse Client Auth not set");
- ret = EXTKEYUSE_AUTH_E;
- }
- }
- }
- #endif /* IGNORE_KEY_EXTENSIONS */
-
- if (args->fatal) {
- ssl->error = ret;
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- SendAlert(ssl, alert_fatal, bad_certificate);
- ssl->peerVerifyRet = X509_V_ERR_CERT_REJECTED;
- #endif
- goto exit_ppc;
- }
-
- ssl->options.havePeerCert = 1;
-
- if (!ssl->options.verifyNone && ssl->buffers.domainName.buffer) {
- #ifndef WOLFSSL_ALLOW_NO_CN_IN_SAN
- /* Per RFC 5280 section 4.2.1.6, "Whenever such identities
- * are to be bound into a certificate, the subject
- * alternative name extension MUST be used." */
- if (args->dCert->altNames) {
- if (CheckForAltNames(args->dCert,
- (char*)ssl->buffers.domainName.buffer,
- NULL) != 1) {
- WOLFSSL_MSG("DomainName match on alt names failed");
- /* try to get peer key still */
- ret = DOMAIN_NAME_MISMATCH;
- }
- }
- else {
- if (MatchDomainName(
- args->dCert->subjectCN,
- args->dCert->subjectCNLen,
- (char*)ssl->buffers.domainName.buffer) == 0) {
- WOLFSSL_MSG("DomainName match on common name failed");
- ret = DOMAIN_NAME_MISMATCH;
- }
- }
- #else /* WOLFSSL_ALL_NO_CN_IN_SAN */
- /* Old behavior. */
- if (MatchDomainName(args->dCert->subjectCN,
- args->dCert->subjectCNLen,
- (char*)ssl->buffers.domainName.buffer) == 0) {
- WOLFSSL_MSG("DomainName match on common name failed");
- if (CheckForAltNames(args->dCert,
- (char*)ssl->buffers.domainName.buffer,
- NULL) != 1) {
- WOLFSSL_MSG(
- "DomainName match on alt names failed too");
- /* try to get peer key still */
- ret = DOMAIN_NAME_MISMATCH;
- }
- }
- #endif /* WOLFSSL_ALL_NO_CN_IN_SAN */
- }
-
- /* decode peer key */
- switch (args->dCert->keyOID) {
- #ifndef NO_RSA
- case RSAk:
- {
- word32 keyIdx = 0;
- int keyRet = 0;
-
- if (ssl->peerRsaKey == NULL) {
- keyRet = AllocKey(ssl, DYNAMIC_TYPE_RSA,
- (void**)&ssl->peerRsaKey);
- } else if (ssl->peerRsaKeyPresent) {
- keyRet = ReuseKey(ssl, DYNAMIC_TYPE_RSA,
- ssl->peerRsaKey);
- ssl->peerRsaKeyPresent = 0;
- }
-
- if (keyRet != 0 || wc_RsaPublicKeyDecode(
- args->dCert->publicKey, &keyIdx, ssl->peerRsaKey,
- args->dCert->pubKeySize) != 0) {
- ret = PEER_KEY_ERROR;
- }
- else {
- ssl->peerRsaKeyPresent = 1;
- #ifdef WOLFSSL_RENESAS_TSIP_TLS
- /* copy encrypted tsip key index into ssl object */
- if (args->dCert->tsip_encRsaKeyIdx) {
- if (!ssl->peerTsipEncRsaKeyIndex) {
- ssl->peerTsipEncRsaKeyIndex = (byte*)XMALLOC(
- TSIP_TLS_ENCPUBKEY_SZ_BY_CERTVRFY,
- ssl->heap, DYNAMIC_TYPE_RSA);
- if (!ssl->peerTsipEncRsaKeyIndex) {
- args->lastErr = MEMORY_E;
- goto exit_ppc;
- }
- }
-
- XMEMCPY(ssl->peerTsipEncRsaKeyIndex,
- args->dCert->tsip_encRsaKeyIdx,
- TSIP_TLS_ENCPUBKEY_SZ_BY_CERTVRFY);
- }
- #endif
- #ifdef HAVE_PK_CALLBACKS
- #ifndef NO_RSA
- #ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->buffers.peerRsaKey.buffer) {
- XFREE(ssl->buffers.peerRsaKey.buffer,
- ssl->heap, DYNAMIC_TYPE_RSA);
- ssl->buffers.peerRsaKey.buffer = NULL;
- }
- #endif
-
-
- ssl->buffers.peerRsaKey.buffer =
- (byte*)XMALLOC(args->dCert->pubKeySize,
- ssl->heap, DYNAMIC_TYPE_RSA);
- if (ssl->buffers.peerRsaKey.buffer == NULL) {
- ret = MEMORY_ERROR;
- }
- else {
- XMEMCPY(ssl->buffers.peerRsaKey.buffer,
- args->dCert->publicKey,
- args->dCert->pubKeySize);
- ssl->buffers.peerRsaKey.length =
- args->dCert->pubKeySize;
- }
- #endif /* NO_RSA */
- #endif /* HAVE_PK_CALLBACKS */
- }
-
- /* check size of peer RSA key */
- if (ret == 0 && ssl->peerRsaKeyPresent &&
- !ssl->options.verifyNone &&
- wc_RsaEncryptSize(ssl->peerRsaKey)
- < ssl->options.minRsaKeySz) {
- ret = RSA_KEY_SIZE_E;
- WOLFSSL_MSG("Peer RSA key is too small");
- }
- break;
- }
- #endif /* NO_RSA */
- #ifdef HAVE_NTRU
- case NTRUk:
- {
- if (args->dCert->pubKeySize > sizeof(ssl->peerNtruKey)) {
- ret = PEER_KEY_ERROR;
- }
- else {
- XMEMCPY(ssl->peerNtruKey, args->dCert->publicKey,
- args->dCert->pubKeySize);
- ssl->peerNtruKeyLen =
- (word16)args->dCert->pubKeySize;
- ssl->peerNtruKeyPresent = 1;
- }
- break;
- }
- #endif /* HAVE_NTRU */
- #ifdef HAVE_ECC
- case ECDSAk:
- {
- int keyRet = 0;
- word32 idx = 0;
-
- if (ssl->peerEccDsaKey == NULL) {
- /* alloc/init on demand */
- keyRet = AllocKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->peerEccDsaKey);
- } else if (ssl->peerEccDsaKeyPresent) {
- keyRet = ReuseKey(ssl, DYNAMIC_TYPE_ECC,
- ssl->peerEccDsaKey);
- ssl->peerEccDsaKeyPresent = 0;
- }
-
- if (keyRet != 0 ||
- wc_EccPublicKeyDecode(args->dCert->publicKey, &idx,
- ssl->peerEccDsaKey,
- args->dCert->pubKeySize) != 0) {
- ret = PEER_KEY_ERROR;
- }
- else {
- ssl->peerEccDsaKeyPresent = 1;
- #ifdef HAVE_PK_CALLBACKS
- ssl->buffers.peerEccDsaKey.buffer =
- (byte*)XMALLOC(args->dCert->pubKeySize,
- ssl->heap, DYNAMIC_TYPE_ECC);
- if (ssl->buffers.peerEccDsaKey.buffer == NULL) {
- ERROR_OUT(MEMORY_ERROR, exit_ppc);
- }
- else {
- XMEMCPY(ssl->buffers.peerEccDsaKey.buffer,
- args->dCert->publicKey,
- args->dCert->pubKeySize);
- ssl->buffers.peerEccDsaKey.length =
- args->dCert->pubKeySize;
- }
- #endif /* HAVE_PK_CALLBACKS */
- }
-
- /* check size of peer ECC key */
- if (ret == 0 && ssl->peerEccDsaKeyPresent &&
- !ssl->options.verifyNone &&
- wc_ecc_size(ssl->peerEccDsaKey)
- < ssl->options.minEccKeySz) {
- ret = ECC_KEY_SIZE_E;
- WOLFSSL_MSG("Peer ECC key is too small");
- }
- break;
- }
- #endif /* HAVE_ECC */
- #ifdef HAVE_ED25519
- case ED25519k:
- {
- int keyRet = 0;
- if (ssl->peerEd25519Key == NULL) {
- /* alloc/init on demand */
- keyRet = AllocKey(ssl, DYNAMIC_TYPE_ED25519,
- (void**)&ssl->peerEd25519Key);
- } else if (ssl->peerEd25519KeyPresent) {
- keyRet = ReuseKey(ssl, DYNAMIC_TYPE_ED25519,
- ssl->peerEd25519Key);
- ssl->peerEd25519KeyPresent = 0;
- }
-
- if (keyRet != 0 ||
- wc_ed25519_import_public(args->dCert->publicKey,
- args->dCert->pubKeySize,
- ssl->peerEd25519Key)
- != 0) {
- ret = PEER_KEY_ERROR;
- }
- else {
- ssl->peerEd25519KeyPresent = 1;
- #ifdef HAVE_PK_CALLBACKS
- ssl->buffers.peerEd25519Key.buffer =
- (byte*)XMALLOC(args->dCert->pubKeySize,
- ssl->heap, DYNAMIC_TYPE_ED25519);
- if (ssl->buffers.peerEd25519Key.buffer == NULL) {
- ERROR_OUT(MEMORY_ERROR, exit_ppc);
- }
- else {
- XMEMCPY(ssl->buffers.peerEd25519Key.buffer,
- args->dCert->publicKey,
- args->dCert->pubKeySize);
- ssl->buffers.peerEd25519Key.length =
- args->dCert->pubKeySize;
- }
- #endif /*HAVE_PK_CALLBACKS */
- }
-
- /* check size of peer ECC key */
- if (ret == 0 && ssl->peerEd25519KeyPresent &&
- !ssl->options.verifyNone &&
- ED25519_KEY_SIZE < ssl->options.minEccKeySz) {
- ret = ECC_KEY_SIZE_E;
- WOLFSSL_MSG("Peer ECC key is too small");
- }
- break;
- }
- #endif /* HAVE_ED25519 */
- #ifdef HAVE_ED448
- case ED448k:
- {
- int keyRet = 0;
- if (ssl->peerEd448Key == NULL) {
- /* alloc/init on demand */
- keyRet = AllocKey(ssl, DYNAMIC_TYPE_ED448,
- (void**)&ssl->peerEd448Key);
- } else if (ssl->peerEd448KeyPresent) {
- keyRet = ReuseKey(ssl, DYNAMIC_TYPE_ED448,
- ssl->peerEd448Key);
- ssl->peerEd448KeyPresent = 0;
- }
-
- if (keyRet != 0 ||
- wc_ed448_import_public(args->dCert->publicKey,
- args->dCert->pubKeySize,
- ssl->peerEd448Key) != 0) {
- ret = PEER_KEY_ERROR;
- }
- else {
- ssl->peerEd448KeyPresent = 1;
- #ifdef HAVE_PK_CALLBACKS
- ssl->buffers.peerEd448Key.buffer =
- (byte*)XMALLOC(args->dCert->pubKeySize,
- ssl->heap, DYNAMIC_TYPE_ED448);
- if (ssl->buffers.peerEd448Key.buffer == NULL) {
- ERROR_OUT(MEMORY_ERROR, exit_ppc);
- }
- else {
- XMEMCPY(ssl->buffers.peerEd448Key.buffer,
- args->dCert->publicKey,
- args->dCert->pubKeySize);
- ssl->buffers.peerEd448Key.length =
- args->dCert->pubKeySize;
- }
- #endif /*HAVE_PK_CALLBACKS */
- }
-
- /* check size of peer ECC key */
- if (ret == 0 && ssl->peerEd448KeyPresent &&
- !ssl->options.verifyNone &&
- ED448_KEY_SIZE < ssl->options.minEccKeySz) {
- ret = ECC_KEY_SIZE_E;
- WOLFSSL_MSG("Peer ECC key is too small");
- }
- break;
- }
- #endif /* HAVE_ED448 */
- default:
- break;
- }
-
- /* args->dCert free'd in function cleanup after callback */
- } /* if (count > 0) */
-
- /* Check for error */
- if (args->fatal && ret != 0) {
- goto exit_ppc;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_FINALIZE;
- } /* case TLS_ASYNC_VERIFY */
- FALL_THROUGH;
-
- case TLS_ASYNC_FINALIZE:
- {
- /* load last error */
- if (args->lastErr != 0 && ret == 0) {
- ret = args->lastErr;
- }
-
- #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
- if (args->untrustedDepth > ssl->options.verifyDepth) {
- ssl->peerVerifyRet = X509_V_ERR_CERT_CHAIN_TOO_LONG;
- ret = MAX_CHAIN_ERROR;
- }
- #endif
-
- /* Do verify callback */
- ret = DoVerifyCallback(ssl->ctx->cm, ssl, ret, args);
-
- if (ssl->options.verifyNone &&
- (ret == CRL_MISSING || ret == CRL_CERT_REVOKED)) {
- WOLFSSL_MSG("Ignoring CRL problem based on verify setting");
- ret = ssl->error = 0;
- }
-
- if (ret != 0) {
- if (!ssl->options.verifyNone) {
- DoCertFatalAlert(ssl, ret);
- }
- ssl->error = ret; /* Report SSL error */
- }
-
- if (ret == 0 && ssl->options.side == WOLFSSL_CLIENT_END) {
- ssl->options.serverState = SERVER_CERT_COMPLETE;
- }
-
- if (IsEncryptionOn(ssl, 0)) {
- args->idx += ssl->keys.padSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- args->idx += MacSize(ssl);
- #endif
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_END;
- } /* case TLS_ASYNC_FINALIZE */
- FALL_THROUGH;
-
- case TLS_ASYNC_END:
- {
- /* Set final index */
- *inOutIdx = args->idx;
-
- break;
- }
- default:
- ret = INPUT_CASE_ERROR;
- break;
- } /* switch(ssl->options.asyncState) */
-
-exit_ppc:
-
- WOLFSSL_LEAVE("ProcessPeerCerts", ret);
-
-
-#if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP)
- if (ret == WC_PENDING_E || ret == OCSP_WANT_READ) {
- /* Mark message as not received so it can process again */
- ssl->msgsReceived.got_certificate = 0;
-
- return ret;
- }
-#endif /* WOLFSSL_ASYNC_CRYPT || WOLFSSL_NONBLOCK_OCSP */
-
-#if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP) || \
- defined(WOLFSSL_SMALL_STACK)
- if (args)
- {
- FreeProcPeerCertArgs(ssl, args);
- }
-#else
- FreeProcPeerCertArgs(ssl, args);
-#endif /* WOLFSSL_ASYNC_CRYPT || WOLFSSL_NONBLOCK_OCSP || WOLFSSL_SMALL_STACK */
-
-#if defined(WOLFSSL_ASYNC_CRYPT)
-#elif defined(WOLFSSL_NONBLOCK_OCSP)
- XFREE(args, ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
- ssl->nonblockarg = NULL;
-#elif defined(WOLFSSL_SMALL_STACK)
- XFREE(args, ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
-
- FreeKeyExchange(ssl);
-
- return ret;
-}
-#endif
-
-#ifndef WOLFSSL_NO_TLS12
-#if !defined(NO_WOLFSSL_CLIENT) || !defined(WOLFSSL_NO_CLIENT_AUTH)
-
-/* handle processing of certificate (11) */
-static int DoCertificate(WOLFSSL* ssl, byte* input, word32* inOutIdx,
- word32 size)
-{
- int ret;
-
- WOLFSSL_START(WC_FUNC_CERTIFICATE_DO);
- WOLFSSL_ENTER("DoCertificate");
-
-#ifdef SESSION_CERTS
- /* Reset the session cert chain count in case the session resume failed. */
- ssl->session.chain.count = 0;
- #ifdef WOLFSSL_ALT_CERT_CHAINS
- ssl->session.altChain.count = 0;
- #endif
-#endif /* SESSION_CERTS */
-
- ret = ProcessPeerCerts(ssl, input, inOutIdx, size);
-#ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_ERROR || ret == ASN_PARSE_E)
- SendAlert(ssl, alert_fatal, decode_error);
-#endif
-
-#ifdef OPENSSL_EXTRA
- ssl->options.serverState = SERVER_CERT_COMPLETE;
-#endif
-
- WOLFSSL_LEAVE("DoCertificate", ret);
- WOLFSSL_END(WC_FUNC_CERTIFICATE_DO);
-
- return ret;
-}
-
-/* handle processing of certificate_status (22) */
-static int DoCertificateStatus(WOLFSSL* ssl, byte* input, word32* inOutIdx,
- word32 size)
-{
- int ret = 0;
- byte status_type;
- word32 status_length;
-
- WOLFSSL_START(WC_FUNC_CERTIFICATE_STATUS_DO);
- WOLFSSL_ENTER("DoCertificateStatus");
-
- if (size < ENUM_LEN + OPAQUE24_LEN)
- return BUFFER_ERROR;
-
- status_type = input[(*inOutIdx)++];
-
- c24to32(input + *inOutIdx, &status_length);
- *inOutIdx += OPAQUE24_LEN;
-
- if (size != ENUM_LEN + OPAQUE24_LEN + status_length)
- return BUFFER_ERROR;
-
- switch (status_type) {
-
- #if defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
- || defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2)
-
- /* WOLFSSL_CSR_OCSP overlaps with WOLFSSL_CSR2_OCSP */
- case WOLFSSL_CSR2_OCSP:
- ret = ProcessCSR(ssl, input, inOutIdx, status_length);
- break;
-
- #endif
-
- #if defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2)
-
- case WOLFSSL_CSR2_OCSP_MULTI: {
- OcspRequest* request;
- word32 list_length = status_length;
- byte idx = 0;
-
- #ifdef WOLFSSL_SMALL_STACK
- CertStatus* status;
- OcspResponse* response;
- #else
- CertStatus status[1];
- OcspResponse response[1];
- #endif
-
- do {
- if (ssl->status_request_v2) {
- ssl->status_request_v2 = 0;
- break;
- }
-
- return BUFFER_ERROR;
- } while(0);
-
- #ifdef WOLFSSL_SMALL_STACK
- status = (CertStatus*)XMALLOC(sizeof(CertStatus), ssl->heap,
- DYNAMIC_TYPE_OCSP_STATUS);
- response = (OcspResponse*)XMALLOC(sizeof(OcspResponse), ssl->heap,
- DYNAMIC_TYPE_OCSP_REQUEST);
-
- if (status == NULL || response == NULL) {
- if (status)
- XFREE(status, ssl->heap, DYNAMIC_TYPE_OCSP_STATUS);
- if (response)
- XFREE(response, ssl->heap, DYNAMIC_TYPE_OCSP_REQUEST);
-
- return MEMORY_ERROR;
- }
- #endif
-
- while (list_length && ret == 0) {
- if (OPAQUE24_LEN > list_length) {
- ret = BUFFER_ERROR;
- break;
- }
-
- c24to32(input + *inOutIdx, &status_length);
- *inOutIdx += OPAQUE24_LEN;
- list_length -= OPAQUE24_LEN;
-
- if (status_length > list_length) {
- ret = BUFFER_ERROR;
- break;
- }
-
- if (status_length) {
- InitOcspResponse(response, status, input +*inOutIdx,
- status_length);
-
- if ((OcspResponseDecode(response, ssl->ctx->cm, ssl->heap,
- 0) != 0)
- || (response->responseStatus != OCSP_SUCCESSFUL)
- || (response->status->status != CERT_GOOD))
- ret = BAD_CERTIFICATE_STATUS_ERROR;
-
- while (ret == 0) {
- request = (OcspRequest*)TLSX_CSR2_GetRequest(
- ssl->extensions, status_type, idx++);
-
- if (request == NULL)
- ret = BAD_CERTIFICATE_STATUS_ERROR;
- else if (CompareOcspReqResp(request, response) == 0)
- break;
- else if (idx == 1) /* server cert must be OK */
- ret = BAD_CERTIFICATE_STATUS_ERROR;
- }
-
- *inOutIdx += status_length;
- list_length -= status_length;
- }
- }
-
- #if defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2)
- ssl->status_request_v2 = 0;
- #endif
-
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(status, NULL, DYNAMIC_TYPE_OCSP_STATUS);
- XFREE(response, NULL, DYNAMIC_TYPE_OCSP_REQUEST);
- #endif
-
- }
- break;
-
- #endif
-
- default:
- ret = BUFFER_ERROR;
- }
-
- if (ret != 0)
- SendAlert(ssl, alert_fatal, bad_certificate_status_response);
-
- if (IsEncryptionOn(ssl, 0)) {
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead) {
- word32 digestSz = MacSize(ssl);
- if (*inOutIdx + ssl->keys.padSz + digestSz > size)
- return BUFFER_E;
- *inOutIdx += ssl->keys.padSz + digestSz;
- }
- else
- #endif
- {
- if (*inOutIdx + ssl->keys.padSz > size)
- return BUFFER_E;
- *inOutIdx += ssl->keys.padSz;
- }
- }
-
- WOLFSSL_LEAVE("DoCertificateStatus", ret);
- WOLFSSL_END(WC_FUNC_CERTIFICATE_STATUS_DO);
-
- return ret;
-}
-
-#endif
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#endif /* !NO_CERTS */
-
-#ifndef WOLFSSL_NO_TLS12
-
-static int DoHelloRequest(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
- word32 size, word32 totalSz)
-{
- (void)input;
-
- WOLFSSL_START(WC_FUNC_HELLO_REQUEST_DO);
- WOLFSSL_ENTER("DoHelloRequest");
-
- if (size) /* must be 0 */
- return BUFFER_ERROR;
-
- if (IsEncryptionOn(ssl, 0)) {
- /* If size == totalSz then we are in DtlsMsgDrain so no need to worry
- * about padding */
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead) {
- word32 digestSz = MacSize(ssl);
- if (size != totalSz &&
- *inOutIdx + ssl->keys.padSz + digestSz > totalSz)
- return BUFFER_E;
- *inOutIdx += ssl->keys.padSz + digestSz;
- }
- else
- #endif
- {
- /* access beyond input + size should be checked against totalSz */
- if (size != totalSz &&
- *inOutIdx + ssl->keys.padSz > totalSz)
- return BUFFER_E;
-
- *inOutIdx += ssl->keys.padSz;
- }
- }
-
- if (ssl->options.side == WOLFSSL_SERVER_END) {
- SendAlert(ssl, alert_fatal, unexpected_message); /* try */
- return FATAL_ERROR;
- }
-#ifdef HAVE_SECURE_RENEGOTIATION
- else if (ssl->secure_renegotiation && ssl->secure_renegotiation->enabled) {
- ssl->secure_renegotiation->startScr = 1;
- WOLFSSL_LEAVE("DoHelloRequest", 0);
- WOLFSSL_END(WC_FUNC_HELLO_REQUEST_DO);
- return 0;
- }
-#endif
- else {
- return SendAlert(ssl, alert_warning, no_renegotiation);
- }
-}
-
-
-int DoFinished(WOLFSSL* ssl, const byte* input, word32* inOutIdx, word32 size,
- word32 totalSz, int sniff)
-{
- word32 finishedSz = (ssl->options.tls ? TLS_FINISHED_SZ : FINISHED_SZ);
-
- WOLFSSL_START(WC_FUNC_FINISHED_DO);
- WOLFSSL_ENTER("DoFinished");
-
- if (finishedSz != size)
- return BUFFER_ERROR;
-
- /* check against totalSz
- * If size == totalSz then we are in DtlsMsgDrain so no need to worry about
- * padding */
- if (size != totalSz) {
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead) {
- if (*inOutIdx + size + ssl->keys.padSz + MacSize(ssl) > totalSz)
- return BUFFER_E;
- }
- else
- #endif
- {
- if (*inOutIdx + size + ssl->keys.padSz > totalSz)
- return BUFFER_E;
- }
- }
-
- #ifdef WOLFSSL_CALLBACKS
- if (ssl->hsInfoOn) AddPacketName(ssl, "Finished");
- if (ssl->toInfoOn) AddLateName("Finished", &ssl->timeoutInfo);
- #endif
-
- if (sniff == NO_SNIFF) {
- if (XMEMCMP(input + *inOutIdx, &ssl->hsHashes->verifyHashes,size) != 0){
- WOLFSSL_MSG("Verify finished error on hashes");
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, decrypt_error);
- #endif
- return VERIFY_FINISHED_ERROR;
- }
- }
-
-#ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation) {
- /* save peer's state */
- if (ssl->options.side == WOLFSSL_CLIENT_END)
- XMEMCPY(ssl->secure_renegotiation->server_verify_data,
- input + *inOutIdx, TLS_FINISHED_SZ);
- else
- XMEMCPY(ssl->secure_renegotiation->client_verify_data,
- input + *inOutIdx, TLS_FINISHED_SZ);
- ssl->secure_renegotiation->verifySet = 1;
- }
-#endif
-
- /* force input exhaustion at ProcessReply consuming padSz */
- *inOutIdx += size + ssl->keys.padSz;
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- *inOutIdx += MacSize(ssl);
-#endif
-
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- ssl->options.serverState = SERVER_FINISHED_COMPLETE;
-#ifdef OPENSSL_EXTRA
- ssl->cbmode = SSL_CB_MODE_WRITE;
- ssl->options.clientState = CLIENT_FINISHED_COMPLETE;
-#endif
- if (!ssl->options.resuming) {
-#ifdef OPENSSL_EXTRA
- if (ssl->CBIS != NULL) {
- ssl->CBIS(ssl, SSL_CB_CONNECT_LOOP, SSL_SUCCESS);
- }
-#endif
- ssl->options.handShakeState = HANDSHAKE_DONE;
- ssl->options.handShakeDone = 1;
- }
- }
- else {
- ssl->options.clientState = CLIENT_FINISHED_COMPLETE;
-#ifdef OPENSSL_EXTRA
- ssl->cbmode = SSL_CB_MODE_READ;
- ssl->options.serverState = SERVER_FINISHED_COMPLETE;
-#endif
- if (ssl->options.resuming) {
-#ifdef OPENSSL_EXTRA
- if (ssl->CBIS != NULL) {
- ssl->CBIS(ssl, SSL_CB_ACCEPT_LOOP, SSL_SUCCESS);
- }
-#endif
- ssl->options.handShakeState = HANDSHAKE_DONE;
- ssl->options.handShakeDone = 1;
- }
- }
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- if ((!ssl->options.resuming && ssl->options.side == WOLFSSL_CLIENT_END) ||
- (ssl->options.resuming && ssl->options.side == WOLFSSL_SERVER_END)){
- DtlsMsgPoolReset(ssl);
- ssl->keys.dtls_handshake_number = 0;
- ssl->keys.dtls_expected_peer_handshake_number = 0;
- }
- }
-#endif
-
- WOLFSSL_LEAVE("DoFinished", 0);
- WOLFSSL_END(WC_FUNC_FINISHED_DO);
-
- return 0;
-}
-
-
-/* Make sure no duplicates, no fast forward, or other problems; 0 on success */
-static int SanityCheckMsgReceived(WOLFSSL* ssl, byte type)
-{
- /* verify not a duplicate, mark received, check state */
- switch (type) {
-
-#ifndef NO_WOLFSSL_CLIENT
- case hello_request:
- if (ssl->msgsReceived.got_hello_request) {
- WOLFSSL_MSG("Duplicate HelloRequest received");
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_hello_request = 1;
-
- break;
-#endif
-
-#ifndef NO_WOLFSSL_SERVER
- case client_hello:
- if (ssl->msgsReceived.got_client_hello) {
- WOLFSSL_MSG("Duplicate ClientHello received");
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, unexpected_message);
- #endif
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_client_hello = 1;
-
- break;
-#endif
-
-#ifndef NO_WOLFSSL_CLIENT
- case server_hello:
- if (ssl->msgsReceived.got_server_hello) {
- WOLFSSL_MSG("Duplicate ServerHello received");
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_server_hello = 1;
-
- break;
-#endif
-
-#ifndef NO_WOLFSSL_CLIENT
- case hello_verify_request:
- if (ssl->msgsReceived.got_hello_verify_request) {
- WOLFSSL_MSG("Duplicate HelloVerifyRequest received");
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_hello_verify_request = 1;
-
- break;
-#endif
-
-#ifndef NO_WOLFSSL_CLIENT
- case session_ticket:
- if (ssl->msgsReceived.got_session_ticket) {
- WOLFSSL_MSG("Duplicate SessionTicket received");
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_session_ticket = 1;
-
- break;
-#endif
-
- case certificate:
- if (ssl->msgsReceived.got_certificate) {
- WOLFSSL_MSG("Duplicate Certificate received");
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_certificate = 1;
-
-#ifndef NO_WOLFSSL_CLIENT
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- if ( ssl->msgsReceived.got_server_hello == 0) {
- WOLFSSL_MSG("No ServerHello before Cert");
- return OUT_OF_ORDER_E;
- }
- }
-#endif
-#ifndef NO_WOLFSSL_SERVER
- if (ssl->options.side == WOLFSSL_SERVER_END) {
- if ( ssl->msgsReceived.got_client_hello == 0) {
- WOLFSSL_MSG("No ClientHello before Cert");
- return OUT_OF_ORDER_E;
- }
- }
-#endif
- break;
-
-#ifndef NO_WOLFSSL_CLIENT
- case certificate_status:
- if (ssl->msgsReceived.got_certificate_status) {
- WOLFSSL_MSG("Duplicate CertificateSatatus received");
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_certificate_status = 1;
-
- if (ssl->msgsReceived.got_certificate == 0) {
- WOLFSSL_MSG("No Certificate before CertificateStatus");
- return OUT_OF_ORDER_E;
- }
- if (ssl->msgsReceived.got_server_key_exchange != 0) {
- WOLFSSL_MSG("CertificateStatus after ServerKeyExchange");
- return OUT_OF_ORDER_E;
- }
-
- break;
-#endif
-
-#ifndef NO_WOLFSSL_CLIENT
- case server_key_exchange:
- if (ssl->msgsReceived.got_server_key_exchange) {
- WOLFSSL_MSG("Duplicate ServerKeyExchange received");
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_server_key_exchange = 1;
-
- if (ssl->msgsReceived.got_server_hello == 0) {
- WOLFSSL_MSG("No ServerHello before ServerKeyExchange");
- return OUT_OF_ORDER_E;
- }
- if (ssl->msgsReceived.got_certificate_status == 0) {
-#ifdef HAVE_CERTIFICATE_STATUS_REQUEST
- if (ssl->status_request) {
- int ret;
-
- WOLFSSL_MSG("No CertificateStatus before ServerKeyExchange");
- if ((ret = TLSX_CSR_ForceRequest(ssl)) != 0)
- return ret;
- }
-#endif
-#ifdef HAVE_CERTIFICATE_STATUS_REQUEST_V2
- if (ssl->status_request_v2) {
- int ret;
-
- WOLFSSL_MSG("No CertificateStatus before ServerKeyExchange");
- if ((ret = TLSX_CSR2_ForceRequest(ssl)) != 0)
- return ret;
- }
-#endif
- }
-
- break;
-#endif
-
-#ifndef NO_WOLFSSL_CLIENT
- case certificate_request:
- if (ssl->msgsReceived.got_certificate_request) {
- WOLFSSL_MSG("Duplicate CertificateRequest received");
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_certificate_request = 1;
-
- break;
-#endif
-
-#ifndef NO_WOLFSSL_CLIENT
- case server_hello_done:
- if (ssl->msgsReceived.got_server_hello_done) {
- WOLFSSL_MSG("Duplicate ServerHelloDone received");
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_server_hello_done = 1;
-
- if (ssl->msgsReceived.got_certificate == 0) {
- if (ssl->specs.kea == psk_kea ||
- ssl->specs.kea == dhe_psk_kea ||
- ssl->specs.kea == ecdhe_psk_kea ||
- ssl->options.usingAnon_cipher) {
- WOLFSSL_MSG("No Cert required");
- } else {
- WOLFSSL_MSG("No Certificate before ServerHelloDone");
- return OUT_OF_ORDER_E;
- }
- }
- if (ssl->msgsReceived.got_server_key_exchange == 0) {
- int pskNoServerHint = 0; /* not required in this case */
-
- #ifndef NO_PSK
- if (ssl->specs.kea == psk_kea &&
- ssl->arrays != NULL &&
- ssl->arrays->server_hint[0] == 0)
- pskNoServerHint = 1;
- #endif
- if (ssl->specs.static_ecdh == 1 ||
- ssl->specs.kea == rsa_kea ||
- ssl->specs.kea == ntru_kea ||
- pskNoServerHint) {
- WOLFSSL_MSG("No KeyExchange required");
- } else {
- WOLFSSL_MSG("No ServerKeyExchange before ServerDone");
- return OUT_OF_ORDER_E;
- }
- }
- break;
-#endif
-
-#ifndef NO_WOLFSSL_SERVER
- case certificate_verify:
- if (ssl->msgsReceived.got_certificate_verify) {
- WOLFSSL_MSG("Duplicate CertificateVerify received");
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_certificate_verify = 1;
-
- if ( ssl->msgsReceived.got_certificate == 0) {
- WOLFSSL_MSG("No Cert before CertVerify");
- return OUT_OF_ORDER_E;
- }
- break;
-#endif
-
-#ifndef NO_WOLFSSL_SERVER
- case client_key_exchange:
- if (ssl->msgsReceived.got_client_key_exchange) {
- WOLFSSL_MSG("Duplicate ClientKeyExchange received");
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, unexpected_message);
- #endif
- return DUPLICATE_MSG_E;
- }
- ssl->msgsReceived.got_client_key_exchange = 1;
-
- if (ssl->msgsReceived.got_client_hello == 0) {
- WOLFSSL_MSG("No ClientHello before ClientKeyExchange");
- return OUT_OF_ORDER_E;
- }
- break;
-#endif
-
- case finished:
- if (ssl->msgsReceived.got_finished) {
- WOLFSSL_MSG("Duplicate Finished received");
- return DUPLICATE_MSG_E;
- }
-#ifdef HAVE_DTLS
- if (ssl->options.dtls) {
- if (ssl->keys.curEpoch == 0) {
- WOLFSSL_MSG("Finished received with epoch 0");
- return SEQUENCE_ERROR;
- }
- }
-#endif
- ssl->msgsReceived.got_finished = 1;
-
- if (ssl->msgsReceived.got_change_cipher == 0) {
- WOLFSSL_MSG("Finished received before ChangeCipher");
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, unexpected_message);
- #endif
- return NO_CHANGE_CIPHER_E;
- }
- break;
-
- case change_cipher_hs:
- if (ssl->msgsReceived.got_change_cipher) {
- WOLFSSL_MSG("Duplicate ChangeCipher received");
- return DUPLICATE_MSG_E;
- }
- /* DTLS is going to ignore the CCS message if the client key
- * exchange message wasn't received yet. */
- if (!ssl->options.dtls)
- ssl->msgsReceived.got_change_cipher = 1;
-
-#ifndef NO_WOLFSSL_CLIENT
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- if (!ssl->options.resuming) {
- if (ssl->msgsReceived.got_server_hello_done == 0) {
- WOLFSSL_MSG("No ServerHelloDone before ChangeCipher");
- return OUT_OF_ORDER_E;
- }
- }
- else {
- if (ssl->msgsReceived.got_server_hello == 0) {
- WOLFSSL_MSG("No ServerHello before ChangeCipher on Resume");
- return OUT_OF_ORDER_E;
- }
- }
- #ifdef HAVE_SESSION_TICKET
- if (ssl->expect_session_ticket) {
- WOLFSSL_MSG("Expected session ticket missing");
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls)
- return OUT_OF_ORDER_E;
- #endif
- return SESSION_TICKET_EXPECT_E;
- }
- #endif
- }
-#endif
-#ifndef NO_WOLFSSL_SERVER
- if (ssl->options.side == WOLFSSL_SERVER_END) {
- if (!ssl->options.resuming &&
- ssl->msgsReceived.got_client_key_exchange == 0) {
- WOLFSSL_MSG("No ClientKeyExchange before ChangeCipher");
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, unexpected_message);
- #endif
- return OUT_OF_ORDER_E;
- }
- #ifndef NO_CERTS
- if (ssl->options.verifyPeer &&
- ssl->options.havePeerCert) {
-
- if (!ssl->options.havePeerVerify ||
- !ssl->msgsReceived.got_certificate_verify) {
- WOLFSSL_MSG("client didn't send cert verify");
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls)
- return OUT_OF_ORDER_E;
- #endif
- return NO_PEER_VERIFY;
- }
- }
- #endif
- }
-#endif
- if (ssl->options.dtls)
- ssl->msgsReceived.got_change_cipher = 1;
- break;
-
- default:
- WOLFSSL_MSG("Unknown message type");
- return SANITY_MSG_E;
- }
-
- return 0;
-}
-
-
-static int DoHandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx,
- byte type, word32 size, word32 totalSz)
-{
- int ret = 0;
- word32 expectedIdx;
-
- WOLFSSL_ENTER("DoHandShakeMsgType");
-
-#ifdef WOLFSSL_TLS13
- if (type == hello_retry_request) {
- return DoTls13HandShakeMsgType(ssl, input, inOutIdx, type, size,
- totalSz);
- }
-#endif
-
- /* make sure can read the message */
- if (*inOutIdx + size > totalSz) {
- WOLFSSL_MSG("Incomplete Data");
- return INCOMPLETE_DATA;
- }
-
- expectedIdx = *inOutIdx + size +
- (ssl->keys.encryptionOn ? ssl->keys.padSz : 0);
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead && ssl->keys.encryptionOn)
- expectedIdx += MacSize(ssl);
-#endif
-
-#if !defined(NO_WOLFSSL_SERVER) && \
- defined(HAVE_SECURE_RENEGOTIATION) && \
- defined(HAVE_SERVER_RENEGOTIATION_INFO)
- if (ssl->options.handShakeDone && type == client_hello &&
- ssl->secure_renegotiation &&
- ssl->secure_renegotiation->enabled)
- {
- WOLFSSL_MSG("Reset handshake state");
- XMEMSET(&ssl->msgsReceived, 0, sizeof(MsgsReceived));
- ssl->options.serverState = NULL_STATE;
- ssl->options.clientState = NULL_STATE;
- ssl->options.connectState = CONNECT_BEGIN;
- ssl->options.acceptState = ACCEPT_FIRST_REPLY_DONE;
- ssl->options.handShakeState = NULL_STATE;
- ssl->secure_renegotiation->cache_status = SCR_CACHE_NEEDED;
-
- ret = InitHandshakeHashes(ssl);
- if (ret != 0)
- return ret;
- }
-#endif
-
- /* sanity check msg received */
- if ( (ret = SanityCheckMsgReceived(ssl, type)) != 0) {
- WOLFSSL_MSG("Sanity Check on handshake message type received failed");
- return ret;
- }
-
-#if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- /* add name later, add on record and handshake header part back on */
- if (ssl->toInfoOn) {
- int add = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- AddPacketInfo(ssl, 0, handshake, input + *inOutIdx - add,
- size + add, READ_PROTO, ssl->heap);
- #ifdef WOLFSSL_CALLBACKS
- AddLateRecordHeader(&ssl->curRL, &ssl->timeoutInfo);
- #endif
- }
-#endif
-
- if (ssl->options.handShakeState == HANDSHAKE_DONE && type != hello_request){
- WOLFSSL_MSG("HandShake message after handshake complete");
- SendAlert(ssl, alert_fatal, unexpected_message);
- return OUT_OF_ORDER_E;
- }
-
- if (ssl->options.side == WOLFSSL_CLIENT_END && ssl->options.dtls == 0 &&
- ssl->options.serverState == NULL_STATE && type != server_hello) {
- WOLFSSL_MSG("First server message not server hello");
- SendAlert(ssl, alert_fatal, unexpected_message);
- return OUT_OF_ORDER_E;
- }
-
- if (ssl->options.side == WOLFSSL_CLIENT_END && ssl->options.dtls &&
- type == server_hello_done &&
- ssl->options.serverState < SERVER_HELLO_COMPLETE) {
- WOLFSSL_MSG("Server hello done received before server hello in DTLS");
- SendAlert(ssl, alert_fatal, unexpected_message);
- return OUT_OF_ORDER_E;
- }
-
- if (ssl->options.side == WOLFSSL_SERVER_END &&
- ssl->options.clientState == NULL_STATE && type != client_hello) {
- WOLFSSL_MSG("First client message not client hello");
- SendAlert(ssl, alert_fatal, unexpected_message);
- return OUT_OF_ORDER_E;
- }
-
- /* above checks handshake state */
- /* hello_request not hashed */
- /* Also, skip hashing the client_hello message here for DTLS. It will be
- * hashed later if the DTLS cookie is correct. */
- if (type != hello_request &&
- !(IsDtlsNotSctpMode(ssl) && type == client_hello)
- #ifdef WOLFSSL_ASYNC_CRYPT
- && ssl->error != WC_PENDING_E
- #endif
- #ifdef WOLFSSL_NONBLOCK_OCSP
- && ssl->error != OCSP_WANT_READ
- #endif
- ) {
- ret = HashInput(ssl, input + *inOutIdx, size);
- if (ret != 0) {
- WOLFSSL_MSG("Incomplete handshake hashes");
- return ret;
- }
- }
-
-#ifdef OPENSSL_EXTRA
- if (ssl->CBIS != NULL){
- ssl->cbmode = SSL_CB_MODE_READ;
- ssl->cbtype = type;
- ssl->CBIS(ssl, SSL_CB_ACCEPT_LOOP, SSL_SUCCESS);
- }
-#endif
-
- switch (type) {
-
- case hello_request:
- WOLFSSL_MSG("processing hello request");
- ret = DoHelloRequest(ssl, input, inOutIdx, size, totalSz);
- break;
-
-#ifndef NO_WOLFSSL_CLIENT
- case hello_verify_request:
- WOLFSSL_MSG("processing hello verify request");
- ret = DoHelloVerifyRequest(ssl, input,inOutIdx, size);
- if (IsEncryptionOn(ssl, 0)) {
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead) {
- word32 digestSz = MacSize(ssl);
- if (*inOutIdx + ssl->keys.padSz + digestSz > totalSz)
- return BUFFER_E;
- *inOutIdx += ssl->keys.padSz + digestSz;
- }
- else
- #endif
- {
- /* access beyond input + size should be checked against totalSz
- */
- if (*inOutIdx + ssl->keys.padSz > totalSz)
- return BUFFER_E;
-
- *inOutIdx += ssl->keys.padSz;
- }
- }
- break;
-
- case server_hello:
- WOLFSSL_MSG("processing server hello");
- ret = DoServerHello(ssl, input, inOutIdx, size);
- #if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
- ((defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
- (defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
- if (ssl->options.resuming || !IsAtLeastTLSv1_2(ssl) ||
- IsAtLeastTLSv1_3(ssl->version)) {
-
- #if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP)
- if (ret != WC_PENDING_E && ret != OCSP_WANT_READ)
- #endif
- {
- ssl->options.cacheMessages = 0;
- if (ssl->hsHashes->messages != NULL) {
- XFREE(ssl->hsHashes->messages, ssl->heap,
- DYNAMIC_TYPE_HASHES);
- ssl->hsHashes->messages = NULL;
- }
- }
- }
- #endif
- break;
-
-#ifndef NO_CERTS
- case certificate_request:
- WOLFSSL_MSG("processing certificate request");
- ret = DoCertificateRequest(ssl, input, inOutIdx, size);
- break;
-#endif
-
- case server_key_exchange:
- WOLFSSL_MSG("processing server key exchange");
- ret = DoServerKeyExchange(ssl, input, inOutIdx, size);
- break;
-
-#ifdef HAVE_SESSION_TICKET
- case session_ticket:
- WOLFSSL_MSG("processing session ticket");
- ret = DoSessionTicket(ssl, input, inOutIdx, size);
- break;
-#endif /* HAVE_SESSION_TICKET */
-#endif
-
-#if !defined(NO_CERTS) && (!defined(NO_WOLFSSL_CLIENT) || \
- !defined(WOLFSSL_NO_CLIENT_AUTH))
- case certificate:
- WOLFSSL_MSG("processing certificate");
- ret = DoCertificate(ssl, input, inOutIdx, size);
- break;
-
- case certificate_status:
- WOLFSSL_MSG("processing certificate status");
- ret = DoCertificateStatus(ssl, input, inOutIdx, size);
- break;
-#endif
-
- case server_hello_done:
- WOLFSSL_MSG("processing server hello done");
- #ifdef WOLFSSL_CALLBACKS
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "ServerHelloDone");
- if (ssl->toInfoOn)
- AddLateName("ServerHelloDone", &ssl->timeoutInfo);
- #endif
- ssl->options.serverState = SERVER_HELLODONE_COMPLETE;
- if (IsEncryptionOn(ssl, 0)) {
- *inOutIdx += ssl->keys.padSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- *inOutIdx += MacSize(ssl);
- #endif
- }
- if (ssl->options.resuming) {
- WOLFSSL_MSG("Not resuming as thought");
- ssl->options.resuming = 0;
- }
- break;
-
- case finished:
- WOLFSSL_MSG("processing finished");
- ret = DoFinished(ssl, input, inOutIdx, size, totalSz, NO_SNIFF);
- break;
-
-#ifndef NO_WOLFSSL_SERVER
- case client_hello:
- WOLFSSL_MSG("processing client hello");
- ret = DoClientHello(ssl, input, inOutIdx, size);
- #if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
- ((defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
- (defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
- if (ssl->options.resuming || !ssl->options.verifyPeer || \
- !IsAtLeastTLSv1_2(ssl) || IsAtLeastTLSv1_3(ssl->version)) {
- #if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP)
- if (ret != WC_PENDING_E && ret != OCSP_WANT_READ)
- #endif
- {
- ssl->options.cacheMessages = 0;
- if (ssl->hsHashes->messages != NULL) {
- XFREE(ssl->hsHashes->messages, ssl->heap, DYNAMIC_TYPE_HASHES);
- ssl->hsHashes->messages = NULL;
- }
- }
- }
- #endif
- /* If size == totalSz then we are in DtlsMsgDrain so no need to worry
- * about padding */
- if (IsEncryptionOn(ssl, 0)) {
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead) {
- word32 digestSz = MacSize(ssl);
- if (size != totalSz &&
- *inOutIdx + ssl->keys.padSz + digestSz > totalSz)
- return BUFFER_E;
- *inOutIdx += ssl->keys.padSz + digestSz;
- }
- else
- #endif
- {
- /* access beyond input + size should be checked against totalSz
- */
- if (size != totalSz &&
- *inOutIdx + ssl->keys.padSz > totalSz)
- return BUFFER_E;
- *inOutIdx += ssl->keys.padSz;
- }
- }
- break;
-
- case client_key_exchange:
- WOLFSSL_MSG("processing client key exchange");
- ret = DoClientKeyExchange(ssl, input, inOutIdx, size);
- break;
-
-#if (!defined(NO_RSA) || defined(HAVE_ECC) || defined(HAVE_ED25519) || \
- defined(HAVE_ED448)) && !defined(WOLFSSL_NO_CLIENT_AUTH)
- case certificate_verify:
- WOLFSSL_MSG("processing certificate verify");
- ret = DoCertificateVerify(ssl, input, inOutIdx, size);
- break;
-#endif /* (!NO_RSA || ECC || ED25519 || ED448) && !WOLFSSL_NO_CLIENT_AUTH */
-
-#endif /* !NO_WOLFSSL_SERVER */
-
- default:
- WOLFSSL_MSG("Unknown handshake message type");
- ret = UNKNOWN_HANDSHAKE_TYPE;
- break;
- }
- if (ret == 0 && expectedIdx != *inOutIdx) {
- WOLFSSL_MSG("Extra data in handshake message");
- if (!ssl->options.dtls)
- SendAlert(ssl, alert_fatal, decode_error);
- ret = DECODE_E;
- }
-
- if (ret == 0 && ssl->buffers.inputBuffer.dynamicFlag
- #if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP)
- /* do not shrink input for async or non-block */
- && ssl->error != WC_PENDING_E && ssl->error != OCSP_WANT_READ
- #endif
- ) {
- ShrinkInputBuffer(ssl, NO_FORCED_FREE);
- }
-
-#if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP)
- /* if async, offset index so this msg will be processed again */
- if ((ret == WC_PENDING_E || ret == OCSP_WANT_READ) && *inOutIdx > 0) {
- *inOutIdx -= HANDSHAKE_HEADER_SZ;
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- *inOutIdx -= DTLS_HANDSHAKE_EXTRA;
- }
- #endif
- }
-
- /* make sure async error is cleared */
- if (ret == 0 && (ssl->error == WC_PENDING_E || ssl->error == OCSP_WANT_READ)) {
- ssl->error = 0;
- }
-#endif /* WOLFSSL_ASYNC_CRYPT || WOLFSSL_NONBLOCK_OCSP */
-
- WOLFSSL_LEAVE("DoHandShakeMsgType()", ret);
- return ret;
-}
-
-
-static int DoHandShakeMsg(WOLFSSL* ssl, byte* input, word32* inOutIdx,
- word32 totalSz)
-{
- int ret = 0;
- word32 inputLength;
-
- WOLFSSL_ENTER("DoHandShakeMsg()");
-
- if (ssl->arrays == NULL) {
- byte type;
- word32 size;
-
- if (GetHandShakeHeader(ssl,input,inOutIdx,&type, &size, totalSz) != 0)
- return PARSE_ERROR;
-
- ssl->options.handShakeState = type;
-
- return DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz);
- }
-
- inputLength = ssl->buffers.inputBuffer.length - *inOutIdx;
-
- /* If there is a pending fragmented handshake message,
- * pending message size will be non-zero. */
- if (ssl->arrays->pendingMsgSz == 0) {
- byte type;
- word32 size;
-
- if (GetHandShakeHeader(ssl,input, inOutIdx, &type, &size, totalSz) != 0)
- return PARSE_ERROR;
-
- /* Cap the maximum size of a handshake message to something reasonable.
- * By default is the maximum size of a certificate message assuming
- * nine 2048-bit RSA certificates in the chain. */
- if (size > MAX_HANDSHAKE_SZ) {
- WOLFSSL_MSG("Handshake message too large");
- return HANDSHAKE_SIZE_ERROR;
- }
-
- /* size is the size of the certificate message payload */
- if (inputLength - HANDSHAKE_HEADER_SZ < size) {
- ssl->arrays->pendingMsgType = type;
- ssl->arrays->pendingMsgSz = size + HANDSHAKE_HEADER_SZ;
- ssl->arrays->pendingMsg = (byte*)XMALLOC(size + HANDSHAKE_HEADER_SZ,
- ssl->heap,
- DYNAMIC_TYPE_ARRAYS);
- if (ssl->arrays->pendingMsg == NULL)
- return MEMORY_E;
- XMEMCPY(ssl->arrays->pendingMsg,
- input + *inOutIdx - HANDSHAKE_HEADER_SZ,
- inputLength);
- ssl->arrays->pendingMsgOffset = inputLength;
- *inOutIdx += inputLength - HANDSHAKE_HEADER_SZ;
- return 0;
- }
-
- ret = DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz);
- }
- else {
- word32 pendSz =
- ssl->arrays->pendingMsgSz - ssl->arrays->pendingMsgOffset;
-
- /* Catch the case where there may be the remainder of a fragmented
- * handshake message and the next handshake message in the same
- * record. */
- if (inputLength > pendSz)
- inputLength = pendSz;
-
- XMEMCPY(ssl->arrays->pendingMsg + ssl->arrays->pendingMsgOffset,
- input + *inOutIdx, inputLength);
- ssl->arrays->pendingMsgOffset += inputLength;
- *inOutIdx += inputLength;
-
- if (ssl->arrays->pendingMsgOffset == ssl->arrays->pendingMsgSz)
- {
- word32 idx = HANDSHAKE_HEADER_SZ;
- ret = DoHandShakeMsgType(ssl,
- ssl->arrays->pendingMsg,
- &idx, ssl->arrays->pendingMsgType,
- ssl->arrays->pendingMsgSz - idx,
- ssl->arrays->pendingMsgSz);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- /* setup to process fragment again */
- ssl->arrays->pendingMsgOffset -= inputLength;
- *inOutIdx -= inputLength;
- }
- else
- #endif
- {
- XFREE(ssl->arrays->pendingMsg, ssl->heap, DYNAMIC_TYPE_ARRAYS);
- ssl->arrays->pendingMsg = NULL;
- ssl->arrays->pendingMsgSz = 0;
- }
- }
- }
-
- WOLFSSL_LEAVE("DoHandShakeMsg()", ret);
- return ret;
-}
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#ifdef WOLFSSL_DTLS
-
-static WC_INLINE int DtlsCheckWindow(WOLFSSL* ssl)
-{
- word32* window;
- word16 cur_hi, next_hi;
- word32 cur_lo, next_lo, diff;
- int curLT;
- WOLFSSL_DTLS_PEERSEQ* peerSeq = NULL;
-
- if (!ssl->options.haveMcast)
- peerSeq = ssl->keys.peerSeq;
- else {
-#ifdef WOLFSSL_MULTICAST
- WOLFSSL_DTLS_PEERSEQ* p;
- int i;
-
- for (i = 0, p = ssl->keys.peerSeq;
- i < WOLFSSL_DTLS_PEERSEQ_SZ;
- i++, p++) {
-
- if (p->peerId == ssl->keys.curPeerId) {
- peerSeq = p;
- break;
- }
- }
-#endif
- }
-
- if (peerSeq == NULL) {
- WOLFSSL_MSG("Could not find peer sequence");
- return 0;
- }
-
- if (ssl->keys.curEpoch == peerSeq->nextEpoch) {
- next_hi = peerSeq->nextSeq_hi;
- next_lo = peerSeq->nextSeq_lo;
- window = peerSeq->window;
- }
- else if (ssl->keys.curEpoch == peerSeq->nextEpoch - 1) {
- next_hi = peerSeq->prevSeq_hi;
- next_lo = peerSeq->prevSeq_lo;
- window = peerSeq->prevWindow;
- }
- else {
- return 0;
- }
-
- cur_hi = ssl->keys.curSeq_hi;
- cur_lo = ssl->keys.curSeq_lo;
-
- /* If the difference between next and cur is > 2^32, way outside window. */
- if ((cur_hi > next_hi + 1) || (next_hi > cur_hi + 1)) {
- WOLFSSL_MSG("Current record from way too far in the future.");
- return 0;
- }
-
- if (cur_hi == next_hi) {
- curLT = cur_lo < next_lo;
- diff = curLT ? next_lo - cur_lo : cur_lo - next_lo;
- }
- else {
- curLT = cur_hi < next_hi;
- diff = curLT ? cur_lo - next_lo : next_lo - cur_lo;
- }
-
- /* Check to see that the next value is greater than the number of messages
- * trackable in the window, and that the difference between the next
- * expected sequence number and the received sequence number is inside the
- * window. */
- if ((next_hi || next_lo > DTLS_SEQ_BITS) &&
- curLT && (diff > DTLS_SEQ_BITS)) {
-
- WOLFSSL_MSG("Current record sequence number from the past.");
- return 0;
- }
-#ifndef WOLFSSL_DTLS_ALLOW_FUTURE
- else if (!curLT && (diff > DTLS_SEQ_BITS)) {
- WOLFSSL_MSG("Rejecting message too far into the future.");
- return 0;
- }
-#endif
- else if (curLT) {
- word32 idx = diff / DTLS_WORD_BITS;
- word32 newDiff = diff % DTLS_WORD_BITS;
-
- /* verify idx is valid for window array */
- if (idx >= WOLFSSL_DTLS_WINDOW_WORDS) {
- WOLFSSL_MSG("Invalid DTLS windows index");
- return 0;
- }
-
- if (window[idx] & (1 << newDiff)) {
- WOLFSSL_MSG("Current record sequence number already received.");
- return 0;
- }
- }
-
- return 1;
-}
-
-
-#ifdef WOLFSSL_MULTICAST
-static WC_INLINE word32 UpdateHighwaterMark(word32 cur, word32 first,
- word32 second, word32 max)
-{
- word32 newCur = 0;
-
- if (cur < first)
- newCur = first;
- else if (cur < second)
- newCur = second;
- else if (cur < max)
- newCur = max;
-
- return newCur;
-}
-#endif /* WOLFSSL_MULTICAST */
-
-
-static WC_INLINE int DtlsUpdateWindow(WOLFSSL* ssl)
-{
- word32* window;
- word32* next_lo;
- word16* next_hi;
- int curLT;
- word32 cur_lo, diff;
- word16 cur_hi;
- WOLFSSL_DTLS_PEERSEQ* peerSeq = ssl->keys.peerSeq;
-
- cur_hi = ssl->keys.curSeq_hi;
- cur_lo = ssl->keys.curSeq_lo;
-
-#ifdef WOLFSSL_MULTICAST
- if (ssl->options.haveMcast) {
- WOLFSSL_DTLS_PEERSEQ* p;
- int i;
-
- peerSeq = NULL;
- for (i = 0, p = ssl->keys.peerSeq;
- i < WOLFSSL_DTLS_PEERSEQ_SZ;
- i++, p++) {
-
- if (p->peerId == ssl->keys.curPeerId) {
- peerSeq = p;
- break;
- }
- }
-
- if (peerSeq == NULL) {
- WOLFSSL_MSG("Couldn't find that peer ID to update window.");
- return 0;
- }
-
- if (p->highwaterMark && cur_lo >= p->highwaterMark) {
- int cbError = 0;
-
- if (ssl->ctx->mcastHwCb)
- cbError = ssl->ctx->mcastHwCb(p->peerId,
- ssl->ctx->mcastMaxSeq,
- cur_lo, ssl->mcastHwCbCtx);
- if (cbError) {
- WOLFSSL_MSG("Multicast highwater callback returned an error.");
- return MCAST_HIGHWATER_CB_E;
- }
-
- p->highwaterMark = UpdateHighwaterMark(cur_lo,
- ssl->ctx->mcastFirstSeq,
- ssl->ctx->mcastSecondSeq,
- ssl->ctx->mcastMaxSeq);
- }
- }
-#endif
-
- if (ssl->keys.curEpoch == peerSeq->nextEpoch) {
- next_hi = &peerSeq->nextSeq_hi;
- next_lo = &peerSeq->nextSeq_lo;
- window = peerSeq->window;
- }
- else {
- next_hi = &peerSeq->prevSeq_hi;
- next_lo = &peerSeq->prevSeq_lo;
- window = peerSeq->prevWindow;
- }
-
- if (cur_hi == *next_hi) {
- curLT = cur_lo < *next_lo;
- diff = curLT ? *next_lo - cur_lo : cur_lo - *next_lo;
- }
- else {
- curLT = cur_hi < *next_hi;
- diff = curLT ? cur_lo - *next_lo : *next_lo - cur_lo;
- }
-
- if (curLT) {
- word32 idx = diff / DTLS_WORD_BITS;
- word32 newDiff = diff % DTLS_WORD_BITS;
-
- if (idx < WOLFSSL_DTLS_WINDOW_WORDS)
- window[idx] |= (1 << newDiff);
- }
- else {
- if (diff >= DTLS_SEQ_BITS)
- XMEMSET(window, 0, DTLS_SEQ_SZ);
- else {
- word32 idx, newDiff, temp, i;
- word32 oldWindow[WOLFSSL_DTLS_WINDOW_WORDS];
-
- temp = 0;
- diff++;
- idx = diff / DTLS_WORD_BITS;
- newDiff = diff % DTLS_WORD_BITS;
-
- XMEMCPY(oldWindow, window, sizeof(oldWindow));
-
- for (i = 0; i < WOLFSSL_DTLS_WINDOW_WORDS; i++) {
- if (i < idx)
- window[i] = 0;
- else {
- temp |= (oldWindow[i-idx] << newDiff);
- window[i] = temp;
- temp = oldWindow[i-idx] >> (DTLS_WORD_BITS - newDiff - 1);
- }
- }
- }
- window[0] |= 1;
- *next_lo = cur_lo + 1;
- if (*next_lo < cur_lo)
- (*next_hi)++;
- }
-
- return 1;
-}
-
-
-static int DtlsMsgDrain(WOLFSSL* ssl)
-{
- DtlsMsg* item = ssl->dtls_rx_msg_list;
- int ret = 0;
-
- WOLFSSL_ENTER("DtlsMsgDrain()");
-
- /* While there is an item in the store list, and it is the expected
- * message, and it is complete, and there hasn't been an error in the
- * last message... */
- while (item != NULL &&
- ssl->keys.dtls_expected_peer_handshake_number == item->seq &&
- item->fragSz == item->sz &&
- ret == 0) {
- word32 idx = 0;
- if ((ret = DoHandShakeMsgType(ssl, item->msg, &idx, item->type,
- item->sz, item->sz)) == 0) {
- if (item->type != finished)
- ssl->keys.dtls_expected_peer_handshake_number++;
- DtlsTxMsgListClean(ssl);
- }
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- break;
- }
- #endif
- ssl->dtls_rx_msg_list = item->next;
- DtlsMsgDelete(item, ssl->heap);
- item = ssl->dtls_rx_msg_list;
- ssl->dtls_rx_msg_list_sz--;
- }
-
- WOLFSSL_LEAVE("DtlsMsgDrain()", ret);
- return ret;
-}
-
-
-static int DoDtlsHandShakeMsg(WOLFSSL* ssl, byte* input, word32* inOutIdx,
- word32 totalSz)
-{
- byte type;
- word32 size;
- word32 fragOffset, fragSz;
- int ret = 0;
- int ignoreFinished = 0;
-
- WOLFSSL_ENTER("DoDtlsHandShakeMsg()");
-
- /* parse header */
- if (GetDtlsHandShakeHeader(ssl, input, inOutIdx, &type,
- &size, &fragOffset, &fragSz, totalSz) != 0) {
- WOLFSSL_ERROR(PARSE_ERROR);
- return PARSE_ERROR;
- }
-
- /* Cap the maximum size of a handshake message to something reasonable.
- * By default is the maximum size of a certificate message assuming
- * nine 2048-bit RSA certificates in the chain. */
- if (size > MAX_HANDSHAKE_SZ) {
- WOLFSSL_MSG("Handshake message too large");
- return HANDSHAKE_SIZE_ERROR;
- }
-
- /* check that we have complete fragment */
- if (*inOutIdx + fragSz > totalSz) {
- WOLFSSL_ERROR(INCOMPLETE_DATA);
- return INCOMPLETE_DATA;
- }
-
- if (type == finished && ssl->keys.dtls_peer_handshake_number >=
- ssl->keys.dtls_expected_peer_handshake_number &&
- ssl->keys.curEpoch == ssl->keys.dtls_epoch) {
- /* finished msg should be ignore from the current epoch
- * if it comes from a previous handshake */
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- ignoreFinished = ssl->options.connectState < FINISHED_DONE;
- }
- else {
- ignoreFinished = ssl->options.acceptState < ACCEPT_FINISHED_DONE;
- }
- }
-
- /* Check the handshake sequence number first. If out of order,
- * add the current message to the list. If the message is in order,
- * but it is a fragment, add the current message to the list, then
- * check the head of the list to see if it is complete, if so, pop
- * it out as the current message. If the message is complete and in
- * order, process it. Check the head of the list to see if it is in
- * order, if so, process it. (Repeat until list exhausted.) If the
- * head is out of order, return for more processing.
- */
- if (ssl->keys.dtls_peer_handshake_number >
- ssl->keys.dtls_expected_peer_handshake_number &&
- /* Only client_hello shouldn't be ignored if the handshake
- * num is greater */
- (type == client_hello ||
- ssl->options.handShakeState != HANDSHAKE_DONE) &&
- !ignoreFinished) {
- /* Current message is out of order. It will get stored in the list.
- * Storing also takes care of defragmentation. If the messages is a
- * client hello, we need to process this out of order; the server
- * is not supposed to keep state, but the second client hello will
- * have a different handshake sequence number than is expected, and
- * the server shouldn't be expecting any particular handshake sequence
- * number. (If the cookie changes multiple times in quick succession,
- * the client could be sending multiple new client hello messages
- * with newer and newer cookies.) */
- WOLFSSL_MSG("Current message is out of order");
- if (type != client_hello) {
- if (ssl->dtls_rx_msg_list_sz < DTLS_POOL_SZ) {
- DtlsMsgStore(ssl, ssl->keys.curEpoch,
- ssl->keys.dtls_peer_handshake_number,
- input + *inOutIdx, size, type,
- fragOffset, fragSz, ssl->heap);
- }
- *inOutIdx += fragSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead && ssl->keys.curEpoch != 0) {
- word32 digestSz = MacSize(ssl);
- if (*inOutIdx + ssl->keys.padSz + digestSz > totalSz)
- return BUFFER_E;
- *inOutIdx += digestSz;
- }
- else
- #endif
- {
- if (*inOutIdx + ssl->keys.padSz > totalSz) {
- WOLFSSL_ERROR(BUFFER_E);
- return BUFFER_E;
- }
- }
- *inOutIdx += ssl->keys.padSz;
- ret = 0;
- }
- else {
- ret = DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz);
- if (ret == 0) {
- ssl->keys.dtls_expected_peer_handshake_number =
- ssl->keys.dtls_peer_handshake_number + 1;
- }
- }
- }
- else if (ssl->keys.dtls_peer_handshake_number <
- ssl->keys.dtls_expected_peer_handshake_number ||
- /* ignore all handshake messages if we are done with the
- * handshake */
- (ssl->keys.dtls_peer_handshake_number >
- ssl->keys.dtls_expected_peer_handshake_number &&
- ssl->options.handShakeState == HANDSHAKE_DONE) ||
- ignoreFinished) {
- /* Already saw this message and processed it. It can be ignored. */
- WOLFSSL_MSG("Already saw this message and processed it");
- *inOutIdx += fragSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead && ssl->keys.curEpoch != 0) {
- word32 digestSz = MacSize(ssl);
- if (*inOutIdx + ssl->keys.padSz + digestSz > totalSz)
- return BUFFER_E;
- *inOutIdx += digestSz;
- }
- else
- #endif
- {
- if (*inOutIdx + ssl->keys.padSz > totalSz) {
- WOLFSSL_ERROR(BUFFER_E);
- return BUFFER_E;
- }
- }
- if (IsDtlsNotSctpMode(ssl) &&
- VerifyForDtlsMsgPoolSend(ssl, type, fragOffset)) {
-
- ret = DtlsMsgPoolSend(ssl, 0);
- }
- *inOutIdx += ssl->keys.padSz;
- }
- else if (fragSz < size) {
- /* Since this branch is in order, but fragmented, dtls_rx_msg_list will
- * be pointing to the message with this fragment in it. Check it to see
- * if it is completed. */
- WOLFSSL_MSG("Branch is in order, but fragmented");
- if (ssl->dtls_rx_msg_list_sz < DTLS_POOL_SZ) {
- DtlsMsgStore(ssl, ssl->keys.curEpoch,
- ssl->keys.dtls_peer_handshake_number,
- input + *inOutIdx, size, type,
- fragOffset, fragSz, ssl->heap);
- }
- *inOutIdx += fragSz;
- *inOutIdx += ssl->keys.padSz;
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead && ssl->keys.curEpoch != 0) {
- word32 digestSz = MacSize(ssl);
- if (*inOutIdx + digestSz > totalSz)
- return BUFFER_E;
- *inOutIdx += digestSz;
- }
-#endif
- ret = 0;
- if (ssl->dtls_rx_msg_list != NULL &&
- ssl->dtls_rx_msg_list->fragSz >= ssl->dtls_rx_msg_list->sz)
- ret = DtlsMsgDrain(ssl);
- }
- else {
- /* This branch is in order next, and a complete message. On success
- * clean the tx list. */
-#ifdef WOLFSSL_ASYNC_CRYPT
- word32 idx = *inOutIdx;
-#endif
- WOLFSSL_MSG("Branch is in order and a complete message");
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* In async mode always store the message and process it with
- * DtlsMsgDrain because in case of a WC_PENDING_E it will be
- * easier this way. */
- if (ssl->dtls_rx_msg_list_sz < DTLS_POOL_SZ) {
- DtlsMsgStore(ssl, ssl->keys.curEpoch,
- ssl->keys.dtls_peer_handshake_number,
- input + idx, size, type,
- fragOffset, fragSz, ssl->heap);
- }
- if (idx + fragSz + ssl->keys.padSz > totalSz)
- return BUFFER_E;
- *inOutIdx = idx + fragSz + ssl->keys.padSz;
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead && ssl->keys.curEpoch != 0) {
- word32 digestSz = MacSize(ssl);
- if (*inOutIdx + digestSz > totalSz)
- return BUFFER_E;
- *inOutIdx += digestSz;
- }
-#endif
- ret = DtlsMsgDrain(ssl);
-#else
- ret = DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz);
- if (ret == 0) {
- DtlsTxMsgListClean(ssl);
- if (type != finished)
- ssl->keys.dtls_expected_peer_handshake_number++;
- if (ssl->dtls_rx_msg_list != NULL) {
- ret = DtlsMsgDrain(ssl);
- }
- }
-#endif
- }
-
- WOLFSSL_LEAVE("DoDtlsHandShakeMsg()", ret);
- return ret;
-}
-#endif
-
-#ifndef WOLFSSL_NO_TLS12
-
-#ifdef HAVE_AEAD
-
-#if (!defined(NO_PUBLIC_GCM_SET_IV) && \
- ((defined(HAVE_FIPS) || defined(HAVE_SELFTEST)) && \
- (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)))) || \
- (defined(HAVE_POLY1305) && defined(HAVE_CHACHA))
-static WC_INLINE void AeadIncrementExpIV(WOLFSSL* ssl)
-{
- int i;
- for (i = AEAD_MAX_EXP_SZ-1; i >= 0; i--) {
- if (++ssl->keys.aead_exp_IV[i]) return;
- }
-}
-#endif
-
-
-#if defined(HAVE_POLY1305) && defined(HAVE_CHACHA)
-/* Used for the older version of creating AEAD tags with Poly1305 */
-static int Poly1305TagOld(WOLFSSL* ssl, byte* additional, const byte* out,
- byte* cipher, word16 sz, byte* tag)
-{
- int ret = 0;
- int msglen = (sz - ssl->specs.aead_mac_size);
- word32 keySz = 32;
- byte padding[8]; /* used to temporarily store lengths */
-
-#ifdef CHACHA_AEAD_TEST
- printf("Using old version of poly1305 input.\n");
-#endif
-
- if (msglen < 0)
- return INPUT_CASE_ERROR;
-
- if ((ret = wc_Poly1305SetKey(ssl->auth.poly1305, cipher, keySz)) != 0)
- return ret;
-
- if ((ret = wc_Poly1305Update(ssl->auth.poly1305, additional,
- AEAD_AUTH_DATA_SZ)) != 0)
- return ret;
-
- /* length of additional input plus padding */
- XMEMSET(padding, 0, sizeof(padding));
- padding[0] = AEAD_AUTH_DATA_SZ;
- if ((ret = wc_Poly1305Update(ssl->auth.poly1305, padding,
- sizeof(padding))) != 0)
- return ret;
-
-
- /* add cipher info and then its length */
- XMEMSET(padding, 0, sizeof(padding));
- if ((ret = wc_Poly1305Update(ssl->auth.poly1305, out, msglen)) != 0)
- return ret;
-
- /* 32 bit size of cipher to 64 bit endian */
- padding[0] = msglen & 0xff;
- padding[1] = (msglen >> 8) & 0xff;
- padding[2] = ((word32)msglen >> 16) & 0xff;
- padding[3] = ((word32)msglen >> 24) & 0xff;
- if ((ret = wc_Poly1305Update(ssl->auth.poly1305, padding, sizeof(padding)))
- != 0)
- return ret;
-
- /* generate tag */
- if ((ret = wc_Poly1305Final(ssl->auth.poly1305, tag)) != 0)
- return ret;
-
- return ret;
-}
-
-
-/* When the flag oldPoly is not set this follows RFC7905. When oldPoly is set
- * the implementation follows an older draft for creating the nonce and MAC.
- * The flag oldPoly gets set automatically depending on what cipher suite was
- * negotiated in the handshake. This is able to be done because the IDs for the
- * cipher suites was updated in RFC7905 giving unique values for the older
- * draft in comparison to the more recent RFC.
- *
- * ssl WOLFSSL structure to get cipher and TLS state from
- * out output buffer to hold encrypted data
- * input data to encrypt
- * sz size of input
- *
- * Return 0 on success negative values in error case
- */
-static int ChachaAEADEncrypt(WOLFSSL* ssl, byte* out, const byte* input,
- word16 sz)
-{
- const byte* additionalSrc = input - RECORD_HEADER_SZ;
- int ret = 0;
- word32 msgLen = (sz - ssl->specs.aead_mac_size);
- byte tag[POLY1305_AUTH_SZ];
- byte add[AEAD_AUTH_DATA_SZ];
- byte nonce[CHACHA20_NONCE_SZ];
- byte poly[CHACHA20_256_KEY_SIZE]; /* generated key for poly1305 */
- #ifdef CHACHA_AEAD_TEST
- int i;
- #endif
-
- XMEMSET(tag, 0, sizeof(tag));
- XMEMSET(nonce, 0, sizeof(nonce));
- XMEMSET(poly, 0, sizeof(poly));
- XMEMSET(add, 0, sizeof(add));
-
- /* opaque SEQ number stored for AD */
- WriteSEQ(ssl, CUR_ORDER, add);
-
- if (ssl->options.oldPoly != 0) {
- /* get nonce. SEQ should not be incremented again here */
- XMEMCPY(nonce + CHACHA20_OLD_OFFSET, add, OPAQUE32_LEN * 2);
- }
-
- /* Store the type, version. Unfortunately, they are in
- * the input buffer ahead of the plaintext. */
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- additionalSrc -= DTLS_HANDSHAKE_EXTRA;
- }
- #endif
-
- /* add TLS message size to additional data */
- add[AEAD_AUTH_DATA_SZ - 2] = (msgLen >> 8) & 0xff;
- add[AEAD_AUTH_DATA_SZ - 1] = msgLen & 0xff;
-
- XMEMCPY(add + AEAD_TYPE_OFFSET, additionalSrc, 3);
-
- #ifdef CHACHA_AEAD_TEST
- printf("Encrypt Additional : ");
- for (i = 0; i < AEAD_AUTH_DATA_SZ; i++) {
- printf("%02x", add[i]);
- }
- printf("\n\n");
- printf("input before encryption :\n");
- for (i = 0; i < sz; i++) {
- printf("%02x", input[i]);
- if ((i + 1) % 16 == 0)
- printf("\n");
- }
- printf("\n");
- #endif
-
- if (ssl->options.oldPoly == 0) {
- /* nonce is formed by 4 0x00 byte padded to the left followed by 8 byte
- * record sequence number XORed with client_write_IV/server_write_IV */
- XMEMCPY(nonce, ssl->keys.aead_enc_imp_IV, CHACHA20_IMP_IV_SZ);
- nonce[4] ^= add[0];
- nonce[5] ^= add[1];
- nonce[6] ^= add[2];
- nonce[7] ^= add[3];
- nonce[8] ^= add[4];
- nonce[9] ^= add[5];
- nonce[10] ^= add[6];
- nonce[11] ^= add[7];
- }
-
- /* set the nonce for chacha and get poly1305 key */
- if ((ret = wc_Chacha_SetIV(ssl->encrypt.chacha, nonce, 0)) != 0) {
- ForceZero(nonce, CHACHA20_NONCE_SZ);
- return ret;
- }
-
- /* create Poly1305 key using chacha20 keystream */
- if ((ret = wc_Chacha_Process(ssl->encrypt.chacha, poly,
- poly, sizeof(poly))) != 0) {
- ForceZero(nonce, CHACHA20_NONCE_SZ);
- return ret;
- }
-
- /* set the counter after getting poly1305 key */
- if ((ret = wc_Chacha_SetIV(ssl->encrypt.chacha, nonce, 1)) != 0) {
- ForceZero(nonce, CHACHA20_NONCE_SZ);
- return ret;
- }
- ForceZero(nonce, CHACHA20_NONCE_SZ); /* done with nonce, clear it */
-
- /* encrypt the plain text */
- if ((ret = wc_Chacha_Process(ssl->encrypt.chacha, out,
- input, msgLen)) != 0) {
- ForceZero(poly, sizeof(poly));
- return ret;
- }
-
- /* get the poly1305 tag using either old padding scheme or more recent */
- if (ssl->options.oldPoly != 0) {
- if ((ret = Poly1305TagOld(ssl, add, (const byte* )out,
- poly, sz, tag)) != 0) {
- ForceZero(poly, sizeof(poly));
- return ret;
- }
- }
- else {
- if ((ret = wc_Poly1305SetKey(ssl->auth.poly1305, poly,
- sizeof(poly))) != 0) {
- ForceZero(poly, sizeof(poly));
- return ret;
- }
- if ((ret = wc_Poly1305_MAC(ssl->auth.poly1305, add,
- sizeof(add), out, msgLen, tag, sizeof(tag))) != 0) {
- ForceZero(poly, sizeof(poly));
- return ret;
- }
- }
- ForceZero(poly, sizeof(poly)); /* done with poly1305 key, clear it */
-
- /* append tag to ciphertext */
- XMEMCPY(out + msgLen, tag, sizeof(tag));
-
- AeadIncrementExpIV(ssl);
-
- #ifdef CHACHA_AEAD_TEST
- printf("mac tag :\n");
- for (i = 0; i < 16; i++) {
- printf("%02x", tag[i]);
- if ((i + 1) % 16 == 0)
- printf("\n");
- }
- printf("\n\noutput after encrypt :\n");
- for (i = 0; i < sz; i++) {
- printf("%02x", out[i]);
- if ((i + 1) % 16 == 0)
- printf("\n");
- }
- printf("\n");
- #endif
-
- return ret;
-}
-
-
-/* When the flag oldPoly is not set this follows RFC7905. When oldPoly is set
- * the implementation follows an older draft for creating the nonce and MAC.
- * The flag oldPoly gets set automatically depending on what cipher suite was
- * negotiated in the handshake. This is able to be done because the IDs for the
- * cipher suites was updated in RFC7905 giving unique values for the older
- * draft in comparison to the more recent RFC.
- *
- * ssl WOLFSSL structure to get cipher and TLS state from
- * plain output buffer to hold decrypted data
- * input data to decrypt
- * sz size of input
- *
- * Return 0 on success negative values in error case
- */
-static int ChachaAEADDecrypt(WOLFSSL* ssl, byte* plain, const byte* input,
- word16 sz)
-{
- byte add[AEAD_AUTH_DATA_SZ];
- byte nonce[CHACHA20_NONCE_SZ];
- byte tag[POLY1305_AUTH_SZ];
- byte poly[CHACHA20_256_KEY_SIZE]; /* generated key for mac */
- int ret = 0;
- int msgLen = (sz - ssl->specs.aead_mac_size);
-
- #ifdef CHACHA_AEAD_TEST
- int i;
- printf("input before decrypt :\n");
- for (i = 0; i < sz; i++) {
- printf("%02x", input[i]);
- if ((i + 1) % 16 == 0)
- printf("\n");
- }
- printf("\n");
- #endif
-
- XMEMSET(tag, 0, sizeof(tag));
- XMEMSET(poly, 0, sizeof(poly));
- XMEMSET(nonce, 0, sizeof(nonce));
- XMEMSET(add, 0, sizeof(add));
-
- /* sequence number field is 64-bits */
- WriteSEQ(ssl, PEER_ORDER, add);
-
- if (ssl->options.oldPoly != 0) {
- /* get nonce, SEQ should not be incremented again here */
- XMEMCPY(nonce + CHACHA20_OLD_OFFSET, add, OPAQUE32_LEN * 2);
- }
-
- /* get AD info */
- /* Store the type, version. */
- add[AEAD_TYPE_OFFSET] = ssl->curRL.type;
- add[AEAD_VMAJ_OFFSET] = ssl->curRL.pvMajor;
- add[AEAD_VMIN_OFFSET] = ssl->curRL.pvMinor;
-
- /* add TLS message size to additional data */
- add[AEAD_AUTH_DATA_SZ - 2] = (msgLen >> 8) & 0xff;
- add[AEAD_AUTH_DATA_SZ - 1] = msgLen & 0xff;
-
- #ifdef CHACHA_AEAD_TEST
- printf("Decrypt Additional : ");
- for (i = 0; i < AEAD_AUTH_DATA_SZ; i++) {
- printf("%02x", add[i]);
- }
- printf("\n\n");
- #endif
-
- if (ssl->options.oldPoly == 0) {
- /* nonce is formed by 4 0x00 byte padded to the left followed by 8 byte
- * record sequence number XORed with client_write_IV/server_write_IV */
- XMEMCPY(nonce, ssl->keys.aead_dec_imp_IV, CHACHA20_IMP_IV_SZ);
- nonce[4] ^= add[0];
- nonce[5] ^= add[1];
- nonce[6] ^= add[2];
- nonce[7] ^= add[3];
- nonce[8] ^= add[4];
- nonce[9] ^= add[5];
- nonce[10] ^= add[6];
- nonce[11] ^= add[7];
- }
-
- /* set nonce and get poly1305 key */
- if ((ret = wc_Chacha_SetIV(ssl->decrypt.chacha, nonce, 0)) != 0) {
- ForceZero(nonce, CHACHA20_NONCE_SZ);
- return ret;
- }
-
- /* use chacha20 keystream to get poly1305 key for tag */
- if ((ret = wc_Chacha_Process(ssl->decrypt.chacha, poly,
- poly, sizeof(poly))) != 0) {
- ForceZero(nonce, CHACHA20_NONCE_SZ);
- return ret;
- }
-
- /* set counter after getting poly1305 key */
- if ((ret = wc_Chacha_SetIV(ssl->decrypt.chacha, nonce, 1)) != 0) {
- ForceZero(nonce, CHACHA20_NONCE_SZ);
- return ret;
- }
- ForceZero(nonce, CHACHA20_NONCE_SZ); /* done with nonce, clear it */
-
- /* get the tag using Poly1305 */
- if (ssl->options.oldPoly != 0) {
- if ((ret = Poly1305TagOld(ssl, add, input, poly, sz, tag)) != 0) {
- ForceZero(poly, sizeof(poly));
- return ret;
- }
- }
- else {
- if ((ret = wc_Poly1305SetKey(ssl->auth.poly1305, poly,
- sizeof(poly))) != 0) {
- ForceZero(poly, sizeof(poly));
- return ret;
- }
- if ((ret = wc_Poly1305_MAC(ssl->auth.poly1305, add,
- sizeof(add), (byte*)input, msgLen, tag, sizeof(tag))) != 0) {
- ForceZero(poly, sizeof(poly));
- return ret;
- }
- }
- ForceZero(poly, sizeof(poly)); /* done with poly1305 key, clear it */
-
- /* check tag sent along with packet */
- if (ConstantCompare(input + msgLen, tag, ssl->specs.aead_mac_size) != 0) {
- WOLFSSL_MSG("MAC did not match");
- if (!ssl->options.dtls)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- return VERIFY_MAC_ERROR;
- }
-
- /* if the tag was good decrypt message */
- if ((ret = wc_Chacha_Process(ssl->decrypt.chacha, plain,
- input, msgLen)) != 0)
- return ret;
-
- #ifdef CHACHA_AEAD_TEST
- printf("plain after decrypt :\n");
- for (i = 0; i < sz; i++) {
- printf("%02x", plain[i]);
- if ((i + 1) % 16 == 0)
- printf("\n");
- }
- printf("\n");
- #endif
-
- return ret;
-}
-#endif /* HAVE_CHACHA && HAVE_POLY1305 */
-#endif /* HAVE_AEAD */
-
-
-#if defined(BUILD_AESGCM) || defined(HAVE_AESCCM)
-
-#if !defined(NO_GCM_ENCRYPT_EXTRA) && \
- ((!defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)) || \
- (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)))
-/* The following type is used to share code between AES-GCM and AES-CCM. */
- typedef int (*AesAuthEncryptFunc)(Aes* aes, byte* out,
- const byte* in, word32 sz,
- byte* iv, word32 ivSz,
- byte* authTag, word32 authTagSz,
- const byte* authIn, word32 authInSz);
- #define AES_AUTH_ENCRYPT_FUNC AesAuthEncryptFunc
- #define AES_GCM_ENCRYPT wc_AesGcmEncrypt_ex
- #define AES_CCM_ENCRYPT wc_AesCcmEncrypt_ex
-#else
- #define AES_AUTH_ENCRYPT_FUNC wc_AesAuthEncryptFunc
- #define AES_GCM_ENCRYPT wc_AesGcmEncrypt
- #define AES_CCM_ENCRYPT wc_AesCcmEncrypt
-#endif
-
-#endif
-
-
-static WC_INLINE int EncryptDo(WOLFSSL* ssl, byte* out, const byte* input,
- word16 sz, int asyncOkay)
-{
- int ret = 0;
-#ifdef WOLFSSL_ASYNC_CRYPT
- WC_ASYNC_DEV* asyncDev = NULL;
- word32 event_flags = WC_ASYNC_FLAG_CALL_AGAIN;
-#else
- (void)asyncOkay;
-#endif
-
- (void)out;
- (void)input;
- (void)sz;
-
- switch (ssl->specs.bulk_cipher_algorithm) {
- #ifdef BUILD_ARC4
- case wolfssl_rc4:
- wc_Arc4Process(ssl->encrypt.arc4, out, input, sz);
- break;
- #endif
-
- #ifdef BUILD_DES3
- case wolfssl_triple_des:
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- asyncDev = &ssl->encrypt.des3->asyncDev;
- ret = wolfSSL_AsyncInit(ssl, asyncDev, event_flags);
- if (ret != 0)
- break;
- #endif
-
- ret = wc_Des3_CbcEncrypt(ssl->encrypt.des3, out, input, sz);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E && asyncOkay) {
- ret = wolfSSL_AsyncPush(ssl, asyncDev);
- }
- #endif
- break;
- #endif
-
- #if defined(BUILD_AES) && defined(HAVE_AES_CBC)
- case wolfssl_aes:
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- asyncDev = &ssl->encrypt.aes->asyncDev;
- ret = wolfSSL_AsyncInit(ssl, asyncDev, event_flags);
- if (ret != 0)
- break;
- #endif
- #if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl)) {
- ret = wc_tsip_AesCbcEncrypt(ssl->encrypt.aes, out, input, sz);
- } else
- #endif
- ret = wc_AesCbcEncrypt(ssl->encrypt.aes, out, input, sz);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E && asyncOkay) {
- ret = wolfSSL_AsyncPush(ssl, asyncDev);
- }
- #endif
- break;
- #endif
-
- #if defined(BUILD_AESGCM) || defined(HAVE_AESCCM)
- case wolfssl_aes_gcm:
- case wolfssl_aes_ccm:/* GCM AEAD macros use same size as CCM */
- {
- AES_AUTH_ENCRYPT_FUNC aes_auth_fn;
- const byte* additionalSrc;
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- asyncDev = &ssl->encrypt.aes->asyncDev;
- ret = wolfSSL_AsyncInit(ssl, asyncDev, event_flags);
- if (ret != 0)
- break;
- #endif
-
- #if defined(BUILD_AESGCM) && defined(HAVE_AESCCM)
- aes_auth_fn = (ssl->specs.bulk_cipher_algorithm == wolfssl_aes_gcm)
- ? AES_GCM_ENCRYPT : AES_CCM_ENCRYPT;
- #elif defined(BUILD_AESGCM)
- aes_auth_fn = AES_GCM_ENCRYPT;
- #else
- aes_auth_fn = AES_CCM_ENCRYPT;
- #endif
- additionalSrc = input - 5;
-
- XMEMSET(ssl->encrypt.additional, 0, AEAD_AUTH_DATA_SZ);
-
- /* sequence number field is 64-bits */
- WriteSEQ(ssl, CUR_ORDER, ssl->encrypt.additional);
-
- /* Store the type, version. Unfortunately, they are in
- * the input buffer ahead of the plaintext. */
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- additionalSrc -= DTLS_HANDSHAKE_EXTRA;
- }
- #endif
- XMEMCPY(ssl->encrypt.additional + AEAD_TYPE_OFFSET,
- additionalSrc, 3);
-
- /* Store the length of the plain text minus the explicit
- * IV length minus the authentication tag size. */
- c16toa(sz - AESGCM_EXP_IV_SZ - ssl->specs.aead_mac_size,
- ssl->encrypt.additional + AEAD_LEN_OFFSET);
-#if !defined(NO_PUBLIC_GCM_SET_IV) && \
- ((defined(HAVE_FIPS) || defined(HAVE_SELFTEST)) && \
- (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)))
- XMEMCPY(ssl->encrypt.nonce,
- ssl->keys.aead_enc_imp_IV, AESGCM_IMP_IV_SZ);
- XMEMCPY(ssl->encrypt.nonce + AESGCM_IMP_IV_SZ,
- ssl->keys.aead_exp_IV, AESGCM_EXP_IV_SZ);
-#endif
- ret = aes_auth_fn(ssl->encrypt.aes,
- out + AESGCM_EXP_IV_SZ, input + AESGCM_EXP_IV_SZ,
- sz - AESGCM_EXP_IV_SZ - ssl->specs.aead_mac_size,
- ssl->encrypt.nonce, AESGCM_NONCE_SZ,
- out + sz - ssl->specs.aead_mac_size,
- ssl->specs.aead_mac_size,
- ssl->encrypt.additional, AEAD_AUTH_DATA_SZ);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E && asyncOkay) {
- ret = wolfSSL_AsyncPush(ssl, asyncDev);
- }
- #endif
-#if !defined(NO_PUBLIC_GCM_SET_IV) && \
- ((!defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)) || \
- (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)))
- XMEMCPY(out,
- ssl->encrypt.nonce + AESGCM_IMP_IV_SZ, AESGCM_EXP_IV_SZ);
-#endif
- }
- break;
- #endif /* BUILD_AESGCM || HAVE_AESCCM */
-
- #ifdef HAVE_CAMELLIA
- case wolfssl_camellia:
- ret = wc_CamelliaCbcEncrypt(ssl->encrypt.cam, out, input, sz);
- break;
- #endif
-
- #ifdef HAVE_HC128
- case wolfssl_hc128:
- ret = wc_Hc128_Process(ssl->encrypt.hc128, out, input, sz);
- break;
- #endif
-
- #ifdef BUILD_RABBIT
- case wolfssl_rabbit:
- ret = wc_RabbitProcess(ssl->encrypt.rabbit, out, input, sz);
- break;
- #endif
-
- #if defined(HAVE_CHACHA) && defined(HAVE_POLY1305)
- case wolfssl_chacha:
- ret = ChachaAEADEncrypt(ssl, out, input, sz);
- break;
- #endif
-
- #ifdef HAVE_NULL_CIPHER
- case wolfssl_cipher_null:
- if (input != out) {
- XMEMMOVE(out, input, sz);
- }
- break;
- #endif
-
- #ifdef HAVE_IDEA
- case wolfssl_idea:
- ret = wc_IdeaCbcEncrypt(ssl->encrypt.idea, out, input, sz);
- break;
- #endif
-
- default:
- WOLFSSL_MSG("wolfSSL Encrypt programming error");
- ret = ENCRYPT_ERROR;
- }
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* if async is not okay, then block */
- if (ret == WC_PENDING_E && !asyncOkay) {
- ret = wc_AsyncWait(ret, asyncDev, event_flags);
- }
-#endif
-
- return ret;
-}
-
-static WC_INLINE int Encrypt(WOLFSSL* ssl, byte* out, const byte* input, word16 sz,
- int asyncOkay)
-{
- int ret = 0;
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ssl->error == WC_PENDING_E) {
- ssl->error = 0; /* clear async */
- }
-#endif
-
- switch (ssl->encrypt.state) {
- case CIPHER_STATE_BEGIN:
- {
- if (ssl->encrypt.setup == 0) {
- WOLFSSL_MSG("Encrypt ciphers not setup");
- return ENCRYPT_ERROR;
- }
-
- #ifdef HAVE_FUZZER
- if (ssl->fuzzerCb)
- ssl->fuzzerCb(ssl, input, sz, FUZZ_ENCRYPT, ssl->fuzzerCtx);
- #endif
-
- #if defined(BUILD_AESGCM) || defined(HAVE_AESCCM)
- /* make sure AES GCM/CCM memory is allocated */
- /* free for these happens in FreeCiphers */
- if (ssl->specs.bulk_cipher_algorithm == wolfssl_aes_ccm ||
- ssl->specs.bulk_cipher_algorithm == wolfssl_aes_gcm) {
- /* make sure auth iv and auth are allocated */
- if (ssl->encrypt.additional == NULL)
- ssl->encrypt.additional = (byte*)XMALLOC(AEAD_AUTH_DATA_SZ,
- ssl->heap, DYNAMIC_TYPE_AES_BUFFER);
- if (ssl->encrypt.nonce == NULL)
- ssl->encrypt.nonce = (byte*)XMALLOC(AESGCM_NONCE_SZ,
- ssl->heap, DYNAMIC_TYPE_AES_BUFFER);
- if (ssl->encrypt.additional == NULL ||
- ssl->encrypt.nonce == NULL) {
- return MEMORY_E;
- }
- }
- #endif /* BUILD_AESGCM || HAVE_AESCCM */
-
- /* Advance state and proceed */
- ssl->encrypt.state = CIPHER_STATE_DO;
- }
- FALL_THROUGH;
-
- case CIPHER_STATE_DO:
- {
- ret = EncryptDo(ssl, out, input, sz, asyncOkay);
-
- /* Advance state */
- ssl->encrypt.state = CIPHER_STATE_END;
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* If pending, then leave and return will resume below */
- if (ret == WC_PENDING_E) {
- return ret;
- }
- #endif
- }
- FALL_THROUGH;
-
- case CIPHER_STATE_END:
- {
- #if defined(BUILD_AESGCM) || defined(HAVE_AESCCM)
- if (ssl->specs.bulk_cipher_algorithm == wolfssl_aes_ccm ||
- ssl->specs.bulk_cipher_algorithm == wolfssl_aes_gcm)
- {
- /* finalize authentication cipher */
-#if !defined(NO_PUBLIC_GCM_SET_IV) && \
- ((defined(HAVE_FIPS) || defined(HAVE_SELFTEST)) && \
- (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)))
- AeadIncrementExpIV(ssl);
-#endif
- if (ssl->encrypt.nonce)
- ForceZero(ssl->encrypt.nonce, AESGCM_NONCE_SZ);
- }
- #endif /* BUILD_AESGCM || HAVE_AESCCM */
- break;
- }
- }
-
- /* Reset state */
- ssl->encrypt.state = CIPHER_STATE_BEGIN;
-
- return ret;
-}
-
-
-static WC_INLINE int DecryptDo(WOLFSSL* ssl, byte* plain, const byte* input,
- word16 sz)
-{
- int ret = 0;
-
- (void)plain;
- (void)input;
- (void)sz;
-
- switch (ssl->specs.bulk_cipher_algorithm)
- {
- #ifdef BUILD_ARC4
- case wolfssl_rc4:
- wc_Arc4Process(ssl->decrypt.arc4, plain, input, sz);
- break;
- #endif
-
- #ifdef BUILD_DES3
- case wolfssl_triple_des:
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &ssl->decrypt.des3->asyncDev,
- WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- break;
- #endif
-
- ret = wc_Des3_CbcDecrypt(ssl->decrypt.des3, plain, input, sz);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &ssl->decrypt.des3->asyncDev);
- }
- #endif
- break;
- #endif
-
- #if defined(BUILD_AES) && defined(HAVE_AES_CBC)
- case wolfssl_aes:
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &ssl->decrypt.aes->asyncDev,
- WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- break;
- #endif
- #if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl)) {
- ret = wc_tsip_AesCbcDecrypt(ssl->decrypt.aes, plain, input, sz);
- } else
- #endif
- ret = wc_AesCbcDecrypt(ssl->decrypt.aes, plain, input, sz);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &ssl->decrypt.aes->asyncDev);
- }
- #endif
- break;
- #endif
-
- #if defined(BUILD_AESGCM) || defined(HAVE_AESCCM)
- case wolfssl_aes_gcm:
- case wolfssl_aes_ccm: /* GCM AEAD macros use same size as CCM */
- {
- wc_AesAuthDecryptFunc aes_auth_fn;
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* initialize event */
- ret = wolfSSL_AsyncInit(ssl, &ssl->decrypt.aes->asyncDev,
- WC_ASYNC_FLAG_CALL_AGAIN);
- if (ret != 0)
- break;
- #endif
-
- #if defined(BUILD_AESGCM) && defined(HAVE_AESCCM)
- aes_auth_fn = (ssl->specs.bulk_cipher_algorithm == wolfssl_aes_gcm)
- ? wc_AesGcmDecrypt : wc_AesCcmDecrypt;
- #elif defined(BUILD_AESGCM)
- aes_auth_fn = wc_AesGcmDecrypt;
- #else
- aes_auth_fn = wc_AesCcmDecrypt;
- #endif
-
- XMEMSET(ssl->decrypt.additional, 0, AEAD_AUTH_DATA_SZ);
-
- /* sequence number field is 64-bits */
- WriteSEQ(ssl, PEER_ORDER, ssl->decrypt.additional);
-
- ssl->decrypt.additional[AEAD_TYPE_OFFSET] = ssl->curRL.type;
- ssl->decrypt.additional[AEAD_VMAJ_OFFSET] = ssl->curRL.pvMajor;
- ssl->decrypt.additional[AEAD_VMIN_OFFSET] = ssl->curRL.pvMinor;
-
- c16toa(sz - AESGCM_EXP_IV_SZ - ssl->specs.aead_mac_size,
- ssl->decrypt.additional + AEAD_LEN_OFFSET);
-
- #if defined(WOLFSSL_DTLS) && defined(HAVE_SECURE_RENEGOTIATION)
- if (ssl->options.dtls && IsDtlsMsgSCRKeys(ssl))
- XMEMCPY(ssl->decrypt.nonce,
- ssl->secure_renegotiation->tmp_keys.aead_dec_imp_IV,
- AESGCM_IMP_IV_SZ);
- else
- #endif
- XMEMCPY(ssl->decrypt.nonce, ssl->keys.aead_dec_imp_IV,
- AESGCM_IMP_IV_SZ);
- XMEMCPY(ssl->decrypt.nonce + AESGCM_IMP_IV_SZ, input,
- AESGCM_EXP_IV_SZ);
- if ((ret = aes_auth_fn(ssl->decrypt.aes,
- plain + AESGCM_EXP_IV_SZ,
- input + AESGCM_EXP_IV_SZ,
- sz - AESGCM_EXP_IV_SZ - ssl->specs.aead_mac_size,
- ssl->decrypt.nonce, AESGCM_NONCE_SZ,
- input + sz - ssl->specs.aead_mac_size,
- ssl->specs.aead_mac_size,
- ssl->decrypt.additional, AEAD_AUTH_DATA_SZ)) < 0) {
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- ret = wolfSSL_AsyncPush(ssl, &ssl->decrypt.aes->asyncDev);
- }
- #endif
- }
- }
- break;
- #endif /* BUILD_AESGCM || HAVE_AESCCM */
-
- #ifdef HAVE_CAMELLIA
- case wolfssl_camellia:
- ret = wc_CamelliaCbcDecrypt(ssl->decrypt.cam, plain, input, sz);
- break;
- #endif
-
- #ifdef HAVE_HC128
- case wolfssl_hc128:
- ret = wc_Hc128_Process(ssl->decrypt.hc128, plain, input, sz);
- break;
- #endif
-
- #ifdef BUILD_RABBIT
- case wolfssl_rabbit:
- ret = wc_RabbitProcess(ssl->decrypt.rabbit, plain, input, sz);
- break;
- #endif
-
- #if defined(HAVE_CHACHA) && defined(HAVE_POLY1305)
- case wolfssl_chacha:
- ret = ChachaAEADDecrypt(ssl, plain, input, sz);
- break;
- #endif
-
- #ifdef HAVE_NULL_CIPHER
- case wolfssl_cipher_null:
- if (input != plain) {
- XMEMMOVE(plain, input, sz);
- }
- break;
- #endif
-
- #ifdef HAVE_IDEA
- case wolfssl_idea:
- ret = wc_IdeaCbcDecrypt(ssl->decrypt.idea, plain, input, sz);
- break;
- #endif
-
- default:
- WOLFSSL_MSG("wolfSSL Decrypt programming error");
- ret = DECRYPT_ERROR;
- }
-
- return ret;
-}
-
-static WC_INLINE int Decrypt(WOLFSSL* ssl, byte* plain, const byte* input,
- word16 sz)
-{
- int ret = 0;
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- ret = wolfSSL_AsyncPop(ssl, &ssl->decrypt.state);
- if (ret != WC_NOT_PENDING_E) {
- /* check for still pending */
- if (ret == WC_PENDING_E)
- return ret;
-
- ssl->error = 0; /* clear async */
-
- /* let failures through so CIPHER_STATE_END logic is run */
- }
- else
-#endif
- {
- /* Reset state */
- ret = 0;
- ssl->decrypt.state = CIPHER_STATE_BEGIN;
- }
-
- switch (ssl->decrypt.state) {
- case CIPHER_STATE_BEGIN:
- {
- if (ssl->decrypt.setup == 0) {
- WOLFSSL_MSG("Decrypt ciphers not setup");
- return DECRYPT_ERROR;
- }
-
- #if defined(BUILD_AESGCM) || defined(HAVE_AESCCM)
- /* make sure AES GCM/CCM memory is allocated */
- /* free for these happens in FreeCiphers */
- if (ssl->specs.bulk_cipher_algorithm == wolfssl_aes_ccm ||
- ssl->specs.bulk_cipher_algorithm == wolfssl_aes_gcm) {
- /* make sure auth iv and auth are allocated */
- if (ssl->decrypt.additional == NULL)
- ssl->decrypt.additional = (byte*)XMALLOC(AEAD_AUTH_DATA_SZ,
- ssl->heap, DYNAMIC_TYPE_AES_BUFFER);
- if (ssl->decrypt.nonce == NULL)
- ssl->decrypt.nonce = (byte*)XMALLOC(AESGCM_NONCE_SZ,
- ssl->heap, DYNAMIC_TYPE_AES_BUFFER);
- if (ssl->decrypt.additional == NULL ||
- ssl->decrypt.nonce == NULL) {
- return MEMORY_E;
- }
- }
- #endif /* BUILD_AESGCM || HAVE_AESCCM */
-
- /* Advance state and proceed */
- ssl->decrypt.state = CIPHER_STATE_DO;
- }
- FALL_THROUGH;
- case CIPHER_STATE_DO:
- {
- #if defined(WOLFSSL_DTLS) && defined(HAVE_SECURE_RENEGOTIATION)
- if (ssl->options.dtls && DtlsSCRKeysSet(ssl)) {
- /* For epochs >1 the current cipher parameters are located in
- * ssl->secure_renegotiation->tmp_keys. Previous cipher
- * parameters and for epoch 1 use ssl->keys */
- if (ssl->keys.curEpoch ==
- ssl->secure_renegotiation->tmp_keys.dtls_epoch) {
- if (ssl->decrypt.src != SCR) {
- ssl->secure_renegotiation->cache_status =
- SCR_CACHE_NEEDED;
- if ((ret = SetKeysSide(ssl, DECRYPT_SIDE_ONLY)) != 0)
- break;
- }
- }
- else {
- if (ssl->decrypt.src != KEYS) {
- ssl->secure_renegotiation->cache_status =
- SCR_CACHE_NULL;
- if ((ret = SetKeysSide(ssl, DECRYPT_SIDE_ONLY)) != 0)
- break;
- }
- }
- }
- #endif
-
- ret = DecryptDo(ssl, plain, input, sz);
-
- /* Advance state */
- ssl->decrypt.state = CIPHER_STATE_END;
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* If pending, leave and return below */
- if (ret == WC_PENDING_E) {
- return ret;
- }
- #endif
- }
- FALL_THROUGH;
- case CIPHER_STATE_END:
- {
- #if defined(BUILD_AESGCM) || defined(HAVE_AESCCM)
- /* make sure AES GCM/CCM nonce is cleared */
- if (ssl->specs.bulk_cipher_algorithm == wolfssl_aes_ccm ||
- ssl->specs.bulk_cipher_algorithm == wolfssl_aes_gcm) {
- if (ssl->decrypt.nonce)
- ForceZero(ssl->decrypt.nonce, AESGCM_NONCE_SZ);
-
- if (ret < 0)
- ret = VERIFY_MAC_ERROR;
- }
- #endif /* BUILD_AESGCM || HAVE_AESCCM */
- break;
- }
- }
-
- /* Reset state */
- ssl->decrypt.state = CIPHER_STATE_BEGIN;
-
- /* handle mac error case */
- if (ret == VERIFY_MAC_ERROR) {
- if (!ssl->options.dtls)
- SendAlert(ssl, alert_fatal, bad_record_mac);
-
- #ifdef WOLFSSL_DTLS_DROP_STATS
- ssl->macDropCount++;
- #endif /* WOLFSSL_DTLS_DROP_STATS */
- }
-
- return ret;
-}
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-/* Check conditions for a cipher to have an explicit IV.
- *
- * ssl The SSL/TLS object.
- * returns 1 if the cipher in use has an explicit IV and 0 otherwise.
- */
-static WC_INLINE int CipherHasExpIV(WOLFSSL *ssl)
-{
-#ifdef WOLFSSL_TLS13
- if (ssl->options.tls1_3)
- return 0;
-#endif
- return (ssl->specs.cipher_type == aead) &&
- (ssl->specs.bulk_cipher_algorithm != wolfssl_chacha);
-}
-
-/* check cipher text size for sanity */
-static int SanityCheckCipherText(WOLFSSL* ssl, word32 encryptSz)
-{
-#ifdef HAVE_TRUNCATED_HMAC
- word32 minLength = ssl->truncated_hmac ? (byte)TRUNCATED_HMAC_SZ
- : ssl->specs.hash_size;
-#else
- word32 minLength = ssl->specs.hash_size; /* covers stream */
-#endif
-
-#ifndef WOLFSSL_AEAD_ONLY
- if (ssl->specs.cipher_type == block) {
-#ifdef HAVE_ENCRYPT_THEN_MAC
- if (ssl->options.startedETMRead) {
- if ((encryptSz - MacSize(ssl)) % ssl->specs.block_size) {
- WOLFSSL_MSG("Block ciphertext not block size");
- return SANITY_CIPHER_E;
- }
- }
- else
-#endif
- if (encryptSz % ssl->specs.block_size) {
- WOLFSSL_MSG("Block ciphertext not block size");
- return SANITY_CIPHER_E;
- }
-
- minLength++; /* pad byte */
-
- if (ssl->specs.block_size > minLength)
- minLength = ssl->specs.block_size;
-
- if (ssl->options.tls1_1)
- minLength += ssl->specs.block_size; /* explicit IV */
- }
- else
-#endif
- if (ssl->specs.cipher_type == aead) {
- minLength = ssl->specs.aead_mac_size; /* authTag size */
- if (CipherHasExpIV(ssl))
- minLength += AESGCM_EXP_IV_SZ; /* explicit IV */
- }
-
- if (encryptSz < minLength) {
- WOLFSSL_MSG("Ciphertext not minimum size");
- return SANITY_CIPHER_E;
- }
-
- return 0;
-}
-
-
-#ifndef WOLFSSL_AEAD_ONLY
-/* check all length bytes for the pad value, return 0 on success */
-static int PadCheck(const byte* a, byte pad, int length)
-{
- int i;
- int compareSum = 0;
-
- for (i = 0; i < length; i++) {
- compareSum |= a[i] ^ pad;
- }
-
- return compareSum;
-}
-
-
-/* Mask the padding bytes with the expected values.
- * Constant time implementation - does maximum pad size possible.
- *
- * data Message data.
- * sz Size of the message including MAC and padding and padding length.
- * macSz Size of the MAC.
- * returns 0 on success, otherwise failure.
- */
-static byte MaskPadding(const byte* data, int sz, int macSz)
-{
- int i;
- int checkSz = sz - 1;
- byte paddingSz = data[sz - 1];
- byte mask;
- byte good = ctMaskGT(paddingSz, sz - 1 - macSz);
-
- if (checkSz > TLS_MAX_PAD_SZ)
- checkSz = TLS_MAX_PAD_SZ;
-
- for (i = 0; i < checkSz; i++) {
- mask = ctMaskLTE(i, paddingSz);
- good |= mask & (data[sz - 1 - i] ^ paddingSz);
- }
-
- return good;
-}
-
-/* Mask the MAC in the message with the MAC calculated.
- * Constant time implementation - starts looking for MAC where maximum padding
- * size has it.
- *
- * data Message data.
- * sz Size of the message including MAC and padding and padding length.
- * macSz Size of the MAC data.
- * expMac Expected MAC value.
- * returns 0 on success, otherwise failure.
- */
-static byte MaskMac(const byte* data, int sz, int macSz, byte* expMac)
-{
- int i, j;
- unsigned char mac[WC_MAX_DIGEST_SIZE];
- int scanStart = sz - 1 - TLS_MAX_PAD_SZ - macSz;
- int macEnd = sz - 1 - data[sz - 1];
- int macStart = macEnd - macSz;
- int r = 0;
- unsigned char started, notEnded;
- unsigned char good = 0;
-
- scanStart &= ctMaskIntGTE(scanStart, 0);
- macStart &= ctMaskIntGTE(macStart, 0);
-
- /* Div on Intel has different speeds depending on value.
- * Use a bitwise AND or mod a specific value (converted to mul). */
- if ((macSz & (macSz - 1)) == 0)
- r = (macSz - (scanStart - macStart)) & (macSz - 1);
-#ifndef NO_SHA
- else if (macSz == WC_SHA_DIGEST_SIZE)
- r = (macSz - (scanStart - macStart)) % WC_SHA_DIGEST_SIZE;
-#endif
-#ifdef WOLFSSL_SHA384
- else if (macSz == WC_SHA384_DIGEST_SIZE)
- r = (macSz - (scanStart - macStart)) % WC_SHA384_DIGEST_SIZE;
-#endif
-
- XMEMSET(mac, 0, macSz);
- for (i = scanStart; i < sz; i += macSz) {
- for (j = 0; j < macSz && j + i < sz; j++) {
- started = ctMaskGTE(i + j, macStart);
- notEnded = ctMaskLT(i + j, macEnd);
- mac[j] |= started & notEnded & data[i + j];
- }
- }
-
- if ((macSz & (macSz - 1)) == 0) {
- for (i = 0; i < macSz; i++)
- good |= expMac[i] ^ mac[(i + r) & (macSz - 1)];
- }
-#ifndef NO_SHA
- else if (macSz == WC_SHA_DIGEST_SIZE) {
- for (i = 0; i < macSz; i++)
- good |= expMac[i] ^ mac[(i + r) % WC_SHA_DIGEST_SIZE];
- }
-#endif
-#ifdef WOLFSSL_SHA384
- else if (macSz == WC_SHA384_DIGEST_SIZE) {
- for (i = 0; i < macSz; i++)
- good |= expMac[i] ^ mac[(i + r) % WC_SHA384_DIGEST_SIZE];
- }
-#endif
-
- return good;
-}
-
-/* timing resistant pad/verify check, return 0 on success */
-int TimingPadVerify(WOLFSSL* ssl, const byte* input, int padLen, int macSz,
- int pLen, int content)
-{
- byte verify[WC_MAX_DIGEST_SIZE];
- byte good;
- int ret = 0;
-
- good = MaskPadding(input, pLen, macSz);
- /* 4th argument has potential to underflow, ssl->hmac function should
- * either increment the size by (macSz + padLen + 1) before use or check on
- * the size to make sure is valid. */
- ret = ssl->hmac(ssl, verify, input, pLen - macSz - padLen - 1, padLen,
- content, 1, PEER_ORDER);
- good |= MaskMac(input, pLen, ssl->specs.hash_size, verify);
-
- /* Non-zero on failure. */
- good = (byte)~(word32)good;
- good &= good >> 4;
- good &= good >> 2;
- good &= good >> 1;
- /* Make ret negative on masking failure. */
- ret -= 1 - good;
-
- /* Treat any failure as verify MAC error. */
- if (ret != 0)
- ret = VERIFY_MAC_ERROR;
-
- return ret;
-}
-#endif
-
-
-int DoApplicationData(WOLFSSL* ssl, byte* input, word32* inOutIdx)
-{
- word32 msgSz = ssl->keys.encryptSz;
- word32 idx = *inOutIdx;
- int dataSz;
- int ivExtra = 0;
- byte* rawData = input + idx; /* keep current for hmac */
-#ifdef HAVE_LIBZ
- byte decomp[MAX_RECORD_SIZE + MAX_COMP_EXTRA];
-#endif
-
-#ifdef WOLFSSL_EARLY_DATA
- if (ssl->options.tls1_3 && ssl->options.handShakeDone == 0) {
- if (ssl->options.side == WOLFSSL_SERVER_END &&
- ssl->earlyData != no_early_data &&
- ssl->options.clientState < CLIENT_FINISHED_COMPLETE) {
- ssl->earlyDataSz += ssl->curSize;
- if (ssl->earlyDataSz <= ssl->options.maxEarlyDataSz) {
- WOLFSSL_MSG("Ignoring EarlyData!");
- *inOutIdx = ssl->buffers.inputBuffer.length;
- return 0;
- }
- WOLFSSL_MSG("Too much EarlyData!");
- }
- }
-#endif
- if (ssl->options.handShakeDone == 0) {
- WOLFSSL_MSG("Received App data before a handshake completed");
- SendAlert(ssl, alert_fatal, unexpected_message);
- return OUT_OF_ORDER_E;
- }
-
-#ifndef WOLFSSL_AEAD_ONLY
- if (ssl->specs.cipher_type == block) {
- if (ssl->options.tls1_1)
- ivExtra = ssl->specs.block_size;
- }
- else
-#endif
- if (ssl->specs.cipher_type == aead) {
- if (CipherHasExpIV(ssl))
- ivExtra = AESGCM_EXP_IV_SZ;
- }
-
- dataSz = msgSz - ivExtra - ssl->keys.padSz;
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- dataSz -= MacSize(ssl);
-#endif
- if (dataSz < 0) {
- WOLFSSL_MSG("App data buffer error, malicious input?");
- SendAlert(ssl, alert_fatal, unexpected_message);
- return BUFFER_ERROR;
- }
-#ifdef WOLFSSL_EARLY_DATA
- if (ssl->earlyData > early_data_ext) {
- if (ssl->earlyDataSz + dataSz > ssl->options.maxEarlyDataSz) {
- SendAlert(ssl, alert_fatal, unexpected_message);
- return WOLFSSL_FATAL_ERROR;
- }
- ssl->earlyDataSz += dataSz;
- }
-#endif
-
- /* read data */
- if (dataSz) {
- int rawSz = dataSz; /* keep raw size for idx adjustment */
-
-#ifdef HAVE_LIBZ
- if (ssl->options.usingCompression) {
- dataSz = myDeCompress(ssl, rawData, dataSz, decomp, sizeof(decomp));
- if (dataSz < 0) return dataSz;
- }
-#endif
- idx += rawSz;
-
- ssl->buffers.clearOutputBuffer.buffer = rawData;
- ssl->buffers.clearOutputBuffer.length = dataSz;
- }
-
- idx += ssl->keys.padSz;
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- idx += MacSize(ssl);
-#endif
-
-#ifdef HAVE_LIBZ
- /* decompress could be bigger, overwrite after verify */
- if (ssl->options.usingCompression)
- XMEMMOVE(rawData, decomp, dataSz);
-#endif
-
- *inOutIdx = idx;
- return 0;
-}
-
-
-/* process alert, return level */
-static int DoAlert(WOLFSSL* ssl, byte* input, word32* inOutIdx, int* type,
- word32 totalSz)
-{
- byte level;
- byte code;
- word32 dataSz = totalSz - *inOutIdx;
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "Alert");
- if (ssl->toInfoOn)
- /* add record header back on to info + alert bytes level/code */
- AddPacketInfo(ssl, "Alert", alert, input + *inOutIdx -
- RECORD_HEADER_SZ, RECORD_HEADER_SZ + ALERT_SIZE,
- READ_PROTO, ssl->heap);
- #endif
-
- if (IsEncryptionOn(ssl, 0)) {
- dataSz -= ssl->keys.padSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- dataSz -= MacSize(ssl);
- #endif
- }
-
- /* make sure can read the message */
- if (dataSz != ALERT_SIZE) {
-#ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, unexpected_message);
-#endif
- return BUFFER_E;
- }
-
- level = input[(*inOutIdx)++];
- code = input[(*inOutIdx)++];
- ssl->alert_history.last_rx.code = code;
- ssl->alert_history.last_rx.level = level;
- *type = code;
- if (level == alert_fatal) {
- ssl->options.isClosed = 1; /* Don't send close_notify */
- }
-
- if (++ssl->options.alertCount >= WOLFSSL_ALERT_COUNT_MAX) {
- WOLFSSL_MSG("Alert count exceeded");
-#ifdef WOLFSSL_EXTRA_ALERTS
- if (level != alert_warning || code != close_notify)
- SendAlert(ssl, alert_fatal, unexpected_message);
-#endif
- return ALERT_COUNT_E;
- }
-
- WOLFSSL_MSG("Got alert");
- if (*type == close_notify) {
- WOLFSSL_MSG("\tclose notify");
- ssl->options.closeNotify = 1;
- }
-#ifdef WOLFSSL_TLS13
- if (*type == decode_error) {
- WOLFSSL_MSG("\tdecode error");
- }
- if (*type == illegal_parameter) {
- WOLFSSL_MSG("\tillegal parameter");
- }
-#endif
- WOLFSSL_ERROR(*type);
- if (IsEncryptionOn(ssl, 0)) {
- *inOutIdx += ssl->keys.padSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- *inOutIdx += MacSize(ssl);
- #endif
- }
-
- return level;
-}
-
-static int GetInputData(WOLFSSL *ssl, word32 size)
-{
- int in;
- int inSz;
- int maxLength;
- int usedLength;
- int dtlsExtra = 0;
-
-
- /* check max input length */
- usedLength = ssl->buffers.inputBuffer.length - ssl->buffers.inputBuffer.idx;
- maxLength = ssl->buffers.inputBuffer.bufferSize - usedLength;
- inSz = (int)(size - usedLength); /* from last partial read */
-
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- if (size < ssl->dtls_expected_rx)
- dtlsExtra = (int)(ssl->dtls_expected_rx - size);
- inSz = ssl->dtls_expected_rx;
- }
-#endif
-
- /* check that no lengths or size values are negative */
- if (usedLength < 0 || maxLength < 0 || inSz <= 0) {
- return BUFFER_ERROR;
- }
-
- if (inSz > maxLength) {
- if (GrowInputBuffer(ssl, size + dtlsExtra, usedLength) < 0)
- return MEMORY_E;
- }
-
- /* Put buffer data at start if not there */
- if (usedLength > 0 && ssl->buffers.inputBuffer.idx != 0)
- XMEMMOVE(ssl->buffers.inputBuffer.buffer,
- ssl->buffers.inputBuffer.buffer + ssl->buffers.inputBuffer.idx,
- usedLength);
-
- /* remove processed data */
- ssl->buffers.inputBuffer.idx = 0;
- ssl->buffers.inputBuffer.length = usedLength;
-
- /* read data from network */
- do {
- in = wolfSSLReceive(ssl,
- ssl->buffers.inputBuffer.buffer +
- ssl->buffers.inputBuffer.length,
- inSz);
- if (in == WANT_READ)
- return WANT_READ;
-
- if (in < 0)
- return SOCKET_ERROR_E;
-
- if (in > inSz)
- return RECV_OVERFLOW_E;
-
- ssl->buffers.inputBuffer.length += in;
- inSz -= in;
-
- } while (ssl->buffers.inputBuffer.length < size);
-
-#ifdef WOLFSSL_DEBUG_TLS
- if (ssl->buffers.inputBuffer.idx == 0) {
- WOLFSSL_MSG("Data received");
- WOLFSSL_BUFFER(ssl->buffers.inputBuffer.buffer,
- ssl->buffers.inputBuffer.length);
- }
-#endif
-
- return 0;
-}
-
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
-static WC_INLINE int VerifyMacEnc(WOLFSSL* ssl, const byte* input, word32 msgSz,
- int content)
-{
- int ret;
-#ifdef HAVE_TRUNCATED_HMAC
- word32 digestSz = ssl->truncated_hmac ? (byte)TRUNCATED_HMAC_SZ
- : ssl->specs.hash_size;
-#else
- word32 digestSz = ssl->specs.hash_size;
-#endif
- byte verify[WC_MAX_DIGEST_SIZE];
-
- WOLFSSL_MSG("Verify MAC of Encrypted Data");
-
- if (msgSz < digestSz) {
- return VERIFY_MAC_ERROR;
- }
-
- ret = ssl->hmac(ssl, verify, input, msgSz - digestSz, -1, content, 1, PEER_ORDER);
- ret |= ConstantCompare(verify, input + msgSz - digestSz, digestSz);
- if (ret != 0) {
- return VERIFY_MAC_ERROR;
- }
-
- return 0;
-}
-#endif
-
-static WC_INLINE int VerifyMac(WOLFSSL* ssl, const byte* input, word32 msgSz,
- int content, word32* padSz)
-{
-#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
- int ivExtra = 0;
- int ret;
- word32 pad = 0;
- word32 padByte = 0;
-#ifdef HAVE_TRUNCATED_HMAC
- word32 digestSz = ssl->truncated_hmac ? (byte)TRUNCATED_HMAC_SZ
- : ssl->specs.hash_size;
-#else
- word32 digestSz = ssl->specs.hash_size;
-#endif
- byte verify[WC_MAX_DIGEST_SIZE];
-
-
- if (ssl->specs.cipher_type == block) {
- if (ssl->options.tls1_1)
- ivExtra = ssl->specs.block_size;
- pad = *(input + msgSz - ivExtra - 1);
- padByte = 1;
-
- if (ssl->options.tls) {
- ret = TimingPadVerify(ssl, input, pad, digestSz, msgSz - ivExtra,
- content);
- if (ret != 0)
- return ret;
- }
- else { /* sslv3, some implementations have bad padding, but don't
- * allow bad read */
- int badPadLen = 0;
- byte dmy[sizeof(WOLFSSL) >= MAX_PAD_SIZE ? 1 : MAX_PAD_SIZE] = {0};
- byte* dummy = sizeof(dmy) < MAX_PAD_SIZE ? (byte*) ssl : dmy;
-
- (void)dmy;
-
- if (pad > (msgSz - digestSz - 1)) {
- WOLFSSL_MSG("Plain Len not long enough for pad/mac");
- pad = 0; /* no bad read */
- badPadLen = 1;
- }
- PadCheck(dummy, (byte)pad, MAX_PAD_SIZE); /* timing only */
- ret = ssl->hmac(ssl, verify, input, msgSz - digestSz - pad - 1,
- pad, content, 1, PEER_ORDER);
- if (ConstantCompare(verify, input + msgSz - digestSz - pad - 1,
- digestSz) != 0)
- return VERIFY_MAC_ERROR;
- if (ret != 0 || badPadLen)
- return VERIFY_MAC_ERROR;
- }
- }
- else if (ssl->specs.cipher_type == stream) {
- ret = ssl->hmac(ssl, verify, input, msgSz - digestSz, -1, content, 1,
- PEER_ORDER);
- if (ConstantCompare(verify, input + msgSz - digestSz, digestSz) != 0){
- return VERIFY_MAC_ERROR;
- }
- if (ret != 0)
- return VERIFY_MAC_ERROR;
- }
-#endif /* !WOLFSSL_NO_TLS12 && !WOLFSSL_AEAD_ONLY */
-
- if (ssl->specs.cipher_type == aead) {
- *padSz = ssl->specs.aead_mac_size;
- }
-#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
- else {
- *padSz = digestSz + pad + padByte;
- }
-#endif /* !WOLFSSL_NO_TLS12 && !WOLFSSL_AEAD_ONLY */
-
- (void)input;
- (void)msgSz;
- (void)content;
-
- return 0;
-}
-
-
-/* process input requests, return 0 is done, 1 is call again to complete, and
- negative number is error */
-int ProcessReply(WOLFSSL* ssl)
-{
- int ret = 0, type, readSz;
- int atomicUser = 0;
- word32 startIdx = 0;
-#if defined(WOLFSSL_DTLS)
- int used;
-#endif
-
-#ifdef ATOMIC_USER
- if (ssl->ctx->DecryptVerifyCb)
- atomicUser = 1;
-#endif
-
- if (ssl->error != 0 && ssl->error != WANT_READ && ssl->error != WANT_WRITE
- #ifdef WOLFSSL_ASYNC_CRYPT
- && ssl->error != WC_PENDING_E
- #endif
- #ifdef WOLFSSL_NONBLOCK_OCSP
- && ssl->error != OCSP_WANT_READ
- #endif
- ) {
- WOLFSSL_MSG("ProcessReply retry in error state, not allowed");
- return ssl->error;
- }
-
-#if defined(WOLFSSL_DTLS) && defined(WOLFSSL_ASYNC_CRYPT)
- /* process any pending DTLS messages - this flow can happen with async */
- if (ssl->dtls_rx_msg_list != NULL) {
- ret = DtlsMsgDrain(ssl);
- if (ret != 0) {
- WOLFSSL_ERROR(ret);
- return ret;
- }
- }
-#endif
-
- for (;;) {
- switch (ssl->options.processReply) {
-
- /* in the WOLFSSL_SERVER case, get the first byte for detecting
- * old client hello */
- case doProcessInit:
-
- readSz = RECORD_HEADER_SZ;
-
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls)
- readSz = DTLS_RECORD_HEADER_SZ;
- #endif
-
- /* get header or return error */
- if (!ssl->options.dtls) {
- if ((ret = GetInputData(ssl, readSz)) < 0)
- return ret;
- } else {
- #ifdef WOLFSSL_DTLS
- /* read ahead may already have header */
- used = ssl->buffers.inputBuffer.length -
- ssl->buffers.inputBuffer.idx;
- if (used < readSz) {
- if ((ret = GetInputData(ssl, readSz)) < 0)
- return ret;
- }
- #endif
- }
-
-#ifdef OLD_HELLO_ALLOWED
-
- /* see if sending SSLv2 client hello */
- if ( ssl->options.side == WOLFSSL_SERVER_END &&
- ssl->options.clientState == NULL_STATE &&
- ssl->buffers.inputBuffer.buffer[ssl->buffers.inputBuffer.idx]
- != handshake) {
- byte b0, b1;
-
- ssl->options.processReply = runProcessOldClientHello;
-
- /* sanity checks before getting size at front */
- if (ssl->buffers.inputBuffer.buffer[
- ssl->buffers.inputBuffer.idx + OPAQUE16_LEN] != OLD_HELLO_ID) {
- WOLFSSL_MSG("Not a valid old client hello");
- return PARSE_ERROR;
- }
-
- if (ssl->buffers.inputBuffer.buffer[
- ssl->buffers.inputBuffer.idx + OPAQUE24_LEN] != SSLv3_MAJOR &&
- ssl->buffers.inputBuffer.buffer[
- ssl->buffers.inputBuffer.idx + OPAQUE24_LEN] != DTLS_MAJOR) {
- WOLFSSL_MSG("Not a valid version in old client hello");
- return PARSE_ERROR;
- }
-
- /* how many bytes need ProcessOldClientHello */
- b0 =
- ssl->buffers.inputBuffer.buffer[ssl->buffers.inputBuffer.idx++];
- b1 =
- ssl->buffers.inputBuffer.buffer[ssl->buffers.inputBuffer.idx++];
- ssl->curSize = (word16)(((b0 & 0x7f) << 8) | b1);
- }
- else {
- ssl->options.processReply = getRecordLayerHeader;
- continue;
- }
- FALL_THROUGH;
-
- /* in the WOLFSSL_SERVER case, run the old client hello */
- case runProcessOldClientHello:
-
- /* get sz bytes or return error */
- if (!ssl->options.dtls) {
- if ((ret = GetInputData(ssl, ssl->curSize)) < 0)
- return ret;
- } else {
- #ifdef WOLFSSL_DTLS
- /* read ahead may already have */
- used = ssl->buffers.inputBuffer.length -
- ssl->buffers.inputBuffer.idx;
- if (used < ssl->curSize)
- if ((ret = GetInputData(ssl, ssl->curSize)) < 0)
- return ret;
- #endif /* WOLFSSL_DTLS */
- }
-
- ret = ProcessOldClientHello(ssl, ssl->buffers.inputBuffer.buffer,
- &ssl->buffers.inputBuffer.idx,
- ssl->buffers.inputBuffer.length -
- ssl->buffers.inputBuffer.idx,
- ssl->curSize);
- if (ret < 0)
- return ret;
-
- else if (ssl->buffers.inputBuffer.idx ==
- ssl->buffers.inputBuffer.length) {
- ssl->options.processReply = doProcessInit;
- return 0;
- }
-
-#endif /* OLD_HELLO_ALLOWED */
- FALL_THROUGH;
-
- /* get the record layer header */
- case getRecordLayerHeader:
-
- ret = GetRecordHeader(ssl, ssl->buffers.inputBuffer.buffer,
- &ssl->buffers.inputBuffer.idx,
- &ssl->curRL, &ssl->curSize);
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls && ret == SEQUENCE_ERROR) {
- WOLFSSL_MSG("Silently dropping out of order DTLS message");
- ssl->options.processReply = doProcessInit;
- ssl->buffers.inputBuffer.length = 0;
- ssl->buffers.inputBuffer.idx = 0;
-#ifdef WOLFSSL_DTLS_DROP_STATS
- ssl->replayDropCount++;
-#endif /* WOLFSSL_DTLS_DROP_STATS */
-
- continue;
- }
-#endif
- if (ret != 0)
- return ret;
-
-#ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(ssl->version) && IsEncryptionOn(ssl, 0) &&
- ssl->curRL.type != application_data &&
- ssl->curRL.type != change_cipher_spec) {
- SendAlert(ssl, alert_fatal, unexpected_message);
- return PARSE_ERROR;
- }
-#endif
-
- ssl->options.processReply = getData;
- FALL_THROUGH;
-
- /* retrieve record layer data */
- case getData:
-
- /* get sz bytes or return error */
- if (!ssl->options.dtls) {
- if ((ret = GetInputData(ssl, ssl->curSize)) < 0) {
-#ifdef WOLFSSL_EXTRA_ALERTS
- if (ret != WANT_READ)
- SendAlert(ssl, alert_fatal, bad_record_mac);
-#endif
- return ret;
- }
- }
- else {
-#ifdef WOLFSSL_DTLS
- /* read ahead may already have */
- used = ssl->buffers.inputBuffer.length -
- ssl->buffers.inputBuffer.idx;
- if (used < ssl->curSize)
- if ((ret = GetInputData(ssl, ssl->curSize)) < 0)
- return ret;
-#endif
- }
-
- if (IsEncryptionOn(ssl, 0)) {
-#if defined(WOLFSSL_TLS13) || defined(WOLFSSL_EXTRA_ALERTS)
- int tooLong = 0;
-#endif
-
-#ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(ssl->version)) {
- tooLong = ssl->curSize > MAX_TLS13_ENC_SZ;
- tooLong |= ssl->curSize - ssl->specs.aead_mac_size >
- MAX_TLS13_PLAIN_SZ;
- }
-#endif
-#ifdef WOLFSSL_EXTRA_ALERTS
- if (!IsAtLeastTLSv1_3(ssl->version))
- tooLong = ssl->curSize > MAX_TLS_CIPHER_SZ;
-#endif
-#if defined(WOLFSSL_TLS13) || defined(WOLFSSL_EXTRA_ALERTS)
- if (tooLong) {
- WOLFSSL_MSG("Encrypted data too long");
- SendAlert(ssl, alert_fatal, record_overflow);
- return BUFFER_ERROR;
- }
-#endif
- }
- ssl->keys.padSz = 0;
-
- ssl->options.processReply = verifyEncryptedMessage;
- startIdx = ssl->buffers.inputBuffer.idx; /* in case > 1 msg per */
- FALL_THROUGH;
-
- /* verify digest of encrypted message */
- case verifyEncryptedMessage:
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (IsEncryptionOn(ssl, 0) && ssl->keys.decryptedCur == 0 &&
- !atomicUser && ssl->options.startedETMRead) {
- ret = VerifyMacEnc(ssl, ssl->buffers.inputBuffer.buffer +
- ssl->buffers.inputBuffer.idx,
- ssl->curSize, ssl->curRL.type);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E)
- return ret;
- #endif
- if (ret < 0) {
- WOLFSSL_MSG("VerifyMacEnc failed");
- WOLFSSL_ERROR(ret);
- #ifdef WOLFSSL_DTLS
- /* If in DTLS mode, if the decrypt fails for any
- * reason, pretend the datagram never happened. */
- if (ssl->options.dtls) {
- ssl->options.processReply = doProcessInit;
- ssl->buffers.inputBuffer.idx =
- ssl->buffers.inputBuffer.length;
- #ifdef WOLFSSL_DTLS_DROP_STATS
- ssl->macDropCount++;
- #endif /* WOLFSSL_DTLS_DROP_STATS */
- }
- #endif /* WOLFSSL_DTLS */
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (!ssl->options.dtls)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- #endif
- return DECRYPT_ERROR;
- }
- ssl->keys.encryptSz = ssl->curSize;
- }
-#endif
- ssl->options.processReply = decryptMessage;
- FALL_THROUGH;
-
- /* decrypt message */
- case decryptMessage:
-
- if (IsEncryptionOn(ssl, 0) && ssl->keys.decryptedCur == 0 &&
- (!IsAtLeastTLSv1_3(ssl->version) ||
- ssl->curRL.type != change_cipher_spec))
- {
- bufferStatic* in = &ssl->buffers.inputBuffer;
-
- ret = SanityCheckCipherText(ssl, ssl->curSize);
- if (ret < 0) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, bad_record_mac);
- #endif
- return ret;
- }
-
- if (atomicUser) {
- #ifdef ATOMIC_USER
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead) {
- ret = ssl->ctx->VerifyDecryptCb(ssl,
- in->buffer + in->idx, in->buffer + in->idx,
- ssl->curSize - MacSize(ssl),
- ssl->curRL.type, 1, &ssl->keys.padSz,
- ssl->DecryptVerifyCtx);
- }
- else
- #endif
- {
- ret = ssl->ctx->DecryptVerifyCb(ssl,
- in->buffer + in->idx,
- in->buffer + in->idx,
- ssl->curSize, ssl->curRL.type, 1,
- &ssl->keys.padSz, ssl->DecryptVerifyCtx);
- }
- #endif /* ATOMIC_USER */
- }
- else {
- if (!ssl->options.tls1_3) {
- #ifndef WOLFSSL_NO_TLS12
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead) {
- word32 digestSz = MacSize(ssl);
- ret = Decrypt(ssl,
- in->buffer + in->idx,
- in->buffer + in->idx,
- ssl->curSize - digestSz);
- if (ret == 0) {
- ssl->keys.padSz =
- in->buffer[in->idx + ssl->curSize -
- digestSz - 1];
- ssl->keys.padSz += 1;
- ssl->keys.decryptedCur = 1;
- }
- }
- else
- #endif
- {
- ret = Decrypt(ssl,
- in->buffer + in->idx,
- in->buffer + in->idx,
- ssl->curSize);
- }
- #else
- ret = DECRYPT_ERROR;
- #endif
- }
- else
- {
- #ifdef WOLFSSL_TLS13
- ret = DecryptTls13(ssl,
- in->buffer + in->idx,
- in->buffer + in->idx,
- ssl->curSize,
- (byte*)&ssl->curRL, RECORD_HEADER_SZ);
- #else
- ret = DECRYPT_ERROR;
- #endif /* WOLFSSL_TLS13 */
- }
- }
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E)
- return ret;
- #endif
-
- if (ret >= 0) {
- #ifndef WOLFSSL_NO_TLS12
- /* handle success */
- #ifndef WOLFSSL_AEAD_ONLY
- if (ssl->options.tls1_1 && ssl->specs.cipher_type == block)
- ssl->buffers.inputBuffer.idx += ssl->specs.block_size;
- #endif
- /* go past TLSv1.1 IV */
- if (CipherHasExpIV(ssl))
- ssl->buffers.inputBuffer.idx += AESGCM_EXP_IV_SZ;
- #endif
- }
- else {
- WOLFSSL_MSG("Decrypt failed");
- WOLFSSL_ERROR(ret);
- #ifdef WOLFSSL_EARLY_DATA
- if (ssl->options.tls1_3) {
- if (ssl->options.side == WOLFSSL_SERVER_END &&
- ssl->earlyData != no_early_data &&
- ssl->options.clientState <
- CLIENT_FINISHED_COMPLETE) {
- ssl->earlyDataSz += ssl->curSize;
- if (ssl->earlyDataSz <=
- ssl->options.maxEarlyDataSz) {
- WOLFSSL_MSG("Ignoring EarlyData!");
- if (ssl->keys.peer_sequence_number_lo-- == 0)
- ssl->keys.peer_sequence_number_hi--;
- ssl->options.processReply = doProcessInit;
- ssl->buffers.inputBuffer.idx =
- ssl->buffers.inputBuffer.length;
- return 0;
- }
- WOLFSSL_MSG("Too much EarlyData!");
- }
- SendAlert(ssl, alert_fatal, bad_record_mac);
- }
- #endif
- #ifdef WOLFSSL_DTLS
- /* If in DTLS mode, if the decrypt fails for any
- * reason, pretend the datagram never happened. */
- if (ssl->options.dtls) {
- ssl->options.processReply = doProcessInit;
- ssl->buffers.inputBuffer.idx =
- ssl->buffers.inputBuffer.length;
- #ifdef WOLFSSL_DTLS_DROP_STATS
- ssl->macDropCount++;
- #endif /* WOLFSSL_DTLS_DROP_STATS */
- }
- #endif /* WOLFSSL_DTLS */
- return DECRYPT_ERROR;
- }
- }
-
- ssl->options.processReply = verifyMessage;
- FALL_THROUGH;
-
- /* verify digest of message */
- case verifyMessage:
-
- if (IsEncryptionOn(ssl, 0) && ssl->keys.decryptedCur == 0 &&
- (!IsAtLeastTLSv1_3(ssl->version) ||
- ssl->curRL.type != change_cipher_spec))
- {
- if (!atomicUser
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- && !ssl->options.startedETMRead
-#endif
- ) {
- ret = VerifyMac(ssl, ssl->buffers.inputBuffer.buffer +
- ssl->buffers.inputBuffer.idx,
- ssl->curSize, ssl->curRL.type,
- &ssl->keys.padSz);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E)
- return ret;
- #endif
- if (ret < 0) {
- WOLFSSL_MSG("VerifyMac failed");
- WOLFSSL_ERROR(ret);
- #ifdef WOLFSSL_DTLS
- /* If in DTLS mode, if the decrypt fails for any
- * reason, pretend the datagram never happened. */
- if (ssl->options.dtls) {
- ssl->options.processReply = doProcessInit;
- ssl->buffers.inputBuffer.idx =
- ssl->buffers.inputBuffer.length;
- #ifdef WOLFSSL_DTLS_DROP_STATS
- ssl->macDropCount++;
- #endif /* WOLFSSL_DTLS_DROP_STATS */
- }
- #endif /* WOLFSSL_DTLS */
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (!ssl->options.dtls)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- #endif
- return DECRYPT_ERROR;
- }
- }
-
- ssl->keys.encryptSz = ssl->curSize;
- ssl->keys.decryptedCur = 1;
-#ifdef WOLFSSL_TLS13
- if (ssl->options.tls1_3) {
- word16 i = (word16)(ssl->buffers.inputBuffer.length -
- ssl->keys.padSz);
-
- /* sanity check on underflow */
- if (ssl->keys.padSz >= ssl->buffers.inputBuffer.length) {
- WOLFSSL_ERROR(DECRYPT_ERROR);
- return DECRYPT_ERROR;
- }
-
- /* Remove padding from end of plain text. */
- for (--i; i > ssl->buffers.inputBuffer.idx; i--) {
- if (ssl->buffers.inputBuffer.buffer[i] != 0)
- break;
- }
- /* Get the real content type from the end of the data. */
- ssl->curRL.type = ssl->buffers.inputBuffer.buffer[i];
- ssl->keys.padSz = ssl->buffers.inputBuffer.length - i;
- }
-#endif
- }
-
- ssl->options.processReply = runProcessingOneMessage;
- FALL_THROUGH;
-
- /* the record layer is here */
- case runProcessingOneMessage:
-
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (IsEncryptionOn(ssl, 0) && ssl->options.startedETMRead) {
- if ((ssl->buffers.inputBuffer.length -
- ssl->keys.padSz -
- MacSize(ssl) -
- ssl->buffers.inputBuffer.idx > MAX_PLAINTEXT_SZ)
-#ifdef WOLFSSL_ASYNC_CRYPT
- && ssl->buffers.inputBuffer.length !=
- ssl->buffers.inputBuffer.idx
-#endif
- ) {
- WOLFSSL_MSG("Plaintext too long - Encrypt-Then-MAC");
- #if defined(WOLFSSL_EXTRA_ALERTS)
- SendAlert(ssl, alert_fatal, record_overflow);
- #endif
- return BUFFER_ERROR;
- }
- }
- else
- #endif
- if (ssl->buffers.inputBuffer.length -
- ssl->keys.padSz -
- ssl->buffers.inputBuffer.idx > MAX_PLAINTEXT_SZ
-#ifdef WOLFSSL_ASYNC_CRYPT
- && ssl->buffers.inputBuffer.length !=
- ssl->buffers.inputBuffer.idx
-#endif
- ) {
- WOLFSSL_MSG("Plaintext too long");
-#if defined(WOLFSSL_TLS13) || defined(WOLFSSL_EXTRA_ALERTS)
- SendAlert(ssl, alert_fatal, record_overflow);
-#endif
- return BUFFER_ERROR;
- }
-
-#ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- DtlsUpdateWindow(ssl);
- }
-#endif /* WOLFSSL_DTLS */
-
- WOLFSSL_MSG("received record layer msg");
-
- switch (ssl->curRL.type) {
- case handshake :
- WOLFSSL_MSG("got HANDSHAKE");
- /* debugging in DoHandShakeMsg */
- if (ssl->options.dtls) {
-#ifdef WOLFSSL_DTLS
- ret = DoDtlsHandShakeMsg(ssl,
- ssl->buffers.inputBuffer.buffer,
- &ssl->buffers.inputBuffer.idx,
- ssl->buffers.inputBuffer.length);
-#endif
- }
- else if (!IsAtLeastTLSv1_3(ssl->version)) {
-#ifndef WOLFSSL_NO_TLS12
- ret = DoHandShakeMsg(ssl,
- ssl->buffers.inputBuffer.buffer,
- &ssl->buffers.inputBuffer.idx,
- ssl->buffers.inputBuffer.length);
-#else
- ret = BUFFER_ERROR;
-#endif
- }
- else {
-#ifdef WOLFSSL_TLS13
- ssl->msgsReceived.got_change_cipher = 0;
- ret = DoTls13HandShakeMsg(ssl,
- ssl->buffers.inputBuffer.buffer,
- &ssl->buffers.inputBuffer.idx,
- ssl->buffers.inputBuffer.length);
- #ifdef WOLFSSL_EARLY_DATA
- if (ret != 0)
- return ret;
- if (ssl->options.side == WOLFSSL_SERVER_END &&
- ssl->earlyData > early_data_ext &&
- ssl->options.handShakeState == HANDSHAKE_DONE) {
- ssl->earlyData = no_early_data;
- ssl->options.processReply = doProcessInit;
- return ZERO_RETURN;
- }
- #endif
-#else
- ret = BUFFER_ERROR;
-#endif
- }
- if (ret != 0
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* In async case, on pending, move onto next message.
- * Current message should have been DtlsMsgStore'ed and
- * should be processed with DtlsMsgDrain */
- && (!ssl->options.dtls
- || ret != WC_PENDING_E)
-#endif
- ) {
- WOLFSSL_ERROR(ret);
- return ret;
- }
- break;
-
- case change_cipher_spec:
- WOLFSSL_MSG("got CHANGE CIPHER SPEC");
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "ChangeCipher");
- /* add record header back on info */
- if (ssl->toInfoOn) {
- AddPacketInfo(ssl, "ChangeCipher",
- change_cipher_spec,
- ssl->buffers.inputBuffer.buffer +
- ssl->buffers.inputBuffer.idx - RECORD_HEADER_SZ -
- (ssl->options.dtls ? DTLS_RECORD_EXTRA : 0),
- 1 + RECORD_HEADER_SZ, READ_PROTO, ssl->heap);
- #ifdef WOLFSSL_CALLBACKS
- AddLateRecordHeader(&ssl->curRL, &ssl->timeoutInfo);
- #endif
- }
- #endif
-
-#ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(ssl->version)) {
- word32 i = ssl->buffers.inputBuffer.idx;
- if (ssl->options.handShakeState == HANDSHAKE_DONE) {
- SendAlert(ssl, alert_fatal, unexpected_message);
- return UNKNOWN_RECORD_TYPE;
- }
- if (ssl->curSize != 1 ||
- ssl->buffers.inputBuffer.buffer[i] != 1) {
- SendAlert(ssl, alert_fatal, illegal_parameter);
- return UNKNOWN_RECORD_TYPE;
- }
- ssl->buffers.inputBuffer.idx++;
- if (!ssl->msgsReceived.got_change_cipher) {
- ssl->msgsReceived.got_change_cipher = 1;
- }
- else {
- SendAlert(ssl, alert_fatal, illegal_parameter);
- return UNKNOWN_RECORD_TYPE;
- }
- break;
- }
-#endif
-
-#ifndef WOLFSSL_NO_TLS12
- if (ssl->buffers.inputBuffer.buffer[
- ssl->buffers.inputBuffer.idx] != 1) {
- WOLFSSL_MSG("ChangeCipher msg wrong value");
- return LENGTH_ERROR;
- }
-
- if (IsEncryptionOn(ssl, 0) && ssl->options.handShakeDone) {
-#ifdef HAVE_AEAD
- if (ssl->specs.cipher_type == aead) {
- if (ssl->specs.bulk_cipher_algorithm != wolfssl_chacha)
- ssl->curSize -= AESGCM_EXP_IV_SZ;
- ssl->buffers.inputBuffer.idx += ssl->specs.aead_mac_size;
- ssl->curSize -= ssl->specs.aead_mac_size;
- }
- else
-#endif
- {
- ssl->buffers.inputBuffer.idx += ssl->keys.padSz;
- ssl->curSize -= (word16)ssl->keys.padSz;
- ssl->curSize -= ssl->specs.iv_size;
- }
-
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead) {
- word32 digestSz = MacSize(ssl);
- ssl->buffers.inputBuffer.idx += digestSz;
- ssl->curSize -= digestSz;
- }
- #endif
- }
-
- if (ssl->curSize != 1) {
- WOLFSSL_MSG("Malicious or corrupted ChangeCipher msg");
- return LENGTH_ERROR;
- }
-
- ssl->buffers.inputBuffer.idx++;
-
- ret = SanityCheckMsgReceived(ssl, change_cipher_hs);
- if (ret != 0) {
- if (!ssl->options.dtls) {
- return ret;
- }
- else {
- #ifdef WOLFSSL_DTLS
- /* Check for duplicate CCS message in DTLS mode.
- * DTLS allows for duplicate messages, and it should be
- * skipped. Also skip if out of order. */
- if (ret != DUPLICATE_MSG_E && ret != OUT_OF_ORDER_E)
- return ret;
- /* Reset error */
- ret = 0;
- break;
- #endif /* WOLFSSL_DTLS */
- }
- }
-
- ssl->keys.encryptionOn = 1;
-
- /* setup decrypt keys for following messages */
- /* XXX This might not be what we want to do when
- * receiving a CCS with multicast. We update the
- * key when the application updates them. */
- if ((ret = SetKeysSide(ssl, DECRYPT_SIDE_ONLY)) != 0)
- return ret;
-
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- ssl->options.startedETMRead = ssl->options.encThenMac;
- #endif
-
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- WOLFSSL_DTLS_PEERSEQ* peerSeq = ssl->keys.peerSeq;
-#ifdef WOLFSSL_MULTICAST
- if (ssl->options.haveMcast) {
- peerSeq += ssl->keys.curPeerId;
- peerSeq->highwaterMark = UpdateHighwaterMark(0,
- ssl->ctx->mcastFirstSeq,
- ssl->ctx->mcastSecondSeq,
- ssl->ctx->mcastMaxSeq);
- }
-#endif
- peerSeq->nextEpoch++;
- peerSeq->prevSeq_lo = peerSeq->nextSeq_lo;
- peerSeq->prevSeq_hi = peerSeq->nextSeq_hi;
- peerSeq->nextSeq_lo = 0;
- peerSeq->nextSeq_hi = 0;
- XMEMCPY(peerSeq->prevWindow, peerSeq->window,
- DTLS_SEQ_SZ);
- XMEMSET(peerSeq->window, 0, DTLS_SEQ_SZ);
- }
- #endif
-
- #ifdef HAVE_LIBZ
- if (ssl->options.usingCompression)
- if ( (ret = InitStreams(ssl)) != 0)
- return ret;
- #endif
- ret = BuildFinished(ssl, &ssl->hsHashes->verifyHashes,
- ssl->options.side == WOLFSSL_CLIENT_END ?
- server : client);
- if (ret != 0)
- return ret;
-#endif /* !WOLFSSL_NO_TLS12 */
- break;
-
- case application_data:
- WOLFSSL_MSG("got app DATA");
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls && ssl->options.dtlsHsRetain) {
- FreeHandshakeResources(ssl);
- ssl->options.dtlsHsRetain = 0;
- }
- #endif
- #ifdef WOLFSSL_TLS13
- if (ssl->keys.keyUpdateRespond) {
- WOLFSSL_MSG("No KeyUpdate from peer seen");
- return SANITY_MSG_E;
- }
- #endif
- if ((ret = DoApplicationData(ssl,
- ssl->buffers.inputBuffer.buffer,
- &ssl->buffers.inputBuffer.idx))
- != 0) {
- WOLFSSL_ERROR(ret);
- return ret;
- }
- break;
-
- case alert:
- WOLFSSL_MSG("got ALERT!");
- ret = DoAlert(ssl, ssl->buffers.inputBuffer.buffer,
- &ssl->buffers.inputBuffer.idx, &type,
- ssl->buffers.inputBuffer.length);
- if (ret == alert_fatal)
- return FATAL_ERROR;
- else if (ret < 0)
- return ret;
-
- /* catch warnings that are handled as errors */
- if (type == close_notify)
- return ssl->error = ZERO_RETURN;
-
- if (type == decrypt_error)
- return FATAL_ERROR;
-
- /* Reset error if we got an alert level in ret */
- if (ret > 0)
- ret = 0;
- break;
-
- default:
- WOLFSSL_ERROR(UNKNOWN_RECORD_TYPE);
- return UNKNOWN_RECORD_TYPE;
- }
-
- ssl->options.processReply = doProcessInit;
-
- /* input exhausted */
- if (ssl->buffers.inputBuffer.idx >= ssl->buffers.inputBuffer.length
-#ifdef WOLFSSL_DTLS
- /* If app data was processed then return now to avoid
- * dropping any app data. */
- || (ssl->options.dtls && ssl->curRL.type == application_data)
-#endif
- )
- return ret;
-
- /* more messages per record */
- else if ((ssl->buffers.inputBuffer.idx - startIdx) < ssl->curSize) {
- WOLFSSL_MSG("More messages in record");
-
- ssl->options.processReply = runProcessingOneMessage;
-
- if (IsEncryptionOn(ssl, 0)) {
- WOLFSSL_MSG("Bundled encrypted messages, remove middle pad");
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead) {
- word32 digestSz = MacSize(ssl);
- if (ssl->buffers.inputBuffer.idx >=
- ssl->keys.padSz + digestSz) {
- ssl->buffers.inputBuffer.idx -=
- ssl->keys.padSz + digestSz;
- }
- else {
- WOLFSSL_MSG("\tmiddle padding error");
- return FATAL_ERROR;
- }
- }
- else
- #endif
- {
- if (ssl->buffers.inputBuffer.idx >= ssl->keys.padSz) {
- ssl->buffers.inputBuffer.idx -= ssl->keys.padSz;
- }
- else {
- WOLFSSL_MSG("\tmiddle padding error");
- return FATAL_ERROR;
- }
- }
- }
- }
- /* more records */
- else {
- WOLFSSL_MSG("More records in input");
- }
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* We are setup to read next message/record but we had an error
- * (probably WC_PENDING_E) so return that so it can be handled
- * by higher layers. */
- if (ret != 0)
- return ret;
-#endif
- continue;
- default:
- WOLFSSL_MSG("Bad process input state, programming error");
- return INPUT_CASE_ERROR;
- }
- }
-}
-
-
-int SendChangeCipher(WOLFSSL* ssl)
-{
- byte *output;
- int sendSz = RECORD_HEADER_SZ + ENUM_LEN;
- int idx = RECORD_HEADER_SZ;
- int ret;
-
- #ifdef OPENSSL_EXTRA
- ssl->cbmode = SSL_CB_MODE_WRITE;
- if (ssl->options.side == WOLFSSL_SERVER_END){
- ssl->options.serverState = SERVER_CHANGECIPHERSPEC_COMPLETE;
- if (ssl->CBIS != NULL)
- ssl->CBIS(ssl, SSL_CB_ACCEPT_LOOP, SSL_SUCCESS);
- }
- else{
- ssl->options.clientState =
- CLIENT_CHANGECIPHERSPEC_COMPLETE;
- if (ssl->CBIS != NULL)
- ssl->CBIS(ssl, SSL_CB_CONNECT_LOOP, SSL_SUCCESS);
- }
- #endif
-
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- sendSz += DTLS_RECORD_EXTRA;
- idx += DTLS_RECORD_EXTRA;
- }
- #endif
-
- /* are we in scr */
- if (IsEncryptionOn(ssl, 1) && ssl->options.handShakeDone) {
- sendSz += MAX_MSG_EXTRA;
- }
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
- return ret;
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddRecordHeader(output, 1, change_cipher_spec, ssl, CUR_ORDER);
-
- output[idx] = 1; /* turn it on */
-
- if (IsEncryptionOn(ssl, 1) && ssl->options.handShakeDone) {
- byte input[ENUM_LEN];
- int inputSz = ENUM_LEN;
-
- input[0] = 1; /* turn it on */
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) &&
- (ret = DtlsMsgPoolSave(ssl, input, inputSz, change_cipher_hs)) != 0) {
- return ret;
- }
- #endif
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- change_cipher_spec, 0, 0, 0, CUR_ORDER);
- if (sendSz < 0) {
- return sendSz;
- }
- }
- #ifdef WOLFSSL_DTLS
- else {
- if (IsDtlsNotSctpMode(ssl)) {
- if ((ret = DtlsMsgPoolSave(ssl, output, sendSz, change_cipher_hs)) != 0)
- return ret;
- DtlsSEQIncrement(ssl, CUR_ORDER);
- }
- }
- #endif
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn) AddPacketName(ssl, "ChangeCipher");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "ChangeCipher", change_cipher_spec, output,
- sendSz, WRITE_PROTO, ssl->heap);
- #endif
- ssl->buffers.outputBuffer.length += sendSz;
-
- if (ssl->options.groupMessages)
- return 0;
- #if defined(WOLFSSL_DTLS) && !defined(WOLFSSL_DEBUG_DTLS)
- else if (ssl->options.dtls) {
- /* If using DTLS, force the ChangeCipherSpec message to be in the
- * same datagram as the finished message. */
- return 0;
- }
- #endif
- else
- return SendBuffered(ssl);
-}
-
-
-#if !defined(NO_OLD_TLS) && !defined(WOLFSSL_AEAD_ONLY)
-static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
- int padLen, int content, int verify, int epochOrder)
-{
- byte result[WC_MAX_DIGEST_SIZE];
- word32 digestSz = ssl->specs.hash_size; /* actual sizes */
- word32 padSz = ssl->specs.pad_size;
- int ret = 0;
-
- wc_Md5 md5;
- wc_Sha sha;
-
- /* data */
- byte seq[SEQ_SZ];
- byte conLen[ENUM_LEN + LENGTH_SZ]; /* content & length */
- const byte* macSecret = NULL;
-
- (void)padLen;
-
-#ifdef HAVE_FUZZER
- if (ssl->fuzzerCb)
- ssl->fuzzerCb(ssl, in, sz, FUZZ_HMAC, ssl->fuzzerCtx);
-#endif
-
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls)
- macSecret = wolfSSL_GetDtlsMacSecret(ssl, verify, epochOrder);
- else
- macSecret = wolfSSL_GetMacSecret(ssl, verify);
-#else
- macSecret = wolfSSL_GetMacSecret(ssl, verify);
-#endif
-
- XMEMSET(seq, 0, SEQ_SZ);
- conLen[0] = (byte)content;
- c16toa((word16)sz, &conLen[ENUM_LEN]);
- WriteSEQ(ssl, epochOrder, seq);
-
- if (ssl->specs.mac_algorithm == md5_mac) {
- ret = wc_InitMd5_ex(&md5, ssl->heap, ssl->devId);
- if (ret != 0)
- return ret;
-
- /* inner */
- ret = wc_Md5Update(&md5, macSecret, digestSz);
- ret |= wc_Md5Update(&md5, PAD1, padSz);
- ret |= wc_Md5Update(&md5, seq, SEQ_SZ);
- ret |= wc_Md5Update(&md5, conLen, sizeof(conLen));
- /* in buffer */
- ret |= wc_Md5Update(&md5, in, sz);
- if (ret != 0)
- return VERIFY_MAC_ERROR;
- ret = wc_Md5Final(&md5, result);
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* TODO: Make non-blocking */
- if (ret == WC_PENDING_E) {
- ret = wc_AsyncWait(ret, &md5.asyncDev, WC_ASYNC_FLAG_NONE);
- }
- #endif
- if (ret != 0)
- return VERIFY_MAC_ERROR;
-
- /* outer */
- ret = wc_Md5Update(&md5, macSecret, digestSz);
- ret |= wc_Md5Update(&md5, PAD2, padSz);
- ret |= wc_Md5Update(&md5, result, digestSz);
- if (ret != 0)
- return VERIFY_MAC_ERROR;
- ret = wc_Md5Final(&md5, digest);
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* TODO: Make non-blocking */
- if (ret == WC_PENDING_E) {
- ret = wc_AsyncWait(ret, &md5.asyncDev, WC_ASYNC_FLAG_NONE);
- }
- #endif
- if (ret != 0)
- return VERIFY_MAC_ERROR;
-
- wc_Md5Free(&md5);
- }
- else {
- ret = wc_InitSha_ex(&sha, ssl->heap, ssl->devId);
- if (ret != 0)
- return ret;
-
- /* inner */
- ret = wc_ShaUpdate(&sha, macSecret, digestSz);
- ret |= wc_ShaUpdate(&sha, PAD1, padSz);
- ret |= wc_ShaUpdate(&sha, seq, SEQ_SZ);
- ret |= wc_ShaUpdate(&sha, conLen, sizeof(conLen));
- /* in buffer */
- ret |= wc_ShaUpdate(&sha, in, sz);
- if (ret != 0)
- return VERIFY_MAC_ERROR;
- ret = wc_ShaFinal(&sha, result);
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* TODO: Make non-blocking */
- if (ret == WC_PENDING_E) {
- ret = wc_AsyncWait(ret, &sha.asyncDev, WC_ASYNC_FLAG_NONE);
- }
- #endif
- if (ret != 0)
- return VERIFY_MAC_ERROR;
-
- /* outer */
- ret = wc_ShaUpdate(&sha, macSecret, digestSz);
- ret |= wc_ShaUpdate(&sha, PAD2, padSz);
- ret |= wc_ShaUpdate(&sha, result, digestSz);
- if (ret != 0)
- return VERIFY_MAC_ERROR;
- ret = wc_ShaFinal(&sha, digest);
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* TODO: Make non-blocking */
- if (ret == WC_PENDING_E) {
- ret = wc_AsyncWait(ret, &sha.asyncDev, WC_ASYNC_FLAG_NONE);
- }
- #endif
- if (ret != 0)
- return VERIFY_MAC_ERROR;
-
- wc_ShaFree(&sha);
- }
- return 0;
-}
-#endif /* !NO_OLD_TLS && !WOLFSSL_AEAD_ONLY */
-
-#if !defined(NO_MD5) && !defined(NO_OLD_TLS)
-static int BuildMD5_CertVerify(WOLFSSL* ssl, byte* digest)
-{
- int ret;
- byte md5_result[WC_MD5_DIGEST_SIZE];
-#ifdef WOLFSSL_SMALL_STACK
- wc_Md5* md5 = (wc_Md5*)XMALLOC(sizeof(wc_Md5), ssl->heap, DYNAMIC_TYPE_HASHCTX);
-#else
- wc_Md5 md5[1];
-#endif
-
- /* make md5 inner */
- ret = wc_Md5Copy(&ssl->hsHashes->hashMd5, md5); /* Save current position */
- if (ret == 0)
- ret = wc_Md5Update(md5, ssl->arrays->masterSecret,SECRET_LEN);
- if (ret == 0)
- ret = wc_Md5Update(md5, PAD1, PAD_MD5);
- if (ret == 0)
- ret = wc_Md5Final(md5, md5_result);
-
- /* make md5 outer */
- if (ret == 0) {
- ret = wc_InitMd5_ex(md5, ssl->heap, ssl->devId);
- if (ret == 0) {
- ret = wc_Md5Update(md5, ssl->arrays->masterSecret, SECRET_LEN);
- if (ret == 0)
- ret = wc_Md5Update(md5, PAD2, PAD_MD5);
- if (ret == 0)
- ret = wc_Md5Update(md5, md5_result, WC_MD5_DIGEST_SIZE);
- if (ret == 0)
- ret = wc_Md5Final(md5, digest);
- wc_Md5Free(md5);
- }
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(md5, ssl->heap, DYNAMIC_TYPE_HASHCTX);
-#endif
-
- return ret;
-}
-#endif /* !NO_MD5 && !NO_OLD_TLS */
-
-#if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
- defined(WOLFSSL_ALLOW_TLS_SHA1))
-static int BuildSHA_CertVerify(WOLFSSL* ssl, byte* digest)
-{
- int ret;
- byte sha_result[WC_SHA_DIGEST_SIZE];
-#ifdef WOLFSSL_SMALL_STACK
- wc_Sha* sha = (wc_Sha*)XMALLOC(sizeof(wc_Sha), ssl->heap, DYNAMIC_TYPE_HASHCTX);
-#else
- wc_Sha sha[1];
-#endif
-
- /* make sha inner */
- ret = wc_ShaCopy(&ssl->hsHashes->hashSha, sha); /* Save current position */
- if (ret == 0)
- ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret,SECRET_LEN);
- if (ret == 0)
- ret = wc_ShaUpdate(sha, PAD1, PAD_SHA);
- if (ret == 0)
- ret = wc_ShaFinal(sha, sha_result);
-
- /* make sha outer */
- if (ret == 0) {
- ret = wc_InitSha_ex(sha, ssl->heap, ssl->devId);
- if (ret == 0) {
- ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret,SECRET_LEN);
- if (ret == 0)
- ret = wc_ShaUpdate(sha, PAD2, PAD_SHA);
- if (ret == 0)
- ret = wc_ShaUpdate(sha, sha_result, WC_SHA_DIGEST_SIZE);
- if (ret == 0)
- ret = wc_ShaFinal(sha, digest);
- wc_ShaFree(sha);
- }
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(sha, ssl->heap, DYNAMIC_TYPE_HASHCTX);
-#endif
-
- return ret;
-}
-#endif /* !NO_SHA && (!NO_OLD_TLS || WOLFSSL_ALLOW_TLS_SHA1) */
-
-int BuildCertHashes(WOLFSSL* ssl, Hashes* hashes)
-{
- int ret = 0;
-
- (void)hashes;
-
- if (ssl->options.tls) {
- #if !defined(NO_MD5) && !defined(NO_OLD_TLS)
- ret = wc_Md5GetHash(&ssl->hsHashes->hashMd5, hashes->md5);
- if (ret != 0)
- return ret;
- #endif
- #if !defined(NO_SHA)
- ret = wc_ShaGetHash(&ssl->hsHashes->hashSha, hashes->sha);
- if (ret != 0)
- return ret;
- #endif
- if (IsAtLeastTLSv1_2(ssl)) {
- #ifndef NO_SHA256
- ret = wc_Sha256GetHash(&ssl->hsHashes->hashSha256,
- hashes->sha256);
- if (ret != 0)
- return ret;
- #endif
- #ifdef WOLFSSL_SHA384
- ret = wc_Sha384GetHash(&ssl->hsHashes->hashSha384,
- hashes->sha384);
- if (ret != 0)
- return ret;
- #endif
- #ifdef WOLFSSL_SHA512
- ret = wc_Sha512GetHash(&ssl->hsHashes->hashSha512,
- hashes->sha512);
- if (ret != 0)
- return ret;
- #endif
- }
- }
- else {
- #if !defined(NO_MD5) && !defined(NO_OLD_TLS)
- ret = BuildMD5_CertVerify(ssl, hashes->md5);
- if (ret != 0)
- return ret;
- #endif
- #if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
- defined(WOLFSSL_ALLOW_TLS_SHA1))
- ret = BuildSHA_CertVerify(ssl, hashes->sha);
- if (ret != 0)
- return ret;
- #endif
- }
-
- return ret;
-}
-
-#ifndef WOLFSSL_NO_TLS12
-void FreeBuildMsgArgs(WOLFSSL* ssl, BuildMsgArgs* args)
-{
- if (args) {
- if (ssl && args->iv)
- XFREE(args->iv, ssl->heap, DYNAMIC_TYPE_SALT);
- XMEMSET(args, 0, sizeof(BuildMsgArgs));
- }
-}
-#endif
-
-/* Build SSL Message, encrypted */
-int BuildMessage(WOLFSSL* ssl, byte* output, int outSz, const byte* input,
- int inSz, int type, int hashOutput, int sizeOnly, int asyncOkay,
- int epochOrder)
-{
-#ifndef WOLFSSL_NO_TLS12
- int ret = 0;
- BuildMsgArgs* args;
- BuildMsgArgs lcl_args;
-#ifdef WOLFSSL_ASYNC_CRYPT
- args = &ssl->async.buildArgs;
-#endif
-#endif
-
- WOLFSSL_ENTER("BuildMessage");
-
- if (ssl == NULL) {
- return BAD_FUNC_ARG;
- }
-
- (void)epochOrder;
-
-#ifdef WOLFSSL_NO_TLS12
- return BuildTls13Message(ssl, output, outSz, input, inSz, type,
- hashOutput, sizeOnly, asyncOkay);
-#else
-#ifdef WOLFSSL_TLS13
- if (ssl->options.tls1_3) {
- return BuildTls13Message(ssl, output, outSz, input, inSz, type,
- hashOutput, sizeOnly, asyncOkay);
- }
-#endif
-
- ret = WC_NOT_PENDING_E;
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (asyncOkay) {
- ret = wolfSSL_AsyncPop(ssl, &ssl->options.buildMsgState);
- if (ret != WC_NOT_PENDING_E) {
- /* Check for error */
- if (ret < 0)
- goto exit_buildmsg;
- }
- }
- else
-#endif
- {
- args = &lcl_args;
- }
-
- /* Reset state */
- if (ret == WC_NOT_PENDING_E) {
- ret = 0;
- ssl->options.buildMsgState = BUILD_MSG_BEGIN;
- XMEMSET(args, 0, sizeof(BuildMsgArgs));
-
- args->sz = RECORD_HEADER_SZ + inSz;
- args->idx = RECORD_HEADER_SZ;
- args->headerSz = RECORD_HEADER_SZ;
- }
-
- switch (ssl->options.buildMsgState) {
- case BUILD_MSG_BEGIN:
- {
- /* catch mistaken sizeOnly parameter */
- if (!sizeOnly && (output == NULL || input == NULL) ) {
- ERROR_OUT(BAD_FUNC_ARG, exit_buildmsg);
- }
- if (sizeOnly && (output || input) ) {
- WOLFSSL_MSG("BuildMessage w/sizeOnly doesn't need input/output");
- ERROR_OUT(BAD_FUNC_ARG, exit_buildmsg);
- }
- #if defined(WOLFSSL_DTLS) && defined(HAVE_SECURE_RENEGOTIATION)
- if (ssl->options.dtls && DtlsSCRKeysSet(ssl)) {
- /* For epochs >1 the current cipher parameters are located in
- * ssl->secure_renegotiation->tmp_keys. Previous cipher
- * parameters and for epoch 1 use ssl->keys */
- switch (epochOrder) {
- case PREV_ORDER:
- if (ssl->encrypt.src != KEYS) {
- ssl->secure_renegotiation->cache_status =
- SCR_CACHE_NULL;
- if ((ret = SetKeysSide(ssl, ENCRYPT_SIDE_ONLY)) != 0)
- ERROR_OUT(ret, exit_buildmsg);
- }
- break;
- case CUR_ORDER:
- if (ssl->keys.dtls_epoch ==
- ssl->secure_renegotiation->tmp_keys.dtls_epoch) {
- if (ssl->encrypt.src != SCR) {
- ssl->secure_renegotiation->cache_status =
- SCR_CACHE_NEEDED;
- if ((ret = SetKeysSide(ssl, ENCRYPT_SIDE_ONLY))
- != 0)
- ERROR_OUT(ret, exit_buildmsg);
- }
- }
- else {
- if (ssl->encrypt.src != KEYS) {
- ssl->secure_renegotiation->cache_status =
- SCR_CACHE_NULL;
- if ((ret = SetKeysSide(ssl, ENCRYPT_SIDE_ONLY))
- != 0)
- ERROR_OUT(ret, exit_buildmsg);
- }
- }
- break;
- default:
- WOLFSSL_MSG("BuildMessage only supports PREV_ORDER and "
- "CUR_ORDER");
- ERROR_OUT(BAD_FUNC_ARG, exit_buildmsg);
- }
- }
- #endif
-
- ssl->options.buildMsgState = BUILD_MSG_SIZE;
- }
- FALL_THROUGH;
- case BUILD_MSG_SIZE:
- {
- args->digestSz = ssl->specs.hash_size;
- #ifdef HAVE_TRUNCATED_HMAC
- if (ssl->truncated_hmac)
- args->digestSz = min(TRUNCATED_HMAC_SZ, args->digestSz);
- #endif
- args->sz += args->digestSz;
-
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- args->sz += DTLS_RECORD_EXTRA;
- args->idx += DTLS_RECORD_EXTRA;
- args->headerSz += DTLS_RECORD_EXTRA;
- }
- #endif
-
- #ifndef WOLFSSL_AEAD_ONLY
- if (ssl->specs.cipher_type == block) {
- word32 blockSz = ssl->specs.block_size;
- if (ssl->options.tls1_1) {
- args->ivSz = blockSz;
- args->sz += args->ivSz;
-
- if (args->ivSz > MAX_IV_SZ)
- ERROR_OUT(BUFFER_E, exit_buildmsg);
- }
- args->sz += 1; /* pad byte */
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMWrite) {
- args->pad = (args->sz - args->headerSz -
- args->digestSz) % blockSz;
- }
- else
- #endif
- args->pad = (args->sz - args->headerSz) % blockSz;
- #ifdef OPENSSL_EXTRA
- if(args->pad != 0)
- #endif
- args->pad = blockSz - args->pad;
- args->sz += args->pad;
- }
- #endif /* WOLFSSL_AEAD_ONLY */
-
- #ifdef HAVE_AEAD
- if (ssl->specs.cipher_type == aead) {
- if (ssl->specs.bulk_cipher_algorithm != wolfssl_chacha)
- args->ivSz = AESGCM_EXP_IV_SZ;
-
- args->sz += (args->ivSz + ssl->specs.aead_mac_size - args->digestSz);
- }
- #endif
-
- /* done with size calculations */
- if (sizeOnly)
- goto exit_buildmsg;
-
- if (args->sz > (word32)outSz) {
- WOLFSSL_MSG("Oops, want to write past output buffer size");
- ERROR_OUT(BUFFER_E, exit_buildmsg);
- }
-
- if (args->ivSz > 0) {
- args->iv = (byte*)XMALLOC(args->ivSz, ssl->heap, DYNAMIC_TYPE_SALT);
- if (args->iv == NULL)
- ERROR_OUT(MEMORY_E, exit_buildmsg);
-
- ret = wc_RNG_GenerateBlock(ssl->rng, args->iv, args->ivSz);
- if (ret != 0)
- goto exit_buildmsg;
-
- }
-#if !defined(NO_PUBLIC_GCM_SET_IV) && \
- ((defined(HAVE_FIPS) || defined(HAVE_SELFTEST)) && \
- (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) && \
- defined(HAVE_AEAD))
- if (ssl->specs.cipher_type == aead) {
- if (ssl->specs.bulk_cipher_algorithm != wolfssl_chacha)
- XMEMCPY(args->iv, ssl->keys.aead_exp_IV, AESGCM_EXP_IV_SZ);
- }
-#endif
-
- args->size = (word16)(args->sz - args->headerSz); /* include mac and digest */
- AddRecordHeader(output, args->size, (byte)type, ssl, epochOrder);
-
- /* write to output */
- if (args->ivSz > 0) {
- XMEMCPY(output + args->idx, args->iv,
- min(args->ivSz, MAX_IV_SZ));
- args->idx += args->ivSz;
- }
- XMEMCPY(output + args->idx, input, inSz);
- args->idx += inSz;
-
- ssl->options.buildMsgState = BUILD_MSG_HASH;
- }
- FALL_THROUGH;
- case BUILD_MSG_HASH:
- {
- if (type == handshake && hashOutput) {
- ret = HashOutput(ssl, output, args->headerSz + inSz, args->ivSz);
- if (ret != 0)
- goto exit_buildmsg;
- }
- #ifndef WOLFSSL_AEAD_ONLY
- if (ssl->specs.cipher_type == block) {
- word32 tmpIdx;
- word32 i;
-
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMWrite)
- tmpIdx = args->idx;
- else
- #endif
- tmpIdx = args->idx + args->digestSz;
-
- for (i = 0; i <= args->pad; i++)
- output[tmpIdx++] = (byte)args->pad; /* pad byte gets pad value */
- }
- #endif
-
- ssl->options.buildMsgState = BUILD_MSG_VERIFY_MAC;
- }
- FALL_THROUGH;
- case BUILD_MSG_VERIFY_MAC:
- {
- /* User Record Layer Callback handling */
- #ifdef ATOMIC_USER
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMWrite) {
- if (ssl->ctx->EncryptMacCb) {
- ret = ssl->ctx->EncryptMacCb(ssl, output + args->idx +
- args->pad + 1, type, 0,
- output + args->headerSz,
- output + args->headerSz,
- args->size - args->digestSz,
- ssl->MacEncryptCtx);
- goto exit_buildmsg;
- }
- }
- else
- #endif
- {
- if (ssl->ctx->MacEncryptCb) {
- ret = ssl->ctx->MacEncryptCb(ssl, output + args->idx,
- output + args->headerSz + args->ivSz, inSz,
- type, 0, output + args->headerSz,
- output + args->headerSz, args->size,
- ssl->MacEncryptCtx);
- goto exit_buildmsg;
- }
- }
- #endif
-
- #ifndef WOLFSSL_AEAD_ONLY
- if (ssl->specs.cipher_type != aead
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- && !ssl->options.startedETMWrite
- #endif
- ) {
- #ifdef HAVE_TRUNCATED_HMAC
- if (ssl->truncated_hmac &&
- ssl->specs.hash_size > args->digestSz) {
- #ifdef WOLFSSL_SMALL_STACK
- byte* hmac;
- #else
- byte hmac[WC_MAX_DIGEST_SIZE];
- #endif
-
- #ifdef WOLFSSL_SMALL_STACK
- hmac = (byte*)XMALLOC(WC_MAX_DIGEST_SIZE, ssl->heap,
- DYNAMIC_TYPE_DIGEST);
- if (hmac == NULL)
- ERROR_OUT(MEMORY_E, exit_buildmsg);
- #endif
-
- ret = ssl->hmac(ssl, hmac,
- output + args->headerSz + args->ivSz, inSz,
- -1, type, 0, epochOrder);
- XMEMCPY(output + args->idx, hmac, args->digestSz);
-
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(hmac, ssl->heap, DYNAMIC_TYPE_DIGEST);
- #endif
- }
- else
- #endif
- {
- ret = ssl->hmac(ssl, output + args->idx, output +
- args->headerSz + args->ivSz, inSz, -1, type, 0, epochOrder);
- }
- }
- #endif /* WOLFSSL_AEAD_ONLY */
- if (ret != 0)
- goto exit_buildmsg;
-
- ssl->options.buildMsgState = BUILD_MSG_ENCRYPT;
- }
- FALL_THROUGH;
- case BUILD_MSG_ENCRYPT:
- {
- #if defined(HAVE_SECURE_RENEGOTIATION) && defined(WOLFSSL_DTLS)
- /* If we want the PREV_ORDER then modify CUR_ORDER sequence number
- * for all encryption algos that use it for encryption parameters */
- word16 dtls_epoch = 0;
- word16 dtls_sequence_number_hi = 0;
- word32 dtls_sequence_number_lo = 0;
- int swap_seq = ssl->options.dtls && epochOrder == PREV_ORDER &&
- DtlsUseSCRKeys(ssl);
- if (swap_seq) {
- dtls_epoch = ssl->keys.dtls_epoch;
- dtls_sequence_number_hi = ssl->keys.dtls_sequence_number_hi;
- dtls_sequence_number_lo = ssl->keys.dtls_sequence_number_lo;
- ssl->keys.dtls_epoch--;
- ssl->keys.dtls_sequence_number_hi =
- ssl->keys.dtls_prev_sequence_number_hi;
- ssl->keys.dtls_sequence_number_lo =
- ssl->keys.dtls_prev_sequence_number_lo;
- }
- #endif
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMWrite) {
- ret = Encrypt(ssl, output + args->headerSz,
- output + args->headerSz,
- args->size - args->digestSz, asyncOkay);
- }
- else
- #endif
- {
- ret = Encrypt(ssl, output + args->headerSz,
- output + args->headerSz, args->size, asyncOkay);
- }
- #if defined(HAVE_SECURE_RENEGOTIATION) && defined(WOLFSSL_DTLS)
- /* Restore sequence numbers */
- if (swap_seq) {
- ssl->keys.dtls_epoch = dtls_epoch;
- ssl->keys.dtls_sequence_number_hi = dtls_sequence_number_hi;
- ssl->keys.dtls_sequence_number_lo = dtls_sequence_number_lo;
- }
- #endif
- if (ret != 0)
- goto exit_buildmsg;
- ssl->options.buildMsgState = BUILD_MSG_ENCRYPTED_VERIFY_MAC;
- }
- FALL_THROUGH;
- case BUILD_MSG_ENCRYPTED_VERIFY_MAC:
- {
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMWrite) {
- WOLFSSL_MSG("Calculate MAC of Encrypted Data");
-
- #ifdef HAVE_TRUNCATED_HMAC
- if (ssl->truncated_hmac &&
- ssl->specs.hash_size > args->digestSz) {
- #ifdef WOLFSSL_SMALL_STACK
- byte* hmac = NULL;
- #else
- byte hmac[WC_MAX_DIGEST_SIZE];
- #endif
-
- #ifdef WOLFSSL_SMALL_STACK
- hmac = (byte*)XMALLOC(WC_MAX_DIGEST_SIZE, ssl->heap,
- DYNAMIC_TYPE_DIGEST);
- if (hmac == NULL)
- ERROR_OUT(MEMORY_E, exit_buildmsg);
- #endif
-
- ret = ssl->hmac(ssl, hmac, output + args->headerSz,
- args->ivSz + inSz + args->pad + 1, -1, type,
- 0, epochOrder);
- XMEMCPY(output + args->idx + args->pad + 1, hmac,
- args->digestSz);
-
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(hmac, ssl->heap, DYNAMIC_TYPE_DIGEST);
- #endif
- }
- else
- #endif
- {
- ret = ssl->hmac(ssl, output + args->idx + args->pad + 1,
- output + args->headerSz,
- args->ivSz + inSz + args->pad + 1, -1, type,
- 0, epochOrder);
- }
- }
- #endif /* HAVE_ENCRYPT_THEN_MAC && !WOLFSSL_AEAD_ONLY */
- }
- }
-
-exit_buildmsg:
-
- WOLFSSL_LEAVE("BuildMessage", ret);
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E) {
- return ret;
- }
-#endif
-
- /* make sure build message state is reset */
- ssl->options.buildMsgState = BUILD_MSG_BEGIN;
-
- #ifdef WOLFSSL_DTLS
- if (ret == 0 && ssl->options.dtls)
- DtlsSEQIncrement(ssl, epochOrder);
- #endif
-
- /* return sz on success */
- if (ret == 0)
- ret = args->sz;
-
- /* Final cleanup */
- FreeBuildMsgArgs(ssl, args);
-
- return ret;
-#endif /* !WOLFSSL_NO_TLS12 */
-}
-
-#ifndef WOLFSSL_NO_TLS12
-
-int SendFinished(WOLFSSL* ssl)
-{
- int sendSz,
- finishedSz = ssl->options.tls ? TLS_FINISHED_SZ :
- FINISHED_SZ;
- byte input[FINISHED_SZ + DTLS_HANDSHAKE_HEADER_SZ]; /* max */
- byte *output;
- Hashes* hashes;
- int ret;
- int headerSz = HANDSHAKE_HEADER_SZ;
- int outputSz;
-
- WOLFSSL_START(WC_FUNC_FINISHED_SEND);
- WOLFSSL_ENTER("SendFinished");
-
- /* setup encrypt keys */
- if ((ret = SetKeysSide(ssl, ENCRYPT_SIDE_ONLY)) != 0)
- return ret;
-
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- ssl->options.startedETMWrite = ssl->options.encThenMac;
- #endif
-
- /* check for available size */
- outputSz = sizeof(input) + MAX_MSG_EXTRA;
- if ((ret = CheckAvailableSize(ssl, outputSz)) != 0)
- return ret;
-
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- headerSz += DTLS_HANDSHAKE_EXTRA;
- ssl->keys.dtls_epoch++;
- ssl->keys.dtls_prev_sequence_number_hi =
- ssl->keys.dtls_sequence_number_hi;
- ssl->keys.dtls_prev_sequence_number_lo =
- ssl->keys.dtls_sequence_number_lo;
- ssl->keys.dtls_sequence_number_hi = 0;
- ssl->keys.dtls_sequence_number_lo = 0;
- }
- #endif
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHandShakeHeader(input, finishedSz, 0, finishedSz, finished, ssl);
-
- /* make finished hashes */
- hashes = (Hashes*)&input[headerSz];
- ret = BuildFinished(ssl, hashes,
- ssl->options.side == WOLFSSL_CLIENT_END ? client : server);
- if (ret != 0) return ret;
-
-#ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation) {
- if (ssl->options.side == WOLFSSL_CLIENT_END)
- XMEMCPY(ssl->secure_renegotiation->client_verify_data, hashes,
- TLS_FINISHED_SZ);
- else
- XMEMCPY(ssl->secure_renegotiation->server_verify_data, hashes,
- TLS_FINISHED_SZ);
- }
-#endif
-
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- if ((ret = DtlsMsgPoolSave(ssl, input, headerSz + finishedSz, finished)) != 0)
- return ret;
- }
- #endif
-
- sendSz = BuildMessage(ssl, output, outputSz, input, headerSz + finishedSz,
- handshake, 1, 0, 0, CUR_ORDER);
- if (sendSz < 0)
- return BUILD_MSG_ERROR;
-
- if (!ssl->options.resuming) {
-#ifndef NO_SESSION_CACHE
- AddSession(ssl); /* just try */
-#endif
- if (ssl->options.side == WOLFSSL_SERVER_END) {
- #ifdef OPENSSL_EXTRA
- ssl->options.serverState = SERVER_FINISHED_COMPLETE;
- ssl->cbmode = SSL_CB_MODE_WRITE;
- if (ssl->CBIS != NULL)
- ssl->CBIS(ssl, SSL_CB_HANDSHAKE_DONE, SSL_SUCCESS);
- #endif
- ssl->options.handShakeState = HANDSHAKE_DONE;
- ssl->options.handShakeDone = 1;
- }
- }
- else {
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- #ifdef OPENSSL_EXTRA
- ssl->options.clientState = CLIENT_FINISHED_COMPLETE;
- ssl->cbmode = SSL_CB_MODE_WRITE;
- if (ssl->CBIS != NULL)
- ssl->CBIS(ssl, SSL_CB_HANDSHAKE_DONE, SSL_SUCCESS);
- #endif
- ssl->options.handShakeState = HANDSHAKE_DONE;
- ssl->options.handShakeDone = 1;
- }
- }
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn) AddPacketName(ssl, "Finished");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "Finished", handshake, output, sendSz,
- WRITE_PROTO, ssl->heap);
- #endif
-
- ssl->buffers.outputBuffer.length += sendSz;
-
- ret = SendBuffered(ssl);
-
-#ifdef WOLFSSL_DTLS
- if ((!ssl->options.resuming &&
- ssl->options.side == WOLFSSL_SERVER_END) ||
- (ssl->options.resuming &&
- ssl->options.side == WOLFSSL_CLIENT_END)) {
- ssl->keys.dtls_handshake_number = 0;
- ssl->keys.dtls_expected_peer_handshake_number = 0;
- }
-#endif
-
- WOLFSSL_LEAVE("SendFinished", ret);
- WOLFSSL_END(WC_FUNC_FINISHED_SEND);
-
- return ret;
-}
-#endif /* WOLFSSL_NO_TLS12 */
-
-#ifndef NO_WOLFSSL_SERVER
-#if (!defined(WOLFSSL_NO_TLS12) && \
- (defined(HAVE_CERTIFICATE_STATUS_REQUEST) || \
- defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2))) || \
- (defined(WOLFSSL_TLS13) && defined(HAVE_CERTIFICATE_STATUS_REQUEST))
-/* Parses and decodes the certificate then initializes "request". In the case
- * of !ssl->buffers.weOwnCert, ssl->ctx->certOcspRequest gets set to "request".
- *
- * Returns 0 on success
- */
-static int CreateOcspRequest(WOLFSSL* ssl, OcspRequest* request,
- DecodedCert* cert, byte* certData, word32 length)
-{
- int ret;
-
- if (request != NULL)
- XMEMSET(request, 0, sizeof(OcspRequest));
-
- InitDecodedCert(cert, certData, length, ssl->heap);
- /* TODO: Setup async support here */
- ret = ParseCertRelative(cert, CERT_TYPE, VERIFY, ssl->ctx->cm);
- if (ret != 0) {
- WOLFSSL_MSG("ParseCert failed");
- }
- if (ret == 0)
- ret = InitOcspRequest(request, cert, 0, ssl->heap);
- if (ret == 0) {
- /* make sure ctx OCSP request is updated */
- if (!ssl->buffers.weOwnCert) {
- wolfSSL_Mutex* ocspLock = &ssl->ctx->cm->ocsp_stapling->ocspLock;
- if (wc_LockMutex(ocspLock) == 0) {
- if (ssl->ctx->certOcspRequest == NULL)
- ssl->ctx->certOcspRequest = request;
- wc_UnLockMutex(ocspLock);
- }
- }
- }
-
- FreeDecodedCert(cert);
-
- return ret;
-}
-
-
-/* Creates OCSP response and places it in variable "response". Memory
- * management for "buffer* response" is up to the caller.
- *
- * Also creates an OcspRequest in the case that ocspRequest is null or that
- * ssl->buffers.weOwnCert is set. In those cases managing ocspRequest free'ing
- * is up to the caller. NOTE: in OcspCreateRequest ssl->ctx->certOcspRequest can
- * be set to point to "ocspRequest" and it then should not be free'd since
- * wolfSSL_CTX_free will take care of it.
- *
- * Returns 0 on success
- */
-int CreateOcspResponse(WOLFSSL* ssl, OcspRequest** ocspRequest,
- buffer* response)
-{
- int ret = 0;
- OcspRequest* request = NULL;
- byte createdRequest = 0;
-
- if (ssl == NULL || ocspRequest == NULL || response == NULL)
- return BAD_FUNC_ARG;
-
- XMEMSET(response, 0, sizeof(*response));
- request = *ocspRequest;
-
- /* unable to fetch status. skip. */
- if (ssl->ctx->cm == NULL || ssl->ctx->cm->ocspStaplingEnabled == 0)
- return 0;
-
- if (request == NULL || ssl->buffers.weOwnCert) {
- DerBuffer* der = ssl->buffers.certificate;
- #ifdef WOLFSSL_SMALL_STACK
- DecodedCert* cert = NULL;
- #else
- DecodedCert cert[1];
- #endif
-
- /* unable to fetch status. skip. */
- if (der->buffer == NULL || der->length == 0)
- return 0;
-
- #ifdef WOLFSSL_SMALL_STACK
- cert = (DecodedCert*)XMALLOC(sizeof(DecodedCert), ssl->heap,
- DYNAMIC_TYPE_DCERT);
- if (cert == NULL)
- return MEMORY_E;
- #endif
- request = (OcspRequest*)XMALLOC(sizeof(OcspRequest), ssl->heap,
- DYNAMIC_TYPE_OCSP_REQUEST);
- if (request == NULL)
- ret = MEMORY_E;
-
- createdRequest = 1;
- if (ret == 0) {
- ret = CreateOcspRequest(ssl, request, cert, der->buffer,
- der->length);
- }
-
- if (ret != 0) {
- XFREE(request, ssl->heap, DYNAMIC_TYPE_OCSP_REQUEST);
- request = NULL;
- }
-
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(cert, ssl->heap, DYNAMIC_TYPE_DCERT);
- #endif
- }
-
- if (ret == 0) {
- request->ssl = ssl;
- ret = CheckOcspRequest(ssl->ctx->cm->ocsp_stapling, request, response);
-
- /* Suppressing, not critical */
- if (ret == OCSP_CERT_REVOKED ||
- ret == OCSP_CERT_UNKNOWN ||
- ret == OCSP_LOOKUP_FAIL) {
- ret = 0;
- }
- }
-
- /* free request up if error case found otherwise return it */
- if (ret != 0 && createdRequest) {
- FreeOcspRequest(request);
- XFREE(request, ssl->heap, DYNAMIC_TYPE_OCSP_REQUEST);
- }
-
- if (ret == 0)
- *ocspRequest = request;
-
- return ret;
-}
-#endif
-#endif /* !NO_WOLFSSL_SERVER */
-
-#ifndef WOLFSSL_NO_TLS12
-
-#if !defined(NO_CERTS) || defined(HAVE_SESSION_TICKET)
-static int cipherExtraData(WOLFSSL* ssl)
-{
- /* Cipher data that may be added by BuildMessage */
- return ssl->specs.hash_size + ssl->specs.block_size +
- ssl->specs.aead_mac_size + ssl->specs.iv_size +
- ssl->specs.pad_size;
-}
-#endif
-
-#ifndef NO_CERTS
-#if !defined(NO_WOLFSSL_SERVER) || !defined(WOLFSSL_NO_CLIENT_AUTH)
-/* handle generation of certificate (11) */
-int SendCertificate(WOLFSSL* ssl)
-{
- int ret = 0;
- word32 certSz, certChainSz, headerSz, listSz, payloadSz;
- word32 length, maxFragment;
-
- WOLFSSL_START(WC_FUNC_CERTIFICATE_SEND);
- WOLFSSL_ENTER("SendCertificate");
-
- if (ssl->options.usingPSK_cipher || ssl->options.usingAnon_cipher)
- return 0; /* not needed */
-
- if (ssl->options.sendVerify == SEND_BLANK_CERT) {
- #ifdef OPENSSL_EXTRA
- if (ssl->version.major == SSLv3_MAJOR
- && ssl->version.minor == SSLv3_MINOR){
- SendAlert(ssl, alert_warning, no_certificate);
- return 0;
- } else {
- #endif
- certSz = 0;
- certChainSz = 0;
- headerSz = CERT_HEADER_SZ;
- length = CERT_HEADER_SZ;
- listSz = 0;
- #ifdef OPENSSL_EXTRA
- }
- #endif
- }
- else {
- if (!ssl->buffers.certificate) {
- WOLFSSL_MSG("Send Cert missing certificate buffer");
- return BUFFER_ERROR;
- }
- certSz = ssl->buffers.certificate->length;
- headerSz = 2 * CERT_HEADER_SZ;
- /* list + cert size */
- length = certSz + headerSz;
- listSz = certSz + CERT_HEADER_SZ;
-
- /* may need to send rest of chain, already has leading size(s) */
- if (certSz && ssl->buffers.certChain) {
- certChainSz = ssl->buffers.certChain->length;
- length += certChainSz;
- listSz += certChainSz;
- }
- else
- certChainSz = 0;
- }
-
- payloadSz = length;
-
- if (ssl->fragOffset != 0)
- length -= (ssl->fragOffset + headerSz);
-
- maxFragment = MAX_RECORD_SIZE;
-
- if (ssl->options.dtls) {
- #ifdef WOLFSSL_DTLS
- /* The 100 bytes is used to account for the UDP and IP headers.
- It can also include the record padding and MAC if the
- SendCertificate is called for a secure renegotiation. */
- maxFragment = MAX_MTU - DTLS_RECORD_HEADER_SZ
- - DTLS_HANDSHAKE_HEADER_SZ - 100;
- #endif /* WOLFSSL_DTLS */
- }
-
- maxFragment = wolfSSL_GetMaxRecordSize(ssl, maxFragment);
-
- while (length > 0 && ret == 0) {
- byte* output = NULL;
- word32 fragSz = 0;
- word32 i = RECORD_HEADER_SZ;
- int sendSz = RECORD_HEADER_SZ;
-
- if (!ssl->options.dtls) {
- if (ssl->fragOffset == 0) {
- if (headerSz + certSz + certChainSz <=
- maxFragment - HANDSHAKE_HEADER_SZ) {
-
- fragSz = headerSz + certSz + certChainSz;
- }
- else {
- fragSz = maxFragment - HANDSHAKE_HEADER_SZ;
- }
- sendSz += fragSz + HANDSHAKE_HEADER_SZ;
- i += HANDSHAKE_HEADER_SZ;
- }
- else {
- fragSz = min(length, maxFragment);
- sendSz += fragSz;
- }
-
- if (IsEncryptionOn(ssl, 1))
- sendSz += MAX_MSG_EXTRA;
- }
- else {
- #ifdef WOLFSSL_DTLS
- fragSz = min(length, maxFragment);
- sendSz += fragSz + DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA
- + HANDSHAKE_HEADER_SZ;
- i += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA
- + HANDSHAKE_HEADER_SZ;
- #endif
- }
-
- if (IsEncryptionOn(ssl, 1))
- sendSz += cipherExtraData(ssl);
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
- return ret;
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- if (ssl->fragOffset == 0) {
- if (!ssl->options.dtls) {
- AddFragHeaders(output, fragSz, 0, payloadSz, certificate, ssl);
- if (!IsEncryptionOn(ssl, 1))
- HashRaw(ssl, output + RECORD_HEADER_SZ,
- HANDSHAKE_HEADER_SZ);
- }
- else {
- #ifdef WOLFSSL_DTLS
- AddHeaders(output, payloadSz, certificate, ssl);
- HashRaw(ssl,
- output + RECORD_HEADER_SZ + DTLS_RECORD_EXTRA,
- HANDSHAKE_HEADER_SZ + DTLS_HANDSHAKE_EXTRA);
- /* Adding the headers increments these, decrement them for
- * actual message header. */
- ssl->keys.dtls_handshake_number--;
- AddFragHeaders(output, fragSz, 0, payloadSz, certificate, ssl);
- ssl->keys.dtls_handshake_number--;
- #endif /* WOLFSSL_DTLS */
- }
-
- /* list total */
- c32to24(listSz, output + i);
- if (ssl->options.dtls || !IsEncryptionOn(ssl, 1))
- HashRaw(ssl, output + i, CERT_HEADER_SZ);
- i += CERT_HEADER_SZ;
- length -= CERT_HEADER_SZ;
- fragSz -= CERT_HEADER_SZ;
- if (certSz) {
- c32to24(certSz, output + i);
- if (ssl->options.dtls || !IsEncryptionOn(ssl, 1))
- HashRaw(ssl, output + i, CERT_HEADER_SZ);
- i += CERT_HEADER_SZ;
- length -= CERT_HEADER_SZ;
- fragSz -= CERT_HEADER_SZ;
-
- if (ssl->options.dtls || !IsEncryptionOn(ssl, 1)) {
- HashRaw(ssl, ssl->buffers.certificate->buffer, certSz);
- if (certChainSz)
- HashRaw(ssl, ssl->buffers.certChain->buffer,
- certChainSz);
- }
- }
- }
- else {
- if (!ssl->options.dtls) {
- AddRecordHeader(output, fragSz, handshake, ssl, CUR_ORDER);
- }
- else {
- #ifdef WOLFSSL_DTLS
- AddFragHeaders(output, fragSz, ssl->fragOffset + headerSz,
- payloadSz, certificate, ssl);
- ssl->keys.dtls_handshake_number--;
- #endif /* WOLFSSL_DTLS */
- }
- }
-
- /* member */
- if (certSz && ssl->fragOffset < certSz) {
- word32 copySz = min(certSz - ssl->fragOffset, fragSz);
- XMEMCPY(output + i,
- ssl->buffers.certificate->buffer + ssl->fragOffset, copySz);
- i += copySz;
- ssl->fragOffset += copySz;
- length -= copySz;
- fragSz -= copySz;
- }
- if (certChainSz && fragSz) {
- word32 copySz = min(certChainSz + certSz - ssl->fragOffset, fragSz);
- XMEMCPY(output + i,
- ssl->buffers.certChain->buffer + ssl->fragOffset - certSz,
- copySz);
- i += copySz;
- ssl->fragOffset += copySz;
- length -= copySz;
- }
-
- if (IsEncryptionOn(ssl, 1)) {
- byte* input = NULL;
- int inputSz = i; /* build msg adds rec hdr */
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls)
- recordHeaderSz += DTLS_RECORD_EXTRA;
- inputSz -= recordHeaderSz;
-
- if (inputSz < 0) {
- WOLFSSL_MSG("Send Cert bad inputSz");
- return BUFFER_E;
- }
-
- if (inputSz > 0) { /* clang thinks could be zero, let's help */
- input = (byte*)XMALLOC(inputSz, ssl->heap,
- DYNAMIC_TYPE_IN_BUFFER);
- if (input == NULL)
- return MEMORY_E;
- XMEMCPY(input, output + recordHeaderSz, inputSz);
- }
-
-#ifndef WOLFSSL_DTLS
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 1, 0, 0, CUR_ORDER);
-#else
- if (!ssl->options.dtls)
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 1, 0, 0, CUR_ORDER);
- else /* DTLS 1.2 has to ignore fragmentation in hashing so we need to
- * calculate the hash ourselves above */ {
- if ((ret = DtlsMsgPoolSave(ssl, input, inputSz, certificate)) != 0) {
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- return ret;
- }
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 0, 0, 0, CUR_ORDER);
- }
-#endif
-
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
-
- if (sendSz < 0)
- return sendSz;
- }
- else {
- sendSz = i;
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- if ((ret = DtlsMsgPoolSave(ssl, output, sendSz, certificate)) != 0)
- return ret;
- }
- if (ssl->options.dtls)
- DtlsSEQIncrement(ssl, CUR_ORDER);
- #endif
- }
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "Certificate");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "Certificate", handshake, output, sendSz,
- WRITE_PROTO, ssl->heap);
- #endif
-
- ssl->buffers.outputBuffer.length += sendSz;
- if (!ssl->options.groupMessages)
- ret = SendBuffered(ssl);
- }
-
- if (ret != WANT_WRITE) {
- /* Clean up the fragment offset. */
- ssl->fragOffset = 0;
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls)
- ssl->keys.dtls_handshake_number++;
- #endif
- if (ssl->options.side == WOLFSSL_SERVER_END){
- ssl->options.serverState = SERVER_CERT_COMPLETE;
- }
- }
-
- WOLFSSL_LEAVE("SendCertificate", ret);
- WOLFSSL_END(WC_FUNC_CERTIFICATE_SEND);
-
- return ret;
-}
-#endif /* !NO_WOLFSSL_SERVER || !WOLFSSL_NO_CLIENT_AUTH */
-
-/* handle generation of certificate_request (13) */
-int SendCertificateRequest(WOLFSSL* ssl)
-{
- byte *output;
- int ret;
- int sendSz;
- word32 i = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- word32 dnLen = 0;
-#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX)
- WOLF_STACK_OF(WOLFSSL_X509_NAME)* names;
-#endif
-
- int typeTotal = 1; /* only 1 for now */
- int reqSz = ENUM_LEN + typeTotal + REQ_HEADER_SZ; /* add auth later */
-
- WOLFSSL_START(WC_FUNC_CERTIFICATE_REQUEST_SEND);
- WOLFSSL_ENTER("SendCertificateRequest");
-
- if (IsAtLeastTLSv1_2(ssl))
- reqSz += LENGTH_SZ + ssl->suites->hashSigAlgoSz;
-
-#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX)
- /* Certificate Authorities */
- names = ssl->ctx->ca_names;
- while (names != NULL) {
- byte seq[MAX_SEQ_SZ];
-
- /* 16-bit length | SEQ | Len | DER of name */
- dnLen += OPAQUE16_LEN + SetSequence(names->data.name->rawLen, seq) +
- names->data.name->rawLen;
- names = names->next;
- }
- reqSz += dnLen;
-#endif
-
- if (ssl->options.usingPSK_cipher || ssl->options.usingAnon_cipher)
- return 0; /* not needed */
-
- sendSz = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ + reqSz;
-
- if (!ssl->options.dtls) {
- if (IsEncryptionOn(ssl, 1))
- sendSz += MAX_MSG_EXTRA;
- }
- else {
- #ifdef WOLFSSL_DTLS
- sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- i += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- #endif
- }
-
- if (IsEncryptionOn(ssl, 1))
- sendSz += cipherExtraData(ssl);
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
- return ret;
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHeaders(output, reqSz, certificate_request, ssl);
-
- /* write to output */
- output[i++] = (byte)typeTotal; /* # of types */
-#ifdef HAVE_ECC
- if ((ssl->options.cipherSuite0 == ECC_BYTE ||
- ssl->options.cipherSuite0 == CHACHA_BYTE) &&
- ssl->specs.sig_algo == ecc_dsa_sa_algo) {
- output[i++] = ecdsa_sign;
- } else
-#endif /* HAVE_ECC */
- {
- output[i++] = rsa_sign;
- }
-
- /* supported hash/sig */
- if (IsAtLeastTLSv1_2(ssl)) {
- c16toa(ssl->suites->hashSigAlgoSz, &output[i]);
- i += OPAQUE16_LEN;
-
- XMEMCPY(&output[i],
- ssl->suites->hashSigAlgo, ssl->suites->hashSigAlgoSz);
- i += ssl->suites->hashSigAlgoSz;
- }
-
- /* Certificate Authorities */
- c16toa((word16)dnLen, &output[i]); /* auth's */
- i += REQ_HEADER_SZ;
-#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX)
- names = ssl->ctx->ca_names;
- while (names != NULL) {
- byte seq[MAX_SEQ_SZ];
-
- c16toa((word16)names->data.name->rawLen +
- SetSequence(names->data.name->rawLen, seq), &output[i]);
- i += OPAQUE16_LEN;
- i += SetSequence(names->data.name->rawLen, output + i);
- XMEMCPY(output + i, names->data.name->raw, names->data.name->rawLen);
- i += names->data.name->rawLen;
- names = names->next;
- }
-#endif
- (void)i;
-
- if (IsEncryptionOn(ssl, 1)) {
- byte* input;
- int inputSz = i; /* build msg adds rec hdr */
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls)
- recordHeaderSz += DTLS_RECORD_EXTRA;
- inputSz -= recordHeaderSz;
-
- input = (byte*)XMALLOC(inputSz, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- if (input == NULL)
- return MEMORY_E;
-
- XMEMCPY(input, output + recordHeaderSz, inputSz);
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) &&
- (ret = DtlsMsgPoolSave(ssl, input, inputSz, certificate_request)) != 0) {
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- return ret;
- }
- #endif
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 1, 0, 0, CUR_ORDER);
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
-
- if (sendSz < 0)
- return sendSz;
- } else {
- sendSz = i;
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- if ((ret = DtlsMsgPoolSave(ssl, output, sendSz, certificate_request)) != 0)
- return ret;
- }
- if (ssl->options.dtls)
- DtlsSEQIncrement(ssl, CUR_ORDER);
- #endif
- ret = HashOutput(ssl, output, sendSz, 0);
- if (ret != 0)
- return ret;
- }
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "CertificateRequest");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "CertificateRequest", handshake, output, sendSz,
- WRITE_PROTO, ssl->heap);
- #endif
- ssl->buffers.outputBuffer.length += sendSz;
- if (ssl->options.groupMessages)
- ret = 0;
- else
- ret = SendBuffered(ssl);
-
- WOLFSSL_LEAVE("SendCertificateRequest", ret);
- WOLFSSL_END(WC_FUNC_CERTIFICATE_REQUEST_SEND);
-
- return ret;
-}
-
-#ifndef NO_WOLFSSL_SERVER
-#if defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
- || defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2)
-static int BuildCertificateStatus(WOLFSSL* ssl, byte type, buffer* status,
- byte count)
-{
- byte* output = NULL;
- word32 idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- word32 length = ENUM_LEN;
- int sendSz = 0;
- int ret = 0;
- int i = 0;
-
- WOLFSSL_ENTER("BuildCertificateStatus");
-
- switch (type) {
- case WOLFSSL_CSR2_OCSP_MULTI:
- length += OPAQUE24_LEN;
- FALL_THROUGH; /* followed by */
-
- case WOLFSSL_CSR2_OCSP:
- for (i = 0; i < count; i++)
- length += OPAQUE24_LEN + status[i].length;
- break;
-
- default:
- return 0;
- }
-
- sendSz = idx + length;
-
- if (ssl->keys.encryptionOn)
- sendSz += MAX_MSG_EXTRA;
-
- if ((ret = CheckAvailableSize(ssl, sendSz)) == 0) {
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHeaders(output, length, certificate_status, ssl);
-
- output[idx++] = type;
-
- if (type == WOLFSSL_CSR2_OCSP_MULTI) {
- c32to24(length - (ENUM_LEN + OPAQUE24_LEN), output + idx);
- idx += OPAQUE24_LEN;
- }
-
- for (i = 0; i < count; i++) {
- c32to24(status[i].length, output + idx);
- idx += OPAQUE24_LEN;
-
- XMEMCPY(output + idx, status[i].buffer, status[i].length);
- idx += status[i].length;
- }
-
- if (IsEncryptionOn(ssl, 1)) {
- byte* input;
- int inputSz = idx; /* build msg adds rec hdr */
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls)
- recordHeaderSz += DTLS_RECORD_EXTRA;
- inputSz -= recordHeaderSz;
- input = (byte*)XMALLOC(inputSz, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- if (input == NULL)
- return MEMORY_E;
-
- XMEMCPY(input, output + recordHeaderSz, inputSz);
- #ifdef WOLFSSL_DTLS
- ret = DtlsMsgPoolSave(ssl, input, inputSz, certificate_status);
- #endif
- if (ret == 0)
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 1, 0, 0, CUR_ORDER);
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
-
- if (sendSz < 0)
- ret = sendSz;
- }
- else {
- #ifdef WOLFSSL_DTLS
- if (ret == 0 && IsDtlsNotSctpMode(ssl))
- ret = DtlsMsgPoolSave(ssl, output, sendSz, certificate_status);
- if (ret == 0 && ssl->options.dtls)
- DtlsSEQIncrement(ssl, CUR_ORDER);
- #endif
- ret = HashOutput(ssl, output, sendSz, 0);
- }
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ret == 0 && ssl->hsInfoOn)
- AddPacketName(ssl, "CertificateStatus");
- if (ret == 0 && ssl->toInfoOn)
- AddPacketInfo(ssl, "CertificateStatus", handshake, output, sendSz,
- WRITE_PROTO, ssl->heap);
- #endif
-
- if (ret == 0) {
- ssl->buffers.outputBuffer.length += sendSz;
- if (!ssl->options.groupMessages)
- ret = SendBuffered(ssl);
- }
- }
-
- WOLFSSL_LEAVE("BuildCertificateStatus", ret);
- return ret;
-}
-#endif
-#endif /* NO_WOLFSSL_SERVER */
-
-/* handle generation of certificate_status (22) */
-int SendCertificateStatus(WOLFSSL* ssl)
-{
- int ret = 0;
- byte status_type = 0;
-
- WOLFSSL_START(WC_FUNC_CERTIFICATE_STATUS_SEND);
- WOLFSSL_ENTER("SendCertificateStatus");
-
- (void) ssl;
-
-#ifdef HAVE_CERTIFICATE_STATUS_REQUEST
- status_type = ssl->status_request;
-#endif
-
-#ifdef HAVE_CERTIFICATE_STATUS_REQUEST_V2
- status_type = status_type ? status_type : ssl->status_request_v2;
-#endif
-
- switch (status_type) {
-
- #ifndef NO_WOLFSSL_SERVER
- #if defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
- || defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2)
- /* case WOLFSSL_CSR_OCSP: */
- case WOLFSSL_CSR2_OCSP:
- {
- OcspRequest* request = ssl->ctx->certOcspRequest;
- buffer response;
-
- ret = CreateOcspResponse(ssl, &request, &response);
-
- /* if a request was successfully created and not stored in
- * ssl->ctx then free it */
- if (ret == 0 && request != ssl->ctx->certOcspRequest) {
- FreeOcspRequest(request);
- XFREE(request, ssl->heap, DYNAMIC_TYPE_OCSP_REQUEST);
- request = NULL;
- }
-
- if (ret == 0 && response.buffer) {
- ret = BuildCertificateStatus(ssl, status_type, &response, 1);
-
- XFREE(response.buffer, ssl->heap, DYNAMIC_TYPE_OCSP_REQUEST);
- response.buffer = NULL;
- }
- break;
- }
-
- #endif /* HAVE_CERTIFICATE_STATUS_REQUEST */
- /* HAVE_CERTIFICATE_STATUS_REQUEST_V2 */
-
- #if defined HAVE_CERTIFICATE_STATUS_REQUEST_V2
- case WOLFSSL_CSR2_OCSP_MULTI:
- {
- OcspRequest* request = ssl->ctx->certOcspRequest;
- buffer responses[1 + MAX_CHAIN_DEPTH];
- int i = 0;
-
- XMEMSET(responses, 0, sizeof(responses));
-
- ret = CreateOcspResponse(ssl, &request, &responses[0]);
-
- /* if a request was successfully created and not stored in
- * ssl->ctx then free it */
- if (ret == 0 && request != ssl->ctx->certOcspRequest) {
- FreeOcspRequest(request);
- XFREE(request, ssl->heap, DYNAMIC_TYPE_OCSP_REQUEST);
- request = NULL;
- }
-
- if (ret == 0 && (!ssl->ctx->chainOcspRequest[0]
- || ssl->buffers.weOwnCertChain)) {
- buffer der;
- word32 idx = 0;
- #ifdef WOLFSSL_SMALL_STACK
- DecodedCert* cert;
- #else
- DecodedCert cert[1];
- #endif
-
- #ifdef WOLFSSL_SMALL_STACK
- cert = (DecodedCert*)XMALLOC(sizeof(DecodedCert), ssl->heap,
- DYNAMIC_TYPE_DCERT);
- if (cert == NULL)
- return MEMORY_E;
- #endif
- request = (OcspRequest*)XMALLOC(sizeof(OcspRequest), ssl->heap,
- DYNAMIC_TYPE_OCSP_REQUEST);
- if (request == NULL) {
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(cert, ssl->heap, DYNAMIC_TYPE_DCERT);
- #endif
- return MEMORY_E;
- }
-
- while (idx + OPAQUE24_LEN < ssl->buffers.certChain->length) {
- c24to32(ssl->buffers.certChain->buffer + idx, &der.length);
- idx += OPAQUE24_LEN;
-
- der.buffer = ssl->buffers.certChain->buffer + idx;
- idx += der.length;
-
- if (idx > ssl->buffers.certChain->length)
- break;
-
- ret = CreateOcspRequest(ssl, request, cert, der.buffer,
- der.length);
- if (ret == 0) {
- request->ssl = ssl;
- ret = CheckOcspRequest(ssl->ctx->cm->ocsp_stapling,
- request, &responses[i + 1]);
-
- /* Suppressing, not critical */
- if (ret == OCSP_CERT_REVOKED ||
- ret == OCSP_CERT_UNKNOWN ||
- ret == OCSP_LOOKUP_FAIL) {
- ret = 0;
- }
-
-
- i++;
- FreeOcspRequest(request);
- }
- }
-
- XFREE(request, ssl->heap, DYNAMIC_TYPE_OCSP_REQUEST);
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(cert, ssl->heap, DYNAMIC_TYPE_DCERT);
- #endif
- }
- else {
- while (ret == 0 &&
- NULL != (request = ssl->ctx->chainOcspRequest[i])) {
- request->ssl = ssl;
- ret = CheckOcspRequest(ssl->ctx->cm->ocsp_stapling,
- request, &responses[++i]);
-
- /* Suppressing, not critical */
- if (ret == OCSP_CERT_REVOKED ||
- ret == OCSP_CERT_UNKNOWN ||
- ret == OCSP_LOOKUP_FAIL) {
- ret = 0;
- }
- }
- }
-
- if (responses[0].buffer) {
- if (ret == 0) {
- ret = BuildCertificateStatus(ssl, status_type, responses,
- (byte)i + 1);
- }
-
- for (i = 0; i < 1 + MAX_CHAIN_DEPTH; i++) {
- if (responses[i].buffer) {
- XFREE(responses[i].buffer, ssl->heap,
- DYNAMIC_TYPE_OCSP_REQUEST);
- }
- }
- }
-
- break;
- }
- #endif /* HAVE_CERTIFICATE_STATUS_REQUEST_V2 */
- #endif /* NO_WOLFSSL_SERVER */
-
- default:
- break;
- }
-
- WOLFSSL_LEAVE("SendCertificateStatus", ret);
- WOLFSSL_END(WC_FUNC_CERTIFICATE_STATUS_SEND);
-
- return ret;
-}
-
-#endif /* !NO_CERTS */
-
-#endif /* WOLFSSL_NO_TLS12 */
-
-
-
-#if defined(HAVE_SECURE_RENEGOTIATION) && defined(WOLFSSL_DTLS)
-/**
- * Check if the SCR keys are set in ssl->secure_renegotiation->tmp_keys.
- */
-int DtlsSCRKeysSet(WOLFSSL* ssl)
-{
- return ssl->secure_renegotiation &&
- ssl->secure_renegotiation->tmp_keys.dtls_epoch != 0;
-}
-
-/**
- * ssl->keys contains the current cipher parameters only for epoch 1. For
- * epochs >1 ssl->secure_renegotiation->tmp_keys contains the current
- * cipher parameters. This function checks if the message currently being
- * processed should use ssl->keys or ssl->secure_renegotiation->tmp_keys.
- */
-int IsDtlsMsgSCRKeys(WOLFSSL* ssl)
-{
- return DtlsSCRKeysSet(ssl) &&
- ssl->keys.curEpoch ==
- ssl->secure_renegotiation->tmp_keys.dtls_epoch;
-}
-
-/**
- * ssl->keys contains the current cipher parameters only for epoch 1. For
- * epochs >1 ssl->secure_renegotiation->tmp_keys contains the current
- * cipher parameters. This function checks if the message currently being
- * built should use ssl->keys or ssl->secure_renegotiation->tmp_keys.
- */
-int DtlsUseSCRKeys(WOLFSSL* ssl)
-{
- return DtlsSCRKeysSet(ssl) &&
- ssl->secure_renegotiation->tmp_keys.dtls_epoch ==
- ssl->keys.dtls_epoch;
-}
-
-/**
- * If ssl->secure_renegotiation->tmp_keys.dtls_epoch > ssl->keys.dtls_epoch
- * then PREV_ORDER refers to the current epoch.
- * */
-int DtlsCheckOrder(WOLFSSL* ssl, int order)
-{
- if (order == PREV_ORDER && ssl->secure_renegotiation &&
- ssl->secure_renegotiation->tmp_keys.dtls_epoch > ssl->keys.dtls_epoch) {
- return CUR_ORDER;
- }
- else {
- return order;
- }
-}
-#endif /* HAVE_SECURE_RENEGOTIATION && WOLFSSL_DTLS */
-
-/* If secure renegotiation is disabled, this will always return false.
- * Otherwise it checks to see if we are currently renegotiating. */
-static WC_INLINE int IsSCR(WOLFSSL* ssl)
-{
-#ifndef HAVE_SECURE_RENEGOTIATION
- (void)ssl;
-#else /* HAVE_SECURE_RENEGOTIATION */
- if (ssl->secure_renegotiation &&
- ssl->secure_renegotiation->enabled &&
- ssl->options.handShakeState != HANDSHAKE_DONE)
- return 1;
-#endif /* HAVE_SECURE_RENEGOTIATION */
- return 0;
-}
-
-
-int SendData(WOLFSSL* ssl, const void* data, int sz)
-{
- int sent = 0, /* plainText size */
- sendSz,
- ret,
- dtlsExtra = 0;
- int groupMsgs = 0;
-
- if (ssl->error == WANT_WRITE
- #ifdef WOLFSSL_ASYNC_CRYPT
- || ssl->error == WC_PENDING_E
- #endif
- ) {
- ssl->error = 0;
- }
-
- /* don't allow write after decrypt or mac error */
- if (ssl->error == VERIFY_MAC_ERROR || ssl->error == DECRYPT_ERROR) {
- /* For DTLS allow these possible errors and allow the session
- to continue despite them */
- if (ssl->options.dtls) {
- ssl->error = 0;
- }
- else {
- WOLFSSL_MSG("Not allowing write after decrypt or mac error");
- return WOLFSSL_FATAL_ERROR;
- }
- }
-
-#ifdef WOLFSSL_EARLY_DATA
- if (ssl->earlyData != no_early_data) {
- if (ssl->options.handShakeState == HANDSHAKE_DONE) {
- WOLFSSL_MSG("handshake complete, trying to send early data");
- return BUILD_MSG_ERROR;
- }
- #ifdef WOLFSSL_EARLY_DATA_GROUP
- groupMsgs = 1;
- #endif
- }
- else
-#endif
- if (ssl->options.handShakeState != HANDSHAKE_DONE && !IsSCR(ssl)) {
- int err;
- WOLFSSL_MSG("handshake not complete, trying to finish");
- if ( (err = wolfSSL_negotiate(ssl)) != WOLFSSL_SUCCESS) {
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* if async would block return WANT_WRITE */
- if (ssl->error == WC_PENDING_E) {
- return WOLFSSL_CBIO_ERR_WANT_WRITE;
- }
- #endif
- return err;
- }
- }
-
- /* last time system socket output buffer was full, try again to send */
- if (!groupMsgs && ssl->buffers.outputBuffer.length > 0) {
- WOLFSSL_MSG("output buffer was full, trying to send again");
- if ( (ssl->error = SendBuffered(ssl)) < 0) {
- WOLFSSL_ERROR(ssl->error);
- if (ssl->error == SOCKET_ERROR_E && (ssl->options.connReset ||
- ssl->options.isClosed)) {
- ssl->error = SOCKET_PEER_CLOSED_E;
- WOLFSSL_ERROR(ssl->error);
- return 0; /* peer reset or closed */
- }
- return ssl->error;
- }
- else {
- /* advance sent to previous sent + plain size just sent */
- sent = ssl->buffers.prevSent + ssl->buffers.plainSz;
- WOLFSSL_MSG("sent write buffered data");
-
- if (sent > sz) {
- WOLFSSL_MSG("error: write() after WANT_WRITE with short size");
- return ssl->error = BAD_FUNC_ARG;
- }
- }
- }
-
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- dtlsExtra = DTLS_RECORD_EXTRA;
- }
-#endif
-
- for (;;) {
- int len;
- byte* out;
- byte* sendBuffer = (byte*)data + sent; /* may switch on comp */
- int buffSz; /* may switch on comp */
- int outputSz;
-#ifdef HAVE_LIBZ
- byte comp[MAX_RECORD_SIZE + MAX_COMP_EXTRA];
-#endif
-
- if (sent == sz) break;
-
- len = wolfSSL_GetMaxRecordSize(ssl, sz - sent);
-
-#if defined(WOLFSSL_DTLS) && !defined(WOLFSSL_NO_DTLS_SIZE_CHECK)
- if (ssl->options.dtls && (len < sz - sent)) {
- ssl->error = DTLS_SIZE_ERROR;
- WOLFSSL_ERROR(ssl->error);
- return ssl->error;
- }
-#endif
- buffSz = len;
-
- /* check for available size */
- outputSz = len + COMP_EXTRA + dtlsExtra + MAX_MSG_EXTRA;
- if ((ret = CheckAvailableSize(ssl, outputSz)) != 0)
- return ssl->error = ret;
-
- /* get output buffer */
- out = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
-#ifdef HAVE_LIBZ
- if (ssl->options.usingCompression) {
- buffSz = myCompress(ssl, sendBuffer, buffSz, comp, sizeof(comp));
- if (buffSz < 0) {
- return buffSz;
- }
- sendBuffer = comp;
- }
-#endif
- if (!ssl->options.tls1_3) {
- sendSz = BuildMessage(ssl, out, outputSz, sendBuffer, buffSz,
- application_data, 0, 0, 1, CUR_ORDER);
- }
- else {
-#ifdef WOLFSSL_TLS13
- sendSz = BuildTls13Message(ssl, out, outputSz, sendBuffer, buffSz,
- application_data, 0, 0, 1);
-#else
- sendSz = BUFFER_ERROR;
-#endif
- }
- if (sendSz < 0) {
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (sendSz == WC_PENDING_E)
- ssl->error = sendSz;
- #endif
- return BUILD_MSG_ERROR;
- }
-
- ssl->buffers.outputBuffer.length += sendSz;
-
- if ( (ssl->error = SendBuffered(ssl)) < 0) {
- WOLFSSL_ERROR(ssl->error);
- /* store for next call if WANT_WRITE or user embedSend() that
- doesn't present like WANT_WRITE */
- ssl->buffers.plainSz = len;
- ssl->buffers.prevSent = sent;
- if (ssl->error == SOCKET_ERROR_E && (ssl->options.connReset ||
- ssl->options.isClosed)) {
- ssl->error = SOCKET_PEER_CLOSED_E;
- WOLFSSL_ERROR(ssl->error);
- return 0; /* peer reset or closed */
- }
- return ssl->error;
- }
-
- sent += len;
-
- /* only one message per attempt */
- if (ssl->options.partialWrite == 1) {
- WOLFSSL_MSG("Partial Write on, only sending one record");
- break;
- }
- }
-
- return sent;
-}
-
-/* process input data */
-int ReceiveData(WOLFSSL* ssl, byte* output, int sz, int peek)
-{
- int size;
-
- WOLFSSL_ENTER("ReceiveData()");
-
- /* reset error state */
- if (ssl->error == WANT_READ) {
- ssl->error = 0;
- }
-
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- /* In DTLS mode, we forgive some errors and allow the session
- * to continue despite them. */
- if (ssl->error == VERIFY_MAC_ERROR || ssl->error == DECRYPT_ERROR)
- ssl->error = 0;
- }
-#endif /* WOLFSSL_DTLS */
-
- if (ssl->error != 0 && ssl->error != WANT_WRITE
-#ifdef WOLFSSL_ASYNC_CRYPT
- && ssl->error != WC_PENDING_E
-#endif
- ) {
- WOLFSSL_MSG("User calling wolfSSL_read in error state, not allowed");
- return ssl->error;
- }
-
-#ifdef WOLFSSL_EARLY_DATA
- if (ssl->earlyData != no_early_data) {
- }
- else
-#endif
- if (ssl->options.handShakeState != HANDSHAKE_DONE) {
- int err;
- WOLFSSL_MSG("Handshake not complete, trying to finish");
- if ( (err = wolfSSL_negotiate(ssl)) != WOLFSSL_SUCCESS) {
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* if async would block return WANT_WRITE */
- if (ssl->error == WC_PENDING_E) {
- return WOLFSSL_CBIO_ERR_WANT_READ;
- }
- #endif
- return err;
- }
- }
-
-#ifdef HAVE_SECURE_RENEGOTIATION
-startScr:
- if (ssl->secure_renegotiation && ssl->secure_renegotiation->startScr) {
- int err;
- WOLFSSL_MSG("Need to start scr, server requested");
- if ( (err = wolfSSL_Rehandshake(ssl)) != WOLFSSL_SUCCESS)
- return err;
- ssl->secure_renegotiation->startScr = 0; /* only start once */
- }
-#endif
-
- while (ssl->buffers.clearOutputBuffer.length == 0) {
- if ( (ssl->error = ProcessReply(ssl)) < 0) {
- WOLFSSL_ERROR(ssl->error);
- if (ssl->error == ZERO_RETURN) {
- WOLFSSL_MSG("Zero return, no more data coming");
- return 0; /* no more data coming */
- }
- 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 */
- }
- }
- return ssl->error;
- }
- #ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation &&
- ssl->secure_renegotiation->startScr) {
- goto startScr;
- }
- #endif
- }
-
- if (sz < (int)ssl->buffers.clearOutputBuffer.length)
- size = sz;
- else
- size = ssl->buffers.clearOutputBuffer.length;
-
- XMEMCPY(output, ssl->buffers.clearOutputBuffer.buffer, size);
-
- if (peek == 0) {
- ssl->buffers.clearOutputBuffer.length -= size;
- ssl->buffers.clearOutputBuffer.buffer += size;
- }
-
- if (ssl->buffers.clearOutputBuffer.length == 0 &&
- ssl->buffers.inputBuffer.dynamicFlag)
- ShrinkInputBuffer(ssl, NO_FORCED_FREE);
-
- WOLFSSL_LEAVE("ReceiveData()", size);
- return size;
-}
-
-
-/* send alert message */
-int SendAlert(WOLFSSL* ssl, int severity, int type)
-{
- byte input[ALERT_SIZE];
- byte *output;
- int sendSz;
- int ret;
- int outputSz;
- int dtlsExtra = 0;
-
- WOLFSSL_ENTER("SendAlert");
-
-#ifdef HAVE_WRITE_DUP
- if (ssl->dupWrite && ssl->dupSide == READ_DUP_SIDE) {
- int notifyErr = 0;
-
- WOLFSSL_MSG("Read dup side cannot write alerts, notifying sibling");
-
- if (type == close_notify) {
- notifyErr = ZERO_RETURN;
- } else if (severity == alert_fatal) {
- notifyErr = FATAL_ERROR;
- }
-
- if (notifyErr != 0) {
- return NotifyWriteSide(ssl, notifyErr);
- }
-
- return 0;
- }
-#endif
-
- /* if sendalert is called again for nonblocking */
- if (ssl->options.sendAlertState != 0) {
- ret = SendBuffered(ssl);
- if (ret == 0)
- ssl->options.sendAlertState = 0;
- return ret;
- }
-
- #ifdef OPENSSL_EXTRA
- if (ssl->CBIS != NULL) {
- ssl->CBIS(ssl, SSL_CB_ALERT, type);
- }
- #endif
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls)
- dtlsExtra = DTLS_RECORD_EXTRA;
- #endif
-
- /* check for available size */
- outputSz = ALERT_SIZE + MAX_MSG_EXTRA + dtlsExtra;
- if ((ret = CheckAvailableSize(ssl, outputSz)) != 0)
- return ret;
-
- /* Check output buffer */
- if (ssl->buffers.outputBuffer.buffer == NULL)
- return BUFFER_E;
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- input[0] = (byte)severity;
- input[1] = (byte)type;
- ssl->alert_history.last_tx.code = type;
- ssl->alert_history.last_tx.level = severity;
- if (severity == alert_fatal) {
- ssl->options.isClosed = 1; /* Don't send close_notify */
- }
-
- /* send encrypted alert if encryption is on - can be a rehandshake over
- * an existing encrypted channel.
- * TLS 1.3 encrypts handshake packets after the ServerHello
- */
- if (IsEncryptionOn(ssl, 1)) {
- sendSz = BuildMessage(ssl, output, outputSz, input, ALERT_SIZE, alert,
- 0, 0, 0, CUR_ORDER);
- }
- else {
-
- AddRecordHeader(output, ALERT_SIZE, alert, ssl, CUR_ORDER);
- output += RECORD_HEADER_SZ;
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls)
- output += DTLS_RECORD_EXTRA;
- #endif
- XMEMCPY(output, input, ALERT_SIZE);
-
- sendSz = RECORD_HEADER_SZ + ALERT_SIZE;
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls)
- sendSz += DTLS_RECORD_EXTRA;
- #endif
- }
- if (sendSz < 0)
- return BUILD_MSG_ERROR;
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "Alert");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "Alert", alert, output, sendSz, WRITE_PROTO,
- ssl->heap);
- #endif
-
- ssl->buffers.outputBuffer.length += sendSz;
- ssl->options.sendAlertState = 1;
-
- ret = SendBuffered(ssl);
-
- WOLFSSL_LEAVE("SendAlert", ret);
-
- return ret;
-}
-
-const char* wolfSSL_ERR_reason_error_string(unsigned long e)
-{
-#ifdef NO_ERROR_STRINGS
-
- (void)e;
- return "no support for error strings built in";
-
-#else
-
- int error = (int)e;
-
- /* pass to wolfCrypt */
- if (error < MAX_CODE_E && error > MIN_CODE_E) {
- return wc_GetErrorString(error);
- }
-
- switch (error) {
-
-#ifdef WOLFSSL_WPAS
- case 0 :
- return "ok";
-#endif
-
- case UNSUPPORTED_SUITE :
- return "unsupported cipher suite";
-
- case INPUT_CASE_ERROR :
- return "input state error";
-
- case PREFIX_ERROR :
- return "bad index to key rounds";
-
- case MEMORY_ERROR :
- return "out of memory";
-
- case VERIFY_FINISHED_ERROR :
- return "verify problem on finished";
-
- case VERIFY_MAC_ERROR :
- return "verify mac problem";
-
- case PARSE_ERROR :
- return "parse error on header";
-
- case SIDE_ERROR :
- return "wrong client/server type";
-
- case NO_PEER_CERT :
- return "peer didn't send cert";
-
- case UNKNOWN_HANDSHAKE_TYPE :
- return "weird handshake type";
-
- case SOCKET_ERROR_E :
- return "error state on socket";
-
- case SOCKET_NODATA :
- return "expected data, not there";
-
- case INCOMPLETE_DATA :
- return "don't have enough data to complete task";
-
- case UNKNOWN_RECORD_TYPE :
- return "unknown type in record hdr";
-
- case DECRYPT_ERROR :
- return "error during decryption";
-
- case FATAL_ERROR :
- return "received alert fatal error";
-
- case ENCRYPT_ERROR :
- return "error during encryption";
-
- case FREAD_ERROR :
- return "fread problem";
-
- case NO_PEER_KEY :
- return "need peer's key";
-
- case NO_PRIVATE_KEY :
- return "need the private key";
-
- case NO_DH_PARAMS :
- return "server missing DH params";
-
- case RSA_PRIVATE_ERROR :
- return "error during rsa priv op";
-
- case MATCH_SUITE_ERROR :
- return "can't match cipher suite";
-
- case COMPRESSION_ERROR :
- return "compression mismatch error";
-
- case BUILD_MSG_ERROR :
- return "build message failure";
-
- case BAD_HELLO :
- return "client hello malformed";
-
- case DOMAIN_NAME_MISMATCH :
- return "peer subject name mismatch";
-
- case IPADDR_MISMATCH :
- return "peer ip address mismatch";
-
- case WANT_READ :
- case WOLFSSL_ERROR_WANT_READ :
- return "non-blocking socket wants data to be read";
-
- case NOT_READY_ERROR :
- return "handshake layer not ready yet, complete first";
-
- case VERSION_ERROR :
- return "record layer version error";
-
- case WANT_WRITE :
- case WOLFSSL_ERROR_WANT_WRITE :
- return "non-blocking socket write buffer full";
-
- case BUFFER_ERROR :
- return "malformed buffer input error";
-
- case VERIFY_CERT_ERROR :
- return "verify problem on certificate";
-
- case VERIFY_SIGN_ERROR :
- return "verify problem based on signature";
-
- case CLIENT_ID_ERROR :
- return "psk client identity error";
-
- case SERVER_HINT_ERROR:
- return "psk server hint error";
-
- case PSK_KEY_ERROR:
- return "psk key callback error";
-
- case NTRU_KEY_ERROR:
- return "NTRU key error";
-
- case NTRU_DRBG_ERROR:
- return "NTRU drbg error";
-
- case NTRU_ENCRYPT_ERROR:
- return "NTRU encrypt error";
-
- case NTRU_DECRYPT_ERROR:
- return "NTRU decrypt error";
-
- case GETTIME_ERROR:
- return "gettimeofday() error";
-
- case GETITIMER_ERROR:
- return "getitimer() error";
-
- case SIGACT_ERROR:
- return "sigaction() error";
-
- case SETITIMER_ERROR:
- return "setitimer() error";
-
- case LENGTH_ERROR:
- return "record layer length error";
-
- case PEER_KEY_ERROR:
- return "cant decode peer key";
-
- case ZERO_RETURN:
- case WOLFSSL_ERROR_ZERO_RETURN:
- return "peer sent close notify alert";
-
- case ECC_CURVETYPE_ERROR:
- return "Bad ECC Curve Type or unsupported";
-
- case ECC_CURVE_ERROR:
- return "Bad ECC Curve or unsupported";
-
- case ECC_PEERKEY_ERROR:
- return "Bad ECC Peer Key";
-
- case ECC_MAKEKEY_ERROR:
- return "ECC Make Key failure";
-
- case ECC_EXPORT_ERROR:
- return "ECC Export Key failure";
-
- case ECC_SHARED_ERROR:
- return "ECC DHE shared failure";
-
- case NOT_CA_ERROR:
- return "Not a CA by basic constraint error";
-
- case HTTP_TIMEOUT:
- return "HTTP timeout for OCSP or CRL req";
-
- case BAD_CERT_MANAGER_ERROR:
- return "Bad Cert Manager error";
-
- case OCSP_CERT_REVOKED:
- return "OCSP Cert revoked";
-
- case CRL_CERT_REVOKED:
- return "CRL Cert revoked";
-
- case CRL_MISSING:
- return "CRL missing, not loaded";
-
- case MONITOR_SETUP_E:
- return "CRL monitor setup error";
-
- case THREAD_CREATE_E:
- return "Thread creation problem";
-
- case OCSP_NEED_URL:
- return "OCSP need URL";
-
- case OCSP_CERT_UNKNOWN:
- return "OCSP Cert unknown";
-
- case OCSP_LOOKUP_FAIL:
- return "OCSP Responder lookup fail";
-
- case MAX_CHAIN_ERROR:
- return "Maximum Chain Depth Exceeded";
-
- case COOKIE_ERROR:
- return "DTLS Cookie Error";
-
- case SEQUENCE_ERROR:
- return "DTLS Sequence Error";
-
- case SUITES_ERROR:
- return "Suites Pointer Error";
-
- case OUT_OF_ORDER_E:
- return "Out of order message, fatal";
-
- case BAD_KEA_TYPE_E:
- return "Bad KEA type found";
-
- case SANITY_CIPHER_E:
- return "Sanity check on ciphertext failed";
-
- case RECV_OVERFLOW_E:
- return "Receive callback returned more than requested";
-
- case GEN_COOKIE_E:
- return "Generate Cookie Error";
-
- case NO_PEER_VERIFY:
- return "Need peer certificate verify Error";
-
- case FWRITE_ERROR:
- return "fwrite Error";
-
- case CACHE_MATCH_ERROR:
- return "Cache restore header match Error";
-
- case UNKNOWN_SNI_HOST_NAME_E:
- return "Unrecognized host name Error";
-
- case UNKNOWN_MAX_FRAG_LEN_E:
- return "Unrecognized max frag len Error";
-
- case KEYUSE_SIGNATURE_E:
- return "Key Use digitalSignature not set Error";
-
- case KEYUSE_ENCIPHER_E:
- return "Key Use keyEncipherment not set Error";
-
- case EXTKEYUSE_AUTH_E:
- return "Ext Key Use server/client auth not set Error";
-
- case SEND_OOB_READ_E:
- return "Send Callback Out of Bounds Read Error";
-
- case SECURE_RENEGOTIATION_E:
- return "Invalid Renegotiation Error";
-
- case SESSION_TICKET_LEN_E:
- return "Session Ticket Too Long Error";
-
- case SESSION_TICKET_EXPECT_E:
- return "Session Ticket Error";
-
- case SESSION_SECRET_CB_E:
- return "Session Secret Callback Error";
-
- case NO_CHANGE_CIPHER_E:
- return "Finished received from peer before Change Cipher Error";
-
- case SANITY_MSG_E:
- return "Sanity Check on message order Error";
-
- 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";
-
- case BAD_TICKET_KEY_CB_SZ:
- return "Bad user session ticket key callback Size Error";
-
- case BAD_TICKET_MSG_SZ:
- return "Bad session ticket message Size Error";
-
- case BAD_TICKET_ENCRYPT:
- return "Bad user ticket callback encrypt Error";
-
- case DH_KEY_SIZE_E:
- return "DH key too small Error";
-
- case SNI_ABSENT_ERROR:
- return "No Server Name Indication extension Error";
-
- case RSA_SIGN_FAULT:
- return "RSA Signature Fault Error";
-
- case HANDSHAKE_SIZE_ERROR:
- return "Handshake message too large Error";
-
- case UNKNOWN_ALPN_PROTOCOL_NAME_E:
- return "Unrecognized protocol name Error";
-
- case BAD_CERTIFICATE_STATUS_ERROR:
- return "Bad Certificate Status Message Error";
-
- case OCSP_INVALID_STATUS:
- return "Invalid OCSP Status Error";
-
- case OCSP_WANT_READ:
- return "OCSP nonblock wants read";
-
- case RSA_KEY_SIZE_E:
- return "RSA key too small";
-
- case ECC_KEY_SIZE_E:
- return "ECC key too small";
-
- case DTLS_EXPORT_VER_E:
- return "Version needs updated after code change or version mismatch";
-
- case INPUT_SIZE_E:
- return "Input size too large Error";
-
- case CTX_INIT_MUTEX_E:
- return "Initialize ctx mutex error";
-
- case EXT_MASTER_SECRET_NEEDED_E:
- return "Extended Master Secret must be enabled to resume EMS session";
-
- case DTLS_POOL_SZ_E:
- return "Maximum DTLS pool size exceeded";
-
- case DECODE_E:
- return "Decode handshake message error";
-
- case WRITE_DUP_READ_E:
- return "Write dup write side can't read error";
-
- case WRITE_DUP_WRITE_E:
- return "Write dup read side can't write error";
-
- case INVALID_CERT_CTX_E:
- return "Certificate context does not match request or not empty";
-
- case BAD_KEY_SHARE_DATA:
- return "The Key Share data contains group that wasn't in Client Hello";
-
- case MISSING_HANDSHAKE_DATA:
- return "The handshake message is missing required data";
-
- case BAD_BINDER:
- return "Binder value does not match value server calculated";
-
- case EXT_NOT_ALLOWED:
- return "Extension type not allowed in handshake message type";
-
- case INVALID_PARAMETER:
- return "The security parameter is invalid";
-
- case UNSUPPORTED_EXTENSION:
- return "TLS Extension not requested by the client";
-
- case PRF_MISSING:
- return "Pseudo-random function is not enabled";
-
- case KEY_SHARE_ERROR:
- return "Key share extension did not contain a valid named group";
-
- case POST_HAND_AUTH_ERROR:
- return "Client will not do post handshake authentication";
-
- case HRR_COOKIE_ERROR:
- return "Cookie does not match one sent in HelloRetryRequest";
-
- case MCAST_HIGHWATER_CB_E:
- return "Multicast highwater callback returned error";
-
- case ALERT_COUNT_E:
- return "Alert Count exceeded error";
-
- case EXT_MISSING:
- return "Required TLS extension missing";
-
- case DTLS_RETX_OVER_TX:
- return "DTLS interrupting flight transmit with retransmit";
-
- case DH_PARAMS_NOT_FFDHE_E:
- return "Server DH parameters were not from the FFDHE set as required";
-
- case TCA_INVALID_ID_TYPE:
- return "TLS Extension Trusted CA ID type invalid";
-
- case TCA_ABSENT_ERROR:
- return "TLS Extension Trusted CA ID response absent";
-
- case TSIP_MAC_DIGSZ_E:
- return "TSIP MAC size invalid, must be sized for SHA-1 or SHA-256";
-
- case CLIENT_CERT_CB_ERROR:
- return "Error importing client cert or key from callback";
-
- case SSL_SHUTDOWN_ALREADY_DONE_E:
- return "Shutdown has already occurred";
-
- case TLS13_SECRET_CB_E:
- return "TLS1.3 Secret Callback Error";
-
- case DTLS_SIZE_ERROR:
- return "DTLS trying to send too much in single datagram error";
-
- case NO_CERT_ERROR:
- return "TLS1.3 No Certificate Set Error";
-
- default :
- return "unknown error number";
- }
-
-#endif /* NO_ERROR_STRINGS */
-}
-
-void SetErrorString(int error, char* str)
-{
- XSTRNCPY(str, wolfSSL_ERR_reason_error_string(error), WOLFSSL_MAX_ERROR_SZ);
- str[WOLFSSL_MAX_ERROR_SZ-1] = 0;
-}
-
-#ifndef NO_ERROR_STRINGS
- #if defined(OPENSSL_ALL) || defined(WOLFSSL_QT)
- #define SUITE_INFO(x,y,z,w,v,u) {(x),(y),(z),(w),(v),(u)}
- #else
- #define SUITE_INFO(x,y,z,w,v,u) {(x),(y),(z),(w)}
- #endif
-#else
- #if defined(OPENSSL_ALL) || defined(WOLFSSL_QT)
- #define SUITE_INFO(x,y,z,w,v,u) {(x),(z),(w),(v),(u)}
- #else
- #define SUITE_INFO(x,y,z,w,v,u) {(x),(z),(w)}
- #endif
-#endif
-
-static const CipherSuiteInfo cipher_names[] =
-{
-
-#ifdef BUILD_TLS_AES_128_GCM_SHA256
- SUITE_INFO("TLS13-AES128-GCM-SHA256","TLS_AES_128_GCM_SHA256",TLS13_BYTE,TLS_AES_128_GCM_SHA256, TLSv1_3_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_AES_256_GCM_SHA384
- SUITE_INFO("TLS13-AES256-GCM-SHA384","TLS_AES_256_GCM_SHA384",TLS13_BYTE,TLS_AES_256_GCM_SHA384, TLSv1_3_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_CHACHA20_POLY1305_SHA256
- SUITE_INFO("TLS13-CHACHA20-POLY1305-SHA256","TLS_CHACHA20_POLY1305_SHA256",TLS13_BYTE,TLS_CHACHA20_POLY1305_SHA256, TLSv1_3_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_AES_128_CCM_SHA256
- SUITE_INFO("TLS13-AES128-CCM-SHA256","TLS_AES_128_CCM_SHA256",TLS13_BYTE,TLS_AES_128_CCM_SHA256, TLSv1_3_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_AES_128_CCM_8_SHA256
- SUITE_INFO("TLS13-AES128-CCM-8-SHA256","TLS_AES_128_CCM_8_SHA256",TLS13_BYTE,TLS_AES_128_CCM_8_SHA256,TLSv1_3_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_SHA256_SHA256
- SUITE_INFO("TLS13-SHA256-SHA256","TLS_SHA256_SHA256",ECC_BYTE,TLS_SHA256_SHA256,TLSv1_3_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_SHA384_SHA384
- SUITE_INFO("TLS13-SHA384-SHA384","TLS_SHA384_SHA384",ECC_BYTE,TLS_SHA384_SHA384,TLSv1_3_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifndef WOLFSSL_NO_TLS12
-
-#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA
- SUITE_INFO("RC4-SHA","SSL_RSA_WITH_RC4_128_SHA",CIPHER_BYTE,SSL_RSA_WITH_RC4_128_SHA,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5
- SUITE_INFO("RC4-MD5","SSL_RSA_WITH_RC4_128_MD5",CIPHER_BYTE,SSL_RSA_WITH_RC4_128_MD5,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA
- SUITE_INFO("DES-CBC3-SHA","SSL_RSA_WITH_3DES_EDE_CBC_SHA",CIPHER_BYTE,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA
- SUITE_INFO("AES128-SHA","TLS_RSA_WITH_AES_128_CBC_SHA",CIPHER_BYTE,TLS_RSA_WITH_AES_128_CBC_SHA,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA
- SUITE_INFO("AES256-SHA","TLS_RSA_WITH_AES_256_CBC_SHA",CIPHER_BYTE,TLS_RSA_WITH_AES_256_CBC_SHA,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_NULL_MD5
- SUITE_INFO("NULL-MD5","TLS_RSA_WITH_NULL_MD5",CIPHER_BYTE,TLS_RSA_WITH_NULL_MD5,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_NULL_SHA
- SUITE_INFO("NULL-SHA","TLS_RSA_WITH_NULL_SHA",CIPHER_BYTE,TLS_RSA_WITH_NULL_SHA,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256
- SUITE_INFO("NULL-SHA256","TLS_RSA_WITH_NULL_SHA256",CIPHER_BYTE,TLS_RSA_WITH_NULL_SHA256,TLSv1_2_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
- SUITE_INFO("DHE-RSA-AES128-SHA","TLS_DHE_RSA_WITH_AES_128_CBC_SHA",CIPHER_BYTE,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
- SUITE_INFO("DHE-RSA-AES256-SHA","TLS_DHE_RSA_WITH_AES_256_CBC_SHA",CIPHER_BYTE,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
- SUITE_INFO("DHE-PSK-AES256-GCM-SHA384","TLS_DHE_PSK_WITH_AES_256_GCM_SHA384",CIPHER_BYTE,TLS_DHE_PSK_WITH_AES_256_GCM_SHA384,TLSv1_2_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
- SUITE_INFO("DHE-PSK-AES128-GCM-SHA256","TLS_DHE_PSK_WITH_AES_128_GCM_SHA256",CIPHER_BYTE,TLS_DHE_PSK_WITH_AES_128_GCM_SHA256,TLSv1_2_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_GCM_SHA384
- SUITE_INFO("PSK-AES256-GCM-SHA384","TLS_PSK_WITH_AES_256_GCM_SHA384",CIPHER_BYTE,TLS_PSK_WITH_AES_256_GCM_SHA384,TLSv1_2_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_GCM_SHA256
- SUITE_INFO("PSK-AES128-GCM-SHA256","TLS_PSK_WITH_AES_128_GCM_SHA256",CIPHER_BYTE,TLS_PSK_WITH_AES_128_GCM_SHA256,TLSv1_2_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
- SUITE_INFO("DHE-PSK-AES256-CBC-SHA384","TLS_DHE_PSK_WITH_AES_256_CBC_SHA384",CIPHER_BYTE,TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
- SUITE_INFO("DHE-PSK-AES128-CBC-SHA256","TLS_DHE_PSK_WITH_AES_128_CBC_SHA256",CIPHER_BYTE,TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA384
- SUITE_INFO("PSK-AES256-CBC-SHA384","TLS_PSK_WITH_AES_256_CBC_SHA384",CIPHER_BYTE,TLS_PSK_WITH_AES_256_CBC_SHA384,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256
- SUITE_INFO("PSK-AES128-CBC-SHA256","TLS_PSK_WITH_AES_128_CBC_SHA256",CIPHER_BYTE,TLS_PSK_WITH_AES_128_CBC_SHA256,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA
- SUITE_INFO("PSK-AES128-CBC-SHA","TLS_PSK_WITH_AES_128_CBC_SHA",CIPHER_BYTE,TLS_PSK_WITH_AES_128_CBC_SHA,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA
- SUITE_INFO("PSK-AES256-CBC-SHA","TLS_PSK_WITH_AES_256_CBC_SHA",CIPHER_BYTE,TLS_PSK_WITH_AES_256_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_128_CCM
- SUITE_INFO("DHE-PSK-AES128-CCM","TLS_DHE_PSK_WITH_AES_128_CCM",ECC_BYTE,TLS_DHE_PSK_WITH_AES_128_CCM,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_256_CCM
- SUITE_INFO("DHE-PSK-AES256-CCM","TLS_DHE_PSK_WITH_AES_256_CCM",ECC_BYTE,TLS_DHE_PSK_WITH_AES_256_CCM,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM
- SUITE_INFO("PSK-AES128-CCM","TLS_PSK_WITH_AES_128_CCM",ECC_BYTE,TLS_PSK_WITH_AES_128_CCM,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM
- SUITE_INFO("PSK-AES256-CCM","TLS_PSK_WITH_AES_256_CCM",ECC_BYTE,TLS_PSK_WITH_AES_256_CCM,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8
- SUITE_INFO("PSK-AES128-CCM-8","TLS_PSK_WITH_AES_128_CCM_8",ECC_BYTE,TLS_PSK_WITH_AES_128_CCM_8,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8
- SUITE_INFO("PSK-AES256-CCM-8","TLS_PSK_WITH_AES_256_CCM_8",ECC_BYTE,TLS_PSK_WITH_AES_256_CCM_8,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_NULL_SHA384
- SUITE_INFO("DHE-PSK-NULL-SHA384","TLS_DHE_PSK_WITH_NULL_SHA384",CIPHER_BYTE,TLS_DHE_PSK_WITH_NULL_SHA384,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_NULL_SHA256
- SUITE_INFO("DHE-PSK-NULL-SHA256","TLS_DHE_PSK_WITH_NULL_SHA256",CIPHER_BYTE,TLS_DHE_PSK_WITH_NULL_SHA256,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_NULL_SHA384
- SUITE_INFO("PSK-NULL-SHA384","TLS_PSK_WITH_NULL_SHA384",CIPHER_BYTE,TLS_PSK_WITH_NULL_SHA384,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256
- SUITE_INFO("PSK-NULL-SHA256","TLS_PSK_WITH_NULL_SHA256",CIPHER_BYTE,TLS_PSK_WITH_NULL_SHA256,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_NULL_SHA
- SUITE_INFO("PSK-NULL-SHA","TLS_PSK_WITH_NULL_SHA",CIPHER_BYTE,TLS_PSK_WITH_NULL_SHA,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5
- SUITE_INFO("HC128-MD5","TLS_RSA_WITH_HC_128_MD5",CIPHER_BYTE,TLS_RSA_WITH_HC_128_MD5,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA
- SUITE_INFO("HC128-SHA","TLS_RSA_WITH_HC_128_SHA",CIPHER_BYTE,TLS_RSA_WITH_HC_128_SHA,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA
- SUITE_INFO("RABBIT-SHA","TLS_RSA_WITH_RABBIT_SHA",CIPHER_BYTE,TLS_RSA_WITH_RABBIT_SHA,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA
- SUITE_INFO("NTRU-RC4-SHA","TLS_NTRU_RSA_WITH_RC4_128_SHA",CIPHER_BYTE,TLS_NTRU_RSA_WITH_RC4_128_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA
- SUITE_INFO("NTRU-DES-CBC3-SHA","TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA",CIPHER_BYTE,TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA
- SUITE_INFO("NTRU-AES128-SHA","TLS_NTRU_RSA_WITH_AES_128_CBC_SHA",CIPHER_BYTE,TLS_NTRU_RSA_WITH_AES_128_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA
- SUITE_INFO("NTRU-AES256-SHA","TLS_NTRU_RSA_WITH_AES_256_CBC_SHA",CIPHER_BYTE,TLS_NTRU_RSA_WITH_AES_256_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8
- SUITE_INFO("AES128-CCM-8","TLS_RSA_WITH_AES_128_CCM_8",ECC_BYTE,TLS_RSA_WITH_AES_128_CCM_8, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8
- SUITE_INFO("AES256-CCM-8","TLS_RSA_WITH_AES_256_CCM_8",ECC_BYTE,TLS_RSA_WITH_AES_256_CCM_8, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM
- SUITE_INFO("ECDHE-ECDSA-AES128-CCM","TLS_ECDHE_ECDSA_WITH_AES_128_CCM",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_AES_128_CCM, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
- SUITE_INFO("ECDHE-ECDSA-AES128-CCM-8","TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8
- SUITE_INFO("ECDHE-ECDSA-AES256-CCM-8","TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
- SUITE_INFO("ECDHE-RSA-AES128-SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",ECC_BYTE,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
- SUITE_INFO("ECDHE-RSA-AES256-SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",ECC_BYTE,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
- SUITE_INFO("ECDHE-ECDSA-AES128-SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
- SUITE_INFO("ECDHE-ECDSA-AES256-SHA","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA
- SUITE_INFO("ECDHE-RSA-RC4-SHA","TLS_ECDHE_RSA_WITH_RC4_128_SHA",ECC_BYTE,TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
- SUITE_INFO("ECDHE-RSA-DES-CBC3-SHA","TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",ECC_BYTE,TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
- SUITE_INFO("ECDHE-ECDSA-RC4-SHA","TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
- SUITE_INFO("ECDHE-ECDSA-DES-CBC3-SHA","TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256
- SUITE_INFO("AES128-SHA256","TLS_RSA_WITH_AES_128_CBC_SHA256",CIPHER_BYTE,TLS_RSA_WITH_AES_128_CBC_SHA256, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256
- SUITE_INFO("AES256-SHA256","TLS_RSA_WITH_AES_256_CBC_SHA256",CIPHER_BYTE,TLS_RSA_WITH_AES_256_CBC_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
- SUITE_INFO("DHE-RSA-AES128-SHA256","TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",CIPHER_BYTE,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
- SUITE_INFO("DHE-RSA-AES256-SHA256","TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",CIPHER_BYTE,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
- SUITE_INFO("ECDH-RSA-AES128-SHA","TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",ECC_BYTE,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
- SUITE_INFO("ECDH-RSA-AES256-SHA","TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",ECC_BYTE,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
- SUITE_INFO("ECDH-ECDSA-AES128-SHA","TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",ECC_BYTE,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
- SUITE_INFO("ECDH-ECDSA-AES256-SHA","TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",ECC_BYTE,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA
- SUITE_INFO("ECDH-RSA-RC4-SHA","TLS_ECDH_RSA_WITH_RC4_128_SHA",ECC_BYTE,TLS_ECDH_RSA_WITH_RC4_128_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
- SUITE_INFO("ECDH-RSA-DES-CBC3-SHA","TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",ECC_BYTE,TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
- SUITE_INFO("ECDH-ECDSA-RC4-SHA","TLS_ECDH_ECDSA_WITH_RC4_128_SHA",ECC_BYTE,TLS_ECDH_ECDSA_WITH_RC4_128_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
- SUITE_INFO("ECDH-ECDSA-DES-CBC3-SHA","TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",ECC_BYTE,TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256
- SUITE_INFO("AES128-GCM-SHA256","TLS_RSA_WITH_AES_128_GCM_SHA256",CIPHER_BYTE,TLS_RSA_WITH_AES_128_GCM_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384
- SUITE_INFO("AES256-GCM-SHA384","TLS_RSA_WITH_AES_256_GCM_SHA384",CIPHER_BYTE,TLS_RSA_WITH_AES_256_GCM_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
- SUITE_INFO("DHE-RSA-AES128-GCM-SHA256","TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",CIPHER_BYTE,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
- SUITE_INFO("DHE-RSA-AES256-GCM-SHA384","TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",CIPHER_BYTE,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- SUITE_INFO("ECDHE-RSA-AES128-GCM-SHA256","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",ECC_BYTE,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- SUITE_INFO("ECDHE-RSA-AES256-GCM-SHA384","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",ECC_BYTE,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- SUITE_INFO("ECDHE-ECDSA-AES128-GCM-SHA256","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- SUITE_INFO("ECDHE-ECDSA-AES256-GCM-SHA384","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
- SUITE_INFO("ECDH-RSA-AES128-GCM-SHA256","TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",ECC_BYTE,TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
- SUITE_INFO("ECDH-RSA-AES256-GCM-SHA384","TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",ECC_BYTE,TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
- SUITE_INFO("ECDH-ECDSA-AES128-GCM-SHA256","TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",ECC_BYTE,TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
- SUITE_INFO("ECDH-ECDSA-AES256-GCM-SHA384","TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",ECC_BYTE,TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
- SUITE_INFO("CAMELLIA128-SHA","TLS_RSA_WITH_CAMELLIA_128_CBC_SHA",CIPHER_BYTE,TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
- SUITE_INFO("DHE-RSA-CAMELLIA128-SHA","TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA",CIPHER_BYTE,TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
- SUITE_INFO("CAMELLIA256-SHA","TLS_RSA_WITH_CAMELLIA_256_CBC_SHA",CIPHER_BYTE,TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
- SUITE_INFO("DHE-RSA-CAMELLIA256-SHA","TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA",CIPHER_BYTE,TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
- SUITE_INFO("CAMELLIA128-SHA256","TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256",CIPHER_BYTE,TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
- SUITE_INFO("DHE-RSA-CAMELLIA128-SHA256","TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256",CIPHER_BYTE,TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
- SUITE_INFO("CAMELLIA256-SHA256","TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256",CIPHER_BYTE,TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
- SUITE_INFO("DHE-RSA-CAMELLIA256-SHA256","TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256",CIPHER_BYTE,TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
- SUITE_INFO("ECDHE-RSA-AES128-SHA256","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",ECC_BYTE,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
- SUITE_INFO("ECDHE-ECDSA-AES128-SHA256","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
- SUITE_INFO("ECDH-RSA-AES128-SHA256","TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",ECC_BYTE,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
- SUITE_INFO("ECDH-ECDSA-AES128-SHA256","TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",ECC_BYTE,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
- SUITE_INFO("ECDHE-RSA-AES256-SHA384","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",ECC_BYTE,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
- SUITE_INFO("ECDHE-ECDSA-AES256-SHA384","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
- SUITE_INFO("ECDH-RSA-AES256-SHA384","TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384",ECC_BYTE,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
- SUITE_INFO("ECDH-ECDSA-AES256-SHA384","TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384",ECC_BYTE,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
- SUITE_INFO("ECDHE-RSA-CHACHA20-POLY1305","TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",CHACHA_BYTE,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
- SUITE_INFO("ECDHE-ECDSA-CHACHA20-POLY1305","TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",CHACHA_BYTE,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256
- SUITE_INFO("DHE-RSA-CHACHA20-POLY1305","TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256",CHACHA_BYTE,TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256
- SUITE_INFO("ECDHE-RSA-CHACHA20-POLY1305-OLD","TLS_ECDHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256",CHACHA_BYTE,TLS_ECDHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_CHACHA20_OLD_POLY1305_SHA256
- SUITE_INFO("ECDHE-ECDSA-CHACHA20-POLY1305-OLD","TLS_ECDHE_ECDSA_WITH_CHACHA20_OLD_POLY1305_SHA256",CHACHA_BYTE,TLS_ECDHE_ECDSA_WITH_CHACHA20_OLD_POLY1305_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256
- SUITE_INFO("DHE-RSA-CHACHA20-POLY1305-OLD","TLS_DHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256",CHACHA_BYTE,TLS_DHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DH_anon_WITH_AES_128_CBC_SHA
- SUITE_INFO("ADH-AES128-SHA","TLS_DH_anon_WITH_AES_128_CBC_SHA",CIPHER_BYTE,TLS_DH_anon_WITH_AES_128_CBC_SHA, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DH_anon_WITH_AES_256_GCM_SHA384
- SUITE_INFO("ADH-AES256-GCM-SHA384","TLS_DH_anon_WITH_AES_256_GCM_SHA384",CIPHER_BYTE,TLS_DH_anon_WITH_AES_256_GCM_SHA384, TLSv1_2_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_QSH
- SUITE_INFO("QSH","TLS_QSH",QSH_BYTE,TLS_QSH, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef HAVE_RENEGOTIATION_INDICATION
- SUITE_INFO("RENEGOTIATION-INFO","TLS_EMPTY_RENEGOTIATION_INFO_SCSV",CIPHER_BYTE,TLS_EMPTY_RENEGOTIATION_INFO_SCSV,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_SSL_RSA_WITH_IDEA_CBC_SHA
- SUITE_INFO("IDEA-CBC-SHA","SSL_RSA_WITH_IDEA_CBC_SHA",CIPHER_BYTE,SSL_RSA_WITH_IDEA_CBC_SHA,SSLv3_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_NULL_SHA
- SUITE_INFO("ECDHE-ECDSA-NULL-SHA","TLS_ECDHE_ECDSA_WITH_NULL_SHA",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_NULL_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_PSK_WITH_NULL_SHA256
- SUITE_INFO("ECDHE-PSK-NULL-SHA256","TLS_ECDHE_PSK_WITH_NULL_SHA256",ECC_BYTE,TLS_ECDHE_PSK_WITH_NULL_SHA256,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
- SUITE_INFO("ECDHE-PSK-AES128-CBC-SHA256","TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256",ECC_BYTE,TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,TLSv1_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256
- SUITE_INFO("PSK-CHACHA20-POLY1305","TLS_PSK_WITH_CHACHA20_POLY1305_SHA256",CHACHA_BYTE,TLS_PSK_WITH_CHACHA20_POLY1305_SHA256,TLSv1_2_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256
- SUITE_INFO("ECDHE-PSK-CHACHA20-POLY1305","TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",CHACHA_BYTE,TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,TLSv1_2_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256
- SUITE_INFO("DHE-PSK-CHACHA20-POLY1305","TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256",CHACHA_BYTE,TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256,TLSv1_2_MINOR,SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
- SUITE_INFO("EDH-RSA-DES-CBC3-SHA","TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA",CIPHER_BYTE,TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, TLSv1_MINOR, SSLv3_MAJOR),
-#endif
-
-#ifdef BUILD_WDM_WITH_NULL_SHA256
- SUITE_INFO("WDM-NULL-SHA256","WDM_WITH_NULL_SHA256",CIPHER_BYTE,WDM_WITH_NULL_SHA256, TLSv1_3_MINOR, SSLv3_MAJOR)
-#endif
-
-#endif /* WOLFSSL_NO_TLS12 */
-};
-
-
-/* returns the cipher_names array */
-const CipherSuiteInfo* GetCipherNames(void)
-{
- return cipher_names;
-}
-
-
-/* returns the number of elements in the cipher_names array */
-int GetCipherNamesSize(void)
-{
- return (int)(sizeof(cipher_names) / sizeof(CipherSuiteInfo));
-}
-
-
-const char* GetCipherNameInternal(const byte cipherSuite0, const byte cipherSuite)
-{
- int i;
- const char* nameInternal = "None";
-
- for (i = 0; i < GetCipherNamesSize(); i++) {
- if ((cipher_names[i].cipherSuite0 == cipherSuite0) &&
- (cipher_names[i].cipherSuite == cipherSuite)) {
- nameInternal = cipher_names[i].name;
- break;
- }
- }
- return nameInternal;
-}
-
-#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
-const char* GetCipherKeaStr(char n[][MAX_SEGMENT_SZ]) {
- const char* keaStr = NULL;
- const char *n0,*n1,*n2,*n3,*n4;
- n0 = n[0];
- n1 = n[1];
- n2 = n[2];
- n3 = n[3];
- n4 = n[4];
-
- if (XSTRNCMP(n0,"ECDHE",5) == 0 && XSTRNCMP(n1,"PSK",3) == 0)
- keaStr = "ECDHEPSK";
- else if (XSTRNCMP(n0,"ECDH",4) == 0)
- keaStr = "ECDH";
- else if (XSTRNCMP(n0,"DHE",3) == 0 && XSTRNCMP(n1,"PSK",3) == 0)
- keaStr = "DHEPSK";
- else if (XSTRNCMP(n0,"DHE",3) == 0)
- keaStr = "DH";
- else if (XSTRNCMP(n0,"RSA",3) == 0 && XSTRNCMP(n1,"PSK",3) == 0)
- keaStr = "RSAPSK";
- else if (XSTRNCMP(n0,"SRP",3) == 0)
- keaStr = "SRP";
- else if (XSTRNCMP(n0,"PSK",3) == 0)
- keaStr = "PSK";
- else if (XSTRNCMP(n0,"EDH",3) == 0)
- keaStr = "EDH";
- else if ((XSTRNCMP(n1,"SHA",3) == 0) || (XSTRNCMP(n2,"SHA",3) == 0) ||
- (XSTRNCMP(n3,"SHA",3) == 0) || (XSTRNCMP(n4,"SHA",3) == 0) ||
- (XSTRNCMP(n2,"RSA",3) == 0) || (XSTRNCMP(n0,"AES128",6) == 0) ||
- (XSTRNCMP(n0,"AES256",6) == 0) || (XSTRNCMP(n1,"MD5",3) == 0))
- keaStr = "RSA";
- else
- keaStr = "unknown";
-
- return keaStr;
-}
-
-const char* GetCipherAuthStr(char n[][MAX_SEGMENT_SZ]) {
-
- const char* authStr = NULL;
- const char *n0,*n1,*n2;
- n0 = n[0];
- n1 = n[1];
- n2 = n[2];
-
- if ((XSTRNCMP(n0,"AES128",6) == 0) || (XSTRNCMP(n0,"AES256",6) == 0) ||
- ((XSTRNCMP(n0,"TLS13",5) == 0) && ((XSTRNCMP(n1,"AES128",6) == 0) ||
- (XSTRNCMP(n1,"AES256",6) == 0) || (XSTRNCMP(n1,"CHACHA20",8) == 0))) ||
- (XSTRNCMP(n0,"RSA",3) == 0) || (XSTRNCMP(n1,"RSA",3) == 0) ||
- (XSTRNCMP(n1,"SHA",3) == 0) || (XSTRNCMP(n2,"SHA",3) == 0) ||
- (XSTRNCMP(n1,"MD5",3) == 0))
- authStr = "RSA";
- else if (XSTRNCMP(n0,"PSK",3) == 0 || XSTRNCMP(n1,"PSK",3) == 0)
- authStr = "PSK";
- else if (XSTRNCMP(n0,"SRP",3) == 0 && XSTRNCMP(n1,"AES",3) == 0)
- authStr = "SRP";
- else if (XSTRNCMP(n1,"ECDSA",5) == 0)
- authStr = "ECDSA";
- else if (XSTRNCMP(n0,"ADH",3) == 0)
- authStr = "None";
- else
- authStr = "unknown";
-
- return authStr;
-}
-
-const char* GetCipherEncStr(char n[][MAX_SEGMENT_SZ]) {
- const char* encStr = NULL;
- const char *n0,*n1,*n2,*n3;
- n0 = n[0];
- n1 = n[1];
- n2 = n[2];
- n3 = n[3];
-
- if ((XSTRNCMP(n0,"AES256",6) == 0 && XSTRNCMP(n1,"GCM",3) == 0) ||
- (XSTRNCMP(n1,"AES256",6) == 0 && XSTRNCMP(n2,"GCM",3) == 0) ||
- (XSTRNCMP(n2,"AES256",6) == 0 && XSTRNCMP(n3,"GCM",3) == 0))
- encStr = "AESGCM(256)";
-
- else if ((XSTRNCMP(n0,"AES128",6) == 0 && XSTRNCMP(n1,"GCM",3) == 0) ||
- (XSTRNCMP(n1,"AES128",6) == 0 && XSTRNCMP(n2,"GCM",3) == 0) ||
- (XSTRNCMP(n2,"AES128",6) == 0 && XSTRNCMP(n3,"GCM",3) == 0))
- encStr = "AESGCM(128)";
-
- else if ((XSTRNCMP(n0,"AES128",6) == 0 && XSTRNCMP(n1,"CCM",3) == 0) ||
- (XSTRNCMP(n1,"AES128",6) == 0 && XSTRNCMP(n2,"CCM",3) == 0) ||
- (XSTRNCMP(n2,"AES128",6) == 0 && XSTRNCMP(n3,"CCM",3) == 0))
- encStr = "AESCCM(128)";
-
- else if ((XSTRNCMP(n0,"AES128",6) == 0) ||
- (XSTRNCMP(n1,"AES128",6) == 0) ||
- (XSTRNCMP(n2,"AES128",6) == 0) ||
- (XSTRNCMP(n1,"AES",3) == 0 && XSTRNCMP(n2,"128",3) == 0) ||
- (XSTRNCMP(n2,"AES",3) == 0 && XSTRNCMP(n3,"128",3) == 0))
- encStr = "AES(128)";
-
- else if ((XSTRNCMP(n0,"AES256",6) == 0) ||
- (XSTRNCMP(n1,"AES256",6) == 0) ||
- (XSTRNCMP(n2,"AES256",6) == 0) ||
- (XSTRNCMP(n1,"AES",3) == 0 && XSTRNCMP(n2,"256",3) == 0) ||
- (XSTRNCMP(n2,"AES",3) == 0 && XSTRNCMP(n3,"256",3) == 0))
- encStr = "AES(256)";
-
- else if ((XSTRNCMP(n0,"CAMELLIA256",11) == 0) ||
- (XSTRNCMP(n2,"CAMELLIA256",11) == 0))
- encStr = "CAMELLIA(256)";
- else if ((XSTRNCMP(n0,"CAMELLIA128",11) == 0) ||
- (XSTRNCMP(n2,"CAMELLIA128",11) == 0))
- encStr = "CAMELLIA(128)";
- else if ((XSTRNCMP(n0,"RC4",3) == 0) || (XSTRNCMP(n2,"RC4",3) == 0))
- encStr = "RC4";
- else if (((XSTRNCMP(n0,"DES",3) == 0) || (XSTRNCMP(n2,"DES",3) == 0)) &&
- ((XSTRNCMP(n1,"CBC3",4) == 0) || (XSTRNCMP(n3,"CBC3",4) == 0)))
- encStr = "3DES";
- else if ((XSTRNCMP(n1,"CHACHA20",8) == 0 && XSTRNCMP(n2,"POLY1305",8) == 0) ||
- (XSTRNCMP(n2,"CHACHA20",8) == 0 && XSTRNCMP(n3,"POLY1305",8) == 0))
- encStr = "CHACHA20/POLY1305(256)";
- else if ((XSTRNCMP(n0,"NULL",4) == 0) || (XSTRNCMP(n1,"NULL",4) == 0) ||
- (XSTRNCMP(n2,"NULL",4) == 0) ||
- ((XSTRNCMP(n0,"TLS13",5) == 0) && (XSTRNCMP(n3,"",0) == 0)))
- encStr = "None";
- else if ((XSTRNCMP(n0,"IDEA",4) == 0))
- encStr = "IDEA";
- else if ((XSTRNCMP(n0,"RABBIT",4) == 0))
- encStr = "RABBIT";
- else if ((XSTRNCMP(n0,"HC128",5) == 0))
- encStr = "HC128";
- else
- encStr = "unknown";
-
- return encStr;
-}
-
-/* Returns the MAC string of a cipher or "unknown" on failure */
-const char* GetCipherMacStr(char n[][MAX_SEGMENT_SZ]) {
-
- const char* macStr = NULL;
- const char *n1,*n2,*n3,*n4;
- n1 = n[1];
- n2 = n[2];
- n3 = n[3];
- n4 = n[4];
-
- if ((XSTRNCMP(n4,"SHA256",6) == 0) || (XSTRNCMP(n3,"SHA256",6) == 0) ||
- (XSTRNCMP(n2,"SHA256",6) == 0) || (XSTRNCMP(n1,"SHA256",6) == 0))
- macStr = "SHA256";
- else if ((XSTRNCMP(n4,"SHA384",6) == 0) ||
- (XSTRNCMP(n3,"SHA384",6) == 0) ||
- (XSTRNCMP(n2,"SHA384",6) == 0) ||
- (XSTRNCMP(n1,"SHA384",6) == 0))
- macStr = "SHA384";
- else if ((XSTRNCMP(n4,"SHA",3) == 0) || (XSTRNCMP(n3,"SHA",3) == 0) ||
- (XSTRNCMP(n2,"SHA",3) == 0) || (XSTRNCMP(n1,"SHA",3) == 0) ||
- (XSTRNCMP(n1,"MD5",3) == 0))
- macStr = "SHA1";
- else if ((XSTRNCMP(n3,"GCM",3) == 0) ||
- (XSTRNCMP(n1,"CCM",3) == 0) ||
- (XSTRNCMP(n2,"CCM",3) == 0) || (XSTRNCMP(n3,"CCM",3) == 0) ||
- (XSTRNCMP(n1,"CHACHA20",8) == 0 && XSTRNCMP(n2,"POLY1305",8) == 0) ||
- (XSTRNCMP(n2,"CHACHA20",8) == 0 && XSTRNCMP(n3,"POLY1305",8) == 0))
- macStr = "AEAD";
- else
- macStr = "unknown";
-
- return macStr;
-}
-
-/* Returns the number of bits based on the cipher enc string, or 0 on failure */
-int SetCipherBits(const char* enc) {
- int ret = WOLFSSL_FAILURE;
-
- if ((XSTRNCMP(enc,"AESGCM(256)",11) == 0) ||
- (XSTRNCMP(enc,"AES(256)",8) == 0) ||
- (XSTRNCMP(enc,"CAMELLIA(256)",13) == 0) ||
- (XSTRNCMP(enc,"CHACHA20/POLY1305(256)",22) == 0))
- ret = 256;
- else if
- ((XSTRNCMP(enc,"3DES",4) == 0))
- ret = 168;
- else if
- ((XSTRNCMP(enc,"AESGCM(128)",11) == 0) ||
- (XSTRNCMP(enc,"AES(128)",8) == 0) ||
- (XSTRNCMP(enc,"CAMELLIA(128)",13) == 0) ||
- (XSTRNCMP(enc,"IDEA",4) == 0) ||
- (XSTRNCMP(enc,"RC4",3) == 0))
- ret = 128;
- else if
- ((XSTRNCMP(enc,"DES",3) == 0))
- ret = 56;
-
- return ret;
-}
-#endif /* WOLFSSL_QT || OPENSSL_ALL */
-
-const char* GetCipherNameIana(const byte cipherSuite0, const byte cipherSuite)
-{
-#ifndef NO_ERROR_STRINGS
- int i;
- const char* nameIana = "NONE";
-
- for (i = 0; i < GetCipherNamesSize(); i++) {
- if ((cipher_names[i].cipherSuite0 == cipherSuite0) &&
- (cipher_names[i].cipherSuite == cipherSuite)) {
- nameIana = cipher_names[i].name_iana;
- break;
- }
- }
- return nameIana;
-#else
- (void)cipherSuite0;
- (void)cipherSuite;
- return NULL;
-#endif
-}
-
-const char* wolfSSL_get_cipher_name_internal(WOLFSSL* ssl)
-{
- if (ssl == NULL) {
- return NULL;
- }
-
- return GetCipherNameInternal(ssl->options.cipherSuite0, ssl->options.cipherSuite);
-}
-
-const char* wolfSSL_get_cipher_name_iana(WOLFSSL* ssl)
-{
- if (ssl == NULL) {
- return NULL;
- }
-
- return GetCipherNameIana(ssl->options.cipherSuite0, ssl->options.cipherSuite);
-}
-
-int GetCipherSuiteFromName(const char* name, byte* cipherSuite0,
- byte* cipherSuite)
-{
- int ret = BAD_FUNC_ARG;
- int i;
- unsigned long len;
- const char* nameDelim;
-
- /* Support trailing : */
- nameDelim = XSTRSTR(name, ":");
- if (nameDelim)
- len = (unsigned long)(nameDelim - name);
- else
- len = (unsigned long)XSTRLEN(name);
-
- for (i = 0; i < GetCipherNamesSize(); i++) {
- if (XSTRNCMP(name, cipher_names[i].name, len) == 0) {
- *cipherSuite0 = cipher_names[i].cipherSuite0;
- *cipherSuite = cipher_names[i].cipherSuite;
- ret = 0;
- break;
- }
- }
-
- return ret;
-}
-
-/**
-Set the enabled cipher suites.
-
-@param [out] suites Suites structure.
-@param [in] list List of cipher suites, only supports full name from
- cipher_names[] delimited by ':'.
-
-@return true on success, else false.
-*/
-int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
-{
- int ret = 0;
- int idx = 0;
- int haveRSAsig = 0;
- int haveECDSAsig = 0;
- int haveAnon = 0;
- const int suiteSz = GetCipherNamesSize();
- char* next = (char*)list;
-
- if (suites == NULL || list == NULL) {
- WOLFSSL_MSG("SetCipherList parameter error");
- return 0;
- }
-
- if (next[0] == 0 || XSTRNCMP(next, "ALL", 3) == 0 ||
- XSTRNCMP(next, "DEFAULT", 7) == 0)
- return 1; /* wolfSSL default */
-
- do {
- char* current = next;
- char name[MAX_SUITE_NAME + 1];
- int i;
- word32 length;
-
- next = XSTRSTR(next, ":");
- length = min(sizeof(name), !next ? (word32)XSTRLEN(current) /* last */
- : (word32)(next - current));
-
- XSTRNCPY(name, current, length);
- name[(length == sizeof(name)) ? length - 1 : length] = 0;
-
- for (i = 0; i < suiteSz; i++) {
- if (XSTRNCMP(name, cipher_names[i].name, sizeof(name)) == 0
- #ifndef NO_ERROR_STRINGS
- || XSTRNCMP(name, cipher_names[i].name_iana, sizeof(name)) == 0
- #endif
- ) {
- #ifdef WOLFSSL_DTLS
- /* don't allow stream ciphers with DTLS */
- if (ctx->method->version.major == DTLS_MAJOR) {
- if (XSTRSTR(name, "RC4") ||
- XSTRSTR(name, "HC128") ||
- XSTRSTR(name, "RABBIT"))
- {
- WOLFSSL_MSG("Stream ciphers not supported with DTLS");
- continue;
- }
-
- }
- #endif /* WOLFSSL_DTLS */
-
- if (idx + 1 >= WOLFSSL_MAX_SUITE_SZ) {
- WOLFSSL_MSG("WOLFSSL_MAX_SUITE_SZ set too low");
- return 0; /* suites buffer not large enough, error out */
- }
-
- suites->suites[idx++] = cipher_names[i].cipherSuite0;
- suites->suites[idx++] = cipher_names[i].cipherSuite;
- /* The suites are either ECDSA, RSA, PSK, or Anon. The RSA
- * suites don't necessarily have RSA in the name. */
- #ifdef WOLFSSL_TLS13
- if (cipher_names[i].cipherSuite0 == TLS13_BYTE ||
- (cipher_names[i].cipherSuite0 == ECC_BYTE &&
- (cipher_names[i].cipherSuite == TLS_SHA256_SHA256 ||
- cipher_names[i].cipherSuite == TLS_SHA384_SHA384))) {
- #ifndef NO_RSA
- haveRSAsig = 1;
- #endif
- #if defined(HAVE_ECC) || defined(HAVE_ED25519) || \
- defined(HAVE_ED448)
- haveECDSAsig = 1;
- #endif
- }
- else
- #endif
- #if defined(HAVE_ECC) || defined(HAVE_ED25519) || \
- defined(HAVE_ED448)
- if ((haveECDSAsig == 0) && XSTRSTR(name, "ECDSA"))
- haveECDSAsig = 1;
- else
- #endif
- #ifdef HAVE_ANON
- if (XSTRSTR(name, "ADH"))
- haveAnon = 1;
- else
- #endif
- if (haveRSAsig == 0
- #ifndef NO_PSK
- && (XSTRSTR(name, "PSK") == NULL)
- #endif
- ) {
- haveRSAsig = 1;
- }
-
- ret = 1; /* found at least one */
- break;
- }
- }
- }
- while (next++); /* ++ needed to skip ':' */
-
- if (ret) {
- int keySz = 0;
- #ifndef NO_CERTS
- keySz = ctx->privateKeySz;
- #endif
- suites->setSuites = 1;
- suites->suiteSz = (word16)idx;
- InitSuitesHashSigAlgo(suites, haveECDSAsig, haveRSAsig, haveAnon, 1,
- keySz);
- }
-
- (void)ctx;
-
- return ret;
-}
-
-
-#if !defined(NO_WOLFSSL_SERVER) || !defined(NO_CERTS)
-int PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo, word32 hashSigAlgoSz)
-{
- word32 i;
- int ret = MATCH_SUITE_ERROR;
-
- ssl->suites->sigAlgo = ssl->specs.sig_algo;
-
- /* set defaults */
- if (IsAtLeastTLSv1_3(ssl->version)) {
- ssl->suites->hashAlgo = sha256_mac;
- #ifndef NO_CERTS
- ssl->suites->sigAlgo = ssl->buffers.keyType;
- #endif
- }
-#ifndef WOLFSSL_NO_TLS12
- else if (IsAtLeastTLSv1_2(ssl)) {
- #ifdef WOLFSSL_ALLOW_TLS_SHA1
- ssl->suites->hashAlgo = sha_mac;
- #else
- ssl->suites->hashAlgo = sha256_mac;
- #endif
- }
- else {
- ssl->suites->hashAlgo = sha_mac;
- }
-#endif
-
- if (hashSigAlgoSz == 0)
- return 0;
-
- /* i+1 since peek a byte ahead for type */
- for (i = 0; (i+1) < hashSigAlgoSz; i += HELLO_EXT_SIGALGO_SZ) {
- byte hashAlgo = 0, sigAlgo = 0;
-
- DecodeSigAlg(&hashSigAlgo[i], &hashAlgo, &sigAlgo);
- #ifdef HAVE_ED25519
- if (ssl->pkCurveOID == ECC_ED25519_OID) {
- if (sigAlgo != ed25519_sa_algo)
- continue;
- if (sigAlgo == ed25519_sa_algo &&
- ssl->suites->sigAlgo == ecc_dsa_sa_algo) {
- ssl->suites->sigAlgo = sigAlgo;
- ssl->suites->hashAlgo = sha512_mac;
- ret = 0;
- break;
- }
- }
- #endif
- #ifdef HAVE_ED448
- if (ssl->pkCurveOID == ECC_ED448_OID) {
- if (sigAlgo != ed448_sa_algo)
- continue;
-
- if (sigAlgo == ed448_sa_algo &&
- ssl->suites->sigAlgo == ecc_dsa_sa_algo) {
- ssl->suites->sigAlgo = sigAlgo;
- ssl->suites->hashAlgo = sha512_mac;
- ret = 0;
- break;
- }
- }
- #endif
- #if defined(WOLFSSL_TLS13) && defined(HAVE_ECC)
- if (IsAtLeastTLSv1_3(ssl->version) && sigAlgo == ssl->suites->sigAlgo &&
- sigAlgo == ecc_dsa_sa_algo) {
-
- int digestSz = GetMacDigestSize(hashAlgo);
- if (digestSz <= 0)
- continue;
-
- /* TLS 1.3 signature algorithms for ECDSA match hash length with
- * key size.
- */
- if (digestSz != ssl->buffers.keySz)
- continue;
-
- ssl->suites->hashAlgo = hashAlgo;
- ssl->suites->sigAlgo = sigAlgo;
- ret = 0;
- break; /* done selected sig/hash algorithms */
- }
- else
- #endif
- /* For ECDSA the `USE_ECDSA_KEYSZ_HASH_ALGO` build option will choose a hash
- * algorithm that matches the ephemeral ECDHE key size or the next highest
- * available. This workaround resolves issue with some peer's that do not
- * properly support scenarios such as a P-256 key hashed with SHA512.
- */
- #if defined(HAVE_ECC) && defined(USE_ECDSA_KEYSZ_HASH_ALGO)
- if (sigAlgo == ssl->suites->sigAlgo && sigAlgo == ecc_dsa_sa_algo) {
- int digestSz = GetMacDigestSize(hashAlgo);
- if (digestSz <= 0)
- continue;
-
- /* For ecc_dsa_sa_algo, pick hash algo that is curve size unless
- algorithm in not compiled in, then choose next highest */
- if (digestSz == ssl->eccTempKeySz) {
- ssl->suites->hashAlgo = hashAlgo;
- ssl->suites->sigAlgo = sigAlgo;
- #if defined(WOLFSSL_TLS13) || defined(HAVE_FFDHE)
- ssl->namedGroup = 0;
- #endif
- ret = 0;
- break; /* done selected sig/hash algorithms */
- }
- /* not strong enough, so keep checking hashSigAlso list */
- if (digestSz < ssl->eccTempKeySz)
- continue;
-
- /* mark as highest and check remainder of hashSigAlgo list */
- ssl->suites->hashAlgo = hashAlgo;
- ssl->suites->sigAlgo = sigAlgo;
- ret = 0;
- }
- else
- #endif
- #ifdef WC_RSA_PSS
- if (IsAtLeastTLSv1_3(ssl->version) &&
- ssl->suites->sigAlgo == rsa_sa_algo &&
- sigAlgo != rsa_pss_sa_algo) {
- continue;
- }
- else if (sigAlgo == ssl->suites->sigAlgo ||
- (sigAlgo == rsa_pss_sa_algo &&
- (ssl->suites->sigAlgo == rsa_sa_algo)))
- #else
- if (sigAlgo == ssl->suites->sigAlgo)
- #endif
- {
- /* pick highest available between both server and client */
- switch (hashAlgo) {
- case sha_mac:
- #ifdef WOLFSSL_SHA224
- case sha224_mac:
- #endif
- #ifndef NO_SHA256
- case sha256_mac:
- #endif
- #ifdef WOLFSSL_SHA384
- case sha384_mac:
- #endif
- #ifdef WOLFSSL_SHA512
- case sha512_mac:
- #endif
- /* not strong enough, so keep checking hashSigAlso list */
- if (hashAlgo < ssl->suites->hashAlgo) {
- ret = 0;
- continue;
- }
- /* mark as highest and check remainder of hashSigAlgo list */
- ssl->suites->hashAlgo = hashAlgo;
- ssl->suites->sigAlgo = sigAlgo;
- break;
- default:
- continue;
- }
- ret = 0;
- break;
- }
-#if defined(WOLFSSL_TLS13)
- else if (ssl->specs.sig_algo == 0 && IsAtLeastTLSv1_3(ssl->version)) {
- }
-#endif
- else if (ssl->specs.sig_algo == 0)
- {
- ssl->suites->hashAlgo = ssl->specs.mac_algorithm;
- ret = 0;
- }
- }
-
- return ret;
-}
-#endif /* !defined(NO_WOLFSSL_SERVER) || !defined(NO_CERTS) */
-
-#if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
-
- /* Initialize HandShakeInfo */
- void InitHandShakeInfo(HandShakeInfo* info, WOLFSSL* ssl)
- {
- int i;
-
- info->ssl = ssl;
- info->cipherName[0] = 0;
- for (i = 0; i < MAX_PACKETS_HANDSHAKE; i++)
- info->packetNames[i][0] = 0;
- info->numberPackets = 0;
- info->negotiationError = 0;
- }
-
- /* Set Final HandShakeInfo parameters */
- void FinishHandShakeInfo(HandShakeInfo* info)
- {
- int i;
- int sz = GetCipherNamesSize();
-
- for (i = 0; i < sz; i++)
- if (info->ssl->options.cipherSuite ==
- (byte)cipher_names[i].cipherSuite) {
- if (info->ssl->options.cipherSuite0 == ECC_BYTE)
- continue; /* ECC suites at end */
- XSTRNCPY(info->cipherName, cipher_names[i].name, MAX_CIPHERNAME_SZ);
- info->cipherName[MAX_CIPHERNAME_SZ] = '\0';
- break;
- }
-
- /* error max and min are negative numbers */
- if (info->ssl->error <= MIN_PARAM_ERR && info->ssl->error >= MAX_PARAM_ERR)
- info->negotiationError = info->ssl->error;
- }
-
-
- /* Add name to info packet names, increase packet name count */
- void AddPacketName(WOLFSSL* ssl, const char* name)
- {
- #ifdef WOLFSSL_CALLBACKS
- HandShakeInfo* info = &ssl->handShakeInfo;
- if (info->numberPackets < MAX_PACKETS_HANDSHAKE) {
- char* packetName = info->packetNames[info->numberPackets];
- XSTRNCPY(packetName, name, MAX_PACKETNAME_SZ);
- packetName[MAX_PACKETNAME_SZ] = '\0';
- info->numberPackets++;
- }
- #endif
- (void)ssl;
- (void)name;
- }
-
-
- #ifdef WOLFSSL_CALLBACKS
- /* Initialize TimeoutInfo */
- void InitTimeoutInfo(TimeoutInfo* info)
- {
- int i;
-
- info->timeoutName[0] = 0;
- info->flags = 0;
-
- for (i = 0; i < MAX_PACKETS_HANDSHAKE; i++) {
- info->packets[i].packetName[0] = 0;
- info->packets[i].timestamp.tv_sec = 0;
- info->packets[i].timestamp.tv_usec = 0;
- info->packets[i].bufferValue = 0;
- info->packets[i].valueSz = 0;
- }
- info->numberPackets = 0;
- info->timeoutValue.tv_sec = 0;
- info->timeoutValue.tv_usec = 0;
- }
-
-
- /* Free TimeoutInfo */
- void FreeTimeoutInfo(TimeoutInfo* info, void* heap)
- {
- int i;
- (void)heap;
- for (i = 0; i < MAX_PACKETS_HANDSHAKE; i++)
- if (info->packets[i].bufferValue) {
- XFREE(info->packets[i].bufferValue, heap, DYNAMIC_TYPE_INFO);
- info->packets[i].bufferValue = 0;
- }
-
- }
-
- /* Add packet name to previously added packet info */
- void AddLateName(const char* name, TimeoutInfo* info)
- {
- /* make sure we have a valid previous one */
- if (info->numberPackets > 0 && info->numberPackets <
- MAX_PACKETS_HANDSHAKE) {
- char* packetName = info->packets[info->numberPackets-1].packetName;
- XSTRNCPY(packetName, name, MAX_PACKETNAME_SZ);
- packetName[MAX_PACKETNAME_SZ] = '\0';
- }
- }
-
- /* Add record header to previously added packet info */
- void AddLateRecordHeader(const RecordLayerHeader* rl, TimeoutInfo* info)
- {
- /* make sure we have a valid previous one */
- if (info->numberPackets > 0 && info->numberPackets <
- MAX_PACKETS_HANDSHAKE) {
- if (info->packets[info->numberPackets - 1].bufferValue)
- XMEMCPY(info->packets[info->numberPackets - 1].bufferValue, rl,
- RECORD_HEADER_SZ);
- else
- XMEMCPY(info->packets[info->numberPackets - 1].value, rl,
- RECORD_HEADER_SZ);
- }
- }
-
- #endif /* WOLFSSL_CALLBACKS */
-
-
- /* Add PacketInfo to TimeoutInfo
- *
- * ssl WOLFSSL structure sending or receiving packet
- * name name of packet being sent
- * type type of packet being sent
- * data data bing sent with packet
- * sz size of data buffer
- * written 1 if this packet is being written to wire, 0 if being read
- * heap custom heap to use for mallocs/frees
- */
- void AddPacketInfo(WOLFSSL* ssl, const char* name, int type,
- const byte* data, int sz, int written, void* heap)
- {
- #ifdef WOLFSSL_CALLBACKS
- TimeoutInfo* info = &ssl->timeoutInfo;
-
- if (info->numberPackets < (MAX_PACKETS_HANDSHAKE - 1)) {
- WOLFSSL_TIMEVAL currTime;
-
- /* may add name after */
- if (name) {
- char* packetName = info->packets[info->numberPackets].packetName;
- XSTRNCPY(packetName, name, MAX_PACKETNAME_SZ);
- packetName[MAX_PACKETNAME_SZ] = '\0';
- }
-
- /* add data, put in buffer if bigger than static buffer */
- info->packets[info->numberPackets].valueSz = sz;
- if (sz < MAX_VALUE_SZ)
- XMEMCPY(info->packets[info->numberPackets].value, data, sz);
- else {
- info->packets[info->numberPackets].bufferValue =
- (byte*)XMALLOC(sz, heap, DYNAMIC_TYPE_INFO);
- if (!info->packets[info->numberPackets].bufferValue)
- /* let next alloc catch, just don't fill, not fatal here */
- info->packets[info->numberPackets].valueSz = 0;
- else
- XMEMCPY(info->packets[info->numberPackets].bufferValue,
- data, sz);
- }
- gettimeofday(&currTime, 0);
- info->packets[info->numberPackets].timestamp.tv_sec =
- currTime.tv_sec;
- info->packets[info->numberPackets].timestamp.tv_usec =
- currTime.tv_usec;
- info->numberPackets++;
- }
- #endif /* WOLFSSL_CALLBACKS */
- #ifdef OPENSSL_EXTRA
- if (ssl->protoMsgCb != NULL && sz > RECORD_HEADER_SZ) {
- /* version from hex to dec 16 is 16^1, 256 from 16^2 and
- 4096 from 16^3 */
- int version = (ssl->version.minor & 0X0F) +
- (ssl->version.minor & 0xF0) * 16 +
- (ssl->version.major & 0X0F) * 256 +
- (ssl->version.major & 0xF0) * 4096;
-
- ssl->protoMsgCb(written, version, type,
- (const void *)(data + RECORD_HEADER_SZ),
- (size_t)(sz - RECORD_HEADER_SZ),
- ssl, ssl->protoMsgCtx);
- }
- #endif /* OPENSSL_EXTRA */
- (void)written;
- (void)name;
- (void)heap;
- (void)type;
- (void)ssl;
- }
-
-#endif /* WOLFSSL_CALLBACKS */
-
-#if !defined(NO_CERTS)
-
-/* Decode the private key - RSA/ECC/Ed25519/Ed448 - and creates a key object.
- * The signature type is set as well.
- * The maximum length of a signature is returned.
- *
- * ssl The SSL/TLS object.
- * length The length of a signature.
- * returns 0 on success, otherwise failure.
- */
-int DecodePrivateKey(WOLFSSL *ssl, word16* length)
-{
- int ret = BAD_FUNC_ARG;
- int keySz;
- word32 idx;
-
-#ifdef HAVE_PK_CALLBACKS
- /* allow no private key if using PK callbacks and CB is set */
- if (wolfSSL_IsPrivatePkSet(ssl)) {
- *length = GetPrivateKeySigSize(ssl);
- return 0;
- }
- else
-#endif
-
- /* make sure private key exists */
- if (ssl->buffers.key == NULL || ssl->buffers.key->buffer == NULL) {
- WOLFSSL_MSG("Private key missing!");
- ERROR_OUT(NO_PRIVATE_KEY, exit_dpk);
- }
-
-#ifdef HAVE_PKCS11
- if (ssl->buffers.keyDevId != INVALID_DEVID && ssl->buffers.keyId) {
- if (ssl->buffers.keyType == rsa_sa_algo)
- ssl->hsType = DYNAMIC_TYPE_RSA;
- else if (ssl->buffers.keyType == ecc_dsa_sa_algo)
- ssl->hsType = DYNAMIC_TYPE_ECC;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_dpk;
- }
-
- if (ssl->buffers.keyType == rsa_sa_algo) {
- #ifndef NO_RSA
- ret = wc_InitRsaKey_Id((RsaKey*)ssl->hsKey,
- ssl->buffers.key->buffer, ssl->buffers.key->length,
- ssl->heap, ssl->buffers.keyDevId);
- if (ret == 0) {
- if (ssl->buffers.keySz < ssl->options.minRsaKeySz) {
- WOLFSSL_MSG("RSA key size too small");
- ERROR_OUT(RSA_KEY_SIZE_E, exit_dpk);
- }
-
- /* Return the maximum signature length. */
- *length = (word16)ssl->buffers.keySz;
- }
- #else
- ret = NOT_COMPILED_IN;
- #endif
- }
- else if (ssl->buffers.keyType == ecc_dsa_sa_algo) {
- #ifdef HAVE_ECC
- ret = wc_ecc_init_id((ecc_key*)ssl->hsKey, ssl->buffers.key->buffer,
- ssl->buffers.key->length, ssl->heap,
- ssl->buffers.keyDevId);
- if (ret == 0) {
- if (ssl->buffers.keySz < ssl->options.minEccKeySz) {
- WOLFSSL_MSG("ECC key size too small");
- ERROR_OUT(ECC_KEY_SIZE_E, exit_dpk);
- }
-
- /* Return the maximum signature length. */
- *length = (word16)wc_ecc_sig_size_calc(ssl->buffers.keySz);
- }
- #else
- ret = NOT_COMPILED_IN;
- #endif
- }
- goto exit_dpk;
- }
-#endif
-
-#ifndef NO_RSA
- if (ssl->buffers.keyType == rsa_sa_algo || ssl->buffers.keyType == 0) {
- ssl->hsType = DYNAMIC_TYPE_RSA;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_dpk;
- }
-
- WOLFSSL_MSG("Trying RSA private key");
-
- /* Set start of data to beginning of buffer. */
- idx = 0;
- /* Decode the key assuming it is an RSA private key. */
- ret = wc_RsaPrivateKeyDecode(ssl->buffers.key->buffer, &idx,
- (RsaKey*)ssl->hsKey, ssl->buffers.key->length);
- if (ret == 0) {
- WOLFSSL_MSG("Using RSA private key");
-
- /* It worked so check it meets minimum key size requirements. */
- keySz = wc_RsaEncryptSize((RsaKey*)ssl->hsKey);
- if (keySz < 0) { /* check if keySz has error case */
- ERROR_OUT(keySz, exit_dpk);
- }
-
- if (keySz < ssl->options.minRsaKeySz) {
- WOLFSSL_MSG("RSA key size too small");
- ERROR_OUT(RSA_KEY_SIZE_E, exit_dpk);
- }
-
- /* Return the maximum signature length. */
- *length = (word16)keySz;
-
- goto exit_dpk;
- }
- }
-#endif /* !NO_RSA */
-
-#ifdef HAVE_ECC
-#ifndef NO_RSA
- FreeKey(ssl, ssl->hsType, (void**)&ssl->hsKey);
-#endif /* !NO_RSA */
-
- if (ssl->buffers.keyType == ecc_dsa_sa_algo || ssl->buffers.keyType == 0) {
- ssl->hsType = DYNAMIC_TYPE_ECC;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_dpk;
- }
-
- #ifndef NO_RSA
- WOLFSSL_MSG("Trying ECC private key, RSA didn't work");
- #else
- WOLFSSL_MSG("Trying ECC private key");
- #endif
-
- /* Set start of data to beginning of buffer. */
- idx = 0;
- /* Decode the key assuming it is an ECC private key. */
- ret = wc_EccPrivateKeyDecode(ssl->buffers.key->buffer, &idx,
- (ecc_key*)ssl->hsKey,
- ssl->buffers.key->length);
- if (ret == 0) {
- WOLFSSL_MSG("Using ECC private key");
-
- /* Check it meets the minimum ECC key size requirements. */
- keySz = wc_ecc_size((ecc_key*)ssl->hsKey);
- if (keySz < ssl->options.minEccKeySz) {
- WOLFSSL_MSG("ECC key size too small");
- ERROR_OUT(ECC_KEY_SIZE_E, exit_dpk);
- }
-
- /* Return the maximum signature length. */
- *length = (word16)wc_ecc_sig_size((ecc_key*)ssl->hsKey);
-
- goto exit_dpk;
- }
- }
-#endif
-#ifdef HAVE_ED25519
- #if !defined(NO_RSA) || defined(HAVE_ECC)
- FreeKey(ssl, ssl->hsType, (void**)&ssl->hsKey);
- #endif
-
- if (ssl->buffers.keyType == ed25519_sa_algo || ssl->buffers.keyType == 0) {
- ssl->hsType = DYNAMIC_TYPE_ED25519;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_dpk;
- }
-
- #ifdef HAVE_ECC
- WOLFSSL_MSG("Trying ED25519 private key, ECC didn't work");
- #elif !defined(NO_RSA)
- WOLFSSL_MSG("Trying ED25519 private key, RSA didn't work");
- #else
- WOLFSSL_MSG("Trying ED25519 private key");
- #endif
-
- /* Set start of data to beginning of buffer. */
- idx = 0;
- /* Decode the key assuming it is an ED25519 private key. */
- ret = wc_Ed25519PrivateKeyDecode(ssl->buffers.key->buffer, &idx,
- (ed25519_key*)ssl->hsKey,
- ssl->buffers.key->length);
- if (ret == 0) {
- WOLFSSL_MSG("Using ED25519 private key");
-
- /* Check it meets the minimum ECC key size requirements. */
- if (ED25519_KEY_SIZE < ssl->options.minEccKeySz) {
- WOLFSSL_MSG("ED25519 key size too small");
- ERROR_OUT(ECC_KEY_SIZE_E, exit_dpk);
- }
-
- /* Return the maximum signature length. */
- *length = ED25519_SIG_SIZE;
-
- goto exit_dpk;
- }
- }
-#endif /* HAVE_ED25519 */
-#ifdef HAVE_ED448
- #if !defined(NO_RSA) || defined(HAVE_ECC)
- FreeKey(ssl, ssl->hsType, (void**)&ssl->hsKey);
- #endif
-
- if (ssl->buffers.keyType == ed448_sa_algo || ssl->buffers.keyType == 0) {
- ssl->hsType = DYNAMIC_TYPE_ED448;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_dpk;
- }
-
- #ifdef HAVE_ED25519
- WOLFSSL_MSG("Trying ED448 private key, ED25519 didn't work");
- #elif defined(HAVE_ECC)
- WOLFSSL_MSG("Trying ED448 private key, ECC didn't work");
- #elif !defined(NO_RSA)
- WOLFSSL_MSG("Trying ED448 private key, RSA didn't work");
- #else
- WOLFSSL_MSG("Trying ED447 private key");
- #endif
-
- /* Set start of data to beginning of buffer. */
- idx = 0;
- /* Decode the key assuming it is an ED448 private key. */
- ret = wc_Ed448PrivateKeyDecode(ssl->buffers.key->buffer, &idx,
- (ed448_key*)ssl->hsKey,
- ssl->buffers.key->length);
- if (ret == 0) {
- WOLFSSL_MSG("Using ED448 private key");
-
- /* Check it meets the minimum ECC key size requirements. */
- if (ED448_KEY_SIZE < ssl->options.minEccKeySz) {
- WOLFSSL_MSG("ED448 key size too small");
- ERROR_OUT(ECC_KEY_SIZE_E, exit_dpk);
- }
-
- /* Return the maximum signature length. */
- *length = ED448_SIG_SIZE;
-
- goto exit_dpk;
- }
- }
-#endif /* HAVE_ED448 */
-
- (void)idx;
- (void)keySz;
- (void)length;
-exit_dpk:
- return ret;
-}
-
-#endif /* WOLFSSL_TLS13 || !NO_WOLFSSL_CLIENT */
-
-#if defined(WOLFSSL_TLS13) && !defined(WOLFSSL_NO_TLS12)
- /* returns 1 if able to do TLS 1.3 otherwise 0 */
- static int TLSv1_3_Capable(WOLFSSL* ssl)
- {
- #ifndef WOLFSSL_TLS13
- return 0;
- #else
- int ret = 0;
-
- if (IsAtLeastTLSv1_3(ssl->ctx->method->version)) {
- ret = 1;
- }
-
- #ifdef OPENSSL_EXTRA
- if ((wolfSSL_get_options(ssl) & SSL_OP_NO_TLSv1_3)) {
- /* option set at run time to disable TLS 1.3 */
- ret = 0;
- }
- #endif
- return ret;
- #endif
- }
-#endif /* WOLFSSL_TLS13 */
-
-/* client only parts */
-#ifndef NO_WOLFSSL_CLIENT
-
-#ifndef WOLFSSL_NO_TLS12
-
- /* handle generation of client_hello (1) */
- int SendClientHello(WOLFSSL* ssl)
- {
- byte *output;
- word32 length, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- int sendSz;
- int idSz = ssl->options.resuming
- ? ssl->session.sessionIDSz
- : 0;
- int ret;
- word16 extSz = 0;
-
-#ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(ssl->version))
- return SendTls13ClientHello(ssl);
-#endif
-
- WOLFSSL_START(WC_FUNC_CLIENT_HELLO_SEND);
- WOLFSSL_ENTER("SendClientHello");
-
- if (ssl->suites == NULL) {
- WOLFSSL_MSG("Bad suites pointer in SendClientHello");
- return SUITES_ERROR;
- }
-
-#ifdef HAVE_SESSION_TICKET
- if (ssl->options.resuming && ssl->session.ticketLen > 0) {
- SessionTicket* ticket;
-
- ticket = TLSX_SessionTicket_Create(0, ssl->session.ticket,
- ssl->session.ticketLen, ssl->heap);
- if (ticket == NULL) return MEMORY_E;
-
- ret = TLSX_UseSessionTicket(&ssl->extensions, ticket, ssl->heap);
- if (ret != WOLFSSL_SUCCESS) {
- TLSX_SessionTicket_Free(ticket, ssl->heap);
- return ret;
- }
-
- idSz = 0;
- }
-#endif
- length = VERSION_SZ + RAN_LEN
- + idSz + ENUM_LEN
- + ssl->suites->suiteSz + SUITE_LEN
- + COMP_LEN + ENUM_LEN;
-
-#ifdef HAVE_TLS_EXTENSIONS
- /* auto populate extensions supported unless user defined */
- if ((ret = TLSX_PopulateExtensions(ssl, 0)) != 0)
- return ret;
- #ifdef HAVE_QSH
- if (QSH_Init(ssl) != 0)
- return MEMORY_E;
- #endif
- extSz = 0;
- ret = TLSX_GetRequestSize(ssl, client_hello, &extSz);
- if (ret != 0)
- return ret;
- length += extSz;
-#else
- if (IsAtLeastTLSv1_2(ssl) && ssl->suites->hashSigAlgoSz)
- extSz += HELLO_EXT_SZ + HELLO_EXT_SIGALGO_SZ
- + ssl->suites->hashSigAlgoSz;
-#ifdef HAVE_EXTENDED_MASTER
- if (ssl->options.haveEMS)
- extSz += HELLO_EXT_SZ;
-#endif
- if (extSz != 0)
- length += extSz + HELLO_EXT_SZ_SZ;
-#endif
- sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ;
-
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- length += ENUM_LEN; /* cookie */
- if (ssl->arrays->cookieSz != 0) length += ssl->arrays->cookieSz;
- sendSz = length + DTLS_HANDSHAKE_HEADER_SZ + DTLS_RECORD_HEADER_SZ;
- idx += DTLS_HANDSHAKE_EXTRA + DTLS_RECORD_EXTRA;
- }
-#endif
-
- if (IsEncryptionOn(ssl, 1))
- sendSz += MAX_MSG_EXTRA;
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
- return ret;
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHeaders(output, length, client_hello, ssl);
-
- /* client hello, first version */
- output[idx++] = ssl->version.major;
- output[idx++] = ssl->version.minor;
- ssl->chVersion = ssl->version; /* store in case changed */
-
- /* then random */
- if (ssl->options.connectState == CONNECT_BEGIN) {
- ret = wc_RNG_GenerateBlock(ssl->rng, output + idx, RAN_LEN);
- if (ret != 0)
- return ret;
-
- /* store random */
- XMEMCPY(ssl->arrays->clientRandom, output + idx, RAN_LEN);
- } else {
-#ifdef WOLFSSL_DTLS
- /* send same random on hello again */
- XMEMCPY(output + idx, ssl->arrays->clientRandom, RAN_LEN);
-#endif
- }
- idx += RAN_LEN;
-
- /* then session id */
- output[idx++] = (byte)idSz;
- if (idSz) {
- XMEMCPY(output + idx, ssl->session.sessionID,
- ssl->session.sessionIDSz);
- idx += ssl->session.sessionIDSz;
- }
-
- /* then DTLS cookie */
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- byte cookieSz = ssl->arrays->cookieSz;
-
- output[idx++] = cookieSz;
- if (cookieSz) {
- XMEMCPY(&output[idx], ssl->arrays->cookie, cookieSz);
- idx += cookieSz;
- }
- }
-#endif
- /* then cipher suites */
- c16toa(ssl->suites->suiteSz, output + idx);
- idx += OPAQUE16_LEN;
- XMEMCPY(output + idx, &ssl->suites->suites, ssl->suites->suiteSz);
- idx += ssl->suites->suiteSz;
-
- /* last, compression */
- output[idx++] = COMP_LEN;
- if (ssl->options.usingCompression)
- output[idx++] = ZLIB_COMPRESSION;
- else
- output[idx++] = NO_COMPRESSION;
-
-#ifdef HAVE_TLS_EXTENSIONS
- extSz = 0;
- ret = TLSX_WriteRequest(ssl, output + idx, client_hello, &extSz);
- if (ret != 0)
- return ret;
- idx += extSz;
-
- (void)idx; /* suppress analyzer warning, keep idx current */
-#else
- if (extSz != 0) {
- c16toa(extSz, output + idx);
- idx += HELLO_EXT_SZ_SZ;
-
- if (IsAtLeastTLSv1_2(ssl)) {
- if (ssl->suites->hashSigAlgoSz) {
- word16 i;
- /* extension type */
- c16toa(HELLO_EXT_SIG_ALGO, output + idx);
- idx += HELLO_EXT_TYPE_SZ;
- /* extension data length */
- c16toa(HELLO_EXT_SIGALGO_SZ + ssl->suites->hashSigAlgoSz,
- output + idx);
- idx += HELLO_EXT_SZ_SZ;
- /* sig algos length */
- c16toa(ssl->suites->hashSigAlgoSz, output + idx);
- idx += HELLO_EXT_SIGALGO_SZ;
- for (i=0; i < ssl->suites->hashSigAlgoSz; i++, idx++) {
- output[idx] = ssl->suites->hashSigAlgo[i];
- }
- }
- }
-#ifdef HAVE_EXTENDED_MASTER
- if (ssl->options.haveEMS) {
- c16toa(HELLO_EXT_EXTMS, output + idx);
- idx += HELLO_EXT_TYPE_SZ;
- c16toa(0, output + idx);
- idx += HELLO_EXT_SZ_SZ;
- }
-#endif
- }
-#endif
-
- if (IsEncryptionOn(ssl, 1)) {
- byte* input;
- int inputSz = idx; /* build msg adds rec hdr */
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls)
- recordHeaderSz += DTLS_RECORD_EXTRA;
- inputSz -= recordHeaderSz;
- input = (byte*)XMALLOC(inputSz, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- if (input == NULL)
- return MEMORY_E;
-
- XMEMCPY(input, output + recordHeaderSz, inputSz);
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) &&
- (ret = DtlsMsgPoolSave(ssl, input, inputSz, client_hello)) != 0) {
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- return ret;
- }
- #endif
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 1, 0, 0, CUR_ORDER);
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
-
- if (sendSz < 0)
- return sendSz;
- } else {
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- if ((ret = DtlsMsgPoolSave(ssl, output, sendSz, client_hello)) != 0)
- return ret;
- }
- if (ssl->options.dtls)
- DtlsSEQIncrement(ssl, CUR_ORDER);
- #endif
- ret = HashOutput(ssl, output, sendSz, 0);
- if (ret != 0)
- return ret;
- }
-
- ssl->options.clientState = CLIENT_HELLO_COMPLETE;
-#ifdef OPENSSL_EXTRA
- ssl->cbmode = SSL_CB_MODE_WRITE;
- if (ssl->CBIS != NULL)
- ssl->CBIS(ssl, SSL_CB_CONNECT_LOOP, SSL_SUCCESS);
-#endif
-
-#if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn) AddPacketName(ssl, "ClientHello");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "ClientHello", handshake, output, sendSz,
- WRITE_PROTO, ssl->heap);
-#endif
-
- ssl->buffers.outputBuffer.length += sendSz;
-
- ret = SendBuffered(ssl);
-
- WOLFSSL_LEAVE("SendClientHello", ret);
- WOLFSSL_END(WC_FUNC_CLIENT_HELLO_SEND);
-
- return ret;
- }
-
-
- /* handle processing of DTLS hello_verify_request (3) */
- static int DoHelloVerifyRequest(WOLFSSL* ssl, const byte* input,
- word32* inOutIdx, word32 size)
- {
- ProtocolVersion pv;
- byte cookieSz;
- word32 begin = *inOutIdx;
-
-#ifdef WOLFSSL_CALLBACKS
- if (ssl->hsInfoOn) AddPacketName(ssl, "HelloVerifyRequest");
- if (ssl->toInfoOn) AddLateName("HelloVerifyRequest", &ssl->timeoutInfo);
-#endif
-
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- DtlsMsgPoolReset(ssl);
- }
-#endif
-
- if (OPAQUE16_LEN + OPAQUE8_LEN > size)
- return BUFFER_ERROR;
-
- XMEMCPY(&pv, input + *inOutIdx, OPAQUE16_LEN);
- *inOutIdx += OPAQUE16_LEN;
-
- if (pv.major != DTLS_MAJOR ||
- (pv.minor != DTLS_MINOR && pv.minor != DTLSv1_2_MINOR))
- return VERSION_ERROR;
-
- cookieSz = input[(*inOutIdx)++];
-
- if (cookieSz) {
- if ((*inOutIdx - begin) + cookieSz > size)
- return BUFFER_ERROR;
-
-#ifdef WOLFSSL_DTLS
- if (cookieSz <= MAX_COOKIE_LEN) {
- XMEMCPY(ssl->arrays->cookie, input + *inOutIdx, cookieSz);
- ssl->arrays->cookieSz = cookieSz;
- }
-#endif
- *inOutIdx += cookieSz;
- }
-
- ssl->options.serverState = SERVER_HELLOVERIFYREQUEST_COMPLETE;
- return 0;
- }
-
-
- static WC_INLINE int DSH_CheckSessionId(WOLFSSL* ssl)
- {
- int ret = 0;
-
-#ifdef HAVE_SECRET_CALLBACK
- /* If a session secret callback exists, we are using that
- * key instead of the saved session key. */
- ret = ret || (ssl->sessionSecretCb != NULL);
-#endif
-
-#ifdef HAVE_SESSION_TICKET
- /* server may send blank ticket which may not be expected to indicate
- * existing one ok but will also be sending a new one */
- ret = ret || (ssl->session.ticketLen > 0);
-#endif
-
- ret = ret ||
- (ssl->options.haveSessionId && XMEMCMP(ssl->arrays->sessionID,
- ssl->session.sessionID, ID_LEN) == 0);
-
- return ret;
- }
-
- /* Check the version in the received message is valid and set protocol
- * version to use.
- *
- * ssl The SSL/TLS object.
- * pv The protocol version from the packet.
- * returns 0 on success, otherwise failure.
- */
- int CheckVersion(WOLFSSL *ssl, ProtocolVersion pv)
- {
- #ifdef WOLFSSL_TLS13_DRAFT
- if (pv.major == TLS_DRAFT_MAJOR) {
- pv.major = SSLv3_MAJOR;
- pv.minor = TLSv1_3_MINOR;
- }
- #endif
-
- #ifdef OPENSSL_EXTRA
- if (ssl->CBIS != NULL) {
- ssl->CBIS(ssl, SSL_CB_HANDSHAKE_START, SSL_SUCCESS);
- }
- #endif
-
- if (pv.minor > ssl->version.minor) {
- WOLFSSL_MSG("Server using higher version, fatal error");
- return VERSION_ERROR;
- }
- if (pv.minor < ssl->version.minor) {
- WOLFSSL_MSG("server using lower version");
-
- /* Check for downgrade attack. */
- if (!ssl->options.downgrade) {
- WOLFSSL_MSG("\tno downgrade allowed, fatal error");
- return VERSION_ERROR;
- }
- if (pv.minor < ssl->options.minDowngrade) {
- WOLFSSL_MSG("\tversion below minimum allowed, fatal error");
- return VERSION_ERROR;
- }
-
- #ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation &&
- ssl->secure_renegotiation->enabled &&
- ssl->options.handShakeDone) {
- WOLFSSL_MSG("Server changed version during scr");
- return VERSION_ERROR;
- }
- #endif
-
- /* Checks made - OK to downgrade. */
- if (pv.minor == SSLv3_MINOR) {
- /* turn off tls */
- WOLFSSL_MSG("\tdowngrading to SSLv3");
- ssl->options.tls = 0;
- ssl->options.tls1_1 = 0;
- ssl->version.minor = SSLv3_MINOR;
- }
- else if (pv.minor == TLSv1_MINOR) {
- /* turn off tls 1.1+ */
- WOLFSSL_MSG("\tdowngrading to TLSv1");
- ssl->options.tls1_1 = 0;
- ssl->version.minor = TLSv1_MINOR;
- }
- else if (pv.minor == TLSv1_1_MINOR) {
- WOLFSSL_MSG("\tdowngrading to TLSv1.1");
- ssl->version.minor = TLSv1_1_MINOR;
- }
- else if (pv.minor == TLSv1_2_MINOR) {
- WOLFSSL_MSG(" downgrading to TLSv1.2");
- ssl->version.minor = TLSv1_2_MINOR;
- }
- }
-
-#ifdef OPENSSL_EXTRA
- /* check if option is set to not allow the current version
- * set from either wolfSSL_set_options or wolfSSL_CTX_set_options */
- if (!ssl->options.dtls && ssl->options.downgrade &&
- ssl->options.mask > 0) {
- if (ssl->version.minor == TLSv1_2_MINOR &&
- (ssl->options.mask & SSL_OP_NO_TLSv1_2) == SSL_OP_NO_TLSv1_2) {
- WOLFSSL_MSG("\tOption set to not allow TLSv1.2, Downgrading");
- ssl->version.minor = TLSv1_1_MINOR;
- }
- if (ssl->version.minor == TLSv1_1_MINOR &&
- (ssl->options.mask & SSL_OP_NO_TLSv1_1) == SSL_OP_NO_TLSv1_1) {
- WOLFSSL_MSG("\tOption set to not allow TLSv1.1, Downgrading");
- ssl->options.tls1_1 = 0;
- ssl->version.minor = TLSv1_MINOR;
- }
- if (ssl->version.minor == TLSv1_MINOR &&
- (ssl->options.mask & SSL_OP_NO_TLSv1) == SSL_OP_NO_TLSv1) {
- WOLFSSL_MSG("\tOption set to not allow TLSv1, Downgrading");
- ssl->options.tls = 0;
- ssl->options.tls1_1 = 0;
- ssl->version.minor = SSLv3_MINOR;
- }
- if (ssl->version.minor == SSLv3_MINOR &&
- (ssl->options.mask & SSL_OP_NO_SSLv3) == SSL_OP_NO_SSLv3) {
- WOLFSSL_MSG("\tError, option set to not allow SSLv3");
- return VERSION_ERROR;
- }
-
- if (ssl->version.minor < ssl->options.minDowngrade) {
- WOLFSSL_MSG("\tversion below minimum allowed, fatal error");
- return VERSION_ERROR;
- }
- }
-#endif
-
- return 0;
- }
-
- /* handle processing of server_hello (2) */
- int DoServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
- word32 helloSz)
- {
- byte cs0; /* cipher suite bytes 0, 1 */
- byte cs1;
- ProtocolVersion pv;
- byte compression;
- word32 i = *inOutIdx;
- word32 begin = i;
- int ret;
-
- WOLFSSL_START(WC_FUNC_SERVER_HELLO_DO);
- WOLFSSL_ENTER("DoServerHello");
-
-#ifdef WOLFSSL_CALLBACKS
- if (ssl->hsInfoOn) AddPacketName(ssl, "ServerHello");
- if (ssl->toInfoOn) AddLateName("ServerHello", &ssl->timeoutInfo);
-#endif
-
- /* protocol version, random and session id length check */
- if (OPAQUE16_LEN + RAN_LEN + OPAQUE8_LEN > helloSz)
- return BUFFER_ERROR;
-
- /* protocol version */
- XMEMCPY(&pv, input + i, OPAQUE16_LEN);
- i += OPAQUE16_LEN;
-
- ret = CheckVersion(ssl, pv);
- if (ret != 0)
- return ret;
-
-#ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(pv)) {
- byte type = server_hello;
- return DoTls13ServerHello(ssl, input, inOutIdx, helloSz, &type);
- }
-#endif
-
- /* random */
- XMEMCPY(ssl->arrays->serverRandom, input + i, RAN_LEN);
- i += RAN_LEN;
-
- /* session id */
- ssl->arrays->sessionIDSz = input[i++];
-
- if (ssl->arrays->sessionIDSz > ID_LEN) {
- WOLFSSL_MSG("Invalid session ID size");
- ssl->arrays->sessionIDSz = 0;
- return BUFFER_ERROR;
- }
- else if (ssl->arrays->sessionIDSz) {
- if ((i - begin) + ssl->arrays->sessionIDSz > helloSz)
- return BUFFER_ERROR;
-
- XMEMCPY(ssl->arrays->sessionID, input + i,
- ssl->arrays->sessionIDSz);
- i += ssl->arrays->sessionIDSz;
- ssl->options.haveSessionId = 1;
- }
-
-
- /* suite and compression */
- if ((i - begin) + OPAQUE16_LEN + OPAQUE8_LEN > helloSz)
- return BUFFER_ERROR;
-
- cs0 = input[i++];
- cs1 = input[i++];
-
-#ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation && ssl->secure_renegotiation->enabled &&
- ssl->options.handShakeDone) {
- if (ssl->options.cipherSuite0 != cs0 ||
- ssl->options.cipherSuite != cs1) {
- WOLFSSL_MSG("Server changed cipher suite during scr");
- return MATCH_SUITE_ERROR;
- }
- }
-#endif
-
- ssl->options.cipherSuite0 = cs0;
- ssl->options.cipherSuite = cs1;
- compression = input[i++];
-
-#ifndef WOLFSSL_NO_STRICT_CIPHER_SUITE
- {
- word32 idx, found = 0;
- /* confirm server_hello cipher suite is one sent in client_hello */
- for (idx = 0; idx < ssl->suites->suiteSz; idx += 2) {
- if (ssl->suites->suites[idx] == cs0 &&
- ssl->suites->suites[idx+1] == cs1) {
- found = 1;
- break;
- }
- }
- if (!found) {
- WOLFSSL_MSG("ServerHello did not use cipher suite from ClientHello");
- return MATCH_SUITE_ERROR;
- }
- }
-#endif /* !WOLFSSL_NO_STRICT_CIPHER_SUITE */
-
- if (compression != NO_COMPRESSION && !ssl->options.usingCompression) {
- WOLFSSL_MSG("Server forcing compression w/o support");
- return COMPRESSION_ERROR;
- }
-
- if (compression != ZLIB_COMPRESSION && ssl->options.usingCompression) {
- WOLFSSL_MSG("Server refused compression, turning off");
- ssl->options.usingCompression = 0; /* turn off if server refused */
- }
-
- *inOutIdx = i;
-
-#ifdef HAVE_TLS_EXTENSIONS
- if ( (i - begin) < helloSz) {
- if (TLSX_SupportExtensions(ssl)) {
- word16 totalExtSz;
-
- if ((i - begin) + OPAQUE16_LEN > helloSz)
- return BUFFER_ERROR;
-
- ato16(&input[i], &totalExtSz);
- i += OPAQUE16_LEN;
-
- if ((i - begin) + totalExtSz > helloSz)
- return BUFFER_ERROR;
-
- if ((ret = TLSX_Parse(ssl, (byte *) input + i, totalExtSz,
- server_hello, NULL)))
- return ret;
-
- i += totalExtSz;
- *inOutIdx = i;
- }
- else
- *inOutIdx = begin + helloSz; /* skip extensions */
- }
- else
- ssl->options.haveEMS = 0; /* If no extensions, no EMS */
-#else
- {
- int allowExt = 0;
- byte pendingEMS = 0;
-
- if ( (i - begin) < helloSz) {
- if (ssl->version.major == SSLv3_MAJOR &&
- ssl->version.minor >= TLSv1_MINOR) {
-
- allowExt = 1;
- }
-#ifdef WOLFSSL_DTLS
- if (ssl->version.major == DTLS_MAJOR)
- allowExt = 1;
-#endif
-
- if (allowExt) {
- word16 totalExtSz;
-
- if ((i - begin) + OPAQUE16_LEN > helloSz)
- return BUFFER_ERROR;
-
- ato16(&input[i], &totalExtSz);
- i += OPAQUE16_LEN;
-
- if ((i - begin) + totalExtSz > helloSz)
- return BUFFER_ERROR;
-
- while (totalExtSz) {
- word16 extId, extSz;
-
- if (OPAQUE16_LEN + OPAQUE16_LEN > totalExtSz)
- return BUFFER_ERROR;
-
- ato16(&input[i], &extId);
- i += OPAQUE16_LEN;
- ato16(&input[i], &extSz);
- i += OPAQUE16_LEN;
-
- if (OPAQUE16_LEN + OPAQUE16_LEN + extSz > totalExtSz)
- return BUFFER_ERROR;
-
- if (extId == HELLO_EXT_EXTMS)
- pendingEMS = 1;
- else
- i += extSz;
-
- totalExtSz -= OPAQUE16_LEN + OPAQUE16_LEN + extSz;
- }
-
- *inOutIdx = i;
- }
- else
- *inOutIdx = begin + helloSz; /* skip extensions */
- }
-
- if (!pendingEMS && ssl->options.haveEMS)
- ssl->options.haveEMS = 0;
- }
-#endif
-
- ssl->options.serverState = SERVER_HELLO_COMPLETE;
-
- if (IsEncryptionOn(ssl, 0)) {
- *inOutIdx += ssl->keys.padSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMWrite &&
- ssl->specs.cipher_type == block) {
- *inOutIdx += MacSize(ssl);
- }
- #endif
- }
-
-#ifdef HAVE_SECRET_CALLBACK
- if (ssl->sessionSecretCb != NULL) {
- int secretSz = SECRET_LEN;
- ret = ssl->sessionSecretCb(ssl, ssl->session.masterSecret,
- &secretSz, ssl->sessionSecretCtx);
- if (ret != 0 || secretSz != SECRET_LEN)
- return SESSION_SECRET_CB_E;
- }
-#endif /* HAVE_SECRET_CALLBACK */
-
- ret = CompleteServerHello(ssl);
-
- WOLFSSL_LEAVE("DoServerHello", ret);
- WOLFSSL_END(WC_FUNC_SERVER_HELLO_DO);
-
- return ret;
- }
-
- int CompleteServerHello(WOLFSSL* ssl)
- {
- int ret;
-
- if (!ssl->options.resuming) {
- byte* down = ssl->arrays->serverRandom + RAN_LEN -
- TLS13_DOWNGRADE_SZ - 1;
- byte vers = ssl->arrays->serverRandom[RAN_LEN - 1];
- #ifdef WOLFSSL_TLS13
- if (TLSv1_3_Capable(ssl)) {
- /* TLS v1.3 capable client not allowed to downgrade when
- * connecting to TLS v1.3 capable server unless cipher suite
- * demands it.
- */
- if (XMEMCMP(down, tls13Downgrade, TLS13_DOWNGRADE_SZ) == 0 &&
- (vers == 0 || vers == 1)) {
- SendAlert(ssl, alert_fatal, illegal_parameter);
- return VERSION_ERROR;
- }
- }
- else
- #endif
- if (ssl->ctx->method->version.major == SSLv3_MAJOR &&
- ssl->ctx->method->version.minor == TLSv1_2_MINOR
-#ifdef OPENSSL_EXTRA
- && (wolfSSL_get_options(ssl) & SSL_OP_NO_TLSv1_2) == 0
-#endif
- ) {
- /* TLS v1.2 capable client not allowed to downgrade when
- * connecting to TLS v1.2 capable server.
- */
- if (XMEMCMP(down, tls13Downgrade, TLS13_DOWNGRADE_SZ) == 0 &&
- vers == 0) {
- SendAlert(ssl, alert_fatal, illegal_parameter);
- return VERSION_ERROR;
- }
- }
- }
- else {
- if (DSH_CheckSessionId(ssl)) {
- if (SetCipherSpecs(ssl) == 0) {
-
- XMEMCPY(ssl->arrays->masterSecret,
- ssl->session.masterSecret, SECRET_LEN);
- #ifdef NO_OLD_TLS
- ret = DeriveTlsKeys(ssl);
- #else
- ret = -1; /* default value */
- #ifndef NO_TLS
- if (ssl->options.tls)
- ret = DeriveTlsKeys(ssl);
- #endif
- if (!ssl->options.tls)
- ret = DeriveKeys(ssl);
- #endif /* NO_OLD_TLS */
- ssl->options.serverState = SERVER_HELLODONE_COMPLETE;
-
- return ret;
- }
- else {
- WOLFSSL_MSG("Unsupported cipher suite, DoServerHello");
- return UNSUPPORTED_SUITE;
- }
- }
- else {
- WOLFSSL_MSG("Server denied resumption attempt");
- ssl->options.resuming = 0; /* server denied resumption try */
- }
- }
- return SetCipherSpecs(ssl);
- }
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-
- /* Make sure client setup is valid for this suite, true on success */
- int VerifyClientSuite(WOLFSSL* ssl)
- {
- int havePSK = 0;
- byte first = ssl->options.cipherSuite0;
- byte second = ssl->options.cipherSuite;
-
- WOLFSSL_ENTER("VerifyClientSuite");
-
- #ifndef NO_PSK
- havePSK = ssl->options.havePSK;
- #endif
-
- if (CipherRequires(first, second, REQUIRES_PSK)) {
- WOLFSSL_MSG("Requires PSK");
- if (havePSK == 0) {
- WOLFSSL_MSG("Don't have PSK");
- return 0;
- }
- }
-
- return 1; /* success */
- }
-
-#ifndef WOLFSSL_NO_TLS12
-
-#ifndef NO_CERTS
- /* handle processing of certificate_request (13) */
- static int DoCertificateRequest(WOLFSSL* ssl, const byte* input, word32*
- inOutIdx, word32 size)
- {
- word16 len;
- word32 begin = *inOutIdx;
- #ifdef OPENSSL_EXTRA
- int ret;
- WOLFSSL_X509* x509 = NULL;
- WOLFSSL_EVP_PKEY* pkey = NULL;
- #endif
-
- WOLFSSL_START(WC_FUNC_CERTIFICATE_REQUEST_DO);
- WOLFSSL_ENTER("DoCertificateRequest");
-
- #ifdef WOLFSSL_CALLBACKS
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "CertificateRequest");
- if (ssl->toInfoOn)
- AddLateName("CertificateRequest", &ssl->timeoutInfo);
- #endif
-
- if (OPAQUE8_LEN > size)
- return BUFFER_ERROR;
-
- len = input[(*inOutIdx)++];
-
- if ((*inOutIdx - begin) + len > size)
- return BUFFER_ERROR;
-
- /* types, read in here */
- *inOutIdx += len;
-
- /* signature and hash signature algorithm */
- if (IsAtLeastTLSv1_2(ssl)) {
- if ((*inOutIdx - begin) + OPAQUE16_LEN > size)
- return BUFFER_ERROR;
-
- ato16(input + *inOutIdx, &len);
- *inOutIdx += OPAQUE16_LEN;
-
- if ((*inOutIdx - begin) + len > size)
- return BUFFER_ERROR;
-
- if (PickHashSigAlgo(ssl, input + *inOutIdx, len) != 0 &&
- ssl->buffers.certificate &&
- ssl->buffers.certificate->buffer) {
- #ifdef HAVE_PK_CALLBACKS
- if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx)) {
- WOLFSSL_MSG("Using PK for client private key");
- return INVALID_PARAMETER;
- }
- #endif
- if (ssl->buffers.key && ssl->buffers.key->buffer) {
- return INVALID_PARAMETER;
- }
- }
- *inOutIdx += len;
- #ifdef WC_RSA_PSS
- ssl->pssAlgo = 0;
- if (ssl->suites->sigAlgo == rsa_pss_sa_algo)
- ssl->pssAlgo |= 1 << ssl->suites->hashAlgo;
- #endif
- }
-
- /* authorities */
- if ((*inOutIdx - begin) + OPAQUE16_LEN > size)
- return BUFFER_ERROR;
-
- ato16(input + *inOutIdx, &len);
- *inOutIdx += OPAQUE16_LEN;
-
- if ((*inOutIdx - begin) + len > size)
- return BUFFER_ERROR;
-
- while (len) {
- word16 dnSz;
-
- if ((*inOutIdx - begin) + OPAQUE16_LEN > size)
- return BUFFER_ERROR;
-
- ato16(input + *inOutIdx, &dnSz);
- *inOutIdx += OPAQUE16_LEN;
-
- if ((*inOutIdx - begin) + dnSz > size)
- return BUFFER_ERROR;
-
- *inOutIdx += dnSz;
- len -= OPAQUE16_LEN + dnSz;
- }
-
- #ifdef OPENSSL_EXTRA
- /* call client cert callback if no cert has been loaded */
- if ((ssl->ctx->CBClientCert != NULL) &&
- (!ssl->buffers.certificate || !ssl->buffers.certificate->buffer)) {
-
- ret = ssl->ctx->CBClientCert(ssl, &x509, &pkey);
- if (ret == 1) {
- if ((wolfSSL_use_certificate(ssl, x509) != WOLFSSL_SUCCESS) ||
- (wolfSSL_use_PrivateKey(ssl, pkey) != WOLFSSL_SUCCESS)) {
- return CLIENT_CERT_CB_ERROR;
- }
- wolfSSL_X509_free(x509);
- wolfSSL_EVP_PKEY_free(pkey);
-
- } else if (ret < 0) {
- return WOLFSSL_ERROR_WANT_X509_LOOKUP;
- }
- }
- #endif
-
- /* don't send client cert or cert verify if user hasn't provided
- cert and private key */
- if (ssl->buffers.certificate && ssl->buffers.certificate->buffer) {
- #ifdef HAVE_PK_CALLBACKS
- if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx)) {
- WOLFSSL_MSG("Using PK for client private key");
- ssl->options.sendVerify = SEND_CERT;
- }
- #endif
- if (ssl->buffers.key && ssl->buffers.key->buffer) {
- ssl->options.sendVerify = SEND_CERT;
- }
- }
- #ifdef OPENSSL_EXTRA
- else
- #else
- else if (IsTLS(ssl))
- #endif
- {
- ssl->options.sendVerify = SEND_BLANK_CERT;
- }
-
- if (IsEncryptionOn(ssl, 0)) {
- *inOutIdx += ssl->keys.padSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- *inOutIdx += MacSize(ssl);
- #endif
- }
-
- WOLFSSL_LEAVE("DoCertificateRequest", 0);
- WOLFSSL_END(WC_FUNC_CERTIFICATE_REQUEST_DO);
-
- return 0;
- }
-#endif /* !NO_CERTS */
-
-
-#if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
-
- static int CheckCurveId(int tlsCurveId)
- {
- int ret = ECC_CURVE_ERROR;
-
- switch (tlsCurveId) {
- #if defined(HAVE_ECC160) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case WOLFSSL_ECC_SECP160R1: return ECC_SECP160R1_OID;
- #endif /* !NO_ECC_SECP */
- #ifdef HAVE_ECC_SECPR2
- case WOLFSSL_ECC_SECP160R2: return ECC_SECP160R2_OID;
- #endif /* HAVE_ECC_SECPR2 */
- #ifdef HAVE_ECC_KOBLITZ
- case WOLFSSL_ECC_SECP160K1: return ECC_SECP160K1_OID;
- #endif /* HAVE_ECC_KOBLITZ */
- #endif
- #if defined(HAVE_ECC192) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case WOLFSSL_ECC_SECP192R1: return ECC_SECP192R1_OID;
- #endif /* !NO_ECC_SECP */
- #ifdef HAVE_ECC_KOBLITZ
- case WOLFSSL_ECC_SECP192K1: return ECC_SECP192K1_OID;
- #endif /* HAVE_ECC_KOBLITZ */
- #endif
- #if defined(HAVE_ECC224) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case WOLFSSL_ECC_SECP224R1: return ECC_SECP224R1_OID;
- #endif /* !NO_ECC_SECP */
- #ifdef HAVE_ECC_KOBLITZ
- case WOLFSSL_ECC_SECP224K1: return ECC_SECP224K1_OID;
- #endif /* HAVE_ECC_KOBLITZ */
- #endif
- #ifdef HAVE_CURVE25519
- case WOLFSSL_ECC_X25519: return ECC_X25519_OID;
- #endif
- #if !defined(NO_ECC256) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case WOLFSSL_ECC_SECP256R1: return ECC_SECP256R1_OID;
- #endif /* !NO_ECC_SECP */
- #ifdef HAVE_ECC_KOBLITZ
- case WOLFSSL_ECC_SECP256K1: return ECC_SECP256K1_OID;
- #endif /* HAVE_ECC_KOBLITZ */
- #ifdef HAVE_ECC_BRAINPOOL
- case WOLFSSL_ECC_BRAINPOOLP256R1: return ECC_BRAINPOOLP256R1_OID;
- #endif /* HAVE_ECC_BRAINPOOL */
- #endif
- #ifdef HAVE_CURVE448
- case WOLFSSL_ECC_X448: return ECC_X448_OID;
- #endif
- #if defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case WOLFSSL_ECC_SECP384R1: return ECC_SECP384R1_OID;
- #endif /* !NO_ECC_SECP */
- #ifdef HAVE_ECC_BRAINPOOL
- case WOLFSSL_ECC_BRAINPOOLP384R1: return ECC_BRAINPOOLP384R1_OID;
- #endif /* HAVE_ECC_BRAINPOOL */
- #endif
- #if defined(HAVE_ECC512) || defined(HAVE_ALL_CURVES)
- #ifdef HAVE_ECC_BRAINPOOL
- case WOLFSSL_ECC_BRAINPOOLP512R1: return ECC_BRAINPOOLP512R1_OID;
- #endif /* HAVE_ECC_BRAINPOOL */
- #endif
- #if defined(HAVE_ECC521) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case WOLFSSL_ECC_SECP521R1: return ECC_SECP521R1_OID;
- #endif /* !NO_ECC_SECP */
- #endif
- }
-
- return ret;
- }
-
-#endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
-/* Persistable DoServerKeyExchange arguments */
-typedef struct DskeArgs {
- byte* output; /* not allocated */
-#if !defined(NO_DH) || defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- byte* verifySig;
-#endif
- word32 idx;
- word32 begin;
-#if !defined(NO_DH) || defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- word16 verifySigSz;
-#endif
- word16 sigSz;
- byte sigAlgo;
- byte hashAlgo;
-#if !defined(NO_RSA) && defined(WC_RSA_PSS)
- int bits;
-#endif
-} DskeArgs;
-
-static void FreeDskeArgs(WOLFSSL* ssl, void* pArgs)
-{
- DskeArgs* args = (DskeArgs*)pArgs;
-
- (void)ssl;
- (void)args;
-
-#if !defined(NO_DH) || defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- if (args->verifySig) {
- XFREE(args->verifySig, ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- args->verifySig = NULL;
- }
-#endif
-}
-
-#ifndef NO_DH
-static int GetDhPublicKey(WOLFSSL* ssl, const byte* input, word32 size,
- DskeArgs* args)
-{
- int ret = 0;
- word16 length;
-#ifdef HAVE_FFDHE
- const DhParams* params = NULL;
- int group = 0;
-#endif
-
- ssl->buffers.weOwnDH = 1;
-
- ssl->buffers.serverDH_P.buffer = NULL;
- ssl->buffers.serverDH_G.buffer = NULL;
- ssl->buffers.serverDH_Pub.buffer = NULL;
-
- /* p */
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_gdpk);
- }
-
- ato16(input + args->idx, &length);
- args->idx += OPAQUE16_LEN;
-
- if ((args->idx - args->begin) + length > size) {
- ERROR_OUT(BUFFER_ERROR, exit_gdpk);
- }
-
- if (length < ssl->options.minDhKeySz) {
- WOLFSSL_MSG("Server using a DH key that is too small");
- SendAlert(ssl, alert_fatal, handshake_failure);
- ERROR_OUT(DH_KEY_SIZE_E, exit_gdpk);
- }
- if (length > ssl->options.maxDhKeySz) {
- WOLFSSL_MSG("Server using a DH key that is too big");
- SendAlert(ssl, alert_fatal, handshake_failure);
- ERROR_OUT(DH_KEY_SIZE_E, exit_gdpk);
- }
-
- ssl->buffers.serverDH_P.buffer =
- (byte*)XMALLOC(length, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- if (ssl->buffers.serverDH_P.buffer) {
- ssl->buffers.serverDH_P.length = length;
- }
- else {
- ERROR_OUT(MEMORY_ERROR, exit_gdpk);
- }
-
- XMEMCPY(ssl->buffers.serverDH_P.buffer, input + args->idx,
- length);
- args->idx += length;
-
- ssl->options.dhKeySz = length;
-
- /* g */
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_gdpk);
- }
-
- ato16(input + args->idx, &length);
- args->idx += OPAQUE16_LEN;
-
- if ((args->idx - args->begin) + length > size) {
- ERROR_OUT(BUFFER_ERROR, exit_gdpk);
- }
-
- ssl->buffers.serverDH_G.buffer =
- (byte*)XMALLOC(length, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- if (ssl->buffers.serverDH_G.buffer) {
- ssl->buffers.serverDH_G.length = length;
- }
- else {
- ERROR_OUT(MEMORY_ERROR, exit_gdpk);
- }
-
- XMEMCPY(ssl->buffers.serverDH_G.buffer, input + args->idx,
- length);
- args->idx += length;
-
- /* pub */
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_gdpk);
- }
-
- ato16(input + args->idx, &length);
- args->idx += OPAQUE16_LEN;
-
- if ((args->idx - args->begin) + length > size) {
- ERROR_OUT(BUFFER_ERROR, exit_gdpk);
- }
-
- ssl->buffers.serverDH_Pub.buffer =
- (byte*)XMALLOC(length, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- if (ssl->buffers.serverDH_Pub.buffer) {
- ssl->buffers.serverDH_Pub.length = length;
- }
- else {
- ERROR_OUT(MEMORY_ERROR, exit_gdpk);
- }
-
- XMEMCPY(ssl->buffers.serverDH_Pub.buffer, input + args->idx,
- length);
- args->idx += length;
-
-#ifdef HAVE_FFDHE
- switch (ssl->options.dhKeySz) {
- #ifdef HAVE_FFDHE_2048
- case 2048/8:
- params = wc_Dh_ffdhe2048_Get();
- group = WOLFSSL_FFDHE_2048;
- break;
- #endif
- #ifdef HAVE_FFDHE_3072
- case 3072/8:
- params = wc_Dh_ffdhe3072_Get();
- group = WOLFSSL_FFDHE_3072;
- break;
- #endif
- #ifdef HAVE_FFDHE_4096
- case 4096/8:
- params = wc_Dh_ffdhe4096_Get();
- group = WOLFSSL_FFDHE_4096;
- break;
- #endif
- #ifdef HAVE_FFDHE_6144
- case 6144/8:
- params = wc_Dh_ffdhe6144_Get();
- group = WOLFSSL_FFDHE_6144;
- break;
- #endif
- #ifdef HAVE_FFDHE_8192
- case 8192/8:
- params = wc_Dh_ffdhe8192_Get();
- group = WOLFSSL_FFDHE_8192;
- break;
- #endif
- default:
- break;
- }
-
- if (params == NULL || params->g_len != ssl->buffers.serverDH_G.length ||
- (XMEMCMP(ssl->buffers.serverDH_G.buffer, params->g,
- params->g_len) != 0) ||
- (XMEMCMP(ssl->buffers.serverDH_P.buffer, params->p,
- params->p_len) != 0)) {
- WOLFSSL_MSG("Server not using FFDHE parameters");
- #ifdef WOLFSSL_REQUIRE_FFDHE
- SendAlert(ssl, alert_fatal, handshake_failure);
- ERROR_OUT(DH_PARAMS_NOT_FFDHE_E, exit_gdpk);
- #endif
- }
- else {
- ssl->namedGroup = group;
- #if !defined(WOLFSSL_OLD_PRIME_CHECK) && !defined(HAVE_FIPS) && \
- !defined(HAVE_SELFTEST)
- ssl->options.dhDoKeyTest = 0;
- #endif
- }
-#endif /* HAVE_FFDHE */
-
-exit_gdpk:
- return ret;
-}
-#endif
-
-/* handle processing of server_key_exchange (12) */
-static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
- word32* inOutIdx, word32 size)
-{
- int ret = 0;
-#ifdef WOLFSSL_ASYNC_CRYPT
- DskeArgs* args = (DskeArgs*)ssl->async.args;
- typedef char args_test[sizeof(ssl->async.args) >= sizeof(*args) ? 1 : -1];
- (void)sizeof(args_test);
-#else
- DskeArgs args[1];
-#endif
-
- (void)input;
- (void)size;
-
- WOLFSSL_START(WC_FUNC_SERVER_KEY_EXCHANGE_DO);
- WOLFSSL_ENTER("DoServerKeyExchange");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
- if (ret != WC_NOT_PENDING_E) {
- /* Check for error */
- if (ret < 0)
- goto exit_dske;
- }
- else
-#endif
- {
- /* Reset state */
- ret = 0;
- ssl->options.asyncState = TLS_ASYNC_BEGIN;
- XMEMSET(args, 0, sizeof(DskeArgs));
- args->idx = *inOutIdx;
- args->begin = *inOutIdx;
- args->sigAlgo = ssl->specs.sig_algo;
- args->hashAlgo = sha_mac;
- #ifdef WOLFSSL_ASYNC_CRYPT
- ssl->async.freeArgs = FreeDskeArgs;
- #endif
- }
-
- switch(ssl->options.asyncState)
- {
- case TLS_ASYNC_BEGIN:
- {
- #ifdef WOLFSSL_CALLBACKS
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "ServerKeyExchange");
- if (ssl->toInfoOn)
- AddLateName("ServerKeyExchange", &ssl->timeoutInfo);
- #endif
-
- switch(ssl->specs.kea)
- {
- #ifndef NO_PSK
- case psk_kea:
- {
- int srvHintLen;
- word16 length;
-
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- ato16(input + args->idx, &length);
- args->idx += OPAQUE16_LEN;
-
- if ((args->idx - args->begin) + length > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- /* get PSK server hint from the wire */
- srvHintLen = min(length, MAX_PSK_ID_LEN);
- XMEMCPY(ssl->arrays->server_hint, input + args->idx,
- srvHintLen);
- ssl->arrays->server_hint[srvHintLen] = '\0'; /* null term */
- args->idx += length;
- break;
- }
- #endif /* !NO_PSK */
- #ifndef NO_DH
- case diffie_hellman_kea:
- {
- ret = GetDhPublicKey(ssl, input, size, args);
- if (ret != 0)
- goto exit_dske;
- break;
- }
- #endif /* !NO_DH */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- byte b;
- #ifdef HAVE_ECC
- int curveId;
- #endif
- int curveOid;
- word16 length;
-
- if ((args->idx - args->begin) + ENUM_LEN + OPAQUE16_LEN +
- OPAQUE8_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- b = input[args->idx++];
- if (b != named_curve) {
- ERROR_OUT(ECC_CURVETYPE_ERROR, exit_dske);
- }
-
- args->idx += 1; /* curve type, eat leading 0 */
- b = input[args->idx++];
- if ((curveOid = CheckCurveId(b)) < 0) {
- ERROR_OUT(ECC_CURVE_ERROR, exit_dske);
- }
- ssl->ecdhCurveOID = curveOid;
- #if defined(WOLFSSL_TLS13) || defined(HAVE_FFDHE)
- ssl->namedGroup = 0;
- #endif
-
- length = input[args->idx++];
- if ((args->idx - args->begin) + length > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- if (ssl->peerX25519Key == NULL) {
- ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE25519,
- (void**)&ssl->peerX25519Key);
- if (ret != 0) {
- goto exit_dske;
- }
- } else if (ssl->peerX25519KeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE25519,
- ssl->peerX25519Key);
- ssl->peerX25519KeyPresent = 0;
- if (ret != 0) {
- goto exit_dske;
- }
- }
-
- if ((ret = wc_curve25519_check_public(
- input + args->idx, length,
- EC25519_LITTLE_ENDIAN)) != 0) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_E)
- SendAlert(ssl, alert_fatal, decode_error);
- else if (ret == ECC_OUT_OF_RANGE_E)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- else {
- SendAlert(ssl, alert_fatal, illegal_parameter);
- }
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske);
- }
-
- if (wc_curve25519_import_public_ex(input + args->idx,
- length, ssl->peerX25519Key,
- EC25519_LITTLE_ENDIAN) != 0) {
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske);
- }
-
- args->idx += length;
- ssl->peerX25519KeyPresent = 1;
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- if (ssl->peerX448Key == NULL) {
- ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE448,
- (void**)&ssl->peerX448Key);
- if (ret != 0) {
- goto exit_dske;
- }
- } else if (ssl->peerX448KeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE448,
- ssl->peerX448Key);
- ssl->peerX448KeyPresent = 0;
- if (ret != 0) {
- goto exit_dske;
- }
- }
-
- if ((ret = wc_curve448_check_public(
- input + args->idx, length,
- EC448_LITTLE_ENDIAN)) != 0) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_E)
- SendAlert(ssl, alert_fatal, decode_error);
- else if (ret == ECC_OUT_OF_RANGE_E)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- else {
- SendAlert(ssl, alert_fatal, illegal_parameter);
- }
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske);
- }
-
- if (wc_curve448_import_public_ex(input + args->idx,
- length, ssl->peerX448Key,
- EC448_LITTLE_ENDIAN) != 0) {
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske);
- }
-
- args->idx += length;
- ssl->peerX448KeyPresent = 1;
- break;
- }
- #endif
- #ifdef HAVE_ECC
- if (ssl->peerEccKey == NULL) {
- ret = AllocKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->peerEccKey);
- if (ret != 0) {
- goto exit_dske;
- }
- } else if (ssl->peerEccKeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_ECC, ssl->peerEccKey);
- ssl->peerEccKeyPresent = 0;
- if (ret != 0) {
- goto exit_dske;
- }
- }
-
- curveId = wc_ecc_get_oid(curveOid, NULL, NULL);
- if (wc_ecc_import_x963_ex(input + args->idx, length,
- ssl->peerEccKey, curveId) != 0) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, illegal_parameter);
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske);
- }
-
- args->idx += length;
- ssl->peerEccKeyPresent = 1;
- #endif
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- int srvHintLen;
- word16 length;
-
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- ato16(input + args->idx, &length);
- args->idx += OPAQUE16_LEN;
-
- if ((args->idx - args->begin) + length > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- /* get PSK server hint from the wire */
- srvHintLen = min(length, MAX_PSK_ID_LEN);
- XMEMCPY(ssl->arrays->server_hint, input + args->idx,
- srvHintLen);
- ssl->arrays->server_hint[srvHintLen] = '\0'; /* null term */
- args->idx += length;
-
- ret = GetDhPublicKey(ssl, input, size, args);
- if (ret != 0)
- goto exit_dske;
- break;
- }
- #endif /* !NO_DH && !NO_PSK */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- byte b;
- int curveOid, curveId;
- int srvHintLen;
- word16 length;
-
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- ato16(input + args->idx, &length);
- args->idx += OPAQUE16_LEN;
-
- if ((args->idx - args->begin) + length > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- /* get PSK server hint from the wire */
- srvHintLen = min(length, MAX_PSK_ID_LEN);
- XMEMCPY(ssl->arrays->server_hint, input + args->idx,
- srvHintLen);
- ssl->arrays->server_hint[srvHintLen] = '\0'; /* null term */
-
- args->idx += length;
-
- if ((args->idx - args->begin) + ENUM_LEN + OPAQUE16_LEN +
- OPAQUE8_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- /* Check curve name and ID */
- b = input[args->idx++];
- if (b != named_curve) {
- ERROR_OUT(ECC_CURVETYPE_ERROR, exit_dske);
- }
-
- args->idx += 1; /* curve type, eat leading 0 */
- b = input[args->idx++];
- if ((curveOid = CheckCurveId(b)) < 0) {
- ERROR_OUT(ECC_CURVE_ERROR, exit_dske);
- }
-
- length = input[args->idx++];
- if ((args->idx - args->begin) + length > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- if (ssl->peerX25519Key == NULL) {
- ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE25519,
- (void**)&ssl->peerX25519Key);
- if (ret != 0) {
- goto exit_dske;
- }
- } else if (ssl->peerEccKeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE25519,
- ssl->peerX25519Key);
- ssl->peerX25519KeyPresent = 0;
- if (ret != 0) {
- goto exit_dske;
- }
- }
-
- if ((ret = wc_curve25519_check_public(
- input + args->idx, length,
- EC25519_LITTLE_ENDIAN)) != 0) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_E)
- SendAlert(ssl, alert_fatal, decode_error);
- else if (ret == ECC_OUT_OF_RANGE_E)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- else {
- SendAlert(ssl, alert_fatal, illegal_parameter);
- }
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske);
- }
-
- if (wc_curve25519_import_public_ex(input + args->idx,
- length, ssl->peerX25519Key,
- EC25519_LITTLE_ENDIAN) != 0) {
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske);
- }
-
- args->idx += length;
- ssl->peerX25519KeyPresent = 1;
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- if (ssl->peerX448Key == NULL) {
- ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE448,
- (void**)&ssl->peerX448Key);
- if (ret != 0) {
- goto exit_dske;
- }
- } else if (ssl->peerEccKeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE448,
- ssl->peerX448Key);
- ssl->peerX448KeyPresent = 0;
- if (ret != 0) {
- goto exit_dske;
- }
- }
-
- if ((ret = wc_curve448_check_public(
- input + args->idx, length,
- EC448_LITTLE_ENDIAN)) != 0) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_E)
- SendAlert(ssl, alert_fatal, decode_error);
- else if (ret == ECC_OUT_OF_RANGE_E)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- else {
- SendAlert(ssl, alert_fatal, illegal_parameter);
- }
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske);
- }
-
- if (wc_curve448_import_public_ex(input + args->idx,
- length, ssl->peerX448Key,
- EC448_LITTLE_ENDIAN) != 0) {
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske);
- }
-
- args->idx += length;
- ssl->peerX448KeyPresent = 1;
- break;
- }
- #endif
-
- if (ssl->peerEccKey == NULL) {
- ret = AllocKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->peerEccKey);
- if (ret != 0) {
- goto exit_dske;
- }
- } else if (ssl->peerEccKeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_ECC, ssl->peerEccKey);
- ssl->peerEccKeyPresent = 0;
- if (ret != 0) {
- goto exit_dske;
- }
- }
-
- curveId = wc_ecc_get_oid(curveOid, NULL, NULL);
- if (wc_ecc_import_x963_ex(input + args->idx, length,
- ssl->peerEccKey, curveId) != 0) {
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske);
- }
-
- args->idx += length;
- ssl->peerEccKeyPresent = 1;
- break;
- }
- #endif /* (HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448) && !NO_PSK */
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_dske;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_BUILD;
- } /* case TLS_ASYNC_BEGIN */
- FALL_THROUGH;
-
- case TLS_ASYNC_BUILD:
- {
- switch(ssl->specs.kea)
- {
- case psk_kea:
- case dhe_psk_kea:
- case ecdhe_psk_kea:
- {
- /* Nothing to do in this sub-state */
- break;
- }
-
- case diffie_hellman_kea:
- case ecc_diffie_hellman_kea:
- {
- #if defined(NO_DH) && !defined(HAVE_ECC) && \
- !defined(HAVE_CURVE25519) && !defined(HAVE_CURVE448)
- ERROR_OUT(NOT_COMPILED_IN, exit_dske);
- #else
- enum wc_HashType hashType;
- word16 verifySz;
-
- if (ssl->options.usingAnon_cipher) {
- break;
- }
-
- verifySz = (word16)(args->idx - args->begin);
- if (verifySz > MAX_DH_SZ) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- if (IsAtLeastTLSv1_2(ssl)) {
- if ((args->idx - args->begin) + ENUM_LEN + ENUM_LEN >
- size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- DecodeSigAlg(&input[args->idx], &args->hashAlgo,
- &args->sigAlgo);
- args->idx += 2;
- hashType = HashAlgoToType(args->hashAlgo);
- if (hashType == WC_HASH_TYPE_NONE) {
- ERROR_OUT(ALGO_ID_E, exit_dske);
- }
- } else {
- /* only using sha and md5 for rsa */
- #ifndef NO_OLD_TLS
- hashType = WC_HASH_TYPE_SHA;
- if (args->sigAlgo == rsa_sa_algo) {
- hashType = WC_HASH_TYPE_MD5_SHA;
- }
- #else
- ERROR_OUT(ALGO_ID_E, exit_dske);
- #endif
- }
-
- /* signature */
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- ato16(input + args->idx, &args->verifySigSz);
- args->idx += OPAQUE16_LEN;
-
- if ((args->idx - args->begin) + args->verifySigSz > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
-
- /* buffer for signature */
- ssl->buffers.sig.buffer = (byte*)XMALLOC(SEED_LEN + verifySz,
- ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- if (ssl->buffers.sig.buffer == NULL) {
- ERROR_OUT(MEMORY_E, exit_dske);
- }
- ssl->buffers.sig.length = SEED_LEN + verifySz;
-
- /* build message to hash */
- XMEMCPY(ssl->buffers.sig.buffer,
- ssl->arrays->clientRandom, RAN_LEN);
- XMEMCPY(&ssl->buffers.sig.buffer[RAN_LEN],
- ssl->arrays->serverRandom, RAN_LEN);
- XMEMCPY(&ssl->buffers.sig.buffer[RAN_LEN * 2],
- input + args->begin, verifySz); /* message */
-
- if (args->sigAlgo != ed25519_sa_algo) {
- int digest_sz = wc_HashGetDigestSize(hashType);
- if (digest_sz <= 0) {
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
- ssl->buffers.digest.length = (unsigned int)digest_sz;
-
- /* buffer for hash */
- ssl->buffers.digest.buffer = (byte*)XMALLOC(
- ssl->buffers.digest.length, ssl->heap,
- DYNAMIC_TYPE_DIGEST);
- if (ssl->buffers.digest.buffer == NULL) {
- ERROR_OUT(MEMORY_E, exit_dske);
- }
-
- /* Perform hash */
- ret = wc_Hash(hashType, ssl->buffers.sig.buffer,
- ssl->buffers.sig.length,
- ssl->buffers.digest.buffer,
- ssl->buffers.digest.length);
- if (ret != 0) {
- goto exit_dske;
- }
- }
-
- switch (args->sigAlgo)
- {
- #ifndef NO_RSA
- #ifdef WC_RSA_PSS
- case rsa_pss_sa_algo:
- #endif
- case rsa_sa_algo:
- {
- if (ssl->peerRsaKey == NULL ||
- !ssl->peerRsaKeyPresent) {
- ERROR_OUT(NO_PEER_KEY, exit_dske);
- }
- break;
- }
- #endif /* !NO_RSA */
- #ifdef HAVE_ECC
- case ecc_dsa_sa_algo:
- {
- if (!ssl->peerEccDsaKeyPresent) {
- ERROR_OUT(NO_PEER_KEY, exit_dske);
- }
- break;
- }
- #endif /* HAVE_ECC */
- #if defined(HAVE_ED25519)
- case ed25519_sa_algo:
- {
- if (!ssl->peerEd25519KeyPresent) {
- ERROR_OUT(NO_PEER_KEY, exit_dske);
- }
- break;
- }
- #endif /* HAVE_ED25519 */
- #if defined(HAVE_ED448)
- case ed448_sa_algo:
- {
- if (!ssl->peerEd448KeyPresent) {
- ERROR_OUT(NO_PEER_KEY, exit_dske);
- }
- break;
- }
- #endif /* HAVE_ED448 */
-
- default:
- ret = ALGO_ID_E;
- } /* switch (args->sigAlgo) */
-
- #endif /* NO_DH && !HAVE_ECC && !HAVE_ED25519 && !HAVE_ED448 */
- break;
- }
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_dske;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_DO;
- } /* case TLS_ASYNC_BUILD */
- FALL_THROUGH;
-
- case TLS_ASYNC_DO:
- {
- switch(ssl->specs.kea)
- {
- case psk_kea:
- case dhe_psk_kea:
- case ecdhe_psk_kea:
- {
- /* Nothing to do in this sub-state */
- break;
- }
-
- case diffie_hellman_kea:
- case ecc_diffie_hellman_kea:
- {
- #if defined(NO_DH) && !defined(HAVE_ECC) && \
- !defined(HAVE_CURVE25519) && !defined(HAVE_CURVE448)
- ERROR_OUT(NOT_COMPILED_IN, exit_dske);
- #else
- if (ssl->options.usingAnon_cipher) {
- break;
- }
-
- if (args->verifySig == NULL) {
- args->verifySig = (byte*)XMALLOC(args->verifySigSz,
- ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- if (args->verifySig == NULL) {
- ERROR_OUT(MEMORY_E, exit_dske);
- }
- XMEMCPY(args->verifySig, input + args->idx,
- args->verifySigSz);
- }
-
- switch (args->sigAlgo)
- {
- #ifndef NO_RSA
- #ifdef WC_RSA_PSS
- case rsa_pss_sa_algo:
- #endif
- case rsa_sa_algo:
- {
- ret = RsaVerify(ssl,
- args->verifySig, args->verifySigSz,
- &args->output,
- args->sigAlgo, args->hashAlgo,
- ssl->peerRsaKey,
- #ifdef HAVE_PK_CALLBACKS
- &ssl->buffers.peerRsaKey
- #else
- NULL
- #endif
- );
-
- if (ret >= 0) {
- args->sigSz = (word16)ret;
- #ifdef WC_RSA_PSS
- args->bits = mp_count_bits(&ssl->peerRsaKey->n);
- #endif
- ret = 0;
- }
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret != WC_PENDING_E)
- #endif
- {
- /* peerRsaKey */
- FreeKey(ssl, DYNAMIC_TYPE_RSA,
- (void**)&ssl->peerRsaKey);
- ssl->peerRsaKeyPresent = 0;
- }
- break;
- }
- #endif /* !NO_RSA */
- #ifdef HAVE_ECC
- case ecc_dsa_sa_algo:
- {
- ret = EccVerify(ssl,
- args->verifySig, args->verifySigSz,
- ssl->buffers.digest.buffer,
- ssl->buffers.digest.length,
- ssl->peerEccDsaKey,
- #ifdef HAVE_PK_CALLBACKS
- &ssl->buffers.peerEccDsaKey
- #else
- NULL
- #endif
- );
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret != WC_PENDING_E)
- #endif
- {
- /* peerEccDsaKey */
- FreeKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->peerEccDsaKey);
- ssl->peerEccDsaKeyPresent = 0;
- }
- break;
- }
- #endif /* HAVE_ECC */
- #if defined(HAVE_ED25519)
- case ed25519_sa_algo:
- {
- ret = Ed25519Verify(ssl,
- args->verifySig, args->verifySigSz,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length,
- ssl->peerEd25519Key,
- #ifdef HAVE_PK_CALLBACKS
- &ssl->buffers.peerEd25519Key
- #else
- NULL
- #endif
- );
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret != WC_PENDING_E)
- #endif
- {
- /* peerEccDsaKey */
- FreeKey(ssl, DYNAMIC_TYPE_ED25519,
- (void**)&ssl->peerEd25519Key);
- ssl->peerEd25519KeyPresent = 0;
- }
- break;
- }
- #endif /* HAVE_ED25519 */
- #if defined(HAVE_ED448)
- case ed448_sa_algo:
- {
- ret = Ed448Verify(ssl,
- args->verifySig, args->verifySigSz,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length,
- ssl->peerEd448Key,
- #ifdef HAVE_PK_CALLBACKS
- &ssl->buffers.peerEd448Key
- #else
- NULL
- #endif
- );
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret != WC_PENDING_E)
- #endif
- {
- /* peerEccDsaKey */
- FreeKey(ssl, DYNAMIC_TYPE_ED448,
- (void**)&ssl->peerEd448Key);
- ssl->peerEd448KeyPresent = 0;
- }
- break;
- }
- #endif /* HAVE_ED448 */
-
- default:
- ret = ALGO_ID_E;
- } /* switch (sigAlgo) */
- #endif /* NO_DH && !HAVE_ECC && !HAVE_ED25519 && !HAVE_ED448 */
- break;
- }
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_dske;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_VERIFY;
- } /* case TLS_ASYNC_DO */
- FALL_THROUGH;
-
- case TLS_ASYNC_VERIFY:
- {
- switch(ssl->specs.kea)
- {
- case psk_kea:
- case dhe_psk_kea:
- case ecdhe_psk_kea:
- {
- /* Nothing to do in this sub-state */
- break;
- }
-
- case diffie_hellman_kea:
- case ecc_diffie_hellman_kea:
- {
- #if defined(NO_DH) && !defined(HAVE_ECC) && \
- !defined(HAVE_CURVE25519) && !defined(HAVE_CURVE448)
- ERROR_OUT(NOT_COMPILED_IN, exit_dske);
- #else
- if (ssl->options.usingAnon_cipher) {
- break;
- }
-
- /* increment index after verify is done */
- args->idx += args->verifySigSz;
-
- switch(args->sigAlgo)
- {
- #ifndef NO_RSA
- #ifdef WC_RSA_PSS
- case rsa_pss_sa_algo:
- #ifdef HAVE_SELFTEST
- ret = wc_RsaPSS_CheckPadding(
- ssl->buffers.digest.buffer,
- ssl->buffers.digest.length,
- args->output, args->sigSz,
- HashAlgoToType(args->hashAlgo));
- #else
- ret = wc_RsaPSS_CheckPadding_ex(
- ssl->buffers.digest.buffer,
- ssl->buffers.digest.length,
- args->output, args->sigSz,
- HashAlgoToType(args->hashAlgo),
- -1, args->bits);
- #endif
- if (ret != 0)
- return ret;
- break;
- #endif
- case rsa_sa_algo:
- {
- if (IsAtLeastTLSv1_2(ssl)) {
- #ifdef WOLFSSL_SMALL_STACK
- byte* encodedSig;
- #else
- byte encodedSig[MAX_ENCODED_SIG_SZ];
- #endif
- word32 encSigSz;
-
- #ifdef WOLFSSL_SMALL_STACK
- encodedSig = (byte*)XMALLOC(MAX_ENCODED_SIG_SZ,
- ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- if (encodedSig == NULL) {
- ERROR_OUT(MEMORY_E, exit_dske);
- }
- #endif
-
- encSigSz = wc_EncodeSignature(encodedSig,
- ssl->buffers.digest.buffer,
- ssl->buffers.digest.length,
- TypeHash(args->hashAlgo));
- if (encSigSz != args->sigSz || !args->output ||
- XMEMCMP(args->output, encodedSig,
- min(encSigSz, MAX_ENCODED_SIG_SZ)) != 0) {
- ret = VERIFY_SIGN_ERROR;
- }
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(encodedSig, ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- #endif
- if (ret != 0) {
- goto exit_dske;
- }
- }
- else if (args->sigSz != FINISHED_SZ ||
- !args->output ||
- XMEMCMP(args->output,
- ssl->buffers.digest.buffer,
- FINISHED_SZ) != 0) {
- ERROR_OUT(VERIFY_SIGN_ERROR, exit_dske);
- }
- break;
- }
- #endif /* !NO_RSA */
- #ifdef HAVE_ECC
- case ecc_dsa_sa_algo:
- /* Nothing to do in this algo */
- break;
- #endif /* HAVE_ECC */
- #if defined(HAVE_ED25519)
- case ed25519_sa_algo:
- /* Nothing to do in this algo */
- break;
- #endif /* HAVE_ED25519 */
- #if defined(HAVE_ED448)
- case ed448_sa_algo:
- /* Nothing to do in this algo */
- break;
- #endif /* HAVE_ED448 */
- default:
- ret = ALGO_ID_E;
- } /* switch (sigAlgo) */
- #endif /* NO_DH && !HAVE_ECC && !HAVE_ED25519 && !HAVE_ED448 */
- break;
- }
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_dske;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_FINALIZE;
- } /* case TLS_ASYNC_VERIFY */
- FALL_THROUGH;
-
- case TLS_ASYNC_FINALIZE:
- {
- if (IsEncryptionOn(ssl, 0)) {
- args->idx += ssl->keys.padSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- args->idx += MacSize(ssl);
- #endif
- }
-
- /* QSH extensions */
- #ifdef HAVE_QSH
- if (ssl->peerQSHKeyPresent) {
- word16 name;
- int qshSz;
-
- /* extension name */
- ato16(input + args->idx, &name);
- args->idx += OPAQUE16_LEN;
-
- if (name == TLSX_QUANTUM_SAFE_HYBRID) {
- /* if qshSz is larger than 0 it is the length of
- buffer used */
- if ((qshSz = TLSX_QSHCipher_Parse(ssl, input + args->idx,
- size, 0)) < 0) {
- ERROR_OUT(qshSz, exit_dske);
- }
- args->idx += qshSz;
- }
- else {
- /* unknown extension sent server ignored handshake */
- ERROR_OUT(BUFFER_ERROR, exit_dske);
- }
- }
- #endif
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_END;
- } /* case TLS_ASYNC_FINALIZE */
- FALL_THROUGH;
-
- case TLS_ASYNC_END:
- {
- /* return index */
- *inOutIdx = args->idx;
-
- ssl->options.serverState = SERVER_KEYEXCHANGE_COMPLETE;
- break;
- }
- default:
- ret = INPUT_CASE_ERROR;
- } /* switch(ssl->options.asyncState) */
-
-exit_dske:
-
- WOLFSSL_LEAVE("DoServerKeyExchange", ret);
- WOLFSSL_END(WC_FUNC_SERVER_KEY_EXCHANGE_DO);
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* Handle async operation */
- if (ret == WC_PENDING_E) {
- /* Mark message as not received so it can process again */
- ssl->msgsReceived.got_server_key_exchange = 0;
-
- return ret;
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- /* Final cleanup */
- FreeDskeArgs(ssl, args);
- FreeKeyExchange(ssl);
-
- return ret;
-}
-
-
-#ifdef HAVE_QSH
-
-#ifdef HAVE_NTRU
-/* Encrypt a byte array using ntru
- key a struct containing the public key to use
- bufIn array to be encrypted
- inSz size of bufIn array
- bufOut cipher text out
- outSz will be set to the new size of cipher text
- */
-static int NtruSecretEncrypt(QSHKey* key, byte* bufIn, word32 inSz,
- byte* bufOut, word16* outSz)
-{
- int ret;
- DRBG_HANDLE drbg;
-
- /* sanity checks on input arguments */
- if (key == NULL || bufIn == NULL || bufOut == NULL || outSz == NULL)
- return BAD_FUNC_ARG;
-
- if (key->pub.buffer == NULL)
- return BAD_FUNC_ARG;
-
- switch (key->name) {
- case WOLFSSL_NTRU_EESS439:
- case WOLFSSL_NTRU_EESS593:
- case WOLFSSL_NTRU_EESS743:
- break;
- default:
- WOLFSSL_MSG("Unknown QSH encryption key!");
- return -1;
- }
-
- /* set up ntru drbg */
- ret = ntru_crypto_drbg_external_instantiate(GetEntropy, &drbg);
- if (ret != DRBG_OK)
- return NTRU_DRBG_ERROR;
-
- /* encrypt the byte array */
- ret = ntru_crypto_ntru_encrypt(drbg, key->pub.length, key->pub.buffer,
- inSz, bufIn, outSz, bufOut);
- ntru_crypto_drbg_uninstantiate(drbg);
- if (ret != NTRU_OK)
- return NTRU_ENCRYPT_ERROR;
-
- return ret;
-}
-
-/* Decrypt a byte array using ntru
- key a struct containing the private key to use
- bufIn array to be decrypted
- inSz size of bufIn array
- bufOut plain text out
- outSz will be set to the new size of plain text
- */
-
-static int NtruSecretDecrypt(QSHKey* key, byte* bufIn, word32 inSz,
- byte* bufOut, word16* outSz)
-{
- int ret;
- DRBG_HANDLE drbg;
-
- /* sanity checks on input arguments */
- if (key == NULL || bufIn == NULL || bufOut == NULL || outSz == NULL)
- return BAD_FUNC_ARG;
-
- if (key->pri.buffer == NULL)
- return BAD_FUNC_ARG;
-
- switch (key->name) {
- case WOLFSSL_NTRU_EESS439:
- case WOLFSSL_NTRU_EESS593:
- case WOLFSSL_NTRU_EESS743:
- break;
- default:
- WOLFSSL_MSG("Unknown QSH decryption key!");
- return -1;
- }
-
-
- /* set up drbg */
- ret = ntru_crypto_drbg_external_instantiate(GetEntropy, &drbg);
- if (ret != DRBG_OK)
- return NTRU_DRBG_ERROR;
-
- /* decrypt cipher text */
- ret = ntru_crypto_ntru_decrypt(key->pri.length, key->pri.buffer,
- inSz, bufIn, outSz, bufOut);
- ntru_crypto_drbg_uninstantiate(drbg);
- if (ret != NTRU_OK)
- return NTRU_ENCRYPT_ERROR;
-
- return ret;
-}
-#endif /* HAVE_NTRU */
-
-int QSH_Init(WOLFSSL* ssl)
-{
- /* check so not initializing twice when running DTLS */
- if (ssl->QSH_secret != NULL)
- return 0;
-
- /* malloc memory for holding generated secret information */
- if ((ssl->QSH_secret = (QSHSecret*)XMALLOC(sizeof(QSHSecret), ssl->heap,
- DYNAMIC_TYPE_QSH)) == NULL)
- return MEMORY_E;
-
- ssl->QSH_secret->CliSi = (buffer*)XMALLOC(sizeof(buffer), ssl->heap,
- DYNAMIC_TYPE_SECRET);
- if (ssl->QSH_secret->CliSi == NULL)
- return MEMORY_E;
-
- ssl->QSH_secret->SerSi = (buffer*)XMALLOC(sizeof(buffer), ssl->heap,
- DYNAMIC_TYPE_SECRET);
- if (ssl->QSH_secret->SerSi == NULL)
- return MEMORY_E;
-
- /* initialize variables */
- ssl->QSH_secret->list = NULL;
- ssl->QSH_secret->CliSi->length = 0;
- ssl->QSH_secret->CliSi->buffer = NULL;
- ssl->QSH_secret->SerSi->length = 0;
- ssl->QSH_secret->SerSi->buffer = NULL;
-
- return 0;
-}
-
-
-static int QSH_Encrypt(QSHKey* key, byte* in, word32 szIn,
- byte* out, word32* szOut)
-{
- int ret = 0;
- word16 size = *szOut;
-
- (void)in;
- (void)szIn;
- (void)out;
- (void)szOut;
-
- WOLFSSL_MSG("Encrypting QSH key material");
-
- switch (key->name) {
- #ifdef HAVE_NTRU
- case WOLFSSL_NTRU_EESS439:
- case WOLFSSL_NTRU_EESS593:
- case WOLFSSL_NTRU_EESS743:
- ret = NtruSecretEncrypt(key, in, szIn, out, &size);
- break;
- #endif
- default:
- WOLFSSL_MSG("Unknown QSH encryption key!");
- return -1;
- }
-
- *szOut = size;
-
- return ret;
-}
-
-
-/* Decrypt using Quantum Safe Handshake algorithms */
-int QSH_Decrypt(QSHKey* key, byte* in, word32 szIn, byte* out, word16* szOut)
-{
- int ret = 0;
- word16 size = *szOut;
-
- (void)in;
- (void)szIn;
- (void)out;
- (void)szOut;
-
- WOLFSSL_MSG("Decrypting QSH key material");
-
- switch (key->name) {
- #ifdef HAVE_NTRU
- case WOLFSSL_NTRU_EESS439:
- case WOLFSSL_NTRU_EESS593:
- case WOLFSSL_NTRU_EESS743:
- ret = NtruSecretDecrypt(key, in, szIn, out, &size);
- break;
- #endif
- default:
- WOLFSSL_MSG("Unknown QSH decryption key!");
- return -1;
- }
-
- *szOut = size;
-
- return ret;
-}
-
-
-/* Get the max cipher text for corresponding encryption scheme
- (encrypting 48 or max plain text whichever is smaller)
- */
-static word32 QSH_MaxSecret(QSHKey* key)
-{
- int ret = 0;
-#ifdef HAVE_NTRU
- byte isNtru = 0;
- word16 inSz = 48;
- word16 outSz;
- DRBG_HANDLE drbg = 0;
- byte bufIn[48];
-#endif
-
- if (key == NULL || key->pub.length == 0)
- return 0;
-
- switch(key->name) {
-#ifdef HAVE_NTRU
- case WOLFSSL_NTRU_EESS439:
- isNtru = 1;
- break;
- case WOLFSSL_NTRU_EESS593:
- isNtru = 1;
- break;
- case WOLFSSL_NTRU_EESS743:
- isNtru = 1;
- break;
-#endif
- default:
- WOLFSSL_MSG("Unknown QSH encryption scheme size!");
- return 0;
- }
-
-#ifdef HAVE_NTRU
- if (isNtru) {
- ret = ntru_crypto_drbg_external_instantiate(GetEntropy, &drbg);
- if (ret != DRBG_OK)
- return NTRU_DRBG_ERROR;
- ret = ntru_crypto_ntru_encrypt(drbg, key->pub.length,
- key->pub.buffer, inSz, bufIn, &outSz, NULL);
- if (ret != NTRU_OK) {
- return NTRU_ENCRYPT_ERROR;
- }
- ntru_crypto_drbg_uninstantiate(drbg);
- ret = outSz;
- }
-#endif
-
- return ret;
-}
-
-/* Generate the secret byte material for pms
- returns length on success and -1 on fail
- */
-static int QSH_GenerateSerCliSecret(WOLFSSL* ssl, byte isServer)
-{
- int sz = 0;
- int plainSz = 48; /* lesser of 48 and max plain text able to encrypt */
- int offset = 0;
- word32 tmpSz = 0;
- buffer* buf;
- QSHKey* current;
- QSHScheme* schmPre = NULL;
- QSHScheme* schm = NULL;
-
- if (ssl == NULL)
- return -1;
-
- WOLFSSL_MSG("Generating QSH secret key material");
-
- current = ssl->peerQSHKey;
- /* get size of buffer needed */
- while (current) {
- if (current->pub.length != 0) {
- sz += plainSz;
- }
- current = (QSHKey*)current->next;
- }
-
- /* allocate memory for buffer */
- if (isServer) {
- buf = ssl->QSH_secret->SerSi;
- }
- else {
- buf = ssl->QSH_secret->CliSi;
- }
- buf->length = sz;
- buf->buffer = (byte*)XMALLOC(sz, ssl->heap, DYNAMIC_TYPE_SECRET);
- if (buf->buffer == NULL) {
- WOLFSSL_ERROR(MEMORY_E);
- }
-
- /* create secret information */
- sz = 0;
- current = ssl->peerQSHKey;
- while (current) {
- schm = (QSHScheme*)XMALLOC(sizeof(QSHScheme), ssl->heap,
- DYNAMIC_TYPE_QSH);
- if (schm == NULL)
- return MEMORY_E;
-
- /* initialize variables */
- schm->name = 0;
- schm->PK = NULL;
- schm->PKLen = 0;
- schm->next = NULL;
- if (ssl->QSH_secret->list == NULL) {
- ssl->QSH_secret->list = schm;
- }
- else {
- if (schmPre)
- schmPre->next = schm;
- }
-
- tmpSz = QSH_MaxSecret(current);
-
- if ((schm->PK = (byte*)XMALLOC(tmpSz, ssl->heap,
- DYNAMIC_TYPE_SECRET)) == NULL)
- return -1;
-
- /* store info for writing extension */
- schm->name = current->name;
-
- /* no key to use for encryption */
- if (tmpSz == 0) {
- current = (QSHKey*)current->next;
- continue;
- }
-
- if (wc_RNG_GenerateBlock(ssl->rng, buf->buffer + offset, plainSz)
- != 0) {
- return -1;
- }
- if (QSH_Encrypt(current, buf->buffer + offset, plainSz, schm->PK,
- &tmpSz) != 0) {
- return -1;
- }
- schm->PKLen = tmpSz;
-
- sz += tmpSz;
- offset += plainSz;
- schmPre = schm;
- current = (QSHKey*)current->next;
- }
-
- return sz;
-}
-
-
-static word32 QSH_KeyGetSize(WOLFSSL* ssl)
-{
- word32 sz = 0;
- QSHKey* current;
-
- if (ssl == NULL)
- return -1;
-
- current = ssl->peerQSHKey;
- sz += OPAQUE16_LEN; /* type of extension ie 0x00 0x18 */
- sz += OPAQUE24_LEN;
- /* get size of buffer needed */
- while (current) {
- sz += OPAQUE16_LEN; /* scheme id */
- sz += OPAQUE16_LEN; /* encrypted key len*/
- sz += QSH_MaxSecret(current);
- current = (QSHKey*)current->next;
- }
-
- return sz;
-}
-
-
-/* handle QSH key Exchange
- return 0 on success
- */
-static word32 QSH_KeyExchangeWrite(WOLFSSL* ssl, byte isServer)
-{
- int ret = 0;
-
- WOLFSSL_ENTER("QSH KeyExchange");
-
- ret = QSH_GenerateSerCliSecret(ssl, isServer);
- if (ret < 0)
- return MEMORY_E;
-
- return 0;
-}
-
-#endif /* HAVE_QSH */
-
-
-typedef struct SckeArgs {
- byte* output; /* not allocated */
- byte* encSecret;
- byte* input;
- word32 encSz;
- word32 length;
- int sendSz;
- int inputSz;
-} SckeArgs;
-
-static void FreeSckeArgs(WOLFSSL* ssl, void* pArgs)
-{
- SckeArgs* args = (SckeArgs*)pArgs;
-
- (void)ssl;
-
- if (args->encSecret) {
- XFREE(args->encSecret, ssl->heap, DYNAMIC_TYPE_SECRET);
- args->encSecret = NULL;
- }
- if (args->input) {
- XFREE(args->input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- args->input = NULL;
- }
-}
-
-/* handle generation client_key_exchange (16) */
-int SendClientKeyExchange(WOLFSSL* ssl)
-{
- int ret = 0;
-#ifdef WOLFSSL_ASYNC_CRYPT
- SckeArgs* args = (SckeArgs*)ssl->async.args;
- typedef char args_test[sizeof(ssl->async.args) >= sizeof(*args) ? 1 : -1];
- (void)sizeof(args_test);
-#else
- SckeArgs args[1];
-#endif
-
- WOLFSSL_START(WC_FUNC_CLIENT_KEY_EXCHANGE_SEND);
- WOLFSSL_ENTER("SendClientKeyExchange");
-
-#ifdef OPENSSL_EXTRA
- ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;
- ssl->cbmode = SSL_CB_MODE_WRITE;
- if (ssl->CBIS != NULL)
- ssl->CBIS(ssl, SSL_CB_CONNECT_LOOP, SSL_SUCCESS);
-#endif
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
- if (ret != WC_NOT_PENDING_E) {
- /* Check for error */
- if (ret < 0)
- goto exit_scke;
- }
- else
-#endif
- {
- /* Reset state */
- ret = 0;
- ssl->options.asyncState = TLS_ASYNC_BEGIN;
- XMEMSET(args, 0, sizeof(SckeArgs));
- #ifdef WOLFSSL_ASYNC_CRYPT
- ssl->async.freeArgs = FreeSckeArgs;
- #endif
- }
-
- switch(ssl->options.asyncState)
- {
- case TLS_ASYNC_BEGIN:
- {
- switch (ssl->specs.kea) {
- #ifndef NO_RSA
- case rsa_kea:
- if (ssl->peerRsaKey == NULL ||
- ssl->peerRsaKeyPresent == 0) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
- break;
- #endif
- #ifndef NO_DH
- case diffie_hellman_kea:
- if (ssl->buffers.serverDH_P.buffer == NULL ||
- ssl->buffers.serverDH_G.buffer == NULL ||
- ssl->buffers.serverDH_Pub.buffer == NULL) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
- break;
- #endif /* NO_DH */
- #ifndef NO_PSK
- case psk_kea:
- /* sanity check that PSK client callback has been set */
- if (ssl->options.client_psk_cb == NULL) {
- WOLFSSL_MSG("No client PSK callback set");
- ERROR_OUT(PSK_KEY_ERROR, exit_scke);
- }
- break;
- #endif /* NO_PSK */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- if (ssl->buffers.serverDH_P.buffer == NULL ||
- ssl->buffers.serverDH_G.buffer == NULL ||
- ssl->buffers.serverDH_Pub.buffer == NULL) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
-
- /* sanity check that PSK client callback has been set */
- if (ssl->options.client_psk_cb == NULL) {
- WOLFSSL_MSG("No client PSK callback set");
- ERROR_OUT(PSK_KEY_ERROR, exit_scke);
- }
- break;
- #endif /* !NO_DH && !NO_PSK */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- /* sanity check that PSK client callback has been set */
- if (ssl->options.client_psk_cb == NULL) {
- WOLFSSL_MSG("No client PSK callback set");
- ERROR_OUT(PSK_KEY_ERROR, exit_scke);
- }
-
- #ifdef HAVE_CURVE25519
- if (ssl->peerX25519KeyPresent) {
- /* Check client ECC public key */
- if (!ssl->peerX25519Key || !ssl->peerX25519Key->dp) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
-
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->X25519SharedSecretCb != NULL) {
- break;
- }
- #endif
-
- /* create private key */
- ssl->hsType = DYNAMIC_TYPE_CURVE25519;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_scke;
- }
-
- ret = X25519MakeKey(ssl, (curve25519_key*)ssl->hsKey,
- ssl->peerX25519Key);
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->peerX448KeyPresent) {
- /* Check client ECC public key */
- if (!ssl->peerX448Key) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
-
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->X448SharedSecretCb != NULL) {
- break;
- }
- #endif
-
- /* create private key */
- ssl->hsType = DYNAMIC_TYPE_CURVE448;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_scke;
- }
-
- ret = X448MakeKey(ssl, (curve448_key*)ssl->hsKey,
- ssl->peerX448Key);
- break;
- }
- #endif
- /* Check client ECC public key */
- if (!ssl->peerEccKey || !ssl->peerEccKeyPresent ||
- !ssl->peerEccKey->dp) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
-
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->EccSharedSecretCb != NULL) {
- break;
- }
- #endif
-
- /* create ephemeral private key */
- ssl->hsType = DYNAMIC_TYPE_ECC;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_scke;
- }
-
- ret = EccMakeKey(ssl, (ecc_key*)ssl->hsKey, ssl->peerEccKey);
-
- break;
- #endif /* (HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448) && !NO_PSK */
- #ifdef HAVE_NTRU
- case ntru_kea:
- if (ssl->peerNtruKeyPresent == 0) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
- break;
- #endif /* HAVE_NTRU */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- #ifdef HAVE_ECC
- ecc_key* peerKey;
- #endif
-
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- if (ssl->ctx->X25519SharedSecretCb != NULL)
- break;
- }
- else
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- if (ssl->ctx->X448SharedSecretCb != NULL)
- break;
- }
- else
- #endif
- if (ssl->ctx->EccSharedSecretCb != NULL) {
- break;
- }
- #endif /* HAVE_PK_CALLBACKS */
-
- #ifdef HAVE_CURVE25519
- if (ssl->peerX25519KeyPresent) {
- if (!ssl->peerX25519Key || !ssl->peerX25519Key->dp) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
-
- /* create private key */
- ssl->hsType = DYNAMIC_TYPE_CURVE25519;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_scke;
- }
-
- ret = X25519MakeKey(ssl, (curve25519_key*)ssl->hsKey,
- ssl->peerX25519Key);
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->peerX448KeyPresent) {
- if (!ssl->peerX448Key) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
-
- /* create private key */
- ssl->hsType = DYNAMIC_TYPE_CURVE448;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_scke;
- }
-
- ret = X448MakeKey(ssl, (curve448_key*)ssl->hsKey,
- ssl->peerX448Key);
- break;
- }
- #endif
- #ifdef HAVE_ECC
- if (ssl->specs.static_ecdh) {
- /* Note: EccDsa is really fixed Ecc key here */
- if (!ssl->peerEccDsaKey || !ssl->peerEccDsaKeyPresent) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
- peerKey = ssl->peerEccDsaKey;
- }
- else {
- if (!ssl->peerEccKey || !ssl->peerEccKeyPresent) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
- peerKey = ssl->peerEccKey;
- }
- if (peerKey == NULL) {
- ERROR_OUT(NO_PEER_KEY, exit_scke);
- }
-
- /* create ephemeral private key */
- ssl->hsType = DYNAMIC_TYPE_ECC;
- ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
- if (ret != 0) {
- goto exit_scke;
- }
-
- ret = EccMakeKey(ssl, (ecc_key*)ssl->hsKey, peerKey);
- #endif
-
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_scke;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_BUILD;
- } /* case TLS_ASYNC_BEGIN */
- FALL_THROUGH;
-
- case TLS_ASYNC_BUILD:
- {
- args->encSz = MAX_ENCRYPT_SZ;
- args->encSecret = (byte*)XMALLOC(args->encSz, ssl->heap,
- DYNAMIC_TYPE_SECRET);
- if (args->encSecret == NULL) {
- ERROR_OUT(MEMORY_E, exit_scke);
- }
- if (ssl->arrays->preMasterSecret == NULL) {
- ssl->arrays->preMasterSz = ENCRYPT_LEN;
- ssl->arrays->preMasterSecret = (byte*)XMALLOC(ENCRYPT_LEN,
- ssl->heap, DYNAMIC_TYPE_SECRET);
- if (ssl->arrays->preMasterSecret == NULL) {
- ERROR_OUT(MEMORY_E, exit_scke);
- }
- XMEMSET(ssl->arrays->preMasterSecret, 0, ENCRYPT_LEN);
- }
-
- switch(ssl->specs.kea)
- {
- #ifndef NO_RSA
- case rsa_kea:
- {
- /* build PreMasterSecret with RNG data */
- #if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl)) {
- ret = tsip_generatePremasterSecret(
- &ssl->arrays->preMasterSecret[VERSION_SZ],
- ENCRYPT_LEN - VERSION_SZ);
- } else {
- #endif
- ret = wc_RNG_GenerateBlock(ssl->rng,
- &ssl->arrays->preMasterSecret[VERSION_SZ],
- SECRET_LEN - VERSION_SZ);
- #if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- }
- #endif
- if (ret != 0) {
- goto exit_scke;
- }
-
- ssl->arrays->preMasterSecret[0] = ssl->chVersion.major;
- ssl->arrays->preMasterSecret[1] = ssl->chVersion.minor;
-
- ssl->arrays->preMasterSz = SECRET_LEN;
-
- break;
- }
- #endif /* !NO_RSA */
- #ifndef NO_DH
- case diffie_hellman_kea:
- {
- ssl->buffers.sig.length = ENCRYPT_LEN;
- ssl->buffers.sig.buffer = (byte*)XMALLOC(ENCRYPT_LEN,
- ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- if (ssl->buffers.sig.buffer == NULL) {
- ERROR_OUT(MEMORY_E, exit_scke);
- }
-
- ret = AllocKey(ssl, DYNAMIC_TYPE_DH,
- (void**)&ssl->buffers.serverDH_Key);
- if (ret != 0) {
- goto exit_scke;
- }
-
- #if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
- !defined(WOLFSSL_OLD_PRIME_CHECK)
- if (ssl->options.dhDoKeyTest &&
- !ssl->options.dhKeyTested)
- {
- ret = wc_DhSetCheckKey(ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length,
- ssl->buffers.serverDH_G.buffer,
- ssl->buffers.serverDH_G.length,
- NULL, 0, 0, ssl->rng);
- if (ret != 0) {
- goto exit_scke;
- }
- ssl->options.dhKeyTested = 1;
- }
- else
- #endif
- {
- ret = wc_DhSetKey(ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length,
- ssl->buffers.serverDH_G.buffer,
- ssl->buffers.serverDH_G.length);
- if (ret != 0) {
- goto exit_scke;
- }
- }
-
- /* for DH, encSecret is Yc, agree is pre-master */
- ret = DhGenKeyPair(ssl, ssl->buffers.serverDH_Key,
- ssl->buffers.sig.buffer, (word32*)&ssl->buffers.sig.length,
- args->encSecret, &args->encSz);
-
- /* set the max agree result size */
- ssl->arrays->preMasterSz = ENCRYPT_LEN;
- break;
- }
- #endif /* !NO_DH */
- #ifndef NO_PSK
- case psk_kea:
- {
- byte* pms = ssl->arrays->preMasterSecret;
- ssl->arrays->psk_keySz = ssl->options.client_psk_cb(ssl,
- ssl->arrays->server_hint, ssl->arrays->client_identity,
- MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN);
- if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
- ERROR_OUT(PSK_KEY_ERROR, exit_scke);
- }
- ssl->arrays->client_identity[MAX_PSK_ID_LEN] = '\0'; /* null term */
- args->encSz = (word32)XSTRLEN(ssl->arrays->client_identity);
- if (args->encSz > MAX_PSK_ID_LEN) {
- ERROR_OUT(CLIENT_ID_ERROR, exit_scke);
- }
- XMEMCPY(args->encSecret, ssl->arrays->client_identity,
- args->encSz);
-
- /* make psk pre master secret */
- /* length of key + length 0s + length of key + key */
- c16toa((word16)ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
- XMEMSET(pms, 0, ssl->arrays->psk_keySz);
- pms += ssl->arrays->psk_keySz;
- c16toa((word16)ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
- XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz = (ssl->arrays->psk_keySz * 2) +
- (2 * OPAQUE16_LEN);
- ForceZero(ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->psk_keySz = 0; /* No further need */
- break;
- }
- #endif /* !NO_PSK */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- word32 esSz = 0;
- args->output = args->encSecret;
-
- ssl->arrays->psk_keySz = ssl->options.client_psk_cb(ssl,
- ssl->arrays->server_hint, ssl->arrays->client_identity,
- MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN);
- if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
- ERROR_OUT(PSK_KEY_ERROR, exit_scke);
- }
- ssl->arrays->client_identity[MAX_PSK_ID_LEN] = '\0'; /* null term */
- esSz = (word32)XSTRLEN(ssl->arrays->client_identity);
-
- if (esSz > MAX_PSK_ID_LEN) {
- ERROR_OUT(CLIENT_ID_ERROR, exit_scke);
- }
-
- ssl->buffers.sig.length = ENCRYPT_LEN;
- ssl->buffers.sig.buffer = (byte*)XMALLOC(ENCRYPT_LEN,
- ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- if (ssl->buffers.sig.buffer == NULL) {
- ERROR_OUT(MEMORY_E, exit_scke);
- }
-
- c16toa((word16)esSz, args->output);
- args->output += OPAQUE16_LEN;
- XMEMCPY(args->output, ssl->arrays->client_identity, esSz);
- args->output += esSz;
- args->encSz = esSz + OPAQUE16_LEN;
-
- args->length = 0;
-
- ret = AllocKey(ssl, DYNAMIC_TYPE_DH,
- (void**)&ssl->buffers.serverDH_Key);
- if (ret != 0) {
- goto exit_scke;
- }
-
- #if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && \
- !defined(WOLFSSL_OLD_PRIME_CHECK)
- if (ssl->options.dhDoKeyTest &&
- !ssl->options.dhKeyTested)
- {
- ret = wc_DhSetCheckKey(ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length,
- ssl->buffers.serverDH_G.buffer,
- ssl->buffers.serverDH_G.length,
- NULL, 0, 0, ssl->rng);
- if (ret != 0) {
- goto exit_scke;
- }
- ssl->options.dhKeyTested = 1;
- }
- else
- #endif
- {
- ret = wc_DhSetKey(ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length,
- ssl->buffers.serverDH_G.buffer,
- ssl->buffers.serverDH_G.length);
- if (ret != 0) {
- goto exit_scke;
- }
- }
-
- /* for DH, encSecret is Yc, agree is pre-master */
- ret = DhGenKeyPair(ssl, ssl->buffers.serverDH_Key,
- ssl->buffers.sig.buffer, (word32*)&ssl->buffers.sig.length,
- args->output + OPAQUE16_LEN, &args->length);
- break;
- }
- #endif /* !NO_DH && !NO_PSK */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- word32 esSz = 0;
- args->output = args->encSecret;
-
- /* Send PSK client identity */
- ssl->arrays->psk_keySz = ssl->options.client_psk_cb(ssl,
- ssl->arrays->server_hint, ssl->arrays->client_identity,
- MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN);
- if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
- ERROR_OUT(PSK_KEY_ERROR, exit_scke);
- }
- ssl->arrays->client_identity[MAX_PSK_ID_LEN] = '\0'; /* null term */
- esSz = (word32)XSTRLEN(ssl->arrays->client_identity);
- if (esSz > MAX_PSK_ID_LEN) {
- ERROR_OUT(CLIENT_ID_ERROR, exit_scke);
- }
-
- /* place size and identity in output buffer sz:identity */
- c16toa((word16)esSz, args->output);
- args->output += OPAQUE16_LEN;
- XMEMCPY(args->output, ssl->arrays->client_identity, esSz);
- args->output += esSz;
- args->encSz = esSz + OPAQUE16_LEN;
-
- /* length is used for public key size */
- args->length = MAX_ENCRYPT_SZ;
-
- /* Create shared ECC key leaving room at the beginning
- of buffer for size of shared key. */
- ssl->arrays->preMasterSz = ENCRYPT_LEN - OPAQUE16_LEN;
-
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->X25519SharedSecretCb != NULL) {
- break;
- }
- #endif
-
- ret = wc_curve25519_export_public_ex(
- (curve25519_key*)ssl->hsKey,
- args->output + OPAQUE8_LEN, &args->length,
- EC25519_LITTLE_ENDIAN);
- if (ret != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_scke);
- }
-
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->X448SharedSecretCb != NULL) {
- break;
- }
- #endif
-
- ret = wc_curve448_export_public_ex(
- (curve448_key*)ssl->hsKey,
- args->output + OPAQUE8_LEN, &args->length,
- EC448_LITTLE_ENDIAN);
- if (ret != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_scke);
- }
-
- break;
- }
- #endif
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->EccSharedSecretCb != NULL) {
- break;
- }
- #endif
-
- /* Place ECC key in output buffer, leaving room for size */
- ret = wc_ecc_export_x963((ecc_key*)ssl->hsKey,
- args->output + OPAQUE8_LEN, &args->length);
- if (ret != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_scke);
- }
-
- break;
- }
- #endif /* (HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448) && !NO_PSK */
- #ifdef HAVE_NTRU
- case ntru_kea:
- {
- ret = wc_RNG_GenerateBlock(ssl->rng,
- ssl->arrays->preMasterSecret, SECRET_LEN);
- if (ret != 0) {
- goto exit_scke;
- }
-
- ssl->arrays->preMasterSz = SECRET_LEN;
- args->encSz = MAX_ENCRYPT_SZ;
- break;
- }
- #endif /* HAVE_NTRU */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- ssl->arrays->preMasterSz = ENCRYPT_LEN;
-
- #ifdef HAVE_CURVE25519
- if (ssl->hsType == DYNAMIC_TYPE_CURVE25519) {
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->X25519SharedSecretCb != NULL) {
- break;
- }
- #endif
-
- ret = wc_curve25519_export_public_ex(
- (curve25519_key*)ssl->hsKey,
- args->encSecret + OPAQUE8_LEN, &args->encSz,
- EC25519_LITTLE_ENDIAN);
- if (ret != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_scke);
- }
-
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->hsType == DYNAMIC_TYPE_CURVE448) {
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->X448SharedSecretCb != NULL) {
- break;
- }
- #endif
-
- ret = wc_curve448_export_public_ex(
- (curve448_key*)ssl->hsKey,
- args->encSecret + OPAQUE8_LEN, &args->encSz,
- EC448_LITTLE_ENDIAN);
- if (ret != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_scke);
- }
-
- break;
- }
- #endif
- #if defined(HAVE_ECC) && defined(HAVE_ECC_KEY_EXPORT)
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->EccSharedSecretCb != NULL) {
- break;
- }
- #endif
-
- /* Place ECC key in buffer, leaving room for size */
- ret = wc_ecc_export_x963((ecc_key*)ssl->hsKey,
- args->encSecret + OPAQUE8_LEN, &args->encSz);
- if (ret != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_scke);
- }
- #endif /* HAVE_ECC */
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_scke;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_DO;
- } /* case TLS_ASYNC_BUILD */
- FALL_THROUGH;
-
- case TLS_ASYNC_DO:
- {
- switch(ssl->specs.kea)
- {
- #ifndef NO_RSA
- case rsa_kea:
- {
- #if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl) &&
- wc_RsaEncryptSize(ssl->peerRsaKey) == 256) {
- ret = tsip_generateEncryptPreMasterSecret(ssl,
- args->encSecret,
- &args->encSz);
-
- } else
- #endif
- ret = RsaEnc(ssl,
- ssl->arrays->preMasterSecret, SECRET_LEN,
- args->encSecret, &args->encSz,
- ssl->peerRsaKey,
- #if defined(HAVE_PK_CALLBACKS)
- &ssl->buffers.peerRsaKey
- #else
- NULL
- #endif
- );
-
- break;
- }
- #endif /* !NO_RSA */
- #ifndef NO_DH
- case diffie_hellman_kea:
- {
- ret = DhAgree(ssl, ssl->buffers.serverDH_Key,
- ssl->buffers.sig.buffer, ssl->buffers.sig.length,
- ssl->buffers.serverDH_Pub.buffer,
- ssl->buffers.serverDH_Pub.length,
- ssl->arrays->preMasterSecret,
- &ssl->arrays->preMasterSz);
- break;
- }
- #endif /* !NO_DH */
- #ifndef NO_PSK
- case psk_kea:
- {
- break;
- }
- #endif /* !NO_PSK */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- ret = DhAgree(ssl, ssl->buffers.serverDH_Key,
- ssl->buffers.sig.buffer, ssl->buffers.sig.length,
- ssl->buffers.serverDH_Pub.buffer,
- ssl->buffers.serverDH_Pub.length,
- ssl->arrays->preMasterSecret + OPAQUE16_LEN,
- &ssl->arrays->preMasterSz);
- break;
- }
- #endif /* !NO_DH && !NO_PSK */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- #ifdef HAVE_CURVE25519
- if (ssl->peerX25519KeyPresent) {
- ret = X25519SharedSecret(ssl,
- (curve25519_key*)ssl->hsKey, ssl->peerX25519Key,
- args->output + OPAQUE8_LEN, &args->length,
- ssl->arrays->preMasterSecret + OPAQUE16_LEN,
- &ssl->arrays->preMasterSz,
- WOLFSSL_CLIENT_END
- );
- if (!ssl->specs.static_ecdh
- #ifdef WOLFSSL_ASYNC_CRYPT
- && ret != WC_PENDING_E
- #endif
- ) {
- FreeKey(ssl, DYNAMIC_TYPE_CURVE25519,
- (void**)&ssl->peerX25519Key);
- ssl->peerX25519KeyPresent = 0;
- }
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->peerX448KeyPresent) {
- ret = X448SharedSecret(ssl,
- (curve448_key*)ssl->hsKey, ssl->peerX448Key,
- args->output + OPAQUE8_LEN, &args->length,
- ssl->arrays->preMasterSecret + OPAQUE16_LEN,
- &ssl->arrays->preMasterSz,
- WOLFSSL_CLIENT_END
- );
- if (!ssl->specs.static_ecdh
- #ifdef WOLFSSL_ASYNC_CRYPT
- && ret != WC_PENDING_E
- #endif
- ) {
- FreeKey(ssl, DYNAMIC_TYPE_CURVE448,
- (void**)&ssl->peerX448Key);
- ssl->peerX448KeyPresent = 0;
- }
- break;
- }
- #endif
- ret = EccSharedSecret(ssl,
- (ecc_key*)ssl->hsKey, ssl->peerEccKey,
- args->output + OPAQUE8_LEN, &args->length,
- ssl->arrays->preMasterSecret + OPAQUE16_LEN,
- &ssl->arrays->preMasterSz,
- WOLFSSL_CLIENT_END
- );
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret != WC_PENDING_E)
- #endif
- {
- FreeKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->peerEccKey);
- ssl->peerEccKeyPresent = 0;
- }
- break;
- }
- #endif /* (HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448) && !NO_PSK */
- #ifdef HAVE_NTRU
- case ntru_kea:
- {
- word32 rc;
- word16 tmpEncSz = (word16)args->encSz;
- DRBG_HANDLE drbg;
-
- rc = ntru_crypto_drbg_external_instantiate(GetEntropy, &drbg);
- if (rc != DRBG_OK) {
- ERROR_OUT(NTRU_DRBG_ERROR, exit_scke);
- }
- rc = ntru_crypto_ntru_encrypt(drbg, ssl->peerNtruKeyLen,
- ssl->peerNtruKey,
- ssl->arrays->preMasterSz,
- ssl->arrays->preMasterSecret,
- &tmpEncSz,
- args->encSecret);
- args->encSz = tmpEncSz;
- ntru_crypto_drbg_uninstantiate(drbg);
- if (rc != NTRU_OK) {
- ERROR_OUT(NTRU_ENCRYPT_ERROR, exit_scke);
- }
- ret = 0;
- break;
- }
- #endif /* HAVE_NTRU */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- #ifdef HAVE_ECC
- ecc_key* peerKey;
- #endif
-
- #ifdef HAVE_CURVE25519
- if (ssl->peerX25519KeyPresent) {
- ret = X25519SharedSecret(ssl,
- (curve25519_key*)ssl->hsKey, ssl->peerX25519Key,
- args->encSecret + OPAQUE8_LEN, &args->encSz,
- ssl->arrays->preMasterSecret,
- &ssl->arrays->preMasterSz,
- WOLFSSL_CLIENT_END
- );
- if (!ssl->specs.static_ecdh
- #ifdef WOLFSSL_ASYNC_CRYPT
- && ret != WC_PENDING_E
- #endif
- ) {
- FreeKey(ssl, DYNAMIC_TYPE_CURVE25519,
- (void**)&ssl->peerX25519Key);
- ssl->peerX25519KeyPresent = 0;
- }
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->peerX448KeyPresent) {
- ret = X448SharedSecret(ssl,
- (curve448_key*)ssl->hsKey, ssl->peerX448Key,
- args->encSecret + OPAQUE8_LEN, &args->encSz,
- ssl->arrays->preMasterSecret,
- &ssl->arrays->preMasterSz,
- WOLFSSL_CLIENT_END
- );
- if (!ssl->specs.static_ecdh
- #ifdef WOLFSSL_ASYNC_CRYPT
- && ret != WC_PENDING_E
- #endif
- ) {
- FreeKey(ssl, DYNAMIC_TYPE_CURVE448,
- (void**)&ssl->peerX448Key);
- ssl->peerX448KeyPresent = 0;
- }
- break;
- }
- #endif
- #ifdef HAVE_ECC
- peerKey = (ssl->specs.static_ecdh) ?
- ssl->peerEccDsaKey : ssl->peerEccKey;
-
- ret = EccSharedSecret(ssl,
- (ecc_key*)ssl->hsKey, peerKey,
- args->encSecret + OPAQUE8_LEN, &args->encSz,
- ssl->arrays->preMasterSecret,
- &ssl->arrays->preMasterSz,
- WOLFSSL_CLIENT_END
- );
- if (!ssl->specs.static_ecdh
- #ifdef WOLFSSL_ASYNC_CRYPT
- && ret != WC_PENDING_E
- #endif
- && !ssl->options.keepResources) {
- FreeKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->peerEccKey);
- ssl->peerEccKeyPresent = 0;
- }
- #endif
-
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_scke;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_VERIFY;
- } /* case TLS_ASYNC_DO */
- FALL_THROUGH;
-
- case TLS_ASYNC_VERIFY:
- {
- switch(ssl->specs.kea)
- {
- #ifndef NO_RSA
- case rsa_kea:
- {
- break;
- }
- #endif /* !NO_RSA */
- #ifndef NO_DH
- case diffie_hellman_kea:
- {
- break;
- }
- #endif /* !NO_DH */
- #ifndef NO_PSK
- case psk_kea:
- {
- break;
- }
- #endif /* !NO_PSK */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- byte* pms = ssl->arrays->preMasterSecret;
-
- /* validate args */
- if (args->output == NULL || args->length == 0) {
- ERROR_OUT(BAD_FUNC_ARG, exit_scke);
- }
-
- c16toa((word16)args->length, args->output);
- args->encSz += args->length + OPAQUE16_LEN;
- c16toa((word16)ssl->arrays->preMasterSz, pms);
- ssl->arrays->preMasterSz += OPAQUE16_LEN;
- pms += ssl->arrays->preMasterSz;
-
- /* make psk pre master secret */
- /* length of key + length 0s + length of key + key */
- c16toa((word16)ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
- XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz +=
- ssl->arrays->psk_keySz + OPAQUE16_LEN;
- ForceZero(ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->psk_keySz = 0; /* No further need */
- break;
- }
- #endif /* !NO_DH && !NO_PSK */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- byte* pms = ssl->arrays->preMasterSecret;
-
- /* validate args */
- if (args->output == NULL || args->length > ENCRYPT_LEN) {
- ERROR_OUT(BAD_FUNC_ARG, exit_scke);
- }
-
- /* place size of public key in output buffer */
- *args->output = (byte)args->length;
- args->encSz += args->length + OPAQUE8_LEN;
-
- /* Create pre master secret is the concatenation of
- eccSize + eccSharedKey + pskSize + pskKey */
- c16toa((word16)ssl->arrays->preMasterSz, pms);
- ssl->arrays->preMasterSz += OPAQUE16_LEN;
- pms += ssl->arrays->preMasterSz;
-
- c16toa((word16)ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
- XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz +=
- ssl->arrays->psk_keySz + OPAQUE16_LEN;
-
- ForceZero(ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->psk_keySz = 0; /* No further need */
- break;
- }
- #endif /* (HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448) && !NO_PSK */
- #ifdef HAVE_NTRU
- case ntru_kea:
- {
- break;
- }
- #endif /* HAVE_NTRU */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- /* place size of public key in buffer */
- *args->encSecret = (byte)args->encSz;
- args->encSz += OPAQUE8_LEN;
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_scke;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_FINALIZE;
- } /* case TLS_ASYNC_VERIFY */
- FALL_THROUGH;
-
- case TLS_ASYNC_FINALIZE:
- {
- word32 tlsSz = 0;
- word32 idx = 0;
-
- #ifdef HAVE_QSH
- word32 qshSz = 0;
- if (ssl->peerQSHKeyPresent) {
- qshSz = QSH_KeyGetSize(ssl);
- }
- #endif
-
- if (ssl->options.tls || ssl->specs.kea == diffie_hellman_kea) {
- tlsSz = 2;
- }
-
- if (ssl->specs.kea == ecc_diffie_hellman_kea ||
- ssl->specs.kea == dhe_psk_kea ||
- ssl->specs.kea == ecdhe_psk_kea) { /* always off */
- tlsSz = 0;
- }
-
- idx = HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ;
- args->sendSz = args->encSz + tlsSz + idx;
-
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- idx += DTLS_HANDSHAKE_EXTRA + DTLS_RECORD_EXTRA;
- args->sendSz += DTLS_HANDSHAKE_EXTRA + DTLS_RECORD_EXTRA;
- }
- #endif
-
- if (IsEncryptionOn(ssl, 1)) {
- args->sendSz += MAX_MSG_EXTRA;
- }
-
- #ifdef HAVE_QSH
- args->encSz += qshSz;
- args->sendSz += qshSz;
- #endif
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, args->sendSz)) != 0) {
- goto exit_scke;
- }
-
- /* get output buffer */
- args->output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- #ifdef HAVE_QSH
- if (ssl->peerQSHKeyPresent) {
- byte idxSave = idx;
- idx = args->sendSz - qshSz;
-
- if (QSH_KeyExchangeWrite(ssl, 0) != 0) {
- ERROR_OUT(MEMORY_E, exit_scke);
- }
-
- /* extension type */
- c16toa(TLSX_QUANTUM_SAFE_HYBRID, args->output + idx);
- idx += OPAQUE16_LEN;
-
- /* write to output and check amount written */
- if (TLSX_QSHPK_Write(ssl->QSH_secret->list,
- args->output + idx) > qshSz - OPAQUE16_LEN) {
- ERROR_OUT(MEMORY_E, exit_scke);
- }
-
- idx = idxSave;
- }
- #endif
-
- AddHeaders(args->output, args->encSz + tlsSz, client_key_exchange, ssl);
-
- #ifdef HAVE_QSH
- if (ssl->peerQSHKeyPresent) {
- args->encSz -= qshSz;
- }
- #endif
- if (tlsSz) {
- c16toa((word16)args->encSz, &args->output[idx]);
- idx += OPAQUE16_LEN;
- }
- XMEMCPY(args->output + idx, args->encSecret, args->encSz);
- idx += args->encSz;
-
- if (IsEncryptionOn(ssl, 1)) {
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls)
- recordHeaderSz += DTLS_RECORD_EXTRA;
- args->inputSz = idx - recordHeaderSz; /* buildmsg adds rechdr */
- args->input = (byte*)XMALLOC(args->inputSz, ssl->heap,
- DYNAMIC_TYPE_IN_BUFFER);
- if (args->input == NULL) {
- ERROR_OUT(MEMORY_E, exit_scke);
- }
-
- XMEMCPY(args->input, args->output + recordHeaderSz,
- args->inputSz);
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_END;
- } /* case TLS_ASYNC_FINALIZE */
- FALL_THROUGH;
-
- case TLS_ASYNC_END:
- {
- if (IsEncryptionOn(ssl, 1)) {
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) &&
- (ret = DtlsMsgPoolSave(ssl, args->input, args->inputSz, client_key_exchange)) != 0) {
- goto exit_scke;
- }
- #endif
- ret = BuildMessage(ssl, args->output, args->sendSz,
- args->input, args->inputSz, handshake, 1, 0, 0, CUR_ORDER);
- XFREE(args->input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- args->input = NULL; /* make sure its not double free'd on cleanup */
-
- if (ret >= 0) {
- args->sendSz = ret;
- ret = 0;
- }
- }
- else {
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- if ((ret = DtlsMsgPoolSave(ssl, args->output, args->sendSz, client_key_exchange)) != 0) {
- goto exit_scke;
- }
- }
- if (ssl->options.dtls)
- DtlsSEQIncrement(ssl, CUR_ORDER);
- #endif
- ret = HashOutput(ssl, args->output, args->sendSz, 0);
- }
-
- if (ret != 0) {
- goto exit_scke;
- }
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "ClientKeyExchange");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "ClientKeyExchange", handshake,
- args->output, args->sendSz, WRITE_PROTO, ssl->heap);
- #endif
-
- ssl->buffers.outputBuffer.length += args->sendSz;
-
- if (!ssl->options.groupMessages) {
- ret = SendBuffered(ssl);
- }
- if (ret == 0 || ret == WANT_WRITE) {
- int tmpRet = MakeMasterSecret(ssl);
- if (tmpRet != 0) {
- ret = tmpRet; /* save WANT_WRITE unless more serious */
- }
- ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;
- }
- break;
- }
- default:
- ret = INPUT_CASE_ERROR;
- } /* switch(ssl->options.asyncState) */
-
-exit_scke:
-
- WOLFSSL_LEAVE("SendClientKeyExchange", ret);
- WOLFSSL_END(WC_FUNC_CLIENT_KEY_EXCHANGE_SEND);
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* Handle async operation */
- if (ret == WC_PENDING_E)
- return ret;
-#endif
-
- /* No further need for PMS */
- if (ssl->arrays->preMasterSecret != NULL) {
- ForceZero(ssl->arrays->preMasterSecret, ssl->arrays->preMasterSz);
- }
- ssl->arrays->preMasterSz = 0;
-
- /* Final cleanup */
- FreeSckeArgs(ssl, args);
- FreeKeyExchange(ssl);
-
- return ret;
-}
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#ifndef NO_CERTS
-
-#ifndef WOLFSSL_NO_TLS12
-
-#ifndef WOLFSSL_NO_CLIENT_AUTH
-typedef struct ScvArgs {
- byte* output; /* not allocated */
-#ifndef NO_RSA
- byte* verifySig;
-#endif
- byte* verify; /* not allocated */
- byte* input;
- word32 idx;
- word32 extraSz;
- word32 sigSz;
- int sendSz;
- int inputSz;
- word16 length;
- byte sigAlgo;
-} ScvArgs;
-
-static void FreeScvArgs(WOLFSSL* ssl, void* pArgs)
-{
- ScvArgs* args = (ScvArgs*)pArgs;
-
- (void)ssl;
-
-#ifndef NO_RSA
- if (args->verifySig) {
- XFREE(args->verifySig, ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- args->verifySig = NULL;
- }
-#endif
- if (args->input) {
- XFREE(args->input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- args->input = NULL;
- }
-}
-
-/* handle generation of certificate_verify (15) */
-int SendCertificateVerify(WOLFSSL* ssl)
-{
- int ret = 0;
-#ifdef WOLFSSL_ASYNC_CRYPT
- ScvArgs* args = (ScvArgs*)ssl->async.args;
- typedef char args_test[sizeof(ssl->async.args) >= sizeof(*args) ? 1 : -1];
- (void)sizeof(args_test);
-#else
- ScvArgs args[1];
-#endif
-
- WOLFSSL_START(WC_FUNC_CERTIFICATE_VERIFY_SEND);
- WOLFSSL_ENTER("SendCertificateVerify");
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* BuildMessage does its own Pop */
- if (ssl->error != WC_PENDING_E ||
- ssl->options.asyncState != TLS_ASYNC_END)
- ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
- if (ret != WC_NOT_PENDING_E) {
- /* Check for error */
- if (ret < 0)
- goto exit_scv;
- }
- else
-#endif
- {
- /* Reset state */
- ret = 0;
- ssl->options.asyncState = TLS_ASYNC_BEGIN;
- XMEMSET(args, 0, sizeof(ScvArgs));
- #ifdef WOLFSSL_ASYNC_CRYPT
- ssl->async.freeArgs = FreeScvArgs;
- #endif
- }
-
- switch(ssl->options.asyncState)
- {
- case TLS_ASYNC_BEGIN:
- {
- if (ssl->options.sendVerify == SEND_BLANK_CERT) {
- return 0; /* sent blank cert, can't verify */
- }
-
- args->sendSz = MAX_CERT_VERIFY_SZ + MAX_MSG_EXTRA;
- if (IsEncryptionOn(ssl, 1)) {
- args->sendSz += MAX_MSG_EXTRA;
- }
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, args->sendSz)) != 0) {
- goto exit_scv;
- }
-
- /* get output buffer */
- args->output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_BUILD;
- } /* case TLS_ASYNC_BEGIN */
- FALL_THROUGH;
-
- case TLS_ASYNC_BUILD:
- {
- ret = BuildCertHashes(ssl, &ssl->hsHashes->certHashes);
- if (ret != 0) {
- goto exit_scv;
- }
-
- if (ssl->buffers.key == NULL) {
- #ifdef HAVE_PK_CALLBACKS
- if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx))
- args->length = GetPrivateKeySigSize(ssl);
- else
- #endif
- ERROR_OUT(NO_PRIVATE_KEY, exit_scv);
- }
- else {
- /* Decode private key. */
- ret = DecodePrivateKey(ssl, &args->length);
- if (ret != 0) {
- goto exit_scv;
- }
- }
-
- if (args->length == 0) {
- ERROR_OUT(NO_PRIVATE_KEY, exit_scv);
- }
-
- /* idx is used to track verify pointer offset to output */
- args->idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- args->verify = &args->output[RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ];
- args->extraSz = 0; /* tls 1.2 hash/sig */
-
- /* build encoded signature buffer */
- ssl->buffers.sig.length = MAX_ENCODED_SIG_SZ;
- ssl->buffers.sig.buffer = (byte*)XMALLOC(ssl->buffers.sig.length,
- ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- if (ssl->buffers.sig.buffer == NULL) {
- ERROR_OUT(MEMORY_E, exit_scv);
- }
-
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- args->idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- args->verify += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- }
- #endif
-
- #ifndef NO_OLD_TLS
- #ifndef NO_SHA
- /* old tls default */
- SetDigest(ssl, sha_mac);
- #endif
- #else
- #ifndef NO_SHA256
- /* new tls default */
- SetDigest(ssl, sha256_mac);
- #endif
- #endif /* !NO_OLD_TLS */
-
- if (ssl->hsType == DYNAMIC_TYPE_RSA) {
- #ifdef WC_RSA_PSS
- if (IsAtLeastTLSv1_2(ssl) &&
- (ssl->pssAlgo & (1 << ssl->suites->hashAlgo))) {
- args->sigAlgo = rsa_pss_sa_algo;
- }
- else
- #endif
- args->sigAlgo = rsa_sa_algo;
- }
- else if (ssl->hsType == DYNAMIC_TYPE_ECC)
- args->sigAlgo = ecc_dsa_sa_algo;
- else if (ssl->hsType == DYNAMIC_TYPE_ED25519)
- args->sigAlgo = ed25519_sa_algo;
- else if (ssl->hsType == DYNAMIC_TYPE_ED448)
- args->sigAlgo = ed448_sa_algo;
-
- if (IsAtLeastTLSv1_2(ssl)) {
- EncodeSigAlg(ssl->suites->hashAlgo, args->sigAlgo,
- args->verify);
- args->extraSz = HASH_SIG_SIZE;
- SetDigest(ssl, ssl->suites->hashAlgo);
- }
- #ifndef NO_OLD_TLS
- else {
- /* if old TLS load MD5 and SHA hash as value to sign */
- XMEMCPY(ssl->buffers.sig.buffer,
- (byte*)ssl->hsHashes->certHashes.md5, FINISHED_SZ);
- }
- #endif
-
- #ifndef NO_RSA
- if (args->sigAlgo == rsa_sa_algo) {
- ssl->buffers.sig.length = FINISHED_SZ;
- args->sigSz = ENCRYPT_LEN;
-
- if (IsAtLeastTLSv1_2(ssl)) {
- ssl->buffers.sig.length = wc_EncodeSignature(
- ssl->buffers.sig.buffer, ssl->buffers.digest.buffer,
- ssl->buffers.digest.length,
- TypeHash(ssl->suites->hashAlgo));
- }
-
- /* prepend hdr */
- c16toa(args->length, args->verify + args->extraSz);
- }
- #ifdef WC_RSA_PSS
- else if (args->sigAlgo == rsa_pss_sa_algo) {
- XMEMCPY(ssl->buffers.sig.buffer, ssl->buffers.digest.buffer,
- ssl->buffers.digest.length);
- ssl->buffers.sig.length = ssl->buffers.digest.length;
- args->sigSz = ENCRYPT_LEN;
-
- /* prepend hdr */
- c16toa(args->length, args->verify + args->extraSz);
- }
- #endif
- #endif /* !NO_RSA */
- #if defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)
- if (args->sigAlgo == ed25519_sa_algo) {
- ret = Ed25519CheckPubKey(ssl);
- if (ret != 0)
- goto exit_scv;
- }
- #endif /* HAVE_ED25519 && !NO_ED25519_CLIENT_AUTH */
- #if defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)
- if (args->sigAlgo == ed448_sa_algo) {
- ret = Ed448CheckPubKey(ssl);
- if (ret != 0)
- goto exit_scv;
- }
- #endif /* HAVE_ED448 && !NO_ED448_CLIENT_AUTH */
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_DO;
- } /* case TLS_ASYNC_BUILD */
- FALL_THROUGH;
-
- case TLS_ASYNC_DO:
- {
- #ifdef HAVE_ECC
- if (ssl->hsType == DYNAMIC_TYPE_ECC) {
- ecc_key* key = (ecc_key*)ssl->hsKey;
-
- ret = EccSign(ssl,
- ssl->buffers.digest.buffer, ssl->buffers.digest.length,
- ssl->buffers.sig.buffer, (word32*)&ssl->buffers.sig.length,
- key,
- #ifdef HAVE_PK_CALLBACKS
- ssl->buffers.key
- #else
- NULL
- #endif
- );
- }
- #endif /* HAVE_ECC */
- #if defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)
- if (ssl->hsType == DYNAMIC_TYPE_ED25519) {
- ed25519_key* key = (ed25519_key*)ssl->hsKey;
-
- ret = Ed25519Sign(ssl,
- ssl->hsHashes->messages, ssl->hsHashes->length,
- ssl->buffers.sig.buffer, (word32*)&ssl->buffers.sig.length,
- key,
- #ifdef HAVE_PK_CALLBACKS
- ssl->buffers.key
- #else
- NULL
- #endif
- );
- }
- #endif /* HAVE_ED25519 && !NO_ED25519_CLIENT_AUTH */
- #if defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)
- if (ssl->hsType == DYNAMIC_TYPE_ED448) {
- ed448_key* key = (ed448_key*)ssl->hsKey;
-
- ret = Ed448Sign(ssl,
- ssl->hsHashes->messages, ssl->hsHashes->length,
- ssl->buffers.sig.buffer, (word32*)&ssl->buffers.sig.length,
- key,
- #ifdef HAVE_PK_CALLBACKS
- ssl->buffers.key
- #else
- NULL
- #endif
- );
- }
- #endif /* HAVE_ED448 && !NO_ED448_CLIENT_AUTH */
- #ifndef NO_RSA
- if (ssl->hsType == DYNAMIC_TYPE_RSA) {
- RsaKey* key = (RsaKey*)ssl->hsKey;
-
- /* restore verify pointer */
- args->verify = &args->output[args->idx];
-
- ret = RsaSign(ssl,
- ssl->buffers.sig.buffer, ssl->buffers.sig.length,
- args->verify + args->extraSz + VERIFY_HEADER, &args->sigSz,
- args->sigAlgo, ssl->suites->hashAlgo, key,
- ssl->buffers.key
- );
- }
- #endif /* !NO_RSA */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_scv;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_VERIFY;
- } /* case TLS_ASYNC_DO */
- FALL_THROUGH;
-
- case TLS_ASYNC_VERIFY:
- {
- /* restore verify pointer */
- args->verify = &args->output[args->idx];
-
- switch (ssl->hsType) {
- #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448)
- #ifdef HAVE_ECC
- case DYNAMIC_TYPE_ECC:
- #endif
- #ifdef HAVE_ED25519
- case DYNAMIC_TYPE_ED25519:
- #endif
- #ifdef HAVE_ED448
- case DYNAMIC_TYPE_ED448:
- #endif
- args->length = (word16)ssl->buffers.sig.length;
- /* prepend hdr */
- c16toa(args->length, args->verify + args->extraSz);
- XMEMCPY(args->verify + args->extraSz + VERIFY_HEADER,
- ssl->buffers.sig.buffer, ssl->buffers.sig.length);
- break;
- #endif
- #ifndef NO_RSA
- case DYNAMIC_TYPE_RSA:
- {
- RsaKey* key = (RsaKey*)ssl->hsKey;
-
- if (args->verifySig == NULL) {
- args->verifySig = (byte*)XMALLOC(args->sigSz, ssl->heap,
- DYNAMIC_TYPE_SIGNATURE);
- if (args->verifySig == NULL) {
- ERROR_OUT(MEMORY_E, exit_scv);
- }
- XMEMCPY(args->verifySig, args->verify + args->extraSz +
- VERIFY_HEADER, args->sigSz);
- }
-
- /* check for signature faults */
- ret = VerifyRsaSign(ssl,
- args->verifySig, args->sigSz,
- ssl->buffers.sig.buffer, ssl->buffers.sig.length,
- args->sigAlgo, ssl->suites->hashAlgo, key,
- ssl->buffers.key
- );
- break;
- }
- #endif /* !NO_RSA */
- default:
- break;
- }
-
- /* Check for error */
- if (ret != 0) {
- goto exit_scv;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_FINALIZE;
- } /* case TLS_ASYNC_VERIFY */
- FALL_THROUGH;
-
- case TLS_ASYNC_FINALIZE:
- {
- if (args->output == NULL) {
- ERROR_OUT(BUFFER_ERROR, exit_scv);
- }
- AddHeaders(args->output, (word32)args->length + args->extraSz +
- VERIFY_HEADER, certificate_verify, ssl);
-
- args->sendSz = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ +
- (word32)args->length + args->extraSz + VERIFY_HEADER;
-
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- args->sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- }
- #endif
-
- if (IsEncryptionOn(ssl, 1)) {
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls)
- recordHeaderSz += DTLS_RECORD_EXTRA;
- args->inputSz = args->sendSz - recordHeaderSz;
- /* build msg adds rec hdr */
- args->input = (byte*)XMALLOC(args->inputSz, ssl->heap,
- DYNAMIC_TYPE_IN_BUFFER);
- if (args->input == NULL) {
- ERROR_OUT(MEMORY_E, exit_scv);
- }
-
- XMEMCPY(args->input, args->output + recordHeaderSz,
- args->inputSz);
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_END;
- } /* case TLS_ASYNC_FINALIZE */
- FALL_THROUGH;
-
- case TLS_ASYNC_END:
- {
- if (IsEncryptionOn(ssl, 1)) {
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) &&
- (ret = DtlsMsgPoolSave(ssl, args->input, args->inputSz, certificate_verify)) != 0) {
- goto exit_scv;
- }
- #endif
- ret = BuildMessage(ssl, args->output,
- MAX_CERT_VERIFY_SZ + MAX_MSG_EXTRA,
- args->input, args->inputSz, handshake,
- 1, 0, 1, CUR_ORDER);
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E)
- goto exit_scv;
- #endif
-
- XFREE(args->input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- args->input = NULL; /* make sure its not double free'd on cleanup */
-
- if (ret >= 0) {
- args->sendSz = ret;
- ret = 0;
- }
- }
- else {
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- ret = DtlsMsgPoolSave(ssl, args->output, args->sendSz, certificate_verify);
- }
- if (ret == 0 && ssl->options.dtls)
- DtlsSEQIncrement(ssl, CUR_ORDER);
- #endif
- if (ret == 0)
- ret = HashOutput(ssl, args->output, args->sendSz, 0);
- }
-
- if (ret != 0) {
- goto exit_scv;
- }
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "CertificateVerify");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "CertificateVerify", handshake,
- args->output, args->sendSz, WRITE_PROTO, ssl->heap);
- #endif
-
- ssl->buffers.outputBuffer.length += args->sendSz;
-
- if (!ssl->options.groupMessages) {
- ret = SendBuffered(ssl);
- }
- break;
- }
- default:
- ret = INPUT_CASE_ERROR;
- } /* switch(ssl->options.asyncState) */
-
-exit_scv:
-
- WOLFSSL_LEAVE("SendCertificateVerify", ret);
- WOLFSSL_END(WC_FUNC_CERTIFICATE_VERIFY_SEND);
-
-#ifdef WOLFSSL_ASYNC_CRYPT
- /* Handle async operation */
- if (ret == WC_PENDING_E) {
- return ret;
- }
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
- /* Digest is not allocated, so do this to prevent free */
- ssl->buffers.digest.buffer = NULL;
- ssl->buffers.digest.length = 0;
-
- /* Final cleanup */
- FreeScvArgs(ssl, args);
- FreeKeyExchange(ssl);
-
- return ret;
-}
-#endif /* WOLFSSL_NO_CLIENT_AUTH */
-
-#endif /* WOLFSSL_NO_TLS12 */
-
-#endif /* NO_CERTS */
-
-
-#ifdef HAVE_SESSION_TICKET
-int SetTicket(WOLFSSL* ssl, const byte* ticket, word32 length)
-{
- /* Free old dynamic ticket if we already had one */
- if (ssl->session.isDynamic) {
- XFREE(ssl->session.ticket, ssl->heap, DYNAMIC_TYPE_SESSION_TICK);
- ssl->session.ticket = ssl->session.staticTicket;
- ssl->session.isDynamic = 0;
- }
-
- if (length > sizeof(ssl->session.staticTicket)) {
- byte* sessionTicket =
- (byte*)XMALLOC(length, ssl->heap, DYNAMIC_TYPE_SESSION_TICK);
- if (sessionTicket == NULL)
- return MEMORY_E;
- ssl->session.ticket = sessionTicket;
- ssl->session.isDynamic = 1;
- }
- ssl->session.ticketLen = (word16)length;
-
- if (length > 0) {
- XMEMCPY(ssl->session.ticket, ticket, length);
- if (ssl->session_ticket_cb != NULL) {
- ssl->session_ticket_cb(ssl,
- ssl->session.ticket, ssl->session.ticketLen,
- ssl->session_ticket_ctx);
- }
- /* Create a fake sessionID based on the ticket, this will
- * supersede the existing session cache info. */
- ssl->options.haveSessionId = 1;
-#ifdef WOLFSSL_TLS13
- if (ssl->options.tls1_3) {
- XMEMCPY(ssl->session.sessionID,
- ssl->session.ticket + length - ID_LEN, ID_LEN);
- }
- else
-#endif
- XMEMCPY(ssl->arrays->sessionID,
- ssl->session.ticket + length - ID_LEN, ID_LEN);
- }
-
- return 0;
-}
-
-#ifndef WOLFSSL_NO_TLS12
-
-/* handle processing of session_ticket (4) */
-static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
- word32 size)
-{
- word32 begin = *inOutIdx;
- word32 lifetime;
- word16 length;
- int ret;
-
- if (ssl->expect_session_ticket == 0) {
- WOLFSSL_MSG("Unexpected session ticket");
- return SESSION_TICKET_EXPECT_E;
- }
-
- if (OPAQUE32_LEN > size)
- return BUFFER_ERROR;
-
- ato32(input + *inOutIdx, &lifetime);
- *inOutIdx += OPAQUE32_LEN;
-
- if ((*inOutIdx - begin) + OPAQUE16_LEN > size)
- return BUFFER_ERROR;
-
- ato16(input + *inOutIdx, &length);
- *inOutIdx += OPAQUE16_LEN;
-
- if ((*inOutIdx - begin) + length > size)
- return BUFFER_ERROR;
-
- if ((ret = SetTicket(ssl, input + *inOutIdx, length)) != 0)
- return ret;
- *inOutIdx += length;
- if (length > 0) {
- ssl->timeout = lifetime;
-#ifndef NO_SESSION_CACHE
- AddSession(ssl);
-#endif
- }
-
- if (IsEncryptionOn(ssl, 0)) {
- *inOutIdx += ssl->keys.padSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- *inOutIdx += MacSize(ssl);
- #endif
- }
-
- ssl->expect_session_ticket = 0;
-
- return 0;
-}
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#endif /* HAVE_SESSION_TICKET */
-
-#endif /* NO_WOLFSSL_CLIENT */
-
-#ifndef NO_CERTS
-
-#ifdef HAVE_PK_CALLBACKS
- int GetPrivateKeySigSize(WOLFSSL* ssl)
- {
- int sigSz = 0;
-
- if (ssl == NULL)
- return 0;
-
- switch (ssl->buffers.keyType) {
- #ifndef NO_RSA
- #ifdef WC_RSA_PSS
- case rsa_pss_sa_algo:
- #endif
- case rsa_sa_algo:
- sigSz = ssl->buffers.keySz;
- ssl->hsType = DYNAMIC_TYPE_RSA;
- break;
- #endif
- #ifdef HAVE_ECC
- case ecc_dsa_sa_algo:
- sigSz = wc_ecc_sig_size_calc(ssl->buffers.keySz);
- ssl->hsType = DYNAMIC_TYPE_ECC;
- break;
- #endif
- #ifdef HAVE_ED25519
- case ed25519_sa_algo:
- sigSz = ED25519_SIG_SIZE; /* fixed known value */
- ssl->hsType = DYNAMIC_TYPE_ED25519;
- break;
- #endif
- #ifdef HAVE_ED448
- case ed448_sa_algo:
- sigSz = ED448_SIG_SIZE; /* fixed known value */
- ssl->hsType = DYNAMIC_TYPE_ED448;
- break;
- #endif
- default:
- break;
- }
- return sigSz;
- }
-#endif /* HAVE_PK_CALLBACKS */
-
-#endif /* NO_CERTS */
-
-#ifdef HAVE_ECC
- /* returns the WOLFSSL_* version of the curve from the OID sum */
- word16 GetCurveByOID(int oidSum) {
- switch(oidSum) {
- #if defined(HAVE_ECC160) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case ECC_SECP160R1_OID:
- return WOLFSSL_ECC_SECP160R1;
- #endif /* !NO_ECC_SECP */
- #ifdef HAVE_ECC_SECPR2
- case ECC_SECP160R2_OID:
- return WOLFSSL_ECC_SECP160R2;
- #endif /* HAVE_ECC_SECPR2 */
- #ifdef HAVE_ECC_KOBLITZ
- case ECC_SECP160K1_OID:
- return WOLFSSL_ECC_SECP160K1;
- #endif /* HAVE_ECC_KOBLITZ */
- #endif
- #if defined(HAVE_ECC192) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case ECC_SECP192R1_OID:
- return WOLFSSL_ECC_SECP192R1;
- #endif /* !NO_ECC_SECP */
- #ifdef HAVE_ECC_KOBLITZ
- case ECC_SECP192K1_OID:
- return WOLFSSL_ECC_SECP192K1;
- #endif /* HAVE_ECC_KOBLITZ */
- #endif
- #if defined(HAVE_ECC224) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case ECC_SECP224R1_OID:
- return WOLFSSL_ECC_SECP224R1;
- #endif /* !NO_ECC_SECP */
- #ifdef HAVE_ECC_KOBLITZ
- case ECC_SECP224K1_OID:
- return WOLFSSL_ECC_SECP224K1;
- #endif /* HAVE_ECC_KOBLITZ */
- #endif
- #if !defined(NO_ECC256) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case ECC_SECP256R1_OID:
- return WOLFSSL_ECC_SECP256R1;
- #endif /* !NO_ECC_SECP */
- #ifdef HAVE_ECC_KOBLITZ
- case ECC_SECP256K1_OID:
- return WOLFSSL_ECC_SECP256K1;
- #endif /* HAVE_ECC_KOBLITZ */
- #ifdef HAVE_ECC_BRAINPOOL
- case ECC_BRAINPOOLP256R1_OID:
- return WOLFSSL_ECC_BRAINPOOLP256R1;
- #endif /* HAVE_ECC_BRAINPOOL */
- #endif
- #if defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case ECC_SECP384R1_OID:
- return WOLFSSL_ECC_SECP384R1;
- #endif /* !NO_ECC_SECP */
- #ifdef HAVE_ECC_BRAINPOOL
- case ECC_BRAINPOOLP384R1_OID:
- return WOLFSSL_ECC_BRAINPOOLP384R1;
- #endif /* HAVE_ECC_BRAINPOOL */
- #endif
- #if defined(HAVE_ECC512) || defined(HAVE_ALL_CURVES)
- #ifdef HAVE_ECC_BRAINPOOL
- case ECC_BRAINPOOLP512R1_OID:
- return WOLFSSL_ECC_BRAINPOOLP512R1;
- #endif /* HAVE_ECC_BRAINPOOL */
- #endif
- #if defined(HAVE_ECC521) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case ECC_SECP521R1_OID:
- return WOLFSSL_ECC_SECP521R1;
- #endif /* !NO_ECC_SECP */
- #endif
- default:
- WOLFSSL_MSG("Curve OID not compiled in or implemented");
- return 0;
- }
- }
-#endif /* HAVE_ECC */
-
-
-#ifndef NO_WOLFSSL_SERVER
-
-#ifndef WOLFSSL_NO_TLS12
-
- /* handle generation of server_hello (2) */
- int SendServerHello(WOLFSSL* ssl)
- {
- int ret;
- byte *output;
- word16 length;
- word32 idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- int sendSz;
- byte sessIdSz = ID_LEN;
- byte echoId = 0; /* ticket echo id flag */
- byte cacheOff = 0; /* session cache off flag */
-
- WOLFSSL_START(WC_FUNC_SERVER_HELLO_SEND);
- WOLFSSL_ENTER("SendServerHello");
-
- length = VERSION_SZ + RAN_LEN
- + ID_LEN + ENUM_LEN
- + SUITE_LEN
- + ENUM_LEN;
-
-#ifdef HAVE_TLS_EXTENSIONS
- ret = TLSX_GetResponseSize(ssl, server_hello, &length);
- if (ret != 0)
- return ret;
- #ifdef HAVE_SESSION_TICKET
- if (ssl->options.useTicket) {
- /* echo session id sz can be 0,32 or bogus len in between */
- sessIdSz = ssl->arrays->sessionIDSz;
- if (sessIdSz > ID_LEN) {
- WOLFSSL_MSG("Bad bogus session id len");
- return BUFFER_ERROR;
- }
- if (!IsAtLeastTLSv1_3(ssl->version))
- length -= (ID_LEN - sessIdSz); /* adjust ID_LEN assumption */
- echoId = 1;
- }
- #endif /* HAVE_SESSION_TICKET */
-#else
- if (ssl->options.haveEMS) {
- length += HELLO_EXT_SZ_SZ + HELLO_EXT_SZ;
- }
-#endif
-
- /* is the session cache off at build or runtime */
-#ifdef NO_SESSION_CACHE
- cacheOff = 1;
-#else
- if (ssl->options.sessionCacheOff == 1) {
- cacheOff = 1;
- }
-#endif
-
- /* if no session cache don't send a session ID unless we're echoing
- * an ID as part of session tickets */
- if (echoId == 0 && cacheOff == 1) {
- length -= ID_LEN; /* adjust ID_LEN assumption */
- sessIdSz = 0;
- }
-
- sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ;
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- /* Server Hello should use the same sequence number as the
- * Client Hello. */
- ssl->keys.dtls_sequence_number_hi = ssl->keys.curSeq_hi;
- ssl->keys.dtls_sequence_number_lo = ssl->keys.curSeq_lo;
- idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- }
- #endif /* WOLFSSL_DTLS */
-
- if (IsEncryptionOn(ssl, 1))
- sendSz += MAX_MSG_EXTRA;
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
- return ret;
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHeaders(output, length, server_hello, ssl);
-
- /* now write to output */
- /* first version */
- output[idx++] = (byte)ssl->version.major;
- output[idx++] = (byte)ssl->version.minor;
-
- /* then random and session id */
- if (!ssl->options.resuming) {
- /* generate random part and session id */
- ret = wc_RNG_GenerateBlock(ssl->rng, output + idx,
- RAN_LEN + sizeof(sessIdSz) + sessIdSz);
- if (ret != 0)
- return ret;
-
-#ifdef WOLFSSL_TLS13
- if (TLSv1_3_Capable(ssl)) {
- /* TLS v1.3 capable server downgraded. */
- XMEMCPY(output + idx + RAN_LEN - (TLS13_DOWNGRADE_SZ + 1),
- tls13Downgrade, TLS13_DOWNGRADE_SZ);
- output[idx + RAN_LEN - 1] = (byte)IsAtLeastTLSv1_2(ssl);
- }
- else
-#endif
- if (ssl->ctx->method->version.major == SSLv3_MAJOR &&
- ssl->ctx->method->version.minor == TLSv1_2_MINOR &&
-#ifdef OPENSSL_EXTRA
- (wolfSSL_get_options(ssl) & SSL_OP_NO_TLSv1_2) == 0 &&
-#endif
- !IsAtLeastTLSv1_2(ssl)) {
- /* TLS v1.2 capable server downgraded. */
- XMEMCPY(output + idx + RAN_LEN - (TLS13_DOWNGRADE_SZ + 1),
- tls13Downgrade, TLS13_DOWNGRADE_SZ);
- output[idx + RAN_LEN - 1] = 0;
- }
-
- /* store info in SSL for later */
- XMEMCPY(ssl->arrays->serverRandom, output + idx, RAN_LEN);
- idx += RAN_LEN;
- output[idx++] = sessIdSz;
- XMEMCPY(ssl->arrays->sessionID, output + idx, sessIdSz);
- ssl->arrays->sessionIDSz = sessIdSz;
- }
- else {
- /* If resuming, use info from SSL */
- XMEMCPY(output + idx, ssl->arrays->serverRandom, RAN_LEN);
- idx += RAN_LEN;
- output[idx++] = sessIdSz;
- XMEMCPY(output + idx, ssl->arrays->sessionID, sessIdSz);
- }
- idx += sessIdSz;
-
-#ifdef SHOW_SECRETS
- {
- int j;
- printf("server random: ");
- for (j = 0; j < RAN_LEN; j++)
- printf("%02x", ssl->arrays->serverRandom[j]);
- printf("\n");
- }
-#endif
-
- /* then cipher suite */
- output[idx++] = ssl->options.cipherSuite0;
- output[idx++] = ssl->options.cipherSuite;
-
- /* then compression */
- if (ssl->options.usingCompression)
- output[idx++] = ZLIB_COMPRESSION;
- else
- output[idx++] = NO_COMPRESSION;
-
- /* last, extensions */
-#ifdef HAVE_TLS_EXTENSIONS
- {
- word16 offset = 0;
- ret = TLSX_WriteResponse(ssl, output + idx, server_hello, &offset);
- if (ret != 0)
- return ret;
- idx += offset;
- }
-#else
-#ifdef HAVE_EXTENDED_MASTER
- if (ssl->options.haveEMS) {
- c16toa(HELLO_EXT_SZ, output + idx);
- idx += HELLO_EXT_SZ_SZ;
-
- c16toa(HELLO_EXT_EXTMS, output + idx);
- idx += HELLO_EXT_TYPE_SZ;
- c16toa(0, output + idx);
- /*idx += HELLO_EXT_SZ_SZ;*/
- /* idx is not used after this point. uncomment the line above
- * if adding any more extensions in the future. */
- }
-#endif
-#endif
-
- if (IsEncryptionOn(ssl, 1)) {
- byte* input;
- int inputSz = idx; /* build msg adds rec hdr */
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls)
- recordHeaderSz += DTLS_RECORD_EXTRA;
- inputSz -= recordHeaderSz;
- input = (byte*)XMALLOC(inputSz, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- if (input == NULL)
- return MEMORY_E;
-
- XMEMCPY(input, output + recordHeaderSz, inputSz);
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) &&
- (ret = DtlsMsgPoolSave(ssl, input, inputSz, server_hello)) != 0) {
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- return ret;
- }
- #endif
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 1, 0, 0, CUR_ORDER);
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
-
- if (sendSz < 0)
- return sendSz;
- } else {
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- if ((ret = DtlsMsgPoolSave(ssl, output, sendSz, server_hello)) != 0)
- return ret;
- }
- if (ssl->options.dtls)
- DtlsSEQIncrement(ssl, CUR_ORDER);
- #endif
- ret = HashOutput(ssl, output, sendSz, 0);
- if (ret != 0)
- return ret;
- }
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "ServerHello");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "ServerHello", handshake, output, sendSz,
- WRITE_PROTO, ssl->heap);
- #endif
-
- ssl->options.serverState = SERVER_HELLO_COMPLETE;
- ssl->buffers.outputBuffer.length += sendSz;
-
- if (ssl->options.groupMessages)
- ret = 0;
- else
- ret = SendBuffered(ssl);
-
- WOLFSSL_LEAVE("SendServerHello", ret);
- WOLFSSL_END(WC_FUNC_SERVER_HELLO_SEND);
-
- return ret;
- }
-
-
-#if defined(HAVE_ECC)
-
- static byte SetCurveId(ecc_key* key)
- {
- if (key == NULL || key->dp == NULL) {
- WOLFSSL_MSG("SetCurveId: Invalid key!");
- return 0;
- }
-
- return (byte)GetCurveByOID(key->dp->oidSum);
- }
-
-#endif /* HAVE_ECC */
-
- typedef struct SskeArgs {
- byte* output; /* not allocated */
- #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) || \
- !defined(NO_RSA)
- byte* sigDataBuf;
- #endif
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
- byte* exportBuf;
- #endif
- #ifndef NO_RSA
- byte* verifySig;
- #endif
- byte* input;
- word32 idx;
- word32 tmpSigSz;
- word32 length;
- word32 sigSz;
- #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) || \
- !defined(NO_RSA)
- word32 sigDataSz;
- #endif
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
- word32 exportSz;
- #endif
- #ifdef HAVE_QSH
- word32 qshSz;
- #endif
- int sendSz;
- int inputSz;
- } SskeArgs;
-
- static void FreeSskeArgs(WOLFSSL* ssl, void* pArgs)
- {
- SskeArgs* args = (SskeArgs*)pArgs;
-
- (void)ssl;
-
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
- if (args->exportBuf) {
- XFREE(args->exportBuf, ssl->heap, DYNAMIC_TYPE_DER);
- args->exportBuf = NULL;
- }
- #endif
- #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) || \
- (!defined(NO_DH) && !defined(NO_RSA))
- if (args->sigDataBuf) {
- XFREE(args->sigDataBuf, ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- args->sigDataBuf = NULL;
- }
- #endif
- #ifndef NO_RSA
- if (args->verifySig) {
- XFREE(args->verifySig, ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- args->verifySig = NULL;
- }
- #endif
- (void)args;
- }
-
- /* handle generation of server_key_exchange (12) */
- int SendServerKeyExchange(WOLFSSL* ssl)
- {
- int ret;
- #ifdef WOLFSSL_ASYNC_CRYPT
- SskeArgs* args = (SskeArgs*)ssl->async.args;
- typedef char args_test[sizeof(ssl->async.args) >= sizeof(*args) ? 1 : -1];
- (void)sizeof(args_test);
- #else
- SskeArgs args[1];
- #endif
-
- WOLFSSL_START(WC_FUNC_SERVER_KEY_EXCHANGE_SEND);
- WOLFSSL_ENTER("SendServerKeyExchange");
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
- if (ret != WC_NOT_PENDING_E) {
- /* Check for error */
- if (ret < 0)
- goto exit_sske;
- }
- else
- #endif
- {
- /* Reset state */
- ret = 0;
- ssl->options.asyncState = TLS_ASYNC_BEGIN;
- XMEMSET(args, 0, sizeof(SskeArgs));
- #ifdef WOLFSSL_ASYNC_CRYPT
- ssl->async.freeArgs = FreeSskeArgs;
- #endif
- }
-
- switch(ssl->options.asyncState)
- {
- case TLS_ASYNC_BEGIN:
- {
- #ifdef HAVE_QSH
- if (ssl->peerQSHKeyPresent && ssl->options.haveQSH) {
- args->qshSz = QSH_KeyGetSize(ssl);
- }
- #endif
-
- /* Do some checks / debug msgs */
- switch(ssl->specs.kea)
- {
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- WOLFSSL_MSG("Using ephemeral ECDH PSK");
- break;
- }
- #endif /* (HAVE_ECC || CURVE25519 || CURVE448) && !NO_PSK */
- #if defined(HAVE_ECC)
- case ecc_diffie_hellman_kea:
- {
- if (ssl->specs.static_ecdh) {
- WOLFSSL_MSG("Using Static ECDH, not sending "
- "ServerKeyExchange");
- ERROR_OUT(0, exit_sske);
- }
-
- WOLFSSL_MSG("Using ephemeral ECDH");
- break;
- }
- #endif /* HAVE_ECC */
- }
-
- /* Preparing keys */
- switch(ssl->specs.kea)
- {
- #ifndef NO_PSK
- case psk_kea:
- {
- /* Nothing to do in this sub-state */
- break;
- }
- #endif /* !NO_PSK */
- #if !defined(NO_DH) && (!defined(NO_PSK) || !defined(NO_RSA))
- #if !defined(NO_PSK)
- case dhe_psk_kea:
- #endif
- #if !defined(NO_RSA)
- case diffie_hellman_kea:
- #endif
- {
- /* Allocate DH key buffers and generate key */
- if (ssl->buffers.serverDH_P.buffer == NULL ||
- ssl->buffers.serverDH_G.buffer == NULL) {
- ERROR_OUT(NO_DH_PARAMS, exit_sske);
- }
-
- if (ssl->buffers.serverDH_Pub.buffer == NULL) {
- /* Free'd in SSL_ResourceFree and FreeHandshakeResources */
- ssl->buffers.serverDH_Pub.buffer = (byte*)XMALLOC(
- ssl->buffers.serverDH_P.length + OPAQUE16_LEN,
- ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
- if (ssl->buffers.serverDH_Pub.buffer == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
- }
-
- if (ssl->buffers.serverDH_Priv.buffer == NULL) {
- /* Free'd in SSL_ResourceFree and FreeHandshakeResources */
- ssl->buffers.serverDH_Priv.buffer = (byte*)XMALLOC(
- ssl->buffers.serverDH_P.length + OPAQUE16_LEN,
- ssl->heap, DYNAMIC_TYPE_PRIVATE_KEY);
- if (ssl->buffers.serverDH_Priv.buffer == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
- }
-
- ssl->options.dhKeySz =
- (word16)ssl->buffers.serverDH_P.length;
-
- ret = AllocKey(ssl, DYNAMIC_TYPE_DH,
- (void**)&ssl->buffers.serverDH_Key);
- if (ret != 0) {
- goto exit_sske;
- }
-
- #if !defined(WOLFSSL_OLD_PRIME_CHECK) && \
- !defined(HAVE_FIPS) && \
- !defined(HAVE_SELFTEST)
- if (ssl->options.dhDoKeyTest &&
- !ssl->options.dhKeyTested)
- {
- ret = wc_DhSetCheckKey(
- ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length,
- ssl->buffers.serverDH_G.buffer,
- ssl->buffers.serverDH_G.length,
- NULL, 0, 0, ssl->rng);
- if (ret != 0) {
- goto exit_sske;
- }
- ssl->options.dhKeyTested = 1;
- }
- else
- #endif
- {
- ret = wc_DhSetKey(ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length,
- ssl->buffers.serverDH_G.buffer,
- ssl->buffers.serverDH_G.length);
- if (ret != 0) {
- goto exit_sske;
- }
- }
-
- ret = DhGenKeyPair(ssl, ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_Priv.buffer,
- (word32*)&ssl->buffers.serverDH_Priv.length,
- ssl->buffers.serverDH_Pub.buffer,
- (word32*)&ssl->buffers.serverDH_Pub.length);
- break;
- }
- #endif /* !NO_DH && (!NO_PSK || !NO_RSA) */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- /* Fall through to create temp ECC key */
- #endif /* (HAVE_ECC || CURVE25519 || CURVE448) && !NO_PSK */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- /* need ephemeral key now, create it if missing */
- if (ssl->eccTempKey == NULL) {
- /* alloc/init on demand */
- ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE25519,
- (void**)&ssl->eccTempKey);
- if (ret != 0) {
- goto exit_sske;
- }
- }
-
- if (ssl->eccTempKeyPresent == 0) {
- ret = X25519MakeKey(ssl,
- (curve25519_key*)ssl->eccTempKey, NULL);
- if (ret == 0 || ret == WC_PENDING_E) {
- ssl->eccTempKeyPresent =
- DYNAMIC_TYPE_CURVE25519;
- }
- }
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- /* need ephemeral key now, create it if missing */
- if (ssl->eccTempKey == NULL) {
- /* alloc/init on demand */
- ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE448,
- (void**)&ssl->eccTempKey);
- if (ret != 0) {
- goto exit_sske;
- }
- }
-
- if (ssl->eccTempKeyPresent == 0) {
- ret = X448MakeKey(ssl,
- (curve448_key*)ssl->eccTempKey, NULL);
- if (ret == 0 || ret == WC_PENDING_E) {
- ssl->eccTempKeyPresent =
- DYNAMIC_TYPE_CURVE448;
- }
- }
- break;
- }
- #endif
- #ifdef HAVE_ECC
- /* need ephemeral key now, create it if missing */
- if (ssl->eccTempKey == NULL) {
- /* alloc/init on demand */
- ret = AllocKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->eccTempKey);
- if (ret != 0) {
- goto exit_sske;
- }
- }
-
- if (ssl->eccTempKeyPresent == 0) {
- ret = EccMakeKey(ssl, ssl->eccTempKey, NULL);
- if (ret == 0 || ret == WC_PENDING_E) {
- ssl->eccTempKeyPresent = DYNAMIC_TYPE_ECC;
- }
- }
- #endif
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
- default:
- /* Skip ServerKeyExchange */
- goto exit_sske;
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_sske;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_BUILD;
- } /* case TLS_ASYNC_BEGIN */
- FALL_THROUGH;
-
- case TLS_ASYNC_BUILD:
- {
- #if (!defined(NO_DH) && !defined(NO_RSA)) || (defined(HAVE_ECC) || \
- defined(HAVE_CURVE25519) || defined(HAVE_CURVE448))
- word32 preSigSz, preSigIdx;
- #endif
-
- switch(ssl->specs.kea)
- {
- #ifndef NO_PSK
- case psk_kea:
- {
- args->idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
-
- if (ssl->arrays->server_hint[0] == 0) {
- ERROR_OUT(0, exit_sske); /* don't send */
- }
-
- /* include size part */
- args->length = (word32)XSTRLEN(ssl->arrays->server_hint);
- if (args->length > MAX_PSK_ID_LEN) {
- ERROR_OUT(SERVER_HINT_ERROR, exit_sske);
- }
-
- args->length += HINT_LEN_SZ;
- args->sendSz = args->length + HANDSHAKE_HEADER_SZ +
- RECORD_HEADER_SZ;
-
- #ifdef HAVE_QSH
- args->length += args->qshSz;
- args->sendSz += args->qshSz;
- #endif
-
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- args->sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- args->idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- }
- #endif
-
- if (IsEncryptionOn(ssl, 1)) {
- args->sendSz += MAX_MSG_EXTRA;
- }
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, args->sendSz)) != 0) {
- goto exit_sske;
- }
-
- /* get output buffer */
- args->output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHeaders(args->output, args->length,
- server_key_exchange, ssl);
-
- /* key data */
- #ifdef HAVE_QSH
- c16toa((word16)(args->length - args->qshSz -
- HINT_LEN_SZ), args->output + args->idx);
- #else
- c16toa((word16)(args->length - HINT_LEN_SZ),
- args->output + args->idx);
- #endif
-
- args->idx += HINT_LEN_SZ;
- XMEMCPY(args->output + args->idx,
- ssl->arrays->server_hint,
- args->length - HINT_LEN_SZ);
- break;
- }
- #endif /* !NO_PSK */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- word32 hintLen;
-
- args->idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- args->length = LENGTH_SZ * 3 + /* p, g, pub */
- ssl->buffers.serverDH_P.length +
- ssl->buffers.serverDH_G.length +
- ssl->buffers.serverDH_Pub.length;
-
- /* include size part */
- hintLen = (word32)XSTRLEN(ssl->arrays->server_hint);
- if (hintLen > MAX_PSK_ID_LEN) {
- ERROR_OUT(SERVER_HINT_ERROR, exit_sske);
- }
- args->length += hintLen + HINT_LEN_SZ;
- args->sendSz = args->length + HANDSHAKE_HEADER_SZ +
- RECORD_HEADER_SZ;
-
- #ifdef HAVE_QSH
- args->length += args->qshSz;
- args->sendSz += args->qshSz;
- #endif
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- args->sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- args->idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- }
- #endif
-
- if (IsEncryptionOn(ssl, 1)) {
- args->sendSz += MAX_MSG_EXTRA;
- }
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, args->sendSz)) != 0) {
- goto exit_sske;
- }
-
- /* get output buffer */
- args->output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHeaders(args->output, args->length,
- server_key_exchange, ssl);
-
- /* key data */
- c16toa((word16)hintLen, args->output + args->idx);
- args->idx += HINT_LEN_SZ;
- XMEMCPY(args->output + args->idx,
- ssl->arrays->server_hint, hintLen);
- args->idx += hintLen;
-
- /* add p, g, pub */
- c16toa((word16)ssl->buffers.serverDH_P.length,
- args->output + args->idx);
- args->idx += LENGTH_SZ;
- XMEMCPY(args->output + args->idx,
- ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length);
- args->idx += ssl->buffers.serverDH_P.length;
-
- /* g */
- c16toa((word16)ssl->buffers.serverDH_G.length,
- args->output + args->idx);
- args->idx += LENGTH_SZ;
- XMEMCPY(args->output + args->idx,
- ssl->buffers.serverDH_G.buffer,
- ssl->buffers.serverDH_G.length);
- args->idx += ssl->buffers.serverDH_G.length;
-
- /* pub */
- c16toa((word16)ssl->buffers.serverDH_Pub.length,
- args->output + args->idx);
- args->idx += LENGTH_SZ;
- XMEMCPY(args->output + args->idx,
- ssl->buffers.serverDH_Pub.buffer,
- ssl->buffers.serverDH_Pub.length);
- /* No need to update idx, since sizes are already set */
- /* args->idx += ssl->buffers.serverDH_Pub.length; */
- break;
- }
- #endif /* !defined(NO_DH) && !defined(NO_PSK) */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- word32 hintLen;
-
- /* curve type, named curve, length(1) */
- args->idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- args->length = ENUM_LEN + CURVE_LEN + ENUM_LEN;
-
- args->exportSz = MAX_EXPORT_ECC_SZ;
- args->exportBuf = (byte*)XMALLOC(args->exportSz,
- ssl->heap, DYNAMIC_TYPE_DER);
- if (args->exportBuf == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- if (wc_curve25519_export_public_ex(
- (curve25519_key*)ssl->eccTempKey,
- args->exportBuf, &args->exportSz,
- EC25519_LITTLE_ENDIAN) != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_sske);
- }
- }
- else
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- if (wc_curve448_export_public_ex(
- (curve448_key*)ssl->eccTempKey,
- args->exportBuf, &args->exportSz,
- EC448_LITTLE_ENDIAN) != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_sske);
- }
- }
- else
- #endif
- {
- if (wc_ecc_export_x963(ssl->eccTempKey,
- args->exportBuf, &args->exportSz) != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_sske);
- }
- }
- args->length += args->exportSz;
-
- /* include size part */
- hintLen = (word32)XSTRLEN(ssl->arrays->server_hint);
- if (hintLen > MAX_PSK_ID_LEN) {
- ERROR_OUT(SERVER_HINT_ERROR, exit_sske);
- }
- args->length += hintLen + HINT_LEN_SZ;
- args->sendSz = args->length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ;
-
- #ifdef HAVE_QSH
- args->length += args->qshSz;
- args->sendSz += args->qshSz;
- #endif
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- args->sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- args->idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- }
- #endif
-
- if (IsEncryptionOn(ssl, 1)) {
- args->sendSz += MAX_MSG_EXTRA;
- }
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, args->sendSz)) != 0) {
- goto exit_sske;
- }
-
- /* get output buffer */
- args->output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- /* key data */
- c16toa((word16)hintLen, args->output + args->idx);
- args->idx += HINT_LEN_SZ;
- XMEMCPY(args->output + args->idx,
- ssl->arrays->server_hint, hintLen);
- args->idx += hintLen;
-
- /* ECC key exchange data */
- args->output[args->idx++] = named_curve;
- args->output[args->idx++] = 0x00; /* leading zero */
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID)
- args->output[args->idx++] = WOLFSSL_ECC_X25519;
- else
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID)
- args->output[args->idx++] = WOLFSSL_ECC_X448;
- else
- #endif
- {
- #ifdef HAVE_ECC
- args->output[args->idx++] =
- SetCurveId(ssl->eccTempKey);
- #endif
- }
- args->output[args->idx++] = (byte)args->exportSz;
- XMEMCPY(args->output + args->idx, args->exportBuf,
- args->exportSz);
- break;
- }
- #endif /* (HAVE_ECC || CURVE25519 || CURVE448) && !NO_PSK */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- enum wc_HashType hashType;
-
- /* curve type, named curve, length(1) */
- args->idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- args->length = ENUM_LEN + CURVE_LEN + ENUM_LEN;
-
- /* Export temp ECC key and add to length */
- args->exportSz = MAX_EXPORT_ECC_SZ;
- args->exportBuf = (byte*)XMALLOC(args->exportSz,
- ssl->heap, DYNAMIC_TYPE_DER);
- if (args->exportBuf == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- if (wc_curve25519_export_public_ex(
- (curve25519_key*)ssl->eccTempKey,
- args->exportBuf, &args->exportSz,
- EC25519_LITTLE_ENDIAN) != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_sske);
- }
- }
- else
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- if (wc_curve448_export_public_ex(
- (curve448_key*)ssl->eccTempKey,
- args->exportBuf, &args->exportSz,
- EC448_LITTLE_ENDIAN) != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_sske);
- }
- }
- else
- #endif
- {
- #if defined(HAVE_ECC) && defined(HAVE_ECC_KEY_EXPORT)
- if (wc_ecc_export_x963(ssl->eccTempKey,
- args->exportBuf, &args->exportSz) != 0) {
- ERROR_OUT(ECC_EXPORT_ERROR, exit_sske);
- }
- #endif
- }
- args->length += args->exportSz;
-
- preSigSz = args->length;
- preSigIdx = args->idx;
-
- if (ssl->buffers.key == NULL) {
- #ifdef HAVE_PK_CALLBACKS
- if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx)) {
- args->tmpSigSz = GetPrivateKeySigSize(ssl);
- if (args->tmpSigSz == 0) {
- ERROR_OUT(NO_PRIVATE_KEY, exit_sske);
- }
- }
- else
- #endif
- ERROR_OUT(NO_PRIVATE_KEY, exit_sske);
- }
- else {
- switch(ssl->suites->sigAlgo) {
- #ifndef NO_RSA
- #ifdef WC_RSA_PSS
- case rsa_pss_sa_algo:
- #endif
- case rsa_sa_algo:
- {
- word16 keySz;
-
- ssl->buffers.keyType = rsa_sa_algo;
- ret = DecodePrivateKey(ssl, &keySz);
- if (ret != 0) {
- goto exit_sske;
- }
-
- args->tmpSigSz = (word32)keySz;
- break;
- }
- #endif /* !NO_RSA */
- #ifdef HAVE_ECC
- case ecc_dsa_sa_algo:
- {
- word16 keySz;
-
- ssl->buffers.keyType = ecc_dsa_sa_algo;
- ret = DecodePrivateKey(ssl, &keySz);
- if (ret != 0) {
- goto exit_sske;
- }
- /* worst case estimate */
- args->tmpSigSz = keySz;
- break;
- }
- #endif
- #ifdef HAVE_ED25519
- case ed25519_sa_algo:
- {
- word16 keySz;
-
- ssl->buffers.keyType = ed25519_sa_algo;
- ret = DecodePrivateKey(ssl, &keySz);
- if (ret != 0) {
- goto exit_sske;
- }
-
- /* worst case estimate */
- args->tmpSigSz = ED25519_SIG_SIZE;
- break;
- }
- #endif /* HAVE_ED25519 */
- #ifdef HAVE_ED448
- case ed448_sa_algo:
- {
- word16 keySz;
-
- ssl->buffers.keyType = ed448_sa_algo;
- ret = DecodePrivateKey(ssl, &keySz);
- if (ret != 0) {
- goto exit_sske;
- }
-
- /* worst case estimate */
- args->tmpSigSz = ED448_SIG_SIZE;
- break;
- }
- #endif /* HAVE_ED448 */
- default:
- ERROR_OUT(ALGO_ID_E, exit_sske); /* unsupported type */
- } /* switch(ssl->specs.sig_algo) */
- }
-
- /* sig length */
- args->length += LENGTH_SZ;
- args->length += args->tmpSigSz;
-
- if (IsAtLeastTLSv1_2(ssl)) {
- args->length += HASH_SIG_SIZE;
- }
-
- args->sendSz = args->length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ;
-
- #ifdef HAVE_QSH
- args->length += args->qshSz;
- args->sendSz += args->qshSz;
- #endif
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- args->sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- args->idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- preSigIdx = args->idx;
- }
- #endif
- if (IsEncryptionOn(ssl, 1)) {
- args->sendSz += MAX_MSG_EXTRA;
- }
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, args->sendSz)) != 0) {
- goto exit_sske;
- }
-
- /* get output buffer */
- args->output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- /* record and message headers will be added below, when we're sure
- of the sig length */
-
- /* key exchange data */
- args->output[args->idx++] = named_curve;
- args->output[args->idx++] = 0x00; /* leading zero */
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID)
- args->output[args->idx++] = WOLFSSL_ECC_X25519;
- else
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID)
- args->output[args->idx++] = WOLFSSL_ECC_X448;
- else
- #endif
- {
- #ifdef HAVE_ECC
- args->output[args->idx++] =
- SetCurveId(ssl->eccTempKey);
- #endif
- }
- args->output[args->idx++] = (byte)args->exportSz;
- XMEMCPY(args->output + args->idx, args->exportBuf, args->exportSz);
- args->idx += args->exportSz;
-
- /* Determine hash type */
- if (IsAtLeastTLSv1_2(ssl)) {
- EncodeSigAlg(ssl->suites->hashAlgo,
- ssl->suites->sigAlgo,
- &args->output[args->idx]);
- args->idx += 2;
-
- hashType = HashAlgoToType(ssl->suites->hashAlgo);
- if (hashType == WC_HASH_TYPE_NONE) {
- ERROR_OUT(ALGO_ID_E, exit_sske);
- }
-
- } else {
- /* only using sha and md5 for rsa */
- #ifndef NO_OLD_TLS
- hashType = WC_HASH_TYPE_SHA;
- if (ssl->suites->sigAlgo == rsa_sa_algo) {
- hashType = WC_HASH_TYPE_MD5_SHA;
- }
- #else
- ERROR_OUT(ALGO_ID_E, exit_sske);
- #endif
- }
-
- /* Signature length will be written later, when we're sure what it is */
-
- #ifdef HAVE_FUZZER
- if (ssl->fuzzerCb) {
- ssl->fuzzerCb(ssl, args->output + preSigIdx,
- preSigSz, FUZZ_SIGNATURE, ssl->fuzzerCtx);
- }
- #endif
-
- /* Assemble buffer to hash for signature */
- args->sigDataSz = RAN_LEN + RAN_LEN + preSigSz;
- args->sigDataBuf = (byte*)XMALLOC(args->sigDataSz,
- ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- if (args->sigDataBuf == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
- XMEMCPY(args->sigDataBuf, ssl->arrays->clientRandom,
- RAN_LEN);
- XMEMCPY(args->sigDataBuf+RAN_LEN,
- ssl->arrays->serverRandom, RAN_LEN);
- XMEMCPY(args->sigDataBuf+RAN_LEN+RAN_LEN,
- args->output + preSigIdx, preSigSz);
-
- if (ssl->suites->sigAlgo != ed25519_sa_algo &&
- ssl->suites->sigAlgo != ed448_sa_algo) {
- ssl->buffers.sig.length =
- wc_HashGetDigestSize(hashType);
- if ((int)ssl->buffers.sig.length < 0) {
- ERROR_OUT(HASH_TYPE_E, exit_sske);
- }
- ssl->buffers.sig.buffer = (byte*)XMALLOC(
- ssl->buffers.sig.length,
- ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- if (ssl->buffers.sig.buffer == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
-
- /* Perform hash */
- ret = wc_Hash(hashType, args->sigDataBuf,
- args->sigDataSz,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length);
- if (ret != 0) {
- goto exit_sske;
- }
- }
-
- args->sigSz = args->tmpSigSz;
-
- /* Sign hash to create signature */
- switch (ssl->suites->sigAlgo)
- {
- #ifndef NO_RSA
- case rsa_sa_algo:
- {
- /* For TLS 1.2 re-encode signature */
- if (IsAtLeastTLSv1_2(ssl)) {
- byte* encodedSig = (byte*)XMALLOC(
- MAX_ENCODED_SIG_SZ, ssl->heap,
- DYNAMIC_TYPE_SIGNATURE);
- if (encodedSig == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
-
- ssl->buffers.sig.length =
- wc_EncodeSignature(encodedSig,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length,
- TypeHash(ssl->suites->hashAlgo));
-
- /* Replace sig buffer with new one */
- XFREE(ssl->buffers.sig.buffer, ssl->heap,
- DYNAMIC_TYPE_SIGNATURE);
- ssl->buffers.sig.buffer = encodedSig;
- }
-
- /* write sig size here */
- c16toa((word16)args->sigSz,
- args->output + args->idx);
- args->idx += LENGTH_SZ;
- break;
- }
- #ifdef WC_RSA_PSS
- case rsa_pss_sa_algo:
- /* write sig size here */
- c16toa((word16)args->sigSz,
- args->output + args->idx);
- args->idx += LENGTH_SZ;
- break;
- #endif
- #endif /* !NO_RSA */
- case ecc_dsa_sa_algo:
- {
- break;
- }
- #ifdef HAVE_ED25519
- case ed25519_sa_algo:
- ret = Ed25519CheckPubKey(ssl);
- if (ret != 0)
- goto exit_sske;
- break;
- #endif /* HAVE_ED25519 */
- #ifdef HAVE_ED448
- case ed448_sa_algo:
- ret = Ed448CheckPubKey(ssl);
- if (ret != 0)
- goto exit_sske;
- break;
- #endif /* HAVE_ED448 */
- } /* switch(ssl->specs.sig_algo) */
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
- #if !defined(NO_DH) && !defined(NO_RSA)
- case diffie_hellman_kea:
- {
- enum wc_HashType hashType;
-
- args->idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- args->length = LENGTH_SZ * 3; /* p, g, pub */
- args->length += ssl->buffers.serverDH_P.length +
- ssl->buffers.serverDH_G.length +
- ssl->buffers.serverDH_Pub.length;
-
- preSigIdx = args->idx;
- preSigSz = args->length;
-
- if (!ssl->options.usingAnon_cipher) {
- word16 keySz;
-
- /* sig length */
- args->length += LENGTH_SZ;
-
- if (ssl->buffers.key == NULL) {
- #ifdef HAVE_PK_CALLBACKS
- if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx))
- keySz = (word32)GetPrivateKeySigSize(ssl);
- else
- #endif
- ERROR_OUT(NO_PRIVATE_KEY, exit_sske);
- }
- else
- {
- if (ssl->buffers.keyType == 0)
- ssl->buffers.keyType = rsa_sa_algo;
- ret = DecodePrivateKey(ssl, &keySz);
- if (ret != 0) {
- goto exit_sske;
- }
- }
-
- if (keySz == 0) { /* test if keySz has error */
- ERROR_OUT(keySz, exit_sske);
- }
-
- args->tmpSigSz = (word32)keySz;
- args->length += args->tmpSigSz;
-
- if (IsAtLeastTLSv1_2(ssl)) {
- args->length += HASH_SIG_SIZE;
- }
- }
-
- args->sendSz = args->length + HANDSHAKE_HEADER_SZ +
- RECORD_HEADER_SZ;
-
- #ifdef HAVE_QSH
- args->length += args->qshSz;
- args->sendSz += args->qshSz;
- #endif
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- args->sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- args->idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- preSigIdx = args->idx;
- }
- #endif
-
- if (IsEncryptionOn(ssl, 1)) {
- args->sendSz += MAX_MSG_EXTRA;
- }
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, args->sendSz)) != 0) {
- goto exit_sske;
- }
-
- /* get output buffer */
- args->output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHeaders(args->output, args->length,
- server_key_exchange, ssl);
-
- /* add p, g, pub */
- c16toa((word16)ssl->buffers.serverDH_P.length,
- args->output + args->idx);
- args->idx += LENGTH_SZ;
- XMEMCPY(args->output + args->idx,
- ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length);
- args->idx += ssl->buffers.serverDH_P.length;
-
- /* g */
- c16toa((word16)ssl->buffers.serverDH_G.length,
- args->output + args->idx);
- args->idx += LENGTH_SZ;
- XMEMCPY(args->output + args->idx,
- ssl->buffers.serverDH_G.buffer,
- ssl->buffers.serverDH_G.length);
- args->idx += ssl->buffers.serverDH_G.length;
-
- /* pub */
- c16toa((word16)ssl->buffers.serverDH_Pub.length,
- args->output + args->idx);
- args->idx += LENGTH_SZ;
- XMEMCPY(args->output + args->idx,
- ssl->buffers.serverDH_Pub.buffer,
- ssl->buffers.serverDH_Pub.length);
- args->idx += ssl->buffers.serverDH_Pub.length;
-
- #ifdef HAVE_FUZZER
- if (ssl->fuzzerCb) {
- ssl->fuzzerCb(ssl, args->output + preSigIdx,
- preSigSz, FUZZ_SIGNATURE, ssl->fuzzerCtx);
- }
- #endif
-
- if (ssl->options.usingAnon_cipher) {
- break;
- }
-
- /* Determine hash type */
- if (IsAtLeastTLSv1_2(ssl)) {
- EncodeSigAlg(ssl->suites->hashAlgo,
- ssl->suites->sigAlgo,
- &args->output[args->idx]);
- args->idx += 2;
-
- hashType = HashAlgoToType(ssl->suites->hashAlgo);
- if (hashType == WC_HASH_TYPE_NONE) {
- ERROR_OUT(ALGO_ID_E, exit_sske);
- }
- } else {
- /* only using sha and md5 for rsa */
- #ifndef NO_OLD_TLS
- hashType = WC_HASH_TYPE_SHA;
- if (ssl->suites->sigAlgo == rsa_sa_algo) {
- hashType = WC_HASH_TYPE_MD5_SHA;
- }
- #else
- ERROR_OUT(ALGO_ID_E, exit_sske);
- #endif
- }
-
- /* signature size */
- c16toa((word16)args->tmpSigSz, args->output + args->idx);
- args->idx += LENGTH_SZ;
-
- /* Assemble buffer to hash for signature */
- args->sigDataSz = RAN_LEN + RAN_LEN + preSigSz;
- args->sigDataBuf = (byte*)XMALLOC(args->sigDataSz,
- ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- if (args->sigDataBuf == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
- XMEMCPY(args->sigDataBuf, ssl->arrays->clientRandom,
- RAN_LEN);
- XMEMCPY(args->sigDataBuf+RAN_LEN,
- ssl->arrays->serverRandom, RAN_LEN);
- XMEMCPY(args->sigDataBuf+RAN_LEN+RAN_LEN,
- args->output + preSigIdx, preSigSz);
-
- if (ssl->suites->sigAlgo != ed25519_sa_algo &&
- ssl->suites->sigAlgo != ed448_sa_algo) {
- ssl->buffers.sig.length =
- wc_HashGetDigestSize(hashType);
- ssl->buffers.sig.buffer = (byte*)XMALLOC(
- ssl->buffers.sig.length, ssl->heap,
- DYNAMIC_TYPE_SIGNATURE);
- if (ssl->buffers.sig.buffer == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
-
- /* Perform hash */
- ret = wc_Hash(hashType, args->sigDataBuf,
- args->sigDataSz,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length);
- if (ret != 0) {
- goto exit_sske;
- }
- }
-
- args->sigSz = args->tmpSigSz;
-
- /* Sign hash to create signature */
- switch (ssl->suites->sigAlgo)
- {
- #ifndef NO_RSA
- case rsa_sa_algo:
- {
- /* For TLS 1.2 re-encode signature */
- if (IsAtLeastTLSv1_2(ssl)) {
- byte* encodedSig = (byte*)XMALLOC(
- MAX_ENCODED_SIG_SZ, ssl->heap,
- DYNAMIC_TYPE_SIGNATURE);
- if (encodedSig == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
-
- ssl->buffers.sig.length =
- wc_EncodeSignature(encodedSig,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length,
- TypeHash(ssl->suites->hashAlgo));
-
- /* Replace sig buffer with new one */
- XFREE(ssl->buffers.sig.buffer, ssl->heap,
- DYNAMIC_TYPE_SIGNATURE);
- ssl->buffers.sig.buffer = encodedSig;
- }
- break;
- }
- #endif /* NO_RSA */
- } /* switch (ssl->suites->sigAlgo) */
- break;
- }
- #endif /* !defined(NO_DH) && !defined(NO_RSA) */
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_sske;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_DO;
- } /* case TLS_ASYNC_BUILD */
- FALL_THROUGH;
-
- case TLS_ASYNC_DO:
- {
- switch(ssl->specs.kea)
- {
- #ifndef NO_PSK
- case psk_kea:
- {
- break;
- }
- #endif /* !NO_PSK */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- break;
- }
- #endif /* !defined(NO_DH) && !defined(NO_PSK) */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- break;
- }
- #endif /* (HAVE_ECC || CURVE25519 || CURVE448) && !NO_PSK */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- /* Sign hash to create signature */
- switch (ssl->suites->sigAlgo)
- {
- #ifndef NO_RSA
- #ifdef WC_RSA_PSS
- case rsa_pss_sa_algo:
- #endif
- case rsa_sa_algo:
- {
- RsaKey* key = (RsaKey*)ssl->hsKey;
-
- ret = RsaSign(ssl,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length,
- args->output + args->idx,
- &args->sigSz,
- ssl->suites->sigAlgo, ssl->suites->hashAlgo,
- key,
- ssl->buffers.key
- );
- break;
- }
- #endif /* !NO_RSA */
- #ifdef HAVE_ECC
- case ecc_dsa_sa_algo:
- {
- ecc_key* key = (ecc_key*)ssl->hsKey;
-
- ret = EccSign(ssl,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length,
- args->output + LENGTH_SZ + args->idx,
- &args->sigSz,
- key,
- #ifdef HAVE_PK_CALLBACKS
- ssl->buffers.key
- #else
- NULL
- #endif
- );
- break;
- }
- #endif /* HAVE_ECC */
- #ifdef HAVE_ED25519
- case ed25519_sa_algo:
- {
- ed25519_key* key = (ed25519_key*)ssl->hsKey;
-
- ret = Ed25519Sign(ssl,
- args->sigDataBuf, args->sigDataSz,
- args->output + LENGTH_SZ + args->idx,
- &args->sigSz,
- key,
- #ifdef HAVE_PK_CALLBACKS
- ssl->buffers.key
- #else
- NULL
- #endif
- );
- break;
- }
- #endif
- #ifdef HAVE_ED448
- case ed448_sa_algo:
- {
- ed448_key* key = (ed448_key*)ssl->hsKey;
-
- ret = Ed448Sign(ssl,
- args->sigDataBuf, args->sigDataSz,
- args->output + LENGTH_SZ + args->idx,
- &args->sigSz,
- key,
- #ifdef HAVE_PK_CALLBACKS
- ssl->buffers.key
- #else
- NULL
- #endif
- );
- break;
- }
- #endif
- } /* switch(ssl->specs.sig_algo) */
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
- #if !defined(NO_DH) && !defined(NO_RSA)
- case diffie_hellman_kea:
- {
- /* Sign hash to create signature */
- switch (ssl->suites->sigAlgo)
- {
- #ifndef NO_RSA
- #ifdef WC_RSA_PSS
- case rsa_pss_sa_algo:
- #endif
- case rsa_sa_algo:
- {
- RsaKey* key = (RsaKey*)ssl->hsKey;
-
- if (ssl->options.usingAnon_cipher) {
- break;
- }
-
- ret = RsaSign(ssl,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length,
- args->output + args->idx,
- &args->sigSz,
- ssl->suites->sigAlgo, ssl->suites->hashAlgo,
- key,
- ssl->buffers.key
- );
- break;
- }
- #endif /* NO_RSA */
- } /* switch (ssl->suites->sigAlgo) */
-
- break;
- }
- #endif /* !defined(NO_DH) && !defined(NO_RSA) */
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_sske;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_VERIFY;
- } /* case TLS_ASYNC_DO */
- FALL_THROUGH;
-
- case TLS_ASYNC_VERIFY:
- {
- switch(ssl->specs.kea)
- {
- #ifndef NO_PSK
- case psk_kea:
- {
- /* Nothing to do in this sub-state */
- break;
- }
- #endif /* !NO_PSK */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- /* Nothing to do in this sub-state */
- break;
- }
- #endif /* !defined(NO_DH) && !defined(NO_PSK) */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- /* Nothing to do in this sub-state */
- break;
- }
- #endif /* (HAVE_ECC || CURVE25519 || CURVE448) && !NO_PSK */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- switch(ssl->suites->sigAlgo)
- {
- #ifndef NO_RSA
- #ifdef WC_RSA_PSS
- case rsa_pss_sa_algo:
- #endif
- case rsa_sa_algo:
- {
- RsaKey* key = (RsaKey*)ssl->hsKey;
-
- if (args->verifySig == NULL) {
- if (args->sigSz == 0) {
- ERROR_OUT(BAD_COND_E, exit_sske);
- }
- args->verifySig = (byte*)XMALLOC(
- args->sigSz, ssl->heap,
- DYNAMIC_TYPE_SIGNATURE);
- if (!args->verifySig) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
- XMEMCPY(args->verifySig,
- args->output + args->idx, args->sigSz);
- }
-
- /* check for signature faults */
- ret = VerifyRsaSign(ssl,
- args->verifySig, args->sigSz,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length,
- ssl->suites->sigAlgo, ssl->suites->hashAlgo,
- key, ssl->buffers.key
- );
- break;
- }
- #endif
- case ecc_dsa_sa_algo:
- #ifdef HAVE_ED25519
- case ed25519_sa_algo:
- #endif
- #ifdef HAVE_ED448
- case ed448_sa_algo:
- #endif
- {
- /* Now that we know the real sig size, write it. */
- c16toa((word16)args->sigSz,
- args->output + args->idx);
-
- /* And adjust length and sendSz from estimates */
- args->length += args->sigSz - args->tmpSigSz;
- args->sendSz += args->sigSz - args->tmpSigSz;
- break;
- }
- default:
- ERROR_OUT(ALGO_ID_E, exit_sske); /* unsupported type */
- } /* switch(ssl->specs.sig_algo) */
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
- #if !defined(NO_DH) && !defined(NO_RSA)
- case diffie_hellman_kea:
- {
- switch (ssl->suites->sigAlgo)
- {
- #ifndef NO_RSA
- #ifndef WC_RSA_PSS
- case rsa_pss_sa_algo:
- #endif
- case rsa_sa_algo:
- {
- RsaKey* key = (RsaKey*)ssl->hsKey;
-
- if (ssl->options.usingAnon_cipher) {
- break;
- }
-
- if (args->verifySig == NULL) {
- if (args->sigSz == 0) {
- ERROR_OUT(BAD_COND_E, exit_sske);
- }
- args->verifySig = (byte*)XMALLOC(
- args->sigSz, ssl->heap,
- DYNAMIC_TYPE_SIGNATURE);
- if (!args->verifySig) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
- XMEMCPY(args->verifySig,
- args->output + args->idx, args->sigSz);
- }
-
- /* check for signature faults */
- ret = VerifyRsaSign(ssl,
- args->verifySig, args->sigSz,
- ssl->buffers.sig.buffer,
- ssl->buffers.sig.length,
- ssl->suites->sigAlgo, ssl->suites->hashAlgo,
- key, ssl->buffers.key
- );
- break;
- }
- #endif
- } /* switch (ssl->suites->sigAlgo) */
- break;
- }
- #endif /* !defined(NO_DH) && !defined(NO_RSA) */
- } /* switch(ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_sske;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_FINALIZE;
- } /* case TLS_ASYNC_VERIFY */
- FALL_THROUGH;
-
- case TLS_ASYNC_FINALIZE:
- {
- #ifdef HAVE_QSH
- if (ssl->peerQSHKeyPresent) {
- if (args->qshSz > 0) {
- args->idx = args->sendSz - args->qshSz;
- if (QSH_KeyExchangeWrite(ssl, 1) != 0) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
-
- /* extension type */
- c16toa(TLSX_QUANTUM_SAFE_HYBRID,
- args->output + args->idx);
- args->idx += OPAQUE16_LEN;
-
- /* write to output and check amount written */
- if (TLSX_QSHPK_Write(ssl->QSH_secret->list,
- args->output + args->idx) >
- args->qshSz - OPAQUE16_LEN) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
- }
- }
- #endif
-
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- if (ssl->specs.kea == ecdhe_psk_kea ||
- ssl->specs.kea == ecc_diffie_hellman_kea) {
- /* Check output to make sure it was set */
- if (args->output) {
- AddHeaders(args->output, args->length,
- server_key_exchange, ssl);
- }
- else {
- ERROR_OUT(BUFFER_ERROR, exit_sske);
- }
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
- if (IsEncryptionOn(ssl, 1)) {
- args->inputSz = args->length + HANDSHAKE_HEADER_SZ;
- if (ssl->options.dtls)
- args->inputSz += DTLS_HANDSHAKE_EXTRA;
- args->input = (byte*)XMALLOC(args->inputSz, ssl->heap,
- DYNAMIC_TYPE_IN_BUFFER);
- if (args->input == NULL) {
- ERROR_OUT(MEMORY_E, exit_sske);
- }
-
- if (args->output == NULL) {
- ERROR_OUT(BUFFER_ERROR, exit_sske);
- }
-
- if (!ssl->options.dtls)
- XMEMCPY(args->input, args->output + RECORD_HEADER_SZ,
- args->inputSz);
- else
- XMEMCPY(args->input, args->output + DTLS_RECORD_HEADER_SZ,
- args->inputSz);
-
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) &&
- (ret = DtlsMsgPoolSave(ssl, args->input, args->inputSz, server_key_exchange))
- != 0) {
- goto exit_sske;
- }
- #endif
- ret = BuildMessage(ssl, args->output, args->sendSz,
- args->input, args->inputSz, handshake, 1, 0, 0, CUR_ORDER);
- XFREE(args->input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- args->input = NULL;
- /* make sure its not double free'd on cleanup */
-
- if (ret >= 0) {
- args->sendSz = ret;
- ret = 0;
- }
- }
- else {
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- if ((ret = DtlsMsgPoolSave(ssl,
- args->output, args->sendSz, server_key_exchange)) != 0) {
- goto exit_sske;
- }
- }
-
- if (ssl->options.dtls)
- DtlsSEQIncrement(ssl, CUR_ORDER);
- #endif
-
- ret = HashOutput(ssl, args->output, args->sendSz, 0);
- if (ret != 0) {
- goto exit_sske;
- }
- }
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn) {
- AddPacketName(ssl, "ServerKeyExchange");
- }
- if (ssl->toInfoOn) {
- AddPacketInfo(ssl, "ServerKeyExchange", handshake,
- args->output, args->sendSz, WRITE_PROTO, ssl->heap);
- }
- #endif
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_END;
- } /* case TLS_ASYNC_FINALIZE */
- FALL_THROUGH;
-
- case TLS_ASYNC_END:
- {
- ssl->buffers.outputBuffer.length += args->sendSz;
- if (!ssl->options.groupMessages) {
- ret = SendBuffered(ssl);
- }
-
- ssl->options.serverState = SERVER_KEYEXCHANGE_COMPLETE;
- break;
- }
- default:
- ret = INPUT_CASE_ERROR;
- } /* switch(ssl->options.asyncState) */
-
- exit_sske:
-
- WOLFSSL_LEAVE("SendServerKeyExchange", ret);
- WOLFSSL_END(WC_FUNC_SERVER_KEY_EXCHANGE_SEND);
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* Handle async operation */
- if (ret == WC_PENDING_E)
- return ret;
- #endif /* WOLFSSL_ASYNC_CRYPT */
-
- /* Final cleanup */
- FreeSskeArgs(ssl, args);
- FreeKeyExchange(ssl);
-
- return ret;
- }
-
-#if defined(HAVE_SERVER_RENEGOTIATION_INFO) || defined(HAVE_FALLBACK_SCSV) || \
- defined(OPENSSL_ALL)
-
- /* search suites for specific one, idx on success, negative on error */
-#ifndef WOLFSSL_TLS13
- static
-#endif
- int FindSuite(Suites* suites, byte first, byte second)
- {
- int i;
-
- if (suites == NULL || suites->suiteSz == 0) {
- WOLFSSL_MSG("Suites pointer error or suiteSz 0");
- return SUITES_ERROR;
- }
-
- for (i = 0; i < suites->suiteSz-1; i += SUITE_LEN) {
- if (suites->suites[i] == first &&
- suites->suites[i+1] == second )
- return i;
- }
-
- return MATCH_SUITE_ERROR;
- }
-
-#endif
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
- /* Make sure server cert/key are valid for this suite, true on success */
- static int VerifyServerSuite(WOLFSSL* ssl, word16 idx)
- {
- int haveRSA = !ssl->options.haveStaticECC;
- int havePSK = 0;
- byte first;
- byte second;
-
- WOLFSSL_ENTER("VerifyServerSuite");
-
- if (ssl->suites == NULL) {
- WOLFSSL_MSG("Suites pointer error");
- return 0;
- }
-
- first = ssl->suites->suites[idx];
- second = ssl->suites->suites[idx+1];
-
- #ifndef NO_PSK
- havePSK = ssl->options.havePSK;
- #endif
-
- if (ssl->options.haveNTRU)
- haveRSA = 0;
-
- if (CipherRequires(first, second, REQUIRES_RSA)) {
- WOLFSSL_MSG("Requires RSA");
- if (haveRSA == 0) {
- WOLFSSL_MSG("Don't have RSA");
- return 0;
- }
- }
-
- if (CipherRequires(first, second, REQUIRES_DHE)) {
- WOLFSSL_MSG("Requires DHE");
- if (ssl->options.haveDH == 0) {
- WOLFSSL_MSG("Don't have DHE");
- return 0;
- }
- }
-
- if (CipherRequires(first, second, REQUIRES_ECC)) {
- WOLFSSL_MSG("Requires ECC");
- if (ssl->options.haveECC == 0) {
- WOLFSSL_MSG("Don't have ECC");
- return 0;
- }
- }
-
- if (CipherRequires(first, second, REQUIRES_ECC_STATIC)) {
- WOLFSSL_MSG("Requires static ECC");
- if (ssl->options.haveStaticECC == 0) {
- WOLFSSL_MSG("Don't have static ECC");
- return 0;
- }
- }
-
- if (CipherRequires(first, second, REQUIRES_PSK)) {
- WOLFSSL_MSG("Requires PSK");
- if (havePSK == 0) {
- WOLFSSL_MSG("Don't have PSK");
- return 0;
- }
- }
-
- if (CipherRequires(first, second, REQUIRES_NTRU)) {
- WOLFSSL_MSG("Requires NTRU");
- if (ssl->options.haveNTRU == 0) {
- WOLFSSL_MSG("Don't have NTRU");
- return 0;
- }
- }
-
- if (CipherRequires(first, second, REQUIRES_RSA_SIG)) {
- WOLFSSL_MSG("Requires RSA Signature");
- if (ssl->options.side == WOLFSSL_SERVER_END &&
- ssl->options.haveECDSAsig == 1) {
- WOLFSSL_MSG("Don't have RSA Signature");
- return 0;
- }
- }
-
-#if !defined(WOLFSSL_OLDTLS_AEAD_CIPHERSUITES)
- if (CipherRequires(first, second, REQUIRES_AEAD)) {
- WOLFSSL_MSG("Requires AEAD");
- if (ssl->version.major == SSLv3_MAJOR &&
- ssl->version.minor < TLSv1_2_MINOR) {
- WOLFSSL_MSG("Version of SSL does not support AEAD ciphers");
- return 0;
- }
-
- }
-#endif
-
-#if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && defined(HAVE_SUPPORTED_CURVES)
- if (!TLSX_ValidateSupportedCurves(ssl, first, second)) {
- WOLFSSL_MSG("Don't have matching curves");
- return 0;
- }
-#endif
-
- /* ECCDHE is always supported if ECC on */
-
-#ifdef HAVE_QSH
- /* need to negotiate a classic suite in addition to TLS_QSH */
- if (first == QSH_BYTE && second == TLS_QSH) {
- if (TLSX_SupportExtensions(ssl)) {
- ssl->options.haveQSH = 1; /* matched TLS_QSH */
- }
- else {
- WOLFSSL_MSG("Version of SSL connection does not support "
- "TLS_QSH");
- }
- return 0;
- }
-#endif
-
-#ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(ssl->version) &&
- ssl->options.side == WOLFSSL_SERVER_END) {
- /* Try to establish a key share. */
- int ret = TLSX_KeyShare_Establish(ssl);
- if (ret == KEY_SHARE_ERROR)
- ssl->options.serverState = SERVER_HELLO_RETRY_REQUEST_COMPLETE;
- else if (ret != 0)
- return 0;
- }
- else if (first == TLS13_BYTE || (first == ECC_BYTE &&
- (second == TLS_SHA256_SHA256 || second == TLS_SHA384_SHA384))) {
- /* Can't negotiate TLS 1.3 cipher suites with lower protocol
- * version. */
- return 0;
- }
-#endif
-
- return 1;
- }
-
-#ifndef NO_WOLFSSL_SERVER
- static int CompareSuites(WOLFSSL* ssl, Suites* peerSuites, word16 i,
- word16 j)
- {
- if (ssl->suites->suites[i] == peerSuites->suites[j] &&
- ssl->suites->suites[i+1] == peerSuites->suites[j+1] ) {
-
- if (VerifyServerSuite(ssl, i)) {
- int result;
- WOLFSSL_MSG("Verified suite validity");
- ssl->options.cipherSuite0 = ssl->suites->suites[i];
- ssl->options.cipherSuite = ssl->suites->suites[i+1];
- result = SetCipherSpecs(ssl);
- if (result == 0) {
- result = PickHashSigAlgo(ssl, peerSuites->hashSigAlgo,
- peerSuites->hashSigAlgoSz);
- }
- return result;
- }
- else {
- WOLFSSL_MSG("Could not verify suite validity, continue");
- }
- }
-
- return MATCH_SUITE_ERROR;
- }
-
- int MatchSuite(WOLFSSL* ssl, Suites* peerSuites)
- {
- int ret;
- word16 i, j;
-
- WOLFSSL_ENTER("MatchSuite");
-
- /* & 0x1 equivalent % 2 */
- if (peerSuites->suiteSz == 0 || peerSuites->suiteSz & 0x1)
- return BUFFER_ERROR;
-
- if (ssl->suites == NULL)
- return SUITES_ERROR;
-
- if (!ssl->options.useClientOrder) {
- /* Server order */
- for (i = 0; i < ssl->suites->suiteSz; i += 2) {
- for (j = 0; j < peerSuites->suiteSz; j += 2) {
- ret = CompareSuites(ssl, peerSuites, i, j);
- if (ret != MATCH_SUITE_ERROR)
- return ret;
- }
- }
- }
- else {
- /* Client order */
- for (j = 0; j < peerSuites->suiteSz; j += 2) {
- for (i = 0; i < ssl->suites->suiteSz; i += 2) {
- ret = CompareSuites(ssl, peerSuites, i, j);
- if (ret != MATCH_SUITE_ERROR)
- return ret;
- }
- }
- }
-
- return MATCH_SUITE_ERROR;
- }
-#endif
-
-#ifdef OLD_HELLO_ALLOWED
-
- /* process old style client hello, deprecate? */
- int ProcessOldClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
- word32 inSz, word16 sz)
- {
- word32 idx = *inOutIdx;
- word16 sessionSz;
- word16 randomSz;
- word16 i, j;
- ProtocolVersion pv;
- Suites clSuites;
- int ret = -1;
-
- (void)inSz;
- WOLFSSL_MSG("Got old format client hello");
-#ifdef WOLFSSL_CALLBACKS
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "ClientHello");
- if (ssl->toInfoOn)
- AddLateName("ClientHello", &ssl->timeoutInfo);
-#endif
-
- /* manually hash input since different format */
-#ifndef NO_OLD_TLS
-#ifndef NO_MD5
- wc_Md5Update(&ssl->hsHashes->hashMd5, input + idx, sz);
-#endif
-#ifndef NO_SHA
- wc_ShaUpdate(&ssl->hsHashes->hashSha, input + idx, sz);
-#endif
-#endif
-#ifndef NO_SHA256
- if (IsAtLeastTLSv1_2(ssl)) {
- int shaRet = wc_Sha256Update(&ssl->hsHashes->hashSha256,
- input + idx, sz);
- if (shaRet != 0)
- return shaRet;
- }
-#endif
-
- /* does this value mean client_hello? */
- idx++;
-
- /* version */
- pv.major = input[idx++];
- pv.minor = input[idx++];
- ssl->chVersion = pv; /* store */
-
- if (ssl->version.minor > pv.minor) {
- byte haveRSA = 0;
- byte havePSK = 0;
- int keySz = 0;
-
- if (!ssl->options.downgrade) {
- WOLFSSL_MSG("Client trying to connect with lesser version");
- return VERSION_ERROR;
- }
- if (pv.minor < ssl->options.minDowngrade) {
- WOLFSSL_MSG("\tversion below minimum allowed, fatal error");
- return VERSION_ERROR;
- }
- if (pv.minor == SSLv3_MINOR) {
- /* turn off tls */
- WOLFSSL_MSG("\tdowngrading to SSLv3");
- ssl->options.tls = 0;
- ssl->options.tls1_1 = 0;
- ssl->version.minor = SSLv3_MINOR;
- }
- else if (pv.minor == TLSv1_MINOR) {
- WOLFSSL_MSG("\tdowngrading to TLSv1");
- /* turn off tls 1.1+ */
- ssl->options.tls1_1 = 0;
- ssl->version.minor = TLSv1_MINOR;
- }
- else if (pv.minor == TLSv1_1_MINOR) {
- WOLFSSL_MSG("\tdowngrading to TLSv1.1");
- ssl->version.minor = TLSv1_1_MINOR;
- }
- else if (pv.minor == TLSv1_2_MINOR) {
- WOLFSSL_MSG(" downgrading to TLSv1.2");
- ssl->version.minor = TLSv1_2_MINOR;
- }
-#ifndef NO_RSA
- haveRSA = 1;
-#endif
-#ifndef NO_PSK
- havePSK = ssl->options.havePSK;
-#endif
-#ifndef NO_CERTS
- keySz = ssl->buffers.keySz;
-#endif
-
- InitSuites(ssl->suites, ssl->version, keySz, haveRSA, havePSK,
- ssl->options.haveDH, ssl->options.haveNTRU,
- ssl->options.haveECDSAsig, ssl->options.haveECC,
- ssl->options.haveStaticECC, ssl->options.side);
- }
-
- /* suite size */
- ato16(&input[idx], &clSuites.suiteSz);
- idx += OPAQUE16_LEN;
-
- if (clSuites.suiteSz > WOLFSSL_MAX_SUITE_SZ)
- return BUFFER_ERROR;
- /* Make sure the suiteSz is a multiple of 3. (Old Client Hello) */
- if (clSuites.suiteSz % 3 != 0)
- return BUFFER_ERROR;
- clSuites.hashSigAlgoSz = 0;
-
- /* session size */
- ato16(&input[idx], &sessionSz);
- idx += OPAQUE16_LEN;
-
- if (sessionSz > ID_LEN)
- return BUFFER_ERROR;
-
- /* random size */
- ato16(&input[idx], &randomSz);
- idx += OPAQUE16_LEN;
-
- if (randomSz > RAN_LEN)
- return BUFFER_ERROR;
-
- /* suites */
- for (i = 0, j = 0; i < clSuites.suiteSz; i += 3) {
- byte first = input[idx++];
- if (!first) { /* implicit: skip sslv2 type */
- XMEMCPY(&clSuites.suites[j], &input[idx], SUITE_LEN);
- j += SUITE_LEN;
- }
- idx += SUITE_LEN;
- }
- clSuites.suiteSz = j;
-
- /* session id */
- if (sessionSz) {
- XMEMCPY(ssl->arrays->sessionID, input + idx, sessionSz);
- ssl->arrays->sessionIDSz = (byte)sessionSz;
- idx += sessionSz;
- ssl->options.resuming = 1;
- }
-
- /* random */
- if (randomSz < RAN_LEN)
- XMEMSET(ssl->arrays->clientRandom, 0, RAN_LEN - randomSz);
- XMEMCPY(&ssl->arrays->clientRandom[RAN_LEN - randomSz], input + idx,
- randomSz);
- idx += randomSz;
-
- if (ssl->options.usingCompression)
- ssl->options.usingCompression = 0; /* turn off */
-
- ssl->options.clientState = CLIENT_HELLO_COMPLETE;
- ssl->cbmode = SSL_CB_MODE_WRITE;
- *inOutIdx = idx;
-
- ssl->options.haveSessionId = 1;
- /* DoClientHello uses same resume code */
- if (ssl->options.resuming) { /* let's try */
- WOLFSSL_SESSION* session = GetSession(ssl,
- ssl->arrays->masterSecret, 1);
- #ifdef HAVE_SESSION_TICKET
- if (ssl->options.useTicket == 1) {
- session = &ssl->session;
- }
- #endif
-
- if (!session) {
- WOLFSSL_MSG("Session lookup for resume failed");
- ssl->options.resuming = 0;
- } else {
- #ifdef HAVE_EXT_CACHE
- wolfSSL_SESSION_free(session);
- #endif
- if (MatchSuite(ssl, &clSuites) < 0) {
- WOLFSSL_MSG("Unsupported cipher suite, OldClientHello");
- return UNSUPPORTED_SUITE;
- }
-
- ret = wc_RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom,
- RAN_LEN);
- if (ret != 0)
- return ret;
-
- #ifdef NO_OLD_TLS
- ret = DeriveTlsKeys(ssl);
- #else
- #ifndef NO_TLS
- if (ssl->options.tls)
- ret = DeriveTlsKeys(ssl);
- #endif
- if (!ssl->options.tls)
- ret = DeriveKeys(ssl);
- #endif
- ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;
-
- return ret;
- }
- }
-
- ret = MatchSuite(ssl, &clSuites);
- if (ret != 0)return ret;
- return SanityCheckMsgReceived(ssl, client_hello);
- }
-
-#endif /* OLD_HELLO_ALLOWED */
-
-#ifndef WOLFSSL_NO_TLS12
-
- int HandleTlsResumption(WOLFSSL* ssl, int bogusID, Suites* clSuites)
- {
- int ret = 0;
- WOLFSSL_SESSION* session;
-
- (void)bogusID;
-
- session = GetSession(ssl, ssl->arrays->masterSecret, 1);
- #ifdef HAVE_SESSION_TICKET
- if (ssl->options.useTicket == 1) {
- session = &ssl->session;
- } else if (bogusID == 1 && ssl->options.rejectTicket == 0) {
- WOLFSSL_MSG("Bogus session ID without session ticket");
- return BUFFER_ERROR;
- }
- #endif
-
- if (!session) {
- WOLFSSL_MSG("Session lookup for resume failed");
- ssl->options.resuming = 0;
- }
- else if (session->haveEMS != ssl->options.haveEMS) {
- /* RFC 7627, 5.3, server-side */
- /* if old sess didn't have EMS, but new does, full handshake */
- if (!session->haveEMS && ssl->options.haveEMS) {
- WOLFSSL_MSG("Attempting to resume a session that didn't "
- "use EMS with a new session with EMS. Do full "
- "handshake.");
- ssl->options.resuming = 0;
- }
- /* if old sess used EMS, but new doesn't, MUST abort */
- else if (session->haveEMS && !ssl->options.haveEMS) {
- WOLFSSL_MSG("Trying to resume a session with EMS without "
- "using EMS");
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, handshake_failure);
- #endif
- #ifdef HAVE_EXT_CACHE
- wolfSSL_SESSION_free(session);
- #endif
- return EXT_MASTER_SECRET_NEEDED_E;
- }
- #ifdef HAVE_EXT_CACHE
- wolfSSL_SESSION_free(session);
- #endif
- }
- else {
- #ifndef NO_RESUME_SUITE_CHECK
- int j;
-
- /* Check client suites include the one in session */
- for (j = 0; j < clSuites->suiteSz; j += 2) {
- if (clSuites->suites[j] == session->cipherSuite0 &&
- clSuites->suites[j+1] == session->cipherSuite) {
- break;
- }
- }
- if (j == clSuites->suiteSz) {
- WOLFSSL_MSG("Prev session's cipher suite not in ClientHello");
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, illegal_parameter);
- #endif
- return UNSUPPORTED_SUITE;
- }
- #endif
-
- #ifdef HAVE_EXT_CACHE
- wolfSSL_SESSION_free(session);
- #endif
- if (MatchSuite(ssl, clSuites) < 0) {
- WOLFSSL_MSG("Unsupported cipher suite, ClientHello");
- return UNSUPPORTED_SUITE;
- }
-
- ret = wc_RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom,
- RAN_LEN);
- if (ret != 0)
- return ret;
-
- #ifdef NO_OLD_TLS
- ret = DeriveTlsKeys(ssl);
- #else
- #ifndef NO_TLS
- if (ssl->options.tls)
- ret = DeriveTlsKeys(ssl);
- #endif
- if (!ssl->options.tls)
- ret = DeriveKeys(ssl);
- #endif
- ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;
- }
-
- return ret;
- }
-
-
- /* handle processing of client_hello (1) */
- int DoClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
- word32 helloSz)
- {
- byte b;
- byte bogusID = 0; /* flag for a bogus session id */
- ProtocolVersion pv;
- Suites clSuites;
- word32 i = *inOutIdx;
- word32 begin = i;
- int ret = 0;
-#ifdef WOLFSSL_DTLS
- Hmac cookieHmac;
- byte peerCookie[MAX_COOKIE_LEN];
- byte peerCookieSz = 0;
- byte cookieType;
- byte cookieSz = 0;
-
- XMEMSET(&cookieHmac, 0, sizeof(Hmac));
-#endif /* WOLFSSL_DTLS */
-
- WOLFSSL_START(WC_FUNC_CLIENT_HELLO_DO);
- WOLFSSL_ENTER("DoClientHello");
-
-#ifdef WOLFSSL_CALLBACKS
- if (ssl->hsInfoOn) AddPacketName(ssl, "ClientHello");
- if (ssl->toInfoOn) AddLateName("ClientHello", &ssl->timeoutInfo);
-#endif
- /* protocol version, random and session id length check */
- if (OPAQUE16_LEN + RAN_LEN + OPAQUE8_LEN > helloSz)
- return BUFFER_ERROR;
-
- /* protocol version */
- XMEMCPY(&pv, input + i, OPAQUE16_LEN);
- ssl->chVersion = pv; /* store */
-#ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) && !IsSCR(ssl) && !ssl->options.resuming) {
- #if defined(NO_SHA) && defined(NO_SHA256)
- #error "DTLS needs either SHA or SHA-256"
- #endif /* NO_SHA && NO_SHA256 */
-
- #if !defined(NO_SHA) && defined(NO_SHA256)
- cookieType = WC_SHA;
- cookieSz = WC_SHA_DIGEST_SIZE;
- #endif /* NO_SHA */
- #ifndef NO_SHA256
- cookieType = WC_SHA256;
- cookieSz = WC_SHA256_DIGEST_SIZE;
- #endif /* NO_SHA256 */
- ret = wc_HmacSetKey(&cookieHmac, cookieType,
- ssl->buffers.dtlsCookieSecret.buffer,
- ssl->buffers.dtlsCookieSecret.length);
- if (ret != 0) return ret;
- ret = wc_HmacUpdate(&cookieHmac,
- (const byte*)ssl->buffers.dtlsCtx.peer.sa,
- ssl->buffers.dtlsCtx.peer.sz);
- if (ret != 0) return ret;
- ret = wc_HmacUpdate(&cookieHmac, input + i, OPAQUE16_LEN);
- if (ret != 0) return ret;
- }
-#endif /* WOLFSSL_DTLS */
- i += OPAQUE16_LEN;
-
- /* Legacy protocol version cannot negotiate TLS 1.3 or higher. */
- if (pv.major == SSLv3_MAJOR && pv.minor >= TLSv1_3_MINOR)
- pv.minor = TLSv1_2_MINOR;
-
- if ((!ssl->options.dtls && ssl->version.minor > pv.minor) ||
- (ssl->options.dtls && ssl->version.minor != DTLS_MINOR
- && ssl->version.minor != DTLSv1_2_MINOR && pv.minor != DTLS_MINOR
- && pv.minor != DTLSv1_2_MINOR)) {
-
- word16 haveRSA = 0;
- word16 havePSK = 0;
- int keySz = 0;
-
- if (!ssl->options.downgrade) {
- WOLFSSL_MSG("Client trying to connect with lesser version");
- return VERSION_ERROR;
- }
- if (pv.minor < ssl->options.minDowngrade) {
- WOLFSSL_MSG("\tversion below minimum allowed, fatal error");
- return VERSION_ERROR;
- }
-
- if (pv.minor == SSLv3_MINOR) {
- /* turn off tls */
- WOLFSSL_MSG("\tdowngrading to SSLv3");
- ssl->options.tls = 0;
- ssl->options.tls1_1 = 0;
- ssl->version.minor = SSLv3_MINOR;
- }
- else if (pv.minor == TLSv1_MINOR) {
- /* turn off tls 1.1+ */
- WOLFSSL_MSG("\tdowngrading to TLSv1");
- ssl->options.tls1_1 = 0;
- ssl->version.minor = TLSv1_MINOR;
- }
- else if (pv.minor == TLSv1_1_MINOR) {
- WOLFSSL_MSG("\tdowngrading to TLSv1.1");
- ssl->version.minor = TLSv1_1_MINOR;
- }
- else if (pv.minor == TLSv1_2_MINOR) {
- WOLFSSL_MSG(" downgrading to TLSv1.2");
- ssl->version.minor = TLSv1_2_MINOR;
- }
-#ifndef NO_RSA
- haveRSA = 1;
-#endif
-#ifndef NO_PSK
- havePSK = ssl->options.havePSK;
-#endif
-#ifndef NO_CERTS
- keySz = ssl->buffers.keySz;
-#endif
- InitSuites(ssl->suites, ssl->version, keySz, haveRSA, havePSK,
- ssl->options.haveDH, ssl->options.haveNTRU,
- ssl->options.haveECDSAsig, ssl->options.haveECC,
- ssl->options.haveStaticECC, ssl->options.side);
- }
-
-#ifdef OPENSSL_EXTRA
- /* check if option is set to not allow the current version
- * set from either wolfSSL_set_options or wolfSSL_CTX_set_options */
- if (!ssl->options.dtls && ssl->options.downgrade &&
- ssl->options.mask > 0) {
- int reset = 0;
- if (ssl->version.minor == TLSv1_2_MINOR &&
- (ssl->options.mask & SSL_OP_NO_TLSv1_2) == SSL_OP_NO_TLSv1_2) {
- WOLFSSL_MSG("\tOption set to not allow TLSv1.2, Downgrading");
- ssl->version.minor = TLSv1_1_MINOR;
- reset = 1;
- }
- if (ssl->version.minor == TLSv1_1_MINOR &&
- (ssl->options.mask & SSL_OP_NO_TLSv1_1) == SSL_OP_NO_TLSv1_1) {
- WOLFSSL_MSG("\tOption set to not allow TLSv1.1, Downgrading");
- ssl->options.tls1_1 = 0;
- ssl->version.minor = TLSv1_MINOR;
- reset = 1;
- }
- if (ssl->version.minor == TLSv1_MINOR &&
- (ssl->options.mask & SSL_OP_NO_TLSv1) == SSL_OP_NO_TLSv1) {
- WOLFSSL_MSG("\tOption set to not allow TLSv1, Downgrading");
- ssl->options.tls = 0;
- ssl->options.tls1_1 = 0;
- ssl->version.minor = SSLv3_MINOR;
- reset = 1;
- }
- if (ssl->version.minor == SSLv3_MINOR &&
- (ssl->options.mask & SSL_OP_NO_SSLv3) == SSL_OP_NO_SSLv3) {
- WOLFSSL_MSG("\tError, option set to not allow SSLv3");
- return VERSION_ERROR;
- }
-
- if (ssl->version.minor < ssl->options.minDowngrade) {
- WOLFSSL_MSG("\tversion below minimum allowed, fatal error");
- return VERSION_ERROR;
- }
-
- if (reset) {
- word16 haveRSA = 0;
- word16 havePSK = 0;
- int keySz = 0;
-
- #ifndef NO_RSA
- haveRSA = 1;
- #endif
- #ifndef NO_PSK
- havePSK = ssl->options.havePSK;
- #endif
- #ifndef NO_CERTS
- keySz = ssl->buffers.keySz;
- #endif
-
- /* reset cipher suites to account for TLS version change */
- InitSuites(ssl->suites, ssl->version, keySz, haveRSA, havePSK,
- ssl->options.haveDH, ssl->options.haveNTRU,
- ssl->options.haveECDSAsig, ssl->options.haveECC,
- ssl->options.haveStaticECC, ssl->options.side);
- }
- }
-#endif
-
- /* random */
- XMEMCPY(ssl->arrays->clientRandom, input + i, RAN_LEN);
-#ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) && !IsSCR(ssl) && !ssl->options.resuming) {
- ret = wc_HmacUpdate(&cookieHmac, input + i, RAN_LEN);
- if (ret != 0) return ret;
- }
-#endif /* WOLFSSL_DTLS */
- i += RAN_LEN;
-
-#ifdef SHOW_SECRETS
- {
- int j;
- printf("client random: ");
- for (j = 0; j < RAN_LEN; j++)
- printf("%02x", ssl->arrays->clientRandom[j]);
- printf("\n");
- }
-#endif
-
- /* session id */
- b = input[i++];
-
-#ifdef HAVE_SESSION_TICKET
- if (b > 0 && b < ID_LEN) {
- bogusID = 1;
- WOLFSSL_MSG("Client sent bogus session id, let's allow for echo");
- }
-#endif
-
- if (b == ID_LEN || bogusID) {
- if ((i - begin) + b > helloSz)
- return BUFFER_ERROR;
-
- XMEMCPY(ssl->arrays->sessionID, input + i, b);
-#ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) && !IsSCR(ssl) &&
- !ssl->options.resuming) {
- ret = wc_HmacUpdate(&cookieHmac, input + i - 1, b + 1);
- if (ret != 0) return ret;
- }
-#endif /* WOLFSSL_DTLS */
- ssl->arrays->sessionIDSz = b;
- i += b;
- ssl->options.resuming = 1; /* client wants to resume */
- WOLFSSL_MSG("Client wants to resume session");
- }
- else if (b) {
- WOLFSSL_MSG("Invalid session ID size");
- return BUFFER_ERROR; /* session ID nor 0 neither 32 bytes long */
- }
-
- #ifdef WOLFSSL_DTLS
- /* cookie */
- if (ssl->options.dtls) {
-
- if ((i - begin) + OPAQUE8_LEN > helloSz)
- return BUFFER_ERROR;
-
- peerCookieSz = input[i++];
-
- if (peerCookieSz) {
- if (peerCookieSz > MAX_COOKIE_LEN)
- return BUFFER_ERROR;
-
- if ((i - begin) + peerCookieSz > helloSz)
- return BUFFER_ERROR;
-
- XMEMCPY(peerCookie, input + i, peerCookieSz);
-
- i += peerCookieSz;
- }
- }
- #endif
-
- /* suites */
- if ((i - begin) + OPAQUE16_LEN > helloSz)
- return BUFFER_ERROR;
-
- ato16(&input[i], &clSuites.suiteSz);
- i += OPAQUE16_LEN;
-
- /* Cipher suite lists are always multiples of two in length. */
- if (clSuites.suiteSz % 2 != 0)
- return BUFFER_ERROR;
-
- /* suites and compression length check */
- if ((i - begin) + clSuites.suiteSz + OPAQUE8_LEN > helloSz)
- return BUFFER_ERROR;
-
- if (clSuites.suiteSz > WOLFSSL_MAX_SUITE_SZ)
- return BUFFER_ERROR;
-
- XMEMCPY(clSuites.suites, input + i, clSuites.suiteSz);
-
-#ifdef HAVE_SERVER_RENEGOTIATION_INFO
- /* check for TLS_EMPTY_RENEGOTIATION_INFO_SCSV suite */
- if (FindSuite(&clSuites, 0, TLS_EMPTY_RENEGOTIATION_INFO_SCSV) >= 0) {
- TLSX* extension;
-
- /* check for TLS_EMPTY_RENEGOTIATION_INFO_SCSV suite */
- ret = TLSX_AddEmptyRenegotiationInfo(&ssl->extensions, ssl->heap);
- if (ret != WOLFSSL_SUCCESS)
- return ret;
-
- extension = TLSX_Find(ssl->extensions, TLSX_RENEGOTIATION_INFO);
- if (extension) {
- ssl->secure_renegotiation =
- (SecureRenegotiation*)extension->data;
- ssl->secure_renegotiation->enabled = 1;
- }
- }
-#endif /* HAVE_SERVER_RENEGOTIATION_INFO */
-#if defined(HAVE_FALLBACK_SCSV) || defined(OPENSSL_ALL)
- /* check for TLS_FALLBACK_SCSV suite */
- if (FindSuite(&clSuites, TLS_FALLBACK_SCSV, 0) >= 0) {
- WOLFSSL_MSG("Found Fallback SCSV");
- if (ssl->ctx->method->version.minor > pv.minor) {
- WOLFSSL_MSG("Client trying to connect with lesser version");
- SendAlert(ssl, alert_fatal, inappropriate_fallback);
- return VERSION_ERROR;
- }
- }
-#endif
-
-#ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) && !IsSCR(ssl) && !ssl->options.resuming) {
- ret = wc_HmacUpdate(&cookieHmac,
- input + i - OPAQUE16_LEN,
- clSuites.suiteSz + OPAQUE16_LEN);
- if (ret != 0) return ret;
- }
-#endif /* WOLFSSL_DTLS */
- i += clSuites.suiteSz;
- clSuites.hashSigAlgoSz = 0;
-
- /* compression length */
- b = input[i++];
-
- if ((i - begin) + b > helloSz)
- return BUFFER_ERROR;
-
- if (b == 0) {
- WOLFSSL_MSG("No compression types in list");
-#ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, decode_error);
-#endif
- return COMPRESSION_ERROR;
- }
-
-#ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- if (!IsSCR(ssl) && !ssl->options.resuming) {
- byte newCookie[MAX_COOKIE_LEN];
-
- ret = wc_HmacUpdate(&cookieHmac, input + i - 1, b + 1);
- if (ret != 0) return ret;
- ret = wc_HmacFinal(&cookieHmac, newCookie);
- if (ret != 0) return ret;
-
- /* If a cookie callback is set, call it to overwrite the cookie.
- * This should be deprecated. The code now calculates the cookie
- * using an HMAC as expected. */
- if (ssl->ctx->CBIOCookie != NULL &&
- ssl->ctx->CBIOCookie(ssl, newCookie, cookieSz,
- ssl->IOCB_CookieCtx) != cookieSz) {
- return COOKIE_ERROR;
- }
-
- /* Check the cookie, see if we progress the state machine. */
- if (peerCookieSz != cookieSz ||
- XMEMCMP(peerCookie, newCookie, cookieSz) != 0) {
-
- /* Send newCookie to client in a HelloVerifyRequest message
- * and let the state machine alone. */
- ssl->msgsReceived.got_client_hello = 0;
- ssl->keys.dtls_handshake_number = 0;
- ssl->keys.dtls_expected_peer_handshake_number = 0;
- *inOutIdx += helloSz;
- return SendHelloVerifyRequest(ssl, newCookie, cookieSz);
- }
- }
-
- /* This was skipped in the DTLS case so we could handle the hello
- * verify request. */
- ret = HashInput(ssl, input + *inOutIdx, helloSz);
- if (ret != 0) return ret;
- }
-#endif /* WOLFSSL_DTLS */
-
- {
- /* compression match types */
- int matchNo = 0;
- int matchZlib = 0;
-
- while (b--) {
- byte comp = input[i++];
-
- if (comp == NO_COMPRESSION) {
- matchNo = 1;
- }
- if (comp == ZLIB_COMPRESSION) {
- matchZlib = 1;
- }
- }
-
- if (ssl->options.usingCompression == 0 && matchNo) {
- WOLFSSL_MSG("Matched No Compression");
- } else if (ssl->options.usingCompression && matchZlib) {
- WOLFSSL_MSG("Matched zlib Compression");
- } else if (ssl->options.usingCompression && matchNo) {
- WOLFSSL_MSG("Could only match no compression, turning off");
- ssl->options.usingCompression = 0; /* turn off */
- } else {
- WOLFSSL_MSG("Could not match compression");
-#ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, illegal_parameter);
-#endif
- return COMPRESSION_ERROR;
- }
- }
-
- *inOutIdx = i;
-
- /* tls extensions */
- if ((i - begin) < helloSz) {
-#ifdef HAVE_TLS_EXTENSIONS
- #ifdef HAVE_QSH
- QSH_Init(ssl);
- #endif
- if (TLSX_SupportExtensions(ssl))
-#else
- if (IsAtLeastTLSv1_2(ssl))
-#endif
- {
- /* Process the hello extension. Skip unsupported. */
- word16 totalExtSz;
-
-#ifdef HAVE_TLS_EXTENSIONS
- /* auto populate extensions supported unless user defined */
- if ((ret = TLSX_PopulateExtensions(ssl, 1)) != 0)
- return ret;
-#endif
-
- if ((i - begin) + OPAQUE16_LEN > helloSz)
- return BUFFER_ERROR;
-
- ato16(&input[i], &totalExtSz);
- i += OPAQUE16_LEN;
-
- if ((i - begin) + totalExtSz > helloSz)
- return BUFFER_ERROR;
-
-#ifdef HAVE_TLS_EXTENSIONS
- /* tls extensions */
- if ((ret = TLSX_Parse(ssl, (byte *) input + i, totalExtSz,
- client_hello, &clSuites)))
- return ret;
- #ifdef WOLFSSL_TLS13
- if (TLSX_Find(ssl->extensions,
- TLSX_SUPPORTED_VERSIONS) != NULL) {
- WOLFSSL_MSG(
- "Client attempting to connect with higher version");
- return VERSION_ERROR;
- }
- #endif
- #if defined(OPENSSL_ALL) || defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
- if((ret=SNI_Callback(ssl)))
- return ret;
- ssl->options.side = WOLFSSL_SERVER_END;
- #endif
-
- i += totalExtSz;
-#else
- while (totalExtSz) {
- word16 extId, extSz;
-
- if (OPAQUE16_LEN + OPAQUE16_LEN > totalExtSz)
- return BUFFER_ERROR;
-
- ato16(&input[i], &extId);
- i += OPAQUE16_LEN;
- ato16(&input[i], &extSz);
- i += OPAQUE16_LEN;
-
- if (OPAQUE16_LEN + OPAQUE16_LEN + extSz > totalExtSz)
- return BUFFER_ERROR;
-
- if (extId == HELLO_EXT_SIG_ALGO) {
- word16 hashSigAlgoSz;
-
- ato16(&input[i], &hashSigAlgoSz);
- i += OPAQUE16_LEN;
-
- if (OPAQUE16_LEN + hashSigAlgoSz > extSz)
- return BUFFER_ERROR;
-
- if (hashSigAlgoSz % 2 != 0)
- return BUFFER_ERROR;
-
- clSuites.hashSigAlgoSz = hashSigAlgoSz;
- if (clSuites.hashSigAlgoSz > WOLFSSL_MAX_SIGALGO) {
- WOLFSSL_MSG("ClientHello SigAlgo list exceeds max, "
- "truncating");
- clSuites.hashSigAlgoSz = WOLFSSL_MAX_SIGALGO;
- }
-
- XMEMCPY(clSuites.hashSigAlgo, &input[i],
- clSuites.hashSigAlgoSz);
-
- i += hashSigAlgoSz;
- }
-#ifdef HAVE_EXTENDED_MASTER
- else if (extId == HELLO_EXT_EXTMS)
- ssl->options.haveEMS = 1;
-#endif
- else
- i += extSz;
-
- totalExtSz -= OPAQUE16_LEN + OPAQUE16_LEN + extSz;
- }
-#endif
- *inOutIdx = i;
- }
- else
- *inOutIdx = begin + helloSz; /* skip extensions */
- }
-
- ssl->options.clientState = CLIENT_HELLO_COMPLETE;
- ssl->options.haveSessionId = 1;
-
- /* ProcessOld uses same resume code */
- if (ssl->options.resuming) {
- ret = HandleTlsResumption(ssl, bogusID, &clSuites);
- if (ret != 0)
- return ret;
-
- #ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation &&
- ssl->secure_renegotiation->enabled &&
- IsEncryptionOn(ssl, 0))
- ssl->secure_renegotiation->startScr = 1;
- #endif
-
- if (ssl->options.clientState == CLIENT_KEYEXCHANGE_COMPLETE) {
- WOLFSSL_LEAVE("DoClientHello", ret);
- WOLFSSL_END(WC_FUNC_CLIENT_HELLO_DO);
-
- return ret;
- }
- }
-
-#if defined(HAVE_TLS_EXTENSIONS) && defined(HAVE_DH_DEFAULT_PARAMS)
- #if defined(HAVE_FFDHE) && defined(HAVE_SUPPORTED_CURVES)
- if (TLSX_Find(ssl->extensions, TLSX_SUPPORTED_GROUPS) != NULL) {
- /* Set FFDHE parameters or clear DHE parameters if FFDH parameters
- * present and no matches in the server's list. */
- ret = TLSX_SupportedFFDHE_Set(ssl);
- if (ret != 0)
- return ret;
- }
- #endif
-#endif
-
- ret = MatchSuite(ssl, &clSuites);
-#ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_ERROR)
- SendAlert(ssl, alert_fatal, decode_error);
- else if (ret < 0)
- SendAlert(ssl, alert_fatal, handshake_failure);
-#endif
-
-#ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation && ssl->secure_renegotiation->enabled &&
- IsEncryptionOn(ssl, 0)) {
- ssl->secure_renegotiation->startScr = 1;
- }
-#endif
-#ifdef WOLFSSL_DTLS
- if (ret == 0 && ssl->options.dtls)
- DtlsMsgPoolReset(ssl);
-#endif
- WOLFSSL_LEAVE("DoClientHello", ret);
- WOLFSSL_END(WC_FUNC_CLIENT_HELLO_DO);
-
- return ret;
- }
-
-
-#if (!defined(NO_RSA) || defined(HAVE_ECC) || defined(HAVE_ED25519) || \
- defined(HAVE_ED448)) && !defined(WOLFSSL_NO_CLIENT_AUTH)
-
- typedef struct DcvArgs {
- byte* output; /* not allocated */
- word32 sendSz;
- word16 sz;
- word32 sigSz;
- word32 idx;
- word32 begin;
- byte hashAlgo;
- byte sigAlgo;
- } DcvArgs;
-
- static void FreeDcvArgs(WOLFSSL* ssl, void* pArgs)
- {
- DcvArgs* args = (DcvArgs*)pArgs;
-
- (void)ssl;
- (void)args;
- }
-
- /* handle processing of certificate_verify (15) */
- static int DoCertificateVerify(WOLFSSL* ssl, byte* input,
- word32* inOutIdx, word32 size)
- {
- int ret = 0;
- #ifdef WOLFSSL_ASYNC_CRYPT
- DcvArgs* args = (DcvArgs*)ssl->async.args;
- typedef char args_test[sizeof(ssl->async.args) >= sizeof(*args) ? 1 : -1];
- (void)sizeof(args_test);
- #else
- DcvArgs args[1];
- #endif
-
- WOLFSSL_START(WC_FUNC_CERTIFICATE_VERIFY_DO);
- WOLFSSL_ENTER("DoCertificateVerify");
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
- if (ret != WC_NOT_PENDING_E) {
- /* Check for error */
- if (ret < 0)
- goto exit_dcv;
- }
- else
- #endif
- {
- /* Reset state */
- ret = 0;
- ssl->options.asyncState = TLS_ASYNC_BEGIN;
- XMEMSET(args, 0, sizeof(DcvArgs));
- args->hashAlgo = sha_mac;
- args->sigAlgo = anonymous_sa_algo;
- args->idx = *inOutIdx;
- args->begin = *inOutIdx;
- #ifdef WOLFSSL_ASYNC_CRYPT
- ssl->async.freeArgs = FreeDcvArgs;
- #endif
- }
-
- switch(ssl->options.asyncState)
- {
- case TLS_ASYNC_BEGIN:
- {
- #ifdef WOLFSSL_CALLBACKS
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "CertificateVerify");
- if (ssl->toInfoOn)
- AddLateName("CertificateVerify", &ssl->timeoutInfo);
- #endif
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_BUILD;
- } /* case TLS_ASYNC_BEGIN */
- FALL_THROUGH;
-
- case TLS_ASYNC_BUILD:
- {
- if (IsAtLeastTLSv1_2(ssl)) {
- if ((args->idx - args->begin) + ENUM_LEN + ENUM_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcv);
- }
-
- DecodeSigAlg(&input[args->idx], &args->hashAlgo,
- &args->sigAlgo);
- args->idx += 2;
- }
- #ifndef NO_RSA
- else if (ssl->peerRsaKey != NULL && ssl->peerRsaKeyPresent != 0)
- args->sigAlgo = rsa_sa_algo;
- #endif
- #ifdef HAVE_ECC
- else if (ssl->peerEccDsaKeyPresent)
- args->sigAlgo = ecc_dsa_sa_algo;
- #endif
- #if defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)
- else if (ssl->peerEd25519KeyPresent)
- args->sigAlgo = ed25519_sa_algo;
- #endif /* HAVE_ED25519 && !NO_ED25519_CLIENT_AUTH */
- #if defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)
- else if (ssl->peerEd448KeyPresent)
- args->sigAlgo = ed448_sa_algo;
- #endif /* HAVE_ED448 && !NO_ED448_CLIENT_AUTH */
-
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcv);
- }
-
- ato16(input + args->idx, &args->sz);
- args->idx += OPAQUE16_LEN;
-
- if ((args->idx - args->begin) + args->sz > size ||
- args->sz > ENCRYPT_LEN) {
- ERROR_OUT(BUFFER_ERROR, exit_dcv);
- }
-
- #ifdef HAVE_ECC
- if (ssl->peerEccDsaKeyPresent) {
-
- WOLFSSL_MSG("Doing ECC peer cert verify");
-
- /* make sure a default is defined */
- #if !defined(NO_SHA)
- SetDigest(ssl, sha_mac);
- #elif !defined(NO_SHA256)
- SetDigest(ssl, sha256_mac);
- #elif defined(WOLFSSL_SHA384)
- SetDigest(ssl, sha384_mac);
- #elif defined(WOLFSSL_SHA512)
- SetDigest(ssl, sha512_mac);
- #else
- #error No digest enabled for ECC sig verify
- #endif
-
- if (IsAtLeastTLSv1_2(ssl)) {
- if (args->sigAlgo != ecc_dsa_sa_algo) {
- WOLFSSL_MSG("Oops, peer sent ECC key but not in verify");
- }
-
- SetDigest(ssl, args->hashAlgo);
- }
- }
- #endif /* HAVE_ECC */
- #if defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)
- if (ssl->peerEd25519KeyPresent) {
- WOLFSSL_MSG("Doing ED25519 peer cert verify");
- if (IsAtLeastTLSv1_2(ssl) &&
- args->sigAlgo != ed25519_sa_algo) {
- WOLFSSL_MSG(
- "Oops, peer sent ED25519 key but not in verify");
- }
- }
- #endif /* HAVE_ED25519 && !NO_ED25519_CLIENT_AUTH */
- #if defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)
- if (ssl->peerEd448KeyPresent) {
- WOLFSSL_MSG("Doing ED448 peer cert verify");
- if (IsAtLeastTLSv1_2(ssl) &&
- args->sigAlgo != ed448_sa_algo) {
- WOLFSSL_MSG(
- "Oops, peer sent ED448 key but not in verify");
- }
- }
- #endif /* HAVE_ED448 && !NO_ED448_CLIENT_AUTH */
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_DO;
- } /* case TLS_ASYNC_BUILD */
- FALL_THROUGH;
-
- case TLS_ASYNC_DO:
- {
- #ifndef NO_RSA
- if (ssl->peerRsaKey != NULL && ssl->peerRsaKeyPresent != 0) {
- WOLFSSL_MSG("Doing RSA peer cert verify");
-
- ret = RsaVerify(ssl,
- input + args->idx,
- args->sz,
- &args->output,
- args->sigAlgo, args->hashAlgo,
- ssl->peerRsaKey,
- #ifdef HAVE_PK_CALLBACKS
- &ssl->buffers.peerRsaKey
- #else
- NULL
- #endif
- );
- if (ret >= 0) {
- if (args->sigAlgo == rsa_sa_algo)
- args->sendSz = ret;
- else {
- args->sigSz = ret;
- args->sendSz = ssl->buffers.digest.length;
- }
- ret = 0;
- }
- }
- #endif /* !NO_RSA */
- #ifdef HAVE_ECC
- if (ssl->peerEccDsaKeyPresent) {
- WOLFSSL_MSG("Doing ECC peer cert verify");
-
- ret = EccVerify(ssl,
- input + args->idx, args->sz,
- ssl->buffers.digest.buffer, ssl->buffers.digest.length,
- ssl->peerEccDsaKey,
- #ifdef HAVE_PK_CALLBACKS
- &ssl->buffers.peerEccDsaKey
- #else
- NULL
- #endif
- );
- }
- #endif /* HAVE_ECC */
- #if defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)
- if (ssl->peerEd25519KeyPresent) {
- WOLFSSL_MSG("Doing Ed25519 peer cert verify");
-
- ret = Ed25519Verify(ssl,
- input + args->idx, args->sz,
- ssl->hsHashes->messages, ssl->hsHashes->prevLen,
- ssl->peerEd25519Key,
- #ifdef HAVE_PK_CALLBACKS
- &ssl->buffers.peerEd25519Key
- #else
- NULL
- #endif
- );
- }
- #endif /* HAVE_ED25519 && !NO_ED25519_CLIENT_AUTH */
- #if defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)
- if (ssl->peerEd448KeyPresent) {
- WOLFSSL_MSG("Doing Ed448 peer cert verify");
-
- ret = Ed448Verify(ssl,
- input + args->idx, args->sz,
- ssl->hsHashes->messages, ssl->hsHashes->prevLen,
- ssl->peerEd448Key,
- #ifdef HAVE_PK_CALLBACKS
- &ssl->buffers.peerEd448Key
- #else
- NULL
- #endif
- );
- }
- #endif /* HAVE_ED448 && !NO_ED448_CLIENT_AUTH */
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* handle async pending */
- if (ret == WC_PENDING_E)
- goto exit_dcv;
- #endif
-
- /* Check for error */
- if (ret != 0) {
- ret = SIG_VERIFY_E;
- goto exit_dcv;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_VERIFY;
- } /* case TLS_ASYNC_DO */
- FALL_THROUGH;
-
- case TLS_ASYNC_VERIFY:
- {
- #ifndef NO_RSA
- if (ssl->peerRsaKey != NULL && ssl->peerRsaKeyPresent != 0) {
- if (IsAtLeastTLSv1_2(ssl)) {
- #ifdef WC_RSA_PSS
- if (args->sigAlgo == rsa_pss_sa_algo) {
- SetDigest(ssl, args->hashAlgo);
-
- #ifdef HAVE_SELFTEST
- ret = wc_RsaPSS_CheckPadding(
- ssl->buffers.digest.buffer,
- ssl->buffers.digest.length,
- args->output, args->sigSz,
- HashAlgoToType(args->hashAlgo));
- #else
- ret = wc_RsaPSS_CheckPadding_ex(
- ssl->buffers.digest.buffer,
- ssl->buffers.digest.length,
- args->output, args->sigSz,
- HashAlgoToType(args->hashAlgo), -1,
- mp_count_bits(&ssl->peerRsaKey->n));
- #endif
- if (ret != 0) {
- ret = SIG_VERIFY_E;
- goto exit_dcv;
- }
- }
- else
- #endif
- {
- #ifdef WOLFSSL_SMALL_STACK
- byte* encodedSig;
- #else
- byte encodedSig[MAX_ENCODED_SIG_SZ];
- #endif
-
- #ifdef WOLFSSL_SMALL_STACK
- encodedSig = (byte*)XMALLOC(MAX_ENCODED_SIG_SZ,
- ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- if (encodedSig == NULL) {
- ERROR_OUT(MEMORY_E, exit_dcv);
- }
- #endif
-
- if (args->sigAlgo != rsa_sa_algo) {
- WOLFSSL_MSG("Oops, peer sent RSA key but not "
- "in verify");
- }
-
- SetDigest(ssl, args->hashAlgo);
-
- args->sigSz = wc_EncodeSignature(encodedSig,
- ssl->buffers.digest.buffer,
- ssl->buffers.digest.length,
- TypeHash(args->hashAlgo));
-
- if (args->sendSz != args->sigSz || !args->output ||
- XMEMCMP(args->output, encodedSig,
- min(args->sigSz, MAX_ENCODED_SIG_SZ)) != 0) {
- ret = VERIFY_CERT_ERROR;
- }
-
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(encodedSig, ssl->heap, DYNAMIC_TYPE_SIGNATURE);
- #endif
- }
- }
- else {
- if (args->sendSz != FINISHED_SZ || !args->output ||
- XMEMCMP(args->output,
- &ssl->hsHashes->certHashes, FINISHED_SZ) != 0) {
- ret = VERIFY_CERT_ERROR;
- }
- }
- }
- #endif /* !NO_RSA */
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_FINALIZE;
- } /* case TLS_ASYNC_VERIFY */
- FALL_THROUGH;
-
- case TLS_ASYNC_FINALIZE:
- {
- if (IsEncryptionOn(ssl, 0)) {
- args->idx += ssl->keys.padSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- args->idx += MacSize(ssl);
- #endif
- }
-
- ssl->options.havePeerVerify = 1;
-
- /* Set final index */
- args->idx += args->sz;
- *inOutIdx = args->idx;
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_END;
- } /* case TLS_ASYNC_FINALIZE */
-
- case TLS_ASYNC_END:
- {
- break;
- }
- default:
- ret = INPUT_CASE_ERROR;
- } /* switch(ssl->options.asyncState) */
-
- exit_dcv:
-
- WOLFSSL_LEAVE("DoCertificateVerify", ret);
- WOLFSSL_END(WC_FUNC_CERTIFICATE_VERIFY_DO);
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* Handle async operation */
- if (ret == WC_PENDING_E) {
- /* Mark message as not received so it can process again */
- ssl->msgsReceived.got_certificate_verify = 0;
-
- return ret;
- }
- #endif /* WOLFSSL_ASYNC_CRYPT */
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_ERROR)
- SendAlert(ssl, alert_fatal, decode_error);
- else if (ret == SIG_VERIFY_E)
- SendAlert(ssl, alert_fatal, decrypt_error);
- else if (ret != 0)
- SendAlert(ssl, alert_fatal, bad_certificate);
- #endif
- /* Digest is not allocated, so do this to prevent free */
- ssl->buffers.digest.buffer = NULL;
- ssl->buffers.digest.length = 0;
-
- /* Final cleanup */
- FreeDcvArgs(ssl, args);
- FreeKeyExchange(ssl);
-
- return ret;
- }
-
-#endif /* (!NO_RSA || ECC || ED25519 || ED448) && !WOLFSSL_NO_CLIENT_AUTH */
-
- /* handle generation of server_hello_done (14) */
- int SendServerHelloDone(WOLFSSL* ssl)
- {
- byte* output;
- int sendSz = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- int ret;
-
- WOLFSSL_START(WC_FUNC_SERVER_HELLO_DONE_SEND);
- WOLFSSL_ENTER("SendServerHelloDone");
-
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls)
- sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- #endif
-
- if (IsEncryptionOn(ssl, 1))
- sendSz += MAX_MSG_EXTRA;
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
- return ret;
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHeaders(output, 0, server_hello_done, ssl);
-
- if (IsEncryptionOn(ssl, 1)) {
- byte* input;
- int inputSz = HANDSHAKE_HEADER_SZ; /* build msg adds rec hdr */
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls) {
- recordHeaderSz += DTLS_RECORD_EXTRA;
- inputSz += DTLS_HANDSHAKE_EXTRA;
- }
-
- input = (byte*)XMALLOC(inputSz, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- if (input == NULL)
- return MEMORY_E;
-
- XMEMCPY(input, output + recordHeaderSz, inputSz);
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) &&
- (ret = DtlsMsgPoolSave(ssl, input, inputSz, server_hello_done)) != 0) {
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- return ret;
- }
- #endif
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 1, 0, 0, CUR_ORDER);
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
-
- if (sendSz < 0)
- return sendSz;
- } else {
- #ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl)) {
- if ((ret = DtlsMsgPoolSave(ssl, output, sendSz, server_hello_done)) != 0)
- return ret;
- }
- if (ssl->options.dtls)
- DtlsSEQIncrement(ssl, CUR_ORDER);
- #endif
- ret = HashOutput(ssl, output, sendSz, 0);
- if (ret != 0)
- return ret;
- }
-
- #if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "ServerHelloDone");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "ServerHelloDone", handshake, output, sendSz,
- WRITE_PROTO, ssl->heap);
- #endif
- ssl->options.serverState = SERVER_HELLODONE_COMPLETE;
-
- ssl->buffers.outputBuffer.length += sendSz;
-
- ret = SendBuffered(ssl);
-
- WOLFSSL_LEAVE("SendServerHelloDone", ret);
- WOLFSSL_END(WC_FUNC_SERVER_HELLO_DONE_SEND);
-
- return ret;
- }
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#ifdef HAVE_SESSION_TICKET
-
-#define WOLFSSL_TICKET_FIXED_SZ (WOLFSSL_TICKET_NAME_SZ + \
- WOLFSSL_TICKET_IV_SZ + WOLFSSL_TICKET_MAC_SZ + LENGTH_SZ)
-#define WOLFSSL_TICKET_ENC_SZ (SESSION_TICKET_LEN - WOLFSSL_TICKET_FIXED_SZ)
-
- /* our ticket format */
- typedef struct InternalTicket {
- ProtocolVersion pv; /* version when ticket created */
- byte suite[SUITE_LEN]; /* cipher suite when created */
- byte msecret[SECRET_LEN]; /* master secret */
- word32 timestamp; /* born on */
- word16 haveEMS; /* have extended master secret */
-#ifdef WOLFSSL_TLS13
- word32 ageAdd; /* Obfuscation of age */
- word16 namedGroup; /* Named group used */
- TicketNonce ticketNonce; /* Ticket nonce */
- #ifdef WOLFSSL_EARLY_DATA
- word32 maxEarlyDataSz; /* Max size of early data */
- #endif
-#endif
- } InternalTicket;
-
- /* RFC 5077 defines this for session tickets */
- /* fit within SESSION_TICKET_LEN */
- typedef struct ExternalTicket {
- byte key_name[WOLFSSL_TICKET_NAME_SZ]; /* key context name */
- byte iv[WOLFSSL_TICKET_IV_SZ]; /* this ticket's iv */
- byte enc_len[LENGTH_SZ]; /* encrypted length */
- byte enc_ticket[WOLFSSL_TICKET_ENC_SZ]; /* encrypted internal ticket */
- byte mac[WOLFSSL_TICKET_MAC_SZ]; /* total mac */
- /* !! if add to structure, add to TICKET_FIXED_SZ !! */
- } ExternalTicket;
-
- /* create a new session ticket, 0 on success */
- int CreateTicket(WOLFSSL* ssl)
- {
- InternalTicket it;
- ExternalTicket* et = (ExternalTicket*)ssl->session.ticket;
- int encLen;
- int ret;
- byte zeros[WOLFSSL_TICKET_MAC_SZ]; /* biggest cmp size */
-
- XMEMSET(&it, 0, sizeof(it));
-
- /* build internal */
- it.pv.major = ssl->version.major;
- it.pv.minor = ssl->version.minor;
-
- it.suite[0] = ssl->options.cipherSuite0;
- it.suite[1] = ssl->options.cipherSuite;
-
- #ifdef WOLFSSL_EARLY_DATA
- it.maxEarlyDataSz = ssl->options.maxEarlyDataSz;
- #endif
-
- if (!ssl->options.tls1_3) {
- XMEMCPY(it.msecret, ssl->arrays->masterSecret, SECRET_LEN);
- c32toa(LowResTimer(), (byte*)&it.timestamp);
- it.haveEMS = ssl->options.haveEMS;
- }
- else {
-#ifdef WOLFSSL_TLS13
- /* Client adds to ticket age to obfuscate. */
- ret = wc_RNG_GenerateBlock(ssl->rng, (byte*)&it.ageAdd,
- sizeof(it.ageAdd));
- if (ret != 0)
- return BAD_TICKET_ENCRYPT;
- ssl->session.ticketAdd = it.ageAdd;
- it.namedGroup = ssl->session.namedGroup;
- it.timestamp = TimeNowInMilliseconds();
- /* Resumption master secret. */
- XMEMCPY(it.msecret, ssl->session.masterSecret, SECRET_LEN);
- XMEMCPY(&it.ticketNonce, &ssl->session.ticketNonce,
- sizeof(TicketNonce));
-#endif
- }
-
- /* build external */
- XMEMCPY(et->enc_ticket, &it, sizeof(InternalTicket));
-
- /* encrypt */
- encLen = WOLFSSL_TICKET_ENC_SZ; /* max size user can use */
- if (ssl->ctx->ticketEncCb == NULL) {
- ret = WOLFSSL_TICKET_RET_FATAL;
- }
- else {
- ret = ssl->ctx->ticketEncCb(ssl, et->key_name, et->iv, et->mac, 1,
- et->enc_ticket, sizeof(InternalTicket),
- &encLen, ssl->ctx->ticketEncCtx);
- }
- if (ret == WOLFSSL_TICKET_RET_OK) {
- if (encLen < (int)sizeof(InternalTicket) ||
- encLen > WOLFSSL_TICKET_ENC_SZ) {
- WOLFSSL_MSG("Bad user ticket encrypt size");
- return BAD_TICKET_KEY_CB_SZ;
- }
-
- /* sanity checks on encrypt callback */
-
- /* internal ticket can't be the same if encrypted */
- if (XMEMCMP(et->enc_ticket, &it, sizeof(InternalTicket)) == 0) {
- WOLFSSL_MSG("User ticket encrypt didn't encrypt");
- return BAD_TICKET_ENCRYPT;
- }
-
- XMEMSET(zeros, 0, sizeof(zeros));
-
- /* name */
- if (XMEMCMP(et->key_name, zeros, WOLFSSL_TICKET_NAME_SZ) == 0) {
- WOLFSSL_MSG("User ticket encrypt didn't set name");
- return BAD_TICKET_ENCRYPT;
- }
-
- /* iv */
- if (XMEMCMP(et->iv, zeros, WOLFSSL_TICKET_IV_SZ) == 0) {
- WOLFSSL_MSG("User ticket encrypt didn't set iv");
- return BAD_TICKET_ENCRYPT;
- }
-
- /* mac */
- if (XMEMCMP(et->mac, zeros, WOLFSSL_TICKET_MAC_SZ) == 0) {
- WOLFSSL_MSG("User ticket encrypt didn't set mac");
- return BAD_TICKET_ENCRYPT;
- }
-
- /* set size */
- c16toa((word16)encLen, et->enc_len);
- ssl->session.ticketLen = (word16)(encLen + WOLFSSL_TICKET_FIXED_SZ);
- if (encLen < WOLFSSL_TICKET_ENC_SZ) {
- /* move mac up since whole enc buffer not used */
- XMEMMOVE(et->enc_ticket +encLen, et->mac,WOLFSSL_TICKET_MAC_SZ);
- }
- }
-
- return ret;
- }
-
-
- /* Parse ticket sent by client, returns callback return value */
- int DoClientTicket(WOLFSSL* ssl, const byte* input, word32 len)
- {
- ExternalTicket* et;
- InternalTicket* it;
- int ret;
- int outLen;
- word16 inLen;
-
- WOLFSSL_START(WC_FUNC_TICKET_DO);
- WOLFSSL_ENTER("DoClientTicket");
-
- if (len > SESSION_TICKET_LEN ||
- len < (word32)(sizeof(InternalTicket) + WOLFSSL_TICKET_FIXED_SZ)) {
- return BAD_TICKET_MSG_SZ;
- }
-
- et = (ExternalTicket*)input;
- it = (InternalTicket*)et->enc_ticket;
-
- /* decrypt */
- ato16(et->enc_len, &inLen);
- if (inLen > (word16)(len - WOLFSSL_TICKET_FIXED_SZ)) {
- return BAD_TICKET_MSG_SZ;
- }
- outLen = inLen; /* may be reduced by user padding */
-
- if (ssl->ctx->ticketEncCb == NULL) {
- ret = WOLFSSL_TICKET_RET_FATAL;
- }
- else {
- ret = ssl->ctx->ticketEncCb(ssl, et->key_name, et->iv,
- et->enc_ticket + inLen, 0,
- et->enc_ticket, inLen, &outLen,
- ssl->ctx->ticketEncCtx);
- }
- if (ret == WOLFSSL_TICKET_RET_FATAL || ret < 0) return ret;
- if (outLen > (int)inLen || outLen < (int)sizeof(InternalTicket)) {
- WOLFSSL_MSG("Bad user ticket decrypt len");
- return BAD_TICKET_KEY_CB_SZ;
- }
-
- /* get master secret */
- if (ret == WOLFSSL_TICKET_RET_OK || ret == WOLFSSL_TICKET_RET_CREATE) {
- if (ssl->version.minor < it->pv.minor) {
- WOLFSSL_MSG("Ticket has greater version");
- return VERSION_ERROR;
- }
- else if (ssl->version.minor > it->pv.minor) {
- if (!ssl->options.downgrade) {
- WOLFSSL_MSG("Ticket has lesser version");
- return VERSION_ERROR;
- }
-
- WOLFSSL_MSG("Downgrading protocol due to ticket");
-
- if (it->pv.minor < ssl->options.minDowngrade)
- return VERSION_ERROR;
- ssl->version.minor = it->pv.minor;
- }
-
-
- if (!IsAtLeastTLSv1_3(ssl->version)) {
- XMEMCPY(ssl->arrays->masterSecret, it->msecret, SECRET_LEN);
- /* Copy the haveExtendedMasterSecret property from the ticket to
- * the saved session, so the property may be checked later. */
- ssl->session.haveEMS = it->haveEMS;
- #ifndef NO_RESUME_SUITE_CHECK
- ssl->session.cipherSuite0 = it->suite[0];
- ssl->session.cipherSuite = it->suite[1];
- #endif
- }
- else {
-#ifdef WOLFSSL_TLS13
- /* Restore information to renegotiate. */
- ssl->session.ticketSeen = it->timestamp;
- ssl->session.ticketAdd = it->ageAdd;
- ssl->session.cipherSuite0 = it->suite[0];
- ssl->session.cipherSuite = it->suite[1];
- #ifdef WOLFSSL_EARLY_DATA
- ssl->session.maxEarlyDataSz = it->maxEarlyDataSz;
- #endif
- /* Resumption master secret. */
- XMEMCPY(ssl->session.masterSecret, it->msecret, SECRET_LEN);
- XMEMCPY(&ssl->session.ticketNonce, &it->ticketNonce,
- sizeof(TicketNonce));
- ssl->session.namedGroup = it->namedGroup;
-#endif
- }
- }
-
- WOLFSSL_LEAVE("DoClientTicket", ret);
- WOLFSSL_END(WC_FUNC_TICKET_DO);
-
- return ret;
- }
-
-
- /* send Session Ticket */
- int SendTicket(WOLFSSL* ssl)
- {
- byte* output;
- int ret;
- int sendSz;
- word32 length = SESSION_HINT_SZ + LENGTH_SZ;
- word32 idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
-
- WOLFSSL_START(WC_FUNC_TICKET_SEND);
- WOLFSSL_ENTER("SendTicket");
-
- if (ssl->options.createTicket) {
- ret = CreateTicket(ssl);
- if (ret != 0) return ret;
- }
-
- length += ssl->session.ticketLen;
- sendSz = length + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ;
-
- if (!ssl->options.dtls) {
- if (IsEncryptionOn(ssl, 1) && ssl->options.handShakeDone)
- sendSz += MAX_MSG_EXTRA;
- }
- else {
- #ifdef WOLFSSL_DTLS
- sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- idx += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
- #endif
- }
-
- if (IsEncryptionOn(ssl, 1) && ssl->options.handShakeDone)
- sendSz += cipherExtraData(ssl);
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
- return ret;
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHeaders(output, length, session_ticket, ssl);
-
- /* hint */
- c32toa(ssl->ctx->ticketHint, output + idx);
- idx += SESSION_HINT_SZ;
-
- /* length */
- c16toa(ssl->session.ticketLen, output + idx);
- idx += LENGTH_SZ;
-
- /* ticket */
- XMEMCPY(output + idx, ssl->session.ticket, ssl->session.ticketLen);
- idx += ssl->session.ticketLen;
-
- if (IsEncryptionOn(ssl, 1) && ssl->options.handShakeDone) {
- byte* input;
- int inputSz = idx; /* build msg adds rec hdr */
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls)
- recordHeaderSz += DTLS_RECORD_EXTRA;
- inputSz -= recordHeaderSz;
- input = (byte*)XMALLOC(inputSz, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- if (input == NULL)
- return MEMORY_E;
-
- XMEMCPY(input, output + recordHeaderSz, inputSz);
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 1, 0, 0, CUR_ORDER);
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
-
- if (sendSz < 0)
- return sendSz;
- }
- else {
- #ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- if ((ret = DtlsMsgPoolSave(ssl, output, sendSz, session_ticket)) != 0)
- return ret;
-
- DtlsSEQIncrement(ssl, CUR_ORDER);
- }
- #endif
- ret = HashOutput(ssl, output, sendSz, 0);
- if (ret != 0)
- return ret;
- }
-
- ssl->buffers.outputBuffer.length += sendSz;
-
- if (!ssl->options.groupMessages)
- ret = SendBuffered(ssl);
-
- WOLFSSL_LEAVE("SendTicket", ret);
- WOLFSSL_END(WC_FUNC_TICKET_SEND);
-
- return ret;
- }
-
-#endif /* HAVE_SESSION_TICKET */
-
-#ifndef WOLFSSL_NO_TLS12
-
-#if defined(HAVE_SECURE_RENEGOTIATION) && \
- defined(HAVE_SERVER_RENEGOTIATION_INFO) && \
- !defined(WOLFSSL_NO_SERVER)
-
- /* handle generation of server's hello_request (0) */
- int SendHelloRequest(WOLFSSL* ssl)
- {
- byte* output;
- int sendSz = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
- int ret;
-
- WOLFSSL_START(WC_FUNC_HELLO_REQUEST_SEND);
- WOLFSSL_ENTER("SendHelloRequest");
-
- if (IsEncryptionOn(ssl, 1))
- sendSz += MAX_MSG_EXTRA;
-
- if (ssl->options.dtls)
- sendSz += DTLS_RECORD_EXTRA + DTLS_HANDSHAKE_EXTRA;
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
- return ret;
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- AddHeaders(output, 0, hello_request, ssl);
-
- if (IsEncryptionOn(ssl, 1)) {
- byte* input;
- int inputSz = HANDSHAKE_HEADER_SZ; /* build msg adds rec hdr */
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls) {
- recordHeaderSz += DTLS_RECORD_EXTRA;
- inputSz += DTLS_HANDSHAKE_EXTRA;
- }
-
- input = (byte*)XMALLOC(inputSz, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- if (input == NULL)
- return MEMORY_E;
-
- XMEMCPY(input, output + recordHeaderSz, inputSz);
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 0, 0, 0, CUR_ORDER);
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
-
- if (sendSz < 0)
- return sendSz;
- }
-
- ssl->buffers.outputBuffer.length += sendSz;
-
- ret = SendBuffered(ssl);
-
- WOLFSSL_LEAVE("SendHelloRequest", ret);
- WOLFSSL_END(WC_FUNC_HELLO_REQUEST_SEND);
-
- return ret;
- }
-
-#endif /* HAVE_SECURE_RENEGOTIATION && HAVE_SERVER_RENEGOTIATION_INFO */
-
-#ifdef WOLFSSL_DTLS
- /* handle generation of DTLS hello_verify_request (3) */
- static int SendHelloVerifyRequest(WOLFSSL* ssl,
- const byte* cookie, byte cookieSz)
- {
- byte* output;
- int length = VERSION_SZ + ENUM_LEN + cookieSz;
- int idx = DTLS_RECORD_HEADER_SZ + DTLS_HANDSHAKE_HEADER_SZ;
- int sendSz = length + idx;
- int ret;
-
- /* are we in scr */
- if (IsEncryptionOn(ssl, 1)) {
- sendSz += MAX_MSG_EXTRA;
- }
-
- /* check for available size */
- if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
- return ret;
-
- /* get output buffer */
- output = ssl->buffers.outputBuffer.buffer +
- ssl->buffers.outputBuffer.length;
-
- /* Hello Verify Request should use the same sequence number as the
- * Client Hello. */
- ssl->keys.dtls_sequence_number_hi = ssl->keys.curSeq_hi;
- ssl->keys.dtls_sequence_number_lo = ssl->keys.curSeq_lo;
- AddHeaders(output, length, hello_verify_request, ssl);
-
-#ifdef OPENSSL_EXTRA
- output[idx++] = DTLS_MAJOR;
- output[idx++] = DTLS_MINOR;
-#else
- output[idx++] = ssl->version.major;
- output[idx++] = ssl->version.minor;
-#endif
-
- output[idx++] = cookieSz;
- if (cookie == NULL || cookieSz == 0)
- return COOKIE_ERROR;
-
- XMEMCPY(output + idx, cookie, cookieSz);
-
-#if defined(WOLFSSL_CALLBACKS) || defined(OPENSSL_EXTRA)
- if (ssl->hsInfoOn)
- AddPacketName(ssl, "HelloVerifyRequest");
- if (ssl->toInfoOn)
- AddPacketInfo(ssl, "HelloVerifyRequest", handshake, output,
- sendSz, WRITE_PROTO, ssl->heap);
-#endif
-
- /* are we in scr */
- if (IsEncryptionOn(ssl, 1)) {
- byte* input;
- int inputSz = HANDSHAKE_HEADER_SZ + length; /* build msg adds rec hdr */
- int recordHeaderSz = RECORD_HEADER_SZ;
-
- if (ssl->options.dtls) {
- recordHeaderSz += DTLS_RECORD_EXTRA;
- inputSz += DTLS_HANDSHAKE_EXTRA;
- }
-
- input = (byte*)XMALLOC(inputSz, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
- if (input == NULL)
- return MEMORY_E;
-
- XMEMCPY(input, output + recordHeaderSz, inputSz);
- sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
- handshake, 0, 0, 0, CUR_ORDER);
- XFREE(input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
-
- if (sendSz < 0)
- return sendSz;
- }
-
- ssl->buffers.outputBuffer.length += sendSz;
-
- return SendBuffered(ssl);
- }
-#endif /* WOLFSSL_DTLS */
-
- typedef struct DckeArgs {
- byte* output; /* not allocated */
- word32 length;
- word32 idx;
- word32 begin;
- word32 sigSz;
- #ifndef NO_RSA
- int lastErr;
- #endif
- } DckeArgs;
-
- static void FreeDckeArgs(WOLFSSL* ssl, void* pArgs)
- {
- DckeArgs* args = (DckeArgs*)pArgs;
-
- (void)ssl;
- (void)args;
- }
-
- /* handle processing client_key_exchange (16) */
- static int DoClientKeyExchange(WOLFSSL* ssl, byte* input, word32* inOutIdx,
- word32 size)
- {
- int ret;
- #ifdef WOLFSSL_ASYNC_CRYPT
- DckeArgs* args = (DckeArgs*)ssl->async.args;
- typedef char args_test[sizeof(ssl->async.args) >= sizeof(*args) ? 1 : -1];
- (void)sizeof(args_test);
- #else
- DckeArgs args[1];
- #endif
-
- (void)size;
- (void)input;
-
- WOLFSSL_START(WC_FUNC_CLIENT_KEY_EXCHANGE_DO);
- WOLFSSL_ENTER("DoClientKeyExchange");
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
- if (ret != WC_NOT_PENDING_E) {
- /* Check for error */
- if (ret < 0)
- goto exit_dcke;
- }
- else
- #endif /* WOLFSSL_ASYNC_CRYPT */
- {
- /* Reset state */
- ret = 0;
- ssl->options.asyncState = TLS_ASYNC_BEGIN;
- XMEMSET(args, 0, sizeof(DckeArgs));
- args->idx = *inOutIdx;
- args->begin = *inOutIdx;
- #ifdef WOLFSSL_ASYNC_CRYPT
- ssl->async.freeArgs = FreeDckeArgs;
- #endif
- }
-
- /* Do Client Key Exchange State Machine */
- switch(ssl->options.asyncState)
- {
- case TLS_ASYNC_BEGIN:
- {
- /* Sanity checks */
- if (ssl->options.side != WOLFSSL_SERVER_END) {
- WOLFSSL_MSG("Client received client keyexchange, attack?");
- WOLFSSL_ERROR(ssl->error = SIDE_ERROR);
- ERROR_OUT(WOLFSSL_FATAL_ERROR, exit_dcke);
- }
-
- if (ssl->options.clientState < CLIENT_HELLO_COMPLETE) {
- WOLFSSL_MSG("Client sending keyexchange at wrong time");
- SendAlert(ssl, alert_fatal, unexpected_message);
- ERROR_OUT(OUT_OF_ORDER_E, exit_dcke);
- }
-
- #ifndef NO_CERTS
- if (ssl->options.verifyPeer && ssl->options.failNoCert) {
- if (!ssl->options.havePeerCert) {
- WOLFSSL_MSG("client didn't present peer cert");
- ERROR_OUT(NO_PEER_CERT, exit_dcke);
- }
- }
-
- if (ssl->options.verifyPeer && ssl->options.failNoCertxPSK) {
- if (!ssl->options.havePeerCert &&
- !ssl->options.usingPSK_cipher) {
- WOLFSSL_MSG("client didn't present peer cert");
- return NO_PEER_CERT;
- }
- }
- #endif /* !NO_CERTS */
-
- #if defined(WOLFSSL_CALLBACKS)
- if (ssl->hsInfoOn) {
- AddPacketName(ssl, "ClientKeyExchange");
- }
- if (ssl->toInfoOn) {
- AddLateName("ClientKeyExchange", &ssl->timeoutInfo);
- }
- #endif
-
- if (ssl->arrays->preMasterSecret == NULL) {
- ssl->arrays->preMasterSz = ENCRYPT_LEN;
- ssl->arrays->preMasterSecret = (byte*)XMALLOC(ENCRYPT_LEN,
- ssl->heap, DYNAMIC_TYPE_SECRET);
- if (ssl->arrays->preMasterSecret == NULL) {
- ERROR_OUT(MEMORY_E, exit_dcke);
- }
- XMEMSET(ssl->arrays->preMasterSecret, 0, ENCRYPT_LEN);
- }
-
- switch (ssl->specs.kea) {
- #ifndef NO_RSA
- case rsa_kea:
- {
- break;
- } /* rsa_kea */
- #endif /* !NO_RSA */
- #ifndef NO_PSK
- case psk_kea:
- {
- /* sanity check that PSK server callback has been set */
- if (ssl->options.server_psk_cb == NULL) {
- WOLFSSL_MSG("No server PSK callback set");
- ERROR_OUT(PSK_KEY_ERROR, exit_dcke);
- }
- break;
- }
- #endif /* !NO_PSK */
- #ifdef HAVE_NTRU
- case ntru_kea:
- {
- /* make sure private key exists */
- if (ssl->buffers.key == NULL ||
- ssl->buffers.key->buffer == NULL) {
- ERROR_OUT(NO_PRIVATE_KEY, exit_dcke);
- }
- break;
- }
- #endif /* HAVE_NTRU */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
- #ifndef NO_DH
- case diffie_hellman_kea:
- {
- break;
- }
- #endif /* !NO_DH */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- /* sanity check that PSK server callback has been set */
- if (ssl->options.server_psk_cb == NULL) {
- WOLFSSL_MSG("No server PSK callback set");
- ERROR_OUT(PSK_KEY_ERROR, exit_dcke);
- }
- break;
- }
- #endif /* !NO_DH && !NO_PSK */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- /* sanity check that PSK server callback has been set */
- if (ssl->options.server_psk_cb == NULL) {
- WOLFSSL_MSG("No server PSK callback set");
- ERROR_OUT(PSK_KEY_ERROR, exit_dcke);
- }
- break;
- }
- #endif /* (HAVE_ECC || CURVE25519 || CURVE448) && !NO_PSK */
- default:
- WOLFSSL_MSG("Bad kea type");
- ret = BAD_KEA_TYPE_E;
- } /* switch (ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_dcke;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_BUILD;
- } /* TLS_ASYNC_BEGIN */
- FALL_THROUGH;
-
- case TLS_ASYNC_BUILD:
- {
- switch (ssl->specs.kea) {
- #ifndef NO_RSA
- case rsa_kea:
- {
- word16 keySz;
-
- ssl->buffers.keyType = rsa_sa_algo;
- ret = DecodePrivateKey(ssl, &keySz);
- if (ret != 0) {
- goto exit_dcke;
- }
- args->length = (word32)keySz;
- ssl->arrays->preMasterSz = SECRET_LEN;
-
- if (ssl->options.tls) {
- word16 check;
-
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- ato16(input + args->idx, &check);
- args->idx += OPAQUE16_LEN;
-
- if ((word32)check != args->length) {
- WOLFSSL_MSG("RSA explicit size doesn't match");
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, bad_record_mac);
- #endif
- ERROR_OUT(RSA_PRIVATE_ERROR, exit_dcke);
- }
- }
-
- if ((args->idx - args->begin) + args->length > size) {
- WOLFSSL_MSG("RSA message too big");
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- /* pre-load PreMasterSecret with RNG data */
- ret = wc_RNG_GenerateBlock(ssl->rng,
- &ssl->arrays->preMasterSecret[VERSION_SZ],
- SECRET_LEN - VERSION_SZ);
- if (ret != 0) {
- goto exit_dcke;
- }
-
- args->output = NULL;
- break;
- } /* rsa_kea */
- #endif /* !NO_RSA */
- #ifndef NO_PSK
- case psk_kea:
- {
- byte* pms = ssl->arrays->preMasterSecret;
- word16 ci_sz;
-
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- ato16(input + args->idx, &ci_sz);
- args->idx += OPAQUE16_LEN;
-
- if (ci_sz > MAX_PSK_ID_LEN) {
- ERROR_OUT(CLIENT_ID_ERROR, exit_dcke);
- }
-
- if ((args->idx - args->begin) + ci_sz > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- XMEMCPY(ssl->arrays->client_identity,
- input + args->idx, ci_sz);
- args->idx += ci_sz;
-
- ssl->arrays->client_identity[ci_sz] = '\0'; /* null term */
- ssl->arrays->psk_keySz = ssl->options.server_psk_cb(ssl,
- ssl->arrays->client_identity, ssl->arrays->psk_key,
- MAX_PSK_KEY_LEN);
-
- if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
- ERROR_OUT(PSK_KEY_ERROR, exit_dcke);
- }
-
- /* make psk pre master secret */
- /* length of key + length 0s + length of key + key */
- c16toa((word16) ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
-
- XMEMSET(pms, 0, ssl->arrays->psk_keySz);
- pms += ssl->arrays->psk_keySz;
-
- c16toa((word16) ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
-
- XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz =
- (ssl->arrays->psk_keySz * 2) + (OPAQUE16_LEN * 2);
- break;
- }
- #endif /* !NO_PSK */
- #ifdef HAVE_NTRU
- case ntru_kea:
- {
- word16 cipherLen;
- word16 plainLen = ENCRYPT_LEN;
-
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- ato16(input + args->idx, &cipherLen);
- args->idx += OPAQUE16_LEN;
-
- if (cipherLen > MAX_NTRU_ENCRYPT_SZ) {
- ERROR_OUT(NTRU_KEY_ERROR, exit_dcke);
- }
-
- if ((args->idx - args->begin) + cipherLen > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- if (NTRU_OK != ntru_crypto_ntru_decrypt(
- (word16) ssl->buffers.key->length,
- ssl->buffers.key->buffer, cipherLen,
- input + args->idx, &plainLen,
- ssl->arrays->preMasterSecret)) {
- ERROR_OUT(NTRU_DECRYPT_ERROR, exit_dcke);
- }
-
- if (plainLen != SECRET_LEN) {
- ERROR_OUT(NTRU_DECRYPT_ERROR, exit_dcke);
- }
-
- args->idx += cipherLen;
- ssl->arrays->preMasterSz = plainLen;
- break;
- }
- #endif /* HAVE_NTRU */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- #ifdef HAVE_ECC
- ecc_key* private_key = ssl->eccTempKey;
-
- /* handle static private key */
- if (ssl->specs.static_ecdh &&
- ssl->ecdhCurveOID != ECC_X25519_OID &&
- ssl->ecdhCurveOID != ECC_X448_OID) {
- word16 keySz;
-
- ssl->buffers.keyType = ecc_dsa_sa_algo;
- ret = DecodePrivateKey(ssl, &keySz);
- if (ret != 0) {
- goto exit_dcke;
- }
- private_key = (ecc_key*)ssl->hsKey;
- }
- #endif
-
- /* import peer ECC key */
- if ((args->idx - args->begin) + OPAQUE8_LEN > size) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, decode_error);
- #endif
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- args->length = input[args->idx++];
-
- if ((args->idx - args->begin) + args->length > size) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, decode_error);
- #endif
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->X25519SharedSecretCb != NULL) {
- break;
- }
- #endif
- if (ssl->peerX25519Key == NULL) {
- /* alloc/init on demand */
- ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE25519,
- (void**)&ssl->peerX25519Key);
- if (ret != 0) {
- goto exit_dcke;
- }
- } else if (ssl->peerX25519KeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE25519,
- ssl->peerX25519Key);
- ssl->peerX25519KeyPresent = 0;
- if (ret != 0) {
- goto exit_dcke;
- }
- }
-
- if ((ret = wc_curve25519_check_public(
- input + args->idx, args->length,
- EC25519_LITTLE_ENDIAN)) != 0) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_E)
- SendAlert(ssl, alert_fatal, decode_error);
- else if (ret == ECC_OUT_OF_RANGE_E)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- else {
- SendAlert(ssl, alert_fatal,
- illegal_parameter);
- }
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dcke);
- }
-
- if (wc_curve25519_import_public_ex(
- input + args->idx, args->length,
- ssl->peerX25519Key,
- EC25519_LITTLE_ENDIAN)) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, illegal_parameter);
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dcke);
- }
-
- ssl->arrays->preMasterSz = CURVE25519_KEYSIZE;
-
- ssl->peerX25519KeyPresent = 1;
-
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->X448SharedSecretCb != NULL) {
- break;
- }
- #endif
- if (ssl->peerX448Key == NULL) {
- /* alloc/init on demand */
- ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE448,
- (void**)&ssl->peerX448Key);
- if (ret != 0) {
- goto exit_dcke;
- }
- } else if (ssl->peerX448KeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE448,
- ssl->peerX448Key);
- ssl->peerX448KeyPresent = 0;
- if (ret != 0) {
- goto exit_dcke;
- }
- }
-
- if ((ret = wc_curve448_check_public(
- input + args->idx, args->length,
- EC448_LITTLE_ENDIAN)) != 0) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_E)
- SendAlert(ssl, alert_fatal, decode_error);
- else if (ret == ECC_OUT_OF_RANGE_E)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- else {
- SendAlert(ssl, alert_fatal,
- illegal_parameter);
- }
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dcke);
- }
-
- if (wc_curve448_import_public_ex(
- input + args->idx, args->length,
- ssl->peerX448Key,
- EC448_LITTLE_ENDIAN)) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, illegal_parameter);
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dcke);
- }
-
- ssl->arrays->preMasterSz = CURVE448_KEY_SIZE;
-
- ssl->peerX448KeyPresent = 1;
-
- break;
- }
- #endif
- #ifdef HAVE_ECC
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->EccSharedSecretCb != NULL) {
- break;
- }
- #endif
-
- if (!ssl->specs.static_ecdh &&
- ssl->eccTempKeyPresent == 0) {
- WOLFSSL_MSG("Ecc ephemeral key not made correctly");
- ERROR_OUT(ECC_MAKEKEY_ERROR, exit_dcke);
- }
-
- if (ssl->peerEccKey == NULL) {
- /* alloc/init on demand */
- ret = AllocKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->peerEccKey);
- if (ret != 0) {
- goto exit_dcke;
- }
- } else if (ssl->peerEccKeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_ECC,
- ssl->peerEccKey);
- ssl->peerEccKeyPresent = 0;
- if (ret != 0) {
- goto exit_dcke;
- }
- }
-
- if (wc_ecc_import_x963_ex(input + args->idx,
- args->length, ssl->peerEccKey,
- private_key->dp->id)) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, illegal_parameter);
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dcke);
- }
-
- ssl->arrays->preMasterSz = private_key->dp->size;
-
- ssl->peerEccKeyPresent = 1;
- #endif /* HAVE_ECC */
-
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
- #ifndef NO_DH
- case diffie_hellman_kea:
- {
- word16 clientPubSz;
-
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- ato16(input + args->idx, &clientPubSz);
- args->idx += OPAQUE16_LEN;
-
- if ((args->idx - args->begin) + clientPubSz > size) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- SendAlert(ssl, alert_fatal, decode_error);
- #endif
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- args->sigSz = clientPubSz;
-
- ret = AllocKey(ssl, DYNAMIC_TYPE_DH,
- (void**)&ssl->buffers.serverDH_Key);
- if (ret != 0) {
- goto exit_dcke;
- }
-
- ret = wc_DhSetKey(ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length,
- ssl->buffers.serverDH_G.buffer,
- ssl->buffers.serverDH_G.length);
-
- /* set the max agree result size */
- ssl->arrays->preMasterSz = ENCRYPT_LEN;
- break;
- }
- #endif /* !NO_DH */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- word16 clientSz;
-
- /* Read in the PSK hint */
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- ato16(input + args->idx, &clientSz);
- args->idx += OPAQUE16_LEN;
- if (clientSz > MAX_PSK_ID_LEN) {
- ERROR_OUT(CLIENT_ID_ERROR, exit_dcke);
- }
-
- if ((args->idx - args->begin) + clientSz > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- XMEMCPY(ssl->arrays->client_identity, input + args->idx,
- clientSz);
- args->idx += clientSz;
- ssl->arrays->client_identity[clientSz] = '\0'; /* null term */
-
- /* Read in the DHE business */
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- ato16(input + args->idx, &clientSz);
- args->idx += OPAQUE16_LEN;
-
- if ((args->idx - args->begin) + clientSz > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- args->sigSz = clientSz;
-
- ret = AllocKey(ssl, DYNAMIC_TYPE_DH,
- (void**)&ssl->buffers.serverDH_Key);
- if (ret != 0) {
- goto exit_dcke;
- }
-
- ret = wc_DhSetKey(ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_P.buffer,
- ssl->buffers.serverDH_P.length,
- ssl->buffers.serverDH_G.buffer,
- ssl->buffers.serverDH_G.length);
-
- break;
- }
- #endif /* !NO_DH && !NO_PSK */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- word16 clientSz;
-
- /* Read in the PSK hint */
- if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- ato16(input + args->idx, &clientSz);
- args->idx += OPAQUE16_LEN;
- if (clientSz > MAX_PSK_ID_LEN) {
- ERROR_OUT(CLIENT_ID_ERROR, exit_dcke);
- }
- if ((args->idx - args->begin) + clientSz > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- XMEMCPY(ssl->arrays->client_identity,
- input + args->idx, clientSz);
- args->idx += clientSz;
- ssl->arrays->client_identity[clientSz] = '\0'; /* null term */
-
- /* import peer ECC key */
- if ((args->idx - args->begin) + OPAQUE8_LEN > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- args->length = input[args->idx++];
-
- if ((args->idx - args->begin) + args->length > size) {
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
-
- args->sigSz = ENCRYPT_LEN - OPAQUE16_LEN;
-
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->X25519SharedSecretCb != NULL) {
- break;
- }
- #endif
-
- if (ssl->eccTempKeyPresent == 0) {
- WOLFSSL_MSG(
- "X25519 ephemeral key not made correctly");
- ERROR_OUT(ECC_MAKEKEY_ERROR, exit_dcke);
- }
-
- if (ssl->peerX25519Key == NULL) {
- /* alloc/init on demand */
- ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE25519,
- (void**)&ssl->peerX25519Key);
- if (ret != 0) {
- goto exit_dcke;
- }
- } else if (ssl->peerX25519KeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE25519,
- ssl->peerX25519Key);
- ssl->peerX25519KeyPresent = 0;
- if (ret != 0) {
- goto exit_dcke;
- }
- }
-
- if ((ret = wc_curve25519_check_public(
- input + args->idx, args->length,
- EC25519_LITTLE_ENDIAN)) != 0) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_E)
- SendAlert(ssl, alert_fatal, decode_error);
- else if (ret == ECC_OUT_OF_RANGE_E)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- else {
- SendAlert(ssl, alert_fatal,
- illegal_parameter);
- }
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dcke);
- }
-
- if (wc_curve25519_import_public_ex(
- input + args->idx, args->length,
- ssl->peerX25519Key,
- EC25519_LITTLE_ENDIAN)) {
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dcke);
- }
-
- ssl->peerX25519KeyPresent = 1;
-
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->X448SharedSecretCb != NULL) {
- break;
- }
- #endif
-
- if (ssl->eccTempKeyPresent == 0) {
- WOLFSSL_MSG(
- "X448 ephemeral key not made correctly");
- ERROR_OUT(ECC_MAKEKEY_ERROR, exit_dcke);
- }
-
- if (ssl->peerX448Key == NULL) {
- /* alloc/init on demand */
- ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE448,
- (void**)&ssl->peerX448Key);
- if (ret != 0) {
- goto exit_dcke;
- }
- } else if (ssl->peerX448KeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE448,
- ssl->peerX448Key);
- ssl->peerX448KeyPresent = 0;
- if (ret != 0) {
- goto exit_dcke;
- }
- }
-
- if ((ret = wc_curve448_check_public(
- input + args->idx, args->length,
- EC448_LITTLE_ENDIAN)) != 0) {
- #ifdef WOLFSSL_EXTRA_ALERTS
- if (ret == BUFFER_E)
- SendAlert(ssl, alert_fatal, decode_error);
- else if (ret == ECC_OUT_OF_RANGE_E)
- SendAlert(ssl, alert_fatal, bad_record_mac);
- else {
- SendAlert(ssl, alert_fatal,
- illegal_parameter);
- }
- #endif
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dcke);
- }
-
- if (wc_curve448_import_public_ex(
- input + args->idx, args->length,
- ssl->peerX448Key,
- EC448_LITTLE_ENDIAN)) {
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dcke);
- }
-
- ssl->peerX448KeyPresent = 1;
-
- break;
- }
- #endif
- #ifdef HAVE_PK_CALLBACKS
- /* if callback then use it for shared secret */
- if (ssl->ctx->EccSharedSecretCb != NULL) {
- break;
- }
- #endif
-
- if (ssl->eccTempKeyPresent == 0) {
- WOLFSSL_MSG("Ecc ephemeral key not made correctly");
- ERROR_OUT(ECC_MAKEKEY_ERROR, exit_dcke);
- }
-
- if (ssl->peerEccKey == NULL) {
- /* alloc/init on demand */
- ret = AllocKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->peerEccKey);
- if (ret != 0) {
- goto exit_dcke;
- }
- }
- else if (ssl->peerEccKeyPresent) {
- ret = ReuseKey(ssl, DYNAMIC_TYPE_ECC,
- ssl->peerEccKey);
- ssl->peerEccKeyPresent = 0;
- if (ret != 0) {
- goto exit_dcke;
- }
- }
- if (wc_ecc_import_x963_ex(input + args->idx,
- args->length, ssl->peerEccKey,
- ssl->eccTempKey->dp->id)) {
- ERROR_OUT(ECC_PEERKEY_ERROR, exit_dcke);
- }
-
- ssl->peerEccKeyPresent = 1;
- break;
- }
- #endif /* (HAVE_ECC || CURVE25519 || CURVE448) && !NO_PSK */
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch (ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_dcke;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_DO;
- } /* TLS_ASYNC_BUILD */
- FALL_THROUGH;
-
- case TLS_ASYNC_DO:
- {
- switch (ssl->specs.kea) {
- #ifndef NO_RSA
- case rsa_kea:
- {
- RsaKey* key = (RsaKey*)ssl->hsKey;
-
- ret = RsaDec(ssl,
- input + args->idx,
- args->length,
- &args->output,
- &args->sigSz,
- key,
- #ifdef HAVE_PK_CALLBACKS
- ssl->buffers.key
- #else
- NULL
- #endif
- );
-
- /* Errors that can occur here that should be
- * indistinguishable:
- * RSA_BUFFER_E, RSA_PAD_E and RSA_PRIVATE_ERROR
- */
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret == WC_PENDING_E)
- goto exit_dcke;
- #endif
- if (ret == BAD_FUNC_ARG)
- goto exit_dcke;
-
- args->lastErr = ret - (SECRET_LEN - args->sigSz);
- ret = 0;
- break;
- } /* rsa_kea */
- #endif /* !NO_RSA */
- #ifndef NO_PSK
- case psk_kea:
- {
- break;
- }
- #endif /* !NO_PSK */
- #ifdef HAVE_NTRU
- case ntru_kea:
- {
- break;
- }
- #endif /* HAVE_NTRU */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- void* private_key = ssl->eccTempKey;
- (void)private_key;
-
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- ret = X25519SharedSecret(ssl,
- (curve25519_key*)private_key,
- ssl->peerX25519Key,
- input + args->idx, &args->length,
- ssl->arrays->preMasterSecret,
- &ssl->arrays->preMasterSz,
- WOLFSSL_SERVER_END
- );
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- ret = X448SharedSecret(ssl,
- (curve448_key*)private_key,
- ssl->peerX448Key,
- input + args->idx, &args->length,
- ssl->arrays->preMasterSecret,
- &ssl->arrays->preMasterSz,
- WOLFSSL_SERVER_END
- );
- break;
- }
- #endif
- #ifdef HAVE_ECC
- if (ssl->specs.static_ecdh) {
- private_key = ssl->hsKey;
- }
-
- /* Generate shared secret */
- ret = EccSharedSecret(ssl,
- (ecc_key*)private_key, ssl->peerEccKey,
- input + args->idx, &args->length,
- ssl->arrays->preMasterSecret,
- &ssl->arrays->preMasterSz,
- WOLFSSL_SERVER_END
- );
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret != WC_PENDING_E)
- #endif
- {
- FreeKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->peerEccKey);
- ssl->peerEccKeyPresent = 0;
- }
- #endif
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
- #ifndef NO_DH
- case diffie_hellman_kea:
- {
- ret = DhAgree(ssl, ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_Priv.buffer,
- ssl->buffers.serverDH_Priv.length,
- input + args->idx,
- (word16)args->sigSz,
- ssl->arrays->preMasterSecret,
- &ssl->arrays->preMasterSz);
- break;
- }
- #endif /* !NO_DH */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- ret = DhAgree(ssl, ssl->buffers.serverDH_Key,
- ssl->buffers.serverDH_Priv.buffer,
- ssl->buffers.serverDH_Priv.length,
- input + args->idx,
- (word16)args->sigSz,
- ssl->arrays->preMasterSecret + OPAQUE16_LEN,
- &ssl->arrays->preMasterSz);
- break;
- }
- #endif /* !NO_DH && !NO_PSK */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- #ifdef HAVE_CURVE25519
- if (ssl->ecdhCurveOID == ECC_X25519_OID) {
- ret = X25519SharedSecret(ssl,
- (curve25519_key*)ssl->eccTempKey,
- ssl->peerX25519Key,
- input + args->idx, &args->length,
- ssl->arrays->preMasterSecret + OPAQUE16_LEN,
- &args->sigSz,
- WOLFSSL_SERVER_END
- );
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret != WC_PENDING_E)
- #endif
- {
- FreeKey(ssl, DYNAMIC_TYPE_CURVE25519,
- (void**)&ssl->peerX25519Key);
- ssl->peerX25519KeyPresent = 0;
- }
- break;
- }
- #endif
- #ifdef HAVE_CURVE448
- if (ssl->ecdhCurveOID == ECC_X448_OID) {
- ret = X448SharedSecret(ssl,
- (curve448_key*)ssl->eccTempKey,
- ssl->peerX448Key,
- input + args->idx, &args->length,
- ssl->arrays->preMasterSecret + OPAQUE16_LEN,
- &args->sigSz,
- WOLFSSL_SERVER_END
- );
- #ifdef WOLFSSL_ASYNC_CRYPT
- if (ret != WC_PENDING_E)
- #endif
- {
- FreeKey(ssl, DYNAMIC_TYPE_CURVE448,
- (void**)&ssl->peerX448Key);
- ssl->peerX448KeyPresent = 0;
- }
- break;
- }
- #endif
- /* Generate shared secret */
- ret = EccSharedSecret(ssl,
- ssl->eccTempKey, ssl->peerEccKey,
- input + args->idx, &args->length,
- ssl->arrays->preMasterSecret + OPAQUE16_LEN,
- &args->sigSz,
- WOLFSSL_SERVER_END
- );
- if (!ssl->specs.static_ecdh
- #ifdef WOLFSSL_ASYNC_CRYPT
- && ret != WC_PENDING_E
- #endif
- ) {
- FreeKey(ssl, DYNAMIC_TYPE_ECC,
- (void**)&ssl->peerEccKey);
- ssl->peerEccKeyPresent = 0;
- }
- break;
- }
- #endif /* (HAVE_ECC || CURVE25519 || CURVE448) && !NO_PSK */
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch (ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_dcke;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_VERIFY;
- } /* TLS_ASYNC_DO */
- FALL_THROUGH;
-
- case TLS_ASYNC_VERIFY:
- {
- switch (ssl->specs.kea) {
- #ifndef NO_RSA
- case rsa_kea:
- {
- byte mask;
- int i;
-
- /* Add the signature length to idx */
- args->idx += args->length;
-
- #ifdef DEBUG_WOLFSSL
- /* check version (debug warning message only) */
- if (args->output != NULL) {
- if (args->output[0] != ssl->chVersion.major ||
- args->output[1] != ssl->chVersion.minor) {
- WOLFSSL_MSG("preMasterSecret version mismatch");
- }
- }
- #endif
-
- /* RFC5246 7.4.7.1:
- * Treat incorrectly formatted message blocks and/or
- * mismatched version numbers in a manner
- * indistinguishable from correctly formatted RSA blocks
- */
-
- ret = args->lastErr;
- args->lastErr = 0; /* reset */
- /* On error 'ret' will be negative - top bit set */
- mask = ((unsigned int)ret >>
- ((sizeof(ret) * 8) - 1)) - 1;
-
- /* build PreMasterSecret */
- ssl->arrays->preMasterSecret[0] = ssl->chVersion.major;
- ssl->arrays->preMasterSecret[1] = ssl->chVersion.minor;
-
- if (args->output != NULL) {
- /* Use random secret on error */
- for (i = VERSION_SZ; i < SECRET_LEN; i++) {
- ssl->arrays->preMasterSecret[i] =
- ctMaskSel(mask, args->output[i],
- ssl->arrays->preMasterSecret[i]);
- }
- }
- /* preMasterSecret has RNG and version set
- * return proper length and ignore error
- * error will be caught as decryption error
- */
- args->sigSz = SECRET_LEN;
- ret = 0;
- break;
- } /* rsa_kea */
- #endif /* !NO_RSA */
- #ifndef NO_PSK
- case psk_kea:
- {
- break;
- }
- #endif /* !NO_PSK */
- #ifdef HAVE_NTRU
- case ntru_kea:
- {
- break;
- }
- #endif /* HAVE_NTRU */
- #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)
- case ecc_diffie_hellman_kea:
- {
- /* skip past the imported peer key */
- args->idx += args->length;
- break;
- }
- #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
- #ifndef NO_DH
- case diffie_hellman_kea:
- {
- args->idx += (word16)args->sigSz;
- break;
- }
- #endif /* !NO_DH */
- #if !defined(NO_DH) && !defined(NO_PSK)
- case dhe_psk_kea:
- {
- byte* pms = ssl->arrays->preMasterSecret;
- word16 clientSz = (word16)args->sigSz;
-
- args->idx += clientSz;
- c16toa((word16)ssl->arrays->preMasterSz, pms);
- ssl->arrays->preMasterSz += OPAQUE16_LEN;
- pms += ssl->arrays->preMasterSz;
-
- /* Use the PSK hint to look up the PSK and add it to the
- * preMasterSecret here. */
- ssl->arrays->psk_keySz = ssl->options.server_psk_cb(ssl,
- ssl->arrays->client_identity, ssl->arrays->psk_key,
- MAX_PSK_KEY_LEN);
-
- if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
- ERROR_OUT(PSK_KEY_ERROR, exit_dcke);
- }
-
- c16toa((word16) ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
-
- XMEMCPY(pms, ssl->arrays->psk_key,
- ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz += ssl->arrays->psk_keySz +
- OPAQUE16_LEN;
- break;
- }
- #endif /* !NO_DH && !NO_PSK */
- #if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || \
- defined(HAVE_CURVE448)) && !defined(NO_PSK)
- case ecdhe_psk_kea:
- {
- byte* pms = ssl->arrays->preMasterSecret;
- word16 clientSz = (word16)args->sigSz;
-
- /* skip past the imported peer key */
- args->idx += args->length;
-
- /* Add preMasterSecret */
- c16toa(clientSz, pms);
- ssl->arrays->preMasterSz = OPAQUE16_LEN + clientSz;
- pms += ssl->arrays->preMasterSz;
-
- /* Use the PSK hint to look up the PSK and add it to the
- * preMasterSecret here. */
- ssl->arrays->psk_keySz = ssl->options.server_psk_cb(ssl,
- ssl->arrays->client_identity, ssl->arrays->psk_key,
- MAX_PSK_KEY_LEN);
-
- if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
- ERROR_OUT(PSK_KEY_ERROR, exit_dcke);
- }
-
- c16toa((word16) ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
-
- XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz +=
- ssl->arrays->psk_keySz + OPAQUE16_LEN;
- break;
- }
- #endif /* (HAVE_ECC || CURVE25519 || CURVE448) && !NO_PSK */
- default:
- ret = BAD_KEA_TYPE_E;
- } /* switch (ssl->specs.kea) */
-
- /* Check for error */
- if (ret != 0) {
- goto exit_dcke;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_FINALIZE;
- } /* TLS_ASYNC_VERIFY */
- FALL_THROUGH;
-
- case TLS_ASYNC_FINALIZE:
- {
- if (IsEncryptionOn(ssl, 0)) {
- args->idx += ssl->keys.padSz;
- #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.startedETMRead)
- args->idx += MacSize(ssl);
- #endif
- }
-
- #ifdef HAVE_QSH
- word16 name;
-
- if (ssl->options.haveQSH) {
- /* extension name */
- ato16(input + args->idx, &name);
- args->idx += OPAQUE16_LEN;
-
- if (name == TLSX_QUANTUM_SAFE_HYBRID) {
- int qshSz;
- /* if qshSz is larger than 0 it is the
- length of buffer used */
- if ((qshSz = TLSX_QSHCipher_Parse(ssl,
- input + args->idx,
- size - args->idx + args->begin, 1)) < 0) {
- ERROR_OUT(qshSz, exit_dcke);
- }
- args->idx += qshSz;
- }
- else {
- /* unknown extension sent client ignored handshake */
- ERROR_OUT(BUFFER_ERROR, exit_dcke);
- }
- }
- #endif /* HAVE_QSH */
- ret = MakeMasterSecret(ssl);
-
- /* Check for error */
- if (ret != 0) {
- goto exit_dcke;
- }
-
- /* Advance state and proceed */
- ssl->options.asyncState = TLS_ASYNC_END;
- } /* TLS_ASYNC_FINALIZE */
- FALL_THROUGH;
-
- case TLS_ASYNC_END:
- {
- /* Set final index */
- *inOutIdx = args->idx;
-
- ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;
- #ifndef NO_CERTS
- if (ssl->options.verifyPeer) {
- ret = BuildCertHashes(ssl, &ssl->hsHashes->certHashes);
- }
- #endif
- break;
- } /* TLS_ASYNC_END */
- default:
- ret = INPUT_CASE_ERROR;
- } /* switch(ssl->options.asyncState) */
-
- exit_dcke:
-
- WOLFSSL_LEAVE("DoClientKeyExchange", ret);
- WOLFSSL_END(WC_FUNC_CLIENT_KEY_EXCHANGE_DO);
-
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* Handle async operation */
- if (ret == WC_PENDING_E) {
- /* Mark message as not received so it can process again */
- ssl->msgsReceived.got_client_key_exchange = 0;
-
- return ret;
- }
- #endif /* WOLFSSL_ASYNC_CRYPT */
-
- /* Cleanup PMS */
- if (ssl->arrays->preMasterSecret != NULL) {
- ForceZero(ssl->arrays->preMasterSecret, ssl->arrays->preMasterSz);
- }
- ssl->arrays->preMasterSz = 0;
-
- /* Final cleanup */
- FreeDckeArgs(ssl, args);
- FreeKeyExchange(ssl);
-
- return ret;
- }
-
-#endif /* !WOLFSSL_NO_TLS12 */
-
-#if defined(OPENSSL_ALL) || defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || \
- defined(WOLFSSL_HAPROXY)
- int SNI_Callback(WOLFSSL* ssl)
- {
- /* Stunnel supports a custom sni callback to switch an SSL's ctx
- * when SNI is received. Call it now if exists */
- if(ssl && ssl->ctx && ssl->ctx->sniRecvCb) {
- WOLFSSL_MSG("Calling custom sni callback");
- if(ssl->ctx->sniRecvCb(ssl, NULL, ssl->ctx->sniRecvCbArg)
- == alert_fatal) {
- WOLFSSL_MSG("Error in custom sni callback. Fatal alert");
- SendAlert(ssl, alert_fatal, unrecognized_name);
- return FATAL_ERROR;
- }
- }
- return 0;
- }
-#endif /* OPENSSL_ALL || HAVE_STUNNEL || WOLFSSL_NGINX || WOLFSSL_HAPROXY */
-
-#endif /* NO_WOLFSSL_SERVER */
-
-
-#ifdef WOLFSSL_ASYNC_CRYPT
-int wolfSSL_AsyncPop(WOLFSSL* ssl, byte* state)
-{
- int ret = 0;
- WC_ASYNC_DEV* asyncDev;
- WOLF_EVENT* event;
-
- if (ssl == NULL) {
- return BAD_FUNC_ARG;
- }
-
- /* check for pending async */
- asyncDev = ssl->async.dev;
- if (asyncDev) {
- /* grab event pointer */
- event = &asyncDev->event;
-
- ret = wolfAsync_EventPop(event, WOLF_EVENT_TYPE_ASYNC_WOLFSSL);
- if (ret != WC_NOT_PENDING_E && ret != WC_PENDING_E) {
-
- /* advance key share state if doesn't need called again */
- if (state && (asyncDev->event.flags & WC_ASYNC_FLAG_CALL_AGAIN) == 0) {
- (*state)++;
- }
-
- /* clear event */
- XMEMSET(&asyncDev->event, 0, sizeof(WOLF_EVENT));
-
- /* clear async dev */
- ssl->async.dev = NULL;
- }
- }
- else {
- ret = WC_NOT_PENDING_E;
- }
-
- WOLFSSL_LEAVE("wolfSSL_AsyncPop", ret);
-
- return ret;
-}
-
-int wolfSSL_AsyncInit(WOLFSSL* ssl, WC_ASYNC_DEV* asyncDev, word32 flags)
-{
- int ret;
- WOLF_EVENT* event;
-
- if (ssl == NULL || asyncDev == NULL) {
- return BAD_FUNC_ARG;
- }
-
- /* grab event pointer */
- event = &asyncDev->event;
-
- /* init event */
- ret = wolfAsync_EventInit(event, WOLF_EVENT_TYPE_ASYNC_WOLFSSL, ssl, flags);
-
- WOLFSSL_LEAVE("wolfSSL_AsyncInit", ret);
-
- return ret;
-}
-
-int wolfSSL_AsyncPush(WOLFSSL* ssl, WC_ASYNC_DEV* asyncDev)
-{
- int ret;
- WOLF_EVENT* event;
-
- if (ssl == NULL || asyncDev == NULL) {
- return BAD_FUNC_ARG;
- }
-
- /* grab event pointer */
- event = &asyncDev->event;
-
- /* store reference to active async operation */
- ssl->async.dev = asyncDev;
-
- /* place event into queue */
- ret = wolfAsync_EventQueuePush(&ssl->ctx->event_queue, event);
-
- /* success means return WC_PENDING_E */
- if (ret == 0) {
- ret = WC_PENDING_E;
- }
-
- WOLFSSL_LEAVE("wolfSSL_AsyncPush", ret);
-
- return ret;
-}
-
-#endif /* WOLFSSL_ASYNC_CRYPT */
-
-
-/* return the max record size */
-int wolfSSL_GetMaxRecordSize(WOLFSSL* ssl, int maxFragment)
-{
- (void) ssl; /* Avoid compiler warnings */
-
- if (maxFragment > MAX_RECORD_SIZE) {
- maxFragment = MAX_RECORD_SIZE;
- }
-
-#ifdef HAVE_MAX_FRAGMENT
- if ((ssl->max_fragment != 0) && ((word16)maxFragment > ssl->max_fragment)) {
- maxFragment = ssl->max_fragment;
- }
-#endif /* HAVE_MAX_FRAGMENT */
-#ifdef WOLFSSL_DTLS
- if (IsDtlsNotSctpMode(ssl) && (maxFragment > MAX_UDP_SIZE)) {
- maxFragment = MAX_UDP_SIZE;
- }
-#endif
-
- return maxFragment;
-}
-
-
-#undef ERROR_OUT
-
-#endif /* WOLFCRYPT_ONLY */
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/keys.c b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/keys.c
deleted file mode 100644
index cdb07223e8..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/keys.c
+++ /dev/null
@@ -1,3711 +0,0 @@
-/* keys.c
- *
- * Copyright (C) 2006-2020 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * wolfSSL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
- */
-
-
-/* Name change compatibility layer no longer needs to be included here */
-
-#ifdef HAVE_CONFIG_H
- #include
-#endif
-
-#include
-
-#ifndef WOLFCRYPT_ONLY
-
-#include
-#include
-#if defined(SHOW_SECRETS) || defined(CHACHA_AEAD_TEST)
- #ifndef NO_STDIO_FILESYSTEM
- #include
- #endif
-#endif
-
-#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- int tsip_useable(const WOLFSSL *ssl);
-#endif
-int SetCipherSpecs(WOLFSSL* ssl)
-{
-#ifndef NO_WOLFSSL_CLIENT
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- /* server side verified before SetCipherSpecs call */
- if (VerifyClientSuite(ssl) != 1) {
- WOLFSSL_MSG("SetCipherSpecs() client has an unusable suite");
- return UNSUPPORTED_SUITE;
- }
- }
-#endif /* NO_WOLFSSL_CLIENT */
-
- /* Chacha extensions, 0xcc */
- if (ssl->options.cipherSuite0 == CHACHA_BYTE) {
-
- switch (ssl->options.cipherSuite) {
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256
- case TLS_ECDHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256:
- ssl->specs.bulk_cipher_algorithm = wolfssl_chacha;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CHACHA20_256_KEY_SIZE;
- ssl->specs.block_size = CHACHA20_BLOCK_SIZE;
- ssl->specs.iv_size = CHACHA20_IV_SIZE;
- ssl->specs.aead_mac_size = POLY1305_AUTH_SZ;
- ssl->options.oldPoly = 1; /* use old poly1305 padding */
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_CHACHA20_OLD_POLY1305_SHA256
- case TLS_ECDHE_ECDSA_WITH_CHACHA20_OLD_POLY1305_SHA256:
- ssl->specs.bulk_cipher_algorithm = wolfssl_chacha;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CHACHA20_256_KEY_SIZE;
- ssl->specs.block_size = CHACHA20_BLOCK_SIZE;
- ssl->specs.iv_size = CHACHA20_IV_SIZE;
- ssl->specs.aead_mac_size = POLY1305_AUTH_SZ;
- ssl->options.oldPoly = 1; /* use old poly1305 padding */
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256
- case TLS_DHE_RSA_WITH_CHACHA20_OLD_POLY1305_SHA256:
- ssl->specs.bulk_cipher_algorithm = wolfssl_chacha;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CHACHA20_256_KEY_SIZE;
- ssl->specs.block_size = CHACHA20_BLOCK_SIZE;
- ssl->specs.iv_size = CHACHA20_IV_SIZE;
- ssl->specs.aead_mac_size = POLY1305_AUTH_SZ;
- ssl->options.oldPoly = 1; /* use old poly1305 padding */
-
- break;
-#endif
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
- case TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:
- ssl->specs.bulk_cipher_algorithm = wolfssl_chacha;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CHACHA20_256_KEY_SIZE;
- ssl->specs.block_size = CHACHA20_BLOCK_SIZE;
- ssl->specs.iv_size = CHACHA20_IV_SIZE;
- ssl->specs.aead_mac_size = POLY1305_AUTH_SZ;
- ssl->options.oldPoly = 0; /* use recent padding RFC */
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
- case TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:
- ssl->specs.bulk_cipher_algorithm = wolfssl_chacha;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CHACHA20_256_KEY_SIZE;
- ssl->specs.block_size = CHACHA20_BLOCK_SIZE;
- ssl->specs.iv_size = CHACHA20_IV_SIZE;
- ssl->specs.aead_mac_size = POLY1305_AUTH_SZ;
- ssl->options.oldPoly = 0; /* use recent padding RFC */
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256
- case TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256:
- ssl->specs.bulk_cipher_algorithm = wolfssl_chacha;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CHACHA20_256_KEY_SIZE;
- ssl->specs.block_size = CHACHA20_BLOCK_SIZE;
- ssl->specs.iv_size = CHACHA20_IV_SIZE;
- ssl->specs.aead_mac_size = POLY1305_AUTH_SZ;
- ssl->options.oldPoly = 0; /* use recent padding RFC */
-
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256
- case TLS_PSK_WITH_CHACHA20_POLY1305_SHA256:
- ssl->specs.bulk_cipher_algorithm = wolfssl_chacha;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CHACHA20_256_KEY_SIZE;
- ssl->specs.block_size = CHACHA20_BLOCK_SIZE;
- ssl->specs.iv_size = CHACHA20_IV_SIZE;
- ssl->specs.aead_mac_size = POLY1305_AUTH_SZ;
-
- ssl->options.oldPoly = 0; /* use recent padding RFC */
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256
- case TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256:
- ssl->specs.bulk_cipher_algorithm = wolfssl_chacha;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecdhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CHACHA20_256_KEY_SIZE;
- ssl->specs.block_size = CHACHA20_BLOCK_SIZE;
- ssl->specs.iv_size = CHACHA20_IV_SIZE;
- ssl->specs.aead_mac_size = POLY1305_AUTH_SZ;
-
- ssl->options.oldPoly = 0; /* use recent padding RFC */
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256
- case TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256:
- ssl->specs.bulk_cipher_algorithm = wolfssl_chacha;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = dhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CHACHA20_256_KEY_SIZE;
- ssl->specs.block_size = CHACHA20_BLOCK_SIZE;
- ssl->specs.iv_size = CHACHA20_IV_SIZE;
- ssl->specs.aead_mac_size = POLY1305_AUTH_SZ;
-
- ssl->options.oldPoly = 0; /* use recent padding RFC */
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
- default:
- WOLFSSL_MSG("Unsupported cipher suite, SetCipherSpecs ChaCha");
- return UNSUPPORTED_SUITE;
- }
- }
-
- /* ECC extensions, AES-CCM or TLS 1.3 Integrity-only */
- if (ssl->options.cipherSuite0 == ECC_BYTE) {
-
- switch (ssl->options.cipherSuite) {
-
-#if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
- case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
- case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
- case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
- case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_triple_des;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = DES3_KEY_SIZE;
- ssl->specs.block_size = DES_BLOCK_SIZE;
- ssl->specs.iv_size = DES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_RC4_128_SHA
- case TLS_ECDHE_RSA_WITH_RC4_128_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_rc4;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = RC4_KEY_SIZE;
- ssl->specs.iv_size = 0;
- ssl->specs.block_size = 0;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
- case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_PSK_WITH_NULL_SHA256
- case TLS_ECDHE_PSK_WITH_NULL_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecdhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = 0;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = 0;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
- case TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecdhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
-
-#if defined(HAVE_ECC) || (defined(HAVE_CURVE25519) && defined(HAVE_ED25519)) \
- || (defined(HAVE_CURVE448) && defined(HAVE_ED448))
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
- case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
- case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
- case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_triple_des;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = DES3_KEY_SIZE;
- ssl->specs.block_size = DES_BLOCK_SIZE;
- ssl->specs.iv_size = DES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
- case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_rc4;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = RC4_KEY_SIZE;
- ssl->specs.iv_size = 0;
- ssl->specs.block_size = 0;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
- case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
- case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM
- case TLS_ECDHE_ECDSA_WITH_AES_128_CCM :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_16_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
- case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8
- case TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_NULL_SHA
- case TLS_ECDHE_ECDSA_WITH_NULL_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = 0;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = 0;
-
- break;
-#endif
-
-#endif /* HAVE_ECC || (CURVE25519 && ED25519) || (CURVE448 && ED448) */
-
-#if defined(HAVE_ECC)
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
- case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
- case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
- case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
- case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
- case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
- case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_triple_des;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = DES3_KEY_SIZE;
- ssl->specs.block_size = DES_BLOCK_SIZE;
- ssl->specs.iv_size = DES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_RC4_128_SHA
- case TLS_ECDH_RSA_WITH_RC4_128_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_rc4;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = RC4_KEY_SIZE;
- ssl->specs.iv_size = 0;
- ssl->specs.block_size = 0;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
- case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_triple_des;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = DES3_KEY_SIZE;
- ssl->specs.block_size = DES_BLOCK_SIZE;
- ssl->specs.iv_size = DES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
- case TLS_ECDH_ECDSA_WITH_RC4_128_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_rc4;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = RC4_KEY_SIZE;
- ssl->specs.iv_size = 0;
- ssl->specs.block_size = 0;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
- case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
- case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
- case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
- case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
- case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
- case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
- case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = ecc_diffie_hellman_kea;
- ssl->specs.sig_algo = ecc_dsa_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 1;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#endif /* HAVE_ECC */
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_CCM_8
- case TLS_RSA_WITH_AES_128_CCM_8 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_CCM_8
- case TLS_RSA_WITH_AES_256_CCM_8 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM_8
- case TLS_PSK_WITH_AES_128_CCM_8 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM_8
- case TLS_PSK_WITH_AES_256_CCM_8 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CCM
- case TLS_PSK_WITH_AES_128_CCM :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_16_AUTH_SZ;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CCM
- case TLS_PSK_WITH_AES_256_CCM :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_16_AUTH_SZ;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_128_CCM
- case TLS_DHE_PSK_WITH_AES_128_CCM :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = dhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_16_AUTH_SZ;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_256_CCM
- case TLS_DHE_PSK_WITH_AES_256_CCM :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = dhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_CCM_16_AUTH_SZ;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#if defined(WOLFSSL_TLS13) && defined(HAVE_NULL_CIPHER)
- #ifdef BUILD_TLS_SHA256_SHA256
- case TLS_SHA256_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = 0;
- ssl->specs.sig_algo = 0;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = HMAC_NONCE_SZ;
- ssl->specs.aead_mac_size = WC_SHA256_DIGEST_SIZE;
-
- break;
- #endif
-
- #ifdef BUILD_TLS_SHA384_SHA384
- case TLS_SHA384_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = 0;
- ssl->specs.sig_algo = 0;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = HMAC_NONCE_SZ;
- ssl->specs.aead_mac_size = WC_SHA384_DIGEST_SIZE;
-
- break;
- #endif
-#endif
-
- default:
- WOLFSSL_MSG("Unsupported cipher suite, SetCipherSpecs ECC");
- return UNSUPPORTED_SUITE;
- } /* switch */
- } /* if */
-
- /* TLSi v1.3 cipher suites, 0x13 */
- if (ssl->options.cipherSuite0 == TLS13_BYTE) {
- switch (ssl->options.cipherSuite) {
-
-#ifdef WOLFSSL_TLS13
- #ifdef BUILD_TLS_AES_128_GCM_SHA256
- case TLS_AES_128_GCM_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = 0;
- ssl->specs.sig_algo = 0;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_NONCE_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
- #endif
-
- #ifdef BUILD_TLS_AES_256_GCM_SHA384
- case TLS_AES_256_GCM_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = 0;
- ssl->specs.sig_algo = 0;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_NONCE_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
- #endif
-
- #ifdef BUILD_TLS_CHACHA20_POLY1305_SHA256
- case TLS_CHACHA20_POLY1305_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_chacha;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = 0;
- ssl->specs.sig_algo = 0;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CHACHA20_256_KEY_SIZE;
- ssl->specs.block_size = CHACHA20_BLOCK_SIZE;
- ssl->specs.iv_size = CHACHA20_IV_SIZE;
- ssl->specs.aead_mac_size = POLY1305_AUTH_SZ;
- ssl->options.oldPoly = 0; /* use recent padding RFC */
-
- break;
- #endif
-
- #ifdef BUILD_TLS_AES_128_CCM_SHA256
- case TLS_AES_128_CCM_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = 0;
- ssl->specs.sig_algo = 0;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_NONCE_SZ;
- ssl->specs.aead_mac_size = AES_CCM_16_AUTH_SZ;
-
- break;
- #endif
-
- #ifdef BUILD_TLS_AES_128_CCM_8_SHA256
- case TLS_AES_128_CCM_8_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_ccm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = 0;
- ssl->specs.sig_algo = 0;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_NONCE_SZ;
- ssl->specs.aead_mac_size = AES_CCM_8_AUTH_SZ;
-
- break;
- #endif
-#endif /* WOLFSSL_TLS13 */
- }
- }
-
- if (ssl->options.cipherSuite0 != ECC_BYTE &&
- ssl->options.cipherSuite0 != CHACHA_BYTE &&
- ssl->options.cipherSuite0 != TLS13_BYTE) { /* normal suites */
- switch (ssl->options.cipherSuite) {
-
-#ifdef BUILD_SSL_RSA_WITH_RC4_128_SHA
- case SSL_RSA_WITH_RC4_128_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_rc4;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = RC4_KEY_SIZE;
- ssl->specs.iv_size = 0;
- ssl->specs.block_size = 0;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_RC4_128_SHA
- case TLS_NTRU_RSA_WITH_RC4_128_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_rc4;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ntru_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = RC4_KEY_SIZE;
- ssl->specs.iv_size = 0;
- ssl->specs.block_size = 0;
-
- break;
-#endif
-
-#ifdef BUILD_SSL_RSA_WITH_RC4_128_MD5
- case SSL_RSA_WITH_RC4_128_MD5 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_rc4;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = md5_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_MD5_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_MD5;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = RC4_KEY_SIZE;
- ssl->specs.iv_size = 0;
- ssl->specs.block_size = 0;
-
- break;
-#endif
-
-#ifdef BUILD_SSL_RSA_WITH_3DES_EDE_CBC_SHA
- case SSL_RSA_WITH_3DES_EDE_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_triple_des;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = DES3_KEY_SIZE;
- ssl->specs.block_size = DES_BLOCK_SIZE;
- ssl->specs.iv_size = DES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA
- case TLS_NTRU_RSA_WITH_3DES_EDE_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_triple_des;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ntru_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = DES3_KEY_SIZE;
- ssl->specs.block_size = DES_BLOCK_SIZE;
- ssl->specs.iv_size = DES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA
- case TLS_RSA_WITH_AES_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_CBC_SHA256
- case TLS_RSA_WITH_AES_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_NULL_MD5
- case TLS_RSA_WITH_NULL_MD5 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = md5_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_MD5_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_MD5;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = 0;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = 0;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_NULL_SHA
- case TLS_RSA_WITH_NULL_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = 0;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = 0;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_NULL_SHA256
- case TLS_RSA_WITH_NULL_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = 0;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = 0;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_128_CBC_SHA
- case TLS_NTRU_RSA_WITH_AES_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ntru_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA
- case TLS_RSA_WITH_AES_256_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_CBC_SHA256
- case TLS_RSA_WITH_AES_256_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_NTRU_RSA_WITH_AES_256_CBC_SHA
- case TLS_NTRU_RSA_WITH_AES_256_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = ntru_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_GCM_SHA256
- case TLS_PSK_WITH_AES_128_GCM_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_GCM_SHA384
- case TLS_PSK_WITH_AES_256_GCM_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DH_anon_WITH_AES_256_GCM_SHA384
- case TLS_DH_anon_WITH_AES_256_GCM_SHA384:
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- ssl->options.usingAnon_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
- case TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = dhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
- case TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = dhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA256
- case TLS_PSK_WITH_AES_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA384
- case TLS_PSK_WITH_AES_256_CBC_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
- case TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = dhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
- case TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = dhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_128_CBC_SHA
- case TLS_PSK_WITH_AES_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_AES_256_CBC_SHA
- case TLS_PSK_WITH_AES_256_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_NULL_SHA256
- case TLS_PSK_WITH_NULL_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = 0;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = 0;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_NULL_SHA384
- case TLS_PSK_WITH_NULL_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = 0;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = 0;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_PSK_WITH_NULL_SHA
- case TLS_PSK_WITH_NULL_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = 0;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = 0;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_NULL_SHA256
- case TLS_DHE_PSK_WITH_NULL_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = dhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = 0;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = 0;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_PSK_WITH_NULL_SHA384
- case TLS_DHE_PSK_WITH_NULL_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = dhe_psk_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = 0;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = 0;
-
- ssl->options.usingPSK_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
- case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
- case TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_triple_des;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = DES3_KEY_SIZE;
- ssl->specs.block_size = DES_BLOCK_SIZE;
- ssl->specs.iv_size = DES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
- case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
- case TLS_DHE_RSA_WITH_AES_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
- case TLS_DHE_RSA_WITH_AES_256_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_HC_128_MD5
- case TLS_RSA_WITH_HC_128_MD5 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_hc128;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = md5_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_MD5_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_MD5;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = HC_128_KEY_SIZE;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = HC_128_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_HC_128_SHA
- case TLS_RSA_WITH_HC_128_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_hc128;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = HC_128_KEY_SIZE;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = HC_128_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_RABBIT_SHA
- case TLS_RSA_WITH_RABBIT_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_rabbit;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = RABBIT_KEY_SIZE;
- ssl->specs.block_size = 0;
- ssl->specs.iv_size = RABBIT_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_128_GCM_SHA256
- case TLS_RSA_WITH_AES_128_GCM_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_AES_256_GCM_SHA384
- case TLS_RSA_WITH_AES_256_GCM_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
- case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
- case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes_gcm;
- ssl->specs.cipher_type = aead;
- ssl->specs.mac_algorithm = sha384_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA384_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_256_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AESGCM_IMP_IV_SZ;
- ssl->specs.aead_mac_size = AES_GCM_AUTH_SZ;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
- case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_camellia;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CAMELLIA_128_KEY_SIZE;
- ssl->specs.block_size = CAMELLIA_BLOCK_SIZE;
- ssl->specs.iv_size = CAMELLIA_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
- case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_camellia;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CAMELLIA_256_KEY_SIZE;
- ssl->specs.block_size = CAMELLIA_BLOCK_SIZE;
- ssl->specs.iv_size = CAMELLIA_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
- case TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_camellia;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CAMELLIA_128_KEY_SIZE;
- ssl->specs.block_size = CAMELLIA_BLOCK_SIZE;
- ssl->specs.iv_size = CAMELLIA_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
- case TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_camellia;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CAMELLIA_256_KEY_SIZE;
- ssl->specs.block_size = CAMELLIA_BLOCK_SIZE;
- ssl->specs.iv_size = CAMELLIA_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
- case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_camellia;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CAMELLIA_128_KEY_SIZE;
- ssl->specs.block_size = CAMELLIA_BLOCK_SIZE;
- ssl->specs.iv_size = CAMELLIA_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
- case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_camellia;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CAMELLIA_256_KEY_SIZE;
- ssl->specs.block_size = CAMELLIA_BLOCK_SIZE;
- ssl->specs.iv_size = CAMELLIA_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
- case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_camellia;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CAMELLIA_128_KEY_SIZE;
- ssl->specs.block_size = CAMELLIA_BLOCK_SIZE;
- ssl->specs.iv_size = CAMELLIA_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
- case TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_camellia;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = CAMELLIA_256_KEY_SIZE;
- ssl->specs.block_size = CAMELLIA_BLOCK_SIZE;
- ssl->specs.iv_size = CAMELLIA_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_TLS_DH_anon_WITH_AES_128_CBC_SHA
- case TLS_DH_anon_WITH_AES_128_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_aes;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = diffie_hellman_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = AES_128_KEY_SIZE;
- ssl->specs.block_size = AES_BLOCK_SIZE;
- ssl->specs.iv_size = AES_IV_SIZE;
-
- ssl->options.usingAnon_cipher = 1;
- break;
-#endif
-
-#ifdef BUILD_SSL_RSA_WITH_IDEA_CBC_SHA
- case SSL_RSA_WITH_IDEA_CBC_SHA :
- ssl->specs.bulk_cipher_algorithm = wolfssl_idea;
- ssl->specs.cipher_type = block;
- ssl->specs.mac_algorithm = sha_mac;
- ssl->specs.kea = rsa_kea;
- ssl->specs.sig_algo = rsa_sa_algo;
- ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
- ssl->specs.static_ecdh = 0;
- ssl->specs.key_size = IDEA_KEY_SIZE;
- ssl->specs.block_size = IDEA_BLOCK_SIZE;
- ssl->specs.iv_size = IDEA_IV_SIZE;
-
- break;
-#endif
-
-#ifdef BUILD_WDM_WITH_NULL_SHA256
- case WDM_WITH_NULL_SHA256 :
- ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
- ssl->specs.cipher_type = stream;
- ssl->specs.mac_algorithm = sha256_mac;
- ssl->specs.kea = no_kea;
- ssl->specs.sig_algo = anonymous_sa_algo;
- ssl->specs.hash_size = WC_SHA256_DIGEST_SIZE;
- ssl->specs.pad_size = PAD_SHA;
-
- break;
-#endif
-
- default:
- WOLFSSL_MSG("Unsupported cipher suite, SetCipherSpecs");
- return UNSUPPORTED_SUITE;
- } /* switch */
- } /* if ECC / Normal suites else */
-
- /* set TLS if it hasn't been turned off */
- if (ssl->version.major == 3 && ssl->version.minor >= 1) {
-#ifndef NO_TLS
- ssl->options.tls = 1;
- #if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
- ssl->hmac = TLS_hmac;
- #endif
- if (ssl->version.minor >= 2) {
- ssl->options.tls1_1 = 1;
- if (ssl->version.minor >= 4)
- ssl->options.tls1_3 = 1;
- }
-#endif
- }
-
-#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
- if (IsAtLeastTLSv1_3(ssl->version) || ssl->specs.cipher_type != block)
- ssl->options.encThenMac = 0;
-#endif
-
-#if defined(WOLFSSL_DTLS) && !defined(WOLFSSL_AEAD_ONLY)
- if (ssl->options.dtls)
- ssl->hmac = TLS_hmac;
-#endif
-
- return 0;
-}
-
-
-enum KeyStuff {
- MASTER_ROUNDS = 3,
- PREFIX = 3, /* up to three letters for master prefix */
- KEY_PREFIX = 9 /* up to 9 prefix letters for key rounds */
-
-
-};
-
-#ifndef NO_OLD_TLS
-/* true or false, zero for error */
-static int SetPrefix(byte* sha_input, int idx)
-{
- switch (idx) {
- case 0:
- XMEMCPY(sha_input, "A", 1);
- break;
- case 1:
- XMEMCPY(sha_input, "BB", 2);
- break;
- case 2:
- XMEMCPY(sha_input, "CCC", 3);
- break;
- case 3:
- XMEMCPY(sha_input, "DDDD", 4);
- break;
- case 4:
- XMEMCPY(sha_input, "EEEEE", 5);
- break;
- case 5:
- XMEMCPY(sha_input, "FFFFFF", 6);
- break;
- case 6:
- XMEMCPY(sha_input, "GGGGGGG", 7);
- break;
- case 7:
- XMEMCPY(sha_input, "HHHHHHHH", 8);
- break;
- case 8:
- XMEMCPY(sha_input, "IIIIIIIII", 9);
- break;
- default:
- WOLFSSL_MSG("Set Prefix error, bad input");
- return 0;
- }
- return 1;
-}
-#endif
-
-
-static int SetKeys(Ciphers* enc, Ciphers* dec, Keys* keys, CipherSpecs* specs,
- int side, void* heap, int devId, WC_RNG* rng, int tls13)
-{
- (void)rng;
- (void)tls13;
-
-#ifdef BUILD_ARC4
- if (specs->bulk_cipher_algorithm == wolfssl_rc4) {
- word32 sz = specs->key_size;
- if (enc && enc->arc4 == NULL) {
- enc->arc4 = (Arc4*)XMALLOC(sizeof(Arc4), heap, DYNAMIC_TYPE_CIPHER);
- if (enc->arc4 == NULL)
- return MEMORY_E;
- }
- if (dec && dec->arc4 == NULL) {
- dec->arc4 = (Arc4*)XMALLOC(sizeof(Arc4), heap, DYNAMIC_TYPE_CIPHER);
- if (dec->arc4 == NULL)
- return MEMORY_E;
- }
-
- if (enc) {
- if (wc_Arc4Init(enc->arc4, heap, devId) != 0) {
- WOLFSSL_MSG("Arc4Init failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
- if (dec) {
- if (wc_Arc4Init(dec->arc4, heap, devId) != 0) {
- WOLFSSL_MSG("Arc4Init failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
-
- if (side == WOLFSSL_CLIENT_END) {
- if (enc)
- wc_Arc4SetKey(enc->arc4, keys->client_write_key, sz);
- if (dec)
- wc_Arc4SetKey(dec->arc4, keys->server_write_key, sz);
- }
- else {
- if (enc)
- wc_Arc4SetKey(enc->arc4, keys->server_write_key, sz);
- if (dec)
- wc_Arc4SetKey(dec->arc4, keys->client_write_key, sz);
- }
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif /* BUILD_ARC4 */
-
-
-#if defined(HAVE_CHACHA) && defined(HAVE_POLY1305)
- /* Check that the max implicit iv size is suffecient */
- #if (AEAD_MAX_IMP_SZ < 12) /* CHACHA20_IMP_IV_SZ */
- #error AEAD_MAX_IMP_SZ is too small for ChaCha20
- #endif
- #if (MAX_WRITE_IV_SZ < 12) /* CHACHA20_IMP_IV_SZ */
- #error MAX_WRITE_IV_SZ is too small for ChaCha20
- #endif
-
- if (specs->bulk_cipher_algorithm == wolfssl_chacha) {
- int chachaRet;
- if (enc && enc->chacha == NULL)
- enc->chacha =
- (ChaCha*)XMALLOC(sizeof(ChaCha), heap, DYNAMIC_TYPE_CIPHER);
- if (enc && enc->chacha == NULL)
- return MEMORY_E;
- if (dec && dec->chacha == NULL)
- dec->chacha =
- (ChaCha*)XMALLOC(sizeof(ChaCha), heap, DYNAMIC_TYPE_CIPHER);
- if (dec && dec->chacha == NULL)
- return MEMORY_E;
- if (side == WOLFSSL_CLIENT_END) {
- if (enc) {
- chachaRet = wc_Chacha_SetKey(enc->chacha, keys->client_write_key,
- specs->key_size);
- XMEMCPY(keys->aead_enc_imp_IV, keys->client_write_IV,
- CHACHA20_IMP_IV_SZ);
- if (chachaRet != 0) return chachaRet;
- }
- if (dec) {
- chachaRet = wc_Chacha_SetKey(dec->chacha, keys->server_write_key,
- specs->key_size);
- XMEMCPY(keys->aead_dec_imp_IV, keys->server_write_IV,
- CHACHA20_IMP_IV_SZ);
- if (chachaRet != 0) return chachaRet;
- }
- }
- else {
- if (enc) {
- chachaRet = wc_Chacha_SetKey(enc->chacha, keys->server_write_key,
- specs->key_size);
- XMEMCPY(keys->aead_enc_imp_IV, keys->server_write_IV,
- CHACHA20_IMP_IV_SZ);
- if (chachaRet != 0) return chachaRet;
- }
- if (dec) {
- chachaRet = wc_Chacha_SetKey(dec->chacha, keys->client_write_key,
- specs->key_size);
- XMEMCPY(keys->aead_dec_imp_IV, keys->client_write_IV,
- CHACHA20_IMP_IV_SZ);
- if (chachaRet != 0) return chachaRet;
- }
- }
-
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif /* HAVE_CHACHA && HAVE_POLY1305 */
-
-
-#ifdef HAVE_HC128
- /* check that buffer sizes are sufficient */
- #if (MAX_WRITE_IV_SZ < 16) /* HC_128_IV_SIZE */
- #error MAX_WRITE_IV_SZ too small for HC128
- #endif
-
- if (specs->bulk_cipher_algorithm == wolfssl_hc128) {
- int hcRet;
- if (enc && enc->hc128 == NULL)
- enc->hc128 =
- (HC128*)XMALLOC(sizeof(HC128), heap, DYNAMIC_TYPE_CIPHER);
- if (enc && enc->hc128 == NULL)
- return MEMORY_E;
- if (dec && dec->hc128 == NULL)
- dec->hc128 =
- (HC128*)XMALLOC(sizeof(HC128), heap, DYNAMIC_TYPE_CIPHER);
- if (dec && dec->hc128 == NULL)
- return MEMORY_E;
- if (side == WOLFSSL_CLIENT_END) {
- if (enc) {
- hcRet = wc_Hc128_SetKey(enc->hc128, keys->client_write_key,
- keys->client_write_IV);
- if (hcRet != 0) return hcRet;
- }
- if (dec) {
- hcRet = wc_Hc128_SetKey(dec->hc128, keys->server_write_key,
- keys->server_write_IV);
- if (hcRet != 0) return hcRet;
- }
- }
- else {
- if (enc) {
- hcRet = wc_Hc128_SetKey(enc->hc128, keys->server_write_key,
- keys->server_write_IV);
- if (hcRet != 0) return hcRet;
- }
- if (dec) {
- hcRet = wc_Hc128_SetKey(dec->hc128, keys->client_write_key,
- keys->client_write_IV);
- if (hcRet != 0) return hcRet;
- }
- }
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif /* HAVE_HC128 */
-
-#ifdef BUILD_RABBIT
- /* check that buffer sizes are sufficient */
- #if (MAX_WRITE_IV_SZ < 8) /* RABBIT_IV_SIZE */
- #error MAX_WRITE_IV_SZ too small for RABBIT
- #endif
-
- if (specs->bulk_cipher_algorithm == wolfssl_rabbit) {
- int rabRet;
- if (enc && enc->rabbit == NULL)
- enc->rabbit =
- (Rabbit*)XMALLOC(sizeof(Rabbit), heap, DYNAMIC_TYPE_CIPHER);
- if (enc && enc->rabbit == NULL)
- return MEMORY_E;
- if (dec && dec->rabbit == NULL)
- dec->rabbit =
- (Rabbit*)XMALLOC(sizeof(Rabbit), heap, DYNAMIC_TYPE_CIPHER);
- if (dec && dec->rabbit == NULL)
- return MEMORY_E;
- if (side == WOLFSSL_CLIENT_END) {
- if (enc) {
- rabRet = wc_RabbitSetKey(enc->rabbit, keys->client_write_key,
- keys->client_write_IV);
- if (rabRet != 0) return rabRet;
- }
- if (dec) {
- rabRet = wc_RabbitSetKey(dec->rabbit, keys->server_write_key,
- keys->server_write_IV);
- if (rabRet != 0) return rabRet;
- }
- }
- else {
- if (enc) {
- rabRet = wc_RabbitSetKey(enc->rabbit, keys->server_write_key,
- keys->server_write_IV);
- if (rabRet != 0) return rabRet;
- }
- if (dec) {
- rabRet = wc_RabbitSetKey(dec->rabbit, keys->client_write_key,
- keys->client_write_IV);
- if (rabRet != 0) return rabRet;
- }
- }
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif /* BUILD_RABBIT */
-
-#ifdef BUILD_DES3
- /* check that buffer sizes are sufficient */
- #if (MAX_WRITE_IV_SZ < 8) /* DES_IV_SIZE */
- #error MAX_WRITE_IV_SZ too small for 3DES
- #endif
-
- if (specs->bulk_cipher_algorithm == wolfssl_triple_des) {
- int desRet = 0;
-
- if (enc) {
- if (enc->des3 == NULL)
- enc->des3 = (Des3*)XMALLOC(sizeof(Des3), heap, DYNAMIC_TYPE_CIPHER);
- if (enc->des3 == NULL)
- return MEMORY_E;
- XMEMSET(enc->des3, 0, sizeof(Des3));
- }
- if (dec) {
- if (dec->des3 == NULL)
- dec->des3 = (Des3*)XMALLOC(sizeof(Des3), heap, DYNAMIC_TYPE_CIPHER);
- if (dec->des3 == NULL)
- return MEMORY_E;
- XMEMSET(dec->des3, 0, sizeof(Des3));
- }
-
- if (enc) {
- if (wc_Des3Init(enc->des3, heap, devId) != 0) {
- WOLFSSL_MSG("Des3Init failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
- if (dec) {
- if (wc_Des3Init(dec->des3, heap, devId) != 0) {
- WOLFSSL_MSG("Des3Init failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
-
- if (side == WOLFSSL_CLIENT_END) {
- if (enc) {
- desRet = wc_Des3_SetKey(enc->des3, keys->client_write_key,
- keys->client_write_IV, DES_ENCRYPTION);
- if (desRet != 0) return desRet;
- }
- if (dec) {
- desRet = wc_Des3_SetKey(dec->des3, keys->server_write_key,
- keys->server_write_IV, DES_DECRYPTION);
- if (desRet != 0) return desRet;
- }
- }
- else {
- if (enc) {
- desRet = wc_Des3_SetKey(enc->des3, keys->server_write_key,
- keys->server_write_IV, DES_ENCRYPTION);
- if (desRet != 0) return desRet;
- }
- if (dec) {
- desRet = wc_Des3_SetKey(dec->des3, keys->client_write_key,
- keys->client_write_IV, DES_DECRYPTION);
- if (desRet != 0) return desRet;
- }
- }
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif /* BUILD_DES3 */
-
-#ifdef BUILD_AES
- /* check that buffer sizes are sufficient */
- #if (MAX_WRITE_IV_SZ < 16) /* AES_IV_SIZE */
- #error MAX_WRITE_IV_SZ too small for AES
- #endif
-
- if (specs->bulk_cipher_algorithm == wolfssl_aes) {
- int aesRet = 0;
-
- if (enc) {
- if (enc->aes == NULL)
- enc->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER);
- if (enc->aes == NULL)
- return MEMORY_E;
- XMEMSET(enc->aes, 0, sizeof(Aes));
- }
- if (dec) {
- if (dec->aes == NULL)
- dec->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER);
- if (dec->aes == NULL)
- return MEMORY_E;
- XMEMSET(dec->aes, 0, sizeof(Aes));
- }
- if (enc) {
- if (wc_AesInit(enc->aes, heap, devId) != 0) {
- WOLFSSL_MSG("AesInit failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
- if (dec) {
- if (wc_AesInit(dec->aes, heap, devId) != 0) {
- WOLFSSL_MSG("AesInit failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
-
- if (side == WOLFSSL_CLIENT_END) {
- if (enc) {
- aesRet = wc_AesSetKey(enc->aes, keys->client_write_key,
- specs->key_size, keys->client_write_IV,
- AES_ENCRYPTION);
- if (aesRet != 0) return aesRet;
- }
- if (dec) {
- aesRet = wc_AesSetKey(dec->aes, keys->server_write_key,
- specs->key_size, keys->server_write_IV,
- AES_DECRYPTION);
- if (aesRet != 0) return aesRet;
- }
- }
- else {
- if (enc) {
- aesRet = wc_AesSetKey(enc->aes, keys->server_write_key,
- specs->key_size, keys->server_write_IV,
- AES_ENCRYPTION);
- if (aesRet != 0) return aesRet;
- }
- if (dec) {
- aesRet = wc_AesSetKey(dec->aes, keys->client_write_key,
- specs->key_size, keys->client_write_IV,
- AES_DECRYPTION);
- if (aesRet != 0) return aesRet;
- }
- }
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif /* BUILD_AES */
-
-#ifdef BUILD_AESGCM
- /* check that buffer sizes are sufficient */
- #if (AEAD_MAX_IMP_SZ < 4) /* AESGCM_IMP_IV_SZ */
- #error AEAD_MAX_IMP_SZ too small for AESGCM
- #endif
- #if (AEAD_MAX_EXP_SZ < 8) /* AESGCM_EXP_IV_SZ */
- #error AEAD_MAX_EXP_SZ too small for AESGCM
- #endif
- #if (MAX_WRITE_IV_SZ < 4) /* AESGCM_IMP_IV_SZ */
- #error MAX_WRITE_IV_SZ too small for AESGCM
- #endif
-
- if (specs->bulk_cipher_algorithm == wolfssl_aes_gcm) {
- int gcmRet;
-
- if (enc) {
- if (enc->aes == NULL)
- enc->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER);
- if (enc->aes == NULL)
- return MEMORY_E;
- XMEMSET(enc->aes, 0, sizeof(Aes));
- }
- if (dec) {
- if (dec->aes == NULL)
- dec->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER);
- if (dec->aes == NULL)
- return MEMORY_E;
- XMEMSET(dec->aes, 0, sizeof(Aes));
- }
-
- if (enc) {
- if (wc_AesInit(enc->aes, heap, devId) != 0) {
- WOLFSSL_MSG("AesInit failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
- if (dec) {
- if (wc_AesInit(dec->aes, heap, devId) != 0) {
- WOLFSSL_MSG("AesInit failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
-
- if (side == WOLFSSL_CLIENT_END) {
- if (enc) {
- gcmRet = wc_AesGcmSetKey(enc->aes, keys->client_write_key,
- specs->key_size);
- if (gcmRet != 0) return gcmRet;
- XMEMCPY(keys->aead_enc_imp_IV, keys->client_write_IV,
- AEAD_MAX_IMP_SZ);
-#if !defined(NO_PUBLIC_GCM_SET_IV) && \
- ((!defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)) || \
- (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)))
- if (!tls13) {
- gcmRet = wc_AesGcmSetIV(enc->aes, AESGCM_NONCE_SZ,
- keys->client_write_IV, AESGCM_IMP_IV_SZ, rng);
- if (gcmRet != 0) return gcmRet;
- }
-#endif
- }
- if (dec) {
- gcmRet = wc_AesGcmSetKey(dec->aes, keys->server_write_key,
- specs->key_size);
- if (gcmRet != 0) return gcmRet;
- XMEMCPY(keys->aead_dec_imp_IV, keys->server_write_IV,
- AEAD_MAX_IMP_SZ);
- }
- }
- else {
- if (enc) {
- gcmRet = wc_AesGcmSetKey(enc->aes, keys->server_write_key,
- specs->key_size);
- if (gcmRet != 0) return gcmRet;
- XMEMCPY(keys->aead_enc_imp_IV, keys->server_write_IV,
- AEAD_MAX_IMP_SZ);
-#if !defined(NO_PUBLIC_GCM_SET_IV) && \
- ((!defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)) || \
- (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)))
- if (!tls13) {
- gcmRet = wc_AesGcmSetIV(enc->aes, AESGCM_NONCE_SZ,
- keys->server_write_IV, AESGCM_IMP_IV_SZ, rng);
- if (gcmRet != 0) return gcmRet;
- }
-#endif
- }
- if (dec) {
- gcmRet = wc_AesGcmSetKey(dec->aes, keys->client_write_key,
- specs->key_size);
- if (gcmRet != 0) return gcmRet;
- XMEMCPY(keys->aead_dec_imp_IV, keys->client_write_IV,
- AEAD_MAX_IMP_SZ);
- }
- }
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif /* BUILD_AESGCM */
-
-#ifdef HAVE_AESCCM
- /* check that buffer sizes are sufficient (CCM is same size as GCM) */
- #if (AEAD_MAX_IMP_SZ < 4) /* AESGCM_IMP_IV_SZ */
- #error AEAD_MAX_IMP_SZ too small for AESCCM
- #endif
- #if (AEAD_MAX_EXP_SZ < 8) /* AESGCM_EXP_IV_SZ */
- #error AEAD_MAX_EXP_SZ too small for AESCCM
- #endif
- #if (MAX_WRITE_IV_SZ < 4) /* AESGCM_IMP_IV_SZ */
- #error MAX_WRITE_IV_SZ too small for AESCCM
- #endif
-
- if (specs->bulk_cipher_algorithm == wolfssl_aes_ccm) {
- int CcmRet;
-
- if (enc) {
- if (enc->aes == NULL)
- enc->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER);
- if (enc->aes == NULL)
- return MEMORY_E;
- XMEMSET(enc->aes, 0, sizeof(Aes));
- }
- if (dec) {
- if (dec->aes == NULL)
- dec->aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_CIPHER);
- if (dec->aes == NULL)
- return MEMORY_E;
- XMEMSET(dec->aes, 0, sizeof(Aes));
- }
-
- if (enc) {
- if (wc_AesInit(enc->aes, heap, devId) != 0) {
- WOLFSSL_MSG("AesInit failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
- if (dec) {
- if (wc_AesInit(dec->aes, heap, devId) != 0) {
- WOLFSSL_MSG("AesInit failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
-
- if (side == WOLFSSL_CLIENT_END) {
- if (enc) {
- CcmRet = wc_AesCcmSetKey(enc->aes, keys->client_write_key,
- specs->key_size);
- if (CcmRet != 0) {
- return CcmRet;
- }
- XMEMCPY(keys->aead_enc_imp_IV, keys->client_write_IV,
- AEAD_MAX_IMP_SZ);
-#if !defined(NO_PUBLIC_CCM_SET_NONCE) && \
- ((!defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)) || \
- (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)))
- if (!tls13) {
- CcmRet = wc_AesCcmSetNonce(enc->aes, keys->client_write_IV,
- AEAD_MAX_IMP_SZ);
- if (CcmRet != 0) return CcmRet;
- }
-#endif
- }
- if (dec) {
- CcmRet = wc_AesCcmSetKey(dec->aes, keys->server_write_key,
- specs->key_size);
- if (CcmRet != 0) {
- return CcmRet;
- }
- XMEMCPY(keys->aead_dec_imp_IV, keys->server_write_IV,
- AEAD_MAX_IMP_SZ);
- }
- }
- else {
- if (enc) {
- CcmRet = wc_AesCcmSetKey(enc->aes, keys->server_write_key,
- specs->key_size);
- if (CcmRet != 0) {
- return CcmRet;
- }
- XMEMCPY(keys->aead_enc_imp_IV, keys->server_write_IV,
- AEAD_MAX_IMP_SZ);
-#if !defined(NO_PUBLIC_CCM_SET_NONCE) && \
- ((!defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)) || \
- (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)))
- if (!tls13) {
- CcmRet = wc_AesCcmSetNonce(enc->aes, keys->server_write_IV,
- AEAD_MAX_IMP_SZ);
- if (CcmRet != 0) return CcmRet;
- }
-#endif
- }
- if (dec) {
- CcmRet = wc_AesCcmSetKey(dec->aes, keys->client_write_key,
- specs->key_size);
- if (CcmRet != 0) {
- return CcmRet;
- }
- XMEMCPY(keys->aead_dec_imp_IV, keys->client_write_IV,
- AEAD_MAX_IMP_SZ);
- }
- }
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif /* HAVE_AESCCM */
-
-#ifdef HAVE_CAMELLIA
- /* check that buffer sizes are sufficient */
- #if (MAX_WRITE_IV_SZ < 16) /* CAMELLIA_IV_SIZE */
- #error MAX_WRITE_IV_SZ too small for CAMELLIA
- #endif
-
- if (specs->bulk_cipher_algorithm == wolfssl_camellia) {
- int camRet;
-
- if (enc && enc->cam == NULL)
- enc->cam =
- (Camellia*)XMALLOC(sizeof(Camellia), heap, DYNAMIC_TYPE_CIPHER);
- if (enc && enc->cam == NULL)
- return MEMORY_E;
-
- if (dec && dec->cam == NULL)
- dec->cam =
- (Camellia*)XMALLOC(sizeof(Camellia), heap, DYNAMIC_TYPE_CIPHER);
- if (dec && dec->cam == NULL)
- return MEMORY_E;
-
- if (side == WOLFSSL_CLIENT_END) {
- if (enc) {
- camRet = wc_CamelliaSetKey(enc->cam, keys->client_write_key,
- specs->key_size, keys->client_write_IV);
- if (camRet != 0) return camRet;
- }
- if (dec) {
- camRet = wc_CamelliaSetKey(dec->cam, keys->server_write_key,
- specs->key_size, keys->server_write_IV);
- if (camRet != 0) return camRet;
- }
- }
- else {
- if (enc) {
- camRet = wc_CamelliaSetKey(enc->cam, keys->server_write_key,
- specs->key_size, keys->server_write_IV);
- if (camRet != 0) return camRet;
- }
- if (dec) {
- camRet = wc_CamelliaSetKey(dec->cam, keys->client_write_key,
- specs->key_size, keys->client_write_IV);
- if (camRet != 0) return camRet;
- }
- }
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif /* HAVE_CAMELLIA */
-
-#ifdef HAVE_IDEA
- /* check that buffer sizes are sufficient */
- #if (MAX_WRITE_IV_SZ < 8) /* IDEA_IV_SIZE */
- #error MAX_WRITE_IV_SZ too small for IDEA
- #endif
-
- if (specs->bulk_cipher_algorithm == wolfssl_idea) {
- int ideaRet;
-
- if (enc && enc->idea == NULL)
- enc->idea = (Idea*)XMALLOC(sizeof(Idea), heap, DYNAMIC_TYPE_CIPHER);
- if (enc && enc->idea == NULL)
- return MEMORY_E;
-
- if (dec && dec->idea == NULL)
- dec->idea = (Idea*)XMALLOC(sizeof(Idea), heap, DYNAMIC_TYPE_CIPHER);
- if (dec && dec->idea == NULL)
- return MEMORY_E;
-
- if (side == WOLFSSL_CLIENT_END) {
- if (enc) {
- ideaRet = wc_IdeaSetKey(enc->idea, keys->client_write_key,
- specs->key_size, keys->client_write_IV,
- IDEA_ENCRYPTION);
- if (ideaRet != 0) return ideaRet;
- }
- if (dec) {
- ideaRet = wc_IdeaSetKey(dec->idea, keys->server_write_key,
- specs->key_size, keys->server_write_IV,
- IDEA_DECRYPTION);
- if (ideaRet != 0) return ideaRet;
- }
- }
- else {
- if (enc) {
- ideaRet = wc_IdeaSetKey(enc->idea, keys->server_write_key,
- specs->key_size, keys->server_write_IV,
- IDEA_ENCRYPTION);
- if (ideaRet != 0) return ideaRet;
- }
- if (dec) {
- ideaRet = wc_IdeaSetKey(dec->idea, keys->client_write_key,
- specs->key_size, keys->client_write_IV,
- IDEA_DECRYPTION);
- if (ideaRet != 0) return ideaRet;
- }
- }
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif /* HAVE_IDEA */
-
-#ifdef HAVE_NULL_CIPHER
- if (specs->bulk_cipher_algorithm == wolfssl_cipher_null) {
- #ifdef WOLFSSL_TLS13
- if (tls13) {
- int hmacRet;
- int hashType = WC_HASH_TYPE_NONE;
-
- switch (specs->mac_algorithm) {
- case sha256_mac:
- hashType = WC_SHA256;
- break;
- case sha384_mac:
- hashType = WC_SHA384;
- break;
- default:
- break;
- }
-
- if (enc && enc->hmac == NULL) {
- enc->hmac = (Hmac*)XMALLOC(sizeof(Hmac), heap,
- DYNAMIC_TYPE_CIPHER);
- if (enc->hmac == NULL)
- return MEMORY_E;
- }
-
- if (dec && dec->hmac == NULL) {
- dec->hmac = (Hmac*)XMALLOC(sizeof(Hmac), heap,
- DYNAMIC_TYPE_CIPHER);
- if (dec->hmac == NULL)
- return MEMORY_E;
- }
-
- if (enc) {
- if (wc_HmacInit(enc->hmac, heap, devId) != 0) {
- WOLFSSL_MSG("HmacInit failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
- if (dec) {
- if (wc_HmacInit(dec->hmac, heap, devId) != 0) {
- WOLFSSL_MSG("HmacInit failed in SetKeys");
- return ASYNC_INIT_E;
- }
- }
-
- if (side == WOLFSSL_CLIENT_END) {
- if (enc) {
- XMEMCPY(keys->aead_enc_imp_IV, keys->client_write_IV,
- HMAC_NONCE_SZ);
- hmacRet = wc_HmacSetKey(enc->hmac, hashType,
- keys->client_write_key, specs->key_size);
- if (hmacRet != 0) return hmacRet;
- }
- if (dec) {
- XMEMCPY(keys->aead_dec_imp_IV, keys->server_write_IV,
- HMAC_NONCE_SZ);
- hmacRet = wc_HmacSetKey(dec->hmac, hashType,
- keys->server_write_key, specs->key_size);
- if (hmacRet != 0) return hmacRet;
- }
- }
- else {
- if (enc) {
- XMEMCPY(keys->aead_enc_imp_IV, keys->server_write_IV,
- HMAC_NONCE_SZ);
- hmacRet = wc_HmacSetKey(enc->hmac, hashType,
- keys->server_write_key, specs->key_size);
- if (hmacRet != 0) return hmacRet;
- }
- if (dec) {
- XMEMCPY(keys->aead_dec_imp_IV, keys->client_write_IV,
- HMAC_NONCE_SZ);
- hmacRet = wc_HmacSetKey(dec->hmac, hashType,
- keys->client_write_key, specs->key_size);
- if (hmacRet != 0) return hmacRet;
- }
- }
- }
- #endif
- if (enc)
- enc->setup = 1;
- if (dec)
- dec->setup = 1;
- }
-#endif
-
- if (enc) {
- keys->sequence_number_hi = 0;
- keys->sequence_number_lo = 0;
- }
- if (dec) {
- keys->peer_sequence_number_hi = 0;
- keys->peer_sequence_number_lo = 0;
- }
- (void)side;
- (void)heap;
- (void)enc;
- (void)dec;
- (void)specs;
- (void)devId;
-
- return 0;
-}
-
-
-#ifdef HAVE_ONE_TIME_AUTH
-/* set one time authentication keys */
-static int SetAuthKeys(OneTimeAuth* authentication, Keys* keys,
- CipherSpecs* specs, void* heap, int devId)
-{
-
-#ifdef HAVE_POLY1305
- /* set up memory space for poly1305 */
- if (authentication && authentication->poly1305 == NULL)
- authentication->poly1305 =
- (Poly1305*)XMALLOC(sizeof(Poly1305), heap, DYNAMIC_TYPE_CIPHER);
- if (authentication && authentication->poly1305 == NULL)
- return MEMORY_E;
- if (authentication)
- authentication->setup = 1;
-#endif
- (void)authentication;
- (void)heap;
- (void)keys;
- (void)specs;
- (void)devId;
-
- return 0;
-}
-#endif /* HAVE_ONE_TIME_AUTH */
-
-#ifdef HAVE_SECURE_RENEGOTIATION
-/* function name is for cache_status++
- * This function was added because of error incrementing enum type when
- * compiling with a C++ compiler.
- */
-static void CacheStatusPP(SecureRenegotiation* cache)
-{
- switch (cache->cache_status) {
- case SCR_CACHE_NULL:
- cache->cache_status = SCR_CACHE_NEEDED;
- break;
-
- case SCR_CACHE_NEEDED:
- cache->cache_status = SCR_CACHE_COPY;
- break;
-
- case SCR_CACHE_COPY:
- cache->cache_status = SCR_CACHE_PARTIAL;
- break;
-
- case SCR_CACHE_PARTIAL:
- cache->cache_status = SCR_CACHE_COMPLETE;
- break;
-
- case SCR_CACHE_COMPLETE:
- WOLFSSL_MSG("SCR Cache state Complete");
- break;
-
- default:
- WOLFSSL_MSG("Unknown cache state!!");
- }
-}
-#endif /* HAVE_SECURE_RENEGOTIATION */
-
-
-/* Set wc_encrypt/wc_decrypt or both sides of key setup
- * note: use wc_encrypt to avoid shadowing global encrypt
- * declared in unistd.h
- */
-int SetKeysSide(WOLFSSL* ssl, enum encrypt_side side)
-{
- int ret, copy = 0;
- Ciphers* wc_encrypt = NULL;
- Ciphers* wc_decrypt = NULL;
- Keys* keys = &ssl->keys;
-
- (void)copy;
-
-#ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation && ssl->secure_renegotiation->cache_status) {
- keys = &ssl->secure_renegotiation->tmp_keys;
-#ifdef WOLFSSL_DTLS
- /* For DTLS, copy is done in StoreKeys */
- if (!ssl->options.dtls)
-#endif
- copy = 1;
- }
-#endif /* HAVE_SECURE_RENEGOTIATION */
-
- switch (side) {
- case ENCRYPT_SIDE_ONLY:
-#ifdef WOLFSSL_DEBUG_TLS
- WOLFSSL_MSG("Provisioning ENCRYPT key");
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- WOLFSSL_BUFFER(ssl->keys.client_write_key, ssl->specs.key_size);
- }
- else {
- WOLFSSL_BUFFER(ssl->keys.server_write_key, ssl->specs.key_size);
- }
-#endif
- wc_encrypt = &ssl->encrypt;
- break;
-
- case DECRYPT_SIDE_ONLY:
-#ifdef WOLFSSL_DEBUG_TLS
- WOLFSSL_MSG("Provisioning DECRYPT key");
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- WOLFSSL_BUFFER(ssl->keys.server_write_key, ssl->specs.key_size);
- }
- else {
- WOLFSSL_BUFFER(ssl->keys.client_write_key, ssl->specs.key_size);
- }
-#endif
- wc_decrypt = &ssl->decrypt;
- break;
-
- case ENCRYPT_AND_DECRYPT_SIDE:
-#ifdef WOLFSSL_DEBUG_TLS
- WOLFSSL_MSG("Provisioning ENCRYPT key");
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- WOLFSSL_BUFFER(ssl->keys.client_write_key, ssl->specs.key_size);
- }
- else {
- WOLFSSL_BUFFER(ssl->keys.server_write_key, ssl->specs.key_size);
- }
- WOLFSSL_MSG("Provisioning DECRYPT key");
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- WOLFSSL_BUFFER(ssl->keys.server_write_key, ssl->specs.key_size);
- }
- else {
- WOLFSSL_BUFFER(ssl->keys.client_write_key, ssl->specs.key_size);
- }
-#endif
- wc_encrypt = &ssl->encrypt;
- wc_decrypt = &ssl->decrypt;
- break;
-
- default:
- return BAD_FUNC_ARG;
- }
-
-#ifdef HAVE_ONE_TIME_AUTH
- if (!ssl->auth.setup && ssl->specs.bulk_cipher_algorithm == wolfssl_chacha){
- ret = SetAuthKeys(&ssl->auth, keys, &ssl->specs, ssl->heap, ssl->devId);
- if (ret != 0)
- return ret;
- }
-#endif
-
-#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- /* check if keys for TSIP has been created */
- if (tsip_useable(ssl) == 1)
- ret = 0;
- else
-#endif
- ret = SetKeys(wc_encrypt, wc_decrypt, keys, &ssl->specs, ssl->options.side,
- ssl->heap, ssl->devId, ssl->rng, ssl->options.tls1_3);
-
-#ifdef HAVE_SECURE_RENEGOTIATION
-#ifdef WOLFSSL_DTLS
- if (ret == 0 && ssl->options.dtls) {
- if (wc_encrypt)
- wc_encrypt->src = keys == &ssl->keys ? KEYS : SCR;
- if (wc_decrypt)
- wc_decrypt->src = keys == &ssl->keys ? KEYS : SCR;
- }
-#endif
-
- if (copy) {
- int clientCopy = 0;
-
- if (ssl->options.side == WOLFSSL_CLIENT_END && wc_encrypt)
- clientCopy = 1;
- else if (ssl->options.side == WOLFSSL_SERVER_END && wc_decrypt)
- clientCopy = 1;
-
- if (clientCopy) {
- #ifndef WOLFSSL_AEAD_ONLY
- XMEMCPY(ssl->keys.client_write_MAC_secret,
- keys->client_write_MAC_secret, WC_MAX_DIGEST_SIZE);
- #endif
- XMEMCPY(ssl->keys.client_write_key,
- keys->client_write_key, AES_256_KEY_SIZE);
- XMEMCPY(ssl->keys.client_write_IV,
- keys->client_write_IV, MAX_WRITE_IV_SZ);
- } else {
- #ifndef WOLFSSL_AEAD_ONLY
- XMEMCPY(ssl->keys.server_write_MAC_secret,
- keys->server_write_MAC_secret, WC_MAX_DIGEST_SIZE);
- #endif
- XMEMCPY(ssl->keys.server_write_key,
- keys->server_write_key, AES_256_KEY_SIZE);
- XMEMCPY(ssl->keys.server_write_IV,
- keys->server_write_IV, MAX_WRITE_IV_SZ);
- }
- if (wc_encrypt) {
- ssl->keys.sequence_number_hi = keys->sequence_number_hi;
- ssl->keys.sequence_number_lo = keys->sequence_number_lo;
- #ifdef HAVE_AEAD
- if (ssl->specs.cipher_type == aead) {
- /* Initialize the AES-GCM/CCM explicit IV to a zero. */
- XMEMCPY(ssl->keys.aead_exp_IV, keys->aead_exp_IV,
- AEAD_MAX_EXP_SZ);
-
- /* Initialize encrypt implicit IV by encrypt side */
- if (ssl->options.side == WOLFSSL_CLIENT_END) {
- XMEMCPY(ssl->keys.aead_enc_imp_IV,
- keys->client_write_IV, AEAD_MAX_IMP_SZ);
- } else {
- XMEMCPY(ssl->keys.aead_enc_imp_IV,
- keys->server_write_IV, AEAD_MAX_IMP_SZ);
- }
- }
- #endif
- }
- if (wc_decrypt) {
- ssl->keys.peer_sequence_number_hi = keys->peer_sequence_number_hi;
- ssl->keys.peer_sequence_number_lo = keys->peer_sequence_number_lo;
- #ifdef HAVE_AEAD
- if (ssl->specs.cipher_type == aead) {
- /* Initialize decrypt implicit IV by decrypt side */
- if (ssl->options.side == WOLFSSL_SERVER_END) {
- XMEMCPY(ssl->keys.aead_dec_imp_IV,
- keys->client_write_IV, AEAD_MAX_IMP_SZ);
- } else {
- XMEMCPY(ssl->keys.aead_dec_imp_IV,
- keys->server_write_IV, AEAD_MAX_IMP_SZ);
- }
- }
- #endif
- }
- CacheStatusPP(ssl->secure_renegotiation);
- }
-#endif /* HAVE_SECURE_RENEGOTIATION */
-
- return ret;
-}
-
-
-/* TLS can call too */
-int StoreKeys(WOLFSSL* ssl, const byte* keyData, int side)
-{
- int sz, i = 0;
- Keys* keys = &ssl->keys;
-#ifdef WOLFSSL_DTLS
- /* In case of DTLS, ssl->keys is updated here */
- int scr_copy = 0;
-#endif
-
-#ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation &&
- ssl->secure_renegotiation->cache_status == SCR_CACHE_NEEDED) {
- keys = &ssl->secure_renegotiation->tmp_keys;
-#ifdef WOLFSSL_DTLS
- if (ssl->options.dtls) {
- /* epoch is incremented after StoreKeys is called */
- ssl->secure_renegotiation->tmp_keys.dtls_epoch = ssl->keys.dtls_epoch + 1;
- /* we only need to copy keys on second and future renegotiations */
- if (ssl->keys.dtls_epoch > 1)
- scr_copy = 1;
- ssl->encrypt.src = KEYS_NOT_SET;
- ssl->decrypt.src = KEYS_NOT_SET;
- }
-#endif
- CacheStatusPP(ssl->secure_renegotiation);
- }
-#endif /* HAVE_SECURE_RENEGOTIATION */
-
-#ifdef WOLFSSL_MULTICAST
- if (ssl->options.haveMcast) {
- /* Use the same keys for encrypt and decrypt. */
- if (ssl->specs.cipher_type != aead) {
- sz = ssl->specs.hash_size;
- #ifndef WOLFSSL_AEAD_ONLY
-
- #ifdef WOLFSSL_DTLS
- if (scr_copy) {
- XMEMCPY(ssl->keys.client_write_MAC_secret,
- keys->client_write_MAC_secret, sz);
- XMEMCPY(ssl->keys.server_write_MAC_secret,
- keys->server_write_MAC_secret, sz);
- }
- #endif
- XMEMCPY(keys->client_write_MAC_secret,&keyData[i], sz);
- XMEMCPY(keys->server_write_MAC_secret,&keyData[i], sz);
- #endif
- i += sz;
- }
- sz = ssl->specs.key_size;
- #ifdef WOLFSSL_DTLS
- if (scr_copy) {
- XMEMCPY(ssl->keys.client_write_key,
- keys->client_write_key, sz);
- XMEMCPY(ssl->keys.server_write_key,
- keys->server_write_key, sz);
- }
- #endif
- XMEMCPY(keys->client_write_key, &keyData[i], sz);
- XMEMCPY(keys->server_write_key, &keyData[i], sz);
- i += sz;
-
- sz = ssl->specs.iv_size;
- #ifdef WOLFSSL_DTLS
- if (scr_copy) {
- XMEMCPY(ssl->keys.client_write_IV,
- keys->client_write_IV, sz);
- XMEMCPY(ssl->keys.server_write_IV,
- keys->server_write_IV, sz);
- }
- #endif
- XMEMCPY(keys->client_write_IV, &keyData[i], sz);
- XMEMCPY(keys->server_write_IV, &keyData[i], sz);
-
-#ifdef HAVE_AEAD
- if (ssl->specs.cipher_type == aead) {
- /* Initialize the AES-GCM/CCM explicit IV to a zero. */
- #ifdef WOLFSSL_DTLS
- if (scr_copy) {
- XMEMCPY(ssl->keys.aead_exp_IV,
- keys->aead_exp_IV, AEAD_MAX_EXP_SZ);
- }
- #endif
- XMEMSET(keys->aead_exp_IV, 0, AEAD_MAX_EXP_SZ);
- }
-#endif /* HAVE_AEAD */
-
- return 0;
- }
-#endif /* WOLFSSL_MULTICAST */
-
- if (ssl->specs.cipher_type != aead) {
- sz = ssl->specs.hash_size;
- if (side & PROVISION_CLIENT) {
- #ifndef WOLFSSL_AEAD_ONLY
- #ifdef WOLFSSL_DTLS
- if (scr_copy)
- XMEMCPY(ssl->keys.client_write_MAC_secret,
- keys->client_write_MAC_secret, sz);
- #endif
- XMEMCPY(keys->client_write_MAC_secret,&keyData[i], sz);
- #endif
- i += sz;
- }
- if (side & PROVISION_SERVER) {
- #ifndef WOLFSSL_AEAD_ONLY
- #ifdef WOLFSSL_DTLS
- if (scr_copy)
- XMEMCPY(ssl->keys.server_write_MAC_secret,
- keys->server_write_MAC_secret, sz);
- #endif
- XMEMCPY(keys->server_write_MAC_secret,&keyData[i], sz);
- #endif
- i += sz;
- }
- }
- sz = ssl->specs.key_size;
- if (side & PROVISION_CLIENT) {
- #ifdef WOLFSSL_DTLS
- if (scr_copy)
- XMEMCPY(ssl->keys.client_write_key,
- keys->client_write_key, sz);
- #endif
- XMEMCPY(keys->client_write_key, &keyData[i], sz);
- i += sz;
- }
- if (side & PROVISION_SERVER) {
- #ifdef WOLFSSL_DTLS
- if (scr_copy)
- XMEMCPY(ssl->keys.server_write_key,
- keys->server_write_key, sz);
- #endif
- XMEMCPY(keys->server_write_key, &keyData[i], sz);
- i += sz;
- }
-
- sz = ssl->specs.iv_size;
- if (side & PROVISION_CLIENT) {
- #ifdef WOLFSSL_DTLS
- if (scr_copy)
- XMEMCPY(ssl->keys.client_write_IV,
- keys->client_write_IV, sz);
- #endif
- XMEMCPY(keys->client_write_IV, &keyData[i], sz);
- i += sz;
- }
- if (side & PROVISION_SERVER) {
- #ifdef WOLFSSL_DTLS
- if (scr_copy)
- XMEMCPY(ssl->keys.server_write_IV,
- keys->server_write_IV, sz);
- #endif
- XMEMCPY(keys->server_write_IV, &keyData[i], sz);
- }
-
-#ifdef HAVE_AEAD
- if (ssl->specs.cipher_type == aead) {
- /* Initialize the AES-GCM/CCM explicit IV to a zero. */
- #ifdef WOLFSSL_DTLS
- if (scr_copy)
- XMEMMOVE(ssl->keys.aead_exp_IV,
- keys->aead_exp_IV, AEAD_MAX_EXP_SZ);
- #endif
- XMEMSET(keys->aead_exp_IV, 0, AEAD_MAX_EXP_SZ);
- }
-#endif
-
- return 0;
-}
-
-#ifndef NO_OLD_TLS
-int DeriveKeys(WOLFSSL* ssl)
-{
- int length = 2 * ssl->specs.hash_size +
- 2 * ssl->specs.key_size +
- 2 * ssl->specs.iv_size;
- int rounds = (length + WC_MD5_DIGEST_SIZE - 1 ) / WC_MD5_DIGEST_SIZE, i;
- int ret = 0;
-
-#ifdef WOLFSSL_SMALL_STACK
- byte* shaOutput;
- byte* md5Input;
- byte* shaInput;
- byte* keyData;
- wc_Md5* md5;
- wc_Sha* sha;
-#else
- byte shaOutput[WC_SHA_DIGEST_SIZE];
- byte md5Input[SECRET_LEN + WC_SHA_DIGEST_SIZE];
- byte shaInput[KEY_PREFIX + SECRET_LEN + 2 * RAN_LEN];
- byte keyData[KEY_PREFIX * WC_MD5_DIGEST_SIZE];
- wc_Md5 md5[1];
- wc_Sha sha[1];
-#endif
-
-#ifdef WOLFSSL_SMALL_STACK
- shaOutput = (byte*)XMALLOC(WC_SHA_DIGEST_SIZE,
- NULL, DYNAMIC_TYPE_TMP_BUFFER);
- md5Input = (byte*)XMALLOC(SECRET_LEN + WC_SHA_DIGEST_SIZE,
- NULL, DYNAMIC_TYPE_TMP_BUFFER);
- shaInput = (byte*)XMALLOC(KEY_PREFIX + SECRET_LEN + 2 * RAN_LEN,
- NULL, DYNAMIC_TYPE_TMP_BUFFER);
- keyData = (byte*)XMALLOC(KEY_PREFIX * WC_MD5_DIGEST_SIZE,
- NULL, DYNAMIC_TYPE_TMP_BUFFER);
- md5 = (wc_Md5*)XMALLOC(sizeof(wc_Md5), NULL, DYNAMIC_TYPE_TMP_BUFFER);
- sha = (wc_Sha*)XMALLOC(sizeof(wc_Sha), NULL, DYNAMIC_TYPE_TMP_BUFFER);
-
- if (shaOutput == NULL || md5Input == NULL || shaInput == NULL ||
- keyData == NULL || md5 == NULL || sha == NULL) {
- if (shaOutput) XFREE(shaOutput, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (md5Input) XFREE(md5Input, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (shaInput) XFREE(shaInput, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (keyData) XFREE(keyData, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (md5) XFREE(md5, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (sha) XFREE(sha, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-
- return MEMORY_E;
- }
-#endif
- XMEMSET(shaOutput, 0, WC_SHA_DIGEST_SIZE);
- ret = wc_InitMd5(md5);
- if (ret == 0) {
- ret = wc_InitSha(sha);
- }
- if (ret == 0) {
- XMEMCPY(md5Input, ssl->arrays->masterSecret, SECRET_LEN);
-
- for (i = 0; i < rounds; ++i) {
- int j = i + 1;
- int idx = j;
-
- if (!SetPrefix(shaInput, i)) {
- ret = PREFIX_ERROR;
- break;
- }
-
- XMEMCPY(shaInput + idx, ssl->arrays->masterSecret, SECRET_LEN);
- idx += SECRET_LEN;
- XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN);
- idx += RAN_LEN;
- XMEMCPY(shaInput + idx, ssl->arrays->clientRandom, RAN_LEN);
- if (ret == 0) {
- ret = wc_ShaUpdate(sha, shaInput,
- (KEY_PREFIX + SECRET_LEN + 2 * RAN_LEN) - KEY_PREFIX + j);
- }
- if (ret == 0) {
- ret = wc_ShaFinal(sha, shaOutput);
- }
-
- XMEMCPY(md5Input + SECRET_LEN, shaOutput, WC_SHA_DIGEST_SIZE);
- if (ret == 0) {
- ret = wc_Md5Update(md5, md5Input, SECRET_LEN + WC_SHA_DIGEST_SIZE);
- }
- if (ret == 0) {
- ret = wc_Md5Final(md5, keyData + i * WC_MD5_DIGEST_SIZE);
- }
- }
-
- if (ret == 0)
- ret = StoreKeys(ssl, keyData, PROVISION_CLIENT_SERVER);
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(shaOutput, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(md5Input, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(shaInput, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(keyData, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(md5, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(sha, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
-
- return ret;
-}
-
-
-static int CleanPreMaster(WOLFSSL* ssl)
-{
- int i, ret, sz = ssl->arrays->preMasterSz;
-
- for (i = 0; i < sz; i++)
- ssl->arrays->preMasterSecret[i] = 0;
-
- ret = wc_RNG_GenerateBlock(ssl->rng, ssl->arrays->preMasterSecret, sz);
- if (ret != 0)
- return ret;
-
- for (i = 0; i < sz; i++)
- ssl->arrays->preMasterSecret[i] = 0;
-
- XFREE(ssl->arrays->preMasterSecret, ssl->heap, DYNAMIC_TYPE_SECRET);
- ssl->arrays->preMasterSecret = NULL;
- ssl->arrays->preMasterSz = 0;
-
- return 0;
-}
-
-
-/* Create and store the master secret see page 32, 6.1 */
-static int MakeSslMasterSecret(WOLFSSL* ssl)
-{
- int i, ret;
- word32 idx;
- word32 pmsSz = ssl->arrays->preMasterSz;
-
-#ifdef WOLFSSL_SMALL_STACK
- byte* shaOutput;
- byte* md5Input;
- byte* shaInput;
- wc_Md5* md5;
- wc_Sha* sha;
-#else
- byte shaOutput[WC_SHA_DIGEST_SIZE];
- byte md5Input[ENCRYPT_LEN + WC_SHA_DIGEST_SIZE];
- byte shaInput[PREFIX + ENCRYPT_LEN + 2 * RAN_LEN];
- wc_Md5 md5[1];
- wc_Sha sha[1];
-#endif
-
-#ifdef SHOW_SECRETS
- {
- word32 j;
- printf("pre master secret: ");
- for (j = 0; j < pmsSz; j++)
- printf("%02x", ssl->arrays->preMasterSecret[j]);
- printf("\n");
- }
-#endif
-
-#ifdef WOLFSSL_SMALL_STACK
- shaOutput = (byte*)XMALLOC(WC_SHA_DIGEST_SIZE,
- NULL, DYNAMIC_TYPE_TMP_BUFFER);
- md5Input = (byte*)XMALLOC(ENCRYPT_LEN + WC_SHA_DIGEST_SIZE,
- NULL, DYNAMIC_TYPE_TMP_BUFFER);
- shaInput = (byte*)XMALLOC(PREFIX + ENCRYPT_LEN + 2 * RAN_LEN,
- NULL, DYNAMIC_TYPE_TMP_BUFFER);
- md5 = (wc_Md5*)XMALLOC(sizeof(wc_Md5), NULL, DYNAMIC_TYPE_TMP_BUFFER);
- sha = (wc_Sha*)XMALLOC(sizeof(wc_Sha), NULL, DYNAMIC_TYPE_TMP_BUFFER);
-
- if (shaOutput == NULL || md5Input == NULL || shaInput == NULL ||
- md5 == NULL || sha == NULL) {
- if (shaOutput) XFREE(shaOutput, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (md5Input) XFREE(md5Input, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (shaInput) XFREE(shaInput, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (md5) XFREE(md5, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (sha) XFREE(sha, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-
- return MEMORY_E;
- }
-#endif
- XMEMSET(shaOutput, 0, WC_SHA_DIGEST_SIZE);
-
- ret = wc_InitMd5(md5);
- if (ret == 0) {
- ret = wc_InitSha(sha);
- }
- if (ret == 0) {
- XMEMCPY(md5Input, ssl->arrays->preMasterSecret, pmsSz);
-
- for (i = 0; i < MASTER_ROUNDS; ++i) {
- byte prefix[KEY_PREFIX]; /* only need PREFIX bytes but static */
- if (!SetPrefix(prefix, i)) { /* analysis thinks will overrun */
- ret = PREFIX_ERROR;
- break;
- }
-
- idx = 0;
- XMEMCPY(shaInput, prefix, i + 1);
- idx += i + 1;
-
- XMEMCPY(shaInput + idx, ssl->arrays->preMasterSecret, pmsSz);
- idx += pmsSz;
- XMEMCPY(shaInput + idx, ssl->arrays->clientRandom, RAN_LEN);
- idx += RAN_LEN;
- XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN);
- idx += RAN_LEN;
- if (ret == 0) {
- ret = wc_ShaUpdate(sha, shaInput, idx);
- }
- if (ret == 0) {
- ret = wc_ShaFinal(sha, shaOutput);
- }
- idx = pmsSz; /* preSz */
- XMEMCPY(md5Input + idx, shaOutput, WC_SHA_DIGEST_SIZE);
- idx += WC_SHA_DIGEST_SIZE;
- if (ret == 0) {
- ret = wc_Md5Update(md5, md5Input, idx);
- }
- if (ret == 0) {
- ret = wc_Md5Final(md5,
- &ssl->arrays->masterSecret[i * WC_MD5_DIGEST_SIZE]);
- }
- }
-
-#ifdef SHOW_SECRETS
- {
- word32 j;
- printf("master secret: ");
- for (j = 0; j < SECRET_LEN; j++)
- printf("%02x", ssl->arrays->masterSecret[j]);
- printf("\n");
- }
-#endif
-
- if (ret == 0)
- ret = DeriveKeys(ssl);
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(shaOutput, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(md5Input, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(shaInput, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(md5, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(sha, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
-
- if (ret == 0)
- ret = CleanPreMaster(ssl);
- else
- CleanPreMaster(ssl);
-
- return ret;
-}
-#endif
-
-
-/* Master wrapper, doesn't use SSL stack space in TLS mode */
-int MakeMasterSecret(WOLFSSL* ssl)
-{
- /* append secret to premaster : premaster | SerSi | CliSi */
-#ifdef HAVE_QSH
- word32 offset = 0;
-
- if (ssl->peerQSHKeyPresent) {
- offset += ssl->arrays->preMasterSz;
- ssl->arrays->preMasterSz += ssl->QSH_secret->CliSi->length +
- ssl->QSH_secret->SerSi->length;
- /* test and set flag if QSH has been used */
- if (ssl->QSH_secret->CliSi->length > 0 ||
- ssl->QSH_secret->SerSi->length > 0)
- ssl->isQSH = 1;
-
- /* append secrets to the premaster */
- if (ssl->QSH_secret->SerSi != NULL) {
- XMEMCPY(ssl->arrays->preMasterSecret + offset,
- ssl->QSH_secret->SerSi->buffer, ssl->QSH_secret->SerSi->length);
- }
- offset += ssl->QSH_secret->SerSi->length;
- if (ssl->QSH_secret->CliSi != NULL) {
- XMEMCPY(ssl->arrays->preMasterSecret + offset,
- ssl->QSH_secret->CliSi->buffer, ssl->QSH_secret->CliSi->length);
- }
-
- /* show secret SerSi and CliSi */
- #ifdef SHOW_SECRETS
- {
- word32 j;
- printf("QSH generated secret material\n");
- printf("SerSi : ");
- for (j = 0; j < ssl->QSH_secret->SerSi->length; j++) {
- printf("%02x", ssl->QSH_secret->SerSi->buffer[j]);
- }
- printf("\n");
- printf("CliSi : ");
- for (j = 0; j < ssl->QSH_secret->CliSi->length; j++) {
- printf("%02x", ssl->QSH_secret->CliSi->buffer[j]);
- }
- printf("\n");
- }
- #endif
- }
-#endif
-
-#ifndef NO_OLD_TLS
- if (ssl->options.tls) return MakeTlsMasterSecret(ssl);
- return MakeSslMasterSecret(ssl);
-#elif !defined(WOLFSSL_NO_TLS12)
- return MakeTlsMasterSecret(ssl);
-#else
- (void)ssl;
- return 0;
-#endif
-}
-
-#endif /* WOLFCRYPT_ONLY */
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/libwolfssl.la b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/libwolfssl.la
deleted file mode 100644
index b01a42d52e..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/libwolfssl.la
+++ /dev/null
@@ -1,41 +0,0 @@
-# libwolfssl.la - a libtool library file
-# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='libwolfssl.so.24'
-
-# Names of this library.
-library_names='libwolfssl.so.24.1.0 libwolfssl.so.24 libwolfssl.so'
-
-# The name of the static archive.
-old_library=''
-
-# Linker flags that cannot go in dependency_libs.
-inherited_linker_flags=' -pthread'
-
-# Libraries that this one depends upon.
-dependency_libs=' -lm'
-
-# Names of additional weak libraries provided by this library
-weak_library_names=''
-
-# Version information for libwolfssl.
-current=25
-age=1
-revision=0
-
-# Is this an already installed library?
-installed=no
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=no
-
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
-
-# Directory that this library needs to be installed in:
-libdir='/usr/local/lib'
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/ocsp.c b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/ocsp.c
deleted file mode 100644
index 7ea83046a6..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/ocsp.c
+++ /dev/null
@@ -1,1100 +0,0 @@
-/* ocsp.c
- *
- * Copyright (C) 2006-2020 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * wolfSSL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
- */
-
-
- /* Name change compatibility layer no longer needs to be included here */
-
-#ifdef HAVE_CONFIG_H
- #include
-#endif
-
-#include
-
-#ifndef WOLFCRYPT_ONLY
-#ifdef HAVE_OCSP
-
-#include
-#include
-#include
-
-#ifdef NO_INLINE
- #include
-#else
- #define WOLFSSL_MISC_INCLUDED
- #include
-#endif
-
-
-int InitOCSP(WOLFSSL_OCSP* ocsp, WOLFSSL_CERT_MANAGER* cm)
-{
- WOLFSSL_ENTER("InitOCSP");
-
- ForceZero(ocsp, sizeof(WOLFSSL_OCSP));
-
- if (wc_InitMutex(&ocsp->ocspLock) != 0)
- return BAD_MUTEX_E;
-
- ocsp->cm = cm;
-
- return 0;
-}
-
-
-static int InitOcspEntry(OcspEntry* entry, OcspRequest* request)
-{
- WOLFSSL_ENTER("InitOcspEntry");
-
- ForceZero(entry, sizeof(OcspEntry));
-
- XMEMCPY(entry->issuerHash, request->issuerHash, OCSP_DIGEST_SIZE);
- XMEMCPY(entry->issuerKeyHash, request->issuerKeyHash, OCSP_DIGEST_SIZE);
-
- return 0;
-}
-
-
-static void FreeOcspEntry(OcspEntry* entry, void* heap)
-{
- CertStatus *status, *next;
-
- WOLFSSL_ENTER("FreeOcspEntry");
-
- for (status = entry->status; status; status = next) {
- next = status->next;
-
- if (status->rawOcspResponse)
- XFREE(status->rawOcspResponse, heap, DYNAMIC_TYPE_OCSP_STATUS);
-
- XFREE(status, heap, DYNAMIC_TYPE_OCSP_STATUS);
- }
-
- (void)heap;
-}
-
-
-void FreeOCSP(WOLFSSL_OCSP* ocsp, int dynamic)
-{
- OcspEntry *entry, *next;
-
- WOLFSSL_ENTER("FreeOCSP");
-
- for (entry = ocsp->ocspList; entry; entry = next) {
- next = entry->next;
- FreeOcspEntry(entry, ocsp->cm->heap);
- XFREE(entry, ocsp->cm->heap, DYNAMIC_TYPE_OCSP_ENTRY);
- }
-
- wc_FreeMutex(&ocsp->ocspLock);
-
- if (dynamic)
- XFREE(ocsp, ocsp->cm->heap, DYNAMIC_TYPE_OCSP);
-
-}
-
-
-static int xstat2err(int st)
-{
- switch (st) {
- case CERT_GOOD:
- return 0;
- case CERT_REVOKED:
- return OCSP_CERT_REVOKED;
- default:
- return OCSP_CERT_UNKNOWN;
- }
-}
-
-int CheckCertOCSP_ex(WOLFSSL_OCSP* ocsp, DecodedCert* cert, buffer* responseBuffer, WOLFSSL* ssl)
-{
- int ret = OCSP_LOOKUP_FAIL;
-
-#ifdef WOLFSSL_SMALL_STACK
- OcspRequest* ocspRequest;
-#else
- OcspRequest ocspRequest[1];
-#endif
-
- WOLFSSL_ENTER("CheckCertOCSP");
-
-
-#ifdef WOLFSSL_SMALL_STACK
- ocspRequest = (OcspRequest*)XMALLOC(sizeof(OcspRequest), NULL,
- DYNAMIC_TYPE_TMP_BUFFER);
- if (ocspRequest == NULL) {
- WOLFSSL_LEAVE("CheckCertOCSP", MEMORY_ERROR);
- return MEMORY_E;
- }
-#endif
-
- if (InitOcspRequest(ocspRequest, cert, ocsp->cm->ocspSendNonce,
- ocsp->cm->heap) == 0) {
- ocspRequest->ssl = ssl;
- ret = CheckOcspRequest(ocsp, ocspRequest, responseBuffer);
-
- FreeOcspRequest(ocspRequest);
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(ocspRequest, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
-
- WOLFSSL_LEAVE("CheckCertOCSP", ret);
- return ret;
-}
-int CheckCertOCSP(WOLFSSL_OCSP* ocsp, DecodedCert* cert, buffer* responseBuffer)
-{
- return CheckCertOCSP_ex(ocsp, cert, responseBuffer, NULL);
-}
-
-static int GetOcspEntry(WOLFSSL_OCSP* ocsp, OcspRequest* request,
- OcspEntry** entry)
-{
- WOLFSSL_ENTER("GetOcspEntry");
-
- *entry = NULL;
-
- if (wc_LockMutex(&ocsp->ocspLock) != 0) {
- WOLFSSL_LEAVE("CheckCertOCSP", BAD_MUTEX_E);
- return BAD_MUTEX_E;
- }
-
- for (*entry = ocsp->ocspList; *entry; *entry = (*entry)->next)
- if (XMEMCMP((*entry)->issuerHash, request->issuerHash,
- OCSP_DIGEST_SIZE) == 0
- && XMEMCMP((*entry)->issuerKeyHash, request->issuerKeyHash,
- OCSP_DIGEST_SIZE) == 0)
- break;
-
- if (*entry == NULL) {
- *entry = (OcspEntry*)XMALLOC(sizeof(OcspEntry),
- ocsp->cm->heap, DYNAMIC_TYPE_OCSP_ENTRY);
- if (*entry) {
- InitOcspEntry(*entry, request);
- (*entry)->next = ocsp->ocspList;
- ocsp->ocspList = *entry;
- }
- }
-
- wc_UnLockMutex(&ocsp->ocspLock);
-
- return *entry ? 0 : MEMORY_ERROR;
-}
-
-
-/* Mallocs responseBuffer->buffer and is up to caller to free on success
- *
- * Returns OCSP status
- */
-static int GetOcspStatus(WOLFSSL_OCSP* ocsp, OcspRequest* request,
- OcspEntry* entry, CertStatus** status, buffer* responseBuffer)
-{
- int ret = OCSP_INVALID_STATUS;
-
- WOLFSSL_ENTER("GetOcspStatus");
-
- *status = NULL;
-
- if (wc_LockMutex(&ocsp->ocspLock) != 0) {
- WOLFSSL_LEAVE("CheckCertOCSP", BAD_MUTEX_E);
- return BAD_MUTEX_E;
- }
-
- for (*status = entry->status; *status; *status = (*status)->next)
- if ((*status)->serialSz == request->serialSz
- && !XMEMCMP((*status)->serial, request->serial, (*status)->serialSz))
- break;
-
- if (responseBuffer && *status && !(*status)->rawOcspResponse) {
- /* force fetching again */
- ret = OCSP_INVALID_STATUS;
- }
- else if (*status) {
-#ifndef NO_ASN_TIME
- if (XVALIDATE_DATE((*status)->thisDate,
- (*status)->thisDateFormat, BEFORE)
- && ((*status)->nextDate[0] != 0)
- && XVALIDATE_DATE((*status)->nextDate,
- (*status)->nextDateFormat, AFTER))
-#endif
- {
- ret = xstat2err((*status)->status);
-
- if (responseBuffer) {
- responseBuffer->buffer = (byte*)XMALLOC(
- (*status)->rawOcspResponseSz, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-
- if (responseBuffer->buffer) {
- responseBuffer->length = (*status)->rawOcspResponseSz;
- XMEMCPY(responseBuffer->buffer,
- (*status)->rawOcspResponse,
- (*status)->rawOcspResponseSz);
- }
- }
- }
- }
-
- wc_UnLockMutex(&ocsp->ocspLock);
-
- return ret;
-}
-
-/* Check that the response for validity. Store result in status.
- *
- * ocsp Context object for OCSP status.
- * response OCSP response message data.
- * responseSz Length of OCSP response message data.
- * reponseBuffer Buffer object to return the response with.
- * status The certificate status object.
- * entry The OCSP entry for this certificate.
- * returns OCSP_LOOKUP_FAIL when the response is bad and 0 otherwise.
- */
-WOLFSSL_LOCAL int CheckOcspResponse(WOLFSSL_OCSP *ocsp, byte *response, int responseSz,
- WOLFSSL_BUFFER_INFO *responseBuffer, CertStatus *status,
- OcspEntry *entry, OcspRequest *ocspRequest)
-{
-#ifdef WOLFSSL_SMALL_STACK
- CertStatus* newStatus;
- OcspResponse* ocspResponse;
-#else
- CertStatus newStatus[1];
- OcspResponse ocspResponse[1];
-#endif
- int ret;
- int validated = 0; /* ocsp validation flag */
-
-#ifdef WOLFSSL_SMALL_STACK
- newStatus = (CertStatus*)XMALLOC(sizeof(CertStatus), NULL,
- DYNAMIC_TYPE_TMP_BUFFER);
- ocspResponse = (OcspResponse*)XMALLOC(sizeof(OcspResponse), NULL,
- DYNAMIC_TYPE_TMP_BUFFER);
-
- if (newStatus == NULL || ocspResponse == NULL) {
- if (newStatus) XFREE(newStatus, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (ocspResponse) XFREE(ocspResponse, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-
- WOLFSSL_LEAVE("CheckCertOCSP", MEMORY_ERROR);
- return MEMORY_E;
- }
-#endif
- XMEMSET(newStatus, 0, sizeof(CertStatus));
-
- InitOcspResponse(ocspResponse, newStatus, response, responseSz);
- ret = OcspResponseDecode(ocspResponse, ocsp->cm, ocsp->cm->heap, 0);
- if (ret != 0) {
- ocsp->error = ret;
- WOLFSSL_LEAVE("OcspResponseDecode failed", ocsp->error);
- goto end;
- }
-
- if (ocspResponse->responseStatus != OCSP_SUCCESSFUL) {
- WOLFSSL_MSG("OcspResponse status bad");
- goto end;
- }
- if (ocspRequest != NULL) {
- ret = CompareOcspReqResp(ocspRequest, ocspResponse);
- if (ret != 0) {
- goto end;
- }
- }
-
- if (responseBuffer) {
- responseBuffer->buffer = (byte*)XMALLOC(responseSz, ocsp->cm->heap,
- DYNAMIC_TYPE_TMP_BUFFER);
-
- if (responseBuffer->buffer) {
- responseBuffer->length = responseSz;
- XMEMCPY(responseBuffer->buffer, response, responseSz);
- }
- }
-
- ret = xstat2err(ocspResponse->status->status);
- if (ret == 0) {
- validated = 1;
- }
-
- if (wc_LockMutex(&ocsp->ocspLock) != 0) {
- ret = BAD_MUTEX_E;
- goto end;
- }
-
- if (status != NULL) {
- if (status->rawOcspResponse) {
- XFREE(status->rawOcspResponse, ocsp->cm->heap,
- DYNAMIC_TYPE_OCSP_STATUS);
- }
-
- /* Replace existing certificate entry with updated */
- newStatus->next = status->next;
- XMEMCPY(status, newStatus, sizeof(CertStatus));
- }
- else {
- /* Save new certificate entry */
- status = (CertStatus*)XMALLOC(sizeof(CertStatus),
- ocsp->cm->heap, DYNAMIC_TYPE_OCSP_STATUS);
- if (status != NULL) {
- XMEMCPY(status, newStatus, sizeof(CertStatus));
- status->next = entry->status;
- entry->status = status;
- entry->totalStatus++;
- }
- }
-
- if (status && responseBuffer && responseBuffer->buffer) {
- status->rawOcspResponse = (byte*)XMALLOC(responseBuffer->length,
- ocsp->cm->heap,
- DYNAMIC_TYPE_OCSP_STATUS);
-
- if (status->rawOcspResponse) {
- status->rawOcspResponseSz = responseBuffer->length;
- XMEMCPY(status->rawOcspResponse, responseBuffer->buffer,
- responseBuffer->length);
- }
- }
-
- wc_UnLockMutex(&ocsp->ocspLock);
-
-end:
- if (ret == 0 && validated == 1) {
- WOLFSSL_MSG("New OcspResponse validated");
- } else if (ret != OCSP_CERT_REVOKED) {
- ret = OCSP_LOOKUP_FAIL;
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(newStatus, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(ocspResponse, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
- return ret;
-}
-
-/* 0 on success */
-int CheckOcspRequest(WOLFSSL_OCSP* ocsp, OcspRequest* ocspRequest,
- buffer* responseBuffer)
-{
- OcspEntry* entry = NULL;
- CertStatus* status = NULL;
- byte* request = NULL;
- int requestSz = 2048;
- int responseSz = 0;
- byte* response = NULL;
- const char* url = NULL;
- int urlSz = 0;
- int ret = -1;
- WOLFSSL* ssl;
- void* ioCtx;
-
- WOLFSSL_ENTER("CheckOcspRequest");
-
- if (ocsp == NULL || ocspRequest == NULL)
- return BAD_FUNC_ARG;
-
- if (responseBuffer) {
- responseBuffer->buffer = NULL;
- responseBuffer->length = 0;
- }
-
- ret = GetOcspEntry(ocsp, ocspRequest, &entry);
- if (ret != 0)
- return ret;
-
- ret = GetOcspStatus(ocsp, ocspRequest, entry, &status, responseBuffer);
- if (ret != OCSP_INVALID_STATUS)
- return ret;
-
- /* get SSL and IOCtx */
- ssl = (WOLFSSL*)ocspRequest->ssl;
- ioCtx = (ssl && ssl->ocspIOCtx != NULL) ?
- ssl->ocspIOCtx : ocsp->cm->ocspIOCtx;
-
-#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
- if (ocsp->statusCb != NULL && ssl != NULL) {
- ret = ocsp->statusCb(ssl, ioCtx);
- if (ret == 0) {
- ret = wolfSSL_get_ocsp_response(ssl, &response);
- ret = CheckOcspResponse(ocsp, response, ret, responseBuffer, status,
- entry, NULL);
- if (response != NULL)
- XFREE(response, NULL, DYNAMIC_TYPE_OPENSSL);
- return ret;
- }
- WOLFSSL_LEAVE("CheckOcspRequest", ocsp->error);
- return OCSP_LOOKUP_FAIL;
- }
-#endif
-
- if (ocsp->cm->ocspUseOverrideURL) {
- url = ocsp->cm->ocspOverrideURL;
- if (url != NULL && url[0] != '\0')
- urlSz = (int)XSTRLEN(url);
- else
- return OCSP_NEED_URL;
- }
- else if (ocspRequest->urlSz != 0 && ocspRequest->url != NULL) {
- url = (const char *)ocspRequest->url;
- urlSz = ocspRequest->urlSz;
- }
- else {
- /* cert doesn't have extAuthInfo, assuming CERT_GOOD */
- return 0;
- }
-
- request = (byte*)XMALLOC(requestSz, ocsp->cm->heap, DYNAMIC_TYPE_OCSP);
- if (request == NULL) {
- WOLFSSL_LEAVE("CheckCertOCSP", MEMORY_ERROR);
- if (responseBuffer) {
- XFREE(responseBuffer->buffer, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- responseBuffer->buffer = NULL;
- }
- return MEMORY_ERROR;
- }
-
- requestSz = EncodeOcspRequest(ocspRequest, request, requestSz);
- if (requestSz > 0 && ocsp->cm->ocspIOCb) {
- responseSz = ocsp->cm->ocspIOCb(ioCtx, url, urlSz,
- request, requestSz, &response);
- }
- if (responseSz == WOLFSSL_CBIO_ERR_WANT_READ) {
- ret = OCSP_WANT_READ;
- }
-
- XFREE(request, ocsp->cm->heap, DYNAMIC_TYPE_OCSP);
-
- if (responseSz >= 0 && response) {
- ret = CheckOcspResponse(ocsp, response, responseSz, responseBuffer, status,
- entry, ocspRequest);
- }
-
- if (response != NULL && ocsp->cm->ocspRespFreeCb)
- ocsp->cm->ocspRespFreeCb(ioCtx, response);
-
- /* Keep responseBuffer in the case of getting to response check. Caller
- * should free responseBuffer after checking OCSP return value in "ret" */
- WOLFSSL_LEAVE("CheckOcspRequest", ret);
- return ret;
-}
-
-#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) || \
- defined(WOLFSSL_APACHE_HTTPD)
-
-int wolfSSL_OCSP_resp_find_status(WOLFSSL_OCSP_BASICRESP *bs,
- WOLFSSL_OCSP_CERTID* id, int* status, int* reason,
- WOLFSSL_ASN1_TIME** revtime, WOLFSSL_ASN1_TIME** thisupd,
- WOLFSSL_ASN1_TIME** nextupd)
-{
- if (bs == NULL || id == NULL)
- return WOLFSSL_FAILURE;
-
- /* Only supporting one certificate status in asn.c. */
- if (CompareOcspReqResp(id, bs) != 0)
- return WOLFSSL_FAILURE;
-
- if (status != NULL)
- *status = bs->status->status;
- if (thisupd != NULL)
- *thisupd = &bs->status->thisDateParsed;
- if (nextupd != NULL)
- *nextupd = &bs->status->nextDateParsed;
-
- /* TODO: Not needed for Nginx. */
- if (reason != NULL)
- *reason = 0;
- if (revtime != NULL)
- *revtime = NULL;
-
- return WOLFSSL_SUCCESS;
-}
-
-const char *wolfSSL_OCSP_cert_status_str(long s)
-{
- switch (s) {
- case CERT_GOOD:
- return "good";
- case CERT_REVOKED:
- return "revoked";
- case CERT_UNKNOWN:
- return "unknown";
- default:
- return "(UNKNOWN)";
- }
-}
-
-int wolfSSL_OCSP_check_validity(WOLFSSL_ASN1_TIME* thisupd,
- WOLFSSL_ASN1_TIME* nextupd, long sec, long maxsec)
-{
- (void)thisupd;
- (void)nextupd;
- (void)sec;
- (void)maxsec;
- /* Dates validated in DecodeSingleResponse. */
- return WOLFSSL_SUCCESS;
-}
-
-void wolfSSL_OCSP_CERTID_free(WOLFSSL_OCSP_CERTID* certId)
-{
- FreeOcspRequest(certId);
- XFREE(certId, NULL, DYNAMIC_TYPE_OPENSSL);
-}
-
-WOLFSSL_OCSP_CERTID* wolfSSL_OCSP_cert_to_id(
- const WOLFSSL_EVP_MD *dgst, const WOLFSSL_X509 *subject,
- const WOLFSSL_X509 *issuer)
-{
- WOLFSSL_OCSP_CERTID* certId;
- DecodedCert cert;
- WOLFSSL_CERT_MANAGER* cm;
- int ret;
- DerBuffer* derCert = NULL;
-
- (void)dgst;
-
- cm = wolfSSL_CertManagerNew();
- if (cm == NULL)
- return NULL;
-
- ret = AllocDer(&derCert, issuer->derCert->length,
- issuer->derCert->type, NULL);
- if (ret == 0) {
- /* AddCA() frees the buffer. */
- XMEMCPY(derCert->buffer, issuer->derCert->buffer,
- issuer->derCert->length);
- AddCA(cm, &derCert, WOLFSSL_USER_CA, 1);
- }
-
- certId = (WOLFSSL_OCSP_CERTID*)XMALLOC(sizeof(WOLFSSL_OCSP_CERTID), NULL,
- DYNAMIC_TYPE_OPENSSL);
- if (certId != NULL) {
- InitDecodedCert(&cert, subject->derCert->buffer,
- subject->derCert->length, NULL);
- if (ParseCertRelative(&cert, CERT_TYPE, VERIFY_OCSP, cm) != 0) {
- XFREE(certId, NULL, DYNAMIC_TYPE_OPENSSL);
- certId = NULL;
- }
- else {
- ret = InitOcspRequest(certId, &cert, 0, NULL);
- if (ret != 0) {
- XFREE(certId, NULL, DYNAMIC_TYPE_OPENSSL);
- certId = NULL;
- }
- }
- FreeDecodedCert(&cert);
- }
-
- wolfSSL_CertManagerFree(cm);
-
- return certId;
-}
-
-void wolfSSL_OCSP_BASICRESP_free(WOLFSSL_OCSP_BASICRESP* basicResponse)
-{
- wolfSSL_OCSP_RESPONSE_free(basicResponse);
-}
-
-/* Signature verified in DecodeBasicOcspResponse.
- * But no store available to verify certificate. */
-int wolfSSL_OCSP_basic_verify(WOLFSSL_OCSP_BASICRESP *bs,
- WOLF_STACK_OF(WOLFSSL_X509) *certs, WOLFSSL_X509_STORE *st, unsigned long flags)
-{
- DecodedCert cert;
- int ret = WOLFSSL_SUCCESS;
-
- (void)certs;
-
- if (flags & OCSP_NOVERIFY)
- return WOLFSSL_SUCCESS;
-
-#ifdef OPENSSL_EXTRA
- if (bs->verifyError != OCSP_VERIFY_ERROR_NONE)
- return WOLFSSL_FAILURE;
-#endif
-
- InitDecodedCert(&cert, bs->cert, bs->certSz, NULL);
- if (ParseCertRelative(&cert, CERT_TYPE, VERIFY, st->cm) < 0)
- ret = WOLFSSL_FAILURE;
- FreeDecodedCert(&cert);
-
- return ret;
-}
-
-void wolfSSL_OCSP_RESPONSE_free(OcspResponse* response)
-{
- if (response->status != NULL)
- XFREE(response->status, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (response->source != NULL)
- XFREE(response->source, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(response, NULL, DYNAMIC_TYPE_OPENSSL);
-}
-
-OcspResponse* wolfSSL_d2i_OCSP_RESPONSE_bio(WOLFSSL_BIO* bio,
- OcspResponse** response)
-{
- byte* data;
- byte* p;
- int len;
- int dataAlloced = 0;
- OcspResponse* ret = NULL;
-
- if (bio == NULL)
- return NULL;
-
- if (bio->type == WOLFSSL_BIO_MEMORY) {
- len = wolfSSL_BIO_get_mem_data(bio, &data);
- if (len <= 0 || data == NULL) {
- return NULL;
- }
- }
-#ifndef NO_FILESYSTEM
- else if (bio->type == WOLFSSL_BIO_FILE) {
- long fcur;
- long flen;
-
- if (bio->ptr == NULL)
- return NULL;
-
- fcur = XFTELL((XFILE)bio->ptr);
- if (fcur < 0)
- return NULL;
- if(XFSEEK((XFILE)bio->ptr, 0, SEEK_END) != 0)
- return NULL;
- flen = XFTELL((XFILE)bio->ptr);
- if (flen < 0)
- return NULL;
- if (XFSEEK((XFILE)bio->ptr, fcur, SEEK_SET) != 0)
- return NULL;
-
- /* check calculated length */
- fcur = flen - fcur;
- if (fcur > MAX_WOLFSSL_FILE_SIZE || fcur <= 0)
- return NULL;
-
- data = (byte*)XMALLOC(fcur, 0, DYNAMIC_TYPE_TMP_BUFFER);
- if (data == NULL)
- return NULL;
- dataAlloced = 1;
-
- len = wolfSSL_BIO_read(bio, (char *)data, (int)flen);
- }
-#endif
- else
- return NULL;
-
- if (len > 0) {
- p = data;
- ret = wolfSSL_d2i_OCSP_RESPONSE(response, (const unsigned char **)&p,
- len);
- }
-
- if (dataAlloced)
- XFREE(data, 0, DYNAMIC_TYPE_TMP_BUFFER);
-
- return ret;
-}
-
-OcspResponse* wolfSSL_d2i_OCSP_RESPONSE(OcspResponse** response,
- const unsigned char** data, int len)
-{
- OcspResponse *resp = NULL;
- word32 idx = 0;
- int length = 0;
-
- if (data == NULL)
- return NULL;
-
- if (response != NULL)
- resp = *response;
- if (resp == NULL) {
- resp = (OcspResponse*)XMALLOC(sizeof(OcspResponse), NULL,
- DYNAMIC_TYPE_OPENSSL);
- if (resp == NULL)
- return NULL;
- XMEMSET(resp, 0, sizeof(OcspResponse));
- }
-
- resp->source = (byte*)XMALLOC(len, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (resp->source == NULL) {
- XFREE(resp, NULL, DYNAMIC_TYPE_OPENSSL);
- return NULL;
- }
- resp->status = (CertStatus*)XMALLOC(sizeof(CertStatus), NULL,
- DYNAMIC_TYPE_TMP_BUFFER);
- if (resp->status == NULL) {
- XFREE(resp->source, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(resp, NULL, DYNAMIC_TYPE_OPENSSL);
- return NULL;
- }
-
- XMEMCPY(resp->source, *data, len);
- resp->maxIdx = len;
-
- if (OcspResponseDecode(resp, NULL, NULL, 1) != 0) {
- wolfSSL_OCSP_RESPONSE_free(resp);
- return NULL;
- }
-
- if (GetSequence(*data, &idx, &length, len) >= 0)
- (*data) += idx + length;
-
- return resp;
-}
-
-int wolfSSL_i2d_OCSP_RESPONSE(OcspResponse* response,
- unsigned char** data)
-{
- if (data == NULL)
- return response->maxIdx;
-
- XMEMCPY(*data, response->source, response->maxIdx);
- return response->maxIdx;
-}
-
-int wolfSSL_OCSP_response_status(OcspResponse *response)
-{
- return response->responseStatus;
-}
-
-const char *wolfSSL_OCSP_response_status_str(long s)
-{
- switch (s) {
- case OCSP_SUCCESSFUL:
- return "successful";
- case OCSP_MALFORMED_REQUEST:
- return "malformedrequest";
- case OCSP_INTERNAL_ERROR:
- return "internalerror";
- case OCSP_TRY_LATER:
- return "trylater";
- case OCSP_SIG_REQUIRED:
- return "sigrequired";
- case OCSP_UNAUTHROIZED:
- return "unauthorized";
- default:
- return "(UNKNOWN)";
- }
-}
-
-WOLFSSL_OCSP_BASICRESP* wolfSSL_OCSP_response_get1_basic(OcspResponse* response)
-{
- WOLFSSL_OCSP_BASICRESP* bs;
-
- bs = (WOLFSSL_OCSP_BASICRESP*)XMALLOC(sizeof(WOLFSSL_OCSP_BASICRESP), NULL,
- DYNAMIC_TYPE_OPENSSL);
- if (bs == NULL)
- return NULL;
-
- XMEMCPY(bs, response, sizeof(OcspResponse));
- bs->status = (CertStatus*)XMALLOC(sizeof(CertStatus), NULL,
- DYNAMIC_TYPE_TMP_BUFFER);
- bs->source = (byte*)XMALLOC(bs->maxIdx, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (bs->status == NULL || bs->source == NULL) {
- if (bs->status) XFREE(bs->status, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (bs->source) XFREE(bs->source, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- wolfSSL_OCSP_RESPONSE_free(bs);
- bs = NULL;
- }
- else {
- XMEMCPY(bs->status, response->status, sizeof(CertStatus));
- XMEMCPY(bs->source, response->source, response->maxIdx);
- }
- return bs;
-}
-
-OcspRequest* wolfSSL_OCSP_REQUEST_new(void)
-{
- OcspRequest* request;
-
- request = (OcspRequest*)XMALLOC(sizeof(OcspRequest), NULL,
- DYNAMIC_TYPE_OPENSSL);
- if (request != NULL)
- XMEMSET(request, 0, sizeof(OcspRequest));
-
- return request;
-}
-
-void wolfSSL_OCSP_REQUEST_free(OcspRequest* request)
-{
- FreeOcspRequest(request);
- XFREE(request, NULL, DYNAMIC_TYPE_OPENSSL);
-}
-
-int wolfSSL_i2d_OCSP_REQUEST(OcspRequest* request, unsigned char** data)
-{
- int size;
-
- size = EncodeOcspRequest(request, NULL, 0);
- if (size <= 0 || data == NULL)
- return size;
-
- return EncodeOcspRequest(request, *data, size);
-}
-
-WOLFSSL_OCSP_ONEREQ* wolfSSL_OCSP_request_add0_id(OcspRequest *req,
- WOLFSSL_OCSP_CERTID *cid)
-{
- if (req == NULL || cid == NULL)
- return NULL;
-
- FreeOcspRequest(req);
- XMEMCPY(req, cid, sizeof(OcspRequest));
-
- if (cid->serial != NULL) {
- req->serial = (byte*)XMALLOC(cid->serialSz, NULL,
- DYNAMIC_TYPE_OCSP_REQUEST);
- req->url = (byte*)XMALLOC(cid->urlSz, NULL, DYNAMIC_TYPE_OCSP_REQUEST);
- if (req->serial == NULL || req->url == NULL) {
- FreeOcspRequest(req);
- return NULL;
- }
-
- XMEMCPY(req->serial, cid->serial, cid->serialSz);
- XMEMCPY(req->url, cid->url, cid->urlSz);
- }
-
- wolfSSL_OCSP_REQUEST_free(cid);
-
- return req;
-}
-
-WOLFSSL_OCSP_CERTID* wolfSSL_OCSP_CERTID_dup(WOLFSSL_OCSP_CERTID* id)
-{
- WOLFSSL_OCSP_CERTID* certId;
-
- if (id == NULL) {
- return NULL;
- }
-
- certId = (WOLFSSL_OCSP_CERTID*)XMALLOC(sizeof(WOLFSSL_OCSP_CERTID),
- id->heap, DYNAMIC_TYPE_OPENSSL);
- if (certId) {
- XMEMCPY(certId, id, sizeof(WOLFSSL_OCSP_CERTID));
- }
- return certId;
-}
-#endif
-
-#if defined(OPENSSL_ALL) || defined(APACHE_HTTPD)
-int wolfSSL_i2d_OCSP_REQUEST_bio(WOLFSSL_BIO* out,
- WOLFSSL_OCSP_REQUEST *req)
-{
- int size = -1;
- unsigned char* data = NULL;
-
- WOLFSSL_ENTER("wolfSSL_i2d_OCSP_REQUEST_bio");
- if (out == NULL || req == NULL)
- return WOLFSSL_FAILURE;
-
- size = wolfSSL_i2d_OCSP_REQUEST(req, NULL);
- if (size > 0) {
- data = (unsigned char*) XMALLOC(size, out->heap,
- DYNAMIC_TYPE_TMP_BUFFER);
- }
-
- if (data != NULL) {
- size = wolfSSL_i2d_OCSP_REQUEST(req, &data);
- }
-
- if (size <= 0) {
- XFREE(data, out->heap, DYNAMIC_TYPE_TMP_BUFFER);
- return WOLFSSL_FAILURE;
- }
-
- if (wolfSSL_BIO_write(out, data, size) == (int)size) {
- XFREE(data, out->heap, DYNAMIC_TYPE_TMP_BUFFER);
- return WOLFSSL_SUCCESS;
- }
-
- XFREE(data, out->heap, DYNAMIC_TYPE_TMP_BUFFER);
- return WOLFSSL_FAILURE;
-}
-#endif /* OPENSSL_ALL || APACHE_HTTPD */
-
-#ifdef OPENSSL_EXTRA
-#ifndef NO_WOLFSSL_STUB
-int wolfSSL_OCSP_REQUEST_add_ext(OcspRequest* req, WOLFSSL_X509_EXTENSION* ext,
- int idx)
-{
- WOLFSSL_STUB("wolfSSL_OCSP_REQUEST_add_ext");
- (void)req;
- (void)ext;
- (void)idx;
- return WOLFSSL_FATAL_ERROR;
-}
-#endif
-
-#ifndef NO_WOLFSSL_STUB
-OcspResponse* wolfSSL_OCSP_response_create(int status,
- WOLFSSL_OCSP_BASICRESP* bs)
-{
- WOLFSSL_STUB("wolfSSL_OCSP_response_create");
- (void)status;
- (void)bs;
- return NULL;
-}
-#endif
-
-#ifndef NO_WOLFSSL_STUB
-const char* wolfSSL_OCSP_crl_reason_str(long s)
-{
- WOLFSSL_STUB("wolfSSL_OCSP_crl_reason_str");
- (void)s;
- return NULL;
-}
-#endif
-
-/* Returns elements of an OCSP_CERTID struct. Currently only supports
- * returning the serial number, and returns an error if user requests
- * any of name, pmd, and/or keyHash.
- * Return 1 on success, 0 on failure */
-int wolfSSL_OCSP_id_get0_info(WOLFSSL_ASN1_STRING **name,
- WOLFSSL_ASN1_OBJECT **pmd, WOLFSSL_ASN1_STRING **keyHash,
- WOLFSSL_ASN1_INTEGER **serial, WOLFSSL_OCSP_CERTID *cid)
-{
- int i = 0;
- WOLFSSL_ASN1_INTEGER* ser;
-
- WOLFSSL_ENTER("wolfSSL_OCSP_id_get0_info");
-
- if (cid == NULL)
- return 0;
-
- /* build up ASN1_INTEGER for serial */
- if (serial != NULL) {
- ser = wolfSSL_ASN1_INTEGER_new();
- if (ser == NULL)
- return 0;
-
- if (cid->serialSz > (WOLFSSL_ASN1_INTEGER_MAX - 2)) {
- /* allocate data buffer, +2 for type and length */
- ser->data = (unsigned char*)XMALLOC(cid->serialSz + 2, NULL,
- DYNAMIC_TYPE_OPENSSL);
- if (ser->data == NULL) {
- wolfSSL_ASN1_INTEGER_free(ser);
- return 0;
- }
- ser->dataMax = cid->serialSz + 2;
- ser->isDynamic = 1;
- } else {
- /* Use array instead of dynamic memory */
- ser->data = ser->intData;
- ser->dataMax = WOLFSSL_ASN1_INTEGER_MAX;
- }
-
- #ifdef WOLFSSL_QT
- /* Serial number starts at 0 index of ser->data */
- XMEMCPY(&ser->data[i], cid->serial, cid->serialSz);
- ser->length = cid->serialSz;
- #else
- ser->data[i++] = ASN_INTEGER;
- i += SetLength(cid->serialSz, ser->data + i);
- XMEMCPY(&ser->data[i], cid->serial, cid->serialSz);
- #endif
-
- cid->serialInt = ser;
- *serial = cid->serialInt;
- }
-
- /* Not needed for Apache, return error if user is requesting */
- if (name != NULL || pmd != NULL || keyHash != NULL) {
- if (name != NULL)
- *name = NULL;
-
- if (pmd != NULL)
- *pmd = NULL;
-
- if (keyHash != NULL)
- *keyHash = NULL;
- return 0;
- }
-
- return 1;
-}
-
-#ifndef NO_WOLFSSL_STUB
-int wolfSSL_OCSP_request_add1_nonce(OcspRequest* req, unsigned char* val,
- int sz)
-{
- WOLFSSL_STUB("wolfSSL_OCSP_request_add1_nonce");
- (void)req;
- (void)val;
- (void)sz;
- return WOLFSSL_FATAL_ERROR;
-}
-#endif
-
-/* Returns result of OCSP nonce comparison. Return values:
- * 1 - nonces are both present and equal
- * 2 - both nonces are absent
- * 3 - nonce only present in response
- * -1 - nonce only present in request
- * 0 - both nonces present and equal
- */
-int wolfSSL_OCSP_check_nonce(OcspRequest* req, WOLFSSL_OCSP_BASICRESP* bs)
-{
- byte* reqNonce = NULL;
- byte* rspNonce = NULL;
- int reqNonceSz = 0;
- int rspNonceSz = 0;
-
- WOLFSSL_ENTER("wolfSSL_OCSP_check_nonce");
-
- if (req != NULL) {
- reqNonce = req->nonce;
- reqNonceSz = req->nonceSz;
- }
-
- if (bs != NULL) {
- rspNonce = bs->nonce;
- rspNonceSz = bs->nonceSz;
- }
-
- /* nonce absent in both req and rsp */
- if (reqNonce == NULL && rspNonce == NULL)
- return 2;
-
- /* nonce present in rsp only */
- if (reqNonce == NULL && rspNonce != NULL)
- return 3;
-
- /* nonce present in req only */
- if (reqNonce != NULL && rspNonce == NULL)
- return -1;
-
- /* nonces are present and equal, return 1. Extra NULL check for fixing
- scan-build warning. */
- if (reqNonceSz == rspNonceSz && reqNonce && rspNonce) {
- if (XMEMCMP(reqNonce, rspNonce, reqNonceSz) == 0)
- return 1;
- }
-
- /* nonces are present but not equal */
- return 0;
-}
-#endif /* OPENSSL_EXTRA */
-
-#else /* HAVE_OCSP */
-
-
-#ifdef _MSC_VER
- /* 4206 warning for blank file */
- #pragma warning(disable: 4206)
-#endif
-
-
-#endif /* HAVE_OCSP */
-#endif /* WOLFCRYPT_ONLY */
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/sniffer.c b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/sniffer.c
deleted file mode 100644
index 809c927b73..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/sniffer.c
+++ /dev/null
@@ -1,5440 +0,0 @@
-/* sniffer.c
- *
- * Copyright (C) 2006-2020 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * wolfSSL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
- */
-
-
-#ifdef HAVE_CONFIG_H
- #include
-#endif
-
-#include
-
-#ifndef WOLFCRYPT_ONLY
-#ifdef WOLFSSL_SNIFFER
-
-#include
-#include
-
-#ifndef _WIN32
- #include
-#else
- #include
-#endif
-
-#ifdef _WIN32
- #define SNPRINTF _snprintf
-#else
- #define SNPRINTF snprintf
-#endif
-
-#include
-#include
-#include
-#include
-#ifdef NO_INLINE
- #include
-#else
- #define WOLFSSL_MISC_INCLUDED
- #include
-#endif
-
-#ifdef WOLF_CRYPTO_CB
- #include
- #ifdef HAVE_INTEL_QA_SYNC
- #include
- #endif
- #ifdef HAVE_CAVIUM_OCTEON_SYNC
- #include
- #endif
-#endif
-
-
-#ifndef WOLFSSL_SNIFFER_TIMEOUT
- #define WOLFSSL_SNIFFER_TIMEOUT 900
- /* Cache unclosed Sessions for 15 minutes since last used */
-#endif
-
-/* Misc constants */
-enum {
- MAX_SERVER_ADDRESS = 128, /* maximum server address length */
- MAX_SERVER_NAME = 128, /* maximum server name length */
- MAX_ERROR_LEN = 80, /* maximum error length */
- ETHER_IF_ADDR_LEN = 6, /* ethernet interface address length */
- LOCAL_IF_ADDR_LEN = 4, /* localhost interface address length, !windows */
- TCP_PROTO = 6, /* TCP_PROTOCOL */
- IP_HDR_SZ = 20, /* IPv4 header length, min */
- IP6_HDR_SZ = 40, /* IPv6 header length, min */
- TCP_HDR_SZ = 20, /* TCP header length, min */
- IPV4 = 4, /* IP version 4 */
- IPV6 = 6, /* IP version 6 */
- TCP_PROTOCOL = 6, /* TCP Protocol id */
- NO_NEXT_HEADER = 59, /* IPv6 no headers follow */
- TRACE_MSG_SZ = 80, /* Trace Message buffer size */
- HASH_SIZE = 499, /* Session Hash Table Rows */
- PSEUDO_HDR_SZ = 12, /* TCP Pseudo Header size in bytes */
- FATAL_ERROR_STATE = 1, /* SnifferSession fatal error state */
- TICKET_HINT_LEN = 4, /* Session Ticket Hint length */
- TICKET_HINT_AGE_LEN= 4, /* Session Ticket Age add length */
- EXT_TYPE_SZ = 2, /* Extension type length */
- MAX_INPUT_SZ = MAX_RECORD_SIZE + COMP_EXTRA + MAX_MSG_EXTRA +
- MTU_EXTRA, /* Max input sz of reassembly */
-
- /* TLS Extensions */
- EXT_SERVER_NAME = 0x0000, /* a.k.a. SNI */
- EXT_MAX_FRAGMENT_LENGTH = 0x0001,
- EXT_TRUSTED_CA_KEYS = 0x0003,
- EXT_TRUNCATED_HMAC = 0x0004,
- EXT_STATUS_REQUEST = 0x0005, /* a.k.a. OCSP stapling */
- EXT_SUPPORTED_GROUPS = 0x000a, /* a.k.a. Supported Curves */
- EXT_EC_POINT_FORMATS = 0x000b,
- EXT_SIGNATURE_ALGORITHMS = 0x000d,
- EXT_APPLICATION_LAYER_PROTOCOL = 0x0010, /* a.k.a. ALPN */
- EXT_STATUS_REQUEST_V2 = 0x0011, /* a.k.a. OCSP stapling v2 */
- EXT_ENCRYPT_THEN_MAC = 0x0016, /* RFC 7366 */
- EXT_MASTER_SECRET = 0x0017, /* Extended Master Secret Extension ID */
- EXT_TICKET_ID = 0x0023, /* Session Ticket Extension ID */
- EXT_PRE_SHARED_KEY = 0x0029,
- EXT_EARLY_DATA = 0x002a,
- EXT_SUPPORTED_VERSIONS = 0x002b,
- EXT_COOKIE = 0x002c,
- EXT_PSK_KEY_EXCHANGE_MODES = 0x002d,
- EXT_POST_HANDSHAKE_AUTH = 0x0031,
- EXT_SIGNATURE_ALGORITHMS_CERT = 0x0032,
- EXT_KEY_SHARE = 0x0033,
- EXT_RENEGOTIATION_INFO = 0xff01
-};
-
-
-#ifdef _WIN32
-
-static HMODULE dllModule; /* for error string resources */
-
-BOOL APIENTRY DllMain( HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
-{
- static int didInit = 0;
-
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- if (didInit == 0) {
- dllModule = hModule;
- ssl_InitSniffer();
- didInit = 1;
- }
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_THREAD_DETACH:
- break;
- case DLL_PROCESS_DETACH:
- if (didInit) {
- ssl_FreeSniffer();
- didInit = 0;
- }
- break;
- }
- return TRUE;
-}
-
-#endif /* _WIN32 */
-
-
-static WOLFSSL_GLOBAL int TraceOn = 0; /* Trace is off by default */
-static WOLFSSL_GLOBAL FILE* TraceFile = 0;
-
-
-/* windows uses .rc table for this */
-#ifndef _WIN32
-
-static const char* const msgTable[] =
-{
- /* 1 */
- "Out of Memory",
- "New SSL Sniffer Server Registered",
- "Checking IP Header",
- "SSL Sniffer Server Not Registered",
- "Checking TCP Header",
-
- /* 6 */
- "SSL Sniffer Server Port Not Registered",
- "RSA Private Decrypt Error",
- "RSA Private Decode Error",
- "Set Cipher Spec Error",
- "Server Hello Input Malformed",
-
- /* 11 */
- "Couldn't Resume Session Error",
- "Server Did Resumption",
- "Client Hello Input Malformed",
- "Client Trying to Resume",
- "Handshake Input Malformed",
-
- /* 16 */
- "Got Hello Verify msg",
- "Got Server Hello msg",
- "Got Cert Request msg",
- "Got Server Key Exchange msg",
- "Got Cert msg",
-
- /* 21 */
- "Got Server Hello Done msg",
- "Got Finished msg",
- "Got Client Hello msg",
- "Got Client Key Exchange msg",
- "Got Cert Verify msg",
-
- /* 26 */
- "Got Unknown Handshake msg",
- "New SSL Sniffer Session created",
- "Couldn't create new SSL",
- "Got a Packet to decode",
- "No data present",
-
- /* 31 */
- "Session Not Found",
- "Got an Old Client Hello msg",
- "Old Client Hello Input Malformed",
- "Old Client Hello OK",
- "Bad Old Client Hello",
-
- /* 36 */
- "Bad Record Header",
- "Record Header Input Malformed",
- "Got a HandShake msg",
- "Bad HandShake msg",
- "Got a Change Cipher Spec msg",
-
- /* 41 */
- "Got Application Data msg",
- "Bad Application Data",
- "Got an Alert msg",
- "Another msg to Process",
- "Removing Session From Table",
-
- /* 46 */
- "Bad Key File",
- "Wrong IP Version",
- "Wrong Protocol type",
- "Packet Short for header processing",
- "Got Unknown Record Type",
-
- /* 51 */
- "Can't Open Trace File",
- "Session in Fatal Error State",
- "Partial SSL record received",
- "Buffer Error, malformed input",
- "Added to Partial Input",
-
- /* 56 */
- "Received a Duplicate Packet",
- "Received an Out of Order Packet",
- "Received an Overlap Duplicate Packet",
- "Received an Overlap Reassembly Begin Duplicate Packet",
- "Received an Overlap Reassembly End Duplicate Packet",
-
- /* 61 */
- "Missed the Client Hello Entirely",
- "Got Hello Request msg",
- "Got Session Ticket msg",
- "Bad Input",
- "Bad Decrypt Type",
-
- /* 66 */
- "Bad Finished Message Processing",
- "Bad Compression Type",
- "Bad DeriveKeys Error",
- "Saw ACK for Missing Packet Error",
- "Bad Decrypt Operation",
-
- /* 71 */
- "Decrypt Keys Not Set Up",
- "Late Key Load Error",
- "Got Certificate Status msg",
- "RSA Key Missing Error",
- "Secure Renegotiation Not Supported",
-
- /* 76 */
- "Get Session Stats Failure",
- "Reassembly Buffer Size Exceeded",
- "Dropping Lost Fragment",
- "Dropping Partial Record",
- "Clear ACK Fault",
-
- /* 81 */
- "Bad Decrypt Size",
- "Extended Master Secret Hash Error",
- "Handshake Message Split Across TLS Records",
- "ECC Private Decode Error",
- "ECC Public Decode Error",
-
- /* 86 */
- "Watch callback not set",
- "Watch hash failed",
- "Watch callback failed",
- "Bad Certificate Message",
- "Store data callback not set",
-
- /* 91 */
- "No data destination Error",
- "Store data callback failed",
- "Loading chain input",
- "Got encrypted extension",
-};
-
-
-/* *nix version uses table above */
-static void GetError(int idx, char* str)
-{
- XSTRNCPY(str, msgTable[idx - 1], MAX_ERROR_LEN-1);
- str[MAX_ERROR_LEN-1] = '\0';
-}
-
-
-#else /* _WIN32 */
-
-
-/* Windows version uses .rc table */
-static void GetError(int idx, char* buffer)
-{
- if (!LoadStringA(dllModule, idx, buffer, MAX_ERROR_LEN))
- buffer[0] = 0;
-}
-
-
-#endif /* _WIN32 */
-
-
-/* Packet Buffer for reassembly list and ready list */
-typedef struct PacketBuffer {
- word32 begin; /* relative sequence begin */
- word32 end; /* relative sequence end */
- byte* data; /* actual data */
- struct PacketBuffer* next; /* next on reassembly list or ready list */
-} PacketBuffer;
-
-
-#ifdef HAVE_SNI
-
-/* NamedKey maps a SNI name to a specific private key */
-typedef struct NamedKey {
- char name[MAX_SERVER_NAME]; /* server DNS name */
- word32 nameSz; /* size of server DNS name */
- byte* key; /* DER private key */
- word32 keySz; /* size of DER private key */
- int isEphemeralKey;
- struct NamedKey* next; /* for list */
-} NamedKey;
-
-#endif
-
-
-typedef struct IpAddrInfo {
- int version;
- union {
- word32 ip4;
- byte ip6[16];
- };
-} IpAddrInfo;
-
-
-/* Sniffer Server holds info for each server/port monitored */
-typedef struct SnifferServer {
- WOLFSSL_CTX* ctx; /* SSL context */
- char address[MAX_SERVER_ADDRESS]; /* passed in server address */
- IpAddrInfo server; /* network order address */
- int port; /* server port */
-#ifdef HAVE_SNI
- NamedKey* namedKeys; /* mapping of names and keys */
- wolfSSL_Mutex namedKeysMutex; /* mutex for namedKey list */
-#endif
- struct SnifferServer* next; /* for list */
-} SnifferServer;
-
-
-/* Session Flags */
-typedef struct Flags {
- byte side; /* which end is current packet headed */
- byte serverCipherOn; /* indicates whether cipher is active */
- byte clientCipherOn; /* indicates whether cipher is active */
- byte resuming; /* did this session come from resumption */
- byte cached; /* have we cached this session yet */
- byte clientHello; /* processed client hello yet, for SSLv2 */
- byte finCount; /* get both FINs before removing */
- byte fatalError; /* fatal error state */
- byte cliAckFault; /* client acked unseen data from server */
- byte srvAckFault; /* server acked unseen data from client */
- byte cliSkipPartial; /* client skips partial data to catch up */
- byte srvSkipPartial; /* server skips partial data to catch up */
-#ifdef HAVE_EXTENDED_MASTER
- byte expectEms; /* expect extended master secret */
-#endif
- byte gotFinished; /* processed finished */
-} Flags;
-
-
-/* Out of Order FIN capture */
-typedef struct FinCapture {
- word32 cliFinSeq; /* client relative sequence FIN 0 is no */
- word32 srvFinSeq; /* server relative sequence FIN, 0 is no */
- byte cliCounted; /* did we count yet, detects duplicates */
- byte srvCounted; /* did we count yet, detects duplicates */
-} FinCapture;
-
-
-typedef struct HsHashes {
-#ifndef NO_OLD_TLS
-#ifndef NO_SHA
- wc_Sha hashSha;
-#endif
-#ifndef NO_MD5
- wc_Md5 hashMd5;
-#endif
-#endif /* !NO_OLD_TLS */
-#ifndef NO_SHA256
- wc_Sha256 hashSha256;
-#endif
-#ifdef WOLFSSL_SHA384
- wc_Sha384 hashSha384;
-#endif
-} HsHashes;
-
-typedef struct KeyShareInfo {
- word16 named_group;
- int key_len;
- const byte* key;
-
- /* additional info */
- int dh_key_bits;
- int curve_id;
-} KeyShareInfo;
-
-
-/* Sniffer Session holds info for each client/server SSL/TLS session */
-typedef struct SnifferSession {
- SnifferServer* context; /* server context */
- WOLFSSL* sslServer; /* SSL server side decode */
- WOLFSSL* sslClient; /* SSL client side decode */
- IpAddrInfo server; /* server address in network byte order */
- IpAddrInfo client; /* client address in network byte order */
- word16 srvPort; /* server port */
- word16 cliPort; /* client port */
- word32 cliSeqStart; /* client start sequence */
- word32 srvSeqStart; /* server start sequence */
- word32 cliExpected; /* client expected sequence (relative) */
- word32 srvExpected; /* server expected sequence (relative) */
- FinCapture finCapture; /* retain out of order FIN s */
- Flags flags; /* session flags */
- time_t lastUsed; /* last used ticks */
- word32 keySz; /* size of the private key */
- PacketBuffer* cliReassemblyList; /* client out of order packets */
- PacketBuffer* srvReassemblyList; /* server out of order packets */
- word32 cliReassemblyMemory; /* client packet memory used */
- word32 srvReassemblyMemory; /* server packet memory used */
- struct SnifferSession* next; /* for hash table list */
- byte* ticketID; /* mac ID of session ticket */
-#ifdef HAVE_SNI
- const char* sni; /* server name indication */
-#endif
-#ifdef HAVE_EXTENDED_MASTER
- HsHashes* hash;
-#endif
-#ifdef WOLFSSL_TLS13
- byte* cliKeyShare;
- word32 cliKeyShareSz;
- KeyShareInfo srvKs;
- KeyShareInfo cliKs;
-#endif
-} SnifferSession;
-
-
-/* Sniffer Server List and mutex */
-static WOLFSSL_GLOBAL SnifferServer* ServerList = 0;
-static WOLFSSL_GLOBAL wolfSSL_Mutex ServerListMutex;
-
-
-/* Session Hash Table, mutex, and count */
-static WOLFSSL_GLOBAL SnifferSession* SessionTable[HASH_SIZE];
-static WOLFSSL_GLOBAL wolfSSL_Mutex SessionMutex;
-static WOLFSSL_GLOBAL int SessionCount = 0;
-
-/* Recovery of missed data switches and stats */
-static WOLFSSL_GLOBAL wolfSSL_Mutex RecoveryMutex; /* for stats */
-static WOLFSSL_GLOBAL int RecoveryEnabled = 0; /* global switch */
-static WOLFSSL_GLOBAL int MaxRecoveryMemory = -1;
- /* per session max recovery memory */
-static WOLFSSL_GLOBAL word32 MissedDataSessions = 0;
- /* # of sessions with missed data */
-
-/* Connection Info Callback */
-static WOLFSSL_GLOBAL SSLConnCb ConnectionCb;
-static WOLFSSL_GLOBAL void* ConnectionCbCtx = NULL;
-
-#ifdef WOLFSSL_SNIFFER_STATS
-/* Sessions Statistics */
-static WOLFSSL_GLOBAL SSLStats SnifferStats;
-static WOLFSSL_GLOBAL wolfSSL_Mutex StatsMutex;
-#endif
-
-#ifdef WOLFSSL_SNIFFER_WATCH
-/* Watch Key Callback */
-static WOLFSSL_GLOBAL SSLWatchCb WatchCb;
-static WOLFSSL_GLOBAL void* WatchCbCtx = NULL;
-#endif
-
-#ifdef WOLFSSL_SNIFFER_STORE_DATA_CB
-/* Store Data Callback */
-static WOLFSSL_GLOBAL SSLStoreDataCb StoreDataCb;
-#endif
-
-
-static void UpdateMissedDataSessions(void)
-{
- wc_LockMutex(&RecoveryMutex);
- MissedDataSessions += 1;
- wc_UnLockMutex(&RecoveryMutex);
-}
-
-
-#ifdef WOLFSSL_SNIFFER_STATS
-#define LOCK_STAT() do { wc_LockMutex(&StatsMutex); } while (0)
-#define UNLOCK_STAT() do { wc_UnLockMutex(&StatsMutex); } while (0)
-#define NOLOCK_ADD_TO_STAT(x,y) do { TraceStat(#x, y); x += y; } while (0)
-#define NOLOCK_INC_STAT(x) NOLOCK_ADD_TO_STAT(x,1)
-#define ADD_TO_STAT(x,y) do { LOCK_STAT(); \
- NOLOCK_ADD_TO_STAT(x,y); UNLOCK_STAT(); } while (0)
-#define INC_STAT(x) do { LOCK_STAT(); \
- NOLOCK_INC_STAT(x); UNLOCK_STAT(); } while (0)
-#endif
-
-
-#ifdef WOLF_CRYPTO_CB
- static WOLFSSL_GLOBAL int CryptoDeviceId = INVALID_DEVID;
-#endif
-
-
-/* Initialize overall Sniffer */
-void ssl_InitSniffer(void)
-{
- wolfSSL_Init();
- wc_InitMutex(&ServerListMutex);
- wc_InitMutex(&SessionMutex);
- wc_InitMutex(&RecoveryMutex);
-#ifdef WOLFSSL_SNIFFER_STATS
- XMEMSET(&SnifferStats, 0, sizeof(SSLStats));
- wc_InitMutex(&StatsMutex);
-#endif
-#ifdef WOLF_CRYPTO_CB
- #ifdef HAVE_INTEL_QA_SYNC
- CryptoDeviceId = wc_CryptoCb_InitIntelQa();
- if (INVALID_DEVID == CryptoDeviceId) {
- printf("Couldn't init the Intel QA\n");
- }
- #endif
- #ifdef HAVE_CAVIUM_OCTEON_SYNC
- CryptoDeviceId = wc_CryptoCb_InitOcteon();
- if (INVALID_DEVID == CryptoDeviceId) {
- printf("Couldn't init the Intel QA\n");
- }
- #endif
-#endif
-}
-
-
-#ifdef HAVE_SNI
-
-/* Free Named Key and the zero out the private key it holds */
-static void FreeNamedKey(NamedKey* in)
-{
- if (in) {
- if (in->key) {
- ForceZero(in->key, in->keySz);
- XFREE(in->key, NULL, DYNAMIC_TYPE_X509);
- }
- XFREE(in, NULL, DYNAMIC_TYPE_SNIFFER_NAMED_KEY);
- }
-}
-
-
-static void FreeNamedKeyList(NamedKey* in)
-{
- NamedKey* next;
-
- while (in) {
- next = in->next;
- FreeNamedKey(in);
- in = next;
- }
-}
-
-#endif
-
-
-/* Free Sniffer Server's resources/self */
-static void FreeSnifferServer(SnifferServer* srv)
-{
- if (srv) {
-#ifdef HAVE_SNI
- wc_LockMutex(&srv->namedKeysMutex);
- FreeNamedKeyList(srv->namedKeys);
- wc_UnLockMutex(&srv->namedKeysMutex);
- wc_FreeMutex(&srv->namedKeysMutex);
-#endif
- wolfSSL_CTX_free(srv->ctx);
- }
- XFREE(srv, NULL, DYNAMIC_TYPE_SNIFFER_SERVER);
-}
-
-
-/* free PacketBuffer's resources/self */
-static void FreePacketBuffer(PacketBuffer* del)
-{
- if (del) {
- XFREE(del->data, NULL, DYNAMIC_TYPE_SNIFFER_PB_BUFFER);
- XFREE(del, NULL, DYNAMIC_TYPE_SNIFFER_PB);
- }
-}
-
-
-/* remove PacketBuffer List */
-static void FreePacketList(PacketBuffer* in)
-{
- if (in) {
- PacketBuffer* del;
- PacketBuffer* packet = in;
-
- while (packet) {
- del = packet;
- packet = packet->next;
- FreePacketBuffer(del);
- }
- }
-}
-
-
-/* Free Sniffer Session's resources/self */
-static void FreeSnifferSession(SnifferSession* session)
-{
- if (session) {
- wolfSSL_free(session->sslClient);
- wolfSSL_free(session->sslServer);
-
- FreePacketList(session->cliReassemblyList);
- FreePacketList(session->srvReassemblyList);
-
- XFREE(session->ticketID, NULL, DYNAMIC_TYPE_SNIFFER_TICKET_ID);
-#ifdef HAVE_EXTENDED_MASTER
- XFREE(session->hash, NULL, DYNAMIC_TYPE_HASHES);
-#endif
-#ifdef WOLFSSL_TLS13
- if (session->cliKeyShare)
- XFREE(session->cliKeyShare, NULL, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
- }
- XFREE(session, NULL, DYNAMIC_TYPE_SNIFFER_SESSION);
-}
-
-
-/* Free overall Sniffer */
-void ssl_FreeSniffer(void)
-{
- SnifferServer* srv;
- SnifferServer* removeServer;
- SnifferSession* session;
- SnifferSession* removeSession;
- int i;
-
- wc_LockMutex(&ServerListMutex);
- wc_LockMutex(&SessionMutex);
-
- srv = ServerList;
- while (srv) {
- removeServer = srv;
- srv = srv->next;
- FreeSnifferServer(removeServer);
- }
- ServerList = NULL;
-
- for (i = 0; i < HASH_SIZE; i++) {
- session = SessionTable[i];
- while (session) {
- removeSession = session;
- session = session->next;
- FreeSnifferSession(removeSession);
- }
- }
- SessionCount = 0;
-
- wc_UnLockMutex(&SessionMutex);
- wc_UnLockMutex(&ServerListMutex);
-
- wc_FreeMutex(&RecoveryMutex);
- wc_FreeMutex(&SessionMutex);
- wc_FreeMutex(&ServerListMutex);
-
-#ifdef WOLF_CRYPTO_CB
-#ifdef HAVE_INTEL_QA_SYNC
- wc_CryptoCb_CleanupIntelQa(&CryptoDeviceId);
-#endif
-#ifdef HAVE_CAVIUM_OCTEON_SYNC
- wc_CryptoCb_CleanupOcteon(&CryptoDeviceId);
-#endif
-#endif
-
- if (TraceFile) {
- TraceOn = 0;
- fclose(TraceFile);
- TraceFile = NULL;
- }
-
- wolfSSL_Cleanup();
-}
-
-
-#ifdef HAVE_EXTENDED_MASTER
-
-static int HashInit(HsHashes* hash)
-{
- int ret = 0;
-
- XMEMSET(hash, 0, sizeof(HsHashes));
-
-#ifndef NO_OLD_TLS
-#ifndef NO_SHA
- if (ret == 0)
- ret = wc_InitSha(&hash->hashSha);
-#endif
-#ifndef NO_MD5
- if (ret == 0)
- ret = wc_InitMd5(&hash->hashMd5);
-#endif
-#endif /* !NO_OLD_TLS */
-#ifndef NO_SHA256
- if (ret == 0)
- ret = wc_InitSha256(&hash->hashSha256);
-#endif
-#ifdef WOLFSSL_SHA384
- if (ret == 0)
- ret = wc_InitSha384(&hash->hashSha384);
-#endif
-
- return ret;
-}
-
-static int HashUpdate(HsHashes* hash, const byte* input, int sz)
-{
- int ret = 0;
-
- input -= HANDSHAKE_HEADER_SZ;
- sz += HANDSHAKE_HEADER_SZ;
-
-#ifndef NO_OLD_TLS
-#ifndef NO_SHA
- if (ret == 0)
- ret = wc_ShaUpdate(&hash->hashSha, input, sz);
-#endif
-#ifndef NO_MD5
- if (ret == 0)
- ret = wc_Md5Update(&hash->hashMd5, input, sz);
-#endif
-#endif /* !NO_OLD_TLS */
-#ifndef NO_SHA256
- if (ret == 0)
- ret = wc_Sha256Update(&hash->hashSha256, input, sz);
-#endif
-#ifdef WOLFSSL_SHA384
- if (ret == 0)
- ret = wc_Sha384Update(&hash->hashSha384, input, sz);
-#endif
-
- return ret;
-}
-
-static int HashCopy(HS_Hashes* d, HsHashes* s)
-{
-#ifndef NO_OLD_TLS
-#ifndef NO_SHA
- XMEMCPY(&d->hashSha, &s->hashSha, sizeof(wc_Sha));
-#endif
-#ifndef NO_MD5
- XMEMCPY(&d->hashMd5, &s->hashMd5, sizeof(wc_Md5));
-#endif
-#endif /* !NO_OLD_TLS */
-#ifndef NO_SHA256
- XMEMCPY(&d->hashSha256, &s->hashSha256, sizeof(wc_Sha256));
-#endif
-#ifdef WOLFSSL_SHA384
- XMEMCPY(&d->hashSha384, &s->hashSha384, sizeof(wc_Sha384));
-#endif
-
- return 0;
-}
-
-#endif
-
-
-/* Initialize a SnifferServer */
-static void InitSnifferServer(SnifferServer* sniffer)
-{
- XMEMSET(sniffer, 0, sizeof(SnifferServer));
-}
-
-
-/* Initialize session flags */
-static void InitFlags(Flags* flags)
-{
- XMEMSET(flags, 0, sizeof(Flags));
-}
-
-
-/* Initialize FIN Capture */
-static void InitFinCapture(FinCapture* cap)
-{
- XMEMSET(cap, 0, sizeof(FinCapture));
-}
-
-
-/* Initialize a Sniffer Session */
-static void InitSession(SnifferSession* session)
-{
- XMEMSET(session, 0, sizeof(SnifferSession));
- InitFlags(&session->flags);
- InitFinCapture(&session->finCapture);
-}
-
-
-/* IP Info from IP Header */
-typedef struct IpInfo {
- int length; /* length of this header */
- int total; /* total length of fragment */
- IpAddrInfo src; /* network order source address */
- IpAddrInfo dst; /* network order destination address */
-} IpInfo;
-
-
-/* TCP Info from TCP Header */
-typedef struct TcpInfo {
- int srcPort; /* source port */
- int dstPort; /* source port */
- int length; /* length of this header */
- word32 sequence; /* sequence number */
- word32 ackNumber; /* ack number */
- byte fin; /* FIN set */
- byte rst; /* RST set */
- byte syn; /* SYN set */
- byte ack; /* ACK set */
-} TcpInfo;
-
-
-/* Tcp Pseudo Header for Checksum calculation */
-typedef struct TcpPseudoHdr {
- word32 src; /* source address */
- word32 dst; /* destination address */
- byte rsv; /* reserved, always 0 */
- byte protocol; /* IP protocol */
- word16 length; /* tcp header length + data length (doesn't include */
- /* pseudo header length) network order */
-} TcpPseudoHdr;
-
-
-/* Password Setting Callback */
-static int SetPassword(char* passwd, int sz, int rw, void* userdata)
-{
- (void)rw;
- XSTRNCPY(passwd, (const char*)userdata, sz);
- return (int)XSTRLEN((const char*)userdata);
-}
-
-
-/* Ethernet Header */
-typedef struct EthernetHdr {
- byte dst[ETHER_IF_ADDR_LEN]; /* destination host address */
- byte src[ETHER_IF_ADDR_LEN]; /* source host address */
- word16 type; /* IP, ARP, etc */
-} EthernetHdr;
-
-
-/* IPv4 Header */
-typedef struct IpHdr {
- byte ver_hl; /* version/header length */
- byte tos; /* type of service */
- word16 length; /* total length */
- word16 id; /* identification */
- word16 offset; /* fragment offset field */
- byte ttl; /* time to live */
- byte protocol; /* protocol */
- word16 sum; /* checksum */
- word32 src; /* source address */
- word32 dst; /* destination address */
-} IpHdr;
-
-
-/* IPv6 Header */
-typedef struct Ip6Hdr {
- byte ver_hl; /* version/traffic class high */
- byte tc_fl; /* traffic class low/flow label high */
- word16 fl; /* flow label low */
- word16 length; /* payload length */
- byte next_header; /* next header (6 for TCP, any other skip) */
- byte hl; /* hop limit */
- byte src[16]; /* source address */
- byte dst[16]; /* destination address */
-} Ip6Hdr;
-
-
-/* IPv6 extension header */
-typedef struct Ip6ExtHdr {
- byte next_header; /* next header (6 for TCP, any other skip) */
- byte length; /* length in 8-octet units - 1 */
- byte reserved[6];
-} Ip6ExtHdr;
-
-
-#define IP_HL(ip) ( (((ip)->ver_hl) & 0x0f) * 4)
-#define IP_V(ip) ( ((ip)->ver_hl) >> 4)
-
-/* TCP Header */
-typedef struct TcpHdr {
- word16 srcPort; /* source port */
- word16 dstPort; /* destination port */
- word32 sequence; /* sequence number */
- word32 ack; /* acknowledgment number */
- byte offset; /* data offset, reserved */
- byte flags; /* option flags */
- word16 window; /* window */
- word16 sum; /* checksum */
- word16 urgent; /* urgent pointer */
-} TcpHdr;
-
-#define TCP_LEN(tcp) ( (((tcp)->offset & 0xf0) >> 4) * 4)
-#define TCP_FIN 0x01
-#define TCP_SYN 0x02
-#define TCP_RST 0x04
-#define TCP_ACK 0x10
-
-
-
-
-
-/* Use platform specific GetError to write to trace file if tracing */
-static void Trace(int idx)
-{
- if (TraceOn) {
- char myBuffer[MAX_ERROR_LEN];
- GetError(idx, myBuffer);
- fprintf(TraceFile, "\t%s\n", myBuffer);
-#ifdef DEBUG_SNIFFER
- fprintf(stderr, "\t%s\n", myBuffer);
-#endif
- }
-}
-
-
-/* Show TimeStamp for beginning of packet Trace */
-static void TraceHeader(void)
-{
- if (TraceOn) {
- time_t ticks = time(NULL);
- fprintf(TraceFile, "\n%s", ctime(&ticks));
- }
-}
-
-
-/* Show Set Server info for Trace */
-static void TraceSetServer(const char* srv, int port, const char* keyFile)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tTrying to install a new Sniffer Server with\n");
- fprintf(TraceFile, "\tserver: %s, port: %d, keyFile: %s\n", srv, port,
- keyFile);
- }
-}
-
-
-#ifdef HAVE_SNI
-
-/* Show Set Named Server info for Trace */
-static void TraceSetNamedServer(const char* name,
- const char* srv, int port, const char* keyFile)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tTrying to install a new Sniffer Server with\n");
- fprintf(TraceFile, "\tname: %s, server: %s, port: %d, keyFile: %s\n",
- name, srv, port, keyFile);
- }
-}
-
-#endif
-
-
-/* Trace got packet number */
-static void TracePacket(void)
-{
- if (TraceOn) {
- static word32 packetNumber = 0;
- fprintf(TraceFile, "\tGot a Packet to decode, packet %u\n",
- ++packetNumber);
- }
-}
-
-
-/* Convert network byte order address into human readable */
-static const char* IpToS(int version, void* src, char* dst)
-{
- return inet_ntop(version, src, dst, TRACE_MSG_SZ);
-}
-
-
-/* Show destination and source address from Ip Hdr for packet Trace */
-static void TraceIP(IpHdr* iphdr)
-{
- if (TraceOn) {
- char src[TRACE_MSG_SZ];
- char dst[TRACE_MSG_SZ];
- fprintf(TraceFile, "\tdst:%s src:%s\n",
- IpToS(AF_INET, &iphdr->dst, dst),
- IpToS(AF_INET, &iphdr->src, src));
- }
-}
-
-
-/* Show destination and source address from Ip6Hdr for packet Trace */
-static void TraceIP6(Ip6Hdr* iphdr)
-{
- if (TraceOn) {
- char src[TRACE_MSG_SZ];
- char dst[TRACE_MSG_SZ];
- fprintf(TraceFile, "\tdst: %s src: %s\n",
- IpToS(AF_INET6, iphdr->dst, dst),
- IpToS(AF_INET6, iphdr->src, src));
- }
-}
-
-
-/* Show destination and source port from Tcp Hdr for packet Trace */
-static void TraceTcp(TcpHdr* tcphdr)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tdstPort:%u srcPort:%u\n", ntohs(tcphdr->dstPort),
- ntohs(tcphdr->srcPort));
- }
-}
-
-
-/* Show sequence and payload length for Trace */
-static void TraceSequence(word32 seq, int len)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tSequence:%u, payload length:%d\n", seq, len);
- }
-}
-
-
-/* Show sequence and payload length for Trace */
-static void TraceAck(word32 ack, word32 expected)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tAck:%u Expected:%u\n", ack, expected);
- }
-}
-
-
-/* Show relative expected and relative received sequences */
-static void TraceRelativeSequence(word32 expected, word32 got)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tExpected sequence:%u, received sequence:%u\n",
- expected, got);
- }
-}
-
-
-/* Show server sequence startup from SYN */
-static void TraceServerSyn(word32 seq)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tServer SYN, Sequence Start:%u\n", seq);
- }
-}
-
-
-/* Show client sequence startup from SYN */
-static void TraceClientSyn(word32 seq)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tClient SYN, Sequence Start:%u\n", seq);
- }
-}
-
-
-/* Show client FIN capture */
-static void TraceClientFin(word32 finSeq, word32 relSeq)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tClient FIN capture:%u, current SEQ:%u\n",
- finSeq, relSeq);
- }
-}
-
-
-/* Show server FIN capture */
-static void TraceServerFin(word32 finSeq, word32 relSeq)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tServer FIN capture:%u, current SEQ:%u\n",
- finSeq, relSeq);
- }
-}
-
-
-/* Show number of SSL data bytes decoded, could be 0 (ok) */
-static void TraceGotData(int bytes)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\t%d bytes of SSL App data processed\n", bytes);
- }
-}
-
-
-/* Show bytes added to old SSL App data */
-static void TraceAddedData(int newBytes, int existingBytes)
-{
- if (TraceOn) {
- fprintf(TraceFile,
- "\t%d bytes added to %d existing bytes in User Buffer\n",
- newBytes, existingBytes);
- }
-}
-
-
-/* Show Stale Session */
-static void TraceStaleSession(void)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tFound a stale session\n");
- }
-}
-
-
-/* Show Finding Stale Sessions */
-static void TraceFindingStale(void)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tTrying to find Stale Sessions\n");
- }
-}
-
-
-/* Show Removed Session */
-static void TraceRemovedSession(void)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tRemoved it\n");
- }
-}
-
-
-/* Show SSLInfo if provided and is valid. */
-static void TraceSessionInfo(SSLInfo* sslInfo)
-{
- if (TraceOn) {
- if (sslInfo != NULL && sslInfo->isValid) {
- fprintf(TraceFile,
- "\tver:(%u %u) suiteId:(%02x %02x) suiteName:(%s) "
- #ifdef HAVE_SNI
- "sni:(%s) "
- #endif
- "keySize:(%u)\n",
- sslInfo->protocolVersionMajor,
- sslInfo->protocolVersionMinor,
- sslInfo->serverCipherSuite0,
- sslInfo->serverCipherSuite,
- sslInfo->serverCipherSuiteName,
- #ifdef HAVE_SNI
- sslInfo->serverNameIndication,
- #endif
- sslInfo->keySize);
- }
- }
-}
-
-
-#ifdef WOLFSSL_SNIFFER_STATS
-
-/* Show value added to a named statistic. */
-static void TraceStat(const char* name, int add)
-{
- if (TraceOn) {
- fprintf(TraceFile, "\tAdding %d to %s\n", add, name);
- }
-}
-
-#endif
-
-
-/* Set user error string */
-static void SetError(int idx, char* error, SnifferSession* session, int fatal)
-{
- GetError(idx, error);
- Trace(idx);
- if (session && fatal == FATAL_ERROR_STATE)
- session->flags.fatalError = 1;
-}
-
-
-/* Compare IpAddrInfo structs */
-static WC_INLINE int MatchAddr(IpAddrInfo l, IpAddrInfo r)
-{
- if (l.version == r.version) {
- if (l.version == IPV4)
- return (l.ip4 == r.ip4);
- else if (l.version == IPV6)
- return (0 == XMEMCMP(l.ip6, r.ip6, sizeof(l.ip6)));
- }
- return 0;
-}
-
-
-#ifndef WOLFSSL_SNIFFER_WATCH
-
-/* See if this IPV4 network order address has been registered */
-/* return 1 is true, 0 is false */
-static int IsServerRegistered(word32 addr)
-{
- int ret = 0; /* false */
- SnifferServer* sniffer;
-
- wc_LockMutex(&ServerListMutex);
-
- sniffer = ServerList;
- while (sniffer) {
- if (sniffer->server.ip4 == addr) {
- ret = 1;
- break;
- }
- sniffer = sniffer->next;
- }
-
- wc_UnLockMutex(&ServerListMutex);
-
- return ret;
-}
-
-
-/* See if this port has been registered to watch */
-/* See if this IPV4 network order address has been registered */
-/* return 1 is true, 0 is false */
-static int IsServerRegistered6(byte* addr)
-{
- int ret = 0; /* false */
- SnifferServer* sniffer;
-
- wc_LockMutex(&ServerListMutex);
-
- sniffer = ServerList;
- while (sniffer) {
- if (sniffer->server.version == IPV6 &&
- 0 == XMEMCMP(sniffer->server.ip6, addr, sizeof(sniffer->server.ip6))) {
- ret = 1;
- break;
- }
- sniffer = sniffer->next;
- }
-
- wc_UnLockMutex(&ServerListMutex);
-
- return ret;
-}
-
-
-/* See if this port has been registered to watch */
-/* return 1 is true, 0 is false */
-static int IsPortRegistered(word32 port)
-{
- int ret = 0; /* false */
- SnifferServer* sniffer;
-
- wc_LockMutex(&ServerListMutex);
-
- sniffer = ServerList;
- while (sniffer) {
- if (sniffer->port == (int)port) {
- ret = 1;
- break;
- }
- sniffer = sniffer->next;
- }
-
- wc_UnLockMutex(&ServerListMutex);
-
- return ret;
-}
-
-#endif
-
-
-/* Get SnifferServer from IP and Port */
-static SnifferServer* GetSnifferServer(IpInfo* ipInfo, TcpInfo* tcpInfo)
-{
- SnifferServer* sniffer;
-
- wc_LockMutex(&ServerListMutex);
-
- sniffer = ServerList;
-
-#ifndef WOLFSSL_SNIFFER_WATCH
- while (sniffer) {
- if (sniffer->port == tcpInfo->srcPort &&
- MatchAddr(sniffer->server, ipInfo->src))
- break;
- if (sniffer->port == tcpInfo->dstPort &&
- MatchAddr(sniffer->server, ipInfo->dst))
- break;
-
- sniffer = sniffer->next;
- }
-#else
- (void)ipInfo;
- (void)tcpInfo;
-#endif
-
- wc_UnLockMutex(&ServerListMutex);
-
- return sniffer;
-}
-
-
-/* Hash the Session Info, return hash row */
-static word32 SessionHash(IpInfo* ipInfo, TcpInfo* tcpInfo)
-{
- word32 hash = 1;
-
- if (ipInfo->src.version == IPV4) {
- hash *= ipInfo->src.ip4 * ipInfo->dst.ip4;
- }
- else if (ipInfo->src.version == IPV6) {
- word32* x;
- word32 y;
- x = (word32*)ipInfo->src.ip6;
- y = x[0] ^ x[1] ^ x[2] ^ x[3];
- hash *= y;
- x = (word32*)ipInfo->dst.ip6;
- y = x[0] ^ x[1] ^ x[2] ^ x[3];
- hash *= y;
- }
- hash *= tcpInfo->srcPort * tcpInfo->dstPort;
-
- return hash % HASH_SIZE;
-}
-
-
-/* Get Existing SnifferSession from IP and Port */
-static SnifferSession* GetSnifferSession(IpInfo* ipInfo, TcpInfo* tcpInfo)
-{
- SnifferSession* session;
- time_t currTime = time(NULL);
- word32 row = SessionHash(ipInfo, tcpInfo);
-
- assert(row <= HASH_SIZE);
-
- wc_LockMutex(&SessionMutex);
-
- session = SessionTable[row];
- while (session) {
- if (MatchAddr(session->server, ipInfo->src) &&
- MatchAddr(session->client, ipInfo->dst) &&
- session->srvPort == tcpInfo->srcPort &&
- session->cliPort == tcpInfo->dstPort)
- break;
-
- if (MatchAddr(session->client, ipInfo->src) &&
- MatchAddr(session->server, ipInfo->dst) &&
- session->cliPort == tcpInfo->srcPort &&
- session->srvPort == tcpInfo->dstPort)
- break;
-
- session = session->next;
- }
-
- if (session)
- session->lastUsed= currTime; /* keep session alive, remove stale will */
- /* leave alone */
- wc_UnLockMutex(&SessionMutex);
-
- /* determine side */
- if (session) {
- if (MatchAddr(ipInfo->dst, session->server) &&
- tcpInfo->dstPort == session->srvPort) {
-
- session->flags.side = WOLFSSL_SERVER_END;
- }
- else {
- session->flags.side = WOLFSSL_CLIENT_END;
- }
- }
-
- return session;
-}
-
-
-#if defined(HAVE_SNI) || defined(WOLFSSL_SNIFFER_WATCH)
-
-static int LoadKeyFile(byte** keyBuf, word32* keyBufSz,
- const char* keyFile, int keySz, int typeKey,
- const char* password)
-{
- byte* loadBuf;
- long fileSz = 0;
- XFILE file;
- int ret = -1;
-
- if (keyBuf == NULL || keyBufSz == NULL || keyFile == NULL) {
- return -1;
- }
-
- if (keySz == 0) {
- /* load from file */
- file = XFOPEN(keyFile, "rb");
- if (file == XBADFILE) return -1;
- if(XFSEEK(file, 0, XSEEK_END) != 0) {
- XFCLOSE(file);
- return -1;
- }
- fileSz = XFTELL(file);
- if (fileSz > MAX_WOLFSSL_FILE_SIZE || fileSz < 0) {
- XFCLOSE(file);
- return -1;
- }
- XREWIND(file);
-
- loadBuf = (byte*)XMALLOC(fileSz, NULL, DYNAMIC_TYPE_FILE);
- if (loadBuf == NULL) {
- XFCLOSE(file);
- return -1;
- }
-
- ret = (int)XFREAD(loadBuf, 1, fileSz, file);
- XFCLOSE(file);
-
- if (ret != fileSz) {
- XFREE(loadBuf, NULL, DYNAMIC_TYPE_FILE);
- return -1;
- }
- }
- else {
- /* use buffer directly */
- loadBuf = (byte*)XMALLOC(keySz, NULL, DYNAMIC_TYPE_FILE);
- if (loadBuf == NULL) {
- return -1;
- }
- fileSz = keySz;
- XMEMCPY(loadBuf, keyFile, fileSz);
- }
-
- if (typeKey == WOLFSSL_FILETYPE_PEM) {
- byte* saveBuf = (byte*)XMALLOC(fileSz, NULL, DYNAMIC_TYPE_X509);
- int saveBufSz = 0;
-
- ret = -1;
- if (saveBuf != NULL) {
- saveBufSz = wc_KeyPemToDer(loadBuf, (int)fileSz,
- saveBuf, (int)fileSz, password);
- if (saveBufSz < 0) {
- saveBufSz = 0;
- XFREE(saveBuf, NULL, DYNAMIC_TYPE_X509);
- saveBuf = NULL;
- }
- else
- ret = 0;
- }
-
- ForceZero(loadBuf, (word32)fileSz);
- XFREE(loadBuf, NULL, DYNAMIC_TYPE_FILE);
-
- if (saveBuf) {
- *keyBuf = saveBuf;
- *keyBufSz = (word32)saveBufSz;
- }
- }
- else {
- *keyBuf = loadBuf;
- *keyBufSz = (word32)fileSz;
- }
-
- if (ret < 0) {
- return -1;
- }
-
- return ret;
-}
-
-#endif
-
-
-#ifdef WOLFSSL_SNIFFER_WATCH
-
-static int CreateWatchSnifferServer(char* error)
-{
- SnifferServer* sniffer;
-
- sniffer = (SnifferServer*)XMALLOC(sizeof(SnifferServer), NULL,
- DYNAMIC_TYPE_SNIFFER_SERVER);
- if (sniffer == NULL) {
- SetError(MEMORY_STR, error, NULL, 0);
- return -1;
- }
- InitSnifferServer(sniffer);
- sniffer->ctx = wolfSSL_CTX_new(SSLv23_client_method());
- if (!sniffer->ctx) {
- SetError(MEMORY_STR, error, NULL, 0);
- FreeSnifferServer(sniffer);
- return -1;
- }
-#ifdef WOLF_CRYPTO_CB
- if (CryptoDeviceId != INVALID_DEVID)
- wolfSSL_CTX_SetDevId(sniffer->ctx, CryptoDeviceId);
-#endif
- ServerList = sniffer;
-
- return 0;
-}
-
-#endif
-
-
-static int SetNamedPrivateKey(const char* name, const char* address, int port,
- const char* keyFile, int keySz, int typeKey, const char* password,
- char* error, int isEphemeralKey)
-{
- SnifferServer* sniffer;
- int ret;
- int type = (typeKey == FILETYPE_PEM) ? WOLFSSL_FILETYPE_PEM :
- WOLFSSL_FILETYPE_ASN1;
- int isNew = 0;
- IpAddrInfo serverIp;
-
-#ifdef HAVE_SNI
- NamedKey* namedKey = NULL;
-#endif
-
- (void)name;
-#ifdef HAVE_SNI
- if (name != NULL) {
- namedKey = (NamedKey*)XMALLOC(sizeof(NamedKey),
- NULL, DYNAMIC_TYPE_SNIFFER_NAMED_KEY);
- if (namedKey == NULL) {
- SetError(MEMORY_STR, error, NULL, 0);
- return -1;
- }
- XMEMSET(namedKey, 0, sizeof(NamedKey));
-
- namedKey->nameSz = (word32)XSTRLEN(name);
- if (namedKey->nameSz > sizeof(namedKey->name)-1)
- namedKey->nameSz = sizeof(namedKey->name)-1;
- XSTRNCPY(namedKey->name, name, namedKey->nameSz);
- namedKey->name[MAX_SERVER_NAME-1] = '\0';
- namedKey->isEphemeralKey = isEphemeralKey;
- ret = LoadKeyFile(&namedKey->key, &namedKey->keySz,
- keyFile, keySz, type, password);
- if (ret < 0) {
- SetError(KEY_FILE_STR, error, NULL, 0);
- FreeNamedKey(namedKey);
- return -1;
- }
- }
-#endif
-
- serverIp.version = IPV4;
- serverIp.ip4 = inet_addr(address);
- if (serverIp.ip4 == INADDR_NONE) {
- if (inet_pton(AF_INET6, address, serverIp.ip6) == 1) {
- serverIp.version = IPV6;
- }
- }
- sniffer = ServerList;
- while (sniffer != NULL &&
- (!MatchAddr(sniffer->server, serverIp) || sniffer->port != port)) {
- sniffer = sniffer->next;
- }
-
- if (sniffer == NULL) {
- isNew = 1;
- sniffer = (SnifferServer*)XMALLOC(sizeof(SnifferServer),
- NULL, DYNAMIC_TYPE_SNIFFER_SERVER);
- if (sniffer == NULL) {
- SetError(MEMORY_STR, error, NULL, 0);
-#ifdef HAVE_SNI
- FreeNamedKey(namedKey);
-#endif
- return -1;
- }
- InitSnifferServer(sniffer);
-
- XSTRNCPY(sniffer->address, address, MAX_SERVER_ADDRESS-1);
- sniffer->address[MAX_SERVER_ADDRESS-1] = '\0';
- sniffer->server = serverIp;
- sniffer->port = port;
-
- sniffer->ctx = wolfSSL_CTX_new(SSLv23_client_method());
- if (!sniffer->ctx) {
- SetError(MEMORY_STR, error, NULL, 0);
-#ifdef HAVE_SNI
- FreeNamedKey(namedKey);
-#endif
- FreeSnifferServer(sniffer);
- return -1;
- }
- }
-
- if (name == NULL) {
- if (password) {
- #ifdef WOLFSSL_ENCRYPTED_KEYS
- wolfSSL_CTX_set_default_passwd_cb(sniffer->ctx, SetPassword);
- wolfSSL_CTX_set_default_passwd_cb_userdata(
- sniffer->ctx, (void*)password);
- #endif
- }
-
- #ifdef WOLFSSL_STATIC_EPHEMERAL
- if (isEphemeralKey) {
- /* auto detect key type with WC_PK_TYPE_NONE */
- /* keySz == 0 mean load file */
- ret = wolfSSL_CTX_set_ephemeral_key(sniffer->ctx, WC_PK_TYPE_NONE,
- keyFile, 0, type);
- if (ret == 0)
- ret = WOLFSSL_SUCCESS;
- }
- else
- #endif
- {
- if (keySz == 0) {
- ret = wolfSSL_CTX_use_PrivateKey_file(sniffer->ctx, keyFile, type);
- }
- else {
- ret = wolfSSL_CTX_use_PrivateKey_buffer(sniffer->ctx,
- (const byte*)keyFile, keySz, type);
- }
- }
- if (ret != WOLFSSL_SUCCESS) {
- SetError(KEY_FILE_STR, error, NULL, 0);
- if (isNew)
- FreeSnifferServer(sniffer);
- return -1;
- }
- #ifdef WOLF_CRYPTO_CB
- wolfSSL_CTX_SetDevId(sniffer->ctx, CryptoDeviceId);
- #endif
- }
-#ifdef HAVE_SNI
- else {
- wc_LockMutex(&sniffer->namedKeysMutex);
- namedKey->next = sniffer->namedKeys;
- sniffer->namedKeys = namedKey;
- wc_UnLockMutex(&sniffer->namedKeysMutex);
- }
-#endif
-
- if (isNew) {
- sniffer->next = ServerList;
- ServerList = sniffer;
- }
-
- return 0;
-}
-
-
-#ifdef HAVE_SNI
-/* Sets the private key for a specific name, server and port */
-/* returns 0 on success, -1 on error */
-int ssl_SetNamedPrivateKey(const char* name,
- const char* address, int port,
- const char* keyFile, int typeKey,
- const char* password, char* error)
-{
- int ret;
-
- TraceHeader();
- TraceSetNamedServer(name, address, port, keyFile);
-
- wc_LockMutex(&ServerListMutex);
- ret = SetNamedPrivateKey(name, address, port, keyFile, 0,
- typeKey, password, error, 0);
- wc_UnLockMutex(&ServerListMutex);
-
- if (ret == 0)
- Trace(NEW_SERVER_STR);
-
- return ret;
-}
-
-int ssl_SetNamedPrivateKeyBuffer(const char* name,
- const char* address, int port,
- const char* keyBuf, int keySz, int typeKey,
- const char* password, char* error)
-{
- int ret;
-
- TraceHeader();
- TraceSetNamedServer(name, address, port, NULL);
-
- wc_LockMutex(&ServerListMutex);
- ret = SetNamedPrivateKey(name, address, port, keyBuf, keySz,
- typeKey, password, error, 0);
- wc_UnLockMutex(&ServerListMutex);
-
- if (ret == 0)
- Trace(NEW_SERVER_STR);
-
- return ret;
-}
-#endif /* HAVE_SNI */
-
-/* Sets the private key for a specific server and port */
-/* returns 0 on success, -1 on error */
-int ssl_SetPrivateKey(const char* address, int port,
- const char* keyFile, int typeKey,
- const char* password, char* error)
-{
- int ret;
-
- TraceHeader();
- TraceSetServer(address, port, keyFile);
-
- wc_LockMutex(&ServerListMutex);
- ret = SetNamedPrivateKey(NULL, address, port, keyFile, 0,
- typeKey, password, error, 0);
- wc_UnLockMutex(&ServerListMutex);
-
- if (ret == 0)
- Trace(NEW_SERVER_STR);
-
- return ret;
-}
-
-int ssl_SetPrivateKeyBuffer(const char* address, int port,
- const char* keyBuf, int keySz, int typeKey,
- const char* password, char* error)
-{
- int ret;
-
- TraceHeader();
- TraceSetServer(address, port, "from buffer");
-
- wc_LockMutex(&ServerListMutex);
- ret = SetNamedPrivateKey(NULL, address, port, keyBuf, keySz,
- typeKey, password, error, 0);
- wc_UnLockMutex(&ServerListMutex);
-
- if (ret == 0)
- Trace(NEW_SERVER_STR);
-
- return ret;
-}
-
-#ifdef WOLFSSL_STATIC_EPHEMERAL
-#ifdef HAVE_SNI
-/* Sets the ephemeral key for a specific name, server and port */
-/* returns 0 on success, -1 on error */
-int ssl_SetNamedEphemeralKey(const char* name,
- const char* address, int port,
- const char* keyFile, int typeKey,
- const char* password, char* error)
-{
- int ret;
-
- TraceHeader();
- TraceSetNamedServer(name, address, port, keyFile);
-
- wc_LockMutex(&ServerListMutex);
- ret = SetNamedPrivateKey(name, address, port, keyFile, 0,
- typeKey, password, error, 1);
- wc_UnLockMutex(&ServerListMutex);
-
- if (ret == 0)
- Trace(NEW_SERVER_STR);
-
- return ret;
-}
-
-int ssl_SetNamedEphemeralKeyBuffer(const char* name,
- const char* address, int port,
- const char* keyBuf, int keySz, int typeKey,
- const char* password, char* error)
-{
- int ret;
-
- TraceHeader();
- TraceSetNamedServer(name, address, port, NULL);
-
- wc_LockMutex(&ServerListMutex);
- ret = SetNamedPrivateKey(name, address, port, keyBuf, keySz,
- typeKey, password, error, 1);
- wc_UnLockMutex(&ServerListMutex);
-
- if (ret == 0)
- Trace(NEW_SERVER_STR);
-
- return ret;
-}
-#endif /* HAVE_SNI */
-
-/* Sets the ephemeral key for a specific server and port */
-/* returns 0 on success, -1 on error */
-int ssl_SetEphemeralKey(const char* address, int port,
- const char* keyFile, int typeKey,
- const char* password, char* error)
-{
- int ret;
-
- TraceHeader();
- TraceSetServer(address, port, keyFile);
-
- wc_LockMutex(&ServerListMutex);
- ret = SetNamedPrivateKey(NULL, address, port, keyFile, 0,
- typeKey, password, error, 1);
- wc_UnLockMutex(&ServerListMutex);
-
- if (ret == 0)
- Trace(NEW_SERVER_STR);
-
- return ret;
-}
-
-int ssl_SetEphemeralKeyBuffer(const char* address, int port,
- const char* keyBuf, int keySz, int typeKey,
- const char* password, char* error)
-{
- int ret;
-
- TraceHeader();
- TraceSetServer(address, port, "from buffer");
-
- wc_LockMutex(&ServerListMutex);
- ret = SetNamedPrivateKey(NULL, address, port, keyBuf, keySz,
- typeKey, password, error, 1);
- wc_UnLockMutex(&ServerListMutex);
-
- if (ret == 0)
- Trace(NEW_SERVER_STR);
-
- return ret;
-}
-#endif /* WOLFSSL_STATIC_EPHEMERAL */
-
-/* Check IP Header for IPV6, TCP, and a registered server address */
-/* returns 0 on success, -1 on error */
-static int CheckIp6Hdr(Ip6Hdr* iphdr, IpInfo* info, int length, char* error)
-{
- int version = IP_V(iphdr);
- int exthdrsz = IP6_HDR_SZ;
-
- TraceIP6(iphdr);
- Trace(IP_CHECK_STR);
-
- if (version != IPV6) {
- SetError(BAD_IPVER_STR, error, NULL, 0);
- return -1;
- }
-
- /* Here, we need to move onto next header if not TCP. */
- if (iphdr->next_header != TCP_PROTOCOL) {
- Ip6ExtHdr* exthdr = (Ip6ExtHdr*)((byte*)iphdr + IP6_HDR_SZ);
- do {
- int hdrsz = (exthdr->length + 1) * 8;
- if (hdrsz > length - exthdrsz) {
- SetError(PACKET_HDR_SHORT_STR, error, NULL, 0);
- return -1;
- }
- exthdrsz += hdrsz;
- exthdr = (Ip6ExtHdr*)((byte*)exthdr + hdrsz);
- }
- while (exthdr->next_header != TCP_PROTOCOL &&
- exthdr->next_header != NO_NEXT_HEADER);
- }
-
-#ifndef WOLFSSL_SNIFFER_WATCH
- if (!IsServerRegistered6(iphdr->src) && !IsServerRegistered6(iphdr->dst)) {
- SetError(SERVER_NOT_REG_STR, error, NULL, 0);
- return -1;
- }
-#endif
-
- info->length = exthdrsz;
- info->total = ntohs(iphdr->length) + info->length;
- /* IPv6 doesn't include its own header size in the length like v4. */
- info->src.version = IPV6;
- XMEMCPY(info->src.ip6, iphdr->src, sizeof(info->src.ip6));
- info->dst.version = IPV6;
- XMEMCPY(info->dst.ip6, iphdr->dst, sizeof(info->dst.ip6));
-
- return 0;
-}
-
-
-/* Check IP Header for IPV4, TCP, and a registered server address */
-/* If header IPv6, pass to CheckIp6Hdr(). */
-/* returns 0 on success, -1 on error */
-static int CheckIpHdr(IpHdr* iphdr, IpInfo* info, int length, char* error)
-{
- int version = IP_V(iphdr);
-
- if (version == IPV6)
- return CheckIp6Hdr((Ip6Hdr*)iphdr, info, length, error);
-
- TraceIP(iphdr);
- Trace(IP_CHECK_STR);
-
- if (version != IPV4) {
- SetError(BAD_IPVER_STR, error, NULL, 0);
- return -1;
- }
-
- if (iphdr->protocol != TCP_PROTOCOL) {
- SetError(BAD_PROTO_STR, error, NULL, 0);
- return -1;
- }
-
-#ifndef WOLFSSL_SNIFFER_WATCH
- if (!IsServerRegistered(iphdr->src) && !IsServerRegistered(iphdr->dst)) {
- SetError(SERVER_NOT_REG_STR, error, NULL, 0);
- return -1;
- }
-#endif
-
- info->length = IP_HL(iphdr);
- info->total = ntohs(iphdr->length);
- info->src.version = IPV4;
- info->src.ip4 = iphdr->src;
- info->dst.version = IPV4;
- info->dst.ip4 = iphdr->dst;
-
- if (info->total == 0)
- info->total = length; /* reassembled may be off */
-
- return 0;
-}
-
-
-/* Check TCP Header for a registered port */
-/* returns 0 on success, -1 on error */
-static int CheckTcpHdr(TcpHdr* tcphdr, TcpInfo* info, char* error)
-{
- TraceTcp(tcphdr);
- Trace(TCP_CHECK_STR);
- info->srcPort = ntohs(tcphdr->srcPort);
- info->dstPort = ntohs(tcphdr->dstPort);
- info->length = TCP_LEN(tcphdr);
- info->sequence = ntohl(tcphdr->sequence);
- info->fin = tcphdr->flags & TCP_FIN;
- info->rst = tcphdr->flags & TCP_RST;
- info->syn = tcphdr->flags & TCP_SYN;
- info->ack = tcphdr->flags & TCP_ACK;
- if (info->ack)
- info->ackNumber = ntohl(tcphdr->ack);
-
-#ifndef WOLFSSL_SNIFFER_WATCH
- if (!IsPortRegistered(info->srcPort) && !IsPortRegistered(info->dstPort)) {
- SetError(SERVER_PORT_NOT_REG_STR, error, NULL, 0);
- return -1;
- }
-#else
- (void)error;
-#endif
-
- return 0;
-}
-
-
-/* Decode Record Layer Header */
-static int GetRecordHeader(const byte* input, RecordLayerHeader* rh, int* size)
-{
- XMEMCPY(rh, input, RECORD_HEADER_SZ);
- *size = (rh->length[0] << 8) | rh->length[1];
-
- if (*size > (MAX_RECORD_SIZE + COMP_EXTRA + MAX_MSG_EXTRA))
- return LENGTH_ERROR;
-
- return 0;
-}
-
-
-/* Copies the session's information to the provided sslInfo. Skip copy if
- * SSLInfo is not provided. */
-static void CopySessionInfo(SnifferSession* session, SSLInfo* sslInfo)
-{
- if (NULL != sslInfo) {
- XMEMSET(sslInfo, 0, sizeof(SSLInfo));
-
- /* Pass back Session Info after we have processed the Server Hello. */
- if (0 != session->sslServer->options.cipherSuite) {
- const char* pCipher;
-
- sslInfo->isValid = 1;
- sslInfo->protocolVersionMajor = session->sslServer->version.major;
- sslInfo->protocolVersionMinor = session->sslServer->version.minor;
- sslInfo->serverCipherSuite0 =
- session->sslServer->options.cipherSuite0;
- sslInfo->serverCipherSuite =
- session->sslServer->options.cipherSuite;
-
- pCipher = wolfSSL_get_cipher(session->sslServer);
- if (NULL != pCipher) {
- XSTRNCPY((char*)sslInfo->serverCipherSuiteName, pCipher,
- sizeof(sslInfo->serverCipherSuiteName));
- sslInfo->serverCipherSuiteName
- [sizeof(sslInfo->serverCipherSuiteName) - 1] = '\0';
- }
- sslInfo->keySize = session->keySz;
- #ifdef HAVE_SNI
- if (NULL != session->sni) {
- XSTRNCPY((char*)sslInfo->serverNameIndication,
- session->sni, sizeof(sslInfo->serverNameIndication));
- sslInfo->serverNameIndication
- [sizeof(sslInfo->serverNameIndication) - 1] = '\0';
- }
- #endif
- TraceSessionInfo(sslInfo);
- }
- }
-}
-
-
-/* Call the session connection start callback. */
-static void CallConnectionCb(SnifferSession* session)
-{
- if (ConnectionCb != NULL) {
- SSLInfo info;
- CopySessionInfo(session, &info);
- ConnectionCb((const void*)session, &info, ConnectionCbCtx);
- }
-}
-
-#ifdef SHOW_SECRETS
-static void PrintSecret(const char* desc, const byte* buf, int sz)
-{
- int i;
- printf("%s: ", desc);
- for (i = 0; i < sz; i++) {
- printf("%02x", buf[i]);
- }
- printf("\n");
-}
-
-static void ShowTlsSecrets(SnifferSession* session)
-{
- PrintSecret("server master secret", session->sslServer->arrays->masterSecret, SECRET_LEN);
- PrintSecret("client master secret", session->sslClient->arrays->masterSecret, SECRET_LEN);
- printf("server suite = %d\n", session->sslServer->options.cipherSuite);
- printf("client suite = %d\n", session->sslClient->options.cipherSuite);
-}
-#endif /* SHOW_SECRETS */
-
-
-/* Process Keys */
-static int SetupKeys(const byte* input, int* sslBytes, SnifferSession* session,
- char* error, KeyShareInfo* ksInfo, DerBuffer* keyBuf)
-{
- word32 idx = 0;
- int ret;
-
-#ifndef NO_RSA
- /* Static RSA */
- if (ksInfo == NULL) {
- RsaKey key;
- int length;
-
- ret = wc_InitRsaKey(&key, 0);
- if (ret == 0) {
- ret = wc_RsaPrivateKeyDecode(keyBuf->buffer, &idx, &key, keyBuf->length);
- if (ret != 0) {
- #ifndef HAVE_ECC
- SetError(RSA_DECODE_STR, error, session, FATAL_ERROR_STATE);
- #else
- /* If we can do ECC, this isn't fatal. Not loading an ECC
- * key will be fatal, though. */
- SetError(RSA_DECODE_STR, error, session, 0);
- #endif
- }
- }
-
- if (ret == 0) {
- length = wc_RsaEncryptSize(&key);
- if (IsTLS(session->sslServer)) {
- input += 2; /* tls pre length */
- }
-
- if (length > *sslBytes) {
- SetError(PARTIAL_INPUT_STR, error, session, FATAL_ERROR_STATE);
- ret = -1;
- }
- }
-
- #ifdef WC_RSA_BLINDING
- if (ret == 0) {
- ret = wc_RsaSetRNG(&key, session->sslServer->rng);
- if (ret != 0) {
- SetError(RSA_DECRYPT_STR, error, session, FATAL_ERROR_STATE);
- }
- }
- #endif
-
- if (ret == 0) {
- session->keySz = length * WOLFSSL_BIT_SIZE;
- /* length is the key size in bytes */
- session->sslServer->arrays->preMasterSz = SECRET_LEN;
-
- do {
- #ifdef WOLFSSL_ASYNC_CRYPT
- ret = wc_AsyncWait(ret, &key.asyncDev,
- WC_ASYNC_FLAG_CALL_AGAIN);
- #endif
- if (ret >= 0) {
- ret = wc_RsaPrivateDecrypt(input, length,
- session->sslServer->arrays->preMasterSecret,
- session->sslServer->arrays->preMasterSz, &key);
- }
- } while (ret == WC_PENDING_E);
-
- if (ret != SECRET_LEN) {
- SetError(RSA_DECRYPT_STR, error, session, FATAL_ERROR_STATE);
- }
- }
-
- wc_FreeRsaKey(&key);
- }
-#endif /* !NO_RSA */
-
-#if !defined(NO_DH) && defined(WOLFSSL_DH_EXTRA)
- /* Static Ephemeral DH Key */
- if (ksInfo && ksInfo->dh_key_bits != 0) {
- DhKey dhKey;
- const DhParams* params;
- word32 privKeySz;
- byte privKey[52]; /* max for TLS */
-
- /* get DH params */
- switch (ksInfo->named_group) {
- #ifdef HAVE_FFDHE_2048
- case WOLFSSL_FFDHE_2048:
- params = wc_Dh_ffdhe2048_Get();
- privKeySz = 29;
- break;
- #endif
- #ifdef HAVE_FFDHE_3072
- case WOLFSSL_FFDHE_3072:
- params = wc_Dh_ffdhe3072_Get();
- privKeySz = 34;
- break;
- #endif
- #ifdef HAVE_FFDHE_4096
- case WOLFSSL_FFDHE_4096:
- params = wc_Dh_ffdhe4096_Get();
- privKeySz = 39;
- break;
- #endif
- #ifdef HAVE_FFDHE_6144
- case WOLFSSL_FFDHE_6144:
- params = wc_Dh_ffdhe6144_Get();
- privKeySz = 46;
- break;
- #endif
- #ifdef HAVE_FFDHE_8192
- case WOLFSSL_FFDHE_8192:
- params = wc_Dh_ffdhe8192_Get();
- privKeySz = 52;
- break;
- #endif
- default:
- return BAD_FUNC_ARG;
- }
-
- ret = wc_InitDhKey(&dhKey);
- if (ret == 0) {
- ret = wc_DhSetKey(&dhKey,
- (byte*)params->p, params->p_len,
- (byte*)params->g, params->g_len);
- if (ret == 0) {
- ret = wc_DhKeyDecode(keyBuf->buffer, &idx, &dhKey,
- keyBuf->length);
- }
- if (ret == 0) {
- ret = wc_DhExportKeyPair(&dhKey, privKey, &privKeySz, NULL,
- NULL);
- }
-
- /* Derive secret from private key and peer's public key */
- do {
- #ifdef WOLFSSL_ASYNC_CRYPT
- ret = wc_AsyncWait(ret, &dhPriv.asyncDev,
- WC_ASYNC_FLAG_CALL_AGAIN);
- #endif
- if (ret >= 0) {
- ret = wc_DhAgree(&dhKey,
- session->sslServer->arrays->preMasterSecret,
- &session->sslServer->arrays->preMasterSz,
- privKey, privKeySz,
- input, *sslBytes);
- }
- } while (ret == WC_PENDING_E);
-
- wc_FreeDhKey(&dhKey);
-
- /* left-padded with zeros up to the size of the prime */
- if (params->p_len > session->sslServer->arrays->preMasterSz) {
- word32 diff = params->p_len - session->sslServer->arrays->preMasterSz;
- XMEMMOVE(session->sslServer->arrays->preMasterSecret + diff,
- session->sslServer->arrays->preMasterSecret,
- session->sslServer->arrays->preMasterSz);
- XMEMSET(session->sslServer->arrays->preMasterSecret, 0, diff);
- session->sslServer->arrays->preMasterSz = params->p_len;
- }
- }
- }
-#endif /* !NO_DH && WOLFSSL_DH_EXTRA */
-
-#ifdef HAVE_ECC
- /* Static Ephemeral ECC Key */
- if (ksInfo && ksInfo->curve_id != 0) {
- ecc_key key;
- ecc_key pubKey;
- int length, keyInit = 0, pubKeyInit = 0;
-
- idx = 0;
- ret = wc_ecc_init(&key);
- if (ret == 0) {
- keyInit = 1;
- ret = wc_ecc_init(&pubKey);
- }
- if (ret == 0) {
- pubKeyInit = 1;
- ret = wc_EccPrivateKeyDecode(keyBuf->buffer, &idx, &key, keyBuf->length);
- if (ret != 0) {
- SetError(ECC_DECODE_STR, error, session, FATAL_ERROR_STATE);
- }
- }
-
- if (ret == 0) {
- length = wc_ecc_size(&key) * 2 + 1;
- /* The length should be 2 times the key size (x and y), plus 1
- * for the type byte. */
- if (IsTLS(session->sslServer) && !IsAtLeastTLSv1_3(session->sslServer->version)) {
- input += 1; /* Don't include the TLS length for the key. */
- }
-
- if (length > *sslBytes) {
- SetError(PARTIAL_INPUT_STR, error, session, FATAL_ERROR_STATE);
- ret = -1;
- }
- }
-
- if (ret == 0) {
- ret = wc_ecc_import_x963_ex(input, length, &pubKey, ksInfo->curve_id);
- if (ret != 0) {
- SetError(ECC_PUB_DECODE_STR, error, session, FATAL_ERROR_STATE);
- }
- }
-
- if (ret == 0) {
- session->keySz = ((length - 1) / 2) * WOLFSSL_BIT_SIZE;
- /* Length is in bytes. Subtract 1 for the ECC key type. Divide
- * by two as the key is in (x,y) coordinates, where x and y are
- * the same size, the key size. Convert from bytes to bits. */
- session->sslServer->arrays->preMasterSz = ENCRYPT_LEN;
-
- do {
- #ifdef WOLFSSL_ASYNC_CRYPT
- ret = wc_AsyncWait(ret, &key.asyncDev,
- WC_ASYNC_FLAG_CALL_AGAIN);
- #endif
- if (ret >= 0) {
- ret = wc_ecc_shared_secret(&key, &pubKey,
- session->sslServer->arrays->preMasterSecret,
- &session->sslServer->arrays->preMasterSz);
- }
- } while (ret == WC_PENDING_E);
- }
-
-#ifdef WOLFSSL_SNIFFER_STATS
- if (ret != 0)
- INC_STAT(SnifferStats.sslKeyFails);
-#endif
-
- if (keyInit)
- wc_ecc_free(&key);
- if (pubKeyInit)
- wc_ecc_free(&pubKey);
- }
-#endif /* HAVE_ECC */
-
- /* store for client side as well */
- XMEMCPY(session->sslClient->arrays->preMasterSecret,
- session->sslServer->arrays->preMasterSecret,
- session->sslServer->arrays->preMasterSz);
- session->sslClient->arrays->preMasterSz =
- session->sslServer->arrays->preMasterSz;
-
-#ifdef SHOW_SECRETS
- PrintSecret("pre master secret",
- session->sslServer->arrays->preMasterSecret,
- session->sslServer->arrays->preMasterSz);
-#endif
-
- if (SetCipherSpecs(session->sslServer) != 0) {
- SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- if (SetCipherSpecs(session->sslClient) != 0) {
- SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
-#ifdef WOLFSSL_TLS13
- /* TLS v1.3 derive handshake key */
- if (IsAtLeastTLSv1_3(session->sslServer->version)) {
- ret = DeriveEarlySecret(session->sslServer);
- ret += DeriveEarlySecret(session->sslClient);
- ret += DeriveHandshakeSecret(session->sslServer);
- ret += DeriveHandshakeSecret(session->sslClient);
- ret += DeriveTls13Keys(session->sslServer, handshake_key, ENCRYPT_AND_DECRYPT_SIDE, 1);
- ret += DeriveTls13Keys(session->sslClient, handshake_key, ENCRYPT_AND_DECRYPT_SIDE, 1);
- #ifdef WOLFSSL_EARLY_DATA
- ret += SetKeysSide(session->sslServer, DECRYPT_SIDE_ONLY);
- ret += SetKeysSide(session->sslClient, DECRYPT_SIDE_ONLY);
- #else
- ret += SetKeysSide(session->sslServer, ENCRYPT_AND_DECRYPT_SIDE);
- ret += SetKeysSide(session->sslClient, ENCRYPT_AND_DECRYPT_SIDE);
- #endif
- }
- else
-#endif
- {
- ret = MakeMasterSecret(session->sslServer);
- ret += MakeMasterSecret(session->sslClient);
- ret += SetKeysSide(session->sslServer, ENCRYPT_AND_DECRYPT_SIDE);
- ret += SetKeysSide(session->sslClient, ENCRYPT_AND_DECRYPT_SIDE);
- }
- if (ret != 0) {
- SetError(BAD_DERIVE_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
-#ifdef SHOW_SECRETS
- #ifdef WOLFSSL_TLS13
- if (!IsAtLeastTLSv1_3(session->sslServer->version))
- #endif
- ShowTlsSecrets(session);
-#endif
-
- CallConnectionCb(session);
-
- return ret;
-}
-
-/* Process Client Key Exchange, static RSA */
-static int ProcessClientKeyExchange(const byte* input, int* sslBytes,
- SnifferSession* session, char* error)
-{
- if (session->sslServer->buffers.key == NULL ||
- session->sslServer->buffers.key->buffer == NULL ||
- session->sslServer->buffers.key->length == 0) {
-
- SetError(RSA_KEY_MISSING_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- return SetupKeys(input, sslBytes, session, error, NULL,
- session->sslServer->buffers.key);
-}
-
-#ifdef WOLFSSL_TLS13
-static int ProcessKeyShare(KeyShareInfo* info, const byte* input, int len,
- word16 filter_group)
-{
- int index = 0;
- while (index < len) {
- /* Named group and public key */
- info->named_group = (word16)((input[index] << 8) | input[index+1]);
- index += OPAQUE16_LEN;
- info->key_len = (word16)((input[index] << 8) | input[index+1]);
- index += OPAQUE16_LEN;
- if (info->key_len == 0 || info->key_len > len - index) {
- return -1;
- }
- info->key = &input[index];
- index += info->key_len;
-
- switch (info->named_group) {
- #ifndef NO_DH
- #ifdef HAVE_FFDHE_2048
- case WOLFSSL_FFDHE_2048:
- info->dh_key_bits = 2048;
- break;
- #endif
- #ifdef HAVE_FFDHE_3072
- case WOLFSSL_FFDHE_3072:
- info->dh_key_bits = 3072;
- break;
- #endif
- #ifdef HAVE_FFDHE_4096
- case WOLFSSL_FFDHE_4096:
- info->dh_key_bits = 4096;
- break;
- #endif
- #ifdef HAVE_FFDHE_6144
- case WOLFSSL_FFDHE_6144:
- info->dh_key_bits = 6144;
- break;
- #endif
- #ifdef HAVE_FFDHE_8192
- case WOLFSSL_FFDHE_8192:
- info->dh_key_bits = 8192;
- break;
- #endif
- #endif /* !NO_DH */
- #ifdef HAVE_ECC
- #if !defined(NO_ECC256) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case WOLFSSL_ECC_SECP256R1:
- info->curve_id = ECC_SECP256R1;
- break;
- #endif /* !NO_ECC_SECP */
- #endif
- #if defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case WOLFSSL_ECC_SECP384R1:
- info->curve_id = ECC_SECP384R1;
- break;
- #endif /* !NO_ECC_SECP */
- #endif
- #if defined(HAVE_ECC521) || defined(HAVE_ALL_CURVES)
- #ifndef NO_ECC_SECP
- case WOLFSSL_ECC_SECP521R1:
- info->curve_id = ECC_SECP521R1;
- break;
- #endif /* !NO_ECC_SECP */
- #endif
- #endif /* HAVE_ECC */
- #ifdef HAVE_CURVE25519
- case WOLFSSL_ECC_X25519:
- info->curve_id = ECC_X25519;
- break;
- #endif
- #ifdef HAVE_X448
- case WOLFSSL_ECC_X448:
- info->curve_id = ECC_X448;
- break;
- #endif
- default:
- /* unsupported curve */
- return ECC_PEERKEY_ERROR;
- }
-
- if (filter_group == 0 || filter_group == info->named_group) {
- return 0;
- }
- }
- return -1;
-}
-
-static int ProcessServerKeyShare(SnifferSession* session, const byte* input, int len,
- char* error)
-{
- int ret;
-
- if (session->cliKeyShare == NULL || session->cliKeyShareSz == 0) {
- SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- /* Get server_hello key share */
- ret = ProcessKeyShare(&session->srvKs, input, len, 0);
- if (ret == 0) {
- /* Get client_hello key share */
- ret = ProcessKeyShare(&session->cliKs, session->cliKeyShare,
- session->cliKeyShareSz, session->srvKs.named_group);
- }
- if (ret != 0) {
- SetError(SERVER_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- return ret;
-}
-#endif /* WOLFSSL_TLS13 */
-
-/* Process Session Ticket */
-static int ProcessSessionTicket(const byte* input, int* sslBytes,
- SnifferSession* session, char* error)
-{
- word16 len;
- WOLFSSL* ssl;
-
- if (session->flags.side == WOLFSSL_SERVER_END)
- ssl = session->sslServer;
- else
- ssl = session->sslClient;
-
- /* make sure can read through hint len */
- if (TICKET_HINT_LEN > *sslBytes) {
- SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- input += TICKET_HINT_LEN; /* skip over hint len */
- *sslBytes -= TICKET_HINT_LEN;
-
-#ifdef WOLFSSL_TLS13
- /* TLS v1.3 has hint age and nonce */
- if (IsAtLeastTLSv1_3(ssl->version)) {
- /* make sure can read through hint age and nonce len */
- if (TICKET_HINT_AGE_LEN + 1 > *sslBytes) {
- SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- input += TICKET_HINT_AGE_LEN; /* skip over hint age */
- *sslBytes -= TICKET_HINT_AGE_LEN;
-
- /* ticket nonce */
- len = input[0];
- if (len > MAX_TICKET_NONCE_SZ) {
- SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- input += OPAQUE8_LEN;
- *sslBytes -= OPAQUE8_LEN;
- #ifdef HAVE_SESSION_TICKET
- /* store nonce in server for DeriveResumptionPSK */
- session->sslServer->session.ticketNonce.len = len;
- if (len > 0)
- XMEMCPY(&session->sslServer->session.ticketNonce.data, input, len);
- #endif
- input += len;
- *sslBytes -= len;
- }
-#endif
-
- /* make sure can read through len */
- if (OPAQUE16_LEN > *sslBytes) {
- SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- len = (word16)((input[0] << 8) | input[1]);
- input += OPAQUE16_LEN;
- *sslBytes -= OPAQUE16_LEN;
-
- /* make sure can read through ticket */
- if (len > *sslBytes) {
- SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
-#ifdef WOLFSSL_TLS13
- /* TLS v1.3 has hint age and nonce */
- if (IsAtLeastTLSv1_3(ssl->version)) {
- #ifdef HAVE_SESSION_TICKET
- if (SetTicket(ssl, input, len) != 0) {
- SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- /* set haveSessionId to use the wolfSession cache */
- ssl->options.haveSessionId = 1;
-
- /* Use the wolf Session cache to retain resumption secret */
- if (session->flags.cached == 0) {
- WOLFSSL_SESSION* sess = GetSession(ssl, NULL, 0);
- if (sess == NULL) {
- AddSession(ssl); /* don't re add */
- #ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslResumptionInserts);
- #endif
- }
- session->flags.cached = 1;
- }
- #endif /* HAVE_SESSION_TICKET */
- }
- else
-#endif /* WOLFSSL_TLS13 */
- {
- /* make sure ticket id isn't too long */
- if (len > ID_LEN) {
- SetError(BAD_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- /* store session with macID as sessionID */
- session->sslServer->options.haveSessionId = 1;
- XMEMCPY(session->sslServer->arrays->sessionID,
- input + len - ID_LEN, ID_LEN);
- }
-
- return 0;
-}
-
-
-/* Process Server Hello */
-static int ProcessServerHello(int msgSz, const byte* input, int* sslBytes,
- SnifferSession* session, char* error)
-{
- int ret = 0;
- ProtocolVersion pv;
- byte b, b0;
- int toRead = VERSION_SZ + RAN_LEN + ENUM_LEN;
- int doResume = 0;
- int initialBytes = *sslBytes;
-
- (void)msgSz;
- (void)initialBytes;
-
- /* make sure we didn't miss ClientHello */
- if (session->flags.clientHello == 0) {
- SetError(MISSED_CLIENT_HELLO_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- /* make sure can read through session len */
- if (toRead > *sslBytes) {
- SetError(SERVER_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- XMEMCPY(&pv, input, VERSION_SZ);
- input += VERSION_SZ;
- *sslBytes -= VERSION_SZ;
-
- session->sslServer->version = pv;
- session->sslClient->version = pv;
-
- XMEMCPY(session->sslServer->arrays->serverRandom, input, RAN_LEN);
- XMEMCPY(session->sslClient->arrays->serverRandom, input, RAN_LEN);
- input += RAN_LEN;
- *sslBytes -= RAN_LEN;
-
- b = *input++;
- *sslBytes -= 1;
-
- /* make sure can read through compression */
- if ( (b + SUITE_LEN + ENUM_LEN) > *sslBytes) {
- SetError(SERVER_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- if (b) {
- #ifdef WOLFSSL_TLS13
- XMEMCPY(session->sslServer->session.sessionID, input, ID_LEN);
- #endif
- XMEMCPY(session->sslServer->arrays->sessionID, input, ID_LEN);
- session->sslServer->options.haveSessionId = 1;
- }
- input += b;
- *sslBytes -= b;
-
- /* cipher suite */
- b0 = *input++; /* first byte, ECC or not */
- session->sslServer->options.cipherSuite0 = b0;
- session->sslClient->options.cipherSuite0 = b0;
- b = *input++;
- session->sslServer->options.cipherSuite = b;
- session->sslClient->options.cipherSuite = b;
- *sslBytes -= SUITE_LEN;
-
-#ifdef WOLFSSL_SNIFFER_STATS
- {
- const CipherSuiteInfo* suites = GetCipherNames();
- int suitesSz = GetCipherNamesSize();
- int match = 0;
-
- while (suitesSz) {
- if (b0 == suites->cipherSuite0 && b == suites->cipherSuite) {
- match = 1;
- break;
- }
- suites++;
- suitesSz--;
- }
- if (!match)
- INC_STAT(SnifferStats.sslCiphersUnsupported);
- }
-#endif /* WOLFSSL_SNIFFER_STATS */
-
- /* compression */
- b = *input++;
- *sslBytes -= ENUM_LEN;
-
- if (b) {
- SetError(BAD_COMPRESSION_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- /* extensions */
- if ((initialBytes - *sslBytes) < msgSz) {
- word16 len;
-
- /* skip extensions until extended master secret */
- /* make sure can read len */
- if (SUITE_LEN > *sslBytes) {
- SetError(SERVER_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- len = (word16)((input[0] << 8) | input[1]);
- input += SUITE_LEN;
- *sslBytes -= SUITE_LEN;
- /* make sure can read through all extensions */
- if (len > *sslBytes) {
- SetError(SERVER_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- while (len >= EXT_TYPE_SZ + LENGTH_SZ) {
- word16 extType;
- word16 extLen;
-
- extType = (word16)((input[0] << 8) | input[1]);
- input += EXT_TYPE_SZ;
- *sslBytes -= EXT_TYPE_SZ;
-
- extLen = (word16)((input[0] << 8) | input[1]);
- input += LENGTH_SZ;
- *sslBytes -= LENGTH_SZ;
-
- /* make sure can read through individual extension */
- if (extLen > *sslBytes) {
- SetError(SERVER_HELLO_INPUT_STR, error, session,
- FATAL_ERROR_STATE);
- return -1;
- }
-
- switch (extType) {
- #ifdef WOLFSSL_TLS13
- case EXT_KEY_SHARE:
- ret = ProcessServerKeyShare(session, input, extLen, error);
- if (ret != 0) {
- SetError(SERVER_HELLO_INPUT_STR, error, session,
- FATAL_ERROR_STATE);
- return -1;
- }
- break;
- #endif
- #ifdef HAVE_SESSION_TICKET
- case EXT_PRE_SHARED_KEY:
- /* indicates we want to use resumption */
- session->sslServer->options.resuming = 1;
- session->sslClient->options.resuming = 1;
- /* default nonce to len = 1, data = 0 */
- session->sslServer->session.ticketNonce.len = 1;
- session->sslServer->session.ticketNonce.data[0] = 0;
- session->sslClient->session.ticketNonce.len = 1;
- session->sslClient->session.ticketNonce.data[0] = 0;
- break;
- #endif
- case EXT_SUPPORTED_VERSIONS:
- session->sslServer->version.major = input[0];
- session->sslServer->version.minor = input[1];
- session->sslClient->version.major = input[0];
- session->sslClient->version.minor = input[1];
- break;
- case EXT_MASTER_SECRET:
- #ifdef HAVE_EXTENDED_MASTER
- session->flags.expectEms = 1;
- #endif
- break;
- }
-
- input += extLen;
- *sslBytes -= extLen;
- len -= extLen + EXT_TYPE_SZ + LENGTH_SZ;
- }
- }
-
-#ifdef HAVE_EXTENDED_MASTER
- if (!session->flags.expectEms) {
- XFREE(session->hash, NULL, DYNAMIC_TYPE_HASHES);
- session->hash = NULL;
- }
-#endif
-
- if (session->sslServer->options.haveSessionId) {
- if (XMEMCMP(session->sslServer->arrays->sessionID,
- session->sslClient->arrays->sessionID, ID_LEN) == 0) {
- doResume = 1;
- }
- }
- else if (session->sslClient->options.haveSessionId == 0 &&
- session->sslServer->options.haveSessionId == 0 &&
- session->ticketID) {
- doResume = 1;
- }
-
- if (session->ticketID && doResume) {
- /* use ticketID to retrieve from session, prefer over sessionID */
- XMEMCPY(session->sslServer->arrays->sessionID,session->ticketID,ID_LEN);
- session->sslServer->options.haveSessionId = 1; /* may not have
- actual sessionID */
- }
-
- if (doResume) {
- WOLFSSL_SESSION* resume;
- if (IsAtLeastTLSv1_3(session->sslServer->version)) {
- resume = GetSession(session->sslServer,
- session->sslServer->session.masterSecret, 0);
- }
- else {
- resume = GetSession(session->sslServer,
- session->sslServer->arrays->masterSecret, 0);
- }
- if (resume == NULL) {
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslResumeMisses);
-#endif
- SetError(BAD_SESSION_RESUME_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- /* make sure client has master secret too */
- if (IsAtLeastTLSv1_3(session->sslServer->version)) {
- XMEMCPY(session->sslClient->session.masterSecret,
- session->sslServer->session.masterSecret, SECRET_LEN);
- }
- else {
- XMEMCPY(session->sslClient->arrays->masterSecret,
- session->sslServer->arrays->masterSecret, SECRET_LEN);
- }
- session->flags.resuming = 1;
-
- Trace(SERVER_DID_RESUMPTION_STR);
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslResumedConns);
- INC_STAT(SnifferStats.sslResumptionValid);
-#endif
- if (SetCipherSpecs(session->sslServer) != 0) {
- SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- if (SetCipherSpecs(session->sslClient) != 0) {
- SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- #ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(session->sslServer->version)) {
- #ifdef HAVE_SESSION_TICKET
- /* Resumption PSK is resumption master secret. */
- session->sslServer->arrays->psk_keySz = session->sslServer->specs.hash_size;
- session->sslClient->arrays->psk_keySz = session->sslClient->specs.hash_size;
- ret = DeriveResumptionPSK(session->sslServer, session->sslServer->session.ticketNonce.data,
- session->sslServer->session.ticketNonce.len, session->sslServer->arrays->psk_key);
- /* Copy resumption PSK to client */
- XMEMCPY(session->sslClient->arrays->psk_key,
- session->sslServer->arrays->psk_key,
- session->sslServer->arrays->psk_keySz);
- #endif
- /* handshake key setup below and traffic keys done in SetupKeys */
- }
- else
- #endif
- {
- if (IsTLS(session->sslServer)) {
- ret = DeriveTlsKeys(session->sslServer);
- ret += DeriveTlsKeys(session->sslClient);
- }
- else {
- ret = DeriveKeys(session->sslServer);
- ret += DeriveKeys(session->sslClient);
- }
- ret += SetKeysSide(session->sslServer, ENCRYPT_AND_DECRYPT_SIDE);
- ret += SetKeysSide(session->sslClient, ENCRYPT_AND_DECRYPT_SIDE);
- }
-
- if (ret != 0) {
- SetError(BAD_DERIVE_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- }
- else {
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslStandardConns);
-#endif
- }
-
-#ifdef SHOW_SECRETS
- printf("cipher suite = 0x%02x\n", session->sslServer->options.cipherSuite);
- PrintSecret("server random", session->sslServer->arrays->serverRandom, RAN_LEN);
-#endif
-
-#ifdef WOLFSSL_TLS13
- /* Setup handshake keys */
- if (IsAtLeastTLSv1_3(session->sslServer->version)) {
- DerBuffer* key = session->sslServer->buffers.key;
- #ifdef WOLFSSL_STATIC_EPHEMERAL
- if (session->sslServer->staticKE.key)
- key = session->sslServer->staticKE.key;
- #endif
- ret = SetupKeys(session->cliKs.key, &session->cliKs.key_len,
- session, error, &session->cliKs, key);
- if (ret != 0) {
- SetError(SERVER_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return ret;
- }
-
- if (session->flags.side == WOLFSSL_SERVER_END)
- session->flags.serverCipherOn = 1;
- else
- session->flags.clientCipherOn = 1;
- }
-#endif
-
- return 0;
-}
-
-
-/* Process normal Client Hello */
-static int ProcessClientHello(const byte* input, int* sslBytes,
- SnifferSession* session, char* error)
-{
- int ret = 0;
- byte bLen;
- word16 len;
- int toRead = VERSION_SZ + RAN_LEN + ENUM_LEN;
- const byte* inputHello = input;
- int inputHelloSz = *sslBytes;
- WOLFSSL* ssl = session->sslServer;
- int didHash = 0;
-
-#ifdef HAVE_SNI
- {
- byte name[MAX_SERVER_NAME];
- word32 nameSz = sizeof(name);
-
- ret = wolfSSL_SNI_GetFromBuffer(
- input - HANDSHAKE_HEADER_SZ - RECORD_HEADER_SZ,
- *sslBytes + HANDSHAKE_HEADER_SZ + RECORD_HEADER_SZ,
- WOLFSSL_SNI_HOST_NAME, name, &nameSz);
-
- if (ret == WOLFSSL_SUCCESS) {
- NamedKey* namedKey;
-
- if (nameSz > sizeof(name) - 1)
- nameSz = sizeof(name) - 1;
- name[nameSz] = 0;
- wc_LockMutex(&session->context->namedKeysMutex);
- namedKey = session->context->namedKeys;
- while (namedKey != NULL) {
- if (nameSz == namedKey->nameSz &&
- XSTRNCMP((char*)name, namedKey->name, nameSz) == 0) {
- #ifdef WOLFSSL_STATIC_EPHEMERAL
- if (namedKey->isEphemeralKey) {
- /* auto detect key type with WC_PK_TYPE_NONE */
- ret = wolfSSL_set_ephemeral_key(ssl,
- WC_PK_TYPE_NONE, (const char*)namedKey->key,
- namedKey->keySz, WOLFSSL_FILETYPE_ASN1);
- if (ret == 0)
- ret = WOLFSSL_SUCCESS;
- }
- else
- #endif
- {
- ret = wolfSSL_use_PrivateKey_buffer(ssl,
- namedKey->key, namedKey->keySz,
- WOLFSSL_FILETYPE_ASN1);
- }
- if (ret != WOLFSSL_SUCCESS) {
- wc_UnLockMutex(&session->context->namedKeysMutex);
- SetError(CLIENT_HELLO_LATE_KEY_STR, error, session,
- FATAL_ERROR_STATE);
- return -1;
- }
- session->sni = namedKey->name;
- break;
- }
- else
- namedKey = namedKey->next;
- }
- wc_UnLockMutex(&session->context->namedKeysMutex);
- }
- }
-#endif
-
- session->flags.clientHello = 1; /* don't process again */
-
- /* make sure can read up to session len */
- if (toRead > *sslBytes) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- /* skip, get negotiated one from server hello */
- input += VERSION_SZ;
- *sslBytes -= VERSION_SZ;
-
- XMEMCPY(session->sslServer->arrays->clientRandom, input, RAN_LEN);
- XMEMCPY(session->sslClient->arrays->clientRandom, input, RAN_LEN);
-
- input += RAN_LEN;
- *sslBytes -= RAN_LEN;
-
- /* store session in case trying to resume */
- bLen = *input++;
- *sslBytes -= ENUM_LEN;
- if (bLen) {
- if (ID_LEN > *sslBytes) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- Trace(CLIENT_RESUME_TRY_STR);
-#ifdef WOLFSSL_TLS13
- XMEMCPY(session->sslClient->session.sessionID, input, ID_LEN);
-#endif
- XMEMCPY(session->sslClient->arrays->sessionID, input, ID_LEN);
- session->sslClient->options.haveSessionId = 1;
- }
-
-#ifdef SHOW_SECRETS
- PrintSecret("client random", ssl->arrays->clientRandom, RAN_LEN);
-#endif
-
- input += bLen;
- *sslBytes -= bLen;
-
- /* skip cipher suites */
- /* make sure can read len */
- if (SUITE_LEN > *sslBytes) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- len = (word16)((input[0] << 8) | input[1]);
- input += SUITE_LEN;
- *sslBytes -= SUITE_LEN;
- /* make sure can read suites + comp len */
- if (len + ENUM_LEN > *sslBytes) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- input += len;
- *sslBytes -= len;
-
- /* skip compression */
- bLen = *input++;
- *sslBytes -= ENUM_LEN;
- /* make sure can read len */
- if (bLen > *sslBytes) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- input += bLen;
- *sslBytes -= bLen;
-
- if (*sslBytes == 0) {
- /* no extensions */
- return 0;
- }
-
- /* skip extensions until session ticket */
- /* make sure can read len */
- if (SUITE_LEN > *sslBytes) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- len = (word16)((input[0] << 8) | input[1]);
- input += SUITE_LEN;
- *sslBytes -= SUITE_LEN;
- /* make sure can read through all extensions */
- if (len > *sslBytes) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- while (len >= EXT_TYPE_SZ + LENGTH_SZ) {
- word16 extType;
- word16 extLen;
-
- extType = (word16)((input[0] << 8) | input[1]);
- input += EXT_TYPE_SZ;
- *sslBytes -= EXT_TYPE_SZ;
-
- extLen = (word16)((input[0] << 8) | input[1]);
- input += LENGTH_SZ;
- *sslBytes -= LENGTH_SZ;
-
- /* make sure can read through individual extension */
- if (extLen > *sslBytes) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- switch (extType) {
- #ifdef WOLFSSL_TLS13
- case EXT_KEY_SHARE:
- {
- word16 ksLen = (word16)((input[0] << 8) | input[1]);
- if (ksLen + OPAQUE16_LEN > extLen) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- /* cache key share data till server_hello */
- session->cliKeyShareSz = ksLen;
- session->cliKeyShare = (byte*)XMALLOC(ksLen, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (session->cliKeyShare == NULL) {
- SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE);
- break;
- }
- XMEMCPY(session->cliKeyShare, &input[2], ksLen);
-
- /* The server side handshake encryption is on for future packets */
- session->flags.serverCipherOn = 1;
- break;
- }
- #ifdef HAVE_SESSION_TICKET
- case EXT_PRE_SHARED_KEY:
- {
- word16 idsLen, idLen, bindersLen, idx = 0;
- word32 ticketAge;
- const byte *identity, *binders;
-
- idsLen = (word16)((input[idx] << 8) | input[idx+1]);
- if (idsLen + OPAQUE16_LEN + idx > extLen) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- idx += OPAQUE16_LEN;
-
- /* PSK identity */
- idLen = (word16)((input[idx] << 8) | input[idx+1]);
- if (idLen + OPAQUE16_LEN + idx > extLen) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- idx += OPAQUE16_LEN;
- identity = &input[idx];
- idx += idLen;
-
- /* Obfuscated Ticket Age 32-bits */
- ticketAge = (word32)((input[idx] << 24) | (input[idx+1] << 16) |
- (input[idx+2] << 8) | input[idx+3]);
- (void)ticketAge; /* not used */
- idx += OPAQUE32_LEN;
-
- /* binders - all binders */
- bindersLen = (word16)((input[idx] << 8) | input[idx+1]);
- if (bindersLen + OPAQUE16_LEN + idx > extLen) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- idx += OPAQUE16_LEN;
- binders = &input[idx];
- bindersLen += OPAQUE16_LEN; /* includes 2 bytes for total len */
- (void)binders; /* not used */
-
- /* Hash data up to binders for deriving binders in PSK extension. */
- HashRaw(session->sslServer, inputHello - HANDSHAKE_HEADER_SZ,
- inputHelloSz - bindersLen + HANDSHAKE_HEADER_SZ);
- HashRaw(session->sslClient, inputHello - HANDSHAKE_HEADER_SZ,
- inputHelloSz - bindersLen + HANDSHAKE_HEADER_SZ);
-
- /* call to decrypt session ticket */
- if (DoClientTicket(ssl, identity, idLen) != 0) {
- /* we aren't decrypting the resumption, since we know the master secret */
- /* ignore errors */
- }
- ssl->options.resuming = 1;
-
- /* Hash the rest of the ClientHello. */
- HashRaw(session->sslServer, inputHello + inputHelloSz - bindersLen, bindersLen);
- HashRaw(session->sslClient, inputHello + inputHelloSz - bindersLen, bindersLen);
- didHash = 1;
- break;
- }
- #endif /* HAVE_SESSION_TICKET */
- #endif /* WOLFSSL_TLS13 */
- case EXT_SUPPORTED_VERSIONS:
- break;
- case EXT_TICKET_ID:
- /* make sure can read through ticket if there is a non blank one */
- if (extLen && extLen < ID_LEN) {
- SetError(CLIENT_HELLO_INPUT_STR, error, session,
- FATAL_ERROR_STATE);
- return -1;
- }
- if (extLen) {
- if (session->ticketID == NULL) {
- session->ticketID = (byte*)XMALLOC(ID_LEN,
- NULL, DYNAMIC_TYPE_SNIFFER_TICKET_ID);
- if (session->ticketID == 0) {
- SetError(MEMORY_STR, error, session,
- FATAL_ERROR_STATE);
- return -1;
- }
- }
- XMEMCPY(session->ticketID, input + extLen - ID_LEN, ID_LEN);
- }
- break;
- }
-
- input += extLen;
- *sslBytes -= extLen;
- len -= extLen + EXT_TYPE_SZ + LENGTH_SZ;
- }
-
- if (!didHash) {
- HashRaw(session->sslServer, inputHello - HANDSHAKE_HEADER_SZ,
- inputHelloSz + HANDSHAKE_HEADER_SZ);
- HashRaw(session->sslClient, inputHello - HANDSHAKE_HEADER_SZ,
- inputHelloSz + HANDSHAKE_HEADER_SZ);
- }
-
- (void)ssl;
-
- return ret;
-}
-
-
-#ifdef WOLFSSL_SNIFFER_WATCH
-
-static int KeyWatchCall(SnifferSession* session, const byte* data, int dataSz,
- char* error)
-{
- int ret;
- Sha256 sha;
- byte digest[SHA256_DIGEST_SIZE];
-
- if (WatchCb == NULL) {
- SetError(WATCH_CB_MISSING_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- ret = wc_InitSha256(&sha);
- if (ret == 0)
- ret = wc_Sha256Update(&sha, data, dataSz);
- if (ret == 0)
- ret = wc_Sha256Final(&sha, digest);
- if (ret != 0) {
- SetError(WATCH_HASH_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- ret = WatchCb((void*)session, digest, sizeof(digest),
- data, dataSz, WatchCbCtx, error);
- if (ret != 0) {
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslKeysUnmatched);
-#endif
- SetError(WATCH_FAIL_STR, error, session, FATAL_ERROR_STATE);
- ret = -1;
- }
- else {
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslKeyMatches);
-#endif
- }
- return ret;
-}
-
-/* Process Certificate */
-static int ProcessCertificate(const byte* input, int* sslBytes,
- SnifferSession* session, char* error)
-{
- int ret;
- const byte* certChain;
- word32 certChainSz;
- word32 certSz;
-
- /* If the receiver is the server, this is the client certificate message,
- * and it should be ignored at this point. */
- if (session->flags.side == WOLFSSL_SERVER_END)
- return 0;
-
- if (*sslBytes < CERT_HEADER_SZ) {
- SetError(BAD_CERT_MSG_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- ato24(input, &certChainSz);
- *sslBytes -= CERT_HEADER_SZ;
- input += CERT_HEADER_SZ;
-
- if (*sslBytes < (int)certChainSz) {
- SetError(BAD_CERT_MSG_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- certChain = input;
-
- ato24(input, &certSz);
- input += OPAQUE24_LEN;
- if (*sslBytes < (int)certSz) {
- SetError(BAD_CERT_MSG_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- *sslBytes -= certChainSz;
-
- return KeyWatchCall(session, input, certSz, error);
-}
-
-#endif
-
-
-/* Process Finished */
-static int ProcessFinished(const byte* input, int size, int* sslBytes,
- SnifferSession* session, char* error)
-{
- WOLFSSL* ssl;
- word32 inOutIdx = 0;
- int ret;
-
- if (session->flags.side == WOLFSSL_SERVER_END)
- ssl = session->sslServer;
- else
- ssl = session->sslClient;
-
-#ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(ssl->version)) {
- ret = DoTls13Finished(ssl, input, &inOutIdx, (word32)size,
- (word32)*sslBytes, SNIFF);
-
- ssl->options.handShakeState = HANDSHAKE_DONE;
- ssl->options.handShakeDone = 1;
- }
- else
-#endif
- {
- ret = DoFinished(ssl, input, &inOutIdx, (word32)size,
- (word32)*sslBytes, SNIFF);
- }
- *sslBytes -= (int)inOutIdx;
-
- if (ret < 0) {
- SetError(BAD_FINISHED_MSG, error, session, FATAL_ERROR_STATE);
- return ret;
- }
-
- if (ret == 0 && session->flags.cached == 0) {
- if (session->sslServer->options.haveSessionId) {
- WOLFSSL_SESSION* sess = GetSession(session->sslServer, NULL, 0);
- if (sess == NULL) {
- AddSession(session->sslServer); /* don't re add */
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslResumptionInserts);
-#endif
- }
- session->flags.cached = 1;
- }
- }
-
-#ifdef WOLFSSL_TLS13
- /* Derive TLS v1.3 traffic keys */
- if (IsAtLeastTLSv1_3(ssl->version)) {
- if (!session->flags.gotFinished) {
- /* When either side gets "finished" derive master secret and keys */
- ret = DeriveMasterSecret(session->sslServer);
- ret += DeriveMasterSecret(session->sslClient);
- #ifdef WOLFSSL_EARLY_DATA
- ret += DeriveTls13Keys(session->sslServer, traffic_key, ENCRYPT_AND_DECRYPT_SIDE, ssl->earlyData == no_early_data);
- ret += DeriveTls13Keys(session->sslClient, traffic_key, ENCRYPT_AND_DECRYPT_SIDE, ssl->earlyData == no_early_data);
- #else
- ret += DeriveTls13Keys(session->sslServer, traffic_key, ENCRYPT_AND_DECRYPT_SIDE, 1);
- ret += DeriveTls13Keys(session->sslClient, traffic_key, ENCRYPT_AND_DECRYPT_SIDE, 1);
- #endif
-
- if (ret != 0) {
- SetError(BAD_FINISHED_MSG, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- session->flags.gotFinished = 1;
- #ifdef SHOW_SECRETS
- ShowTlsSecrets(session);
- #endif
- }
-
- if (session->flags.side == WOLFSSL_SERVER_END) {
- /* finished from client to server */
- ret = SetKeysSide(session->sslServer, DECRYPT_SIDE_ONLY);
- ret += SetKeysSide(session->sslClient, ENCRYPT_SIDE_ONLY);
-
- #ifdef HAVE_SESSION_TICKET
- /* derive resumption secret for next session - on finished (from client) */
- ret += DeriveResumptionSecret(session->sslClient, session->sslClient->session.masterSecret);
-
- /* copy resumption secret to server */
- XMEMCPY(session->sslServer->session.masterSecret,
- session->sslClient->session.masterSecret, SECRET_LEN);
- #ifdef SHOW_SECRETS
- PrintSecret("resumption secret", session->sslClient->session.masterSecret, SECRET_LEN);
- #endif
- #endif
- }
- else {
- /* finished from server to client */
- ret = SetKeysSide(session->sslServer, ENCRYPT_SIDE_ONLY);
- ret += SetKeysSide(session->sslClient, DECRYPT_SIDE_ONLY);
- }
-
- if (ret != 0) {
- SetError(BAD_FINISHED_MSG, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- }
-#endif
-
- /* If receiving a finished message from one side, free the resources
- * from the other side's tracker. */
- if (session->flags.side == WOLFSSL_SERVER_END)
- FreeHandshakeResources(session->sslClient);
- else
- FreeHandshakeResources(session->sslServer);
-
- return ret;
-}
-
-
-/* Process HandShake input */
-static int DoHandShake(const byte* input, int* sslBytes,
- SnifferSession* session, char* error)
-{
- byte type;
- int size;
- int ret = 0;
- int startBytes;
- WOLFSSL* ssl;
-
- if (*sslBytes < HANDSHAKE_HEADER_SZ) {
- SetError(HANDSHAKE_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- type = input[0];
- size = (input[1] << 16) | (input[2] << 8) | input[3];
-
- input += HANDSHAKE_HEADER_SZ;
- *sslBytes -= HANDSHAKE_HEADER_SZ;
- startBytes = *sslBytes;
-
- if (*sslBytes < size) {
- Trace(SPLIT_HANDSHAKE_MSG_STR);
- *sslBytes = 0;
- return ret;
- }
-
- if (session->flags.side == WOLFSSL_SERVER_END)
- ssl = session->sslServer;
- else
- ssl = session->sslClient;
-
-#ifdef HAVE_SECURE_RENEGOTIATION
- if (!IsAtLeastTLSv1_3(ssl->version)) {
- /* A session's arrays are released when the handshake is completed. */
- if (session->sslServer->arrays == NULL &&
- session->sslClient->arrays == NULL) {
-
- SetError(NO_SECURE_RENEGOTIATION, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- }
-#endif
-
-#ifdef WOLFSSL_TLS13
- if (type != client_hello) {
- /* For resumption the hash is before / after client_hello PSK binder */
- /* hash the packet including header */
- /* TLS v1.3 requires the hash for the handshake and transfer key derivation */
- /* we hash even for non TLS v1.3, since we don't know if its actually
- TLS v1.3 till later at EXT_SUPPORTED_VERSIONS in server_hello */
- HashRaw(session->sslServer, input - HANDSHAKE_HEADER_SZ, size + HANDSHAKE_HEADER_SZ);
- HashRaw(session->sslClient, input - HANDSHAKE_HEADER_SZ, size + HANDSHAKE_HEADER_SZ);
- }
-#endif
-#ifdef HAVE_EXTENDED_MASTER
- if (session->hash) {
- if (HashUpdate(session->hash, input, size) != 0) {
- SetError(EXTENDED_MASTER_HASH_STR, error,
- session, FATAL_ERROR_STATE);
- return -1;
- }
- }
-#endif
-
- switch (type) {
- case hello_verify_request:
- Trace(GOT_HELLO_VERIFY_STR);
- break;
- case hello_request:
- Trace(GOT_HELLO_REQUEST_STR);
- break;
- case session_ticket:
- Trace(GOT_SESSION_TICKET_STR);
- ret = ProcessSessionTicket(input, sslBytes, session, error);
- break;
- case server_hello:
- Trace(GOT_SERVER_HELLO_STR);
- ret = ProcessServerHello(size, input, sslBytes, session, error);
- break;
- case certificate_request:
- Trace(GOT_CERT_REQ_STR);
- break;
- case server_key_exchange:
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslEphemeralMisses);
-#endif
- Trace(GOT_SERVER_KEY_EX_STR);
- /* can't know temp key passively */
- SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE);
- ret = -1;
- break;
- case encrypted_extensions:
- Trace(GOT_ENC_EXT_STR);
- ssl->msgsReceived.got_encrypted_extensions = 1;
- break;
- case certificate:
- Trace(GOT_CERT_STR);
- if (session->flags.side == WOLFSSL_SERVER_END) {
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslClientAuthConns);
-#endif
- }
-#ifdef WOLFSSL_SNIFFER_WATCH
- ret = ProcessCertificate(input, sslBytes, session, error);
-#endif
- break;
- case server_hello_done:
- Trace(GOT_SERVER_HELLO_DONE_STR);
- break;
- case finished:
- Trace(GOT_FINISHED_STR);
- ret = ProcessFinished(input, size, sslBytes, session, error);
- break;
- case client_hello:
- Trace(GOT_CLIENT_HELLO_STR);
- ret = ProcessClientHello(input, sslBytes, session, error);
- break;
- case client_key_exchange:
- Trace(GOT_CLIENT_KEY_EX_STR);
-#ifdef HAVE_EXTENDED_MASTER
- if (session->flags.expectEms && session->hash != NULL) {
- if (HashCopy(session->sslServer->hsHashes,
- session->hash) == 0 &&
- HashCopy(session->sslClient->hsHashes,
- session->hash) == 0) {
-
- session->sslServer->options.haveEMS = 1;
- session->sslClient->options.haveEMS = 1;
- }
- else {
- SetError(EXTENDED_MASTER_HASH_STR, error,
- session, FATAL_ERROR_STATE);
- ret = -1;
- }
- XMEMSET(session->hash, 0, sizeof(HsHashes));
- XFREE(session->hash, NULL, DYNAMIC_TYPE_HASHES);
- session->hash = NULL;
- }
- else {
- session->sslServer->options.haveEMS = 0;
- session->sslClient->options.haveEMS = 0;
- }
-#endif
- if (ret == 0)
- ret = ProcessClientKeyExchange(input, sslBytes, session, error);
- break;
- case certificate_verify:
- Trace(GOT_CERT_VER_STR);
- break;
- case certificate_status:
- Trace(GOT_CERT_STATUS_STR);
- break;
- default:
- SetError(GOT_UNKNOWN_HANDSHAKE_STR, error, session, 0);
- return -1;
- }
-
- *sslBytes = startBytes - size; /* actual bytes of full process */
-
- return ret;
-}
-
-
-/* Decrypt input into plain output, 0 on success */
-static int Decrypt(WOLFSSL* ssl, byte* output, const byte* input, word32 sz)
-{
- int ret = 0;
-
- (void)output;
- (void)input;
- (void)sz;
-
- switch (ssl->specs.bulk_cipher_algorithm) {
- #ifdef BUILD_ARC4
- case wolfssl_rc4:
- wc_Arc4Process(ssl->decrypt.arc4, output, input, sz);
- break;
- #endif
-
- #ifdef BUILD_DES3
- case wolfssl_triple_des:
- ret = wc_Des3_CbcDecrypt(ssl->decrypt.des3, output, input, sz);
- break;
- #endif
-
- #ifdef BUILD_AES
- case wolfssl_aes:
- ret = wc_AesCbcDecrypt(ssl->decrypt.aes, output, input, sz);
- break;
- #endif
-
- #ifdef HAVE_HC128
- case wolfssl_hc128:
- wc_Hc128_Process(ssl->decrypt.hc128, output, input, sz);
- break;
- #endif
-
- #ifdef BUILD_RABBIT
- case wolfssl_rabbit:
- wc_RabbitProcess(ssl->decrypt.rabbit, output, input, sz);
- break;
- #endif
-
- #ifdef HAVE_CAMELLIA
- case wolfssl_camellia:
- wc_CamelliaCbcDecrypt(ssl->decrypt.cam, output, input, sz);
- break;
- #endif
-
- #ifdef HAVE_IDEA
- case wolfssl_idea:
- wc_IdeaCbcDecrypt(ssl->decrypt.idea, output, input, sz);
- break;
- #endif
-
- #ifdef HAVE_AESGCM
- case wolfssl_aes_gcm:
- if (sz >= (word32)(AESGCM_EXP_IV_SZ + ssl->specs.aead_mac_size))
- {
- /* scratch buffer, sniffer ignores auth tag*/
- byte authTag[WOLFSSL_MIN_AUTH_TAG_SZ];
- byte nonce[AESGCM_NONCE_SZ];
- XMEMCPY(nonce, ssl->keys.aead_dec_imp_IV, AESGCM_IMP_IV_SZ);
- XMEMCPY(nonce + AESGCM_IMP_IV_SZ, input, AESGCM_EXP_IV_SZ);
-
- if (wc_AesGcmEncrypt(ssl->decrypt.aes,
- output,
- input + AESGCM_EXP_IV_SZ,
- sz - AESGCM_EXP_IV_SZ - ssl->specs.aead_mac_size,
- nonce, AESGCM_NONCE_SZ,
- authTag, sizeof(authTag),
- NULL, 0) < 0) {
- Trace(BAD_DECRYPT);
- ret = -1;
- }
- ForceZero(nonce, AESGCM_NONCE_SZ);
- }
- else {
- Trace(BAD_DECRYPT_SIZE);
- ret = -1;
- }
- break;
- #endif
-
- #ifdef HAVE_NULL_CIPHER
- case wolfssl_cipher_null:
- XMEMCPY(output, input, sz);
- break;
- #endif
-
- default:
- Trace(BAD_DECRYPT_TYPE);
- ret = -1;
- break;
- }
-
- return ret;
-}
-
-
-/* Decrypt input message into output, adjust output steam if needed */
-static const byte* DecryptMessage(WOLFSSL* ssl, const byte* input, word32 sz,
- byte* output, int* error, int* advance, RecordLayerHeader* rh)
-{
- int ivExtra = 0;
- int ret;
-
-#ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(ssl->version)) {
- ret = DecryptTls13(ssl, output, input, sz, (byte*)rh, RECORD_HEADER_SZ);
- }
- else
-#endif
- {
- ret = Decrypt(ssl, output, input, sz);
- }
- if (ret != 0) {
- *error = ret;
- return NULL;
- }
- ssl->keys.encryptSz = sz;
- if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) {
- output += ssl->specs.block_size; /* go past TLSv1.1 IV */
- ivExtra = ssl->specs.block_size;
- *advance = ssl->specs.block_size;
- }
-
- if (ssl->specs.cipher_type == aead) {
- *advance = ssl->specs.aead_mac_size;
- ssl->keys.padSz = ssl->specs.aead_mac_size;
- }
- else
- ssl->keys.padSz = ssl->specs.hash_size;
-
- if (ssl->specs.cipher_type == block)
- ssl->keys.padSz += *(output + sz - ivExtra - 1) + 1;
-
-#ifdef WOLFSSL_TLS13
- if (IsAtLeastTLSv1_3(ssl->version)) {
- word16 i = (word16)(sz - ssl->keys.padSz);
- /* Remove padding from end of plain text. */
- for (--i; i > 0; i--) {
- if (output[i] != 0)
- break;
- }
- /* Get the real content type from the end of the data. */
- rh->type = output[i];
- ssl->keys.padSz = sz - i;
- }
-#endif
- (void)rh;
-
- return output;
-}
-
-
-/* remove session from table, use rowHint if no info (means we have a lock) */
-static void RemoveSession(SnifferSession* session, IpInfo* ipInfo,
- TcpInfo* tcpInfo, word32 rowHint)
-{
- SnifferSession* previous = 0;
- SnifferSession* current;
- word32 row = rowHint;
- int haveLock = 0;
-
- if (ipInfo && tcpInfo)
- row = SessionHash(ipInfo, tcpInfo);
- else
- haveLock = 1;
-
- assert(row <= HASH_SIZE);
- Trace(REMOVE_SESSION_STR);
-
- if (!haveLock)
- wc_LockMutex(&SessionMutex);
-
- current = SessionTable[row];
-
- while (current) {
- if (current == session) {
- if (previous)
- previous->next = current->next;
- else
- SessionTable[row] = current->next;
- FreeSnifferSession(session);
- TraceRemovedSession();
- break;
- }
- previous = current;
- current = current->next;
- }
-
- if (!haveLock)
- wc_UnLockMutex(&SessionMutex);
-}
-
-
-/* Remove stale sessions from the Session Table, have a lock */
-static void RemoveStaleSessions(void)
-{
- word32 i;
- SnifferSession* session;
-
- for (i = 0; i < HASH_SIZE; i++) {
- session = SessionTable[i];
- while (session) {
- SnifferSession* next = session->next;
- if (time(NULL) >= session->lastUsed + WOLFSSL_SNIFFER_TIMEOUT) {
- TraceStaleSession();
- RemoveSession(session, NULL, NULL, i);
- }
- session = next;
- }
- }
-}
-
-
-/* Create a new Sniffer Session */
-static SnifferSession* CreateSession(IpInfo* ipInfo, TcpInfo* tcpInfo,
- char* error)
-{
- SnifferSession* session = 0;
- int row;
-
- Trace(NEW_SESSION_STR);
- /* create a new one */
- session = (SnifferSession*)XMALLOC(sizeof(SnifferSession),
- NULL, DYNAMIC_TYPE_SNIFFER_SESSION);
- if (session == NULL) {
- SetError(MEMORY_STR, error, NULL, 0);
- return 0;
- }
- InitSession(session);
-#ifdef HAVE_EXTENDED_MASTER
- {
- HsHashes* newHash = (HsHashes*)XMALLOC(sizeof(HsHashes),
- NULL, DYNAMIC_TYPE_HASHES);
- if (newHash == NULL) {
- SetError(MEMORY_STR, error, NULL, 0);
- XFREE(session, NULL, DYNAMIC_TYPE_SNIFFER_SESSION);
- return 0;
- }
- if (HashInit(newHash) != 0) {
- SetError(EXTENDED_MASTER_HASH_STR, error, NULL, 0);
- XFREE(session, NULL, DYNAMIC_TYPE_SNIFFER_SESSION);
- return 0;
- }
- session->hash = newHash;
- }
-#endif
- session->server = ipInfo->dst;
- session->client = ipInfo->src;
- session->srvPort = (word16)tcpInfo->dstPort;
- session->cliPort = (word16)tcpInfo->srcPort;
- session->cliSeqStart = tcpInfo->sequence;
- session->cliExpected = 1; /* relative */
- session->lastUsed= time(NULL);
- session->keySz = 0;
-#ifdef HAVE_SNI
- session->sni = NULL;
-#endif
-
- session->context = GetSnifferServer(ipInfo, tcpInfo);
- if (session->context == NULL) {
- SetError(SERVER_NOT_REG_STR, error, NULL, 0);
- XFREE(session, NULL, DYNAMIC_TYPE_SNIFFER_SESSION);
- return 0;
- }
-
- session->sslServer = wolfSSL_new(session->context->ctx);
- if (session->sslServer == NULL) {
- SetError(BAD_NEW_SSL_STR, error, session, FATAL_ERROR_STATE);
- XFREE(session, NULL, DYNAMIC_TYPE_SNIFFER_SESSION);
- return 0;
- }
- session->sslClient = wolfSSL_new(session->context->ctx);
- if (session->sslClient == NULL) {
- wolfSSL_free(session->sslServer);
- session->sslServer = 0;
-
- SetError(BAD_NEW_SSL_STR, error, session, FATAL_ERROR_STATE);
- XFREE(session, NULL, DYNAMIC_TYPE_SNIFFER_SESSION);
- return 0;
- }
- /* put server back into server mode */
- session->sslServer->options.side = WOLFSSL_SERVER_END;
-
- row = SessionHash(ipInfo, tcpInfo);
-
- /* add it to the session table */
- wc_LockMutex(&SessionMutex);
-
- session->next = SessionTable[row];
- SessionTable[row] = session;
-
- SessionCount++;
-
- if ( (SessionCount % HASH_SIZE) == 0) {
- TraceFindingStale();
- RemoveStaleSessions();
- }
-
- wc_UnLockMutex(&SessionMutex);
-
- /* CreateSession is called in response to a SYN packet, we know this
- * is headed to the server. Also we know the server is one we care
- * about as we've passed the GetSnifferServer() successfully. */
- session->flags.side = WOLFSSL_SERVER_END;
-
- return session;
-}
-
-
-#ifdef OLD_HELLO_ALLOWED
-
-/* Process Old Client Hello Input */
-static int DoOldHello(SnifferSession* session, const byte* sslFrame,
- int* rhSize, int* sslBytes, char* error)
-{
- const byte* input = sslFrame;
- byte b0, b1;
- word32 idx = 0;
- int ret;
-
- Trace(GOT_OLD_CLIENT_HELLO_STR);
- session->flags.clientHello = 1; /* don't process again */
- b0 = *input++;
- b1 = *input++;
- *sslBytes -= 2;
- *rhSize = ((b0 & 0x7f) << 8) | b1;
-
- if (*rhSize > *sslBytes) {
- SetError(OLD_CLIENT_INPUT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- ret = ProcessOldClientHello(session->sslServer, input, &idx, *sslBytes,
- (word16)*rhSize);
- if (ret < 0 && ret != MATCH_SUITE_ERROR) {
- SetError(BAD_OLD_CLIENT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- Trace(OLD_CLIENT_OK_STR);
- XMEMCPY(session->sslClient->arrays->clientRandom,
- session->sslServer->arrays->clientRandom, RAN_LEN);
-
- *sslBytes -= *rhSize;
- return 0;
-}
-
-#endif /* OLD_HELLO_ALLOWED */
-
-
-#if 0
-/* Calculate the TCP checksum, see RFC 1071 */
-/* return 0 for success, -1 on error */
-/* can be called from decode() with
- TcpChecksum(&ipInfo, &tcpInfo, sslBytes, packet + ipInfo.length);
- could also add a 64bit version if type available and using this
-*/
-int TcpChecksum(IpInfo* ipInfo, TcpInfo* tcpInfo, int dataLen,
- const byte* packet)
-{
- TcpPseudoHdr pseudo;
- int count = PSEUDO_HDR_SZ;
- const word16* data = (word16*)&pseudo;
- word32 sum = 0;
- word16 checksum;
-
- pseudo.src = ipInfo->src;
- pseudo.dst = ipInfo->dst;
- pseudo.rsv = 0;
- pseudo.protocol = TCP_PROTO;
- pseudo.length = htons(tcpInfo->length + dataLen);
-
- /* pseudo header sum */
- while (count >= 2) {
- sum += *data++;
- count -= 2;
- }
-
- count = tcpInfo->length + dataLen;
- data = (word16*)packet;
-
- /* main sum */
- while (count > 1) {
- sum += *data++;
- count -=2;
- }
-
- /* get left-over, if any */
- packet = (byte*)data;
- if (count > 0) {
- sum += *packet;
- }
-
- /* fold 32bit sum into 16 bits */
- while (sum >> 16)
- sum = (sum & 0xffff) + (sum >> 16);
-
- checksum = (word16)~sum;
- /* checksum should now equal 0, since included already calcd checksum */
- /* field, but tcp checksum offloading could negate calculation */
- if (checksum == 0)
- return 0;
- return -1;
-}
-#endif
-
-
-/* Check IP and TCP headers, set payload */
-/* returns 0 on success, -1 on error */
-static int CheckHeaders(IpInfo* ipInfo, TcpInfo* tcpInfo, const byte* packet,
- int length, const byte** sslFrame, int* sslBytes, char* error)
-{
- TraceHeader();
- TracePacket();
-
- /* ip header */
- if (length < IP_HDR_SZ) {
- SetError(PACKET_HDR_SHORT_STR, error, NULL, 0);
- return -1;
- }
- if (CheckIpHdr((IpHdr*)packet, ipInfo, length, error) != 0)
- return -1;
-
- /* tcp header */
- if (length < (ipInfo->length + TCP_HDR_SZ)) {
- SetError(PACKET_HDR_SHORT_STR, error, NULL, 0);
- return -1;
- }
- if (CheckTcpHdr((TcpHdr*)(packet + ipInfo->length), tcpInfo, error) != 0)
- return -1;
-
- /* setup */
- *sslFrame = packet + ipInfo->length + tcpInfo->length;
- if (*sslFrame > packet + length) {
- SetError(PACKET_HDR_SHORT_STR, error, NULL, 0);
- return -1;
- }
- /* We only care about the data in the TCP/IP record. There may be extra
- * data after the IP record for the FCS for Ethernet. */
- *sslBytes = (int)(packet + ipInfo->total - *sslFrame);
-
- return 0;
-}
-
-
-/* Create or Find existing session */
-/* returns 0 on success (continue), -1 on error, 1 on success (end) */
-static int CheckSession(IpInfo* ipInfo, TcpInfo* tcpInfo, int sslBytes,
- SnifferSession** session, char* error)
-{
- /* create a new SnifferSession on client SYN */
- if (tcpInfo->syn && !tcpInfo->ack) {
- TraceClientSyn(tcpInfo->sequence);
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslEncryptedConns);
-#endif
- *session = CreateSession(ipInfo, tcpInfo, error);
- if (*session == NULL) {
- *session = GetSnifferSession(ipInfo, tcpInfo);
- /* already had existing, so OK */
- if (*session)
- return 1;
-
- SetError(MEMORY_STR, error, NULL, 0);
- return -1;
- }
- return 1;
- }
- /* get existing sniffer session */
- else {
- *session = GetSnifferSession(ipInfo, tcpInfo);
- if (*session == NULL) {
- /* don't worry about extraneous RST or duplicate FINs */
- if (tcpInfo->fin || tcpInfo->rst)
- return 1;
- /* don't worry about duplicate ACKs either */
- if (sslBytes == 0 && tcpInfo->ack)
- return 1;
-
-#ifdef WOLFSSL_SNIFFER_STATS
- LOCK_STAT();
- NOLOCK_INC_STAT(SnifferStats.sslDecryptedPackets);
- NOLOCK_ADD_TO_STAT(SnifferStats.sslDecryptedBytes, sslBytes);
- UNLOCK_STAT();
-#endif
-
- SetError(BAD_SESSION_STR, error, NULL, 0);
- return -1;
- }
- }
- return 0;
-}
-
-
-/* Create a Packet Buffer from *begin - end, adjust new *begin and bytesLeft */
-static PacketBuffer* CreateBuffer(word32* begin, word32 end, const byte* data,
- int* bytesLeft)
-{
- PacketBuffer* pb;
-
- int added = end - *begin + 1;
- assert(*begin <= end);
-
- pb = (PacketBuffer*)XMALLOC(sizeof(PacketBuffer),
- NULL, DYNAMIC_TYPE_SNIFFER_PB);
- if (pb == NULL) return NULL;
-
- pb->next = 0;
- pb->begin = *begin;
- pb->end = end;
- pb->data = (byte*)XMALLOC(added, NULL, DYNAMIC_TYPE_SNIFFER_PB_BUFFER);
-
- if (pb->data == NULL) {
- XFREE(pb, NULL, DYNAMIC_TYPE_SNIFFER_PB);
- return NULL;
- }
- XMEMCPY(pb->data, data, added);
-
- *bytesLeft -= added;
- *begin = pb->end + 1;
-
- return pb;
-}
-
-
-/* Add sslFrame to Reassembly List */
-/* returns 1 (end) on success, -1, on error */
-static int AddToReassembly(byte from, word32 seq, const byte* sslFrame,
- int sslBytes, SnifferSession* session, char* error)
-{
- PacketBuffer* add;
- PacketBuffer** front = (from == WOLFSSL_SERVER_END) ?
- &session->cliReassemblyList: &session->srvReassemblyList;
- PacketBuffer* curr = *front;
- PacketBuffer* prev = curr;
-
- word32* reassemblyMemory = (from == WOLFSSL_SERVER_END) ?
- &session->cliReassemblyMemory : &session->srvReassemblyMemory;
- word32 startSeq = seq;
- word32 added;
- int bytesLeft = sslBytes; /* could be overlapping fragment */
-
- /* if list is empty add full frame to front */
- if (!curr) {
- if (MaxRecoveryMemory != -1 &&
- (int)(*reassemblyMemory + sslBytes) > MaxRecoveryMemory) {
- SetError(REASSEMBLY_MAX_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- add = CreateBuffer(&seq, seq + sslBytes - 1, sslFrame, &bytesLeft);
- if (add == NULL) {
- SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- *front = add;
- *reassemblyMemory += sslBytes;
- return 1;
- }
-
- /* add to front if before current front, up to next->begin */
- if (seq < curr->begin) {
- word32 end = seq + sslBytes - 1;
-
- if (end >= curr->begin)
- end = curr->begin - 1;
-
- if (MaxRecoveryMemory -1 &&
- (int)(*reassemblyMemory + sslBytes) > MaxRecoveryMemory) {
- SetError(REASSEMBLY_MAX_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- add = CreateBuffer(&seq, end, sslFrame, &bytesLeft);
- if (add == NULL) {
- SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- add->next = curr;
- *front = add;
- *reassemblyMemory += sslBytes;
- }
-
- /* while we have bytes left, try to find a gap to fill */
- while (bytesLeft > 0) {
- /* get previous packet in list */
- while (curr && (seq >= curr->begin)) {
- prev = curr;
- curr = curr->next;
- }
-
- /* don't add duplicate data */
- if (prev->end >= seq) {
- if ( (seq + bytesLeft - 1) <= prev->end)
- return 1;
- seq = prev->end + 1;
- bytesLeft = startSeq + sslBytes - seq;
- }
-
- if (!curr)
- /* we're at the end */
- added = bytesLeft;
- else
- /* we're in between two frames */
- added = min((word32)bytesLeft, curr->begin - seq);
-
- /* data already there */
- if (added == 0)
- continue;
-
- if (MaxRecoveryMemory != -1 &&
- (int)(*reassemblyMemory + added) > MaxRecoveryMemory) {
- SetError(REASSEMBLY_MAX_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- add = CreateBuffer(&seq, seq + added - 1, &sslFrame[seq - startSeq],
- &bytesLeft);
- if (add == NULL) {
- SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- add->next = prev->next;
- prev->next = add;
- *reassemblyMemory += added;
- }
- return 1;
-}
-
-
-/* Add out of order FIN capture */
-/* returns 1 for success (end) */
-static int AddFinCapture(SnifferSession* session, word32 sequence)
-{
- if (session->flags.side == WOLFSSL_SERVER_END) {
- if (session->finCapture.cliCounted == 0)
- session->finCapture.cliFinSeq = sequence;
- }
- else {
- if (session->finCapture.srvCounted == 0)
- session->finCapture.srvFinSeq = sequence;
- }
- return 1;
-}
-
-
-/* Adjust incoming sequence based on side */
-/* returns 0 on success (continue), -1 on error, 1 on success (end) */
-static int AdjustSequence(TcpInfo* tcpInfo, SnifferSession* session,
- int* sslBytes, const byte** sslFrame, char* error)
-{
- word32 seqStart = (session->flags.side == WOLFSSL_SERVER_END) ?
- session->cliSeqStart :session->srvSeqStart;
- word32 real = tcpInfo->sequence - seqStart;
- word32* expected = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->cliExpected : &session->srvExpected;
- PacketBuffer* reassemblyList = (session->flags.side == WOLFSSL_SERVER_END) ?
- session->cliReassemblyList : session->srvReassemblyList;
- byte skipPartial = (session->flags.side == WOLFSSL_SERVER_END) ?
- session->flags.srvSkipPartial :
- session->flags.cliSkipPartial;
-
- /* handle rollover of sequence */
- if (tcpInfo->sequence < seqStart)
- real = 0xffffffffU - seqStart + tcpInfo->sequence;
-
- TraceRelativeSequence(*expected, real);
-
- if (real < *expected) {
- Trace(DUPLICATE_STR);
- if (real + *sslBytes > *expected) {
- int overlap = *expected - real;
- Trace(OVERLAP_DUPLICATE_STR);
-
- /* adjust to expected, remove duplicate */
- *sslFrame += overlap;
- *sslBytes -= overlap;
-
- /* The following conditional block is duplicated below. It is the
- * same action but for a different setup case. If changing this
- * block be sure to also update the block below. */
- if (reassemblyList) {
- word32 newEnd = *expected + *sslBytes;
-
- if (newEnd > reassemblyList->begin) {
- Trace(OVERLAP_REASSEMBLY_BEGIN_STR);
-
- /* remove bytes already on reassembly list */
- *sslBytes -= newEnd - reassemblyList->begin;
- }
- if (newEnd > reassemblyList->end) {
- Trace(OVERLAP_REASSEMBLY_END_STR);
-
- /* may be past reassembly list end (could have more on list)
- so try to add what's past the front->end */
- AddToReassembly(session->flags.side, reassemblyList->end +1,
- *sslFrame + reassemblyList->end - *expected + 1,
- newEnd - reassemblyList->end, session, error);
- }
- }
- }
- else
- return 1;
- }
- else if (real > *expected) {
- Trace(OUT_OF_ORDER_STR);
- if (*sslBytes > 0) {
- int addResult = AddToReassembly(session->flags.side, real,
- *sslFrame, *sslBytes, session, error);
- if (skipPartial) {
- *sslBytes = 0;
- return 0;
- }
- else
- return addResult;
- }
- else if (tcpInfo->fin)
- return AddFinCapture(session, real);
- }
- else if (*sslBytes > 0) {
- if (skipPartial) {
- AddToReassembly(session->flags.side, real,
- *sslFrame, *sslBytes, session, error);
- *expected += *sslBytes;
- *sslBytes = 0;
- if (tcpInfo->fin)
- *expected += 1;
- return 0;
- }
- /* The following conditional block is duplicated above. It is the
- * same action but for a different setup case. If changing this
- * block be sure to also update the block above. */
- else if (reassemblyList) {
- word32 newEnd = *expected + *sslBytes;
-
- if (newEnd > reassemblyList->begin) {
- Trace(OVERLAP_REASSEMBLY_BEGIN_STR);
-
- /* remove bytes already on reassembly list */
- *sslBytes -= newEnd - reassemblyList->begin;
- }
- if (newEnd > reassemblyList->end) {
- Trace(OVERLAP_REASSEMBLY_END_STR);
-
- /* may be past reassembly list end (could have more on list)
- so try to add what's past the front->end */
- AddToReassembly(session->flags.side, reassemblyList->end +1,
- *sslFrame + reassemblyList->end - *expected + 1,
- newEnd - reassemblyList->end, session, error);
- }
- }
- }
- /* got expected sequence */
- *expected += *sslBytes;
- if (tcpInfo->fin)
- *expected += 1;
-
- return 0;
-}
-
-
-static int FindNextRecordInAssembly(SnifferSession* session,
- const byte** sslFrame, int* sslBytes,
- const byte** end, char* error)
-{
- PacketBuffer** front = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->cliReassemblyList :
- &session->srvReassemblyList;
- PacketBuffer* curr = *front;
- PacketBuffer* prev = NULL;
- byte* skipPartial = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->flags.srvSkipPartial :
- &session->flags.cliSkipPartial;
- word32* reassemblyMemory = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->cliReassemblyMemory :
- &session->srvReassemblyMemory;
- WOLFSSL* ssl = (session->flags.side == WOLFSSL_SERVER_END) ?
- session->sslServer :
- session->sslClient;
- ProtocolVersion pv = ssl->version;
- word32* expected = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->cliExpected :
- &session->srvExpected;
-
- while (curr != NULL) {
- *expected = curr->end + 1;
-
- if (curr->data[0] == application_data &&
- curr->data[1] == pv.major &&
- curr->data[2] == pv.minor) {
-
- if (ssl->buffers.inputBuffer.length > 0)
- Trace(DROPPING_PARTIAL_RECORD);
-
- *sslBytes = curr->end - curr->begin + 1;
- if ( (word32)*sslBytes > ssl->buffers.inputBuffer.bufferSize) {
- if (GrowInputBuffer(ssl, *sslBytes, 0) < 0) {
- SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- }
-
- XMEMCPY(ssl->buffers.inputBuffer.buffer, curr->data, *sslBytes);
-
- *front = curr->next;
- *reassemblyMemory -= *sslBytes;
- FreePacketBuffer(curr);
-
- ssl->buffers.inputBuffer.length = *sslBytes;
- *sslFrame = ssl->buffers.inputBuffer.buffer;
- *end = *sslFrame + *sslBytes;
- *skipPartial = 0;
-
- return 0;
- }
- else if (ssl->specs.cipher_type == block) {
- if (ssl->specs.bulk_cipher_algorithm == wolfssl_aes) {
-#ifdef BUILD_AES
- wc_AesSetIV(ssl->decrypt.aes,
- curr->data + curr->end - curr->begin
- - ssl->specs.block_size + 1);
-#endif
- }
- else if (ssl->specs.bulk_cipher_algorithm == wolfssl_triple_des) {
-#ifdef BUILD_DES3
- wc_Des3_SetIV(ssl->decrypt.des3,
- curr->data + curr->end - curr->begin
- - ssl->specs.block_size + 1);
-#endif
- }
- }
-
- Trace(DROPPING_LOST_FRAG_STR);
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslDecodeFails);
-#endif
- prev = curr;
- curr = curr->next;
- *reassemblyMemory -= (prev->end - prev->begin + 1);
- FreePacketBuffer(prev);
- }
-
- *front = curr;
-
- return 0;
-}
-
-
-static int FixSequence(TcpInfo* tcpInfo, SnifferSession* session)
-{
- word32* expected = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->srvExpected : &session->cliExpected;
- PacketBuffer* list = (session->flags.side == WOLFSSL_SERVER_END) ?
- session->srvReassemblyList :
- session->cliReassemblyList;
- byte* skipPartial = (session->flags.side != WOLFSSL_SERVER_END) ?
- &session->flags.srvSkipPartial :
- &session->flags.cliSkipPartial;
-
- *skipPartial = 1;
- if (list != NULL)
- *expected = list->begin;
- else {
- word32 seqStart = (session->flags.side == WOLFSSL_SERVER_END) ?
- session->srvSeqStart : session->cliSeqStart;
- word32 real = tcpInfo->ackNumber - seqStart;
-
- *expected = real;
- }
-
- return 1;
-}
-
-
-/* Check latest ack number for missing packets
- return 0 ok, <0 on error */
-static int CheckAck(TcpInfo* tcpInfo, SnifferSession* session)
-{
- if (tcpInfo->ack) {
- word32 seqStart = (session->flags.side == WOLFSSL_SERVER_END) ?
- session->srvSeqStart :session->cliSeqStart;
- word32 real = tcpInfo->ackNumber - seqStart;
- word32 expected = (session->flags.side == WOLFSSL_SERVER_END) ?
- session->srvExpected : session->cliExpected;
-
- /* handle rollover of sequence */
- if (tcpInfo->ackNumber < seqStart)
- real = 0xffffffffU - seqStart + tcpInfo->ackNumber;
-
- TraceAck(real, expected);
-
- if (real > expected)
- return -1; /* we missed a packet, ACKing data we never saw */
- }
- return 0;
-}
-
-
-/* Check TCP Sequence status */
-/* returns 0 on success (continue), -1 on error, 1 on success (end) */
-static int CheckSequence(IpInfo* ipInfo, TcpInfo* tcpInfo,
- SnifferSession* session, int* sslBytes,
- const byte** sslFrame, char* error)
-{
- int actualLen;
- byte* ackFault = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->flags.cliAckFault :
- &session->flags.srvAckFault;
-
- /* init SEQ from server to client */
- if (tcpInfo->syn && tcpInfo->ack) {
- session->srvSeqStart = tcpInfo->sequence;
- session->srvExpected = 1;
- TraceServerSyn(tcpInfo->sequence);
- return 1;
- }
-
- /* adjust potential ethernet trailer */
- actualLen = ipInfo->total - ipInfo->length - tcpInfo->length;
- if (*sslBytes > actualLen) {
- *sslBytes = actualLen;
- }
-
- TraceSequence(tcpInfo->sequence, *sslBytes);
- if (CheckAck(tcpInfo, session) < 0) {
- if (!RecoveryEnabled) {
- UpdateMissedDataSessions();
- SetError(ACK_MISSED_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- else {
- SetError(ACK_MISSED_STR, error, session, 0);
- if (*ackFault == 0) {
- *ackFault = 1;
- UpdateMissedDataSessions();
- }
- return FixSequence(tcpInfo, session);
- }
- }
-
- if (*ackFault) {
- Trace(CLEAR_ACK_FAULT);
- *ackFault = 0;
- }
-
- return AdjustSequence(tcpInfo, session, sslBytes, sslFrame, error);
-}
-
-
-/* Check Status before record processing */
-/* returns 0 on success (continue), -1 on error, 1 on success (end) */
-static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo,
- const byte** sslFrame, SnifferSession** session,
- int* sslBytes, const byte** end,
- void* vChain, word32 chainSz, char* error)
-{
- word32 length;
- WOLFSSL* ssl = ((*session)->flags.side == WOLFSSL_SERVER_END) ?
- (*session)->sslServer : (*session)->sslClient;
- byte skipPartial = ((*session)->flags.side == WOLFSSL_SERVER_END) ?
- (*session)->flags.srvSkipPartial :
- (*session)->flags.cliSkipPartial;
- /* remove SnifferSession on 2nd FIN or RST */
- if (tcpInfo->fin || tcpInfo->rst) {
- /* flag FIN and RST */
- if (tcpInfo->fin)
- (*session)->flags.finCount += 1;
- else if (tcpInfo->rst)
- (*session)->flags.finCount += 2;
-
- if ((*session)->flags.finCount >= 2) {
- RemoveSession(*session, ipInfo, tcpInfo, 0);
- *session = NULL;
- return 1;
- }
- }
-
- if ((*session)->flags.fatalError == FATAL_ERROR_STATE) {
- SetError(FATAL_ERROR_STR, error, NULL, 0);
- return -1;
- }
-
- if (skipPartial) {
- if (FindNextRecordInAssembly(*session,
- sslFrame, sslBytes, end, error) < 0) {
- return -1;
- }
- }
-
- if (*sslBytes == 0) {
- Trace(NO_DATA_STR);
- return 1;
- }
-
- /* if current partial data, add to end of partial */
- /* if skipping, the data is already at the end of partial */
- if ( !skipPartial && (length = ssl->buffers.inputBuffer.length) ) {
- Trace(PARTIAL_ADD_STR);
-
- if ( (*sslBytes + length) > ssl->buffers.inputBuffer.bufferSize) {
- if (GrowInputBuffer(ssl, *sslBytes, length) < 0) {
- SetError(MEMORY_STR, error, *session, FATAL_ERROR_STATE);
- return -1;
- }
- }
- if (vChain == NULL) {
- XMEMCPY(&ssl->buffers.inputBuffer.buffer[length],
- *sslFrame, *sslBytes);
- *sslBytes += length;
- ssl->buffers.inputBuffer.length = *sslBytes;
- *sslFrame = ssl->buffers.inputBuffer.buffer;
- *end = *sslFrame + *sslBytes;
- }
- }
-
- if (vChain != NULL) {
-#ifdef WOLFSSL_SNIFFER_CHAIN_INPUT
- struct iovec* chain = (struct iovec*)vChain;
- word32 i, offset, headerSz, qty, remainder;
-
- Trace(CHAIN_INPUT_STR);
- headerSz = (word32)*sslFrame - (word32)chain[0].iov_base;
- remainder = *sslBytes;
-
- if ( (*sslBytes + length) > ssl->buffers.inputBuffer.bufferSize) {
- if (GrowInputBuffer(ssl, *sslBytes, length) < 0) {
- SetError(MEMORY_STR, error, *session, FATAL_ERROR_STATE);
- return -1;
- }
- }
-
- qty = min(*sslBytes, (word32)chain[0].iov_len - headerSz);
- XMEMCPY(&ssl->buffers.inputBuffer.buffer[length],
- (byte*)chain[0].iov_base + headerSz, qty);
- offset = length;
- for (i = 1; i < chainSz; i++) {
- offset += qty;
- remainder -= qty;
-
- if (chain[i].iov_len > remainder)
- qty = remainder;
- else
- qty = (word32)chain[i].iov_len;
- XMEMCPY(ssl->buffers.inputBuffer.buffer + offset,
- chain[i].iov_base, qty);
- }
-
- *sslBytes += length;
- ssl->buffers.inputBuffer.length = *sslBytes;
- *sslFrame = ssl->buffers.inputBuffer.buffer;
- *end = *sslFrame + *sslBytes;
-#endif
- (void)chainSz;
- }
-
- if ((*session)->flags.clientHello == 0 && **sslFrame != handshake) {
- /* Sanity check the packet for an old style client hello. */
- int rhSize = (((*sslFrame)[0] & 0x7f) << 8) | ((*sslFrame)[1]);
-
- if ((rhSize <= (*sslBytes - 2)) &&
- (*sslFrame)[2] == OLD_HELLO_ID && (*sslFrame)[3] == SSLv3_MAJOR) {
-#ifdef OLD_HELLO_ALLOWED
- int ret = DoOldHello(*session, *sslFrame, &rhSize, sslBytes, error);
- if (ret < 0)
- return -1; /* error already set */
- if (*sslBytes <= 0)
- return 1;
-#endif
- }
- else {
-#ifdef STARTTLS_ALLOWED
- if (ssl->buffers.inputBuffer.dynamicFlag) {
- ssl->buffers.inputBuffer.length = 0;
- ShrinkInputBuffer(ssl, NO_FORCED_FREE);
- }
- return 1;
-#endif
- }
- }
-
- return 0;
-}
-
-
-/* See if input on the reassembly list is ready for consuming */
-/* returns 1 for TRUE, 0 for FALSE */
-static int HaveMoreInput(SnifferSession* session, const byte** sslFrame,
- int* sslBytes, const byte** end, char* error)
-{
- /* sequence and reassembly based on from, not to */
- int moreInput = 0;
- PacketBuffer** front = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->cliReassemblyList : &session->srvReassemblyList;
- word32* expected = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->cliExpected : &session->srvExpected;
- /* buffer is on receiving end */
- word32* length = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->sslServer->buffers.inputBuffer.length :
- &session->sslClient->buffers.inputBuffer.length;
- byte** myBuffer = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->sslServer->buffers.inputBuffer.buffer :
- &session->sslClient->buffers.inputBuffer.buffer;
- word32* bufferSize = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->sslServer->buffers.inputBuffer.bufferSize :
- &session->sslClient->buffers.inputBuffer.bufferSize;
- WOLFSSL* ssl = (session->flags.side == WOLFSSL_SERVER_END) ?
- session->sslServer : session->sslClient;
- word32* reassemblyMemory = (session->flags.side == WOLFSSL_SERVER_END) ?
- &session->cliReassemblyMemory : &session->srvReassemblyMemory;
-
- while (*front && ((*front)->begin == *expected) ) {
- word32 room = *bufferSize - *length;
- word32 packetLen = (*front)->end - (*front)->begin + 1;
-
- if (packetLen > room && *bufferSize < MAX_INPUT_SZ) {
- if (GrowInputBuffer(ssl, packetLen, *length) < 0) {
- SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE);
- return 0;
- }
- room = *bufferSize - *length; /* bufferSize is now bigger */
- }
-
- if (packetLen <= room) {
- PacketBuffer* del = *front;
- byte* buf = *myBuffer;
-
- XMEMCPY(&buf[*length], (*front)->data, packetLen);
- *length += packetLen;
- *expected += packetLen;
-
- /* remove used packet */
- *front = (*front)->next;
-
- *reassemblyMemory -= packetLen;
- FreePacketBuffer(del);
-
- moreInput = 1;
- }
- else
- break;
- }
- if (moreInput) {
- *sslFrame = *myBuffer;
- *sslBytes = *length;
- *end = *myBuffer + *length;
- }
- return moreInput;
-}
-
-
-
-/* Process Message(s) from sslFrame */
-/* return Number of bytes on success, 0 for no data yet, and -1 on error */
-static int ProcessMessage(const byte* sslFrame, SnifferSession* session,
- int sslBytes, byte** data, const byte* end,
- void* ctx, char* error)
-{
- const byte* sslBegin = sslFrame;
- const byte* recordEnd; /* end of record indicator */
- const byte* inRecordEnd; /* indicator from input stream not decrypt */
- RecordLayerHeader rh;
- int rhSize = 0;
- int ret;
- int errCode = 0;
- int decoded = 0; /* bytes stored for user in data */
- int notEnough; /* notEnough bytes yet flag */
- int decrypted = 0; /* was current msg decrypted */
- WOLFSSL* ssl = (session->flags.side == WOLFSSL_SERVER_END) ?
- session->sslServer : session->sslClient;
-doMessage:
- notEnough = 0;
- if (sslBytes < 0) {
- SetError(PACKET_HDR_SHORT_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- if (sslBytes >= RECORD_HEADER_SZ) {
- if (GetRecordHeader(sslFrame, &rh, &rhSize) != 0) {
- SetError(BAD_RECORD_HDR_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- }
- else
- notEnough = 1;
-
- if (notEnough || rhSize > (sslBytes - RECORD_HEADER_SZ)) {
- /* don't have enough input yet to process full SSL record */
- Trace(PARTIAL_INPUT_STR);
-
- /* store partial if not there already or we advanced */
- if (ssl->buffers.inputBuffer.length == 0 || sslBegin != sslFrame) {
- if (sslBytes > (int)ssl->buffers.inputBuffer.bufferSize) {
- if (GrowInputBuffer(ssl, sslBytes, 0) < 0) {
- SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- }
- XMEMMOVE(ssl->buffers.inputBuffer.buffer, sslFrame, sslBytes);
- ssl->buffers.inputBuffer.length = sslBytes;
- }
- if (HaveMoreInput(session, &sslFrame, &sslBytes, &end, error))
- goto doMessage;
- return decoded;
- }
- sslFrame += RECORD_HEADER_SZ;
- sslBytes -= RECORD_HEADER_SZ;
- recordEnd = sslFrame + rhSize; /* may have more than one record */
- inRecordEnd = recordEnd;
-
- /* decrypt if needed */
- if ((session->flags.side == WOLFSSL_SERVER_END &&
- session->flags.serverCipherOn)
- || (session->flags.side == WOLFSSL_CLIENT_END &&
- session->flags.clientCipherOn)) {
- int ivAdvance = 0; /* TLSv1.1 advance amount */
- if (ssl->decrypt.setup != 1) {
- SetError(DECRYPT_KEYS_NOT_SETUP, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- if (CheckAvailableSize(ssl, rhSize) < 0) {
- SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- sslFrame = DecryptMessage(ssl, sslFrame, rhSize,
- ssl->buffers.outputBuffer.buffer, &errCode,
- &ivAdvance, &rh);
- recordEnd = sslFrame - ivAdvance + rhSize; /* sslFrame moved so
- should recordEnd */
- decrypted = 1;
-
-#ifdef WOLFSSL_SNIFFER_STATS
- if (errCode != 0) {
- INC_STAT(SnifferStats.sslKeyFails);
- }
- else {
- LOCK_STAT();
- NOLOCK_INC_STAT(SnifferStats.sslDecryptedPackets);
- NOLOCK_ADD_TO_STAT(SnifferStats.sslDecryptedBytes, sslBytes);
- UNLOCK_STAT();
- }
-#endif
- if (errCode != 0) {
- SetError(BAD_DECRYPT, error, session, FATAL_ERROR_STATE);
- return -1;
- }
- }
-
-doPart:
-
- switch ((enum ContentType)rh.type) {
- case handshake:
- {
- int startIdx = sslBytes;
- int used;
-
- Trace(GOT_HANDSHAKE_STR);
- ret = DoHandShake(sslFrame, &sslBytes, session, error);
- if (ret != 0) {
- if (session->flags.fatalError == 0)
- SetError(BAD_HANDSHAKE_STR, error, session,
- FATAL_ERROR_STATE);
- return -1;
- }
-
- /* DoHandShake now fully decrements sslBytes to remaining */
- used = startIdx - sslBytes;
- sslFrame += used;
- if (decrypted)
- sslFrame += ssl->keys.padSz;
- }
- break;
- case change_cipher_spec:
- if (session->flags.side == WOLFSSL_SERVER_END)
- session->flags.serverCipherOn = 1;
- else
- session->flags.clientCipherOn = 1;
- Trace(GOT_CHANGE_CIPHER_STR);
- ssl->options.handShakeState = HANDSHAKE_DONE;
- ssl->options.handShakeDone = 1;
-
- sslFrame += 1;
- sslBytes -= 1;
-
- break;
- case application_data:
- Trace(GOT_APP_DATA_STR);
- {
- word32 inOutIdx = 0;
-
- ret = DoApplicationData(ssl, (byte*)sslFrame, &inOutIdx);
- if (ret == 0) {
- ret = ssl->buffers.clearOutputBuffer.length;
- TraceGotData(ret);
- if (ret) { /* may be blank message */
- if (data != NULL) {
- byte* tmpData; /* don't leak on realloc free */
- /* add an extra byte at end of allocation in case
- * user wants to null terminate plaintext */
- tmpData = (byte*)XREALLOC(*data, decoded + ret + 1,
- NULL, DYNAMIC_TYPE_TMP_BUFFER);
- if (tmpData == NULL) {
- ForceZero(*data, decoded);
- XFREE(*data, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- *data = NULL;
- SetError(MEMORY_STR, error, session,
- FATAL_ERROR_STATE);
- return -1;
- }
- *data = tmpData;
- XMEMCPY(*data + decoded,
- ssl->buffers.clearOutputBuffer.buffer, ret);
- }
- else {
-#ifdef WOLFSSL_SNIFFER_STORE_DATA_CB
- if (StoreDataCb) {
- const byte* buf;
- word32 offset = 0;
- word32 bufSz;
- int stored;
-
- buf = ssl->buffers.clearOutputBuffer.buffer;
- bufSz = ssl->buffers.clearOutputBuffer.length;
- do {
- stored = StoreDataCb(buf, bufSz, offset,
- ctx);
- if (stored <= 0) {
- return -1;
- }
- offset += stored;
- } while (offset < bufSz);
- }
- else {
- SetError(STORE_DATA_CB_MISSING_STR, error,
- session, FATAL_ERROR_STATE);
- return -1;
- }
-#else
- (void)ctx;
- SetError(NO_DATA_DEST_STR, error, session,
- FATAL_ERROR_STATE);
- return -1;
-#endif
- }
- TraceAddedData(ret, decoded);
- decoded += ret;
- ssl->buffers.clearOutputBuffer.length = 0;
- }
- }
- else {
- SetError(BAD_APP_DATA_STR, error,session,FATAL_ERROR_STATE);
- return -1;
- }
- if (ssl->buffers.outputBuffer.dynamicFlag)
- ShrinkOutputBuffer(ssl);
-
- sslFrame += inOutIdx;
- sslBytes -= inOutIdx;
- }
- break;
- case alert:
- Trace(GOT_ALERT_STR);
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslAlerts);
-#endif
- sslFrame += rhSize;
- sslBytes -= rhSize;
- break;
- case no_type:
- default:
- SetError(GOT_UNKNOWN_RECORD_STR, error, session, FATAL_ERROR_STATE);
- return -1;
- }
-
- /* do we have another msg in record ? */
- if (sslFrame < recordEnd) {
- Trace(ANOTHER_MSG_STR);
- goto doPart;
- }
-
- /* back to input stream instead of potential decrypt buffer */
- recordEnd = inRecordEnd;
-
- /* do we have more records ? */
- if (recordEnd < end) {
- Trace(ANOTHER_MSG_STR);
- sslFrame = recordEnd;
- sslBytes = (int)(end - recordEnd);
- goto doMessage;
- }
-
- /* clear used input */
- ssl->buffers.inputBuffer.length = 0;
-
- /* could have more input ready now */
- if (HaveMoreInput(session, &sslFrame, &sslBytes, &end, error))
- goto doMessage;
-
- if (ssl->buffers.inputBuffer.dynamicFlag)
- ShrinkInputBuffer(ssl, NO_FORCED_FREE);
-
- return decoded;
-}
-
-
-/* See if we need to process any pending FIN captures */
-/* Return 0=normal, else = session removed */
-static int CheckFinCapture(IpInfo* ipInfo, TcpInfo* tcpInfo,
- SnifferSession* session)
-{
- int ret = 0;
- if (session->finCapture.cliFinSeq && session->finCapture.cliFinSeq <=
- session->cliExpected) {
- if (session->finCapture.cliCounted == 0) {
- session->flags.finCount += 1;
- session->finCapture.cliCounted = 1;
- TraceClientFin(session->finCapture.cliFinSeq, session->cliExpected);
- }
- }
-
- if (session->finCapture.srvFinSeq && session->finCapture.srvFinSeq <=
- session->srvExpected) {
- if (session->finCapture.srvCounted == 0) {
- session->flags.finCount += 1;
- session->finCapture.srvCounted = 1;
- TraceServerFin(session->finCapture.srvFinSeq, session->srvExpected);
- }
- }
-
- if (session->flags.finCount >= 2) {
- RemoveSession(session, ipInfo, tcpInfo, 0);
- ret = 1;
- }
- return ret;
-}
-
-
-/* If session is in fatal error state free resources now
- return true if removed, 0 otherwise */
-static int RemoveFatalSession(IpInfo* ipInfo, TcpInfo* tcpInfo,
- SnifferSession* session, char* error)
-{
- if (session && session->flags.fatalError == FATAL_ERROR_STATE) {
- RemoveSession(session, ipInfo, tcpInfo, 0);
- SetError(FATAL_ERROR_STR, error, NULL, 0);
- return 1;
- }
- return 0;
-}
-
-
-/* Passes in an IP/TCP packet for decoding (ethernet/localhost frame) removed */
-/* returns Number of bytes on success, 0 for no data yet, and -1 on error */
-static int ssl_DecodePacketInternal(const byte* packet, int length,
- void* vChain, word32 chainSz,
- byte** data, SSLInfo* sslInfo,
- void* ctx, char* error)
-{
- TcpInfo tcpInfo;
- IpInfo ipInfo;
- const byte* sslFrame;
- const byte* end;
- int sslBytes; /* ssl bytes unconsumed */
- int ret;
- SnifferSession* session = 0;
-
-#ifdef WOLFSSL_SNIFFER_CHAIN_INPUT
- if (packet == NULL && vChain != NULL) {
- struct iovec* chain = (struct iovec*)vChain;
- word32 i;
-
- length = 0;
- for (i = 0; i < chainSz; i++)
- length += chain[i].iov_len;
- packet = (const byte*)chain[0].iov_base;
- }
-#endif
-
- if (CheckHeaders(&ipInfo, &tcpInfo, packet, length, &sslFrame, &sslBytes,
- error) != 0)
- return -1;
-
- end = sslFrame + sslBytes;
-
- ret = CheckSession(&ipInfo, &tcpInfo, sslBytes, &session, error);
- if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1;
- else if (ret == -1) return -1;
- else if (ret == 1) {
-#ifdef WOLFSSL_SNIFFER_STATS
- if (sslBytes > 0) {
- LOCK_STAT();
- NOLOCK_INC_STAT(SnifferStats.sslEncryptedPackets);
- NOLOCK_ADD_TO_STAT(SnifferStats.sslEncryptedBytes, sslBytes);
- UNLOCK_STAT();
- }
- else
- INC_STAT(SnifferStats.sslDecryptedPackets);
-#endif
- return 0; /* done for now */
- }
-
- ret = CheckSequence(&ipInfo, &tcpInfo, session, &sslBytes, &sslFrame,error);
- if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1;
- else if (ret == -1) return -1;
- else if (ret == 1) {
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslDecryptedPackets);
-#endif
- return 0; /* done for now */
- }
-
- ret = CheckPreRecord(&ipInfo, &tcpInfo, &sslFrame, &session, &sslBytes,
- &end, vChain, chainSz, error);
- if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1;
- else if (ret == -1) return -1;
- else if (ret == 1) {
-#ifdef WOLFSSL_SNIFFER_STATS
- INC_STAT(SnifferStats.sslDecryptedPackets);
-#endif
- return 0; /* done for now */
- }
-
-#ifdef WOLFSSL_SNIFFER_STATS
- if (sslBytes > 0) {
- LOCK_STAT();
- NOLOCK_INC_STAT(SnifferStats.sslEncryptedPackets);
- NOLOCK_ADD_TO_STAT(SnifferStats.sslEncryptedBytes, sslBytes);
- UNLOCK_STAT();
- }
- else
- INC_STAT(SnifferStats.sslDecryptedPackets);
-#endif
-
- ret = ProcessMessage(sslFrame, session, sslBytes, data, end, ctx, error);
- if (RemoveFatalSession(&ipInfo, &tcpInfo, session, error)) return -1;
- if (CheckFinCapture(&ipInfo, &tcpInfo, session) == 0) {
- CopySessionInfo(session, sslInfo);
- }
-
- return ret;
-}
-
-
-/* Passes in an IP/TCP packet for decoding (ethernet/localhost frame) removed */
-/* returns Number of bytes on success, 0 for no data yet, and -1 on error */
-/* Also returns Session Info if available */
-int ssl_DecodePacketWithSessionInfo(const unsigned char* packet, int length,
- unsigned char** data, SSLInfo* sslInfo, char* error)
-{
- return ssl_DecodePacketInternal(packet, length, NULL, 0, data, sslInfo,
- NULL, error);
-}
-
-
-/* Passes in an IP/TCP packet for decoding (ethernet/localhost frame) removed */
-/* returns Number of bytes on success, 0 for no data yet, and -1 on error */
-int ssl_DecodePacket(const byte* packet, int length, byte** data, char* error)
-{
- return ssl_DecodePacketInternal(packet, length, NULL, 0, data, NULL, NULL,
- error);
-}
-
-
-#ifdef WOLFSSL_SNIFFER_STORE_DATA_CB
-
-int ssl_DecodePacketWithSessionInfoStoreData(const unsigned char* packet,
- int length, void* ctx, SSLInfo* sslInfo, char* error)
-{
- return ssl_DecodePacketInternal(packet, length, NULL, 0, NULL, sslInfo,
- ctx, error);
-}
-
-#endif
-
-
-#ifdef WOLFSSL_SNIFFER_CHAIN_INPUT
-
-int ssl_DecodePacketWithChain(void* vChain, word32 chainSz, byte** data,
- char* error)
-{
- return ssl_DecodePacketInternal(NULL, 0, vChain, chainSz, data, NULL, NULL,
- error);
-}
-
-#endif
-
-
-#if defined(WOLFSSL_SNIFFER_CHAIN_INPUT) && \
- defined(WOLFSSL_SNIFFER_STORE_DATA_CB)
-
-int ssl_DecodePacketWithChainSessionInfoStoreData(void* vChain, word32 chainSz,
- void* ctx, SSLInfo* sslInfo, char* error)
-{
- return ssl_DecodePacketInternal(NULL, 0, vChain, chainSz, NULL, sslInfo,
- ctx, error);
-}
-
-#endif
-
-
-/* Deallocator for the decoded data buffer. */
-/* returns 0 on success, -1 on error */
-int ssl_FreeDecodeBuffer(byte** data, char* error)
-{
- return ssl_FreeZeroDecodeBuffer(data, 0, error);
-}
-
-
-/* Deallocator for the decoded data buffer, zeros out buffer. */
-/* returns 0 on success, -1 on error */
-int ssl_FreeZeroDecodeBuffer(byte** data, int sz, char* error)
-{
- (void)error;
-
- if (sz < 0) {
- return -1;
- }
-
- if (data != NULL) {
- ForceZero(*data, (word32)sz);
- XFREE(*data, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- *data = NULL;
- }
-
- return 0;
-}
-
-
-/* Enables (if traceFile)/ Disables debug tracing */
-/* returns 0 on success, -1 on error */
-int ssl_Trace(const char* traceFile, char* error)
-{
- if (traceFile) {
- /* Don't try to reopen the file */
- if (TraceFile == NULL) {
- TraceFile = fopen(traceFile, "a");
- if (!TraceFile) {
- SetError(BAD_TRACE_FILE_STR, error, NULL, 0);
- return -1;
- }
- TraceOn = 1;
- }
- }
- else
- TraceOn = 0;
-
- return 0;
-}
-
-
-/* Enables/Disables Recovery of missed data if later packets allow
- * maxMemory is number of bytes to use for reassembly buffering per session,
- * -1 means unlimited
- * returns 0 on success, -1 on error */
-int ssl_EnableRecovery(int onOff, int maxMemory, char* error)
-{
- (void)error;
-
- RecoveryEnabled = onOff;
- if (onOff)
- MaxRecoveryMemory = maxMemory;
-
- return 0;
-}
-
-
-
-#ifdef WOLFSSL_SESSION_STATS
-
-int ssl_GetSessionStats(unsigned int* active, unsigned int* total,
- unsigned int* peak, unsigned int* maxSessions,
- unsigned int* missedData, unsigned int* reassemblyMem,
- char* error)
-{
- int ret;
-
- if (missedData) {
- wc_LockMutex(&RecoveryMutex);
- *missedData = MissedDataSessions;
- wc_UnLockMutex(&RecoveryMutex);
- }
-
- if (reassemblyMem) {
- SnifferSession* session;
- int i;
-
- *reassemblyMem = 0;
- wc_LockMutex(&SessionMutex);
- for (i = 0; i < HASH_SIZE; i++) {
- session = SessionTable[i];
- while (session) {
- *reassemblyMem += session->cliReassemblyMemory;
- *reassemblyMem += session->srvReassemblyMemory;
- session = session->next;
- }
- }
- wc_UnLockMutex(&SessionMutex);
- }
-
- ret = wolfSSL_get_session_stats(active, total, peak, maxSessions);
-
- if (ret == WOLFSSL_SUCCESS)
- return 0;
- else {
- SetError(BAD_SESSION_STATS, error, NULL, 0);
- return -1;
- }
-}
-
-#endif
-
-
-
-int ssl_SetConnectionCb(SSLConnCb cb)
-{
- ConnectionCb = cb;
- return 0;
-}
-
-
-
-int ssl_SetConnectionCtx(void* ctx)
-{
- ConnectionCbCtx = ctx;
- return 0;
-}
-
-
-#ifdef WOLFSSL_SNIFFER_STATS
-
-/* Resets the statistics tracking global structure.
- * returns 0 on success, -1 on error */
-int ssl_ResetStatistics(void)
-{
- wc_LockMutex(&StatsMutex);
- XMEMSET(&SnifferStats, 0, sizeof(SSLStats));
- wc_UnLockMutex(&StatsMutex);
- return 0;
-}
-
-
-/* Copies the SSL statistics into the provided stats record.
- * returns 0 on success, -1 on error */
-int ssl_ReadStatistics(SSLStats* stats)
-{
- if (stats == NULL)
- return -1;
-
- LOCK_STAT();
- XMEMCPY(stats, &SnifferStats, sizeof(SSLStats));
- UNLOCK_STAT();
- return 0;
-}
-
-/* Copies the SSL statistics into the provided stats record then
- * resets the statistics tracking global structure.
- * returns 0 on success, -1 on error */
-int ssl_ReadResetStatistics(SSLStats* stats)
-{
- if (stats == NULL)
- return -1;
-
- LOCK_STAT();
- XMEMCPY(stats, &SnifferStats, sizeof(SSLStats));
- XMEMSET(&SnifferStats, 0, sizeof(SSLStats));
- UNLOCK_STAT();
- return 0;
-}
-
-#endif /* WOLFSSL_SNIFFER_STATS */
-
-
-#ifdef WOLFSSL_SNIFFER_WATCH
-
-int ssl_SetWatchKeyCallback_ex(SSLWatchCb cb, int devId, char* error)
-{
- (void)devId;
- WatchCb = cb;
- return CreateWatchSnifferServer(error);
-}
-
-
-int ssl_SetWatchKeyCallback(SSLWatchCb cb, char* error)
-{
- WatchCb = cb;
- return CreateWatchSnifferServer(error);
-}
-
-
-int ssl_SetWatchKeyCtx(void* ctx, char* error)
-{
- (void)error;
- WatchCbCtx = ctx;
- return 0;
-}
-
-
-int ssl_SetWatchKey_buffer(void* vSniffer, const byte* key, word32 keySz,
- int keyType, char* error)
-{
- SnifferSession* sniffer;
- int ret;
-
- if (vSniffer == NULL) {
- return -1;
- }
- if (key == NULL || keySz == 0) {
- return -1;
- }
-
- sniffer = (SnifferSession*)vSniffer;
- /* Remap the keyType from what the user can use to
- * what wolfSSL_use_PrivateKey_buffer expects. */
- keyType = (keyType == FILETYPE_PEM) ? WOLFSSL_FILETYPE_PEM :
- WOLFSSL_FILETYPE_ASN1;
-
- ret = wolfSSL_use_PrivateKey_buffer(sniffer->sslServer,
- key, keySz, keyType);
- if (ret != WOLFSSL_SUCCESS) {
- SetError(KEY_FILE_STR, error, sniffer, FATAL_ERROR_STATE);
- return -1;
- }
-
- return 0;
-}
-
-
-int ssl_SetWatchKey_file(void* vSniffer, const char* keyFile, int keyType,
- const char* password, char* error)
-{
- byte* keyBuf = NULL;
- word32 keyBufSz = 0;
- int ret;
-
- if (vSniffer == NULL) {
- return -1;
- }
- if (keyFile == NULL) {
- return -1;
- }
-
- /* Remap the keyType from what the user can use to
- * what LoadKeyFile expects. */
- keyType = (keyType == FILETYPE_PEM) ? WOLFSSL_FILETYPE_PEM :
- WOLFSSL_FILETYPE_ASN1;
-
- ret = LoadKeyFile(&keyBuf, &keyBufSz, keyFile, 0, keyType, password);
- if (ret < 0) {
- SetError(KEY_FILE_STR, error, NULL, 0);
- XFREE(keyBuf, NULL, DYNAMIC_TYPE_X509);
- return -1;
- }
-
- ret = ssl_SetWatchKey_buffer(vSniffer, keyBuf, keyBufSz, FILETYPE_DER,
- error);
- XFREE(keyBuf, NULL, DYNAMIC_TYPE_X509);
-
- return ret;
-}
-
-#endif /* WOLFSSL_SNIFFER_WATCH */
-
-
-#ifdef WOLFSSL_SNIFFER_STORE_DATA_CB
-
-int ssl_SetStoreDataCallback(SSLStoreDataCb cb)
-{
- StoreDataCb = cb;
- return 0;
-}
-
-#endif /* WOLFSSL_SNIFFER_STORE_DATA_CB */
-
-#endif /* WOLFSSL_SNIFFER */
-#endif /* WOLFCRYPT_ONLY */
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-internal.lo b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-internal.lo
deleted file mode 100644
index ecac7f4534..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-internal.lo
+++ /dev/null
@@ -1,12 +0,0 @@
-# src/src_libwolfssl_la-internal.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/src_libwolfssl_la-internal.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-keys.lo b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-keys.lo
deleted file mode 100644
index 7b7afbcfbc..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-keys.lo
+++ /dev/null
@@ -1,12 +0,0 @@
-# src/src_libwolfssl_la-keys.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/src_libwolfssl_la-keys.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-ssl.lo b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-ssl.lo
deleted file mode 100644
index 885a2445fb..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-ssl.lo
+++ /dev/null
@@ -1,12 +0,0 @@
-# src/src_libwolfssl_la-ssl.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/src_libwolfssl_la-ssl.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-tls.lo b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-tls.lo
deleted file mode 100644
index c9b808256f..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-tls.lo
+++ /dev/null
@@ -1,12 +0,0 @@
-# src/src_libwolfssl_la-tls.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/src_libwolfssl_la-tls.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-wolfio.lo b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-wolfio.lo
deleted file mode 100644
index acdb191e1b..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/src_libwolfssl_la-wolfio.lo
+++ /dev/null
@@ -1,12 +0,0 @@
-# src/src_libwolfssl_la-wolfio.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/src_libwolfssl_la-wolfio.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
diff --git a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/ssl.c b/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/ssl.c
deleted file mode 100644
index c908aaacf6..0000000000
--- a/FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/ssl.c
+++ /dev/null
@@ -1,48572 +0,0 @@
-/* ssl.c
- *
- * Copyright (C) 2006-2020 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * wolfSSL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
- */
-
-
-#ifdef HAVE_CONFIG_H
- #include
-#endif
-
-#include
-#if defined(OPENSSL_EXTRA) && !defined(_WIN32)
- /* turn on GNU extensions for XVASPRINTF with wolfSSL_BIO_printf */
- #undef _GNU_SOURCE
- #define _GNU_SOURCE
-#endif
-
-#if !defined(WOLFCRYPT_ONLY) || defined(OPENSSL_EXTRA) || \
- defined(OPENSSL_EXTRA_X509_SMALL)
-
-#ifdef HAVE_ERRNO_H
- #include
-#endif
-
-#include