diff --git a/CMakeLists.txt b/CMakeLists.txt index 51889ebec..3858aed84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1963,7 +1963,6 @@ else() set(WOLFSSL_OUTPUT_BASE ${CMAKE_CURRENT_SOURCE_DIR}) endif() set(OPTION_FILE "${WOLFSSL_OUTPUT_BASE}/wolfssl/options.h") -set(CYASSL_OPTION_FILE "${WOLFSSL_OUTPUT_BASE}/cyassl/options.h") file(REMOVE ${OPTION_FILE}) @@ -1993,14 +1992,6 @@ file(APPEND ${OPTION_FILE} "}\n") file(APPEND ${OPTION_FILE} "#endif\n\n\n") file(APPEND ${OPTION_FILE} "#endif /* WOLFSSL_OPTIONS_H */\n\n") -# backwards compatibility for those who have included options or version -file(REMOVE ${CYASSL_OPTION_FILE}) -file(APPEND ${CYASSL_OPTION_FILE} "/* cyassl options.h\n") -file(APPEND ${CYASSL_OPTION_FILE} " * generated from wolfssl/options.h\n") -file(APPEND ${CYASSL_OPTION_FILE} " */\n") -file(READ ${OPTION_FILE} OPTION_FILE_CONTENTS) -file(APPEND ${CYASSL_OPTION_FILE} ${OPTION_FILE_CONTENTS}) - #################################################### # Library Target #################################################### @@ -2206,7 +2197,6 @@ include(GNUInstallDirs) set(HEADER_EXCLUDE "internal.h" - "cyassl/ctaocrypt/port" "wolfssl/wolfcrypt/port/nrf51.h" "wolfssl/wolfcrypt/port/arm" "wolfssl/wolfcrypt/port/cypress" @@ -2351,19 +2341,10 @@ install(DIRECTORY ${WOLFSSL_OUTPUT_BASE}/wolfssl/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wolfssl FILES_MATCHING PATTERN "*.h" REGEX ${EXCLUDED_HEADERS_REGEX} EXCLUDE) -install(DIRECTORY ${WOLFSSL_OUTPUT_BASE}/cyassl/ - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cyassl - FILES_MATCHING PATTERN "*.h" - REGEX ${EXCLUDED_HEADERS_REGEX} EXCLUDE) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wolfssl FILES_MATCHING PATTERN "*.h" REGEX ${EXCLUDED_HEADERS_REGEX} EXCLUDE) -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cyassl/ - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cyassl - FILES_MATCHING PATTERN "*.h" - REGEX ${EXCLUDED_HEADERS_REGEX} EXCLUDE) - # Install the examples install(FILES ${INSTALLED_EXAMPLES} diff --git a/IDE/WIN/test.vcxproj b/IDE/WIN/test.vcxproj index 81b3668b8..217597557 100644 --- a/IDE/WIN/test.vcxproj +++ b/IDE/WIN/test.vcxproj @@ -111,7 +111,7 @@ Disabled .\;..\..\;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -130,7 +130,7 @@ Disabled .\;..\..\;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -147,7 +147,7 @@ .\;..\..\;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL Level3 @@ -168,7 +168,7 @@ .\;..\..\;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL Level3 @@ -188,7 +188,7 @@ Disabled .\;..\..\;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -208,7 +208,7 @@ Disabled .\;..\..\;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) + _DEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -226,7 +226,7 @@ .\;..\..\;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) MultiThreadedDLL Level3 @@ -246,7 +246,7 @@ .\;..\..\;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;HAVE_FIPS;USE_CERT_BUFFERS_2048;WOLFSSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) MultiThreadedDLL Level3 diff --git a/IDE/WIN/wolfssl-fips.vcxproj b/IDE/WIN/wolfssl-fips.vcxproj index 3bfb4cd3b..a27574f4a 100644 --- a/IDE/WIN/wolfssl-fips.vcxproj +++ b/IDE/WIN/wolfssl-fips.vcxproj @@ -121,7 +121,7 @@ Disabled ./;../../;%(AdditionalIncludeDirectories) - HAVE_FIPS;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + HAVE_FIPS;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Level4 @@ -133,7 +133,7 @@ Disabled ./;../../;%(AdditionalIncludeDirectories) - HAVE_FIPS;BUILDING_WOLFSSL;CYASSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + HAVE_FIPS;BUILDING_WOLFSSL;CYASSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -152,7 +152,7 @@ Disabled ./;../../;%(AdditionalIncludeDirectories) - HAVE_FIPS;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + HAVE_FIPS;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Level4 @@ -164,7 +164,7 @@ Disabled ./;../../;%(AdditionalIncludeDirectories) - HAVE_FIPS;BUILDING_WOLFSSL;CYASSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + HAVE_FIPS;BUILDING_WOLFSSL;CYASSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -183,7 +183,7 @@ MaxSpeed true ./;../../;%(AdditionalIncludeDirectories) - WIN32;HAVE_FIPS;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;HAVE_FIPS;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 @@ -196,7 +196,7 @@ MaxSpeed true ./;../../;%(AdditionalIncludeDirectories) - HAVE_FIPS;BUILDING_WOLFSSL;CYASSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + HAVE_FIPS;BUILDING_WOLFSSL;CYASSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 @@ -213,7 +213,7 @@ MaxSpeed true ./;../../;%(AdditionalIncludeDirectories) - HAVE_FIPS;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + HAVE_FIPS;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 @@ -226,7 +226,7 @@ MaxSpeed true ./;../../;%(AdditionalIncludeDirectories) - HAVE_FIPS;BUILDING_WOLFSSL;CYASSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + HAVE_FIPS;BUILDING_WOLFSSL;CYASSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 diff --git a/IDE/WIN10/test.vcxproj b/IDE/WIN10/test.vcxproj index 850354bbb..36657348d 100644 --- a/IDE/WIN10/test.vcxproj +++ b/IDE/WIN10/test.vcxproj @@ -208,7 +208,7 @@ Disabled .\;..\..\;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;HAVE_FIPS;HAVE_FIPS_VERSION=5;HAVE_FIPS_VERSION_MINOR=1;USE_CERT_BUFFERS_2048;USE_CERT_BUFFERS_256;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;HAVE_FIPS;HAVE_FIPS_VERSION=5;HAVE_FIPS_VERSION_MINOR=1;USE_CERT_BUFFERS_2048;USE_CERT_BUFFERS_256;WOLFSSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL diff --git a/Makefile.am b/Makefile.am index f3decb03c..8a54b29aa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -161,7 +161,6 @@ EXTRA_DIST+= m4/ax_atomic.m4 include cmake/include.am include wrapper/include.am -include cyassl/include.am include wolfssl/include.am include certs/include.am include doc/include.am @@ -245,7 +244,6 @@ test: check tests/unit.log: testsuite/testsuite.log scripts/unit.log: testsuite/testsuite.log -DISTCLEANFILES+= cyassl-config DISTCLEANFILES+= wolfssl-config MAINTAINERCLEANFILES+= wolfssl/wolfcrypt/async.h @@ -267,7 +265,6 @@ maintainer-clean-local: -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 diff --git a/autogen.sh b/autogen.sh index c5d55d0d0..6750b5bb1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -30,8 +30,6 @@ done for file in \ ./wolfssl/options.h \ - ./ctaocrypt/src/fips.c \ - ./ctaocrypt/src/fips_test.c \ ./wolfcrypt/src/fips.c \ ./wolfcrypt/src/fips_test.c \ ./wolfcrypt/src/wolfcrypt_first.c \ diff --git a/cmake/functions.cmake b/cmake/functions.cmake index f0fc48c2e..51c1e8410 100644 --- a/cmake/functions.cmake +++ b/cmake/functions.cmake @@ -321,43 +321,6 @@ function(generate_lib_src_list LIB_SOURCES) # Corresponds to src/include.am if(BUILD_FIPS) - if(BUILD_FIPS_V1) - # fips first file - list(APPEND LIB_SOURCES ctaocrypt/src/wolfcrypt_first.c) - - list(APPEND LIB_SOURCES - ctaocrypt/src/hmac.c - ctaocrypt/src/random.c - ctaocrypt/src/sha256.c) - - if(BUILD_RSA) - list(APPEND LIB_SOURCES ctaocrypt/src/rsa.c) - endif() - - if(BUILD_AES) - list(APPEND LIB_SOURCES ctaocrypt/src/aes.c) - endif() - - if(BUILD_DES3) - list(APPEND LIB_SOURCES ctaocrypt/src/des3.c) - endif() - - if(BUILD_SHA) - list(APPEND LIB_SOURCES ctaocrypt/src/sha.c) - endif() - - if(BUILD_SHA512) - list(APPEND LIB_SOURCES ctaocrypt/src/sha512.c) - endif() - - list(APPEND LIB_SOURCES - ctaocrypt/src/fips.c - ctaocrypt/src/fips_test.c) - - # fips last file - list(APPEND LIB_SOURCES ctaocrypt/src/wolfcrypt_last.c) - endif() - if(BUILD_FIPS_V2) # FIPSv2 first file list(APPEND LIB_SOURCES wolfcrypt/src/wolfcrypt_first.c) diff --git a/configure.ac b/configure.ac index f715c7423..8a767fc54 100644 --- a/configure.ac +++ b/configure.ac @@ -417,16 +417,11 @@ fi AS_CASE([$FIPS_VERSION], [none], [ - AS_IF([ test -s $srcdir/wolfcrypt/src/fips.c -o -s $srcdir/ctaocrypt/src/fips.c ], + AS_IF([ test -s $srcdir/wolfcrypt/src/fips.c ], [AC_MSG_ERROR([FIPS source tree is incompatible with non-FIPS build (requires --enable-fips)])]) ], [disabled], [], - [v1], - [ - AS_IF([ ! test -s $srcdir/ctaocrypt/src/fips.c], - [AC_MSG_ERROR([non-FIPS-v1 source tree is incompatible with --enable-fips=$enableval])]) - ], [ AS_IF([ ! test -s $srcdir/wolfcrypt/src/fips.c], [AC_MSG_ERROR([non-FIPS source tree is incompatible with --enable-fips=$enableval])]) @@ -9015,7 +9010,6 @@ 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 wolfcrypt/test/test_paths.h @@ -9159,28 +9153,6 @@ echo "" >> $OPTION_FILE echo "#endif /* WOLFSSL_OPTIONS_H */" >> $OPTION_FILE echo "" >> $OPTION_FILE -#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 - -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 preserve permissions -case $host_os in - mingw*) - chmod u+w cyassl/options.h ;; -esac - -rm cyassl/options.h.bak - if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "$ENABLED_LINUXKM" = "no" then SAVE_CFLAGS=$CFLAGS diff --git a/ctaocrypt/ctaocrypt.sln b/ctaocrypt/ctaocrypt.sln deleted file mode 100644 index f2154d0d0..000000000 --- a/ctaocrypt/ctaocrypt.sln +++ /dev/null @@ -1,38 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctaocrypt", "ctaocrypt.vcproj", "{BF0EA0C1-3F4C-4767-B79E-7B2A391F7D62}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcproj", "{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}" - ProjectSection(ProjectDependencies) = postProject - {BF0EA0C1-3F4C-4767-B79E-7B2A391F7D62} = {BF0EA0C1-3F4C-4767-B79E-7B2A391F7D62} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchmark", "benchmark\benchmark.vcproj", "{615AEC46-5595-4DEA-9490-DBD5DE0F8772}" - ProjectSection(ProjectDependencies) = postProject - {BF0EA0C1-3F4C-4767-B79E-7B2A391F7D62} = {BF0EA0C1-3F4C-4767-B79E-7B2A391F7D62} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BF0EA0C1-3F4C-4767-B79E-7B2A391F7D62}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF0EA0C1-3F4C-4767-B79E-7B2A391F7D62}.Debug|Win32.Build.0 = Debug|Win32 - {BF0EA0C1-3F4C-4767-B79E-7B2A391F7D62}.Release|Win32.ActiveCfg = Release|Win32 - {BF0EA0C1-3F4C-4767-B79E-7B2A391F7D62}.Release|Win32.Build.0 = Release|Win32 - {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|Win32.ActiveCfg = Debug|Win32 - {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|Win32.Build.0 = Debug|Win32 - {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|Win32.ActiveCfg = Release|Win32 - {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|Win32.Build.0 = Release|Win32 - {615AEC46-5595-4DEA-9490-DBD5DE0F8772}.Debug|Win32.ActiveCfg = Debug|Win32 - {615AEC46-5595-4DEA-9490-DBD5DE0F8772}.Debug|Win32.Build.0 = Debug|Win32 - {615AEC46-5595-4DEA-9490-DBD5DE0F8772}.Release|Win32.ActiveCfg = Release|Win32 - {615AEC46-5595-4DEA-9490-DBD5DE0F8772}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ctaocrypt/ctaocrypt.vcproj b/ctaocrypt/ctaocrypt.vcproj deleted file mode 100644 index 29ef4d1bd..000000000 --- a/ctaocrypt/ctaocrypt.vcproj +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ctaocrypt/src/aes.c b/ctaocrypt/src/aes.c deleted file mode 100644 index e9f588667..000000000 --- a/ctaocrypt/src/aes.c +++ /dev/null @@ -1 +0,0 @@ -/* dummy file for autoconf */ diff --git a/ctaocrypt/src/des3.c b/ctaocrypt/src/des3.c deleted file mode 100644 index e9f588667..000000000 --- a/ctaocrypt/src/des3.c +++ /dev/null @@ -1 +0,0 @@ -/* dummy file for autoconf */ diff --git a/ctaocrypt/src/hmac.c b/ctaocrypt/src/hmac.c deleted file mode 100644 index e9f588667..000000000 --- a/ctaocrypt/src/hmac.c +++ /dev/null @@ -1 +0,0 @@ -/* dummy file for autoconf */ diff --git a/ctaocrypt/src/misc.c b/ctaocrypt/src/misc.c deleted file mode 100644 index d31462fe4..000000000 --- a/ctaocrypt/src/misc.c +++ /dev/null @@ -1,29 +0,0 @@ -/* misc.c - * - * Copyright (C) 2006-2023 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 2 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 NO_INLINE - #include -#else - /* for inline includes */ - #define WOLFSSL_MISC_INCLUDED - #include -#endif diff --git a/ctaocrypt/src/random.c b/ctaocrypt/src/random.c deleted file mode 100644 index e9f588667..000000000 --- a/ctaocrypt/src/random.c +++ /dev/null @@ -1 +0,0 @@ -/* dummy file for autoconf */ diff --git a/ctaocrypt/src/rsa.c b/ctaocrypt/src/rsa.c deleted file mode 100644 index e9f588667..000000000 --- a/ctaocrypt/src/rsa.c +++ /dev/null @@ -1 +0,0 @@ -/* dummy file for autoconf */ diff --git a/ctaocrypt/src/sha.c b/ctaocrypt/src/sha.c deleted file mode 100644 index e9f588667..000000000 --- a/ctaocrypt/src/sha.c +++ /dev/null @@ -1 +0,0 @@ -/* dummy file for autoconf */ diff --git a/ctaocrypt/src/sha256.c b/ctaocrypt/src/sha256.c deleted file mode 100644 index e9f588667..000000000 --- a/ctaocrypt/src/sha256.c +++ /dev/null @@ -1 +0,0 @@ -/* dummy file for autoconf */ diff --git a/ctaocrypt/src/sha512.c b/ctaocrypt/src/sha512.c deleted file mode 100644 index e9f588667..000000000 --- a/ctaocrypt/src/sha512.c +++ /dev/null @@ -1 +0,0 @@ -/* dummy file for autoconf */ diff --git a/ctaocrypt/src/wolfcrypt_first.c b/ctaocrypt/src/wolfcrypt_first.c deleted file mode 100644 index cfbe5a179..000000000 --- a/ctaocrypt/src/wolfcrypt_first.c +++ /dev/null @@ -1,54 +0,0 @@ -/* wolfcrypt_first.c - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -/* This file needs to be linked first in order to work correctly */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -/* in case user set HAVE_FIPS there */ -#include - -#ifdef HAVE_FIPS - -#ifdef USE_WINDOWS_API - #pragma code_seg(".fipsA$a") - #pragma const_seg(".fipsB$a") -#endif - - -/* read only start address */ -const unsigned int wolfCrypt_FIPS_ro_start[] = -{ 0x1a2b3c4d, 0x00000001 }; - - -/* first function of text/code segment */ -int wolfCrypt_FIPS_first(void); -int wolfCrypt_FIPS_first(void) -{ - return 0; -} - - -#endif /* HAVE_FIPS */ - diff --git a/ctaocrypt/src/wolfcrypt_last.c b/ctaocrypt/src/wolfcrypt_last.c deleted file mode 100644 index 472f358f9..000000000 --- a/ctaocrypt/src/wolfcrypt_last.c +++ /dev/null @@ -1,54 +0,0 @@ -/* wolfcrypt_last.c - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -/* This file needs to be linked last in order to work correctly */ - -#ifdef HAVE_CONFIG_H - #include -#endif - -/* in case user set HAVE_FIPS there */ -#include - -#ifdef HAVE_FIPS - -#ifdef USE_WINDOWS_API - #pragma code_seg(".fipsA$l") - #pragma const_seg(".fipsB$l") -#endif - - -/* last function of text/code segment */ -int wolfCrypt_FIPS_last(void); -int wolfCrypt_FIPS_last(void) -{ - return 0; -} - - -/* read only end address */ -const unsigned int wolfCrypt_FIPS_ro_end[] = -{ 0x1a2b3c4d, 0xffffffff }; - - -#endif /* HAVE_FIPS */ - diff --git a/cyassl/callbacks.h b/cyassl/callbacks.h deleted file mode 100644 index 7a288c026..000000000 --- a/cyassl/callbacks.h +++ /dev/null @@ -1,23 +0,0 @@ -/* callbacks.h - * - * Copyright (C) 2006-2023 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 2 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 diff --git a/cyassl/certs_test.h b/cyassl/certs_test.h deleted file mode 100644 index c8465ac85..000000000 --- a/cyassl/certs_test.h +++ /dev/null @@ -1,10 +0,0 @@ -/* certs_test.h */ - -#include - -#ifndef CYASSL_CERTS_TEST_H - #define CYASSL_CERTS_TEST_H WOLFSSL_CERTS_TEST_H -#else - #undef CYASSL_CERTS_TEST_H - #define CYASSL_CERTS_TEST_H WOLFSSL_CERTS_TEST_H -#endif diff --git a/cyassl/crl.h b/cyassl/crl.h deleted file mode 100644 index 8a8da6f46..000000000 --- a/cyassl/crl.h +++ /dev/null @@ -1,23 +0,0 @@ -/* crl.h - * - * Copyright (C) 2006-2023 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 2 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 diff --git a/cyassl/ctaocrypt/aes.h b/cyassl/ctaocrypt/aes.h deleted file mode 100644 index 023b7871a..000000000 --- a/cyassl/ctaocrypt/aes.h +++ /dev/null @@ -1,61 +0,0 @@ -/* aes.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef NO_AES - -#ifndef CTAO_CRYPT_AES_H -#define CTAO_CRYPT_AES_H - -#include -#define AesSetKey wc_AesSetKey -#define AesSetIV wc_AesSetIV -#define AesCbcEncrypt wc_AesCbcEncrypt -#define AesCbcDecrypt wc_AesCbcDecrypt -#define AesCbcDecryptWithKey wc_AesCbcDecryptWithKey - -/* AES-CTR */ -#ifdef WOLFSSL_AES_COUNTER - #define AesCtrEncrypt wc_AesCtrEncrypt -#endif -/* AES-DIRECT */ -#if defined(WOLFSSL_AES_DIRECT) - #define AesEncryptDirect wc_AesEncryptDirect - #define AesDecryptDirect wc_AesDecryptDirect - #define AesSetKeyDirect wc_AesSetKeyDirect -#endif -#ifdef HAVE_AESGCM - #define AesGcmSetKey wc_AesGcmSetKey - #define AesGcmEncrypt wc_AesGcmEncrypt - #define AesGcmDecrypt wc_AesGcmDecrypt - #define GmacSetKey wc_GmacSetKey - #define GmacUpdate wc_GmacUpdate -#endif /* HAVE_AESGCM */ -#ifdef HAVE_AESCCM - #define AesCcmSetKey wc_AesCcmSetKey - #define AesCcmEncrypt wc_AesCcmEncrypt - #define AesCcmDecrypt wc_AesCcmDecrypt -#endif /* HAVE_AESCCM */ - -#endif /* CTAO_CRYPT_AES_H */ -#endif /* NO_AES */ - diff --git a/cyassl/ctaocrypt/arc4.h b/cyassl/ctaocrypt/arc4.h deleted file mode 100644 index c30f0b64a..000000000 --- a/cyassl/ctaocrypt/arc4.h +++ /dev/null @@ -1,36 +0,0 @@ -/* arc4.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -#ifndef CTAO_CRYPT_ARC4_H -#define CTAO_CRYPT_ARC4_H - -/* for arc4 reverse compatibility */ -#ifndef NO_RC4 -#include - #define Arc4Process wc_Arc4Process - #define Arc4SetKey wc_Arc4SetKey - #define Arc4AsyncInit wc_Arc4AsyncInit - #define Arc4AsyncFree wc_Arc4AsyncFree -#endif - -#endif /* CTAO_CRYPT_ARC4_H */ - diff --git a/cyassl/ctaocrypt/asn.h b/cyassl/ctaocrypt/asn.h deleted file mode 100644 index a1d05a71d..000000000 --- a/cyassl/ctaocrypt/asn.h +++ /dev/null @@ -1,48 +0,0 @@ -/* asn.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -#ifndef NO_ASN - -#ifndef CTAO_CRYPT_ASN_H -#define CTAO_CRYPT_ASN_H - -/* pull in compatibility for each include */ -#include -#include -#include -#include -#include /* public interface */ -#ifdef HAVE_ECC - #include -#endif - - -#include - -#ifndef NO_FILESYSTEM - #define CyaSSL_PemCertToDer wc_PemCertToDer -#endif - -#endif /* CTAO_CRYPT_ASN_H */ - -#endif /* !NO_ASN */ - diff --git a/cyassl/ctaocrypt/asn_public.h b/cyassl/ctaocrypt/asn_public.h deleted file mode 100644 index bc4cd182b..000000000 --- a/cyassl/ctaocrypt/asn_public.h +++ /dev/null @@ -1,75 +0,0 @@ -/* asn_public.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef CTAO_CRYPT_ASN_PUBLIC_H -#define CTAO_CRYPT_ASN_PUBLIC_H - -/* pull in compatibility for each of the includes */ -#include -#include -#include -#ifdef WOLFSSL_CERT_GEN - #include -#endif - -#include -#ifdef WOLFSSL_CERT_GEN - #define InitCert wc_InitCert - #define MakeCert wc_MakeCert - - #ifdef WOLFSSL_CERT_REQ - #define MakeCertReq wc_MakeCertReq -#endif - - #define SignCert wc_SignCert - #define MakeSelfCert wc_MakeSelfCert - #define SetIssuer wc_SetIssuer - #define SetSubject wc_SetSubject - - #ifdef WOLFSSL_ALT_NAMES - #define SetAltNames wc_SetAltNames -#endif - - #define SetIssuerBuffer wc_SetIssuerBuffer - #define SetSubjectBuffer wc_SetSubjectBuffer - #define SetAltNamesBuffer wc_SetAltNamesBuffer - #define SetDatesBuffer wc_SetDatesBuffer - -#endif /* WOLFSSL_CERT_GEN */ - - #if defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN) - #define DerToPem wc_DerToPem -#endif - -#ifdef HAVE_ECC - /* private key helpers */ - #define EccPrivateKeyDecode wc_EccPrivateKeyDecode - #define EccKeyToDer wc_EccKeyToDer -#endif - - /* DER encode signature */ - #define EncodeSignature wc_EncodeSignature - #define GetCTC_HashOID wc_GetCTC_HashOID - -#endif /* CTAO_CRYPT_ASN_PUBLIC_H */ - diff --git a/cyassl/ctaocrypt/blake2-impl.h b/cyassl/ctaocrypt/blake2-impl.h deleted file mode 100644 index 2efe53861..000000000 --- a/cyassl/ctaocrypt/blake2-impl.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - BLAKE2 reference source code package - reference C implementations - - Written in 2012 by Samuel Neves - - To the extent possible under law, the author(s) have dedicated all copyright - and related and neighboring rights to this software to the public domain - worldwide. This software is distributed without any warranty. - - You should have received a copy of the CC0 Public Domain Dedication along with - this software. If not, see . -*/ -/* blake2-impl.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef CTAOCRYPT_BLAKE2_IMPL_H -#define CTAOCRYPT_BLAKE2_IMPL_H - -#include -#include - -#endif /* CTAOCRYPT_BLAKE2_IMPL_H */ - diff --git a/cyassl/ctaocrypt/blake2-int.h b/cyassl/ctaocrypt/blake2-int.h deleted file mode 100644 index e5cc3d366..000000000 --- a/cyassl/ctaocrypt/blake2-int.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - BLAKE2 reference source code package - reference C implementations - - Written in 2012 by Samuel Neves - - To the extent possible under law, the author(s) have dedicated all copyright - and related and neighboring rights to this software to the public domain - worldwide. This software is distributed without any warranty. - - You should have received a copy of the CC0 Public Domain Dedication along with - this software. If not, see . -*/ -/* blake2-int.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - - -#ifndef CTAOCRYPT_BLAKE2_INT_H -#define CTAOCRYPT_BLAKE2_INT_H - -#include -#include - -#endif /* CTAOCRYPT_BLAKE2_INT_H */ - diff --git a/cyassl/ctaocrypt/blake2.h b/cyassl/ctaocrypt/blake2.h deleted file mode 100644 index e63656ab5..000000000 --- a/cyassl/ctaocrypt/blake2.h +++ /dev/null @@ -1,45 +0,0 @@ -/* blake2.h - * - * Copyright (C) 2006-2023 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 2 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_BLAKE2 - -#ifndef CTAOCRYPT_BLAKE2_H -#define CTAOCRYPT_BLAKE2_H - -#include - -/* for blake2 reverse compatibility */ -#ifndef HAVE_FIPS - #define InitBlake2b wc_InitBlake2b - #define Blake2bUpdate wc_Blake2bUpdate - #define Blake2bFinal wc_Blake2bFinal -#else - /* name for when fips hmac calls blake */ - #define wc_InitBlake2b InitBlake2b - #define wc_Blake2bUpdate Blake2bUpdate - #define wc_Blake2bFinal Blake2bFinal -#endif /* HAVE_FIPS */ - -#endif /* CTAOCRYPT_BLAKE2_H */ -#endif /* HAVE_BLAKE2 */ - diff --git a/cyassl/ctaocrypt/camellia.h b/cyassl/ctaocrypt/camellia.h deleted file mode 100644 index 880960f1e..000000000 --- a/cyassl/ctaocrypt/camellia.h +++ /dev/null @@ -1,39 +0,0 @@ -/* camellia.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -#ifndef CTAO_CRYPT_CAMELLIA_H -#define CTAO_CRYPT_CAMELLIA_H - - -/* for camellia reverse compatibility */ -#ifdef HAVE_CAMELLIA - #include - #define CamelliaSetKey wc_CamelliaSetKey - #define CamelliaSetIV wc_CamelliaSetIV - #define CamelliaEncryptDirect wc_CamelliaEncryptDirect - #define CamelliaDecryptDirect wc_CamelliaDecryptDirect - #define CamelliaCbcEncrypt wc_CamelliaCbcEncrypt - #define CamelliaCbcDecrypt wc_CamelliaCbcDecrypt -#endif - -#endif /* CTAO_CRYPT_CAMELLIA_H */ - diff --git a/cyassl/ctaocrypt/chacha.h b/cyassl/ctaocrypt/chacha.h deleted file mode 100644 index 1a07289d4..000000000 --- a/cyassl/ctaocrypt/chacha.h +++ /dev/null @@ -1,36 +0,0 @@ -/* chacha.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -#ifndef CTAO_CRYPT_CHACHA_H -#define CTAO_CRYPT_CHACHA_H - - -/* for chacha reverse compatibility */ -#ifdef HAVE_CHACHA - #include - #define Chacha_Process wc_Chacha_Process - #define Chacha_SetKey wc_Chacha_SetKey - #define Chacha_SetIV wc_Chacha_SetIV -#endif - -#endif /* CTAO_CRYPT_CHACHA_H */ - diff --git a/cyassl/ctaocrypt/coding.h b/cyassl/ctaocrypt/coding.h deleted file mode 100644 index 3536fba42..000000000 --- a/cyassl/ctaocrypt/coding.h +++ /dev/null @@ -1,30 +0,0 @@ -/* coding.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef CTAO_CRYPT_CODING_H -#define CTAO_CRYPT_CODING_H - -#include - -#endif /* CTAO_CRYPT_CODING_H */ - diff --git a/cyassl/ctaocrypt/compress.h b/cyassl/ctaocrypt/compress.h deleted file mode 100644 index 3050d85e9..000000000 --- a/cyassl/ctaocrypt/compress.h +++ /dev/null @@ -1,38 +0,0 @@ -/* compress.h - * - * Copyright (C) 2006-2023 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 2 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_LIBZ - -#ifndef CTAO_CRYPT_COMPRESS_H -#define CTAO_CRYPT_COMPRESS_H - -#include - -/* reverse compatibility */ -#define Compress wc_Compress -#define DeCompress wc_DeCompress - -#endif /* CTAO_CRYPT_COMPRESS_H */ - -#endif /* HAVE_LIBZ */ - diff --git a/cyassl/ctaocrypt/des3.h b/cyassl/ctaocrypt/des3.h deleted file mode 100644 index 498ffba4b..000000000 --- a/cyassl/ctaocrypt/des3.h +++ /dev/null @@ -1,49 +0,0 @@ -/* des3.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef NO_DES3 - -#ifndef CTAO_CRYPT_DES3_H -#define CTAO_CRYPT_DES3_H - - -#include -#define Des_SetKey wc_Des_SetKey -#define Des_SetIV wc_Des_SetIV -#define Des_CbcEncrypt wc_Des_CbcEncrypt -#define Des_CbcDecrypt wc_Des_CbcDecrypt -#define Des_EcbEncrypt wc_Des_EcbEncrypt -#define Des_CbcDecryptWithKey wc_Des_CbcDecryptWithKey -#define Des3_SetKey wc_Des3_SetKey -#define Des3_SetIV wc_Des3_SetIV -#define Des3_CbcEncrypt wc_Des3_CbcEncrypt -#define Des3_CbcDecrypt wc_Des3_CbcDecrypt -#define Des3_CbcDecryptWithKey wc_Des3_CbcDecryptWithKey -#ifdef WOLFSSL_ASYNC_CRYPT - #define Des3AsyncInit wc_Des3AsyncInit - #define Des3AsyncFree wc_Des3AsyncFree -#endif - -#endif /* NO_DES3 */ -#endif /* CTAO_CRYPT_DES3_H */ - diff --git a/cyassl/ctaocrypt/dh.h b/cyassl/ctaocrypt/dh.h deleted file mode 100644 index 3d8bbc418..000000000 --- a/cyassl/ctaocrypt/dh.h +++ /dev/null @@ -1,42 +0,0 @@ -/* dh.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef NO_DH - -#ifndef CTAO_CRYPT_DH_H -#define CTAO_CRYPT_DH_H - -/* for dh reverse compatibility */ -#include -#define InitDhKey wc_InitDhKey -#define FreeDhKey wc_FreeDhKey -#define DhGenerateKeyPair wc_DhGenerateKeyPair -#define DhAgree wc_DhAgree -#define DhKeyDecode wc_DhKeyDecode -#define DhSetKey wc_DhSetKey -#define DhParamsLoad wc_DhParamsLoad - -#endif /* CTAO_CRYPT_DH_H */ - -#endif /* NO_DH */ - diff --git a/cyassl/ctaocrypt/dsa.h b/cyassl/ctaocrypt/dsa.h deleted file mode 100644 index a64a7eb45..000000000 --- a/cyassl/ctaocrypt/dsa.h +++ /dev/null @@ -1,33 +0,0 @@ -/* dsa.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef NO_DSA - -#ifndef CTAO_CRYPT_DSA_H -#define CTAO_CRYPT_DSA_H - -#include - -#endif /* CTAO_CRYPT_DSA_H */ -#endif /* NO_DSA */ - diff --git a/cyassl/ctaocrypt/ecc.h b/cyassl/ctaocrypt/ecc.h deleted file mode 100644 index b28bd4947..000000000 --- a/cyassl/ctaocrypt/ecc.h +++ /dev/null @@ -1,69 +0,0 @@ -/* ecc.h - * - * Copyright (C) 2006-2023 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 2 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_ECC - -#ifndef CTAO_CRYPT_ECC_H -#define CTAO_CRYPT_ECC_H - -#include - -/* includes for compatibility */ -#include -#include -#include - -/* for ecc reverse compatibility */ -#ifdef HAVE_ECC - #define ecc_make_key wc_ecc_make_key - #define ecc_shared_secret wc_ecc_shared_secret - #define ecc_sign_hash wc_ecc_sign_hash - #define ecc_verify_hash wc_ecc_verify_hash - #define ecc_init wc_ecc_init - #define ecc_free wc_ecc_free - #define ecc_fp_free wc_ecc_fp_free - #define ecc_export_x963 wc_ecc_export_x963 - #define ecc_size wc_ecc_size - #define ecc_sig_size wc_ecc_sig_size - #define ecc_export_x963_ex wc_ecc_export_x963_ex - #define ecc_import_x963 wc_ecc_import_x963 - #define ecc_import_private_key wc_ecc_import_private_key - #define ecc_rs_to_sig wc_ecc_rs_to_sig - #define ecc_import_raw wc_ecc_import_raw - #define ecc_export_private_only wc_ecc_export_private_only - -#ifdef HAVE_ECC_ENCRYPT - /* ecc encrypt */ - #define ecc_ctx_new wc_ecc_ctx_new - #define ecc_ctx_free wc_ecc_ctx_free - #define ecc_ctx_reset wc_ecc_ctx_reset - #define ecc_ctx_get_own_salt wc_ecc_ctx_get_own_salt - #define ecc_ctx_set_peer_salt wc_ecc_ctx_set_peer_salt - #define ecc_ctx_set_info wc_ecc_ctx_set_info - #define ecc_encrypt wc_ecc_encrypt - #define ecc_decrypt wc_ecc_decrypt -#endif /* HAVE_ECC_ENCRYPT */ -#endif - -#endif /* CTAO_CRYPT_ECC_H */ -#endif /* HAVE_ECC */ - diff --git a/cyassl/ctaocrypt/error-crypt.h b/cyassl/ctaocrypt/error-crypt.h deleted file mode 100644 index fcde0f588..000000000 --- a/cyassl/ctaocrypt/error-crypt.h +++ /dev/null @@ -1,33 +0,0 @@ -/* error-crypt.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef CTAO_CRYPT_ERROR_H -#define CTAO_CRYPT_ERROR_H - -/* for name change and fips compatibility @wc_fips */ -#include -#define CTaoCryptErrorString wc_ErrorString -#define CTaoCryptGetErrorString wc_GetErrorString - -#endif /* CTAO_CRYPT_ERROR_H */ - diff --git a/cyassl/ctaocrypt/fips_test.h b/cyassl/ctaocrypt/fips_test.h deleted file mode 100644 index 0e0ca1fdb..000000000 --- a/cyassl/ctaocrypt/fips_test.h +++ /dev/null @@ -1,59 +0,0 @@ -/* fips_test.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef CTAO_CRYPT_FIPS_TEST_H -#define CTAO_CRYPT_FIPS_TEST_H - -#include - - -#ifdef __cplusplus - extern "C" { -#endif - -/* Known Answer Test string inputs are hex, internal */ -CYASSL_LOCAL int DoKnownAnswerTests(char*, int); - - -/* FIPS failure callback */ -typedef void(*wolfCrypt_fips_cb)(int ok, int err, const char* hash); - -/* Public set function */ -CYASSL_API int wolfCrypt_SetCb_fips(wolfCrypt_fips_cb cbf); - -/* Public get status functions */ -CYASSL_API int wolfCrypt_GetStatus_fips(void); -CYASSL_API const char* wolfCrypt_GetCoreHash_fips(void); - -#ifdef HAVE_FORCE_FIPS_FAILURE - /* Public function to force failure mode for operational testing */ - CYASSL_API int wolfCrypt_SetStatus_fips(int); -#endif - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - -#endif /* CTAO_CRYPT_FIPS_TEST_H */ - diff --git a/cyassl/ctaocrypt/hmac.h b/cyassl/ctaocrypt/hmac.h deleted file mode 100644 index 926cce302..000000000 --- a/cyassl/ctaocrypt/hmac.h +++ /dev/null @@ -1,45 +0,0 @@ -/* hmac.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef NO_HMAC - -#ifndef CTAO_CRYPT_HMAC_H -#define CTAO_CRYPT_HMAC_H - -#include -#define HmacSetKey wc_HmacSetKey -#define HmacUpdate wc_HmacUpdate -#define HmacFinal wc_HmacFinal -#ifdef WOLFSSL_ASYNC_CRYPT - #define HmacAsyncInit wc_HmacAsyncInit - #define HmacAsyncFree wc_HmacAsyncFree -#endif -#define CyaSSL_GetHmacMaxSize wolfSSL_GetHmacMaxSize -#ifdef HAVE_HKDF - #define HKDF wc_HKDF -#endif /* HAVE_HKDF */ - -#endif /* CTAO_CRYPT_HMAC_H */ - -#endif /* NO_HMAC */ - diff --git a/cyassl/ctaocrypt/include.am b/cyassl/ctaocrypt/include.am deleted file mode 100644 index 0a3ec343c..000000000 --- a/cyassl/ctaocrypt/include.am +++ /dev/null @@ -1,52 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root - -EXTRA_DIST+= ctaocrypt/src/misc.c - -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/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/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 - -noinst_HEADERS+= \ - cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h - diff --git a/cyassl/ctaocrypt/integer.h b/cyassl/ctaocrypt/integer.h deleted file mode 100644 index 670a83cd2..000000000 --- a/cyassl/ctaocrypt/integer.h +++ /dev/null @@ -1,35 +0,0 @@ -/* integer.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -/* - * Based on public domain LibTomMath 0.38 by Tom St Denis, tomstdenis@iahu.ca, - * http://math.libtomcrypt.com - */ - - -#ifndef CTAO_CRYPT_INTEGER_H -#define CTAO_CRYPT_INTEGER_H - -#include - -#endif /* CTAO_CRYPT_INTEGER_H */ - diff --git a/cyassl/ctaocrypt/logging.h b/cyassl/ctaocrypt/logging.h deleted file mode 100644 index 4fc9fbf16..000000000 --- a/cyassl/ctaocrypt/logging.h +++ /dev/null @@ -1,41 +0,0 @@ -/* logging.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -/* submitted by eof */ - - -#ifndef CYASSL_LOGGING_H -#define CYASSL_LOGGING_H - -/* for fips compatibility @wc_fips */ -#include -#define CYASSL_LEAVE WOLFSSL_LEAVE -#define CYASSL_ERROR WOLFSSL_ERROR -#define CYASSL_ENTER WOLFSSL_ENTER -#define CYASSL_MSG WOLFSSL_MSG -/* check old macros possibly declared */ -#if defined(DEBUG_CYASSL) && !defined(DEBUG_WOLFSSL) - #define DEBUG_WOLFSSL -#endif - -#endif /* CYASSL_LOGGING_H */ - diff --git a/cyassl/ctaocrypt/md2.h b/cyassl/ctaocrypt/md2.h deleted file mode 100644 index d758875f6..000000000 --- a/cyassl/ctaocrypt/md2.h +++ /dev/null @@ -1,43 +0,0 @@ -/* md2.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -/* check for old macro */ -#if !defined(CYASSL_MD2) && defined(WOLFSSL_MD2) - #define CYASSL_MD2 -#endif - -#ifdef CYASSL_MD2 - -#ifndef CTAO_CRYPT_MD2_H -#define CTAO_CRYPT_MD2_H - -#include - -#define InitMd2 wc_InitMd2 -#define Md2Update wc_Md2Update -#define Md2Final wc_Md2Final -#define Md2Hash wc_Md2Hash - -#endif /* CTAO_CRYPT_MD2_H */ -#endif /* CYASSL_MD2 */ - diff --git a/cyassl/ctaocrypt/md4.h b/cyassl/ctaocrypt/md4.h deleted file mode 100644 index 0e0fa3598..000000000 --- a/cyassl/ctaocrypt/md4.h +++ /dev/null @@ -1,38 +0,0 @@ -/* md4.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef NO_MD4 - -#ifndef CTAO_CRYPT_MD4_H -#define CTAO_CRYPT_MD4_H - -#include - -#define InitMd4 wc_InitMd4 -#define Md4Update wc_Md4Update -#define Md4Final wc_Md4Final - -#endif /* CTAO_CRYPT_MD4_H */ - -#endif /* NO_MD4 */ - diff --git a/cyassl/ctaocrypt/md5.h b/cyassl/ctaocrypt/md5.h deleted file mode 100644 index 842ea6fc7..000000000 --- a/cyassl/ctaocrypt/md5.h +++ /dev/null @@ -1,45 +0,0 @@ -/* md5.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -#ifndef NO_MD5 - -#ifndef CTAO_CRYPT_MD5_H -#define CTAO_CRYPT_MD5_H - -#include - -#ifndef HAVE_FIPS - #define InitMd5 wc_InitMd5 - #define Md5Update wc_Md5Update - #define Md5Final wc_Md5Final - #define Md5Hash wc_Md5Hash -#else - /* redfined name so that hmac is calling same function names with fips */ - #define wc_InitMd5 InitMd5 - #define wc_Md5Update Md5Update - #define wc_Md5Final Md5Final - #define wc_Md5Hash Md5Hash -#endif - -#endif /* CTAO_CRYPT_MD5_H */ -#endif /* NO_MD5 */ - diff --git a/cyassl/ctaocrypt/memory.h b/cyassl/ctaocrypt/memory.h deleted file mode 100644 index 1ba484067..000000000 --- a/cyassl/ctaocrypt/memory.h +++ /dev/null @@ -1,42 +0,0 @@ -/* memory.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -/* submitted by eof */ - - -#ifndef CYASSL_MEMORY_H -#define CYASSL_MEMORY_H - - -#include -#define CyaSSL_Malloc_cb wolfSSL_Malloc_cb -#define CyaSSL_Free_cb wolfSSL_Free_cb -#define CyaSSL_Realloc_cb wolfSSL_Realloc_cb -#define CyaSSL_SetAllocators wolfSSL_SetAllocators - -/* Public in case user app wants to use XMALLOC/XFREE */ -#define CyaSSL_Malloc wolfSSL_Malloc -#define CyaSSL_Free wolfSSL_Free -#define CyaSSL_Realloc wolfSSL_Realloc - -#endif /* CYASSL_MEMORY_H */ - diff --git a/cyassl/ctaocrypt/misc.h b/cyassl/ctaocrypt/misc.h deleted file mode 100644 index 918c8c04c..000000000 --- a/cyassl/ctaocrypt/misc.h +++ /dev/null @@ -1,30 +0,0 @@ -/* misc.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef CTAO_CRYPT_MISC_H -#define CTAO_CRYPT_MISC_H - -#include - -#endif /* CTAO_CRYPT_MISC_H */ - diff --git a/cyassl/ctaocrypt/mpi_class.h b/cyassl/ctaocrypt/mpi_class.h deleted file mode 100644 index 5c05f46e7..000000000 --- a/cyassl/ctaocrypt/mpi_class.h +++ /dev/null @@ -1,24 +0,0 @@ -/* mpi_class.h - * - * Copyright (C) 2006-2023 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 2 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 - diff --git a/cyassl/ctaocrypt/mpi_superclass.h b/cyassl/ctaocrypt/mpi_superclass.h deleted file mode 100644 index 90a652b20..000000000 --- a/cyassl/ctaocrypt/mpi_superclass.h +++ /dev/null @@ -1,27 +0,0 @@ -/* mpi_superclass.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -/* super class file for PK algos */ - -#include - diff --git a/cyassl/ctaocrypt/pkcs7.h b/cyassl/ctaocrypt/pkcs7.h deleted file mode 100644 index f9d895e64..000000000 --- a/cyassl/ctaocrypt/pkcs7.h +++ /dev/null @@ -1,53 +0,0 @@ -/* pkcs7.h - * - * Copyright (C) 2006-2023 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 2 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_PKCS7 - -#ifndef CTAO_CRYPT_PKCS7_H -#define CTAO_CRYPT_PKCS7_H - -/* pull in compatibility for old includes */ -#include -#include -#include -#include -#include - -#include - -/* for pkcs7 reverse compatibility */ -#define SetContentType wc_SetContentType -#define GetContentType wc_GetContentType -#define CreateRecipientInfo wc_CreateRecipientInfo -#define PKCS7_InitWithCert wc_PKCS7_InitWithCert -#define PKCS7_Free wc_PKCS7_Free -#define PKCS7_EncodeData wc_PKCS7_EncodeData -#define PKCS7_EncodeSignedData wc_PKCS7_EncodeSignedData -#define PKCS7_VerifySignedData wc_PKCS7_VerifySignedData -#define PKCS7_EncodeEnvelopedData wc_PKCS7_EncodeEnvelopedData -#define PKCS7_DecodeEnvelopedData wc_PKCS7_DecodeEnvelopedData - -#endif /* CTAO_CRYPT_PKCS7_H */ - -#endif /* HAVE_PKCS7 */ - diff --git a/cyassl/ctaocrypt/poly1305.h b/cyassl/ctaocrypt/poly1305.h deleted file mode 100644 index 75f28f552..000000000 --- a/cyassl/ctaocrypt/poly1305.h +++ /dev/null @@ -1,39 +0,0 @@ -/* poly1305.h - * - * Copyright (C) 2006-2023 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 2 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_POLY1305 - -#ifndef CTAO_CRYPT_POLY1305_H -#define CTAO_CRYPT_POLY1305_H - -#include - -/* for poly1305 reverse compatibility */ -#define Poly1305SetKey wc_Poly1305SetKey -#define Poly1305Update wc_Poly1305Update -#define Poly1305Final wc_Poly1305Final - -#endif /* CTAO_CRYPT_POLY1305_H */ - -#endif /* HAVE_POLY1305 */ - diff --git a/cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h b/cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h deleted file mode 100644 index 2134da240..000000000 --- a/cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h +++ /dev/null @@ -1,29 +0,0 @@ -/* pic32mz-crypt.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -#ifndef PIC32MZ_CRYPT_H -#define PIC32MZ_CRYPT_H - -#include - -#endif /* PIC32MZ_CRYPT_H */ - diff --git a/cyassl/ctaocrypt/pwdbased.h b/cyassl/ctaocrypt/pwdbased.h deleted file mode 100644 index e460ef278..000000000 --- a/cyassl/ctaocrypt/pwdbased.h +++ /dev/null @@ -1,37 +0,0 @@ -/* pwdbased.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef NO_PWDBASED - -#ifndef CTAO_CRYPT_PWDBASED_H -#define CTAO_CRYPT_PWDBASED_H - -/* for pwdbased reverse compatibility */ -#include -#define PBKDF1 wc_PBKDF1 -#define PBKDF2 wc_PBKDF2 -#define PKCS12_PBKDF wc_PKCS12_PBKDF - -#endif /* CTAO_CRYPT_PWDBASED_H */ -#endif /* NO_PWDBASED */ - diff --git a/cyassl/ctaocrypt/random.h b/cyassl/ctaocrypt/random.h deleted file mode 100644 index bacd423a0..000000000 --- a/cyassl/ctaocrypt/random.h +++ /dev/null @@ -1,39 +0,0 @@ -/* random.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef CTAO_CRYPT_RANDOM_H -#define CTAO_CRYPT_RANDOM_H - - /* for random.h compatibility */ - #include - #define InitRng wc_InitRng - #define RNG_GenerateBlock wc_RNG_GenerateBlock - #define RNG_GenerateByte wc_RNG_GenerateByte - #define FreeRng wc_FreeRng - - #if defined(HAVE_HASHDRBG) || defined(NO_RC4) - #define RNG_HealthTest wc_RNG_HealthTest - #endif /* HAVE_HASHDRBG || NO_RC4 */ - -#endif /* CTAO_CRYPT_RANDOM_H */ - diff --git a/cyassl/ctaocrypt/ripemd.h b/cyassl/ctaocrypt/ripemd.h deleted file mode 100644 index bff7403c5..000000000 --- a/cyassl/ctaocrypt/ripemd.h +++ /dev/null @@ -1,38 +0,0 @@ -/* ripemd.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - - -#ifndef CTAO_CRYPT_RIPEMD_H -#define CTAO_CRYPT_RIPEME_H - -#include - -/* for ripemd reverse compatibility */ -#ifdef WOLFSSL_RIPEMD - #define InitRipeMd wc_InitRipeMd - #define RipeMdUpdate wc_RipeMdUpdate - #define RipeMdFinal wc_RipeMdFinal -#endif - -#endif /* CTAO_CRYPT_RIPEMD_H */ - diff --git a/cyassl/ctaocrypt/rsa.h b/cyassl/ctaocrypt/rsa.h deleted file mode 100644 index c874f3467..000000000 --- a/cyassl/ctaocrypt/rsa.h +++ /dev/null @@ -1,58 +0,0 @@ -/* rsa.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -#ifndef NO_RSA - -#ifndef CTAO_CRYPT_RSA_H -#define CTAO_CRYPT_RSA_H - -#include -/* includes for their compatibility */ -#include -#include -#include - -#define InitRsaKey wc_InitRsaKey -#define FreeRsaKey wc_FreeRsaKey -#define RsaPublicEncrypt wc_RsaPublicEncrypt -#define RsaPrivateDecryptInline wc_RsaPrivateDecryptInline -#define RsaPrivateDecrypt wc_RsaPrivateDecrypt -#define RsaSSL_Sign wc_RsaSSL_Sign -#define RsaSSL_VerifyInline wc_RsaSSL_VerifyInline -#define RsaSSL_Verify wc_RsaSSL_Verify -#define RsaEncryptSize wc_RsaEncryptSize -#define RsaFlattenPublicKey wc_RsaFlattenPublicKey - -#ifdef WOLFSSL_KEY_GEN - #define MakeRsaKey wc_MakeRsaKey - #define RsaKeyToDer wc_RsaKeyToDer - #define CheckProbablePrime wc_CheckProbablePrime -#endif - -#ifdef WOLFSSL_ASYNC_CRYPT - #define RsaAsyncInit wc_RsaAsyncInit - #define RsaAsyncFree wc_RsaAsyncFree -#endif - -#endif /* CTAO_CRYPT_RSA_H */ - -#endif /* NO_RSA */ diff --git a/cyassl/ctaocrypt/settings.h b/cyassl/ctaocrypt/settings.h deleted file mode 100644 index 46012d4d1..000000000 --- a/cyassl/ctaocrypt/settings.h +++ /dev/null @@ -1,702 +0,0 @@ -/* settings.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -/* Place OS specific preprocessor flags, defines, includes here, will be - included into every file because types.h includes it */ - - -#ifndef CTAO_CRYPT_SETTINGS_H -#define CTAO_CRYPT_SETTINGS_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Uncomment next line if using IPHONE */ -/* #define IPHONE */ - -/* Uncomment next line if using ThreadX */ -/* #define THREADX */ - -/* Uncomment next line if using Micrium ucOS */ -/* #define MICRIUM */ - -/* Uncomment next line if using Mbed */ -/* #define MBED */ - -/* Uncomment next line if using Microchip PIC32 ethernet starter kit */ -/* #define MICROCHIP_PIC32 */ - -/* Uncomment next line if using Microchip TCP/IP stack, version 5 */ -/* #define MICROCHIP_TCPIP_V5 */ - -/* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */ -/* #define MICROCHIP_TCPIP */ - -/* Uncomment next line if using PIC32MZ Crypto Engine */ -/* #define CYASSL_MICROCHIP_PIC32MZ */ - -/* Uncomment next line if using FreeRTOS */ -/* #define FREERTOS */ - -/* Uncomment next line if using FreeRTOS Windows Simulator */ -/* #define FREERTOS_WINSIM */ - -/* Uncomment next line if using RTIP */ -/* #define EBSNET */ - -/* Uncomment next line if using lwip */ -/* #define CYASSL_LWIP */ - -/* Uncomment next line if building CyaSSL for a game console */ -/* #define CYASSL_GAME_BUILD */ - -/* Uncomment next line if building CyaSSL for LSR */ -/* #define CYASSL_LSR */ - -/* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */ -/* #define FREESCALE_MQX */ - -/* Uncomment next line if using STM32F2 */ -/* #define CYASSL_STM32F2 */ - -/* Uncomment next line if using QL SEP settings */ -/* #define CYASSL_QL */ - -/* Uncomment next line if building for EROAD */ -/* #define CYASSL_EROAD */ - -/* Uncomment next line if building for IAR EWARM */ -/* #define CYASSL_IAR_ARM */ - -/* Uncomment next line if using TI-RTOS settings */ -/* #define CYASSL_TIRTOS */ - -/* Uncomment next line if building with PicoTCP */ -/* #define CYASSL_PICOTCP */ - -/* Uncomment next line if building for PicoTCP demo bundle */ -/* #define CYASSL_PICOTCP_DEMO */ - -#include - -#ifdef IPHONE - #define SIZEOF_LONG_LONG 8 -#endif - - -#ifdef CYASSL_USER_SETTINGS - #include -#endif - -/* for reverse compatibility after name change */ -#include - -#ifdef THREADX - #define SIZEOF_LONG_LONG 8 -#endif - -#ifdef HAVE_NETX - #include "nx_api.h" -#endif - -#if defined(HAVE_LWIP_NATIVE) /* using LwIP native TCP socket */ - #define CYASSL_LWIP - #define NO_WRITEV - #define SINGLE_THREADED - #define CYASSL_USER_IO - #define NO_FILESYSTEM -#endif - -#if defined(CYASSL_IAR_ARM) - #define NO_MAIN_DRIVER - #define SINGLE_THREADED - #define USE_CERT_BUFFERS_1024 - #define BENCH_EMBEDDED - #define NO_FILESYSTEM - #define NO_WRITEV - #define CYASSL_USER_IO - #define BENCH_EMBEDDED -#endif - -#ifdef MICROCHIP_PIC32 - /* #define CYASSL_MICROCHIP_PIC32MZ */ - #define SIZEOF_LONG_LONG 8 - #define SINGLE_THREADED - #define CYASSL_USER_IO - #define NO_WRITEV - #define NO_DEV_RANDOM - #define NO_FILESYSTEM - #define USE_FAST_MATH - #define TFM_TIMING_RESISTANT -#endif - -#if defined(CYASSL_MICROCHIP_PIC32MZ) || defined(WOLFSSL_MICROCHIP_PIC32MZ) - #ifndef NO_PIC32MZ_CRYPT - #define WOLFSSL_PIC32MZ_CRYPT - #endif - #ifndef NO_PIC32MZ_RNG - #define WOLFSSL_PIC32MZ_RNG - #endif - #ifndef NO_PIC32MZ_HASH - #define WOLFSSL_PIC32MZ_HASH - #endif - - #define CYASSL_AES_COUNTER - #define HAVE_AESGCM - #define NO_BIG_INT -#endif - -#ifdef MICROCHIP_TCPIP_V5 - /* include timer functions */ - #include "TCPIP Stack/TCPIP.h" -#endif - -#ifdef MICROCHIP_TCPIP - /* include timer, NTP functions */ - #ifdef MICROCHIP_MPLAB_HARMONY - #include "tcpip/tcpip.h" - #else - #include "system/system_services.h" - #include "tcpip/sntp.h" - #endif -#endif - -#ifdef MBED - #define CYASSL_USER_IO - #define NO_FILESYSTEM - #define NO_CERTS - #define USE_CERT_BUFFERS_1024 - #define NO_WRITEV - #define NO_DEV_RANDOM - #define NO_SHA512 - #define NO_DH - #define NO_DSA - #define HAVE_ECC - #define NO_SESSION_CACHE - #define CYASSL_CMSIS_RTOS -#endif - - -#ifdef CYASSL_EROAD - #define FREESCALE_MQX - #define FREESCALE_MMCAU - #define SINGLE_THREADED - #define NO_STDIO_FILESYSTEM - #define CYASSL_LEANPSK - #define HAVE_NULL_CIPHER - #define NO_OLD_TLS - #define NO_ASN - #define NO_BIG_INT - #define NO_RSA - #define NO_DSA - #define NO_DH - #define NO_CERTS - #define NO_PWDBASED - #define NO_DES3 - #define NO_MD4 - #define NO_RC4 - #define NO_MD5 - #define NO_SESSION_CACHE - #define NO_MAIN_DRIVER -#endif - -#ifdef CYASSL_PICOTCP - #define errno pico_err - #include "pico_defines.h" - #include "pico_stack.h" - #include "pico_constants.h" - #define CUSTOM_RAND_GENERATE pico_rand -#endif - -#ifdef CYASSL_PICOTCP_DEMO - #define CYASSL_STM32 - #define USE_FAST_MATH - #define TFM_TIMING_RESISTANT - #define XMALLOC(s, h, type) PICO_ZALLOC((s)) - #define XFREE(p, h, type) PICO_FREE((p)) - #define SINGLE_THREADED - #define NO_WRITEV - #define CYASSL_USER_IO - #define NO_DEV_RANDOM - #define NO_FILESYSTEM -#endif - -#ifdef FREERTOS_WINSIM - #define FREERTOS - #define USE_WINDOWS_API -#endif - - -/* Micrium will use Visual Studio for compilation but not the Win32 API */ -#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \ - && !defined(EBSNET) && !defined(CYASSL_EROAD) && !defined(INTIME_RTOS) - #define USE_WINDOWS_API -#endif - - -#if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER) - #include - #define XMALLOC(s, h, type) malloc((s)) - #define XFREE(p, h, type) free((p)) - #define XREALLOC(p, n, h, t) realloc((p), (n)) -#endif - -#if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL) - #undef XMALLOC - #define XMALLOC yaXMALLOC - #undef XFREE - #define XFREE yaXFREE - #undef XREALLOC - #define XREALLOC yaXREALLOC -#endif - - -#ifdef FREERTOS - #ifndef NO_WRITEV - #define NO_WRITEV - #endif - #ifndef NO_SHA512 - #define NO_SHA512 - #endif - #ifndef NO_DH - #define NO_DH - #endif - #ifndef NO_DSA - #define NO_DSA - #endif - - #ifndef SINGLE_THREADED - #include "FreeRTOS.h" - #include "semphr.h" - #endif -#endif - -#ifdef CYASSL_TIRTOS - #define SIZEOF_LONG_LONG 8 - #define NO_WRITEV - #define NO_CYASSL_DIR - #define USE_FAST_MATH - #define TFM_TIMING_RESISTANT - #define NO_DEV_RANDOM - #define NO_FILESYSTEM - #define USE_CERT_BUFFERS_2048 - #define NO_ERROR_STRINGS - #define USER_TIME - - #ifdef __IAR_SYSTEMS_ICC__ - #pragma diag_suppress=Pa089 - #elif !defined(__GNUC__) - /* Suppress the sslpro warning */ - #pragma diag_suppress=11 - #endif - - #include -#endif - -#ifdef EBSNET - #include "rtip.h" - - /* #define DEBUG_CYASSL */ - #define NO_CYASSL_DIR /* tbd */ - - #if (POLLOS) - #define SINGLE_THREADED - #endif - - #if (RTPLATFORM) - #if (!RTP_LITTLE_ENDIAN) - #define BIG_ENDIAN_ORDER - #endif - #else - #if (!KS_LITTLE_ENDIAN) - #define BIG_ENDIAN_ORDER - #endif - #endif - - #if (WINMSP3) - #undef SIZEOF_LONG - #define SIZEOF_LONG_LONG 8 - #else - #if !defined(SIZEOF_LONG) && !defined(SIZEOF_LONG_LONG) - #error settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG - #endif - #endif - - #define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC)) - #define XFREE(p, h, type) (rtp_free(p)) - #define XREALLOC(p, n, h, t) realloc((p), (n)) - -#endif /* EBSNET */ - -#ifdef CYASSL_GAME_BUILD - #define SIZEOF_LONG_LONG 8 -#endif - -#ifdef CYASSL_LSR - #define HAVE_WEBSERVER - #define SIZEOF_LONG_LONG 8 - #define CYASSL_LOW_MEMORY - #define NO_WRITEV - #define NO_SHA512 - #define NO_DH - #define NO_DSA - #define NO_DEV_RANDOM - #define NO_CYASSL_DIR - #ifndef NO_FILESYSTEM - #define LSR_FS - #include "inc/hw_types.h" - #include "fs.h" - #endif - #define CYASSL_LWIP - #include /* for tcp errno */ - #define CYASSL_SAFERTOS - #if defined(__IAR_SYSTEMS_ICC__) - /* enum uses enum */ - #pragma diag_suppress=Pa089 - #endif -#endif - -#ifdef CYASSL_SAFERTOS - #ifndef SINGLE_THREADED - #include "SafeRTOS/semphr.h" - #endif - - #include "SafeRTOS/heap.h" - #define XMALLOC(s, h, type) pvPortMalloc((s)) - #define XFREE(p, h, type) vPortFree((p)) - #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n)) -#endif - -#ifdef CYASSL_LOW_MEMORY - #undef RSA_LOW_MEM - #define RSA_LOW_MEM - #undef CYASSL_SMALL_STACK - #define CYASSL_SMALL_STACK - #undef TFM_TIMING_RESISTANT - #define TFM_TIMING_RESISTANT -#endif - -#ifdef FREESCALE_MQX - #define SIZEOF_LONG_LONG 8 - #define NO_WRITEV - #define NO_DEV_RANDOM - #define NO_CYASSL_DIR - #define USE_FAST_MATH - #define TFM_TIMING_RESISTANT - #define FREESCALE_K70_RNGA - /* #define FREESCALE_K53_RNGB */ - #include "mqx.h" - #ifndef NO_FILESYSTEM - #include "mfs.h" - #include "fio.h" - #endif - #ifndef SINGLE_THREADED - #include "mutex.h" - #endif - - #define XMALLOC(s, h, t) (void *)_mem_alloc_system((s)) - #define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));} - /* Note: MQX has no realloc, using fastmath above */ -#endif - -#ifdef CYASSL_STM32F2 - #define SIZEOF_LONG_LONG 8 - #define NO_DEV_RANDOM - #define NO_CYASSL_DIR - #define STM32F2_RNG - #define STM32F2_CRYPTO - #define KEIL_INTRINSICS -#endif - -#ifdef MICRIUM - - #include "stdlib.h" - #include "net_cfg.h" - #include "ssl_cfg.h" - #include "net_secure_os.h" - - #define CYASSL_TYPES - - typedef CPU_INT08U byte; - typedef CPU_INT16U word16; - typedef CPU_INT32U word32; - - #if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32) - #define SIZEOF_LONG 4 - #undef SIZEOF_LONG_LONG - #else - #undef SIZEOF_LONG - #define SIZEOF_LONG_LONG 8 - #endif - - #define STRING_USER - - #define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr))) - #define XSTRNCPY(pstr_dest, pstr_src, len_max) \ - ((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \ - (CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max))) - #define XSTRNCMP(pstr_1, pstr_2, len_max) \ - ((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \ - (CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max))) - #define XSTRSTR(pstr, pstr_srch) \ - ((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \ - (CPU_CHAR *)(pstr_srch))) - #define XMEMSET(pmem, data_val, size) \ - ((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \ - (CPU_SIZE_T)(size))) - #define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \ - (void *)(psrc), (CPU_SIZE_T)(size))) - #define XMEMCMP(pmem_1, pmem_2, size) \ - (((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \ - (CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES) - #define XMEMMOVE XMEMCPY - -#if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED) - #define MICRIUM_MALLOC - #define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \ - (CPU_SIZE_T)(s), (void *)0)) - #define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \ - (p), (void *)0)) - #define XREALLOC(p, n, h, t) realloc((p), (n)) -#endif - - #if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED) - #undef NO_FILESYSTEM - #else - #define NO_FILESYSTEM - #endif - - #if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG) - #define DEBUG_CYASSL - #else - #undef DEBUG_CYASSL - #endif - - #if (SSL_CFG_OPENSSL_EN == DEF_ENABLED) - #define OPENSSL_EXTRA - #else - #undef OPENSSL_EXTRA - #endif - - #if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED) - #undef SINGLE_THREADED - #else - #define SINGLE_THREADED - #endif - - #if (SSL_CFG_DH_EN == DEF_ENABLED) - #undef NO_DH - #else - #define NO_DH - #endif - - #if (SSL_CFG_DSA_EN == DEF_ENABLED) - #undef NO_DSA - #else - #define NO_DSA - #endif - - #if (SSL_CFG_PSK_EN == DEF_ENABLED) - #undef NO_PSK - #else - #define NO_PSK - #endif - - #if (SSL_CFG_3DES_EN == DEF_ENABLED) - #undef NO_DES3 - #else - #define NO_DES3 - #endif - - #if (SSL_CFG_AES_EN == DEF_ENABLED) - #undef NO_AES - #else - #define NO_AES - #endif - - #if (SSL_CFG_RC4_EN == DEF_ENABLED) - #undef NO_RC4 - #else - #define NO_RC4 - #endif - - #if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG) - #define BIG_ENDIAN_ORDER - #else - #undef BIG_ENDIAN_ORDER - #define LITTLE_ENDIAN_ORDER - #endif - - #if (SSL_CFG_MD4_EN == DEF_ENABLED) - #undef NO_MD4 - #else - #define NO_MD4 - #endif - - #if (SSL_CFG_WRITEV_EN == DEF_ENABLED) - #undef NO_WRITEV - #else - #define NO_WRITEV - #endif - - #if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED) - #define NO_DEV_RANDOM - #else - #undef NO_DEV_RANDOM - #endif - - #if (SSL_CFG_USER_IO_EN == DEF_ENABLED) - #define CYASSL_USER_IO - #else - #undef CYASSL_USER_IO - #endif - - #if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED) - #undef LARGE_STATIC_BUFFERS - #undef STATIC_CHUNKS_ONLY - #else - #define LARGE_STATIC_BUFFERS - #define STATIC_CHUNKS_ONLY - #endif - - #if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED) - #define CYASSL_DER_LOAD - #else - #undef CYASSL_DER_LOAD - #endif - - #if (SSL_CFG_DTLS_EN == DEF_ENABLED) - #define CYASSL_DTLS - #else - #undef CYASSL_DTLS - #endif - - #if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED) - #define CYASSL_CALLBACKS - #else - #undef CYASSL_CALLBACKS - #endif - - #if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED) - #define USE_FAST_MATH - #else - #undef USE_FAST_MATH - #endif - - #if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED) - #define TFM_TIMING_RESISTANT - #else - #undef TFM_TIMING_RESISTANT - #endif - -#endif /* MICRIUM */ - - -#ifdef CYASSL_QL - #ifndef CYASSL_SEP - #define CYASSL_SEP - #endif - #ifndef OPENSSL_EXTRA - #define OPENSSL_EXTRA - #endif - #ifndef SESSION_CERTS - #define SESSION_CERTS - #endif - #ifndef HAVE_AESCCM - #define HAVE_AESCCM - #endif - #ifndef ATOMIC_USER - #define ATOMIC_USER - #endif - #ifndef CYASSL_DER_LOAD - #define CYASSL_DER_LOAD - #endif - #ifndef KEEP_PEER_CERT - #define KEEP_PEER_CERT - #endif - #ifndef HAVE_ECC - #define HAVE_ECC - #endif - #ifndef SESSION_INDEX - #define SESSION_INDEX - #endif -#endif /* CYASSL_QL */ - - -#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \ - !defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY) - #define USE_CYASSL_MEMORY -#endif - - -#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) - #undef KEEP_PEER_CERT - #define KEEP_PEER_CERT -#endif - - -/* stream ciphers except arc4 need 32bit alignment, intel ok without */ -#ifndef XSTREAM_ALIGNMENT - #if defined(__x86_64__) || defined(__ia64__) || defined(__i386__) - #define NO_XSTREAM_ALIGNMENT - #else - #define XSTREAM_ALIGNMENT - #endif -#endif - - -/* FreeScale MMCAU hardware crypto has 4 byte alignment */ -#ifdef FREESCALE_MMCAU - #define CYASSL_MMCAU_ALIGNMENT 4 -#endif - -/* if using hardware crypto and have alignment requirements, specify the - requirement here. The record header of SSL/TLS will prvent easy alignment. - This hint tries to help as much as possible. */ -#ifndef CYASSL_GENERAL_ALIGNMENT - #ifdef CYASSL_AESNI - #define CYASSL_GENERAL_ALIGNMENT 16 - #elif defined(XSTREAM_ALIGNMENT) - #define CYASSL_GENERAL_ALIGNMENT 4 - #elif defined(FREESCALE_MMCAU) - #define CYASSL_GENERAL_ALIGNMENT CYASSL_MMCAU_ALIGNMENT - #else - #define CYASSL_GENERAL_ALIGNMENT 0 - #endif -#endif - - -#ifdef __INTEL_COMPILER - #pragma warning(disable:2259) /* explicit casts to smaller sizes, disable */ -#endif - - -/* Place any other flags or defines here */ - - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CTAO_CRYPT_SETTINGS_H */ diff --git a/cyassl/ctaocrypt/settings_comp.h b/cyassl/ctaocrypt/settings_comp.h deleted file mode 100644 index bb29655cb..000000000 --- a/cyassl/ctaocrypt/settings_comp.h +++ /dev/null @@ -1,69 +0,0 @@ -/* settings_comp.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -#ifndef CTAO_CRYPT_SETTINGS_C_H -#define CTAO_CRYPT_SETTINGS_C_H - - -/* since fips overrides rsa.h map compatibility here */ -#if !defined(NO_RSA) - #ifdef WOLFSSL_KEY_GEN - #define RsaKeyToDer wc_RsaKeyToDer - #endif - - #define RsaPrivateKeyDecode wc_RsaPrivateKeyDecode - #define RsaPublicKeyDecode wc_RsaPublicKeyDecode - #define RsaPublicKeyDecodeRaw wc_RsaPublicKeyDecodeRaw -#endif /* have rsa and HAVE_FIPS */ - -/* Macro redefinitions for compatibility */ -#if defined(WOLFSSL_SHA512) && !defined(CYASSL_SHA512) - #define CYASSL_SHA512 -#endif -#if defined(WOLFSSL_SHA384) && !defined(CYASSL_SHA384) - #define CYASSL_SHA384 -#endif -#if defined(WOLFSSL_LEANPSK) && !defined(CYASSL_LEANPSK) - #define CYASSL_LEANPSK -#endif -#if defined(NO_WOLFSSL_MEMORY) && !defined(NO_CYASSL_MEMORY) - #define NO_CYASSL_MEMORY -#endif -#if defined(WOLFSSL_KEY_GEN) && !defined(CYASSL_KEY_GEN) - #define CYASSL_KEY_GEN -#endif - -/* AES */ -#if defined(WOLFSSL_AES_DIRECT) && !defined(CYASSL_AES_DIRECT) - #define CYASSL_AES_DIRECT -#endif -#if defined(WOLFSSL_AES_COUNTER) && !defined(CYASSL_AES_COUNTER) - #define CYASSL_AES_COUNTER -#endif - -/* DES */ -#if defined(WOLFSSL_DES_ECB) && !defined(CYASSL_DES_ECB) - #define CYASSL_DES_ECB -#endif - -#endif /* CTAO_CRYPT_SETTINGS_C_H */ - diff --git a/cyassl/ctaocrypt/sha.h b/cyassl/ctaocrypt/sha.h deleted file mode 100644 index 697426b42..000000000 --- a/cyassl/ctaocrypt/sha.h +++ /dev/null @@ -1,37 +0,0 @@ -/* sha.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef NO_SHA - -#ifndef CTAO_CRYPT_SHA_H -#define CTAO_CRYPT_SHA_H - -#include -#define InitSha wc_InitSha -#define ShaUpdate wc_ShaUpdate -#define ShaFinal wc_ShaFinal -#define ShaHash wc_ShaHash - -#endif /* CTAO_CRYPT_SHA_H */ -#endif /* NO_SHA */ - diff --git a/cyassl/ctaocrypt/sha256.h b/cyassl/ctaocrypt/sha256.h deleted file mode 100644 index c44461af3..000000000 --- a/cyassl/ctaocrypt/sha256.h +++ /dev/null @@ -1,46 +0,0 @@ -/* sha256.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - - - -#ifndef NO_SHA256 - -#ifndef CTAO_CRYPT_SHA256_H -#define CTAO_CRYPT_SHA256_H - -#include -#define InitSha256 wc_InitSha256 -#define Sha256Update wc_Sha256Update -#define Sha256Final wc_Sha256Final -#define Sha256Hash wc_Sha256Hash - -#ifdef WOLFSSL_SHA224 - #define InitSha224 wc_InitSha224 - #define Sha224Update wc_Sha224Update - #define Sha224Final wc_Sha224Final - #define Sha224Hash wc_Sha224Hash -#endif - -#endif /* CTAO_CRYPT_SHA256_H */ -#endif /* NO_SHA256 */ - diff --git a/cyassl/ctaocrypt/sha512.h b/cyassl/ctaocrypt/sha512.h deleted file mode 100644 index 95b98d151..000000000 --- a/cyassl/ctaocrypt/sha512.h +++ /dev/null @@ -1,41 +0,0 @@ -/* sha512.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef CTAO_CRYPT_SHA512_H -#define CTAO_CRYPT_SHA512_H - -#include -#define InitSha512 wc_InitSha512 -#define Sha512Update wc_Sha512Update -#define Sha512Final wc_Sha512Final -#define Sha512Hash wc_Sha512Hash - -#if defined(WOLFSSL_SHA384) || defined(HAVE_AESGCM) - #define InitSha384 wc_InitSha384 - #define Sha384Update wc_Sha384Update - #define Sha384Final wc_Sha384Final - #define Sha384Hash wc_Sha384Hash -#endif /* WOLFSSL_SHA384 */ - -#endif /* CTAO_CRYPT_SHA512_H */ - diff --git a/cyassl/ctaocrypt/tfm.h b/cyassl/ctaocrypt/tfm.h deleted file mode 100644 index 2498ecbd2..000000000 --- a/cyassl/ctaocrypt/tfm.h +++ /dev/null @@ -1,42 +0,0 @@ -/* tfm.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -/* - * Based on public domain TomsFastMath 0.10 by Tom St Denis, tomstdenis@iahu.ca, - * http://math.libtomcrypt.com - */ - - -/** - * Edited by Moisés Guimarães (moises.guimaraes@phoebus.com.br) - * to fit CyaSSL's needs. - */ - - -#ifndef CTAO_CRYPT_TFM_H -#define CTAO_CRYPT_TFM_H - -#include - -#endif /* CTAO_CRYPT_TFM_H */ - diff --git a/cyassl/ctaocrypt/types.h b/cyassl/ctaocrypt/types.h deleted file mode 100644 index 68a63cac5..000000000 --- a/cyassl/ctaocrypt/types.h +++ /dev/null @@ -1,39 +0,0 @@ -/* types.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef CTAO_CRYPT_TYPES_H -#define CTAO_CRYPT_TYPES_H - -#include -#include -#include - -/* compatibility macros */ -#define CYASSL_WORD_SIZE WOLFSSL_WORD_SIZE -#define CYASSL_BIT_SIZE WOLFSSL_BIT_SIZE -#define CYASSL_MAX_16BIT WOLFSSL_MAX_16BIT -#define CYASSL_MAX_ERROR_SZ WOLFSSL_MAX_ERROR_SZ -#define cyassl_word wolfssl_word - -#endif /* CTAO_CRYPT_TYPES_H */ - diff --git a/cyassl/ctaocrypt/visibility.h b/cyassl/ctaocrypt/visibility.h deleted file mode 100644 index 3572fb51f..000000000 --- a/cyassl/ctaocrypt/visibility.h +++ /dev/null @@ -1,73 +0,0 @@ -/* visibility.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -/* Visibility control macros */ - -#ifndef CTAO_CRYPT_VISIBILITY_H -#define CTAO_CRYPT_VISIBILITY_H - -/* fips compatibility @wc_fips */ -#ifndef HAVE_FIPS - #include - #define CYASSL_API WOLFSSL_API - #define CYASSL_LOCAL WOLFSSL_LOCAL -#else -/* CYASSL_API is used for the public API symbols. - It either imports or exports (or does nothing for static builds) - - CYASSL_LOCAL is used for non-API symbols (private). -*/ - -#if defined(BUILDING_WOLFSSL) - #if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY - #define CYASSL_API __attribute__ ((visibility("default"))) - #define CYASSL_LOCAL __attribute__ ((visibility("hidden"))) - #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) - #define CYASSL_API __global - #define CYASSL_LOCAL __hidden - #elif defined(_MSC_VER) - #ifdef CYASSL_DLL - #define CYASSL_API extern __declspec(dllexport) - #else - #define CYASSL_API - #endif - #define CYASSL_LOCAL - #else - #define CYASSL_API - #define CYASSL_LOCAL - #endif /* HAVE_VISIBILITY */ -#else /* BUILDING_WOLFSSL */ - #if defined(_MSC_VER) - #ifdef CYASSL_DLL - #define CYASSL_API extern __declspec(dllimport) - #else - #define CYASSL_API - #endif - #define CYASSL_LOCAL - #else - #define CYASSL_API - #define CYASSL_LOCAL - #endif -#endif /* BUILDING_WOLFSSL */ -#endif /* HAVE_FIPS */ -#endif /* CTAO_CRYPT_VISIBILITY_H */ - diff --git a/cyassl/ctaocrypt/wc_port.h b/cyassl/ctaocrypt/wc_port.h deleted file mode 100644 index 9613b732b..000000000 --- a/cyassl/ctaocrypt/wc_port.h +++ /dev/null @@ -1,32 +0,0 @@ -/* port.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -#ifndef CTAO_CRYPT_PORT_H -#define CTAO_CRYPT_PORT_H - -#include -#include -#define CyaSSL_Mutex wolfSSL_Mutex - -#endif /* CTAO_CRYPT_PORT_H */ - diff --git a/cyassl/error-ssl.h b/cyassl/error-ssl.h deleted file mode 100644 index 4546d5e18..000000000 --- a/cyassl/error-ssl.h +++ /dev/null @@ -1,23 +0,0 @@ -/* error-ssl.h - * - * Copyright (C) 2006-2023 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 2 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 diff --git a/cyassl/include.am b/cyassl/include.am deleted file mode 100644 index b4c7e0436..000000000 --- a/cyassl/include.am +++ /dev/null @@ -1,31 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -include cyassl/ctaocrypt/include.am -include cyassl/openssl/include.am - -EXTRA_DIST+= cyassl/sniffer_error.rc - -nobase_include_HEADERS+= \ - 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 - -noinst_HEADERS+= \ - cyassl/internal.h - -# For distro build don't install options.h. -# It depends on the architecture and conflicts with Multi-Arch. -if BUILD_DISTRO -noinst_HEADERS+= cyassl/options.h -else -nobase_include_HEADERS+= cyassl/options.h -endif diff --git a/cyassl/internal.h b/cyassl/internal.h deleted file mode 100644 index abf49bd35..000000000 --- a/cyassl/internal.h +++ /dev/null @@ -1,23 +0,0 @@ -/* internal.h - * - * Copyright (C) 2006-2023 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 2 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 diff --git a/cyassl/ocsp.h b/cyassl/ocsp.h deleted file mode 100644 index 256c422d2..000000000 --- a/cyassl/ocsp.h +++ /dev/null @@ -1,23 +0,0 @@ -/* ocsp.h - * - * Copyright (C) 2006-2023 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 2 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 diff --git a/cyassl/openssl/asn1.h b/cyassl/openssl/asn1.h deleted file mode 100644 index 35be23f7d..000000000 --- a/cyassl/openssl/asn1.h +++ /dev/null @@ -1,3 +0,0 @@ -/* asn1.h for openssl */ - -#include diff --git a/cyassl/openssl/bio.h b/cyassl/openssl/bio.h deleted file mode 100644 index 8f5298355..000000000 --- a/cyassl/openssl/bio.h +++ /dev/null @@ -1,4 +0,0 @@ -/* bio.h for openssl */ - -#include - diff --git a/cyassl/openssl/bn.h b/cyassl/openssl/bn.h deleted file mode 100644 index e14f4e28c..000000000 --- a/cyassl/openssl/bn.h +++ /dev/null @@ -1,3 +0,0 @@ -/* bn.h for openssl */ - -#include diff --git a/cyassl/openssl/conf.h b/cyassl/openssl/conf.h deleted file mode 100644 index 4005ea9d7..000000000 --- a/cyassl/openssl/conf.h +++ /dev/null @@ -1,3 +0,0 @@ -/* conf.h for openssl */ - -#include diff --git a/cyassl/openssl/crypto.h b/cyassl/openssl/crypto.h deleted file mode 100644 index 32e110826..000000000 --- a/cyassl/openssl/crypto.h +++ /dev/null @@ -1,4 +0,0 @@ -/* crypto.h for openSSL */ - -#include - diff --git a/cyassl/openssl/des.h b/cyassl/openssl/des.h deleted file mode 100644 index ac3ec5451..000000000 --- a/cyassl/openssl/des.h +++ /dev/null @@ -1,28 +0,0 @@ -/* des.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -/* des.h defines mini des openssl compatibility layer - * - */ - -#include diff --git a/cyassl/openssl/dh.h b/cyassl/openssl/dh.h deleted file mode 100644 index 6fd8e36e9..000000000 --- a/cyassl/openssl/dh.h +++ /dev/null @@ -1,4 +0,0 @@ -/* dh.h for openSSL */ - - -#include diff --git a/cyassl/openssl/dsa.h b/cyassl/openssl/dsa.h deleted file mode 100644 index 39ddf8ce7..000000000 --- a/cyassl/openssl/dsa.h +++ /dev/null @@ -1,12 +0,0 @@ -/* dsa.h for openSSL */ - -#ifndef CYASSL_OPENSSL_DSA -#define CYASSL_OPENSSL_DSA - -#define CyaSSL_DSA_LoadDer wolfSSL_DSA_LoadDer -#define CyaSSL_DSA_do_sign wolfSSL_DSA_do_sign - -#include -#include -#endif - diff --git a/cyassl/openssl/ec.h b/cyassl/openssl/ec.h deleted file mode 100644 index 1ce8aa948..000000000 --- a/cyassl/openssl/ec.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ec.h for openssl */ - -#include diff --git a/cyassl/openssl/ec25519.h b/cyassl/openssl/ec25519.h deleted file mode 100644 index 6ee894506..000000000 --- a/cyassl/openssl/ec25519.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ec25519.h */ - -#include diff --git a/cyassl/openssl/ec448.h b/cyassl/openssl/ec448.h deleted file mode 100644 index c3fe4c3ab..000000000 --- a/cyassl/openssl/ec448.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ec448.h */ - -#include diff --git a/cyassl/openssl/ecdh.h b/cyassl/openssl/ecdh.h deleted file mode 100644 index b774bf0da..000000000 --- a/cyassl/openssl/ecdh.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ecdh.h for openssl */ - -#include diff --git a/cyassl/openssl/ecdsa.h b/cyassl/openssl/ecdsa.h deleted file mode 100644 index 9a1c02b35..000000000 --- a/cyassl/openssl/ecdsa.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ecdsa.h for openssl */ - -#include \ No newline at end of file diff --git a/cyassl/openssl/ed25519.h b/cyassl/openssl/ed25519.h deleted file mode 100644 index 240cbcaaf..000000000 --- a/cyassl/openssl/ed25519.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ed25519.h */ - -#include diff --git a/cyassl/openssl/ed448.h b/cyassl/openssl/ed448.h deleted file mode 100644 index ebb9c6194..000000000 --- a/cyassl/openssl/ed448.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ed448.h */ - -#include diff --git a/cyassl/openssl/engine.h b/cyassl/openssl/engine.h deleted file mode 100644 index fcce4bdb9..000000000 --- a/cyassl/openssl/engine.h +++ /dev/null @@ -1,5 +0,0 @@ -/* engine.h for libcurl */ - -#include - - diff --git a/cyassl/openssl/err.h b/cyassl/openssl/err.h deleted file mode 100644 index 361111708..000000000 --- a/cyassl/openssl/err.h +++ /dev/null @@ -1,3 +0,0 @@ -/* err.h for openssl */ - -#include diff --git a/cyassl/openssl/evp.h b/cyassl/openssl/evp.h deleted file mode 100644 index 0d4026cc0..000000000 --- a/cyassl/openssl/evp.h +++ /dev/null @@ -1,41 +0,0 @@ -/* evp.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -/* evp.h defines mini evp openssl compatibility layer - * - */ - -#ifndef CYASSL_OPENSSL_EVP -#define CYASSL_OPENSSL_EVP - -#define CyaSSL_StoreExternalIV wolfSSL_StoreExternalIV -#define CyaSSL_SetInternalIV wolfSSL_SetInternalIV -#define CYASSL_EVP_MD WOLFSSL_EVP_MD -#define CyaSSL_EVP_X_STATE wolfSSL_EVP_X_STATE -#define CyaSSL_EVP_X_STATE_LEN wolfSSL_EVP_X_STATE_LEN -#define CyaSSL_3des_iv wolfSSL_3des_iv -#define CyaSSL_aes_ctr_iv wolfSSL_aes_ctr_iv - -#include -#endif - diff --git a/cyassl/openssl/hmac.h b/cyassl/openssl/hmac.h deleted file mode 100644 index 8cbd560f4..000000000 --- a/cyassl/openssl/hmac.h +++ /dev/null @@ -1,28 +0,0 @@ -/* hmac.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -/* hmac.h defines mini hamc openssl compatibility layer - * - */ - -#include diff --git a/cyassl/openssl/include.am b/cyassl/openssl/include.am deleted file mode 100644 index a1b25c6b6..000000000 --- a/cyassl/openssl/include.am +++ /dev/null @@ -1,42 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root - -nobase_include_HEADERS+= \ - 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 diff --git a/cyassl/openssl/lhash.h b/cyassl/openssl/lhash.h deleted file mode 100644 index 6285f6a5f..000000000 --- a/cyassl/openssl/lhash.h +++ /dev/null @@ -1,3 +0,0 @@ -/* lhash.h for openSSL */ - -#include \ No newline at end of file diff --git a/cyassl/openssl/md4.h b/cyassl/openssl/md4.h deleted file mode 100644 index fb0d437ab..000000000 --- a/cyassl/openssl/md4.h +++ /dev/null @@ -1,3 +0,0 @@ -/* md4.h for libcurl */ - -#include diff --git a/cyassl/openssl/md5.h b/cyassl/openssl/md5.h deleted file mode 100644 index f3dd4e4b2..000000000 --- a/cyassl/openssl/md5.h +++ /dev/null @@ -1,5 +0,0 @@ -/* md5.h for openssl */ - - -#include - diff --git a/cyassl/openssl/ocsp.h b/cyassl/openssl/ocsp.h deleted file mode 100644 index 8c0f46805..000000000 --- a/cyassl/openssl/ocsp.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ocsp.h for libcurl */ - -#include diff --git a/cyassl/openssl/opensslconf.h b/cyassl/openssl/opensslconf.h deleted file mode 100644 index 7f21cd950..000000000 --- a/cyassl/openssl/opensslconf.h +++ /dev/null @@ -1,3 +0,0 @@ -/* opensslconf.h for openSSL */ - -#include diff --git a/cyassl/openssl/opensslv.h b/cyassl/openssl/opensslv.h deleted file mode 100644 index d119f82e1..000000000 --- a/cyassl/openssl/opensslv.h +++ /dev/null @@ -1,3 +0,0 @@ -/* opensslv.h compatibility */ - -#include diff --git a/cyassl/openssl/ossl_typ.h b/cyassl/openssl/ossl_typ.h deleted file mode 100644 index 5e6e627de..000000000 --- a/cyassl/openssl/ossl_typ.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ossl_typ.h for openssl */ - -#include diff --git a/cyassl/openssl/pem.h b/cyassl/openssl/pem.h deleted file mode 100644 index a07b91203..000000000 --- a/cyassl/openssl/pem.h +++ /dev/null @@ -1,3 +0,0 @@ -/* pem.h for openssl */ - -#include diff --git a/cyassl/openssl/pkcs12.h b/cyassl/openssl/pkcs12.h deleted file mode 100644 index 1fb089fbb..000000000 --- a/cyassl/openssl/pkcs12.h +++ /dev/null @@ -1,3 +0,0 @@ -/* pkcs12.h for openssl */ - -#include diff --git a/cyassl/openssl/rand.h b/cyassl/openssl/rand.h deleted file mode 100644 index 5bd77b6c6..000000000 --- a/cyassl/openssl/rand.h +++ /dev/null @@ -1,3 +0,0 @@ -/* rand.h for openSSL */ - -#include diff --git a/cyassl/openssl/ripemd.h b/cyassl/openssl/ripemd.h deleted file mode 100644 index b25de783e..000000000 --- a/cyassl/openssl/ripemd.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ripemd.h for openssl */ - -#include diff --git a/cyassl/openssl/rsa.h b/cyassl/openssl/rsa.h deleted file mode 100644 index f4f24b825..000000000 --- a/cyassl/openssl/rsa.h +++ /dev/null @@ -1,12 +0,0 @@ -/* rsa.h for openSSL */ - -#ifndef CYASSL_OPENSSL_RSA -#define CYASSL_OPENSSL_RSA - -#define CyaSSL_RSA_GenAdd wolfSSL_RSA_GenAdd -#define CyaSSL_RSA_LoadDer wolfSSL_RSA_LoadDer - -#include -#include -#endif - diff --git a/cyassl/openssl/sha.h b/cyassl/openssl/sha.h deleted file mode 100644 index ced3ca19b..000000000 --- a/cyassl/openssl/sha.h +++ /dev/null @@ -1,3 +0,0 @@ -/* sha.h for openssl */ - -#include diff --git a/cyassl/openssl/ssl.h b/cyassl/openssl/ssl.h deleted file mode 100644 index 8a52cd5d7..000000000 --- a/cyassl/openssl/ssl.h +++ /dev/null @@ -1,34 +0,0 @@ -/* ssl.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - - -/* ssl.h defines openssl compatibility layer - * - */ -#ifndef CYASSL_OPENSSL_H_ -#define CYASSL_OPENSSL_H_ - -#include -#include - -#endif - diff --git a/cyassl/openssl/ssl23.h b/cyassl/openssl/ssl23.h deleted file mode 100644 index a91524b9b..000000000 --- a/cyassl/openssl/ssl23.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ssl23.h for openssl */ - -#include diff --git a/cyassl/openssl/stack.h b/cyassl/openssl/stack.h deleted file mode 100644 index 831502f50..000000000 --- a/cyassl/openssl/stack.h +++ /dev/null @@ -1,3 +0,0 @@ -/* stack.h for openssl */ - -#include diff --git a/cyassl/openssl/ui.h b/cyassl/openssl/ui.h deleted file mode 100644 index b1f4042e2..000000000 --- a/cyassl/openssl/ui.h +++ /dev/null @@ -1,3 +0,0 @@ -/* ui.h for openssl */ - -#include diff --git a/cyassl/openssl/x509.h b/cyassl/openssl/x509.h deleted file mode 100644 index 9d1300284..000000000 --- a/cyassl/openssl/x509.h +++ /dev/null @@ -1,3 +0,0 @@ -/* x509.h for openssl */ - -#include diff --git a/cyassl/openssl/x509v3.h b/cyassl/openssl/x509v3.h deleted file mode 100644 index 2a5240d99..000000000 --- a/cyassl/openssl/x509v3.h +++ /dev/null @@ -1,3 +0,0 @@ -/* x509v3.h for openssl */ - -#include diff --git a/cyassl/options.h.in b/cyassl/options.h.in deleted file mode 100644 index 19179a8e8..000000000 --- a/cyassl/options.h.in +++ /dev/null @@ -1,40 +0,0 @@ -/* options.h.in - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -/* default blank options for autoconf */ - -#ifndef CYASSL_OPTIONS_H -#define CYASSL_OPTIONS_H - - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef __cplusplus -} -#endif - - -#endif /* CYASSL_OPTIONS_H */ - diff --git a/cyassl/sniffer.h b/cyassl/sniffer.h deleted file mode 100644 index 560932b47..000000000 --- a/cyassl/sniffer.h +++ /dev/null @@ -1,23 +0,0 @@ -/* sniffer.h - * - * Copyright (C) 2006-2023 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 2 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 diff --git a/cyassl/sniffer_error.h b/cyassl/sniffer_error.h deleted file mode 100644 index 450ec676f..000000000 --- a/cyassl/sniffer_error.h +++ /dev/null @@ -1,23 +0,0 @@ -/* sniffer_error.h - * - * Copyright (C) 2006-2023 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 2 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 diff --git a/cyassl/sniffer_error.rc b/cyassl/sniffer_error.rc deleted file mode 100644 index 8bcd6926c..000000000 --- a/cyassl/sniffer_error.rc +++ /dev/null @@ -1,93 +0,0 @@ - -STRINGTABLE -{ - 1, "Out of Memory" - 2, "New SSL Sniffer Server Registered" - 3, "Checking IP Header" - 4, "SSL Sniffer Server Not Registered" - 5, "Checking TCP Header" - - 6, "SSL Sniffer Server Port Not Registered" - 7, "RSA Private Decrypt Error" - 8, "RSA Private Decode Error" - 9, "Set Cipher Spec Error" - 10, "Server Hello Input Malformed" - - 11, "Couldn't Resume Session Error" - 12, "Server Did Resumption" - 13, "Client Hello Input Malformed" - 14, "Client Trying to Resume" - 15, "Handshake Input Malformed" - - 16, "Got Hello Verify msg" - 17, "Got Server Hello msg" - 18, "Got Cert Request msg" - 19, "Got Server Key Exchange msg" - 20, "Got Cert msg" - - 21, "Got Server Hello Done msg" - 22, "Got Finished msg" - 23, "Got Client Hello msg" - 24, "Got Client Key Exchange msg" - 25, "Got Cert Verify msg" - - 26, "Got Unknown Handshake msg" - 27, "New SSL Sniffer Session created" - 28, "Couldn't create new SSL" - 29, "Got a Packet to decode" - 30, "No data present" - - 31, "Session Not Found" - 32, "Got an Old Client Hello msg" - 33, "Old Client Hello Input Malformed" - 34, "Old Client Hello OK" - 35, "Bad Old Client Hello" - - 36, "Bad Record Header" - 37, "Record Header Input Malformed" - 38, "Got a HandShake msg" - 39, "Bad HandShake msg" - 40, "Got a Change Cipher Spec msg" - - 41, "Got Application Data msg" - 42, "Bad Application Data" - 43, "Got an Alert msg" - 44, "Another msg to Process" - 45, "Removing Session From Table" - - 46, "Bad Key File" - 47, "Wrong IP Version" - 48, "Wrong Protocol type" - 49, "Packet Short for header processing" - 50, "Got Unknown Record Type" - - 51, "Can't Open Trace File" - 52, "Session in Fatal Error State" - 53, "Partial SSL record received" - 54, "Buffer Error, malformed input" - 55, "Added to Partial Input" - - 56, "Received a Duplicate Packet" - 57, "Received an Out of Order Packet" - 58, "Received an Overlap Duplicate Packet" - 59, "Received an Overlap Reassembly Begin Duplicate Packet" - 60, "Received an Overlap Reassembly End Duplicate Packet" - - 61, "Missed the Client Hello Entirely" - 62, "Got Hello Request msg" - 63, "Got Session Ticket msg" - 64, "Bad Input" - 65, "Bad Decrypt Type" - - 66, "Bad Finished Message Processing" - 67, "Bad Compression Type" - 68, "Bad DeriveKeys Error" - 69, "Saw ACK for Missing Packet Error" - 70, "Bad Decrypt Operation" - - 71, "Decrypt Keys Not Set Up" - 72, "Late Key Load Error" - 73, "Got Certificate Status msg" - 74, "RSA Key Missing Error" -} - diff --git a/cyassl/ssl.h b/cyassl/ssl.h deleted file mode 100644 index c6606d0cb..000000000 --- a/cyassl/ssl.h +++ /dev/null @@ -1,722 +0,0 @@ -/* ssl.h - * - * Copyright (C) 2006-2023 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 2 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 - */ - - -/* - * ssl.h makes wolfssl backwards compatible with cyassl - */ - -#ifndef WOLFSSL_CYASSL_H_ -#define WOLFSSL_CYASSL_H_ -/* - * Name change - * include the new ssl.h - */ -#include -#include -#include - -#ifdef __cplusplus - extern "C" { -#endif - -#ifdef _WIN32 - /* wincrypt.h clashes */ - #undef X509_NAME -#endif - -#ifdef CYASSL_TIRTOS - #undef CYASSL_TIRTOS - #define CYASSL_TIRTOS WOLFSSL_TIRTOS -#endif - -#define CYASSL WOLFSSL -#define DEBUG_CYASSL DEBUG_WOLFSSL -#define CYASSL_CTX WOLFSSL_CTX -#define CYASSL_METHOD WOLFSSL_METHOD -#define CYASSL_SESSION WOLFSSL_SESSION - -#define CYASSL_X509 WOLFSSL_X509 -#define CYASSL_X509_NAME WOLFSSL_X509_NAME -#define CYASSL_X509_CHAIN WOLFSSL_X509_CHAIN -#ifdef WOLFSSL_SNIFFER - #define CYASSL_SNIFFER WOLFSSL_SNIFFER -#endif - -/* redeclare guard */ -#define CYASSL_TYPES_DEFINED WOLFSSL_TYPES_DEFINED - -/* legacy defines */ -#define yasslIP wolfSSLIP /**/ -#define yasslPort wolfSSLPort /**/ - -/* cyassl/ssl.h (structs) */ -#define CYASSL_RSA WOLFSSL_RSA -#define CYASSL_DSA WOLFSSL_DSA -#define CYASSL_BIO WOLFSSL_BIO -#define CYASSL_CIPHER WOLFSSL_CIPHER -#define CYASSL_MD4_CTX WOLFSSL_MD4_CTX -#define CYASSL_MFL_2_9 WOLFSSL_MFL_2_9 /**/ -#define CYASSL_MFL_2_13 WOLFSSL_MFL_2_13 /**/ -#define CYASSL_EVP_PKEY WOLFSSL_EVP_PKEY -#define CYASSL_X509_CRL WOLFSSL_X509_CRL -#define CYASSL_ASN1_TIME WOLFSSL_ASN1_TIME -#define CYASSL_BIO_METHOD WOLFSSL_BIO_METHOD -#define CYASSL_X509_STORE WOLFSSL_X509_STORE -#define CYASSL_X509_OBJECT WOLFSSL_X509_OBJECT -#define CYASSL_X509_LOOKUP WOLFSSL_X509_LOOKUP -#define CYASSL_ASN1_OBJECT WOLFSSL_ASN1_OBJECT -#define CYASSL_ASN1_STRING WOLFSSL_ASN1_STRING -#define CYASSL_COMP_METHOD WOLFSSL_COMP_METHOD -#define CYASSL_CRL_CHECKALL WOLFSSL_CRL_CHECKALL -#define CYASSL_ASN1_INTEGER WOLFSSL_ASN1_INTEGER -#define CYASSL_X509_REVOKED WOLFSSL_X509_REVOKED -#define CYASSL_dynlock_value WOLFSSL_dynlock_value -#define CYASSL_X509_EXTENSION WOLFSSL_X509_EXTENSION -#define CYASSL_X509_STORE_CTX WOLFSSL_X509_STORE_CTX -#define CYASSL_X509_LOOKUP_METHOD WOLFSSL_X509_LOOKUP_METHOD - -#define CyaSSL_LoadCRL wolfSSL_LoadCRL -#define CyaSSL_EnableCRL wolfSSL_EnableCRL -#define CyaSSL_SetCRL_Cb wolfSSL_SetCRL_Cb - -/* cyassl/test.h */ -#ifdef CyaSSL_TEST_H - #define CYASSL_THREAD WOLFSSL_THREAD -#endif - -/* src/ssl.c */ -#define CYASSL_CRL WOLFSSL_CRL -#define CYASSL_SSLV3 WOLFSSL_SSLV3 -#define CYASSL_TLSV1 WOLFSSL_TLSV1 -#define CYASSL_TLSV1_1 WOLFSSL_TLSV1_1 -#define CYASSL_TLSV1_2 WOLFSSL_TLSV1_2 -#define CYASSL_USER_CA WOLFSSL_USER_CA -#define CYASSL_CLIENT_END WOLFSSL_CLIENT_END -#define CYASSL_CERT_MANAGER WOLFSSL_CERT_MANAGER -#define MAX_CYASSL_FILE_SIZE MAX_WOLFSSL_FILE_SIZE - -#define CyaSSL_get_cipher wolfSSL_get_cipher -#define CyaSSL_get_ciphers wolfSSL_get_ciphers -#define CyaSSL_KeyPemToDer wolfSSL_KeyPemToDer -#define CyaSSL_get_version wolfSSL_get_version -#define CyaSSL_SetServerID wolfSSL_SetServerID -#define CyaSSL_use_old_poly wolfSSL_use_old_poly -#define CyaSSL_SetCertCbCtx wolfSSL_SetCertCbCtx -#define CyaSSL_CertPemToDer wolfSSL_CertPemToDer -#define CyaSSL_get_shutdown wolfSSL_get_shutdown -#define CyaSSL_SetMinVersion wolfSSL_SetMinVersion -#define CyaSSL_CTX_UnloadCAs wolfSSL_CTX_UnloadCAs -#define CyaSSL_session_reused wolfSSL_session_reused -#define CyaSSL_UnloadCertsKeys wolfSSL_UnloadCertsKeys -#define CyaSSL_CIPHER_get_name wolfSSL_CIPHER_get_name -#define CyaSSL_is_init_finished wolfSSL_is_init_finished -#define CyaSSL_get_alert_history wolfSSL_get_alert_history -#define CyaSSL_get_current_cipher wolfSSL_get_current_cipher -#define CyaSSL_CertManagerUnloadCAs wolfSSL_CertManagerUnloadCAs -#define CyaSSL_CertManagerEnableOCSP wolfSSL_CertManagerEnableOCSP -#define CyaSSL_CTX_check_private_key wolfSSL_CTX_check_private_key -#define CyaSSL_CertManagerDisableOCSP wolfSSL_CertManagerDisableOCSP -#define CyaSSL_get_current_cipher_suite wolfSSL_get_current_cipher_suite -#define CyaSSL_CTX_load_verify_locations wolfSSL_CTX_load_verify_locations -#define CyaSSL_CTX_set_default_passwd_cb wolfSSL_CTX_set_default_passwd_cb - -#define CyaSSL_save_session_cache wolfSSL_save_session_cache -#define CyaSSL_restore_session_cache wolfSSL_restore_session_cache -#define CyaSSL_memsave_session_cache wolfSSL_memsave_session_cache -#define CyaSSL_memrestore_session_cache wolfSSL_memrestore_session_cache -#define CyaSSL_get_session_cache_memsize wolfSSL_get_session_cache_memsize - -/* certificate cache persistence, uses ctx since certs are per ctx */ -#define CyaSSL_CTX_save_cert_cache wolfSSL_CTX_save_cert_cache -#define CyaSSL_CTX_restore_cert_cache wolfSSL_CTX_restore_cert_cache -#define CyaSSL_CTX_memsave_cert_cache wolfSSL_CTX_memsave_cert_cache -#define CyaSSL_CTX_memrestore_cert_cache wolfSSL_CTX_memrestore_cert_cache -#define CyaSSL_CTX_get_cert_cache_memsize wolfSSL_CTX_get_cert_cache_memsize - -/* wolfSSL extensions */ -/* get wolfSSL peer X509_CHAIN */ -#define CyaSSL_get_chain_count wolfSSL_get_chain_count -/* index cert length */ -#define CyaSSL_get_chain_length wolfSSL_get_chain_length -/* index cert in X509 */ -#define CyaSSL_get_chain_X509 wolfSSL_get_chain_X509 -/* free X509 */ -#define CyaSSL_FreeX509 wolfSSL_FreeX509 -/* get index cert in PEM */ -#define CyaSSL_X509_get_subjectCN wolfSSL_X509_get_subjectCN -#define CyaSSL_X509_get_der wolfSSL_X509_get_der -#define CyaSSL_X509_notBefore wolfSSL_X509_notBefore -#define CyaSSL_X509_notAfter wolfSSL_X509_notAfter -#define CyaSSL_X509_get_notBefore wolfSSL_X509_get_notBefore -#define CyaSSL_X509_get_notAfter wolfSSL_X509_get_notAfter -#define CyaSSL_X509_version wolfSSL_X509_version - -#define CyaSSL_cmp_peer_cert_to_file wolfSSL_cmp_peer_cert_to_file - -#define CyaSSL_X509_get_next_altname wolfSSL_X509_get_next_altname - -#define CyaSSL_X509_d2i wolfSSL_X509_d2i -#ifndef NO_FILESYSTEM - #ifndef NO_STDIO_FILESYSTEM - #define CyaSSL_X509_d2i_fp wolfSSL_X509_d2i_fp - #endif -#define CyaSSL_X509_load_certificate_file wolfSSL_X509_load_certificate_file -#endif - -#ifdef WOLFSSL_SEP -#define CyaSSL_X509_get_device_type wolfSSL_X509_get_device_type -#define CyaSSL_X509_get_hw_type wolfSSL_X509_get_hw_type -#define CyaSSL_X509_get_hw_serial_number wolfSSL_X509_get_hw_serial_number -#endif - -#define CyaSSL_CTX_SetGenCookie wolfSSL_CTX_SetGenCookie -#define CyaSSL_SetCookieCtx wolfSSL_SetCookieCtx -#define CyaSSL_GetCookieCtx wolfSSL_GetCookieCtx -#define CyaSSL_ERR_get_error_line_data wolfSSL_ERR_get_error_line_data -#define CyaSSL_ERR_get_error wolfSSL_ERR_get_error -#define CyaSSL_ERR_clear_error wolfSSL_ERR_clear_error -#define CyaSSL_RAND_status wolfSSL_RAND_status -#define CyaSSL_RAND_bytes wolfSSL_RAND_bytes -#define CyaSSL_CTX_set_options wolfSSL_CTX_set_options -#define CyaSSL_ERR_free_strings wolfSSL_ERR_free_strings -#define CyaSSL_ERR_remove_state wolfSSL_ERR_remove_state -#define CyaSSL_EVP_cleanup wolfSSL_EVP_cleanup -#define CyaSSL_cleanup_all_ex_data wolfSSL_cleanup_all_ex_data -#define CyaSSL_CTX_set_mode wolfSSL_CTX_set_mode -#define CyaSSL_CTX_get_mode wolfSSL_CTX_get_mode -#define CyaSSL_CTX_set_default_read_ahead wolfSSL_CTX_set_default_read_ahead -#define CyaSSL_CTX_sess_set_cache_size wolfSSL_CTX_sess_set_cache_size -#define CyaSSL_CTX_set_default_verify_paths wolfSSL_CTX_set_default_verify_paths -#define CyaSSL_CTX_set_session_id_context wolfSSL_CTX_set_session_id_context -#define CyaSSL_get_peer_certificate wolfSSL_get_peer_certificate -#define CyaSSL_BIO_printf wolfSSL_BIO_printf -#define CyaSSL_ASN1_UTCTIME_print wolfSSL_ASN1_UTCTIME_print -#define CyaSSL_sk_num wolfSSL_sk_num -#define CyaSSL_sk_value wolfSSL_sk_value - -/* stunnel 4.28 needs */ -#define CyaSSL_CTX_get_ex_data wolfSSL_CTX_get_ex_data -#define CyaSSL_CTX_set_ex_data wolfSSL_CTX_set_ex_data -#define CyaSSL_CTX_sess_set_get_cb wolfSSL_CTX_sess_set_get_cb -#define CyaSSL_CTX_sess_set_new_cb wolfSSL_CTX_sess_set_new_cb -#define CyaSSL_CTX_sess_set_remove_cb wolfSSL_CTX_sess_set_remove_cb - -#define CyaSSL_i2d_SSL_SESSION wolfSSL_i2d_SSL_SESSION -#define CyaSSL_d2i_SSL_SESSION wolfSSL_d2i_SSL_SESSION - -#define CyaSSL_SESSION_get_timeout wolfSSL_SESSION_get_timeout -#define CyaSSL_SESSION_get_time wolfSSL_SESSION_get_time -#define CyaSSL_CTX_get_ex_new_index wolfSSL_CTX_get_ex_new_index - - -/* wolfio.c */ -#define CYASSL_CBIO_ERR_ISR WOLFSSL_CBIO_ERR_ISR -#define CYASSL_CBIO_ERR_TIMEOUT WOLFSSL_CBIO_ERR_TIMEOUT -#define CYASSL_CBIO_ERR_GENERAL WOLFSSL_CBIO_ERR_GENERAL -#define CYASSL_CBIO_ERR_CONN_RST WOLFSSL_CBIO_ERR_CONN_RST -#define CYASSL_CBIO_ERR_WANT_READ WOLFSSL_CBIO_ERR_WANT_READ -#define CYASSL_CBIO_ERR_WANT_WRITE WOLFSSL_CBIO_ERR_WANT_WRITE -#define CYASSL_CBIO_ERR_CONN_CLOSE WOLFSSL_CBIO_ERR_CONN_CLOSE - -#define CyaSSL_GetIOReadCtx wolfSSL_GetIOReadCtx -#define CyaSSL_GetIOWriteCtx wolfSSL_GetIOWriteCtx - -/* src/tls.c */ -#define CYASSL_SERVER_END WOLFSSL_SERVER_END -#define CYASSL_TLS_HMAC_INNER_SZ WOLFSSL_TLS_HMAC_INNER_SZ - -#define CyaSSL_DeriveTlsKeys wolfSSL_DeriveTlsKeys -#define CyaSSL_make_eap_keys wolfSSL_make_eap_keys -#define CyaSSL_MakeTlsMasterSecret wolfSSL_MakeTlsMasterSecret - -/* src/internal.c */ -#define CYASSL_CHAIN_CA WOLFSSL_CHAIN_CA -#define CYASSL_ALERT_HISTORY WOLFSSL_ALERT_HISTORY -#define CYASSL_SESSION_TIMEOUT WOLFSSL_SESSION_TIMEOUT -#define CYASSL_CBIO_ERR_CONN_RST WOLFSSL_CBIO_ERR_CONN_RST - -#define cyassl_rc4 wolfssl_rc4 -#define cyassl_aes wolfssl_aes -#define cyassl_chacha wolfssl_chacha -#define CyaSSL_ERR_reason_error_string wolfSSL_ERR_reason_error_string - -#define CyaSSL_set_ex_data wolfSSL_set_ex_data -#define CyaSSL_get_shutdown wolfSSL_get_shutdown -#define CyaSSL_set_rfd wolfSSL_set_rfd -#define CyaSSL_set_wfd wolfSSL_set_wfd -#define CyaSSL_set_shutdown wolfSSL_set_shutdown -#define CyaSSL_set_session_id_context wolfSSL_set_session_id_context -#define CyaSSL_set_connect_state wolfSSL_set_connect_state -#define CyaSSL_set_accept_state wolfSSL_set_accept_state -#define CyaSSL_session_reused wolfSSL_session_reused -#define CyaSSL_SESSION_free wolfSSL_SESSION_free -#define CyaSSL_is_init_finished wolfSSL_is_init_finished - -#define CyaSSL_get_version wolfSSL_get_version -#define CyaSSL_get_current_cipher_suite wolfSSL_get_current_cipher_suite -#define CyaSSL_get_current_cipher wolfSSL_get_current_cipher -#define CyaSSL_CIPHER_description wolfSSL_CIPHER_description -#define CyaSSL_CIPHER_get_name wolfSSL_CIPHER_get_name -#define CyaSSL_get_cipher wolfSSL_get_cipher -#define CyaSSL_get1_session wolfSSL_get1_session - -#define CyaSSL_X509_free wolfSSL_X509_free -#define CyaSSL_OPENSSL_free wolfSSL_OPENSSL_free -#define CyaSSL_OCSP_parse_url wolfSSL_OCSP_parse_url - -#define CyaSSLv23_client_method wolfSSLv23_client_method -#define CyaSSLv2_client_method wolfSSLv2_client_method -#define CyaSSLv2_server_method wolfSSLv2_server_method - -#define CyaSSL_MD4_Init wolfSSL_MD4_Init -#define CyaSSL_MD4_Update wolfSSL_MD4_Update -#define CyaSSL_MD4_Final wolfSSL_MD4_Final - - -#define CyaSSL_BIO_new wolfSSL_BIO_new -#define CyaSSL_BIO_free wolfSSL_BIO_free -#define CyaSSL_BIO_free_all wolfSSL_BIO_free_all -#define CyaSSL_BIO_read wolfSSL_BIO_read -#define CyaSSL_BIO_write wolfSSL_BIO_write -#define CyaSSL_BIO_push wolfSSL_BIO_push -#define CyaSSL_BIO_pop wolfSSL_BIO_pop -#define CyaSSL_BIO_flush wolfSSL_BIO_flush -#define CyaSSL_BIO_pending wolfSSL_BIO_pending - -#define CyaSSL_BIO_f_buffer wolfSSL_BIO_f_buffer -#define CyaSSL_BIO_set_write_buffer_size wolfSSL_BIO_set_write_buffer_size -#define CyaSSL_BIO_f_ssl wolfSSL_BIO_f_ssl -#define CyaSSL_BIO_new_socket wolfSSL_BIO_new_socket -#define CyaSSL_BIO_eof wolfSSL_BIO_eof - -#define CyaSSL_BIO_s_mem wolfSSL_BIO_s_mem -#define CyaSSL_BIO_f_base64 wolfSSL_BIO_f_base64 -#define CyaSSL_BIO_set_flags wolfSSL_BIO_set_flags -#define CyaSSL_BIO_get_mem_data wolfSSL_BIO_get_mem_data -#define CyaSSL_BIO_new_mem_buf wolfSSL_BIO_new_mem_buf - - -#define CyaSSL_BIO_set_ssl wolfSSL_BIO_set_ssl -#define CyaSSL_set_bio wolfSSL_set_bio - -#define CyaSSL_add_all_algorithms wolfSSL_add_all_algorithms -#define CyaSSL_RAND_screen wolfSSL_RAND_screen -#define CyaSSL_RAND_file_name wolfSSL_RAND_file_name -#define CyaSSL_RAND_write_file wolfSSL_RAND_write_file -#define CyaSSL_RAND_load_file wolfSSL_RAND_load_file -#define CyaSSL_RAND_egd wolfSSL_RAND_egd -#define CyaSSL_RAND_seed wolfSSL_RAND_seed -#define CyaSSL_RAND_add wolfSSL_RAND_add - -#define CyaSSL_COMP_zlib wolfSSL_COMP_zlib -#define CyaSSL_COMP_rle wolfSSL_COMP_rle -#define CyaSSL_COMP_add_compression_method wolfSSL_COMP_add_compression_method -#define CyaSSL_set_dynlock_create_callback wolfSSL_set_dynlock_create_callback -#define CyaSSL_set_dynlock_lock_callback wolfSSL_set_dynlock_lock_callback -#define CyaSSL_set_dynlock_destroy_callback wolfSSL_set_dynlock_destroy_callback -#define CyaSSL_get_ex_new_index wolfSSL_get_ex_new_index -#define CyaSSL_set_id_callback wolfSSL_set_id_callback -#define CyaSSL_set_locking_callback wolfSSL_set_locking_callback -#define CyaSSL_num_locks wolfSSL_num_locks - -#define CyaSSL_X509_STORE_CTX_get_current_cert wolfSSL_X509_STORE_CTX_get_current_cert -#define CyaSSL_X509_STORE_CTX_get_error wolfSSL_X509_STORE_CTX_get_error -#define CyaSSL_X509_STORE_CTX_get_error_depth wolfSSL_X509_STORE_CTX_get_error_depth - -#define CyaSSL_X509_NAME_oneline wolfSSL_X509_NAME_oneline -#define CyaSSL_X509_get_issuer_name wolfSSL_X509_get_issuer_name -#define CyaSSL_X509_get_subject_name wolfSSL_X509_get_subject_name -#define CyaSSL_X509_ext_isSet_by_NID wolfSSL_X509_ext_isSet_by_NID -#define CyaSSL_X509_ext_get_critical_by_NID wolfSSL_X509_ext_get_critical_by_NID -#define CyaSSL_X509_get_isCA wolfSSL_X509_get_isCA -#define CyaSSL_X509_get_isSet_pathLength wolfSSL_X509_get_isSet_pathLength -#define CyaSSL_X509_get_pathLength wolfSSL_X509_get_pathLength -#define CyaSSL_X509_get_keyUsage wolfSSL_X509_get_keyUsage -#define CyaSSL_X509_get_authorityKeyID wolfSSL_X509_get_authorityKeyID -#define CyaSSL_X509_get_subjectKeyID wolfSSL_X509_get_subjectKeyID -#define CyaSSL_X509_NAME_entry_count wolfSSL_X509_NAME_entry_count -#define CyaSSL_X509_NAME_get_text_by_NID wolfSSL_X509_NAME_get_text_by_NID -#define CyaSSL_X509_verify_cert wolfSSL_X509_verify_cert -#define CyaSSL_X509_verify_cert_error_string wolfSSL_X509_verify_cert_error_string -#define CyaSSL_X509_get_signature_type wolfSSL_X509_get_signature_type -#define CyaSSL_X509_get_signature wolfSSL_X509_get_signature - -#define CyaSSL_X509_LOOKUP_add_dir wolfSSL_X509_LOOKUP_add_dir -#define CyaSSL_X509_LOOKUP_load_file wolfSSL_X509_LOOKUP_load_file -#define CyaSSL_X509_LOOKUP_hash_dir wolfSSL_X509_LOOKUP_hash_dir -#define CyaSSL_X509_LOOKUP_file wolfSSL_X509_LOOKUP_file - -#define CyaSSL_X509_STORE_add_lookup wolfSSL_X509_STORE_add_lookup -#define CyaSSL_X509_STORE_new wolfSSL_X509_STORE_new -#define CyaSSL_X509_STORE_free wolfSSL_X509_STORE_free -#define CyaSSL_X509_STORE_add_cert wolfSSL_X509_STORE_add_cert -#define CyaSSL_X509_STORE_set_default_paths wolfSSL_X509_STORE_set_default_paths -#define CyaSSL_X509_STORE_get_by_subject wolfSSL_X509_STORE_get_by_subject -#define CyaSSL_X509_STORE_CTX_new wolfSSL_X509_STORE_CTX_new -#define CyaSSL_X509_STORE_CTX_init wolfSSL_X509_STORE_CTX_init -#define CyaSSL_X509_STORE_CTX_free wolfSSL_X509_STORE_CTX_free -#define CyaSSL_X509_STORE_CTX_cleanup wolfSSL_X509_STORE_CTX_cleanup - -#define CyaSSL_X509_CRL_get_lastUpdate wolfSSL_X509_CRL_get_lastUpdate -#define CyaSSL_X509_CRL_get_nextUpdate wolfSSL_X509_CRL_get_nextUpdate - -#define CyaSSL_X509_get_pubkey wolfSSL_X509_get_pubkey -#define CyaSSL_X509_CRL_verify wolfSSL_X509_CRL_verify -#define CyaSSL_X509_STORE_CTX_set_error wolfSSL_X509_STORE_CTX_set_error -#define CyaSSL_X509_OBJECT_free_contents wolfSSL_X509_OBJECT_free_contents -#define CyaSSL_EVP_PKEY_free wolfSSL_EVP_PKEY_free -#define CyaSSL_X509_cmp_current_time wolfSSL_X509_cmp_current_time -#define CyaSSL_sk_X509_REVOKED_num wolfSSL_sk_X509_REVOKED_num - -#define CyaSSL_X509_CRL_get_REVOKED wolfSSL_X509_CRL_get_REVOKED -#define CyaSSL_sk_X509_REVOKED_value wolfSSL_sk_X509_REVOKED_value -#define CyaSSL_X509_get_serialNumber wolfSSL_X509_get_serialNumber -#define CyaSSL_ASN1_TIME_print wolfSSL_ASN1_TIME_print -#define CyaSSL_ASN1_INTEGER_cmp wolfSSL_ASN1_INTEGER_cmp -#define CyaSSL_ASN1_INTEGER_get wolfSSL_ASN1_INTEGER_get -#define CyaSSL_load_client_CA_file wolfSSL_load_client_CA_file -#define CyaSSL_CTX_set_client_CA_list wolfSSL_CTX_set_client_CA_list -#define CyaSSL_X509_STORE_CTX_get_ex_data wolfSSL_X509_STORE_CTX_get_ex_data -#define CyaSSL_get_ex_data_X509_STORE_CTX_idx wolfSSL_get_ex_data_X509_STORE_CTX_idx -#define CyaSSL_get_ex_data wolfSSL_get_ex_data - -#define CyaSSL_CTX_set_default_passwd_cb_userdata wolfSSL_CTX_set_default_passwd_cb_userdata -#define CyaSSL_CTX_set_default_passwd_cb wolfSSL_CTX_set_default_passwd_cb -#define CyaSSL_CTX_set_info_callback wolfSSL_CTX_set_info_callback -#define CyaSSL_ERR_peek_error wolfSSL_ERR_peek_error -#define CyaSSL_GET_REASON wolfSSL_GET_REASON -#define CyaSSL_alert_type_string_long wolfSSL_alert_type_string_long -#define CyaSSL_alert_desc_string_long wolfSSL_alert_desc_string_long -#define CyaSSL_state_string_long wolfSSL_state_string_long - -#define CyaSSL_RSA_generate_key wolfSSL_RSA_generate_key -#define CyaSSL_CTX_set_tmp_rsa_callback wolfSSL_CTX_set_tmp_rsa_callback -#define CyaSSL_PEM_def_callback wolfSSL_PEM_def_callback -#define CyaSSL_CTX_sess_accept wolfSSL_CTX_sess_accept -#define CyaSSL_CTX_sess_connect wolfSSL_CTX_sess_connect -#define CyaSSL_CTX_sess_accept_good wolfSSL_CTX_sess_accept_good -#define CyaSSL_CTX_sess_connect_good wolfSSL_CTX_sess_connect_good -#define CyaSSL_CTX_sess_accept_renegotiate wolfSSL_CTX_sess_accept_renegotiate -#define CyaSSL_CTX_sess_connect_renegotiate wolfSSL_CTX_sess_connect_renegotiate -#define CyaSSL_CTX_sess_hits wolfSSL_CTX_sess_hits -#define CyaSSL_CTX_sess_cb_hits wolfSSL_CTX_sess_cb_hits -#define CyaSSL_CTX_sess_cache_full wolfSSL_CTX_sess_cache_full -#define CyaSSL_CTX_sess_misses wolfSSL_CTX_sess_misses -#define CyaSSL_CTX_sess_timeouts wolfSSL_CTX_sess_timeouts -#define CyaSSL_CTX_sess_number wolfSSL_CTX_sess_number -#define CyaSSL_CTX_sess_get_cache_size wolfSSL_CTX_sess_get_cache_size - - - -/* src/keys.c */ -#define cyassl_triple_des wolfssl_triple_des - -/* Initialization and Shutdown */ -#define CyaSSL_Init wolfSSL_Init -#define CyaSSL_library_init wolfSSL_library_init -#define CyaSSL_Cleanup wolfSSL_Cleanup -#define CyaSSL_shutdown wolfSSL_shutdown - -/* Certs and keys */ -#define CyaSSL_SetTmpDH wolfSSL_SetTmpDH -#define CyaSSL_KeepArrays wolfSSL_KeepArrays -#define CyaSSL_FreeArrays wolfSSL_FreeArrays -#define CyaSSL_SetTmpDH_file wolfSSL_SetTmpDH_file -#define CyaSSL_use_PrivateKey_buffer wolfSSL_use_PrivateKey_buffer -#define CyaSSL_use_certificate_buffer wolfSSL_use_certificate_buffer -#define CyaSSL_CTX_load_verify_buffer wolfSSL_CTX_load_verify_buffer -#define CyaSSL_CTX_use_PrivateKey_file wolfSSL_CTX_use_PrivateKey_file -#define CyaSSL_CTX_use_certificate_file wolfSSL_CTX_use_certificate_file -#define CyaSSL_CTX_use_PrivateKey_buffer wolfSSL_CTX_use_PrivateKey_buffer -#define CyaSSL_CTX_use_certificate_buffer wolfSSL_CTX_use_certificate_buffer -#define CyaSSL_use_certificate_chain_buffer wolfSSL_use_certificate_chain_buffer -#define CyaSSL_CTX_der_load_verify_locations \ - wolfSSL_CTX_der_load_verify_locations -#define CyaSSL_CTX_use_certificate_chain_file \ - wolfSSL_CTX_use_certificate_chain_file -#define CyaSSL_CTX_use_certificate_chain_buffer \ - wolfSSL_CTX_use_certificate_chain_buffer - -/* Context and Session Setup*/ -#define CyaSSL_new wolfSSL_new -#define CyaSSL_free wolfSSL_free -#define CyaSSL_set_fd wolfSSL_set_fd -#define CyaSSL_CTX_new wolfSSL_CTX_new -#define CyaSSL_CTX_free wolfSSL_CTX_free -#define CyaSSL_SetVersion wolfSSL_SetVersion -#define CyaSSL_set_verify wolfSSL_set_verify -#define CyaSSL_set_session wolfSSL_set_session -#define CyaSSL_set_timeout wolfSSL_set_timeout -#define CyaSSL_CTX_set_verify wolfSSL_CTX_set_verify -#define CyaSSL_CTX_set_timeout wolfSSL_CTX_set_timeout -#define CyaSSL_set_cipher_list wolfSSL_set_cipher_list -#define CyaSSL_set_compression wolfSSL_set_compression -#define CyaTLSv1_client_method wolfTLSv1_client_method -#define CyaTLSv1_server_method wolfTLSv1_server_method -#define CyaSSLv3_client_method wolfSSLv3_client_method -#define CyaSSLv3_server_method wolfSSLv3_server_method -#define CyaSSLv23_client_method wolfSSLv23_client_method -#define CyaSSLv23_server_method wolfSSLv23_server_method -#define CyaDTLSv1_client_method wolfDTLSv1_client_method -#define CyaDTLSv1_server_method wolfDTLSv1_server_method -#define CyaSSL_check_domain_name wolfSSL_check_domain_name -#define CyaTLSv1_1_client_method wolfTLSv1_1_client_method -#define CyaTLSv1_1_server_method wolfTLSv1_1_server_method -#define CyaTLSv1_2_client_method wolfTLSv1_2_client_method -#define CyaTLSv1_2_server_method wolfTLSv1_2_server_method -#define CyaDTLSv1_2_client_method wolfDTLSv1_2_client_method -#define CyaDTLSv1_2_server_method wolfDTLSv1_2_server_method -#define CyaSSL_set_group_messages wolfSSL_set_group_messages -#define CyaSSL_CTX_set_cipher_list wolfSSL_CTX_set_cipher_list -#define CyaSSL_CTX_set_group_messages wolfSSL_CTX_set_group_messages -#define CyaSSL_CTX_set_session_cache_mode wolfSSL_CTX_set_session_cache_mode - -/* Callbacks */ - -/* - * Empty comment denotes not listed in CyaSSL Manual - * (soon to be wolfSSL Manual) - */ - -#define CyaSSL_accept_ex wolfSSL_accept_ex -#define CyaSSL_SetIORecv wolfSSL_CTX_SetIORecv -#define CyaSSL_SetIOSend wolfSSL_CTX_SetIOSend -#define CyaSSL_connect_ex wolfSSL_connect_ex -#define CyaSSL_CTX_SetCACb wolfSSL_CTX_SetCACb -#define CyaSSL_SetIOReadCtx wolfSSL_SetIOReadCtx -#define CyaSSL_SetRsaEncCtx wolfSSL_SetRsaEncCtx -#define CyaSSL_GetRsaEncCtx wolfSSL_GetRsaEncCtx -#define CyaSSL_SetRsaDecCtx wolfSSL_SetRsaDecCtx -#define CyaSSL_GetRsaDecCtx wolfSSL_GetRsaDecCtx -#define CyaSSL_SetLoggingCb wolfSSL_SetLoggingCb -#define CyaSSL_SetEccSignCtx wolfSSL_SetEccSignCtx -#define CyaSSL_GetEccSignCtx wolfSSL_GetEccSignCtx -#define CyaSSL_SetRsaSignCtx wolfSSL_SetRsaSignCtx -#define CyaSSL_GetRsaSignCtx wolfSSL_GetRsaSignCtx -#define CyaSSL_SetIOWriteCtx wolfSSL_SetIOWriteCtx -#define CyaSSL_SetIOReadFlags wolfSSL_SetIOReadFlags -#define CyaSSL_SetEccVerifyCtx wolfSSL_SetEccVerifyCtx -#define CyaSSL_GetEccVerifyCtx wolfSSL_GetEccVerifyCtx -#define CyaSSL_SetRsaVerifyCtx wolfSSL_SetRsaVerifyCtx -#define CyaSSL_GetRsaVerifyCtx wolfSSL_GetRsaVerifyCtx -#define CyaSSL_CTX_SetRsaEncCb wolfSSL_CTX_SetRsaEncCb -#define CyaSSL_CTX_SetRsaDecCb wolfSSL_CTX_SetRsaDecCb -#define CyaSSL_SetIOWriteFlags wolfSSL_SetIOWriteFlags -#define CyaSSL_SetTlsHmacInner wolfSSL_SetTlsHmacInner -#define CyaSSL_SetMacEncryptCtx wolfSSL_SetMacEncryptCtx -#define CyaSSL_GetMacEncryptCtx wolfSSL_GetMacEncryptCtx -#define CyaSSL_CTX_SetEccSignCb wolfSSL_CTX_SetEccSignCb -#define CyaSSL_CTX_SetRsaSignCb wolfSSL_CTX_SetRsaSignCb -#define CyaSSL_CTX_SetEccVerifyCb wolfSSL_CTX_SetEccVerifyCb -#define CyaSSL_CTX_SetRsaVerifyCb wolfSSL_CTX_SetRsaVerifyCb -#define CyaSSL_CTX_SetMacEncryptCb wolfSSL_CTX_SetMacEncryptCb -#define CyaSSL_SetDecryptVerifyCtx wolfSSL_SetDecryptVerifyCtx -#define CyaSSL_GetDecryptVerifyCtx wolfSSL_GetDecryptVerifyCtx -#define CyaSSL_CTX_SetDecryptVerifyCb wolfSSL_CTX_SetDecryptVerifyCb - -/* psk specific */ -#ifndef NO_PSK - -#define CyaSSL_get_psk_identity wolfSSL_get_psk_identity /**/ -#define CyaSSL_get_psk_identity_hint wolfSSL_get_psk_identity_hint /**/ -#define CyaSSL_use_psk_identity_hint wolfSSL_use_psk_identity_hint /**/ -#define CyaSSL_set_psk_client_callback wolfSSL_set_psk_client_callback /**/ -#define CyaSSL_set_psk_server_callback wolfSSL_set_psk_server_callback /**/ -#define CyaSSL_CTX_use_psk_identity_hint wolfSSL_CTX_use_psk_identity_hint /**/ -#define CyaSSL_CTX_set_psk_client_callback \ - wolfSSL_CTX_set_psk_client_callback /**/ -#define CyaSSL_CTX_set_psk_server_callback \ - wolfSSL_CTX_set_psk_server_callback /**/ - -#endif -/* end psk specific */ - -/* Anonymous */ -#define CyaSSL_CTX_allow_anon_cipher wolfSSL_CTX_allow_anon_cipher /**/ - -/* Error Handling and Debugging*/ -#define CyaSSL_get_error wolfSSL_get_error -#define CyaSSL_want_read wolfSSL_want_read -#define CyaSSL_want_write wolfSSL_want_write -#define CyaSSL_Debugging_ON wolfSSL_Debugging_ON -#define CyaSSL_Debugging_OFF wolfSSL_Debugging_OFF -#define CyaSSL_ERR_error_string wolfSSL_ERR_error_string -#define CyaSSL_load_error_strings wolfSSL_load_error_strings -#define CyaSSL_ERR_error_string_n wolfSSL_ERR_error_string_n -#define CyaSSL_ERR_print_errors_fp wolfSSL_ERR_print_errors_fp - -/* OCSP and CRL */ - -/* - * Empty comment denotes not listed in CyaSSL Manual - * (soon to be wolfSSL Manual) - */ - -#define CYASSL_CRL_MONITOR WOLFSSL_CRL_MONITOR /**/ -#define CYASSL_CRL_START_MON WOLFSSL_CRL_START_MON /**/ -#define CYASSL_OCSP_NO_NONCE WOLFSSL_OCSP_NO_NONCE /**/ -#define CYASSL_OCSP_URL_OVERRIDE WOLFSSL_OCSP_URL_OVERRIDE -#define CYASSL_OCSP_CHECKALL WOLFSSL_OCSP_CHECKALL - -#define CyaSSL_CTX_EnableOCSP wolfSSL_CTX_EnableOCSP -#define CyaSSL_CTX_OCSP_set_options wolfSSL_CTX_OCSP_set_options /**/ -#define CyaSSL_CTX_SetOCSP_OverrideURL wolfSSL_CTX_SetOCSP_OverrideURL /**/ -#define CyaSSL_CTX_OCSP_set_override_url wolfSSL_CTX_OCSP_set_override_url /**/ - -/* Informational */ -#define CyaSSL_GetSide wolfSSL_GetSide -#define CyaSSL_IsTLSv1_1 wolfSSL_IsTLSv1_1 -#define CyaSSL_GetKeySize wolfSSL_GetKeySize -#define CyaSSL_GetHmacSize wolfSSL_GetHmacSize -#define CyaSSL_GetHmacType wolfSSL_GetHmacType -#define CyaSSL_GetMacSecret wolfSSL_GetMacSecret -#define CyaSSL_GetObjectSize wolfSSL_GetObjectSize -#define CyaSSL_GetBulkCipher wolfSSL_GetBulkCipher -#define CyaSSL_GetCipherType wolfSSL_GetCipherType -#define CyaSSL_GetAeadMacSize wolfSSL_GetAeadMacSize -#define CyaSSL_GetClientWriteIV wolfSSL_GetClientWriteIV -#define CyaSSL_GetServerWriteIV wolfSSL_GetServerWriteIV -#define CyaSSL_GetClientWriteKey wolfSSL_GetClientWriteKey -#define CyaSSL_GetServerWriteKey wolfSSL_GetServerWriteKey -#define CyaSSL_GetCipherBlockSize wolfSSL_GetCipherBlockSize - -/* Connection, Session, and I/O */ -#define CyaSSL_peek wolfSSL_peek -#define CyaSSL_read wolfSSL_read -#define CyaSSL_recv wolfSSL_recv -#define CyaSSL_send wolfSSL_send -#define CyaSSL_write wolfSSL_write -#define CyaSSL_writev wolfSSL_writev -#define CyaSSL_accept wolfSSL_accept -#define CyaSSL_get_fd wolfSSL_get_fd -#define CyaSSL_connect wolfSSL_connect -#define CyaSSL_pending wolfSSL_pending -#define CyaSSL_negotiate wolfSSL_negotiate -#define CyaSSL_get_session wolfSSL_get_session -#define CyaSSL_connect_cert wolfSSL_connect_cert -#define CyaSSL_flush_sessions wolfSSL_flush_sessions -#define CyaSSL_get_using_nonblock wolfSSL_get_using_nonblock -#define CyaSSL_PrintSessionStats wolfSSL_PrintSessionStats - -/* DTLS Specific */ -#define CyaSSL_dtls wolfSSL_dtls -#define CyaSSL_dtls_set_peer wolfSSL_dtls_set_peer -#define CyaSSL_dtls_get_peer wolfSSL_dtls_get_peer -#define CyaSSL_dtls_got_timeout wolfSSL_dtls_got_timeout -#define CyaSSL_dtls_get_current_timeout wolfSSL_dtls_get_current_timeout -#define CyaSSL_set_using_nonblock wolfSSL_dtls_set_using_nonblock - -/* Certificate Manager */ -#define CyaSSL_CertManagerNew wolfSSL_CertManagerNew -#define CyaSSL_CertManagerFree wolfSSL_CertManagerFree -#define CyaSSL_CertManagerLoadCA wolfSSL_CertManagerLoadCA -#define CyaSSL_CertManagerVerify wolfSSL_CertManagerVerify -#define CyaSSL_CertManagerEnableCRL wolfSSL_CertManagerEnableCRL -#define CyaSSL_CertManagerDisableCRL wolfSSL_CertManagerDisableCRL -#define CyaSSL_CertManagerVerifyBuffer wolfSSL_CertManagerVerifyBuffer -#ifndef NO_CERTS - #define CyaSSL_CertManagerCheckCRL wolfSSL_CertManagerCheckCRL - #define CyaSSL_CertManagerLoadCRL wolfSSL_CertManagerLoadCRL - #define CyaSSL_CertManagerSetCRL_Cb wolfSSL_CertManagerSetCRL_Cb - #define CyaSSL_CertManagerCheckOCSP wolfSSL_CertManagerCheckOCSP - #define CyaSSL_CertManagerSetOCSP_Cb wolfSSL_CertManagerSetOCSP_Cb - #define CyaSSL_CertManagerSetOCSPOverrideURL \ - wolfSSL_CertManagerSetOCSPOverrideURL - - #define CyaSSL_DisableCRL wolfSSL_DisableCRL - #define CyaSSL_EnableOCSP wolfSSL_EnableOCSP - #define CyaSSL_DisableOCSP wolfSSL_DisableOCSP - #define CyaSSL_SetOCSP_OverrideURL wolfSSL_SetOCSP_OverrideURL - #define CyaSSL_SetOCSP_Cb wolfSSL_SetOCSP_Cb - - #define CyaSSL_CTX_EnableCRL wolfSSL_CTX_EnableCRL - #define CyaSSL_CTX_DisableCRL wolfSSL_CTX_DisableCRL - #define CyaSSL_CTX_LoadCRL wolfSSL_CTX_LoadCRL - #define CyaSSL_CTX_SetCRL_Cb wolfSSL_CTX_SetCRL_Cb - #define CyaSSL_CTX_DisableOCSP wolfSSL_CTX_DisableOCSP - #define CyaSSL_CTX_SetOCSP_Cb wolfSSL_CTX_SetOCSP_Cb -#endif /* !NO_CERTS */ - - -/* OpenSSL Compatibility Layer */ -#define CyaSSL_get_sessionID wolfSSL_get_sessionID -#define CyaSSL_get_peer_count wolfSSL_get_peer_count -#define CyaSSL_get_chain_cert wolfSSL_get_chain_cert -#define CyaSSL_get_peer_chain wolfSSL_get_peer_chain -#define CyaSSL_get_peer_length wolfSSL_get_peer_length -#define CyaSSL_get_chain_cert_pem wolfSSL_get_chain_cert_pem -#define CyaSSL_use_PrivateKey_file wolfSSL_use_PrivateKey_file -#define CyaSSL_use_certificate_file wolfSSL_use_certificate_file -#define CyaSSL_use_RSAPrivateKey_file wolfSSL_use_RSAPrivateKey_file -#define CyaSSL_X509_get_serial_number wolfSSL_X509_get_serial_number -#define CyaSSL_CTX_use_RSAPrivateKey_file wolfSSL_CTX_use_RSAPrivateKey_file -#define CyaSSL_use_certificate_chain_file wolfSSL_use_certificate_chain_file - -/* TLS Extensions */ -#define CYASSL_SNI_HOST_NAME WOLFSSL_SNI_HOST_NAME - -#define CyaSSL_UseSNI wolfSSL_UseSNI -#define CyaSSL_CTX_UseSNI wolfSSL_CTX_UseSNI -#define CyaSSL_SNI_SetOptions wolfSSL_SNI_SetOptions -#define CyaSSL_SNI_GetRequest wolfSSL_SNI_GetRequest -#define CyaSSL_UseMaxFragment wolfSSL_UseMaxFragment -#define CyaSSL_UseTruncatedHMAC wolfSSL_UseTruncatedHMAC -#define CyaSSL_UseSupportedCurve wolfSSL_UseSupportedCurve -#define CyaSSL_SNI_GetFromBuffer wolfSSL_SNI_GetFromBuffer -#define CyaSSL_CTX_SNI_SetOptions wolfSSL_CTX_SNI_SetOptions -#define CyaSSL_CTX_UseMaxFragment wolfSSL_CTX_UseMaxFragment -#define CyaSSL_CTX_UseTruncatedHMAC wolfSSL_CTX_UseTruncatedHMAC -#define CyaSSL_CTX_UseSupportedCurve wolfSSL_CTX_UseSupportedCurve - -/* End wolfssl -> cyassl -> openssl compatibility */ - -/* JRB macro redefinitions and api calls for cryptography for reverse compat. */ - -#ifdef WOLFSSL_SMALL_STACK - #define CYASSL_SMALL_STACK -#endif - - -/* - * wrapper around macros until they are changed in cyassl code - * needs investigation in regards to macros in fips - */ -#ifdef NO_CYASSL_ALLOC_ALIGN -#define NO_WOLFSSL_ALLOC_ALIGN NO_CYASSL_ALLOC_ALIGN -#endif - - -/* examples/client/client.h */ -#define CYASSL_THREAD WOLFSSL_THREAD -#ifdef WOLFSSL_DTLS - #define CYASSL_DTLS WOLFSSL_DTLS -#endif - -/* examples/client/client.c */ -#define LIBCYASSL_VERSION_STRING LIBWOLFSSL_VERSION_STRING - -#ifdef __cplusplus - } /* extern "C" */ -#endif - - -#endif /* CyaSSL_openssl_h__ */ diff --git a/cyassl/test.h b/cyassl/test.h deleted file mode 100644 index 428b141b5..000000000 --- a/cyassl/test.h +++ /dev/null @@ -1,3 +0,0 @@ -/* test.h */ - -#include diff --git a/cyassl/version.h b/cyassl/version.h deleted file mode 100644 index c5017f513..000000000 --- a/cyassl/version.h +++ /dev/null @@ -1,27 +0,0 @@ -/* cyassl/version.h - * - * Copyright (C) 2006-2023 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 2 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 - -#define LIBCYASSL_VERSION_STRING LIBWOLFSSL_VERSION_STRING -#define LIBCYASSL_VERSION_HEX LIBWOLFSSL_VERSION_HEX - diff --git a/cyassl/version.h.in b/cyassl/version.h.in deleted file mode 100644 index cbebca824..000000000 --- a/cyassl/version.h.in +++ /dev/null @@ -1,23 +0,0 @@ -/* cyassl_version.h.in - * - * Copyright (C) 2006-2023 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 2 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 diff --git a/examples/client/client.vcproj b/examples/client/client.vcproj index 4b758dcb7..d7d070f85 100644 --- a/examples/client/client.vcproj +++ b/examples/client/client.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../;../../IDE/WIN" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -117,7 +117,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories="../../;../../IDE/WIN" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" diff --git a/examples/client/client.vcxproj b/examples/client/client.vcxproj index 3704f4fee..3f5c79a05 100644 --- a/examples/client/client.vcxproj +++ b/examples/client/client.vcxproj @@ -159,7 +159,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -179,7 +179,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -200,7 +200,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -218,7 +218,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -237,7 +237,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -259,7 +259,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -281,7 +281,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -302,7 +302,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true diff --git a/examples/echoclient/echoclient.c b/examples/echoclient/echoclient.c index 740af4ed0..662aca0f1 100644 --- a/examples/echoclient/echoclient.c +++ b/examples/echoclient/echoclient.c @@ -24,14 +24,14 @@ #include #endif -#include +#include /* let's use cyassl layer AND cyassl openssl layer */ #undef TEST_OPENSSL_COEXIST /* can't use this option with this example */ -#include +#include /* Force enable the compatibility macros for this example */ -#ifdef CYASSL_DTLS - #include +#ifdef WOLFSSL_DTLS + #include #endif #if defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET) @@ -43,12 +43,12 @@ #include "wolfssl_MDK_ARM.h" #endif -#include +#include #ifndef OPENSSL_EXTRA_X509_SMALL #define OPENSSL_EXTRA_X509_SMALL #endif -#include +#include #include @@ -97,7 +97,7 @@ void echoclient_test(void* args) char** argv = 0; #endif word16 port; - char buffer[CYASSL_MAX_ERROR_SZ]; + char buffer[WOLFSSL_MAX_ERROR_SZ]; ((func_args*)args)->return_code = -1; /* error state */ @@ -118,11 +118,11 @@ void echoclient_test(void* args) if (!fin) err_sys("can't open input file"); if (!fout) err_sys("can't open output file"); -#ifdef CYASSL_DTLS +#ifdef WOLFSSL_DTLS doDTLS = 1; #endif -#ifdef CYASSL_LEANPSK +#ifdef WOLFSSL_LEANPSK doPSK = 1; #endif #if defined(NO_RSA) && !defined(HAVE_ECC) && !defined(HAVE_ED25519) && \ @@ -134,10 +134,10 @@ void echoclient_test(void* args) #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && !defined(WOLFSSL_MDK_SHELL) port = ((func_args*)args)->signal->port; #else - port = yasslPort; + port = wolfSSLPort; #endif -#if defined(CYASSL_DTLS) +#if defined(WOLFSSL_DTLS) #ifdef WOLFSSL_DTLS13 method = wolfDTLSv1_3_client_method(); #elif !defined(WOLFSSL_NO_TLS12) @@ -145,9 +145,9 @@ void echoclient_test(void* args) #endif #elif !defined(NO_TLS) #if defined(WOLFSSL_TLS13) && defined(WOLFSSL_SNIFFER) - method = CyaTLSv1_2_client_method(); + method = wolfTLSv1_2_client_method(); #else - method = CyaSSLv23_client_method(); + method = wolfSSLv23_client_method(); #endif #elif defined(WOLFSSL_ALLOW_SSLV3) method = SSLv3_client_method(); @@ -178,7 +178,7 @@ void echoclient_test(void* args) err_sys("can't load ca buffer"); #endif -#if defined(CYASSL_SNIFFER) +#if defined(WOLFSSL_SNIFFER) /* Only set if not running testsuite */ if (XSTRSTR(argv[0], "testsuite") == NULL) { /* don't use EDH, can't sniff tmp keys */ @@ -189,7 +189,7 @@ void echoclient_test(void* args) if (doPSK) { const char *defaultCipherList; - CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); + wolfSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb); #ifdef HAVE_NULL_CIPHER defaultCipherList = "PSK-NULL-SHA256"; #elif defined(HAVE_AESGCM) && !defined(NO_DH) @@ -211,7 +211,7 @@ void echoclient_test(void* args) #else defaultCipherList = "PSK-AES128-CBC-SHA256"; #endif - if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=WOLFSSL_SUCCESS) + if (wolfSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=WOLFSSL_SUCCESS) err_sys("client can't set cipher list 2"); wolfSSL_CTX_set_psk_callback_ctx(ctx, (void*)defaultCipherList); } @@ -222,7 +222,7 @@ void echoclient_test(void* args) #endif #if defined(WOLFSSL_MDK_ARM) - CyaSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_NONE, 0); + wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_NONE, 0); #endif #ifdef WOLFSSL_ASYNC_CRYPT @@ -234,10 +234,10 @@ void echoclient_test(void* args) #endif /* WOLFSSL_ASYNC_CRYPT */ ssl = SSL_new(ctx); - tcp_connect(&sockfd, yasslIP, port, doDTLS, 0, ssl); + tcp_connect(&sockfd, wolfSSLIP, port, doDTLS, 0, ssl); SSL_set_fd(ssl, sockfd); -#if defined(USE_WINDOWS_API) && defined(CYASSL_DTLS) && defined(NO_MAIN_DRIVER) +#if defined(USE_WINDOWS_API) && defined(WOLFSSL_DTLS) && defined(NO_MAIN_DRIVER) /* let echoserver bind first, TODO: add Windows signal like pthreads does */ Sleep(100); #endif @@ -319,7 +319,7 @@ void echoclient_test(void* args) LIBCALL_CHECK_RET(fflush(fout)); sendSz -= ret; } -#ifdef CYASSL_DTLS +#ifdef WOLFSSL_DTLS else if (wolfSSL_dtls(ssl) && err == DECRYPT_ERROR) { /* This condition is OK. The packet should be dropped * silently when there is a decrypt or MAC error on @@ -336,7 +336,7 @@ void echoclient_test(void* args) } -#ifdef CYASSL_DTLS +#ifdef WOLFSSL_DTLS strncpy(msg, "break", 6); sendSz = (int)strlen(msg); /* try to tell server done */ @@ -394,18 +394,18 @@ void echoclient_test(void* args) args.argv = argv; args.return_code = 0; - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(WOLFSSL_MDK_SHELL) - CyaSSL_Debugging_ON(); + wolfSSL_Init(); +#if defined(DEBUG_WOLFSSL) && !defined(WOLFSSL_MDK_SHELL) + wolfSSL_Debugging_ON(); #endif -#ifndef CYASSL_TIRTOS +#ifndef WOLFSSL_TIRTOS ChangeToWolfRoot(); #endif #ifndef NO_WOLFSSL_CLIENT echoclient_test(&args); #endif - CyaSSL_Cleanup(); + wolfSSL_Cleanup(); #ifdef HAVE_WNR if (wc_FreeNetRandom() < 0) diff --git a/examples/echoclient/echoclient.vcproj b/examples/echoclient/echoclient.vcproj index 55d2610cb..316c276f8 100644 --- a/examples/echoclient/echoclient.vcproj +++ b/examples/echoclient/echoclient.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../;../../IDE/WIN" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -117,7 +117,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories="../../;../../IDE/WIN" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" diff --git a/examples/echoclient/echoclient.vcxproj b/examples/echoclient/echoclient.vcxproj index b291d634d..9fa8aad0f 100644 --- a/examples/echoclient/echoclient.vcxproj +++ b/examples/echoclient/echoclient.vcxproj @@ -159,7 +159,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -179,7 +179,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -200,7 +200,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -218,7 +218,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -237,7 +237,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -259,7 +259,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -281,7 +281,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -302,7 +302,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true diff --git a/examples/echoserver/echoserver.c b/examples/echoserver/echoserver.c index c0e875f6d..df2b52f2e 100644 --- a/examples/echoserver/echoserver.c +++ b/examples/echoserver/echoserver.c @@ -24,10 +24,10 @@ #include #endif -#include /* name change portability layer */ -#include +#include /* name change portability layer */ +#include #ifdef HAVE_ECC - #include /* ecc_fp_free */ + #include /* ecc_fp_free */ #endif #if defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET) @@ -39,8 +39,8 @@ #include "wolfssl_MDK_ARM.h" #endif -#include -#include +#include +#include #ifndef NO_MAIN_DRIVER #define ECHO_OUT @@ -82,11 +82,11 @@ static void SignalReady(void* args, word16 port) } -THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) +THREAD_RETURN WOLFSSL_THREAD echoserver_test(void* args) { SOCKET_T sockfd = 0; - CYASSL_METHOD* method = 0; - CYASSL_CTX* ctx = 0; + WOLFSSL_METHOD* method = 0; + WOLFSSL_CTX* ctx = 0; int ret = 0; int doDTLS = 0; @@ -97,7 +97,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) word16 port; int argc = ((func_args*)args)->argc; char** argv = ((func_args*)args)->argv; - char buffer[CYASSL_MAX_ERROR_SZ]; + char buffer[WOLFSSL_MAX_ERROR_SZ]; #ifdef HAVE_TEST_SESSION_TICKET MyTicketCtx myTicketCtx; #endif @@ -116,19 +116,19 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) ((func_args*)args)->return_code = -1; /* error state */ -#ifdef CYASSL_DTLS +#ifdef WOLFSSL_DTLS doDTLS = 1; #endif #if (defined(NO_RSA) && !defined(HAVE_ECC) && !defined(HAVE_ED25519) && \ - !defined(HAVE_ED448)) || defined(CYASSL_LEANPSK) + !defined(HAVE_ED448)) || defined(WOLFSSL_LEANPSK) doPSK = 1; #else doPSK = 0; #endif -#if defined(NO_MAIN_DRIVER) && !defined(CYASSL_SNIFFER) && \ - !defined(WOLFSSL_MDK_SHELL) && !defined(CYASSL_TIRTOS) && \ +#if defined(NO_MAIN_DRIVER) && !defined(WOLFSSL_SNIFFER) && \ + !defined(WOLFSSL_MDK_SHELL) && !defined(WOLFSSL_TIRTOS) && \ !defined(USE_WINDOWS_API) /* Let tcp_listen assign port */ port = 0; @@ -141,34 +141,34 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) useAnyAddr = 1; #endif -#ifdef CYASSL_TIRTOS +#ifdef WOLFSSL_TIRTOS fdOpenSession(Task_self()); #endif tcp_listen(&sockfd, &port, useAnyAddr, doDTLS, 0); -#if defined(CYASSL_DTLS) +#if defined(WOLFSSL_DTLS) #ifdef WOLFSSL_DTLS13 method = wolfDTLSv1_3_server_method(); #elif !defined(WOLFSSL_NO_TLS12) - method = CyaDTLSv1_2_server_method(); + method = wolfDTLSv1_2_server_method(); #endif #elif !defined(NO_TLS) #if defined(WOLFSSL_TLS13) && defined(WOLFSSL_SNIFFER) - method = CyaTLSv1_2_server_method(); + method = wolfTLSv1_2_server_method(); #else - method = CyaSSLv23_server_method(); + method = wolfSSLv23_server_method(); #endif #elif defined(WOLFSSL_ALLOW_SSLV3) - method = CyaSSLv3_server_method(); + method = wolfSSLv3_server_method(); #else #error "no valid server method built in" #endif - ctx = CyaSSL_CTX_new(method); - /* CyaSSL_CTX_set_session_cache_mode(ctx, WOLFSSL_SESS_CACHE_OFF); */ + ctx = wolfSSL_CTX_new(method); + /* wolfSSL_CTX_set_session_cache_mode(ctx, WOLFSSL_SESS_CACHE_OFF); */ #ifdef WOLFSSL_ENCRYPTED_KEYS - CyaSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); + wolfSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); #endif #ifdef HAVE_TEST_SESSION_TICKET @@ -181,36 +181,36 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) #ifndef NO_FILESYSTEM if (doPSK == 0) { - #if defined(HAVE_ECC) && !defined(CYASSL_SNIFFER) + #if defined(HAVE_ECC) && !defined(WOLFSSL_SNIFFER) /* ecc */ - if (CyaSSL_CTX_use_certificate_file(ctx, eccCertFile, WOLFSSL_FILETYPE_PEM) + if (wolfSSL_CTX_use_certificate_file(ctx, eccCertFile, WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) err_sys("can't load server cert file, " "Please run from wolfSSL home dir"); - if (CyaSSL_CTX_use_PrivateKey_file(ctx, eccKeyFile, WOLFSSL_FILETYPE_PEM) + if (wolfSSL_CTX_use_PrivateKey_file(ctx, eccKeyFile, WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) err_sys("can't load server key file, " "Please run from wolfSSL home dir"); - #elif defined(HAVE_ED25519) && !defined(CYASSL_SNIFFER) + #elif defined(HAVE_ED25519) && !defined(WOLFSSL_SNIFFER) /* ed25519 */ - if (CyaSSL_CTX_use_certificate_chain_file(ctx, edCertFile) + if (wolfSSL_CTX_use_certificate_chain_file(ctx, edCertFile) != WOLFSSL_SUCCESS) err_sys("can't load server cert file, " "Please run from wolfSSL home dir"); - if (CyaSSL_CTX_use_PrivateKey_file(ctx, edKeyFile, WOLFSSL_FILETYPE_PEM) + if (wolfSSL_CTX_use_PrivateKey_file(ctx, edKeyFile, WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) err_sys("can't load server key file, " "Please run from wolfSSL home dir"); - #elif defined(HAVE_ED448) && !defined(CYASSL_SNIFFER) + #elif defined(HAVE_ED448) && !defined(WOLFSSL_SNIFFER) /* ed448 */ - if (CyaSSL_CTX_use_certificate_chain_file(ctx, ed448CertFile) + if (wolfSSL_CTX_use_certificate_chain_file(ctx, ed448CertFile) != WOLFSSL_SUCCESS) err_sys("can't load server cert file, " "Please run from wolfSSL home dir"); - if (CyaSSL_CTX_use_PrivateKey_file(ctx, ed448KeyFile, + if (wolfSSL_CTX_use_PrivateKey_file(ctx, ed448KeyFile, WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) err_sys("can't load server key file, " "Please run from wolfSSL home dir"); @@ -218,12 +218,12 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) /* do nothing, just don't load cert files */ #else /* normal */ - if (CyaSSL_CTX_use_certificate_file(ctx, svrCertFile, WOLFSSL_FILETYPE_PEM) + if (wolfSSL_CTX_use_certificate_file(ctx, svrCertFile, WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) err_sys("can't load server cert file, " "Please run from wolfSSL home dir"); - if (CyaSSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, WOLFSSL_FILETYPE_PEM) + if (wolfSSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) err_sys("can't load server key file, " "Please run from wolfSSL home dir"); @@ -231,23 +231,23 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) } /* doPSK */ #elif !defined(NO_CERTS) if (!doPSK) { - if (CyaSSL_CTX_use_certificate_buffer(ctx, server_cert_der_2048, + if (wolfSSL_CTX_use_certificate_buffer(ctx, server_cert_der_2048, sizeof_server_cert_der_2048, WOLFSSL_FILETYPE_ASN1) != WOLFSSL_SUCCESS) err_sys("can't load server cert buffer"); - if (CyaSSL_CTX_use_PrivateKey_buffer(ctx, server_key_der_2048, + if (wolfSSL_CTX_use_PrivateKey_buffer(ctx, server_key_der_2048, sizeof_server_key_der_2048, WOLFSSL_FILETYPE_ASN1) != WOLFSSL_SUCCESS) err_sys("can't load server key buffer"); } #endif -#if defined(CYASSL_SNIFFER) +#if defined(WOLFSSL_SNIFFER) /* Only set if not running testsuite */ if (XSTRSTR(argv[0], "testsuite") == NULL) { /* don't use EDH, can't sniff tmp keys */ - CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA"); + wolfSSL_CTX_set_cipher_list(ctx, "AES256-SHA"); } #endif @@ -255,8 +255,8 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) #ifndef NO_PSK const char *defaultCipherList; - CyaSSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); - CyaSSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); + wolfSSL_CTX_set_psk_server_callback(ctx, my_psk_server_cb); + wolfSSL_CTX_use_psk_identity_hint(ctx, "cyassl server"); #ifdef HAVE_NULL_CIPHER defaultCipherList = "PSK-NULL-SHA256"; #elif defined(HAVE_AESGCM) && !defined(NO_DH) @@ -278,7 +278,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) #else defaultCipherList = "PSK-AES128-CBC-SHA256"; #endif - if (CyaSSL_CTX_set_cipher_list(ctx, defaultCipherList) != WOLFSSL_SUCCESS) + if (wolfSSL_CTX_set_cipher_list(ctx, defaultCipherList) != WOLFSSL_SUCCESS) err_sys("server can't set cipher list 2"); wolfSSL_CTX_set_psk_callback_ctx(ctx, (void*)defaultCipherList); #endif @@ -295,8 +295,8 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) SignalReady(args, port); while (!shutDown) { - CYASSL* ssl = NULL; - CYASSL* write_ssl = NULL; /* may have separate w/ HAVE_WRITE_DUP */ + WOLFSSL* ssl = NULL; + WOLFSSL* write_ssl = NULL; /* may have separate w/ HAVE_WRITE_DUP */ char command[SVR_COMMAND_SIZE+1]; int clientfd; int firstRead = 1; @@ -304,7 +304,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) int err = 0; SOCKADDR_IN_T client; socklen_t client_len = sizeof(client); -#ifndef CYASSL_DTLS +#ifndef WOLFSSL_DTLS clientfd = accept(sockfd, (struct sockaddr*)&client, (ACCEPT_THIRD_T)&client_len); #else @@ -323,23 +323,23 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) #endif if (WOLFSSL_SOCKET_IS_INVALID(clientfd)) err_sys("tcp accept failed"); - ssl = CyaSSL_new(ctx); + ssl = wolfSSL_new(ctx); if (ssl == NULL) err_sys("SSL_new failed"); - CyaSSL_set_fd(ssl, clientfd); - #ifdef CYASSL_DTLS + wolfSSL_set_fd(ssl, clientfd); + #ifdef WOLFSSL_DTLS wolfSSL_dtls_set_peer(ssl, &client, client_len); #endif #if !defined(NO_FILESYSTEM) && !defined(NO_DH) && !defined(NO_ASN) - CyaSSL_SetTmpDH_file(ssl, dhParamFile, WOLFSSL_FILETYPE_PEM); + wolfSSL_SetTmpDH_file(ssl, dhParamFile, WOLFSSL_FILETYPE_PEM); #elif !defined(NO_DH) SetDH(ssl); /* will repick suites with DHE, higher than PSK */ #endif do { err = 0; /* Reset error */ - ret = CyaSSL_accept(ssl); + ret = wolfSSL_accept(ssl); if (ret != WOLFSSL_SUCCESS) { - err = CyaSSL_get_error(ssl, 0); + err = wolfSSL_get_error(ssl, 0); #ifdef WOLFSSL_ASYNC_CRYPT if (err == WC_PENDING_E) { ret = wolfSSL_AsyncPoll(ssl, WOLF_POLL_FLAG_CHECK_HW); @@ -350,9 +350,9 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) } while (err == WC_PENDING_E); if (ret != WOLFSSL_SUCCESS) { fprintf(stderr, "SSL_accept error = %d, %s\n", err, - CyaSSL_ERR_error_string(err, buffer)); + wolfSSL_ERR_error_string(err, buffer)); fprintf(stderr, "SSL_accept failed\n"); - CyaSSL_free(ssl); + wolfSSL_free(ssl); CloseSocket(clientfd); continue; } @@ -364,7 +364,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) write_ssl = wolfSSL_write_dup(ssl); if (write_ssl == NULL) { fprintf(stderr, "wolfSSL_write_dup failed\n"); - CyaSSL_free(ssl); + wolfSSL_free(ssl); CloseSocket(clientfd); continue; } @@ -377,9 +377,9 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) do { err = 0; /* reset error */ - ret = CyaSSL_read(ssl, command, sizeof(command)-1); + ret = wolfSSL_read(ssl, command, sizeof(command)-1); if (ret <= 0) { - err = CyaSSL_get_error(ssl, 0); + err = wolfSSL_get_error(ssl, 0); #ifdef WOLFSSL_ASYNC_CRYPT if (err == WC_PENDING_E) { ret = wolfSSL_AsyncPoll(ssl, WOLF_POLL_FLAG_CHECK_HW); @@ -391,7 +391,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) if (ret <= 0) { if (err != WOLFSSL_ERROR_WANT_READ && err != WOLFSSL_ERROR_ZERO_RETURN){ fprintf(stderr, "SSL_read echo error %d, %s!\n", err, - CyaSSL_ERR_error_string(err, buffer)); + wolfSSL_ERR_error_string(err, buffer)); } break; } @@ -421,7 +421,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) } #ifdef PRINT_SESSION_STATS if ( strncmp(command, "printstats", 10) == 0) { - CyaSSL_PrintSessionStats(); + wolfSSL_PrintSessionStats(); break; } #endif @@ -440,9 +440,9 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) do { err = 0; /* reset error */ - ret = CyaSSL_write(write_ssl, command, echoSz); + ret = wolfSSL_write(write_ssl, command, echoSz); if (ret <= 0) { - err = CyaSSL_get_error(write_ssl, 0); + err = wolfSSL_get_error(write_ssl, 0); #ifdef WOLFSSL_ASYNC_CRYPT if (err == WC_PENDING_E) { ret = wolfSSL_AsyncPoll(write_ssl, WOLF_POLL_FLAG_CHECK_HW); @@ -453,7 +453,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) } while (err == WC_PENDING_E); if (ret != echoSz) { fprintf(stderr, "SSL_write get error = %d, %s\n", err, - CyaSSL_ERR_error_string(err, buffer)); + wolfSSL_ERR_error_string(err, buffer)); err_sys("SSL_write get failed"); } break; @@ -466,9 +466,9 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) do { err = 0; /* reset error */ - ret = CyaSSL_write(write_ssl, command, echoSz); + ret = wolfSSL_write(write_ssl, command, echoSz); if (ret <= 0) { - err = CyaSSL_get_error(write_ssl, 0); + err = wolfSSL_get_error(write_ssl, 0); #ifdef WOLFSSL_ASYNC_CRYPT if (err == WC_PENDING_E) { ret = wolfSSL_AsyncPoll(write_ssl, WOLF_POLL_FLAG_CHECK_HW); @@ -480,26 +480,26 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) if (ret != echoSz) { fprintf(stderr, "SSL_write echo error = %d, %s\n", err, - CyaSSL_ERR_error_string(err, buffer)); + wolfSSL_ERR_error_string(err, buffer)); err_sys("SSL_write echo failed"); } } -#ifndef CYASSL_DTLS - CyaSSL_shutdown(ssl); +#ifndef WOLFSSL_DTLS + wolfSSL_shutdown(ssl); #endif #ifdef HAVE_WRITE_DUP - CyaSSL_free(write_ssl); + wolfSSL_free(write_ssl); #endif - CyaSSL_free(ssl); + wolfSSL_free(ssl); CloseSocket(clientfd); -#ifdef CYASSL_DTLS +#ifdef WOLFSSL_DTLS tcp_listen(&sockfd, &port, useAnyAddr, doDTLS, 0); SignalReady(args, port); #endif } CloseSocket(sockfd); - CyaSSL_CTX_free(ctx); + wolfSSL_CTX_free(ctx); #ifdef ECHO_OUT if (outCreated) @@ -510,10 +510,10 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) #if defined(NO_MAIN_DRIVER) && defined(HAVE_ECC) && defined(FP_ECC) \ && defined(HAVE_THREAD_LS) - ecc_fp_free(); /* free per thread cache */ + wc_ecc_fp_free(); /* free per thread cache */ #endif -#ifdef CYASSL_TIRTOS +#ifdef WOLFSSL_TIRTOS fdCloseSession(Task_self()); #endif @@ -525,7 +525,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) wolfAsync_DevClose(&devId); #endif -#ifndef CYASSL_TIRTOS +#ifndef WOLFSSL_TIRTOS return 0; #endif } @@ -551,15 +551,15 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) args.argv = argv; args.return_code = 0; - CyaSSL_Init(); -#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL) - CyaSSL_Debugging_ON(); + wolfSSL_Init(); +#if defined(DEBUG_WOLFSSL) && !defined(WOLFSSL_MDK_SHELL) + wolfSSL_Debugging_ON(); #endif ChangeToWolfRoot(); #ifndef NO_WOLFSSL_SERVER echoserver_test(&args); #endif - CyaSSL_Cleanup(); + wolfSSL_Cleanup(); #ifdef HAVE_WNR if (wc_FreeNetRandom() < 0) diff --git a/examples/echoserver/echoserver.vcproj b/examples/echoserver/echoserver.vcproj index 2d6d58199..224d98e2c 100644 --- a/examples/echoserver/echoserver.vcproj +++ b/examples/echoserver/echoserver.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../;../../IDE/WIN" - PreprocessorDefinitions="USE_ANY_ADDR;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="USE_ANY_ADDR;WOLFSSL_USER_SETTINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -117,7 +117,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories="../../;../../IDE/WIN" - PreprocessorDefinitions="USE_ANY_ADDR;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="USE_ANY_ADDR;WOLFSSL_USER_SETTINGS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" diff --git a/examples/echoserver/echoserver.vcxproj b/examples/echoserver/echoserver.vcxproj index 775ccc818..28bd2a836 100644 --- a/examples/echoserver/echoserver.vcxproj +++ b/examples/echoserver/echoserver.vcxproj @@ -159,7 +159,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - USE_ANY_ADDR;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + USE_ANY_ADDR;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -179,7 +179,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - USE_ANY_ADDR;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + USE_ANY_ADDR;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -200,7 +200,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - USE_ANY_ADDR;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + USE_ANY_ADDR;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -218,7 +218,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - USE_ANY_ADDR;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + USE_ANY_ADDR;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -237,7 +237,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - USE_ANY_ADDR;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + USE_ANY_ADDR;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -259,7 +259,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - USE_ANY_ADDR;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + USE_ANY_ADDR;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -281,7 +281,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - USE_ANY_ADDR;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + USE_ANY_ADDR;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -302,7 +302,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - USE_ANY_ADDR;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + USE_ANY_ADDR;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true diff --git a/examples/server/server.vcproj b/examples/server/server.vcproj index 05cd28833..2531d7ee8 100644 --- a/examples/server/server.vcproj +++ b/examples/server/server.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../;../../IDE/WIN" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -117,7 +117,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories="../../;../../IDE/WIN" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" diff --git a/examples/server/server.vcxproj b/examples/server/server.vcxproj index 59e1ed7fd..8f11fee8f 100644 --- a/examples/server/server.vcxproj +++ b/examples/server/server.vcxproj @@ -159,7 +159,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -179,7 +179,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -200,7 +200,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -218,7 +218,7 @@ Disabled ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -237,7 +237,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -259,7 +259,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -281,7 +281,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -302,7 +302,7 @@ MaxSpeed true ../../;../../IDE/WIN;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true diff --git a/fips-check.sh b/fips-check.sh index 5902cdb4d..3c16edba7 100755 --- a/fips-check.sh +++ b/fips-check.sh @@ -18,19 +18,10 @@ Usage() { cat <hmac, &src->hmac); } - -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - -static int _HMAC_Init(Hmac* hmac, int type, void* heap) -{ - int ret = 0; - - switch (type) { - #ifndef NO_MD5 - case WC_MD5: - ret = wc_InitMd5(&hmac->hash.md5); - break; - #endif /* !NO_MD5 */ - - #ifndef NO_SHA - case WC_SHA: - ret = wc_InitSha(&hmac->hash.sha); - break; - #endif /* !NO_SHA */ - - #ifdef WOLFSSL_SHA224 - case WC_SHA224: - ret = wc_InitSha224(&hmac->hash.sha224); - break; - #endif /* WOLFSSL_SHA224 */ - - #ifndef NO_SHA256 - case WC_SHA256: - ret = wc_InitSha256(&hmac->hash.sha256); - break; - #endif /* !NO_SHA256 */ - - #ifdef WOLFSSL_SHA384 - case WC_SHA384: - ret = wc_InitSha384(&hmac->hash.sha384); - break; - #endif /* WOLFSSL_SHA384 */ - #ifdef WOLFSSL_SHA512 - case WC_SHA512: - ret = wc_InitSha512(&hmac->hash.sha512); - break; - #endif /* WOLFSSL_SHA512 */ - - #ifdef WOLFSSL_SHA3 - case WC_SHA3_224: - ret = wc_InitSha3_224(&hmac->hash.sha3, heap, INVALID_DEVID); - break; - case WC_SHA3_256: - ret = wc_InitSha3_256(&hmac->hash.sha3, heap, INVALID_DEVID); - break; - case WC_SHA3_384: - ret = wc_InitSha3_384(&hmac->hash.sha3, heap, INVALID_DEVID); - break; - case WC_SHA3_512: - ret = wc_InitSha3_512(&hmac->hash.sha3, heap, INVALID_DEVID); - break; - #endif - - default: - ret = BAD_FUNC_ARG; - break; - } - - (void)heap; - - return ret; -} - -#else - #define _HMAC_Init _InitHmac -#endif - - int wolfSSL_HMAC_Init(WOLFSSL_HMAC_CTX* ctx, const void* key, int keylen, const EVP_MD* type) { diff --git a/sslSniffer/sslSniffer.vcproj b/sslSniffer/sslSniffer.vcproj index d6d03a835..d04153f89 100644 --- a/sslSniffer/sslSniffer.vcproj +++ b/sslSniffer/sslSniffer.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../;../IDE/WIN" - PreprocessorDefinitions="WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -118,7 +118,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories="../;../IDE/WIN" - PreprocessorDefinitions="WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" diff --git a/sslSniffer/sslSniffer.vcxproj b/sslSniffer/sslSniffer.vcxproj index 75c7bf2a5..7395cac1f 100644 --- a/sslSniffer/sslSniffer.vcxproj +++ b/sslSniffer/sslSniffer.vcxproj @@ -89,7 +89,7 @@ Disabled ../;../IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -109,7 +109,7 @@ Disabled ../;../IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -128,7 +128,7 @@ MaxSpeed true ../;../IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -150,7 +150,7 @@ MaxSpeed true ../;../IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true diff --git a/sslSniffer/sslSnifferTest/snifftest.c b/sslSniffer/sslSnifferTest/snifftest.c index d3ba59d69..9a9e275b7 100644 --- a/sslSniffer/sslSnifferTest/snifftest.c +++ b/sslSniffer/sslSnifferTest/snifftest.c @@ -76,7 +76,7 @@ int main(void) #include /* signal */ #include /* isprint */ -#include +#include #ifndef _WIN32 diff --git a/testsuite/testsuite.vcproj b/testsuite/testsuite.vcproj index dc1fad1a4..d30be1c11 100644 --- a/testsuite/testsuite.vcproj +++ b/testsuite/testsuite.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../;../IDE/WIN" - PreprocessorDefinitions="NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -117,7 +117,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories="../;../IDE/WIN" - PreprocessorDefinitions="NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" diff --git a/testsuite/testsuite.vcxproj b/testsuite/testsuite.vcxproj index 6198565ee..958f937fa 100644 --- a/testsuite/testsuite.vcxproj +++ b/testsuite/testsuite.vcxproj @@ -159,7 +159,7 @@ Disabled ../;../IDE/WIN;%(AdditionalIncludeDirectories) - NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -179,7 +179,7 @@ Disabled ../;../IDE/WIN;%(AdditionalIncludeDirectories) - NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) + NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -200,7 +200,7 @@ Disabled ../;../IDE/WIN;%(AdditionalIncludeDirectories) - NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -218,7 +218,7 @@ Disabled ../;../IDE/WIN;%(AdditionalIncludeDirectories) - NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) + NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -237,7 +237,7 @@ MaxSpeed true ../;../IDE/WIN;%(AdditionalIncludeDirectories) - NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -259,7 +259,7 @@ MaxSpeed true ../;../IDE/WIN;%(AdditionalIncludeDirectories) - NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) + NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -281,7 +281,7 @@ MaxSpeed true ../;../IDE/WIN;%(AdditionalIncludeDirectories) - NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -302,7 +302,7 @@ MaxSpeed true ../;../IDE/WIN;%(AdditionalIncludeDirectories) - NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) + NO_MAIN_DRIVER;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) MultiThreadedDLL true diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c index 36ace1f08..17da9d652 100644 --- a/wolfcrypt/src/aes.c +++ b/wolfcrypt/src/aes.c @@ -84,215 +84,6 @@ block cipher mechanism that uses n-bit binary string parameter key with 128-bits #include #endif -/* fips wrapper calls, user can call direct */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - - int wc_AesSetKey(Aes* aes, const byte* key, word32 len, const byte* iv, - int dir) - { - if (aes == NULL || !( (len == 16) || (len == 24) || (len == 32)) ) { - return BAD_FUNC_ARG; - } - - return AesSetKey_fips(aes, key, len, iv, dir); - } - int wc_AesSetIV(Aes* aes, const byte* iv) - { - if (aes == NULL) { - return BAD_FUNC_ARG; - } - - return AesSetIV_fips(aes, iv); - } - #ifdef HAVE_AES_CBC - int wc_AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - if (aes == NULL || out == NULL || in == NULL) { - return BAD_FUNC_ARG; - } - - return AesCbcEncrypt_fips(aes, out, in, sz); - } - #ifdef HAVE_AES_DECRYPT - int wc_AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - if (aes == NULL || out == NULL || in == NULL - || sz % AES_BLOCK_SIZE != 0) { - return BAD_FUNC_ARG; - } - - return AesCbcDecrypt_fips(aes, out, in, sz); - } - #endif /* HAVE_AES_DECRYPT */ - #endif /* HAVE_AES_CBC */ - - /* AES-CTR */ - #ifdef WOLFSSL_AES_COUNTER - int wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) - { - if (aes == NULL || out == NULL || in == NULL) { - return BAD_FUNC_ARG; - } - - return AesCtrEncrypt(aes, out, in, sz); - } - #endif - - /* AES-DIRECT */ - #if defined(WOLFSSL_AES_DIRECT) - void wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in) - { - AesEncryptDirect(aes, out, in); - } - - #ifdef HAVE_AES_DECRYPT - void wc_AesDecryptDirect(Aes* aes, byte* out, const byte* in) - { - AesDecryptDirect(aes, out, in); - } - #endif /* HAVE_AES_DECRYPT */ - - int wc_AesSetKeyDirect(Aes* aes, const byte* key, word32 len, - const byte* iv, int dir) - { - return AesSetKeyDirect(aes, key, len, iv, dir); - } - #endif /* WOLFSSL_AES_DIRECT */ - - /* AES-GCM */ - #ifdef HAVE_AESGCM - int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len) - { - if (aes == NULL || !( (len == 16) || (len == 24) || (len == 32)) ) { - return BAD_FUNC_ARG; - } - - return AesGcmSetKey_fips(aes, key, len); - } - int wc_AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz, - const byte* iv, word32 ivSz, - byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz) - { - if (aes == NULL || authTagSz > AES_BLOCK_SIZE || - authTagSz < WOLFSSL_MIN_AUTH_TAG_SZ || - ivSz == 0 || ivSz > AES_BLOCK_SIZE) { - return BAD_FUNC_ARG; - } - - return AesGcmEncrypt_fips(aes, out, in, sz, iv, ivSz, authTag, - authTagSz, authIn, authInSz); - } - - #ifdef HAVE_AES_DECRYPT - int wc_AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz, - const byte* iv, word32 ivSz, - const byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz) - { - if (aes == NULL || out == NULL || in == NULL || iv == NULL - || authTag == NULL || authTagSz > AES_BLOCK_SIZE || - ivSz == 0 || ivSz > AES_BLOCK_SIZE) { - return BAD_FUNC_ARG; - } - - return AesGcmDecrypt_fips(aes, out, in, sz, iv, ivSz, authTag, - authTagSz, authIn, authInSz); - } - #endif /* HAVE_AES_DECRYPT */ - - int wc_GmacSetKey(Gmac* gmac, const byte* key, word32 len) - { - if (gmac == NULL || key == NULL || !((len == 16) || - (len == 24) || (len == 32)) ) { - return BAD_FUNC_ARG; - } - - return GmacSetKey(gmac, key, len); - } - int wc_GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz, - const byte* authIn, word32 authInSz, - byte* authTag, word32 authTagSz) - { - if (gmac == NULL || authTagSz > AES_BLOCK_SIZE || - authTagSz < WOLFSSL_MIN_AUTH_TAG_SZ) { - return BAD_FUNC_ARG; - } - - return GmacUpdate(gmac, iv, ivSz, authIn, authInSz, - authTag, authTagSz); - } - #endif /* HAVE_AESGCM */ - - /* AES-CCM */ - #if defined(HAVE_AESCCM) && \ - defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2) - int wc_AesCcmSetKey(Aes* aes, const byte* key, word32 keySz) - { - return AesCcmSetKey(aes, key, keySz); - } - int wc_AesCcmEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz, - const byte* nonce, word32 nonceSz, - byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz) - { - /* sanity check on arguments */ - if (aes == NULL || out == NULL || in == NULL || nonce == NULL - || authTag == NULL || nonceSz < 7 || nonceSz > 13) - return BAD_FUNC_ARG; - - AesCcmEncrypt(aes, out, in, inSz, nonce, nonceSz, authTag, - authTagSz, authIn, authInSz); - return 0; - } - - #ifdef HAVE_AES_DECRYPT - int wc_AesCcmDecrypt(Aes* aes, byte* out, - const byte* in, word32 inSz, - const byte* nonce, word32 nonceSz, - const byte* authTag, word32 authTagSz, - const byte* authIn, word32 authInSz) - { - - if (aes == NULL || out == NULL || in == NULL || nonce == NULL - || authTag == NULL || nonceSz < 7 || nonceSz > 13) { - return BAD_FUNC_ARG; - } - - return AesCcmDecrypt(aes, out, in, inSz, nonce, nonceSz, - authTag, authTagSz, authIn, authInSz); - } - #endif /* HAVE_AES_DECRYPT */ - #endif /* HAVE_AESCCM && HAVE_FIPS_VERSION 2 */ - - int wc_AesInit(Aes* aes, void* h, int i) - { - if (aes == NULL) - return BAD_FUNC_ARG; - - (void)h; - (void)i; - - /* FIPS doesn't support */ - #ifdef WOLFSSL_KCAPI_AES - return AesInit(aes, h, i); - #else - return 0; - #endif - } - void wc_AesFree(Aes* aes) - { - (void)aes; - /* FIPS doesn't support */ - #ifdef WOLFSSL_KCAPI_AES - AesFree(aes); - #endif - } - -#else /* else build without fips, or for FIPS v2+ */ - - #if defined(WOLFSSL_TI_CRYPT) #include #else @@ -11590,5 +11381,4 @@ int wc_AesSivDecrypt(const byte* key, word32 keySz, const byte* assoc, #endif /* WOLFSSL_AES_SIV */ -#endif /* HAVE_FIPS */ #endif /* !NO_AES */ diff --git a/wolfcrypt/src/des3.c b/wolfcrypt/src/des3.c index d932a4a2a..741cfce65 100644 --- a/wolfcrypt/src/des3.c +++ b/wolfcrypt/src/des3.c @@ -49,85 +49,6 @@ #include #endif -/* fips wrapper calls, user can call direct */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - - int wc_Des_SetKey(Des* des, const byte* key, const byte* iv, int dir) - { - return Des_SetKey(des, key, iv, dir); - } - int wc_Des3_SetKey(Des3* des, const byte* key, const byte* iv, int dir) - { - if (des == NULL || key == NULL || dir < 0) { - return BAD_FUNC_ARG; - } - - return Des3_SetKey_fips(des, key, iv, dir); - } - int wc_Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz) - { - return Des_CbcEncrypt(des, out, in, sz); - } - int wc_Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz) - { - return Des_CbcDecrypt(des, out, in, sz); - } - int wc_Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz) - { - if (des == NULL || out == NULL || in == NULL) { - return BAD_FUNC_ARG; - } - return Des3_CbcEncrypt_fips(des, out, in, sz); - } - int wc_Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz) - { - if (des == NULL || out == NULL || in == NULL) { - return BAD_FUNC_ARG; - } - return Des3_CbcDecrypt_fips(des, out, in, sz); - } - - #ifdef WOLFSSL_DES_ECB - /* One block, compatibility only */ - int wc_Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz) - { - return Des_EcbEncrypt(des, out, in, sz); - } - int wc_Des3_EcbEncrypt(Des3* des, byte* out, const byte* in, word32 sz) - { - return Des3_EcbEncrypt(des, out, in, sz); - } - #endif /* WOLFSSL_DES_ECB */ - - void wc_Des_SetIV(Des* des, const byte* iv) - { - Des_SetIV(des, iv); - } - int wc_Des3_SetIV(Des3* des, const byte* iv) - { - return Des3_SetIV_fips(des, iv); - } - - int wc_Des3Init(Des3* des3, void* heap, int devId) - { - (void)des3; - (void)heap; - (void)devId; - /* FIPS doesn't support: - return Des3Init(des3, heap, devId); */ - return 0; - } - void wc_Des3Free(Des3* des3) - { - (void)des3; - /* FIPS doesn't support: - Des3Free(des3); */ - } - -#else /* else build without fips, or for FIPS v2 */ - - #if defined(WOLFSSL_TI_CRYPT) #include #else @@ -517,7 +438,7 @@ #elif defined(HAVE_COLDFIRE_SEC) - #include + #include #include "sec.h" #include "mcf5475_sec.h" @@ -1889,5 +1810,4 @@ void wc_Des3Free(Des3* des3) } #endif /* WOLFSSL_TI_CRYPT */ -#endif /* HAVE_FIPS */ #endif /* NO_DES3 */ diff --git a/wolfcrypt/src/hmac.c b/wolfcrypt/src/hmac.c index 29dfc3e21..ee9352bc2 100644 --- a/wolfcrypt/src/hmac.c +++ b/wolfcrypt/src/hmac.c @@ -65,77 +65,6 @@ #endif -/* fips wrapper calls, user can call direct */ -/* If building for old FIPS. */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - - /* does init */ - int wc_HmacSetKey(Hmac* hmac, int type, const byte* key, word32 keySz) - { - if (hmac == NULL || (key == NULL && keySz != 0) || - !(type == WC_MD5 || type == WC_SHA || type == WC_SHA256 || - type == WC_SHA384 || type == WC_SHA512)) { - return BAD_FUNC_ARG; - } - - return HmacSetKey_fips(hmac, type, key, keySz); - } - int wc_HmacUpdate(Hmac* hmac, const byte* in, word32 sz) - { - if (hmac == NULL || (in == NULL && sz > 0)) { - return BAD_FUNC_ARG; - } - - return HmacUpdate_fips(hmac, in, sz); - } - int wc_HmacFinal(Hmac* hmac, byte* out) - { - if (hmac == NULL) { - return BAD_FUNC_ARG; - } - - return HmacFinal_fips(hmac, out); - } - int wolfSSL_GetHmacMaxSize(void) - { - return CyaSSL_GetHmacMaxSize(); - } - - int wc_HmacInit(Hmac* hmac, void* heap, int devId) - { - #ifndef WOLFSSL_KCAPI_HMAC - (void)hmac; - (void)heap; - (void)devId; - return 0; - #else - return HmacInit(hmac, heap, devId); - #endif - } - void wc_HmacFree(Hmac* hmac) - { - #ifndef WOLFSSL_KCAPI_HMAC - (void)hmac; - #else - HmacFree(hmac); - #endif - } - - #ifdef HAVE_HKDF - int wc_HKDF(int type, const byte* inKey, word32 inKeySz, - const byte* salt, word32 saltSz, - const byte* info, word32 infoSz, - byte* out, word32 outSz) - { - return HKDF(type, inKey, inKeySz, salt, saltSz, - info, infoSz, out, outSz); - } - #endif /* HAVE_HKDF */ - -#else /* else build without fips, or for new fips */ - - int wc_HmacSizeByType(int type) { int ret; @@ -1440,5 +1369,4 @@ int wolfSSL_GetHmacMaxSize(void) #endif /* HAVE_HKDF */ -#endif /* HAVE_FIPS */ #endif /* NO_HMAC */ diff --git a/wolfcrypt/src/memory.c b/wolfcrypt/src/memory.c index 3a974e67c..ae3412cd0 100644 --- a/wolfcrypt/src/memory.c +++ b/wolfcrypt/src/memory.c @@ -33,15 +33,6 @@ #include -/* check old macros @wc_fips */ -#if defined(USE_CYASSL_MEMORY) && !defined(USE_WOLFSSL_MEMORY) - #define USE_WOLFSSL_MEMORY -#endif -#if defined(CYASSL_MALLOC_CHECK) && !defined(WOLFSSL_MALLOC_CHECK) - #define WOLFSSL_MALLOC_CHECK -#endif - - /* Possible memory options: * NO_WOLFSSL_MEMORY: Disables wolf memory callback support. When not defined settings.h defines USE_WOLFSSL_MEMORY. diff --git a/wolfcrypt/src/port/kcapi/kcapi_dh.c b/wolfcrypt/src/port/kcapi/kcapi_dh.c index 0b1bf4e12..cceaf2521 100644 --- a/wolfcrypt/src/port/kcapi/kcapi_dh.c +++ b/wolfcrypt/src/port/kcapi/kcapi_dh.c @@ -47,68 +47,6 @@ void KcapiDh_Free(DhKey* key) static int KcapiDh_SetParams(DhKey* key) { -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - int ret = 0; - unsigned char* pkcs3 = NULL; - word32 len = 0, idx = 0, len2; - - len = MAX_SEQ_SZ; /* Sequence */ - len += ASN_TAG_SZ + MAX_LENGTH_SZ; /* Integer */ - len += mp_leading_bit(&key->p) ? 1 : 0; - len += mp_unsigned_bin_size(&key->p); - len += ASN_TAG_SZ + MAX_LENGTH_SZ; /* Integer */ - len += mp_leading_bit(&key->g) ? 1 : 0; - len += mp_unsigned_bin_size(&key->g); - - pkcs3 = (unsigned char*)XMALLOC(len, key->heap, DYNAMIC_TYPE_TMP_BUFFER); - if (pkcs3 == NULL) { - ret = MEMORY_E; - } - - if (ret == 0) { - idx = len; - len2 = mp_unsigned_bin_size(&key->g); - idx -= len2; - ret = mp_to_unsigned_bin(&key->g, pkcs3 + idx); - } - if (ret >= 0) { - if (mp_leading_bit(&key->g)) { - pkcs3[--idx] = 0x00; - len2++; - } - idx -= SetLength(len2, NULL); - SetLength(len2, pkcs3 + idx); - pkcs3[--idx] = ASN_INTEGER; - - len2 = mp_unsigned_bin_size(&key->p); - idx -= len2; - ret = mp_to_unsigned_bin(&key->p, pkcs3 + idx); - } - if (ret >= 0) { - if (mp_leading_bit(&key->p)) { - pkcs3[--idx] = 0x00; - len2++; - } - idx -= SetLength(len2, NULL); - SetLength(len2, pkcs3 + idx); - pkcs3[--idx] = ASN_INTEGER; - - len2 = len - idx; - idx -= SetSequence(len2, NULL); - SetSequence(len2, pkcs3 + idx); - - ret = kcapi_kpp_dh_setparam_pkcs3(key->handle, pkcs3 + idx, len - idx); - if (ret != 0) { - WOLFSSL_MSG("KcapiDh_SetParams: Failed to set"); - } - } - - if (pkcs3 != NULL) { - XFREE(pkcs3, key->heap, DYNAMIC_TYPE_TMP_BUFFER); - } - return ret; -#else int ret; unsigned char* pkcs3 = NULL; word32 len; @@ -136,7 +74,6 @@ static int KcapiDh_SetParams(DhKey* key) XFREE(pkcs3, key->heap, DYNAMIC_TYPE_TMP_BUFFER); } return ret; -#endif } int KcapiDh_MakeKey(DhKey* key, byte* pub, word32* pubSz) diff --git a/wolfcrypt/src/port/kcapi/kcapi_hash.c b/wolfcrypt/src/port/kcapi/kcapi_hash.c index 844f1f6f7..f4a3b43c0 100644 --- a/wolfcrypt/src/port/kcapi/kcapi_hash.c +++ b/wolfcrypt/src/port/kcapi/kcapi_hash.c @@ -318,36 +318,6 @@ int wc_Sha224Copy(wc_Sha224* src, wc_Sha224* dst) static const char WC_NAME_SHA256[] = "sha256"; -/* create KCAPI handle for SHA256 operation */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -int InitSha256(wc_Sha256* sha) -{ - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return KcapiHashInit(&sha->kcapi, NULL, INVALID_DEVID, WC_NAME_SHA256); -} - - -int Sha256Update(wc_Sha256* sha, const byte* in, word32 sz) -{ - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return KcapiHashUpdate(&sha->kcapi, in, sz); -} - - -int Sha256Final(wc_Sha256* sha, byte* hash) -{ - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return KcapiHashFinal(&sha->kcapi, hash, WC_SHA256_DIGEST_SIZE, - WC_NAME_SHA256); -} -#else int wc_InitSha256_ex(wc_Sha256* sha, void* heap, int devid) { if (sha == NULL) { @@ -374,8 +344,6 @@ int wc_Sha256Final(wc_Sha256* sha, byte* hash) return KcapiHashFinal(&sha->kcapi, hash, WC_SHA256_DIGEST_SIZE, WC_NAME_SHA256); } -#endif - int wc_Sha256GetHash(wc_Sha256* sha, byte* hash) { @@ -400,37 +368,6 @@ int wc_Sha256Copy(wc_Sha256* src, wc_Sha256* dst) static const char WC_NAME_SHA384[] = "sha384"; - -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -/* create KCAPI handle for SHA384 operation */ -int InitSha384(wc_Sha384* sha) -{ - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return KcapiHashInit(&sha->kcapi, NULL, INVALID_DEVID, WC_NAME_SHA384); -} - - -int Sha384Update(wc_Sha384* sha, const byte* in, word32 sz) -{ - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return KcapiHashUpdate(&sha->kcapi, in, sz); -} - - -int Sha384Final(wc_Sha384* sha, byte* hash) -{ - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return KcapiHashFinal(&sha->kcapi, hash, WC_SHA384_DIGEST_SIZE, - WC_NAME_SHA384); -} -#else /* create KCAPI handle for SHA384 operation */ int wc_InitSha384_ex(wc_Sha384* sha, void* heap, int devid) { @@ -458,7 +395,6 @@ int wc_Sha384Final(wc_Sha384* sha, byte* hash) return KcapiHashFinal(&sha->kcapi, hash, WC_SHA384_DIGEST_SIZE, WC_NAME_SHA384); } -#endif int wc_Sha384GetHash(wc_Sha384* sha, byte* hash) { @@ -483,36 +419,6 @@ int wc_Sha384Copy(wc_Sha384* src, wc_Sha384* dst) static const char WC_NAME_SHA512[] = "sha512"; -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -/* create KCAPI handle for SHA512 operation */ -int InitSha512(wc_Sha512* sha) -{ - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return KcapiHashInit(&sha->kcapi, NULL, INVALID_DEVID, WC_NAME_SHA512); -} - - -int Sha512Update(wc_Sha512* sha, const byte* in, word32 sz) -{ - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return KcapiHashUpdate(&sha->kcapi, in, sz); -} - - -int Sha512Final(wc_Sha512* sha, byte* hash) -{ - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return KcapiHashFinal(&sha->kcapi, hash, WC_SHA512_DIGEST_SIZE, - WC_NAME_SHA512); -} -#else /* create KCAPI handle for SHA512 operation */ int wc_InitSha512_ex(wc_Sha512* sha, void* heap, int devid) { @@ -540,7 +446,6 @@ int wc_Sha512Final(wc_Sha512* sha, byte* hash) return KcapiHashFinal(&sha->kcapi, hash, WC_SHA512_DIGEST_SIZE, WC_NAME_SHA512); } -#endif int wc_Sha512GetHash(wc_Sha512* sha, byte* hash) { diff --git a/wolfcrypt/src/port/kcapi/kcapi_hmac.c b/wolfcrypt/src/port/kcapi/kcapi_hmac.c index a233d9996..0a5d46751 100644 --- a/wolfcrypt/src/port/kcapi/kcapi_hmac.c +++ b/wolfcrypt/src/port/kcapi/kcapi_hmac.c @@ -52,12 +52,7 @@ static const char WC_NAME_HMAC_SHA384[] = "hmac(sha384)"; static const char WC_NAME_HMAC_SHA512[] = "hmac(sha512)"; #endif -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -int HmacInit(Hmac* hmac, void* heap, int devId) -#else int wc_HmacInit(Hmac* hmac, void* heap, int devId) -#endif { int ret = 0; @@ -76,12 +71,7 @@ int wc_HmacInit(Hmac* hmac, void* heap, int devId) return ret; } -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -void HmacFree(Hmac* hmac) -#else void wc_HmacFree(Hmac* hmac) -#endif { if (hmac != NULL) { if (hmac->handle != NULL) { @@ -91,12 +81,7 @@ void wc_HmacFree(Hmac* hmac) } } -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -int HmacSetKey(Hmac* hmac, int type, const byte* key, word32 length) -#else int wc_HmacSetKey(Hmac* hmac, int type, const byte* key, word32 length) -#endif { int ret = 0; const char* ciphername = NULL; @@ -197,12 +182,7 @@ int wc_HmacSetKey(Hmac* hmac, int type, const byte* key, word32 length) return ret; } -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -int HmacUpdate(Hmac* hmac, const byte* msg, word32 length) -#else int wc_HmacUpdate(Hmac* hmac, const byte* msg, word32 length) -#endif { int ret = 0; @@ -244,12 +224,7 @@ int wc_HmacUpdate(Hmac* hmac, const byte* msg, word32 length) return ret; } -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -int HmacFinal(Hmac* hmac, byte* hash) -#else int wc_HmacFinal(Hmac* hmac, byte* hash) -#endif { int ret = 0; int len = 0; diff --git a/wolfcrypt/src/port/kcapi/kcapi_rsa.c b/wolfcrypt/src/port/kcapi/kcapi_rsa.c index 602c50b80..cafca14e7 100644 --- a/wolfcrypt/src/port/kcapi/kcapi_rsa.c +++ b/wolfcrypt/src/port/kcapi/kcapi_rsa.c @@ -45,164 +45,6 @@ void KcapiRsa_Free(RsaKey* key) } } -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -/* Set the DER/BER encoding of the ASN.1 INTEGER header. - * - * len Length of data to encode. - * firstByte First byte of data, most significant byte of integer, to encode. - * output Buffer to write into. - * returns the number of bytes added to the buffer. - */ -static int SetASNInt(int len, byte firstByte, byte* output) -{ - word32 idx = 0; - - if (output) - output[idx] = ASN_INTEGER; - idx++; - if (firstByte & 0x80) - len++; - idx += SetLength(len, output ? output + idx : NULL); - if (firstByte & 0x80) { - if (output) - output[idx] = 0x00; - idx++; - } - - return idx; -} - -static int SetASNIntMP(mp_int* n, int maxSz, byte* output) -{ - int idx = 0; - int leadingBit; - int length; - int err; - - leadingBit = mp_leading_bit(n); - length = mp_unsigned_bin_size(n); - idx = SetASNInt(length, leadingBit ? 0x80 : 0x00, output); - if (maxSz >= 0 && (idx + length) > maxSz) - return BUFFER_E; - - if (output) { - err = mp_to_unsigned_bin(n, output + idx); - if (err != MP_OKAY) - return MP_TO_E; - } - idx += length; - - return idx; -} - -static mp_int* GetRsaInt(RsaKey* key, int idx) -{ - if (idx == 0) - return &key->n; - if (idx == 1) - return &key->e; - if (idx == 2) - return &key->d; - if (idx == 3) - return &key->p; - if (idx == 4) - return &key->q; - if (idx == 5) - return &key->dP; - if (idx == 6) - return &key->dQ; - if (idx == 7) - return &key->u; - - return NULL; -} - -/* Release Tmp RSA resources */ -static WC_INLINE void FreeTmpRsas(byte** tmps, void* heap) -{ - int i; - - (void)heap; - - for (i = 0; i < RSA_INTS; i++) - XFREE(tmps[i], heap, DYNAMIC_TYPE_RSA); -} - - -/* Convert RsaKey key to DER format, write to output (inLen), return bytes - written */ -static int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen) -{ - word32 seqSz, verSz, rawLen, intTotalLen = 0; - word32 sizes[RSA_INTS]; - int i, j, outLen, ret = 0; - - byte seq[MAX_SEQ_SZ]; - byte ver[MAX_VERSION_SZ]; - byte* tmps[RSA_INTS]; - - if (!key || !output) - return BAD_FUNC_ARG; - - if (key->type != RSA_PRIVATE) - return BAD_FUNC_ARG; - - for (i = 0; i < RSA_INTS; i++) - tmps[i] = NULL; - - /* write all big ints from key to DER tmps */ - for (i = 0; i < RSA_INTS; i++) { - int mpSz; - mp_int* keyInt = GetRsaInt(key, i); - - rawLen = mp_unsigned_bin_size(keyInt) + 1; - tmps[i] = (byte*)XMALLOC(rawLen + MAX_SEQ_SZ, key->heap, - DYNAMIC_TYPE_RSA); - if (tmps[i] == NULL) { - ret = MEMORY_E; - break; - } - - mpSz = SetASNIntMP(keyInt, MAX_RSA_INT_SZ, tmps[i]); - if (mpSz < 0) { - ret = mpSz; - break; - } - intTotalLen += (sizes[i] = mpSz); - } - - if (ret != 0) { - FreeTmpRsas(tmps, key->heap); - return ret; - } - - /* make headers */ - verSz = SetMyVersion(0, ver, FALSE); - seqSz = SetSequence(verSz + intTotalLen, seq); - - outLen = seqSz + verSz + intTotalLen; - if (outLen > (int)inLen) { - FreeTmpRsas(tmps, key->heap); - return BAD_FUNC_ARG; - } - - /* write to output */ - XMEMCPY(output, seq, seqSz); - j = seqSz; - XMEMCPY(output + j, ver, verSz); - j += verSz; - - for (i = 0; i < RSA_INTS; i++) { - XMEMCPY(output + j, tmps[i], sizes[i]); - j += sizes[i]; - } - FreeTmpRsas(tmps, key->heap); - - return outLen; -} -#endif - #if !defined(WOLFSSL_RSA_PUBLIC_ONLY) && !defined(WOLFSSL_RSA_VERIFY_ONLY) static int KcapiRsa_SetPrivKey(RsaKey* key) { diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index a8f873f2d..9edc3f07e 100644 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -63,58 +63,6 @@ This library contains implementation for the random number generator. #endif -/* If building for old FIPS. */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - -int wc_GenerateSeed(OS_Seed* os, byte* seed, word32 sz) -{ - return GenerateSeed(os, seed, sz); -} - -int wc_InitRng_ex(WC_RNG* rng, void* heap, int devId) -{ - (void)heap; - (void)devId; - return InitRng_fips(rng); -} - -WOLFSSL_ABI -int wc_InitRng(WC_RNG* rng) -{ - return InitRng_fips(rng); -} - - -int wc_RNG_GenerateBlock(WC_RNG* rng, byte* b, word32 sz) -{ - return RNG_GenerateBlock_fips(rng, b, sz); -} - - -int wc_RNG_GenerateByte(WC_RNG* rng, byte* b) -{ - return RNG_GenerateByte(rng, b); -} - -#ifdef HAVE_HASHDRBG - - int wc_FreeRng(WC_RNG* rng) - { - return FreeRng_fips(rng); - } - - int wc_RNG_HealthTest(int reseed, const byte* seedA, word32 seedASz, - const byte* seedB, word32 seedBSz, - byte* output, word32 outputSz) - { - return RNG_HealthTest_fips(reseed, seedA, seedASz, - seedB, seedBSz, output, outputSz); - } -#endif /* HAVE_HASHDRBG */ - -#else /* else build without fips, or for new fips */ - #ifndef WC_NO_RNG /* if not FIPS and RNG is disabled then do not compile */ #include @@ -3878,4 +3826,3 @@ int wc_hwrng_generate_block(byte *output, word32 sz) #endif #endif /* WC_NO_RNG */ -#endif /* HAVE_FIPS */ diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index 914f13494..58eda07cb 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -88,134 +88,6 @@ RSA Key Size Configuration: */ -/* If building for old FIPS. */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - -int wc_InitRsaKey(RsaKey* key, void* ptr) -{ - if (key == NULL) { - return BAD_FUNC_ARG; - } - - return InitRsaKey_fips(key, ptr); -} - - -int wc_InitRsaKey_ex(RsaKey* key, void* ptr, int devId) -{ - (void)devId; - if (key == NULL) { - return BAD_FUNC_ARG; - } - return InitRsaKey_fips(key, ptr); -} - - -int wc_FreeRsaKey(RsaKey* key) -{ - return FreeRsaKey_fips(key); -} - - -#ifndef WOLFSSL_RSA_VERIFY_ONLY -int wc_RsaPublicEncrypt(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key, WC_RNG* rng) -{ - if (in == NULL || out == NULL || key == NULL || rng == NULL) { - return BAD_FUNC_ARG; - } - return RsaPublicEncrypt_fips(in, inLen, out, outLen, key, rng); -} -#endif - - -#ifndef WOLFSSL_RSA_PUBLIC_ONLY -int wc_RsaPrivateDecryptInline(byte* in, word32 inLen, byte** out, - RsaKey* key) -{ - if (in == NULL || out == NULL || key == NULL) { - return BAD_FUNC_ARG; - } - return RsaPrivateDecryptInline_fips(in, inLen, out, key); -} - - -int wc_RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key) -{ - if (in == NULL || out == NULL || key == NULL) { - return BAD_FUNC_ARG; - } - return RsaPrivateDecrypt_fips(in, inLen, out, outLen, key); -} - - -int wc_RsaSSL_Sign(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key, WC_RNG* rng) -{ - if (in == NULL || out == NULL || key == NULL || inLen == 0) { - return BAD_FUNC_ARG; - } - return RsaSSL_Sign_fips(in, inLen, out, outLen, key, rng); -} -#endif - - -int wc_RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out, RsaKey* key) -{ - if (in == NULL || out == NULL || key == NULL) { - return BAD_FUNC_ARG; - } - return RsaSSL_VerifyInline_fips(in, inLen, out, key); -} - - -int wc_RsaSSL_Verify(const byte* in, word32 inLen, byte* out, - word32 outLen, RsaKey* key) -{ - if (in == NULL || out == NULL || key == NULL || inLen == 0) { - return BAD_FUNC_ARG; - } - return RsaSSL_Verify_fips(in, inLen, out, outLen, key); -} - - -int wc_RsaEncryptSize(const RsaKey* key) -{ - if (key == NULL) { - return BAD_FUNC_ARG; - } - return RsaEncryptSize_fips((RsaKey*)key); -} - - -#ifndef WOLFSSL_RSA_VERIFY_ONLY -int wc_RsaFlattenPublicKey(RsaKey* key, byte* a, word32* aSz, byte* b, - word32* bSz) -{ - - /* not specified as fips so not needing _fips */ - return RsaFlattenPublicKey(key, a, aSz, b, bSz); -} -#endif - - -#ifdef WOLFSSL_KEY_GEN - int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng) - { - return MakeRsaKey(key, size, e, rng); - } -#endif - - -/* these are functions in asn and are routed to wolfssl/wolfcrypt/asn.c -* wc_RsaPrivateKeyDecode -* wc_RsaPublicKeyDecode -*/ - -#else /* else build without fips, or for new fips */ - #include #include #ifdef WOLF_CRYPTO_CB @@ -4359,9 +4231,6 @@ int wc_RsaFlattenPublicKey(RsaKey* key, byte* e, word32* eSz, byte* n, } #endif -#endif /* HAVE_FIPS */ - - #ifndef WOLFSSL_RSA_VERIFY_ONLY static int RsaGetValue(mp_int* in, byte* out, word32* outSz) { diff --git a/wolfcrypt/src/sha.c b/wolfcrypt/src/sha.c index 0415d00b6..603b8be6f 100644 --- a/wolfcrypt/src/sha.c +++ b/wolfcrypt/src/sha.c @@ -81,51 +81,6 @@ #undef WOLFSSL_USE_ESP32_CRYPT_HASH_HW #endif -/* fips wrapper calls, user can call direct */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - - int wc_InitSha(wc_Sha* sha) - { - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return InitSha_fips(sha); - } - int wc_InitSha_ex(wc_Sha* sha, void* heap, int devId) - { - (void)heap; - (void)devId; - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return InitSha_fips(sha); - } - - int wc_ShaUpdate(wc_Sha* sha, const byte* data, word32 len) - { - if (sha == NULL || (data == NULL && len > 0)) { - return BAD_FUNC_ARG; - } - return ShaUpdate_fips(sha, data, len); - } - - int wc_ShaFinal(wc_Sha* sha, byte* out) - { - if (sha == NULL || out == NULL) { - return BAD_FUNC_ARG; - } - return ShaFinal_fips(sha,out); - } - void wc_ShaFree(wc_Sha* sha) - { - (void)sha; - /* Not supported in FIPS */ - } - -#else /* else build without fips, or for FIPS v2 */ - - #if defined(WOLFSSL_TI_HASH) /* #include included by wc_port.c */ @@ -944,7 +899,6 @@ void wc_ShaFree(wc_Sha* sha) #endif /* !defined(WOLFSSL_HAVE_PSA) || defined(WOLFSSL_PSA_NO_HASH) */ #endif /* !WOLFSSL_TI_HASH */ -#endif /* !HAVE_FIPS ... */ #if !defined(WOLFSSL_TI_HASH) && !defined(WOLFSSL_IMXRT_DCP) diff --git a/wolfcrypt/src/sha256.c b/wolfcrypt/src/sha256.c index 735659a0f..a8169faf1 100644 --- a/wolfcrypt/src/sha256.c +++ b/wolfcrypt/src/sha256.c @@ -111,55 +111,6 @@ on the specific device platform. static const char* TAG = "wc_sha256"; #endif -/* fips wrapper calls, user can call direct */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - - int wc_InitSha256(wc_Sha256* sha) - { - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return InitSha256_fips(sha); - } - int wc_InitSha256_ex(wc_Sha256* sha, void* heap, int devId) - { - (void)heap; - (void)devId; - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return InitSha256_fips(sha); - } - int wc_Sha256Update(wc_Sha256* sha, const byte* data, word32 len) - { - if (sha == NULL || (data == NULL && len > 0)) { - return BAD_FUNC_ARG; - } - - if (data == NULL && len == 0) { - /* valid, but do nothing */ - return 0; - } - - return Sha256Update_fips(sha, data, len); - } - int wc_Sha256Final(wc_Sha256* sha, byte* out) - { - if (sha == NULL || out == NULL) { - return BAD_FUNC_ARG; - } - return Sha256Final_fips(sha, out); - } - void wc_Sha256Free(wc_Sha256* sha) - { - (void)sha; - /* Not supported in FIPS */ - } - -#else /* else build without fips, or for FIPS v2 */ - - #if defined(WOLFSSL_TI_HASH) /* #include included by wc_port.c */ #elif defined(WOLFSSL_CRYPTOCELL) @@ -1887,7 +1838,6 @@ int wc_Sha224_Grow(wc_Sha224* sha224, const byte* in, int inSz) #endif /* WOLFSSL_HASH_KEEP */ #endif /* !WOLFSSL_TI_HASH */ -#endif /* HAVE_FIPS */ #ifndef WOLFSSL_TI_HASH diff --git a/wolfcrypt/src/sha512.c b/wolfcrypt/src/sha512.c index 0b754768d..ab774f504 100644 --- a/wolfcrypt/src/sha512.c +++ b/wolfcrypt/src/sha512.c @@ -71,92 +71,6 @@ #define USE_SLOW_SHA512 #endif -/* fips wrapper calls, user can call direct */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - - #ifdef WOLFSSL_SHA512 - - int wc_InitSha512(wc_Sha512* sha) - { - if (sha == NULL) { - return BAD_FUNC_ARG; - } - - return InitSha512_fips(sha); - } - int wc_InitSha512_ex(wc_Sha512* sha, void* heap, int devId) - { - (void)heap; - (void)devId; - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return InitSha512_fips(sha); - } - int wc_Sha512Update(wc_Sha512* sha, const byte* data, word32 len) - { - if (sha == NULL || (data == NULL && len > 0)) { - return BAD_FUNC_ARG; - } - - return Sha512Update_fips(sha, data, len); - } - int wc_Sha512Final(wc_Sha512* sha, byte* out) - { - if (sha == NULL || out == NULL) { - return BAD_FUNC_ARG; - } - - return Sha512Final_fips(sha, out); - } - void wc_Sha512Free(wc_Sha512* sha) - { - (void)sha; - /* Not supported in FIPS */ - } - #endif - - #if defined(WOLFSSL_SHA384) || defined(HAVE_AESGCM) - int wc_InitSha384(wc_Sha384* sha) - { - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return InitSha384_fips(sha); - } - int wc_InitSha384_ex(wc_Sha384* sha, void* heap, int devId) - { - (void)heap; - (void)devId; - if (sha == NULL) { - return BAD_FUNC_ARG; - } - return InitSha384_fips(sha); - } - int wc_Sha384Update(wc_Sha384* sha, const byte* data, word32 len) - { - if (sha == NULL || (data == NULL && len > 0)) { - return BAD_FUNC_ARG; - } - return Sha384Update_fips(sha, data, len); - } - int wc_Sha384Final(wc_Sha384* sha, byte* out) - { - if (sha == NULL || out == NULL) { - return BAD_FUNC_ARG; - } - return Sha384Final_fips(sha, out); - } - void wc_Sha384Free(wc_Sha384* sha) - { - (void)sha; - /* Not supported in FIPS */ - } - #endif /* WOLFSSL_SHA384 || HAVE_AESGCM */ - -#else /* else build without fips, or for FIPS v2 */ - #include #ifdef NO_INLINE @@ -1564,8 +1478,6 @@ void wc_Sha384Free(wc_Sha384* sha384) #endif /* WOLFSSL_SHA384 */ -#endif /* HAVE_FIPS */ - #ifdef WOLFSSL_SHA512 #if defined(WOLFSSL_KCAPI_HASH) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 6e0a4cce3..7735f2a7a 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -15465,9 +15465,6 @@ static wc_test_ret_t rsa_flatten_test(RsaKey* key) * -101 = USER_CRYPTO_ERROR */ if (ret == 0) -#elif defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - if (ret != 0) #else if (ret != RSA_BUFFER_E) #endif diff --git a/wolfssl.vcproj b/wolfssl.vcproj index 7aa2def99..f9b5e87d0 100644 --- a/wolfssl.vcproj +++ b/wolfssl.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;./IDE/WIN" - PreprocessorDefinitions="WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="WOLFSSL_LIB;WOLFSSL_USER_SETTINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -107,7 +107,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories="./;./IDE/WIN" - PreprocessorDefinitions="WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS" + PreprocessorDefinitions="WOLFSSL_LIB;WOLFSSL_USER_SETTINGS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" diff --git a/wolfssl.vcxproj b/wolfssl.vcxproj index e3a80499f..7b5d25166 100644 --- a/wolfssl.vcxproj +++ b/wolfssl.vcxproj @@ -148,7 +148,7 @@ Disabled ./;./IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -162,7 +162,7 @@ Disabled ./;./IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -183,7 +183,7 @@ Disabled ./;./IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -197,7 +197,7 @@ Disabled ./;./IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -217,7 +217,7 @@ MaxSpeed true ./;./IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -230,7 +230,7 @@ MaxSpeed true ./;./IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -248,7 +248,7 @@ MaxSpeed true ./;./IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -262,7 +262,7 @@ MaxSpeed true ./;./IDE/WIN;%(AdditionalIncludeDirectories) - WOLFSSL_LIB;BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_LIB;BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) MultiThreadedDLL true diff --git a/wolfssl/internal.h b/wolfssl/internal.h index d8752091a..a2efe7bea 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -1687,21 +1687,16 @@ enum Misc { SESSION_FLUSH_COUNT = 256, /* Flush session cache unless user turns off */ TLS_MAX_PAD_SZ = 255, /* Max padding in TLS */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - MAX_SYM_KEY_SIZE = AES_256_KEY_SIZE, -#else - #if defined(HAVE_NULL_CIPHER) && defined(WOLFSSL_TLS13) - #if defined(WOLFSSL_SHA384) && WC_MAX_SYM_KEY_SIZE < 48 - MAX_SYM_KEY_SIZE = WC_SHA384_DIGEST_SIZE, - #elif !defined(NO_SHA256) && WC_MAX_SYM_KEY_SIZE < 32 - MAX_SYM_KEY_SIZE = WC_SHA256_DIGEST_SIZE, - #else - MAX_SYM_KEY_SIZE = WC_MAX_SYM_KEY_SIZE, - #endif +#if defined(HAVE_NULL_CIPHER) && defined(WOLFSSL_TLS13) + #if defined(WOLFSSL_SHA384) && WC_MAX_SYM_KEY_SIZE < 48 + MAX_SYM_KEY_SIZE = WC_SHA384_DIGEST_SIZE, + #elif !defined(NO_SHA256) && WC_MAX_SYM_KEY_SIZE < 32 + MAX_SYM_KEY_SIZE = WC_SHA256_DIGEST_SIZE, #else MAX_SYM_KEY_SIZE = WC_MAX_SYM_KEY_SIZE, #endif +#else + MAX_SYM_KEY_SIZE = WC_MAX_SYM_KEY_SIZE, #endif #if defined(HAVE_SELFTEST) && \ diff --git a/wolfssl/wolfcrypt/aes.h b/wolfssl/wolfcrypt/aes.h index 4e4409b3b..ef7a80629 100644 --- a/wolfssl/wolfcrypt/aes.h +++ b/wolfssl/wolfcrypt/aes.h @@ -70,18 +70,6 @@ WOLFSSL_LOCAL void GHASH(Gcm* gcm, const byte* a, word32 aSz, const byte* c, #include #endif /* HAVE_FIPS_VERSION >= 2 */ -/* included for fips @wc_fips */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -#include -#if defined(CYASSL_AES_COUNTER) && !defined(WOLFSSL_AES_COUNTER) - #define WOLFSSL_AES_COUNTER -#endif -#if !defined(WOLFSSL_AES_DIRECT) && defined(CYASSL_AES_DIRECT) - #define WOLFSSL_AES_DIRECT -#endif -#endif - #ifndef WC_NO_RNG #include #endif @@ -431,13 +419,7 @@ WOLFSSL_API int wc_AesEcbDecrypt(Aes* aes, byte* out, #endif /* AES-DIRECT */ #if defined(WOLFSSL_AES_DIRECT) -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - WOLFSSL_API void wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in); - WOLFSSL_API void wc_AesDecryptDirect(Aes* aes, byte* out, const byte* in); - WOLFSSL_API int wc_AesSetKeyDirect(Aes* aes, const byte* key, word32 len, - const byte* iv, int dir); -#elif defined(BUILDING_WOLFSSL) +#if defined(BUILDING_WOLFSSL) WOLFSSL_API WARN_UNUSED_RESULT int wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in); WOLFSSL_API WARN_UNUSED_RESULT int wc_AesDecryptDirect(Aes* aes, byte* out, diff --git a/wolfssl/wolfcrypt/asn.h b/wolfssl/wolfcrypt/asn.h index 9b0a1a5ef..f7aa9794c 100644 --- a/wolfssl/wolfcrypt/asn.h +++ b/wolfssl/wolfcrypt/asn.h @@ -45,12 +45,6 @@ that can be serialized and deserialized in a cross-platform way. #include -/* fips declare of RsaPrivateKeyDecode @wc_fips */ -#if defined(HAVE_FIPS) && !defined(NO_RSA) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - #include -#endif - #ifndef NO_DH #include #endif diff --git a/wolfssl/wolfcrypt/des3.h b/wolfssl/wolfcrypt/des3.h index 96e154dd2..d5b123212 100644 --- a/wolfssl/wolfcrypt/des3.h +++ b/wolfssl/wolfcrypt/des3.h @@ -35,12 +35,6 @@ #include #endif /* HAVE_FIPS_VERSION >= 2 */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - /* included for fips @wc_fips */ - #include -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index dff5f14ff..ac6186d5c 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -33,11 +33,6 @@ the error status. #include -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - #include -#endif /* HAVE_FIPS V1 */ - #ifdef __cplusplus extern "C" { #endif diff --git a/wolfssl/wolfcrypt/hmac.h b/wolfssl/wolfcrypt/hmac.h index 6199cb9a6..f325dd35d 100644 --- a/wolfssl/wolfcrypt/hmac.h +++ b/wolfssl/wolfcrypt/hmac.h @@ -30,14 +30,6 @@ #ifndef NO_HMAC -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -/* for fips @wc_fips */ - #include - #define WC_HMAC_BLOCK_SIZE HMAC_BLOCK_SIZE -#endif - - #if defined(HAVE_FIPS) && \ defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2) #include diff --git a/wolfssl/wolfcrypt/port/kcapi/kcapi_hmac.h b/wolfssl/wolfcrypt/port/kcapi/kcapi_hmac.h index a987527e8..cfd841fe2 100644 --- a/wolfssl/wolfcrypt/port/kcapi/kcapi_hmac.h +++ b/wolfssl/wolfcrypt/port/kcapi/kcapi_hmac.h @@ -27,11 +27,5 @@ #include #include -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -int HmacInit(Hmac* hmac, void* heap, int devId); -void HmacFree(Hmac* hmac); -#endif - #endif /* WOLF_CRYPT_KCAPI_HMAC_H */ diff --git a/wolfssl/wolfcrypt/random.h b/wolfssl/wolfcrypt/random.h index b7d758849..8cd599bdd 100644 --- a/wolfssl/wolfcrypt/random.h +++ b/wolfssl/wolfcrypt/random.h @@ -35,12 +35,6 @@ #include #endif /* HAVE_FIPS_VERSION >= 2 */ -/* included for fips @wc_fips */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -#include -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/wolfssl/wolfcrypt/rsa.h b/wolfssl/wolfcrypt/rsa.h index a904c8a66..2d6eabc3c 100644 --- a/wolfssl/wolfcrypt/rsa.h +++ b/wolfssl/wolfcrypt/rsa.h @@ -63,17 +63,9 @@ RSA keys can be used to encrypt, decrypt, sign and verify data. #include "user_rsa.h" #else -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -/* for fips @wc_fips */ -#include -#if defined(CYASSL_KEY_GEN) && !defined(WOLFSSL_KEY_GEN) - #define WOLFSSL_KEY_GEN -#endif -#else - #include - #include -#endif /* HAVE_FIPS && HAVE_FIPS_VERION 1 */ +#include +#include + #if defined(HAVE_FIPS) && \ defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2) #include diff --git a/wolfssl/wolfcrypt/sha.h b/wolfssl/wolfcrypt/sha.h index 339423ad9..2565b505c 100644 --- a/wolfssl/wolfcrypt/sha.h +++ b/wolfssl/wolfcrypt/sha.h @@ -36,18 +36,6 @@ #include #endif /* HAVE_FIPS_VERSION >= 2 */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) -#define wc_Sha Sha -#define WC_SHA SHA -#define WC_SHA_BLOCK_SIZE SHA_BLOCK_SIZE -#define WC_SHA_DIGEST_SIZE SHA_DIGEST_SIZE -#define WC_SHA_PAD_SIZE SHA_PAD_SIZE - -/* for fips @wc_fips */ -#include -#endif - #ifdef FREESCALE_LTC_SHA #include "fsl_ltc.h" #endif diff --git a/wolfssl/wolfcrypt/sha256.h b/wolfssl/wolfcrypt/sha256.h index 0920013d1..80c8e9c2b 100644 --- a/wolfssl/wolfcrypt/sha256.h +++ b/wolfssl/wolfcrypt/sha256.h @@ -37,26 +37,6 @@ #include #endif /* HAVE_FIPS_VERSION >= 2 */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - #define wc_Sha256 Sha256 - #define WC_SHA256 SHA256 - #define WC_SHA256_BLOCK_SIZE SHA256_BLOCK_SIZE - #define WC_SHA256_DIGEST_SIZE SHA256_DIGEST_SIZE - #define WC_SHA256_PAD_SIZE SHA256_PAD_SIZE - - #ifdef WOLFSSL_SHA224 - #define wc_Sha224 Sha224 - #define WC_SHA224 SHA224 - #define WC_SHA224_BLOCK_SIZE SHA224_BLOCK_SIZE - #define WC_SHA224_DIGEST_SIZE SHA224_DIGEST_SIZE - #define WC_SHA224_PAD_SIZE SHA224_PAD_SIZE - #endif - - /* for fips @wc_fips */ - #include -#endif - #ifdef FREESCALE_LTC_SHA #include "fsl_ltc.h" #endif diff --git a/wolfssl/wolfcrypt/sha512.h b/wolfssl/wolfcrypt/sha512.h index f8ae970b0..0d9c75bbb 100644 --- a/wolfssl/wolfcrypt/sha512.h +++ b/wolfssl/wolfcrypt/sha512.h @@ -37,33 +37,6 @@ #include #endif /* HAVE_FIPS_VERSION >= 2 */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - #ifdef WOLFSSL_SHA512 - #define wc_Sha512 Sha512 - #define WC_SHA512 SHA512 - #define WC_SHA512_BLOCK_SIZE SHA512_BLOCK_SIZE - #define WC_SHA512_DIGEST_SIZE SHA512_DIGEST_SIZE - #define WC_SHA512_PAD_SIZE SHA512_PAD_SIZE - #define wc_Sha512_224 Sha512_224 - #define wc_Sha512_256 Sha512_256 - #endif /* WOLFSSL_SHA512 */ - #ifdef WOLFSSL_SHA384 - #define wc_Sha384 Sha384 - #define WC_SHA384 SHA384 - #define WC_SHA384_BLOCK_SIZE SHA384_BLOCK_SIZE - #define WC_SHA384_DIGEST_SIZE SHA384_DIGEST_SIZE - #define WC_SHA384_PAD_SIZE SHA384_PAD_SIZE - #endif /* WOLFSSL_SHA384 */ - - #define CYASSL_SHA512 - #if defined(WOLFSSL_SHA384) - #define CYASSL_SHA384 - #endif - /* for fips @wc_fips */ - #include -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/wolfssl/wolfcrypt/visibility.h b/wolfssl/wolfcrypt/visibility.h index 68b9b76e4..6ee10dfc7 100644 --- a/wolfssl/wolfcrypt/visibility.h +++ b/wolfssl/wolfcrypt/visibility.h @@ -25,17 +25,6 @@ #ifndef WOLF_CRYPT_VISIBILITY_H #define WOLF_CRYPT_VISIBILITY_H - -/* for compatibility and so that fips is using same name of macro @wc_fips */ -/* The following visibility wrappers are for old FIPS. New FIPS should use - * the same as a non-FIPS build. */ -#if defined(HAVE_FIPS) && \ - (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2)) - #include - #define WOLFSSL_API CYASSL_API - #define WOLFSSL_LOCAL CYASSL_LOCAL -#else - /* WOLFSSL_API is used for the public API symbols. It either imports or exports (or does nothing for static builds) @@ -76,8 +65,6 @@ #endif #endif /* BUILDING_WOLFSSL */ -#endif /* HAVE_FIPS */ - /* WOLFSSL_ABI is used for public API symbols that must not change * their signature. This tag is used for all APIs that are a * part of the fixed ABI.