diff --git a/Makefile.am b/Makefile.am index 5def2496f..2cbb27616 100644 --- a/Makefile.am +++ b/Makefile.am @@ -79,11 +79,11 @@ include testsuite/include.am include tests/include.am include sslSniffer/sslSnifferTest/include.am include rpm/include.am -# TODO: fix, this commented out mqx ones have spaces in file names -#include mqx/wolfcrypt_test/Sources/include.am -include mqx/cyassl/include.am -#include mqx/cyassl_client/Sources/include.am include mqx/util_lib/Sources/include.am +include mqx/wolfcrypt_benchmark/Sources/include.am +include mqx/wolfcrypt_test/Sources/include.am +include mqx/wolfssl/include.am +include mqx/wolfssl_client/Sources/include.am include mplabx/include.am include mplabx/wolfcrypt_benchmark.X/nbproject/include.am include mplabx/wolfcrypt_test.X/nbproject/include.am diff --git a/configure.ac b/configure.ac index 4f3d875cf..e34baaf5a 100644 --- a/configure.ac +++ b/configure.ac @@ -643,6 +643,7 @@ AC_ARG_ENABLE([ecc25519], if test "$ENABLED_ECC25519" = "yes" then + ENABLED_FEMATH=yes AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC25519" fi @@ -650,7 +651,31 @@ fi AM_CONDITIONAL([BUILD_ECC25519], [test "x$ENABLED_ECC25519" = "xyes"]) -# FP ECC, Fixed Point cache ECC +# ED25519 +AC_ARG_ENABLE([ed25519], + [AS_HELP_STRING([--enable-ed25519],[Enable ED25519 (default: disabled)])], + [ ENABLED_ED25519=$enableval ], + [ ENABLED_ED25519=no ] + ) + + +if test "$ENABLED_ED25519" = "yes" +then + if test "$ENABLED_SHA512" = "no" + then + AC_MSG_ERROR([cannot enable ed25519 without enabling sha512.]) + fi + ENABLED_FEMATH=yes + ENABLED_GEMATH=yes + AM_CFLAGS="$AM_CFLAGS -DHAVE_ED25519" +fi + + +AM_CONDITIONAL([BUILD_ED25519], [test "x$ENABLED_ED25519" = "xyes"]) +AM_CONDITIONAL([BUILD_FEMATH], [test "x$ENABLED_FEMATH" = "xyes"]) +AM_CONDITIONAL([BUILD_GEMATH], [test "x$ENABLED_GEMATH" = "xyes"]) + +# FP ECC, Fixed Point cache ECC AC_ARG_ENABLE([fpecc], [ --enable-fpecc Enable Fixed Point cache ECC (default: disabled)], [ ENABLED_FPECC=$enableval ], @@ -1934,6 +1959,8 @@ echo " * RSA: $ENABLED_RSA" echo " * DSA: $ENABLED_DSA" echo " * DH: $ENABLED_DH" echo " * ECC: $ENABLED_ECC" +echo " * CURVE25519: $ENABLED_ECC25519" +echo " * ED25519: $ENABLED_ED25519" echo " * FPECC: $ENABLED_FPECC" echo " * ECC_ENCRYPT: $ENABLED_ECC_ENCRYPT" echo " * ASN: $ENABLED_ASN" diff --git a/cyassl/ctaocrypt/random.h b/cyassl/ctaocrypt/random.h index 9018da5af..6d3a96fea 100644 --- a/cyassl/ctaocrypt/random.h +++ b/cyassl/ctaocrypt/random.h @@ -28,9 +28,9 @@ #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 FreeRng wc_FreeRng #define RNG_HealthTest wc_RNG_HealthTest #endif /* HAVE_HASHDRBG || NO_RC4 */ diff --git a/mqx/README b/mqx/README index d99785373..55c13c671 100644 --- a/mqx/README +++ b/mqx/README @@ -1,4 +1,4 @@ -CyaSSL Freescale CodeWarrior Project Files +wolfSSL Freescale CodeWarrior Project Files This directory contains project files for Freescale CodeWarrior 10.6 with the Freescale GCC compiler. These project have been created to use MQX, RTCS, @@ -7,20 +7,22 @@ and MFS on the Freescale Kinetis K70 Tower System (TWRK70F120M). Included Project Files ----------------------- -1. CyaSSL library (/cyassl) +1. wolfSSL library (/wolfssl) - Prior to building this project, uncomment the FREESCALE_MQX define + Prior to building this project, uncomment the FREESCALE_MQX define located in: - /cyassl/ctaocrypt/settings.h + /wolfssl/wolfcrypt/settings.h 2. wolfCrypt Test App (/wolfcrypt_test) -3. Example CyaSSL Client (/cyassl_client) +3. wolfCrypt Benchmark App (/wolfcrypt_benchmark) + +3. Example wolfSSL Client (/wolfssl_client) 4. Utility library (/util_lib) - This library is used by the CyaSSL example client project and wolfCrypt + This library is used by the wolfSSL example client project and wolfCrypt test app project for opening/closing the SD card, etc. Importing into CodeWarrior Workspace @@ -32,10 +34,10 @@ these steps: 1. File -> Import 2. General -> Existing Projects into Workspace -3. Select Root Directory (browse to this "/mqx" directory) +3. Select Root Directory (browse to this "/mqx" directory) 4. Select desired projects -> Finish -Keep in mind that the projects above reference CyaSSL source files and header +Keep in mind that the projects above reference wolfSSL source files and header files with relative paths to the projects' current location in the -/mqx directory. +/mqx directory. diff --git a/mqx/cyassl_client/Sources/include.am b/mqx/cyassl_client/Sources/include.am deleted file mode 100644 index de5221e49..000000000 --- a/mqx/cyassl_client/Sources/include.am +++ /dev/null @@ -1,22 +0,0 @@ -# vim:ft=automake -# All paths should be given relative to the root -# - -EXTRA_DIST += \ - mqx/cyassl_client/.cproject \ - mqx/cyassl_client/.project \ - mqx/cyassl_client/K70FN1M0.mem \ - mqx/cyassl_client/init_kinetis.tcl \ - mqx/cyassl_client/mass_erase_kinetis.tcl \ - mqx/cyassl_client/ReferencedRSESystems.xml \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_DDRData_Debug_PnE U-MultiLink.launch \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_DDRData_Release_PnE U-MultiLink.launch \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_JTrace.jlink \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_JTrace.launch \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE U-MultiLink.launch \ - mqx/cyassl_client/cyassl_client_twrk70f120m_Int_Flash_SramData_Release_PnE U-MultiLink.launch - -EXTRA_DIST += \ - mqx/cyassl_client/Sources/main.c \ - mqx/cyassl_client/Sources/main.h - diff --git a/mqx/wolfcrypt_benchmark/.cproject b/mqx/wolfcrypt_benchmark/.cproject index 8c43e3c7e..d110e10ea 100755 --- a/mqx/wolfcrypt_benchmark/.cproject +++ b/mqx/wolfcrypt_benchmark/.cproject @@ -90,7 +90,7 @@ - +