From e01723a43537213c71e42e7469c3224108468d83 Mon Sep 17 00:00:00 2001 From: jrblixt Date: Tue, 26 Feb 2019 09:29:39 -0700 Subject: [PATCH] Code review changes. --- IDE/WICED-STUDIO/README | 44 +++++++++---------- IDE/WICED-STUDIO/wolfssl_lib.mk | 75 --------------------------------- wolfssl/wolfcrypt/settings.h | 7 ++- 3 files changed, 25 insertions(+), 101 deletions(-) delete mode 100644 IDE/WICED-STUDIO/wolfssl_lib.mk diff --git a/IDE/WICED-STUDIO/README b/IDE/WICED-STUDIO/README index 3d9613be6..35c2f5d77 100644 --- a/IDE/WICED-STUDIO/README +++ b/IDE/WICED-STUDIO/README @@ -1,44 +1,44 @@ -The wolfSSL examples in the WICED SDK require a server application. wolfSSL +The wolfSSL examples in the WICED SDK require a server or client application. wolfSSL provides an easy solution in the /examples/ directory. Run the autogen script and configure the library with necessary functionality, see ./configure -h for a list of configure options. Finally, run make and make check to ensure the -library build was successfull. You can install wolfSSL on your system with make +build was successfull. You can install wolfSSL on your system with make install if you wish. See www.wolfssl.com/docs/ for more information. -Run ./examples/server/server -h for a list of server options. If you would like -to test the server, you may run the client against it using your localhost. An -example of how to run the server: - ./examples/server/server -b -d -r -p 50007 +Run ./examples/server/server -h for a list of server options or +./examples/client/client -h for client options. If you would like +to test the server or client, you may run them on localhost. Instructions on +running the client or server can be found in the snip code examles. The snips are +meant to be a starting off point for your applications. Download and install WICED Studio from the Cypress website. -The necessary files are located in the /IDE/WICED-STUDIO/ directory. -These files will be described in the following setup proceedure to get you started -with any TLS project. +In the /IDE/WICED-STUDIO/ directory, you will find the library file +user_settings.h which should be copied to . This is your wolfSSL +configuration file. Please see www.wolfssl.com/docs/ for detailed instructions on +how to use the configure options. Once you have installed the WICED software: 1. Create a directory called 'wolfssl_lib.' The path should be: - 43xxx_Wi-Fi/WICED/security/BESL/wolfssl_lib. - 3. Drop in or link the wolfSSL library into the wolfssl_lib directory you - just created. + 43xxx_Wi-Fi/WICED/security/BESL/wolfssl_lib. + 3. Drop in the wolfssl_lib directory you just created. 4. The user_settings.h file in the IDE/WICED-STUDIO/ directory should be place at . This file provides the configure options for compiling - wolfSSL with your project. The default values will give you a starting point + wolfSSL with your project. The default values will give you a starting point and you may further configure the library. - 5. The wolfssl_lib.mk should be placed at the same level as the wolfSSL - library within wolfssl_lib. The directory structure should be - WICED/security/BESL/wolfssl_lib/ and - WICED/security/BESL/wolfssl_lib/wolfssl_lib.mk. - 6. Apply the patches: git apply --ignore-space-change - --ignore-whitespace mychanges.patch - + 5. Apply the patch: + git apply --ignore-space-change --ignore-whitespace mychanges.patch + You can now build and use the wolfSSL and wolfCrypt snips within the WICED SDK. Cypress includes great documentation and getting started videos to learn how to build and run the snips. -wolfSSL provides a wolfCrypt test application, a TLS client and server application, +wolfSSL provides a wolfCrypt test application, a TLS client and server application, and an HTTPS client application. Future development and additions will be made. +Support for TLS 1.3 is available in the provided snippet and is the most current +TLS version. + Further instructions and documentation can be found on the wolfSSL website at www.wolfssl.com or visit us on our forums at www.wolfssl.com/forums/. - + diff --git a/IDE/WICED-STUDIO/wolfssl_lib.mk b/IDE/WICED-STUDIO/wolfssl_lib.mk deleted file mode 100644 index 37985926f..000000000 --- a/IDE/WICED-STUDIO/wolfssl_lib.mk +++ /dev/null @@ -1,75 +0,0 @@ - # Copyright (C) 2006-2017 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 - - - -NAME := wolfSSL - -$(NAME)_SOURCES += wolfssl/src/internal.c \ - wolfssl/src/keys.c \ - wolfssl/src/ssl.c \ - wolfssl/src/tls.c \ - wolfssl/src/wolfio.c \ - wolfssl/wolfcrypt/src/aes.c \ - wolfssl/wolfcrypt/src/asn.c \ - wolfssl/wolfcrypt/src/chacha.c \ - wolfssl/wolfcrypt/src/chacha20_poly1305.c \ - wolfssl/wolfcrypt/src/coding.c \ - wolfssl/wolfcrypt/src/cpuid.c \ - wolfssl/wolfcrypt/src/cmac.c \ - wolfssl/wolfcrypt/src/des3.c \ - wolfssl/wolfcrypt/src/dh.c \ - wolfssl/wolfcrypt/src/ecc.c \ - wolfssl/wolfcrypt/src/error.c \ - wolfssl/wolfcrypt/src/hash.c \ - wolfssl/wolfcrypt/src/hmac.c \ - wolfssl/wolfcrypt/src/logging.c \ - wolfssl/wolfcrypt/src/md4.c \ - wolfssl/wolfcrypt/src/md5.c \ - wolfssl/wolfcrypt/src/memory.c \ - wolfssl/wolfcrypt/src/poly1305.c \ - wolfssl/wolfcrypt/src/random.c \ - wolfssl/wolfcrypt/src/rsa.c \ - wolfssl/wolfcrypt/src/sha.c \ - wolfssl/wolfcrypt/src/sha256.c \ - wolfssl/wolfcrypt/src/sha3.c \ - wolfssl/wolfcrypt/src/sha512.c \ - wolfssl/wolfcrypt/src/signature.c \ - wolfssl/wolfcrypt/src/tfm.c \ - wolfssl/wolfcrypt/src/wc_encrypt.c \ - wolfssl/wolfcrypt/src/wc_port.c \ - wolfssl/wolfcrypt/src/wolfmath.c \ - wolfssl/wolfcrypt/test/test.c \ - wolfssl/wolfcrypt/src/ripemd.c \ - wolfssl/wolfcrypt/src/dsa.c \ - wolfssl/wolfcrypt/src/arc4.c \ - wolfssl/wolfcrypt/src/rabbit.c \ - wolfssl/wolfcrypt/src/curve25519.c \ - wolfssl/wolfcrypt/src/ed25519.c \ - wolfssl/wolfcrypt/benchmark/benchmark.c \ - wolfssl/src/tls13.c - -GLOBAL_INCLUDES += wolfssl \ - user_settings_folder \ - - -GLOBAL_DEFINES += WOLFSSL_WICED_PSEUDO_UNIX_EPOCH_TIME=$(shell $(PERL) -e "print time()") \ - WOLFSSL_USER_SETTINGS - - -GLOBAL_CFLAGS += -g1 diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 7a0d84e8a..aae18c794 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -172,10 +172,9 @@ /* Uncomment next line if building for using XILINX */ /* #define WOLFSSL_XILINX */ -/* Uncomment the next three lines when using WICED Studio. */ - /* #ifndef WOLFSSL_WICED - #define WOLFSSL_WICED - #endif */ +/* Uncomment next line if building for WICED Studio. */ +/* #define WOLFSSL_WICED */ + /* Uncomment next line if building for Nucleus 1.2 */ /* #define WOLFSSL_NUCLEUS_1_2 */