diff --git a/.github/workflows/arduino.yml b/.github/workflows/arduino.yml new file mode 100644 index 000000000..4abe52061 --- /dev/null +++ b/.github/workflows/arduino.yml @@ -0,0 +1,325 @@ +name: Arduino CI Build (1 of 4) wolfssl + +# +# Test fetches wolfssl-examples/Arduino and uses local, latest github master branch wolfssl +# +# These 4 workflows across 3 repos are interdependent for the current $REPO_OWNER: +# +# THIS Arduino CI Build 1: https://github.com/$REPO_OWNER/wolfssl # /.github/workflows/arduino.yml +# - Builds Arduino library from local clone of wolfssl master branch +# - Fetches examples from https://github.com/$REPO_OWNER/wolfssl-examples +# +# Arduino CI Build 2: https://github.com/$REPO_OWNER/wolfssl-examples # /.github/workflows/arduino-release.yml +# - Tests examples based on latest published release of Arduino library, NOT latest on wolfssl github. +# - Should be identical to Arduino CI Build 3 in every way but wolfssl install. +# - Copies only compile script from wolfssl-examples +# - Builds local examples +# - No other repos used +# +# Arduino CI Build 3: https://github.com/$REPO_OWNER/wolfssl-examples # /.github/workflows/arduino.yml +# - Fetches current wolfSSL from https://github.com/$REPO_OWNER/wolfssl +# - Creates an updated Arduino library +# - Compiles local examples +# - Contains the source of `compile-all-examples.sh` and respective board-list.txt +# +# Arduino CI Build 4: https://github.com/$REPO_OWNER/Arduino-wolfssl # /.github/workflows/arduino.yml +# - Assembles and installs an updated Arduino wolfssl library from LOCAL wolfssl master source +# - Copies only compile script copied from wolfssl-examples +# - Builds local examples +# - No other repos used +# +# +# ** NOTE TO MAINTAINERS ** +# +# Consider using winmerge or similar tool to keep the 4 arduino[-release].yml files in relative sync. +# Although there are some specific differences, most of the contents are otherwise identical. +# +# See https://github.com/wolfSSL/Arduino-wolfSSL +# +# To test locally: +# cd [your WOLFSSL_ROOT], e.g. cd /mnt/c/workspace/wolfssl-$USER +# [optional checkout] e.g. git checkout tags/v5.8.2-stable +# pushd ./IDE/ARDUINO +# export ARDUINO_ROOT="$HOME/Arduino/libraries" +# ./wolfssl-arduino.sh INSTALL +# cd [your WOLFSSL_EXAMPLES_ROOT] e.g. /mnt/c/workspace/wolfssl-examples-$USER +# + +# START OF COMMON SECTION +on: + push: + branches: [ '**', 'master', 'main', 'release/**' ] + paths: + - '.github/workflows/arduino.yml' + - 'IDE/ARDUINO/**' + - 'src/**' + - 'wolfcrypt/**' + - 'wolfssl/**' + pull_request: + branches: [ '**' ] + paths: + - 'github/workflows/arduino.yml' + - 'IDE/ARDUINO/**' + - 'src/**' + - 'wolfcrypt/**' + - 'wolfssl/**' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +# END OF COMMON SECTION + +jobs: + build: + if: github.repository_owner == 'wolfssl' + runs-on: ubuntu-latest + env: + REPO_OWNER: ${{ github.repository_owner }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Arduino CLI + run: | + # Script to fetch and run install.sh from arduino/arduino-cli + + # The install script will test to see if the recently installed apps in in the path + # So set it up in advance: + mkdir -p "${PWD}/bin" + echo "${PWD}/bin" >> $GITHUB_PATH + + # Sets the install directory to a consistent path at the repo root. + ROOT_BIN="$GITHUB_WORKSPACE/bin" + + # Ensures that BINDIR exists before the installer runs + mkdir -p "$ROOT_BIN" + + # Save as a lobal environment variable + echo "$ROOT_BIN" >> "$GITHUB_PATH" + + # Download and run install script from Arduino: + # -S show errors; -L follow redirects; -v Verbose + set +e # don't abort on error + set -o pipefail + + curl -vSL --retry 5 --retry-delay 10 \ + https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh \ + | sh -x + rc=$? + c_rc=${PIPESTATUS[0]} # curl's exit code + s_rc=${PIPESTATUS[1]} # sh's exit code + + set -e # restore default abort-on-error + + # If there was a curl error, we have our own local copy that is more reliable and can add our own debugging + if [ "$rc" -ne 0 ]; then + echo "Primary install failed: curl=$c_rc, sh=$s_rc. Falling back..." >&2 + echo "Using local copy of arduino_install.sh" + pushd ./Arduino/sketches + chmod +x ./arduino_install.sh + + # Mimic curl install, does not use current directory: + BINDIR="$ROOT_BIN" sh -x ./arduino_install.sh + popd + else + echo "Alternative install script not needed." + fi + + - name: Confirm Arduino CLI install + run: arduino-cli version + + - name: Setup Arduino CLI + run: | + arduino-cli config init + arduino-cli core update-index + arduino-cli config add board_manager.additional_urls https://www.pjrc.com/teensy/package_teensy_index.json + arduino-cli core update-index + arduino-cli config add board_manager.additional_urls https://arduino.esp8266.com/stable/package_esp8266com_index.json + arduino-cli core update-index + arduino-cli core install esp32:esp32 # ESP32 + arduino-cli core install arduino:avr # Arduino Uno, Mega, Nano + arduino-cli core install arduino:sam # Arduino Due + arduino-cli core install arduino:samd # Arduino Zero + arduino-cli core install teensy:avr # PJRC Teensy + arduino-cli core install esp8266:esp8266 # ESP8266 + arduino-cli core install arduino:mbed_nano # nanorp2040connect + arduino-cli core install arduino:mbed_portenta # portenta_h7_m7 + arduino-cli core install arduino:mbed_edge + # sudo "/home/$USER/.arduino15/packages/arduino/hardware/mbed_nano/4.2.4/post_install.sh" + arduino-cli core install arduino:renesas_uno + arduino-cli lib install "ArduinoJson" # Example dependency + arduino-cli lib install "WiFiNINA" # ARDUINO_SAMD_NANO_33_IOT + arduino-cli lib install "Ethernet" # Install Ethernet library + arduino-cli lib install "Bridge" # Pseudo-network for things like arduino:samd:tian + + - name: Set job environment variables + run: | + # Script to assign some common environment variables after everything is installed + + ICON_OK=$(printf "\xE2\x9C\x85") + ICON_FAIL=$(printf "\xE2\x9D\x8C") + + echo "GITHUB_WORK=$(realpath "$GITHUB_WORKSPACE/../..")" >> "$GITHUB_ENV" + echo "ARDUINO_ROOT=$(realpath "$HOME/Arduino/libraries")" >> "$GITHUB_ENV" + + # Show predefined summary: + echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE" + + # Show assigned build:env values (e.g. "wolfssl", "gojimmpi" or other owners): + echo "REPO_OWNER = $REPO_OWNER" + + echo "GITHUB_ENV=$GITHUB_ENV" + + # Show our custom values: + echo "GITHUB_WORK = $GITHUB_WORK" + echo "ARDUINO_ROOT = $ARDUINO_ROOT" + + # WOLFSSL_EXAMPLES_ROOT is the repo root, not example location + echo "WOLFSSL_EXAMPLES_ROOT = $WOLFSSL_EXAMPLES_ROOT" + + - name: Get wolfssl-examples + run: | + # Fetch Arduino examples from the wolfssl-examples repo + echo "Start pwd:" + pwd + # we're typically in $GITHUB_WORKSPACE=/home/runner/work/wolfssl/wolfssl + # goto /home/runner/work to fetch wolfssl-examples + + echo "Current pwd for wolfssl-examples clone fetch: $(pwd)" + GITHUB_WORK=$(realpath "$GITHUB_WORKSPACE/../..") + echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" + + # Typically /home/runner/work + echo "GITHUB_WORK=$GITHUB_WORK" + + pushd "$GITHUB_WORK" + echo "Updated pwd for wolfssl-examples clone fetch: $(pwd)" + + git clone --depth 1 https://github.com/$REPO_OWNER/wolfssl-examples.git wolfssl-examples-publish + + cd ./wolfssl-examples-publish + echo "WOLFSSL_EXAMPLES_ROOT=$(pwd)" + + echo "Path for wolfssl-examples-publish: $(pwd)" + popd # GITHUB_WORK + + + # ** END ** Get wolfssl-examples + + - name: Install wolfSSL Arduino library + run: | + # Run the local wolfssl-arduino.sh install script to install wolfssl Arduino library. + + # Methods of installing Arduino library: + # 1) arduino-cli lib install "wolfSSL" + # 2) manual copy of files (typical of the Arduino-wolfssl repo) + # 3) run ./wolfssl-arduino.sh INSTALL (typical of the wolfssl repo) + + echo "Current pwd for wolfssl-examples clone fetch: $(pwd)" + GITHUB_WORK=$(realpath "$GITHUB_WORKSPACE/../..") + echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" + + # Typically /home/runner/work + echo "GITHUB_WORK=$GITHUB_WORK" + pwd + pushd ./IDE/ARDUINO + + # Set default ARDUINO_ROOT to Arduino library. + export ARDUINO_ROOT="$HOME/Arduino/libraries" + export WOLFSSL_EXAMPLES_ROOT="$GITHUB_WORK/wolfssl-examples-publish" + + echo "ARDUINO_ROOT: $WOLFSSL_EXAMPLES_ROOT" + echo "WOLFSSL_EXAMPLES_ROOT: $WOLFSSL_EXAMPLES_ROOT" + + bash ./wolfssl-arduino.sh INSTALL # Install wolfSSL library + popd + + # ** END ** Install wolfSSL Arduino library + + - name: List installed Arduino libraries + run: arduino-cli lib list + + - name: Get compile-all-examples.sh + run: | + # Fetch compile script FROM THE CURRENT OWNER. + # This repo is Arduino-wolfssl; we'll fetch the script from the wolfssl-examples for the same repository owner. + echo "Repository owner: $REPO_OWNER" + echo "Current directory: $PWD" + echo "Current pwd for wolfssl-examples clone fetch: $PWD" + WOLFSSL_EXAMPLES_DIRECTORY="$ARDUINO_ROOT/wolfssl/examples" + THIS_BOARD_LIST="board_list.txt" + echo "WOLFSSL_EXAMPLES_DIRECTORY=$WOLFSSL_EXAMPLES_DIRECTORY" + + # Fetch script and board list into WOLFSSL_EXAMPLES_DIRECTORY + echo "Fetching board_list.txt from REPO_OWNER=$REPO_OWNER" + curl -L "https://raw.githubusercontent.com/$REPO_OWNER/wolfssl-examples/master/Arduino/sketches/board_list.txt" -o "$WOLFSSL_EXAMPLES_DIRECTORY/$THIS_BOARD_LIST" + + # Check if the first line is "404: Not Found" - which would indicate the curl path above is bad. + FILE="$WOLFSSL_EXAMPLES_DIRECTORY/board_list.txt" + + # Ensure the file exists + if [[ ! -f "$FILE" ]]; then + echo "File not found: $FILE" + exit 1 + fi + + # Check if the first line is "404: Not Found" + if [[ $(head -n 1 "$FILE") == "404: Not Found" ]]; then + echo "The first line is '404: Not Found'" + exit 1 + fi + + # Fetch the compile script from repo: https://github.com/[$USER]/wolfssl-examples/ + echo "Fetching compile-all-examples.sh from REPO_OWNER=$REPO_OWNER" + curl -L "https://raw.githubusercontent.com/$REPO_OWNER/wolfssl-examples/master/Arduino/sketches/compile-all-examples.sh" -o "$WOLFSSL_EXAMPLES_DIRECTORY/compile-all-examples.sh" + + # Check if the first line is "404: Not Found" - which would indicate the curl path above is bad. + FILE="$WOLFSSL_EXAMPLES_DIRECTORY/compile-all-examples.sh" + + # Ensure the file exists + if [[ ! -f "$FILE" ]]; then + echo "File not found: $FILE" + exit 1 + fi + + # Check if the first line is "404: Not Found" + if [[ $(head -n 1 "$FILE") == "404: Not Found" ]]; then + echo "The first line is '404: Not Found'" + exit 1 + fi + + pushd "$WOLFSSL_EXAMPLES_DIRECTORY" + echo "Current directory: $PWD" + + echo "Current directory $PWD" + echo "Contents:" + ls -al + find ./ -type f | sort + + # ensure we can execute the script here (permissions lost during curl fetch) + chmod +x ./compile-all-examples.sh + echo "Found compile script: $(ls -al ./compile-all-examples.sh ./$THIS_BOARD_LIST)" + popd + + # ** END ** Get compile-all-examples.sh + + # This will fail with Arduino published wolfSSL v5.7.6 and older + # as the examples moved. See https://github.com/wolfSSL/wolfssl/pull/8514 + # + - name: Compile Arduino Sketches for Various Boards + run: | + # Call the compile-all-examples.sh script to compile all the examples for each of the fqbn names in the local copy of board_list.txt + + echo "Current directory: $PWD" + echo "ARDUINO_ROOT: $ARDUINO_ROOT" + WOLFSSL_EXAMPLES_DIRECTORY="$ARDUINO_ROOT/wolfssl/examples" + echo "WOLFSSL_EXAMPLES_DIRECTORY: $WOLFSSL_EXAMPLES_DIRECTORY" + + echo "Change directory to Arduino examples..." + pushd "$WOLFSSL_EXAMPLES_DIRECTORY" + echo "Current directory: $PWD" + echo "Calling ./compile-all-examples.sh" + bash ./compile-all-examples.sh + popd + # End Compile Arduino Sketches for Various Boards diff --git a/.github/workflows/haproxy.yml b/.github/workflows/haproxy.yml index fa1ac5bef..99db830f9 100644 --- a/.github/workflows/haproxy.yml +++ b/.github/workflows/haproxy.yml @@ -47,7 +47,7 @@ jobs: strategy: fail-fast: false matrix: - haproxy_ref: [ 'v3.1.0' ] + haproxy_ref: [ 'v3.1.0', 'v3.2.0'] steps: - name: Install test dependencies run: | @@ -82,6 +82,13 @@ jobs: working-directory: build-dir/haproxy-${{matrix.haproxy_ref}} run: make clean && make TARGET=linux-glibc USE_OPENSSL_WOLFSSL=1 SSL_LIB=$GITHUB_WORKSPACE/build-dir/lib SSL_INC=$GITHUB_WORKSPACE/build-dir/include ADDLIB=-Wl,-rpath,$GITHUB_WORKSPACE/build-dir/lib CFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address" + # wlallemand/VTest used in v3.1.0 is no longer available + - name: Patch build-vtest.sh for v3.1.0 + if: matrix.haproxy_ref == 'v3.1.0' + working-directory: build-dir/haproxy-${{ matrix.haproxy_ref }}/scripts + run: | + sed -i 's|https://github.com/wlallemand/VTest/archive/refs/heads/haproxy-sd_notify.tar.gz|https://github.com/vtest/VTest2/archive/main.tar.gz|' build-vtest.sh + - name: Build haproxy vtest working-directory: build-dir/haproxy-${{matrix.haproxy_ref}} run: ./scripts/build-vtest.sh diff --git a/.github/workflows/hostap-vm.yml b/.github/workflows/hostap-vm.yml index 43f114af3..77f7007c3 100644 --- a/.github/workflows/hostap-vm.yml +++ b/.github/workflows/hostap-vm.yml @@ -79,6 +79,7 @@ jobs: lookup-only: true - name: Checkout hostap + if: steps.cache.outputs.cache-hit != 'true' run: git clone git://w1.fi/hostap.git hostap build_uml_linux: @@ -176,9 +177,6 @@ jobs: key: hostap-linux-${{ env.LINUX_REF }} fail-on-cache-miss: true - - name: show file structure - run: tree - # No way to view the full strategy in the browser (really weird) - name: Print strategy run: | @@ -232,7 +230,12 @@ jobs: - name: Update certs working-directory: hostap/tests/hwsim/auth_serv - run: ./update.sh + run: | + ./update.sh + # Force regeneration of rsa3072-ca.key to get rsa3072-generate.sh to + # correctly update all the certs + rm rsa3072-ca.key + ./rsa3072-generate.sh - if: ${{ matrix.config.osp_ref }} name: Checkout OSP diff --git a/.github/workflows/libssh2.yml b/.github/workflows/libssh2.yml index 29db70f0e..719347d28 100644 --- a/.github/workflows/libssh2.yml +++ b/.github/workflows/libssh2.yml @@ -76,11 +76,11 @@ jobs: - name: Update libssh2 test to use a stable version of debian working-directory: libssh2 run: | - sed -i 's/testing-slim/stable-slim/' tests/openssh_server/Dockerfile + sed -i 's/testing-slim/oldstable-slim/' tests/openssh_server/Dockerfile - name: Run libssh2 tests working-directory: libssh2 - run: make check + run: make -j check - name: Confirm libssh2 built with wolfSSL run: ldd libssh2/src/.libs/libssh2.so | grep wolfssl diff --git a/.github/workflows/linuxkm.yml b/.github/workflows/linuxkm.yml new file mode 100644 index 000000000..334fd7a1a --- /dev/null +++ b/.github/workflows/linuxkm.yml @@ -0,0 +1,54 @@ +name: Kernel Module Build + +# START OF COMMON SECTION +on: + push: + branches: [ 'master', 'main', 'release/**' ] + pull_request: + branches: [ '*' ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +# END OF COMMON SECTION + +jobs: + build_library: + strategy: + matrix: + config: [ + 'EXTRA_CPPFLAGS=-Werror --enable-option-checking=fatal --enable-linuxkm --enable-linuxkm-lkcapi-register=all --enable-all --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-experimental --enable-dual-alg-certs --disable-qt --disable-quic --with-sys-crypto-policy=no --disable-opensslextra --disable-testcert --enable-intelasm --disable-sp-asm --enable-crypttests --enable-linuxkm-benchmarks CFLAGS="-DWOLFSSL_LINUXKM_VERBOSE_DEBUG -Wframe-larger-than=2048 -Wstack-usage=4096 -DBENCH_EMBEDDED -DBENCH_MIN_RUNTIME_SEC=0.01 -DBENCH_NTIMES=1 -DBENCH_AGREETIMES=1" --with-max-rsa-bits=16384', + 'EXTRA_CPPFLAGS=-Werror --enable-option-checking=fatal --enable-linuxkm --enable-linuxkm-pie --enable-reproducible-build --enable-linuxkm-lkcapi-register=all --enable-all-crypto --enable-cryptonly --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-experimental --disable-qt --disable-quic --with-sys-crypto-policy=no --disable-opensslextra --disable-testcert --enable-intelasm --disable-sp-asm --enable-crypttests --enable-linuxkm-benchmarks CFLAGS="-DWOLFSSL_LINUXKM_VERBOSE_DEBUG -Wframe-larger-than=2048 -Wstack-usage=4096 -DBENCH_EMBEDDED -DBENCH_MIN_RUNTIME_SEC=0.01 -DBENCH_NTIMES=1 -DBENCH_AGREETIMES=1" --with-max-rsa-bits=16384' + ] + name: build module + if: github.repository_owner == 'wolfssl' + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + name: Checkout wolfSSL + + - name: Prepare target kernel for module builds + run: | + echo "updating linux-headers" + sudo apt-get update || $(exit 2) + sudo apt-get install linux-headers-$(uname -r) -y || $(exit 3) + echo "preparing target kernel $(uname -r)" + pushd "/lib/modules/$(uname -r)/build" || $(exit 4) + if [ -f /proc/config.gz ]; then gzip -dc /proc/config.gz > /tmp/.config && sudo mv /tmp/.config . || $(exit 5); elif [ -f "/boot/config-$(uname -r)" ]; then sudo cp -p "/boot/config-$(uname -r)" .config || $(exit 6); fi + sudo make -j 4 oldconfig || $(exit 7) + sudo make M="$(pwd)" modules_prepare || $(exit 8) + popd >/dev/null + + - name: autogen.sh + run: | + ./autogen.sh || $(exit 9) + + - name: Build libwolfssl.ko, targeting GitHub ubuntu-latest, with --enable-all, PQC, and smallstack and stack depth warnings + run: | + echo "running ./configure --with-linux-source=/lib/modules/$(uname -r)/build ${{ matrix.config }}" + ./configure --with-linux-source=/lib/modules/$(uname -r)/build ${{ matrix.config }} || $(exit 10) + # try to remove profiling (-pg) because it leads to "_mcleanup: gmon.out: Permission denied" + make -j 4 KERNEL_EXTRA_CFLAGS_REMOVE=-pg FORCE_NO_MODULE_SIG=1 || $(exit 11) + ls -l linuxkm/libwolfssl.ko || $(exit 12) + echo "Successful linuxkm build." diff --git a/.github/workflows/macos-apple-native-cert-validation.yml b/.github/workflows/macos-apple-native-cert-validation.yml index c8b161dbe..045686a14 100644 --- a/.github/workflows/macos-apple-native-cert-validation.yml +++ b/.github/workflows/macos-apple-native-cert-validation.yml @@ -14,8 +14,7 @@ concurrency: jobs: make_check: - strategy: - fail-fast: false + if: github.repository_owner == 'wolfssl' runs-on: macos-latest # This should be a safe limit for the tests to run. timeout-minutes: 5 diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 52a76de02..81f071ccf 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -57,7 +57,10 @@ jobs: '--enable-opensslextra=x509small', 'CPPFLAGS=''-DWOLFSSL_EXTRA'' ', '--enable-lms=small,verify-only --enable-xmss=small,verify-only', - '--disable-sys-ca-certs' + '--disable-sys-ca-certs', + '--enable-all CPPFLAGS=-DWOLFSSL_DEBUG_CERTS ', + '--enable-all CFLAGS="-DWOLFSSL_CHECK_MEM_ZERO"', + '--enable-coding=no', ] name: make check if: github.repository_owner == 'wolfssl' diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index e498e33af..2b78fc8f9 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -45,8 +45,8 @@ jobs: - name: Confirm packages built run: | DEB_COUNT=$(find -name 'libwolfssl*.deb' | wc -l) - if [ "$DEB_COUNT" != "2" ]; then - echo Did not find exactly two deb packages!!! + if [ "$DEB_COUNT" != "3" ]; then + echo Did not find exactly three deb packages!!! exit 1 fi # disabled 20240919 -- broken target. diff --git a/.github/workflows/pq-all.yml b/.github/workflows/pq-all.yml index 70fc7dda9..fc32344f6 100644 --- a/.github/workflows/pq-all.yml +++ b/.github/workflows/pq-all.yml @@ -21,7 +21,7 @@ jobs: '--enable-intelasm --enable-sp-asm --enable-mlkem=yes,kyber,ml-kem CPPFLAGS="-DWOLFSSL_ML_KEM_USE_OLD_IDS"', '--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"', '--enable-smallstack --enable-smallstackcache --enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"', - '--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" CC=c++' + '--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" CC=c++' ] name: make check if: github.repository_owner == 'wolfssl' diff --git a/.github/workflows/rust-wrapper.yml b/.github/workflows/rust-wrapper.yml new file mode 100644 index 000000000..de923792c --- /dev/null +++ b/.github/workflows/rust-wrapper.yml @@ -0,0 +1,33 @@ +name: Build Rust Wrapper + +# START OF COMMON SECTION +on: + push: + branches: [ 'master', 'main', 'release/**' ] + pull_request: + branches: [ '*' ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +# END OF COMMON SECTION + +jobs: + build_wolfssl: + name: Build wolfSSL Rust Wrapper + if: github.repository_owner == 'wolfssl' + runs-on: ubuntu-24.04 + # This should be a safe limit for the tests to run. + timeout-minutes: 10 + steps: + - name: Build wolfSSL + uses: wolfSSL/actions-build-autotools-project@v1 + with: + path: wolfssl + configure: --enable-all + - name: Build Rust Wrapper + working-directory: wolfssl + run: make -C wrapper/rust + - name: Run Rust Wrapper Tests + working-directory: wolfssl + run: make -C wrapper/rust test diff --git a/.github/workflows/threadx.yml b/.github/workflows/threadx.yml new file mode 100644 index 000000000..f93cea9c1 --- /dev/null +++ b/.github/workflows/threadx.yml @@ -0,0 +1,57 @@ +name: ThreadXBuild Test + +on: + push: + branches: [ 'master', 'main', 'release/**' ] + pull_request: + branches: [ '*' ] + +jobs: + build: + + runs-on: ubuntu-22.04 + timeout-minutes: 10 + + steps: + - name: Cache NetXDuo bundle + id: cache-netxduo + uses: actions/cache@v3 + with: + path: ./v6.4.3_rel.tar.gz + key: netxduo-bundle-v6.4.3_rel + + - name: Download NetXDuo bundle if not cached + if: steps.cache-netxduo.outputs.cache-hit != 'true' + run: | + wget https://github.com/eclipse-threadx/netxduo/archive/refs/tags/v6.4.3_rel.tar.gz + + - name: Extract NetXDuo bundle + run: | + mkdir -p netxduo_src + tar -xzf v6.4.3_rel.tar.gz -C netxduo_src --strip-components=1 + + - name: Install NetXDuo Dependencies + working-directory: ./netxduo_src + run: | + ./scripts/install.sh + + - name: Configure NetX with DNS Client Support + working-directory: ./netxduo_src + run: | + cp addons/dns/nxd_dns.h ./common/inc/ + cp addons/dns/nxd_dns.c ./common/src/ + + - name: Build NetXDuo with DNS Support + working-directory: ./netxduo_src + run: | + rm -rf test/cmake/threadx + rm -rf test/cmake/filex + ./scripts/build_nxd64.sh + + - name: Build wolfSSL + uses: wolfSSL/actions-build-autotools-project@v1 + with: + path: wolfssl + configure: --enable-enckeys --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-DTHREADX -DHAVE_NETX -DWOLFSSL_USER_IO -I${{ github.workspace }}/netxduo_src/common/inc -I${{ github.workspace }}/netxduo_src/ports/linux/gnu/inc -I${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/libs/inc" LDFLAGS="-L${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/default_build_coverage/netxduo -L${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/libs/threadx" LIBS="-lnetxduo -lthreadx" + install: false + diff --git a/.github/workflows/watcomc.yml b/.github/workflows/watcomc.yml index ea1af5704..df2ba9bb1 100644 --- a/.github/workflows/watcomc.yml +++ b/.github/workflows/watcomc.yml @@ -62,6 +62,9 @@ jobs: uses: open-watcom/setup-watcom@v0 with: version: ${{ matrix.platform.owimage }} + tag: 2025-09-01-Build + # Currently fixed to this build because of latest compiler error: + # file clbrdll.lib(fltuse80): undefined symbol _SetLD80bit_ - name: Checkout wolfSSL uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index f5544aa79..2b91e077e 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ aclocal.m4 aminclude.am lt*.m4 Makefile.in -Makefile +/Makefile depcomp missing libtool @@ -449,6 +449,7 @@ MagicCrypto # debian packaging debian/changelog debian/control +debian/rules *.deb # Ada/Alire files @@ -457,6 +458,9 @@ wrapper/Ada/config/ wrapper/Ada/lib/ wrapper/Ada/obj/ +# Rust wrapper files +/wrapper/rust/*/target/ + # PlatformIO /**/.pio /**/.vscode/.browse.c_cpp.db* diff --git a/.wolfssl_known_macro_extras b/.wolfssl_known_macro_extras index 6fc24e6f7..fd5bd6ca4 100644 --- a/.wolfssl_known_macro_extras +++ b/.wolfssl_known_macro_extras @@ -2,6 +2,7 @@ AES_GCM_GMULT_NCT AFX_RESOURCE_DLL AFX_TARG_ENU ALLOW_BINARY_MISMATCH_INTROSPECTION +ALLOW_SELFSIGNED_INVALID_CERTSIGN ALLOW_V1_EXTENSIONS ANDROID APP_ESP_HTTP_CLIENT @@ -16,9 +17,14 @@ ARDUINO_ARCH_NRF52 ARDUINO_ARCH_RP2040 ARDUINO_ARCH_SAMD ARDUINO_ARCH_STM32 +ARDUINO_AVR_ETHERNET +ARDUINO_AVR_LEONARDO_ETH +ARDUINO_SAMD_MKR1000 ARDUINO_SAMD_NANO_33_IOT +ARDUINO_SAMD_ZERO ARDUINO_SAM_DUE ARDUINO_SEEED_XIAO +ARDUINO_TEENSY40 ARDUINO_TEENSY41 ASN_DUMP_OID ASN_TEMPLATE_SKIP_ISCA_CHECK @@ -127,6 +133,7 @@ CONFIG_POSIX_API CONFIG_POSIX_THREADS CONFIG_PREEMPT_COUNT CONFIG_PTHREAD_IPC +CONFIG_SCHED_INFO CONFIG_SMP CONFIG_SNTP_TIME_SYNC_METHOD_SMOOTH CONFIG_TIMER_TASK_STACK_DEPTH @@ -193,6 +200,10 @@ DILITHIUM_MUL_QINV_SLOW DILITHIUM_MUL_Q_SLOW DILITHIUM_MUL_SLOW DILITHIUM_USE_HINT_CT +DONT_HAVE_KVMALLOC +DONT_HAVE_KVREALLOC +DONT_USE_KVMALLOC +DONT_USE_KVREALLOC DTLS_RECEIVEFROM_NO_TIMEOUT_ON_INVALID_PEER ECCSI_ORDER_MORE_BITS_THAN_PRIME ECC_DUMP_OID @@ -201,16 +212,20 @@ ENABLE_SECURE_SOCKETS_LOGS ESP32 ESP8266 ESP_ENABLE_WOLFSSH +ESP_IDF_VERSION ESP_IDF_VERSION_MAJOR ESP_IDF_VERSION_MINOR ESP_PLATFORM ESP_TASK_MAIN_STACK ETHERNET_AVAILABLE +ETHERNET_H EV_TRIGGER +EXTERNAL_LOADER_APP FORCE_FAILURE_GETRANDOM FP_ECC_CONTROL FREERTOS_TCP_WINSIM FREESCALE +FREESCALE_MQX FREESCALE_RNGB FREESCALE_USE_MMCAU_CLASSIC FSL_FEATURE_HAS_L1CACHE @@ -405,6 +420,7 @@ NO_STDIO_FGETS_REMAP NO_TKERNEL_MEM_POOL NO_TLSX_PSKKEM_PLAIN_ANNOUNCE NO_VERIFY_OID +NO_WC_DHGENERATEPUBLIC NO_WC_SSIZE_TYPE NO_WOLFSSL_ALLOC_ALIGN NO_WOLFSSL_AUTOSAR_CRYIF @@ -553,6 +569,7 @@ USE_SECRET_CALLBACK USE_STSAFE_RNG_SEED USE_STSAFE_VERBOSE USE_TLSV13 +USE_WINDOWS_API USE_WOLF_STRNSTR USS_API WC_AESXTS_STREAM_NO_REQUEST_ACCOUNTING @@ -584,6 +601,7 @@ WC_DILITHIUM_CACHE_PUB_VECTORS WC_DILITHIUM_FIXED_ARRAY WC_DISABLE_RADIX_ZERO_PAD WC_ECC_NONBLOCK_ONLY +WC_FLAG_DONT_USE_AESNI WC_KDF_NIST_SP_800_56C WC_LMS_FULL_HASH WC_NO_RNG_SIMPLE @@ -598,11 +616,15 @@ WC_RSA_NO_FERMAT_CHECK WC_SHA384 WC_SHA384_DIGEST_SIZE WC_SHA512 +WC_SKIP_INCLUDED_C_FILES WC_SSIZE_TYPE WC_STRICT_SIG -WC_WANT_FLAG_DONT_USE_AESNI +WC_WANT_FLAG_DONT_USE_VECTOR_OPS WC_XMSS_FULL_HASH +WIFIESPAT +WIFI_101 WIFI_AVAILABLE +WIFI_NINA WIN_REUSE_CRYPT_HANDLE WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE WOLFSENTRY_H @@ -614,6 +636,7 @@ WOLFSSL_AESNI_BY6 WOLFSSL_AES_CTR_EXAMPLE WOLFSSL_AFTER_DATE_CLOCK_SKEW WOLFSSL_ALGO_HW_MUTEX +WOLFSSL_ALLOW_BAD_TLS_LEGACY_VERSION WOLFSSL_ALLOW_CRIT_AIA WOLFSSL_ALLOW_CRIT_AKID WOLFSSL_ALLOW_CRIT_SKID @@ -653,13 +676,11 @@ WOLFSSL_CAAM_BLACK_KEY_SM WOLFSSL_CAAM_NO_BLACK_KEY WOLFSSL_CALLBACKS WOLFSSL_CHECK_DESKEY -WOLFSSL_CHECK_MEM_ZERO WOLFSSL_CHIBIOS WOLFSSL_CLANG_TIDY WOLFSSL_CLIENT_EXAMPLE WOLFSSL_CONTIKI WOLFSSL_CRL_ALLOW_MISSING_CDP -WOLFSSL_CUSTOM_CONFIG WOLFSSL_DILITHIUM_ASSIGN_KEY WOLFSSL_DILITHIUM_MAKE_KEY_SMALL_MEM WOLFSSL_DILITHIUM_NO_ASN1 @@ -687,6 +708,7 @@ WOLFSSL_ECDHX_SHARED_NOT_ZERO WOLFSSL_ECDSA_MATCH_HASH WOLFSSL_ECDSA_SET_K_ONE_LOOP WOLFSSL_EC_POINT_CMP_JACOBIAN +WOLFSSL_ED448_NO_LARGE_CODE WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN WOLFSSL_EMNET WOLFSSL_ESPWROOM32 @@ -761,7 +783,6 @@ WOLFSSL_NO_CT_MAX_MIN WOLFSSL_NO_DECODE_EXTRA WOLFSSL_NO_DER_TO_PEM WOLFSSL_NO_DH186 -WOLFSSL_NO_DH_GEN_PUB WOLFSSL_NO_DTLS_SIZE_CHECK WOLFSSL_NO_ETM_ALERT WOLFSSL_NO_FENCE @@ -836,6 +857,7 @@ WOLFSSL_SERVER_EXAMPLE WOLFSSL_SETTINGS_FILE WOLFSSL_SH224 WOLFSSL_SHA256_ALT_CH_MAJ +WOLFSSL_SHA512_HASHTYPE WOLFSSL_SHUTDOWNONCE WOLFSSL_SILABS_TRNG WOLFSSL_SM4_EBC @@ -845,6 +867,7 @@ WOLFSSL_SP_FAST_NCT_EXPTMOD WOLFSSL_SP_INT_SQR_VOLATILE WOLFSSL_STACK_CHECK WOLFSSL_STM32F427_RNG +WOLFSSL_STM32U5_DHUK WOLFSSL_STM32_RNG_NOLIB WOLFSSL_STRONGEST_HASH_SIG WOLFSSL_STSAFE_TAKES_SLOT @@ -868,14 +891,15 @@ WOLFSSL_TLSX_PQC_MLKEM_STORE_PRIV_KEY WOLFSSL_TRACK_MEMORY_FULL WOLFSSL_TRAP_MALLOC_SZ WOLFSSL_UNALIGNED_64BIT_ACCESS +WOLFSSL_USER_DEFINED_ATOMICS WOLFSSL_USER_FILESYSTEM WOLFSSL_USER_LOG WOLFSSL_USER_MUTEX WOLFSSL_USER_THREADING WOLFSSL_USE_ESP32C3_CRYPT_HASH_HW WOLFSSL_USE_FLASHMEM +WOLFSSL_USE_FORCE_ZERO WOLFSSL_USE_OPTIONS_H -WOLFSSL_USE_POPEN_HOST WOLFSSL_VALIDATE_DH_KEYGEN WOLFSSL_WC_LMS_SERIALIZE_STATE WOLFSSL_WC_XMSS_NO_SHA256 @@ -942,6 +966,7 @@ __ARM_ARCH_7M__ __ARM_FEATURE_CRYPTO __ASSEMBLER__ __ATOMIC_RELAXED +__AVR_ARCH__ __AVR__ __BCPLUSPLUS__ __BIG_ENDIAN__ @@ -974,6 +999,7 @@ __LINUX__ __LP64 __LP64__ __MACH__ +__MEGAAVR__ __MICROBLAZE__ __MINGW32__ __MINGW64_VERSION_MAJOR @@ -996,6 +1022,8 @@ __SAM3X4C__ __SAM3X4E__ __SAM3X8C__ __SAM3X8E__ +__SAMD21__ +__SAMD51__ __SANITIZE_ADDRESS__ __SDCC_VERSION_MAJOR __SDCC_VERSION_MINOR diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e3c99bbf..410518e4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,9 @@ set(WOLFSSL_DEFINITIONS) set(WOLFSSL_LINK_LIBS) set(WOLFSSL_INCLUDE_DIRS) +# Initialize pkg-config private variables +set(PC_LIBS_PRIVATE "") + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/") include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/functions.cmake) @@ -281,7 +284,28 @@ add_option("WOLFSSL_DEBUG" "no" "yes;no") if(WOLFSSL_DEBUG) - set(CMAKE_C_FLAGS "-g ${CMAKE_C_FLAGS}") + # Optional variable inspection + if (0) + get_cmake_property(_variableNames VARIABLES) + list (SORT _variableNames) + message(STATUS "") + message(STATUS "ALL VARIABLES BEGIN") + message(STATUS "") + foreach (_variableName ${_variableNames}) + message(STATUS "${_variableName}=${${_variableName}}") + endforeach() + message(STATUS "") + message(STATUS "ALL VARIABLES END") + message(STATUS "") + endif() + + if (CMAKE_C_COMPILER_ID STREQUAL "Watcom" OR CMAKE_C_COMPILER_ID STREQUAL "OpenWatcom" OR CMAKE_GENERATOR STREQUAL "Watcom WMake") + # Open Watcom v2 does not support -g debugging + message(STATUS "Detected Watcom compiler, using CMAKE_C_FLAGS_DEBUG -d2") + set(CMAKE_C_FLAGS_DEBUG "-d2 ${CMAKE_C_FLAGS_DEBUG}") + else() + set(CMAKE_C_FLAGS "-g ${CMAKE_C_FLAGS}") + endif() list(APPEND WOLFSSL_DEFINITIONS "-DDEBUG_WOLFSSL" "-DDEBUG") @@ -1604,6 +1628,14 @@ if(NOT WOLFSSL_INLINE) list(APPEND WOLFSSL_DEFINITIONS "-DNO_INLINE") endif() +add_option("WOLFSSL_ARMASM_INLINE" + "Enable ARM assembly inline functions (default: disabled)" + "no" "yes;no") + +if (WOLFSSL_ARMASM_INLINE) + list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_ARMASM_INLINE") +endif() + # TODO: # - CRL monitor # - User crypto @@ -2647,6 +2679,20 @@ if(WOLFSSL_EXAMPLES) tests/api/test_tls.c tests/api/test_x509.c tests/api/test_asn.c + tests/api/test_pkcs7.c + tests/api/test_pkcs12.c + tests/api/test_ossl_asn1.c + tests/api/test_ossl_bn.c + tests/api/test_ossl_bio.c + tests/api/test_ossl_dgst.c + tests/api/test_ossl_mac.c + tests/api/test_ossl_cipher.c + tests/api/test_ossl_rsa.c + tests/api/test_ossl_dh.c + tests/api/test_ossl_ec.c + tests/api/test_ossl_ecx.c + tests/api/test_ossl_dsa.c + tests/api/test_tls13.c tests/srp.c tests/suites.c tests/w64wrapper.c @@ -2926,6 +2972,16 @@ if(WOLFSSL_INSTALL) endif() endif() + # Add required frameworks for static linking on Apple platforms + if(APPLE AND NOT BUILD_SHARED_LIBS) + if(WOLFSSL_SYS_CA_CERTS) + list(APPEND PC_LIBS_PRIVATE "-framework CoreFoundation" "-framework Security") + endif() + endif() + + # Convert lists to space-separated strings for pkg-config + string(JOIN " " PC_LIBS_PRIVATE ${PC_LIBS_PRIVATE}) + configure_file(support/wolfssl.pc.in ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/ChangeLog.md b/ChangeLog.md index 09728ee1e..44cfe9ba8 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -9,7 +9,7 @@ NOTE: * wolfSSL is now GPLv3 instead of GPLv2 * MD5 is now disabled by default -PR stands for Pull Request, and PR references a GitHub pull request number where the code change was added. +PR stands for Pull Request, and PR (NUMBER) references a GitHub pull request number where the code change was added. ## Vulnerabilities @@ -68,7 +68,8 @@ Blinding enabled by default in PR https://github.com/wolfSSL/wolfssl/pull/8736 * Implemented distro fix for the Linux Kernel Module. (PR #8994) * Fixed page-flags-h in the Linux Kernel Module. (PR #9001) * Added MODULE_LICENSE for the Linux Kernel Module. (PR #9005) -* Post-Quantum Cryptography (PQC) & Asymmetric Algorithms + +### Post-Quantum Cryptography (PQC) & Asymmetric Algorithms * Kyber has been updated to the MLKEM ARM file for Zephyr (PR #8781) * Backward compatibility has been implemented for ML_KEM IDs (PR #8827) * ASN.1 is now ensured to be enabled when only building PQ algorithms (PR #8884) @@ -207,7 +208,7 @@ https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assur NOTE: * --enable-heapmath is deprecated -PR stands for Pull Request, and PR references a GitHub pull request +PR stands for Pull Request, and PR (NUMBER) references a GitHub pull request number where the code change was added. @@ -423,7 +424,7 @@ NOTE: user_settings.h. -PR stands for Pull Request, and PR references a GitHub pull request +PR stands for Pull Request, and PR (NUMBER) references a GitHub pull request number where the code change was added. @@ -543,7 +544,7 @@ https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assur NOTE: * --enable-heapmath is being deprecated and will be removed by end of 2024 -PR stands for Pull Request, and PR references a GitHub pull request +PR stands for Pull Request, and PR (NUMBER) references a GitHub pull request number where the code change was added. diff --git a/Docker/packaging/debian/Dockerfile b/Docker/packaging/debian/Dockerfile index 87b0c1c80..a485273b7 100644 --- a/Docker/packaging/debian/Dockerfile +++ b/Docker/packaging/debian/Dockerfile @@ -2,5 +2,4 @@ FROM debian:latest RUN apt-get -y update RUN apt-get -y upgrade -RUN apt-get install -y build-essential autoconf gawk debhelper lintian - +RUN apt-get install -y build-essential autoconf gawk debhelper lintian dpkg-dev diff --git a/IDE/ARDUINO/README.md b/IDE/ARDUINO/README.md index 8808b0e29..7aefeea46 100644 --- a/IDE/ARDUINO/README.md +++ b/IDE/ARDUINO/README.md @@ -1,18 +1,18 @@ # wolfSSL with Arduino -See the [example sketches](./sketches/README.md): - -NOTE: Moving; See https://github.com/wolfSSL/wolfssl-examples/pull/499 +See the [example sketches](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino): Bare-bones templates: -- [sketches/wolfssl_version](./sketches/wolfssl_version/README.md) single file. -- [sketches/template](./sketches/template/README.md) multiple file example. +- [sketches/wolfssl_version](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_version/README.md) single file. +- [sketches/template](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/template/README.md) multiple file example. Functional examples: -- [sketches/wolfssl_AES_CTR](./sketches/wolfssl_AES_CTR/README.md) AES CTR Encrypt / decrypt. -- [sketches/wolfssl_client](./sketches/wolfssl_client/README.md) TLS Client. -- [sketches/wolfssl_server](./sketches/wolfssl_server/README.md) TLS Server. +- [sketches/wolfssl_AES_CTR](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_AES_CTR/README.md) AES CTR Encrypt / decrypt. +- [sketches/wolfssl_client](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_client/README.md) TLS Client. +- [sketches/wolfssl_server](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_server/README.md) TLS Server. +- [sketches/wolfssl_client_dtls](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_client_dtls/README.md) DTLS Client. +- [sketches/wolfssl_server_dtls](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_server_dtls/README.md) DTLS Server. Both the `template` and `wolfssl_AES_CTR` examples include VisualGDB project files. diff --git a/IDE/ARDUINO/wolfssl-arduino.sh b/IDE/ARDUINO/wolfssl-arduino.sh index d05a84802..a381a597a 100755 --- a/IDE/ARDUINO/wolfssl-arduino.sh +++ b/IDE/ARDUINO/wolfssl-arduino.sh @@ -26,6 +26,9 @@ # The Arduino library include file is "wolfssl.h" (all lower case) # The Published wolfSSL Arduino Registry is at https://github.com/wolfSSL/Arduino-wolfSSL.git # See https://downloads.arduino.cc/libraries/logs/github.com/wolfSSL/Arduino-wolfSSL/ +# +echo "wolfssl-arduino.sh v5.8.2 rev B" + ROOT_DIR="/wolfssl" # The Arduino Version will initially have a suffix appended during fine tuning stage. @@ -70,18 +73,24 @@ if [ "$ROOT_DIR" = "" ]; then exit 1 fi +if [ "$ARDUINO_ROOT" = "" ]; then + echo "No ARDUINO_ROOT export... detecting..." + ARDUINO_ROOT="$HOME/Arduino/libraries" -ARDUINO_ROOT="$HOME/Arduino/libraries" - -# Check environment -if [ -n "$WSL_DISTRO_NAME" ]; then - # we found a non-blank WSL environment distro name - current_path="$(pwd)" - pattern="/mnt/?" - if echo "$current_path" | grep -Eq "^$pattern"; then - # if we are in WSL and shared Windows file system, 'ln' does not work. - ARDUINO_ROOT="/mnt/c/Users/$USER/Documents/Arduino/libraries" + # Check environment + if [ -n "$WSL_DISTRO_NAME" ]; then + # we found a non-blank WSL environment distro name + echo "Found WSL: $WSL_DISTRO_NAME" + current_path="$(pwd)" + pattern="/mnt/?" + if echo "$current_path" | grep -Eq "^$pattern"; then + # if we are in WSL and shared Windows file system, 'ln' does not work. + ARDUINO_ROOT="/mnt/c/Users/$USER/Documents/Arduino/libraries" + echo "ARDUINO_ROOT set to $ARDUINO_ROOT" + fi fi +else + echo "Using export ARDUINO_ROOT" fi echo "The Arduino library root is: $ARDUINO_ROOT" @@ -173,7 +182,7 @@ THIS_DIR=${PWD##*/} if [ "$THIS_DIR" = "ARDUINO" ]; then # mkdir ./wolfssl if [ -d ".${ROOT_DIR}" ]; then - echo "ERROR: $(realpath ".${ROOT_DIR}") is not empty" + echo "ERROR: $(realpath ".${ROOT_DIR}") is not empty; failed prior install? Please remove." exit 1 else echo "Step 01: mkdir .${ROOT_DIR}" @@ -267,6 +276,7 @@ if [ "$THIS_DIR" = "ARDUINO" ]; then echo "Destination EXAMPLES_DIR=.${EXAMPLES_DIR}" echo "EXAMPLES_DIR_REAL_PATH=${EXAMPLES_DIR_REAL_PATH}" + # Only explicit source code is copied to the Arduino library. Edit with caution, no automation: if [ -n "$WOLFSSL_EXAMPLES_ROOT" ]; then echo "Copy template example...." mkdir -p ".${EXAMPLES_DIR}"/template/wolfssl_library/src @@ -279,23 +289,33 @@ if [ "$THIS_DIR" = "ARDUINO" ]; then echo "Copy wolfssl_AES_CTR example...." mkdir -p ".${EXAMPLES_DIR}"/wolfssl_AES_CTR - $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_AES_CTR/wolfssl_AES_CTR.ino ".${EXAMPLES_DIR}"/wolfssl_AES_CTR/wolfssl_AES_CTR.ino || exit 1 - $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_AES_CTR/README.md ".${EXAMPLES_DIR}"/wolfssl_AES_CTR/README.md || exit 1 + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_AES_CTR/wolfssl_AES_CTR.ino ".${EXAMPLES_DIR}"/wolfssl_AES_CTR/wolfssl_AES_CTR.ino || exit 1 + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_AES_CTR/README.md ".${EXAMPLES_DIR}"/wolfssl_AES_CTR/README.md || exit 1 echo "Copy wolfssl_client example...." mkdir -p ".${EXAMPLES_DIR}"/wolfssl_client - $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client/wolfssl_client.ino ".${EXAMPLES_DIR}"/wolfssl_client/wolfssl_client.ino || exit 1 - $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client/README.md ".${EXAMPLES_DIR}"/wolfssl_client/README.md || exit 1 + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client/wolfssl_client.ino ".${EXAMPLES_DIR}"/wolfssl_client/wolfssl_client.ino || exit 1 + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client/README.md ".${EXAMPLES_DIR}"/wolfssl_client/README.md || exit 1 + + echo "Copy wolfssl_client_dtls example...." + mkdir -p ".${EXAMPLES_DIR}"/wolfssl_client_dtls + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client_dtls/wolfssl_client_dtls.ino ".${EXAMPLES_DIR}"/wolfssl_client_dtls/wolfssl_client_dtls.ino || exit 1 + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client_dtls/README.md ".${EXAMPLES_DIR}"/wolfssl_client_dtls/README.md || exit 1 echo "Copy wolfssl_server example...." mkdir -p .${EXAMPLES_DIR}/wolfssl_server - $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server/wolfssl_server.ino ".${EXAMPLES_DIR}"/wolfssl_server/wolfssl_server.ino || exit 1 - $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server/README.md ".${EXAMPLES_DIR}"/wolfssl_server/README.md || exit 1 + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server/wolfssl_server.ino ".${EXAMPLES_DIR}"/wolfssl_server/wolfssl_server.ino || exit 1 + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server/README.md ".${EXAMPLES_DIR}"/wolfssl_server/README.md || exit 1 + + echo "Copy wolfssl_server_dtls example...." + mkdir -p .${EXAMPLES_DIR}/wolfssl_server_dtls + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server_dtls/wolfssl_server_dtls.ino ".${EXAMPLES_DIR}"/wolfssl_server_dtls/wolfssl_server_dtls.ino || exit 1 + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server_dtls/README.md ".${EXAMPLES_DIR}"/wolfssl_server_dtls/README.md || exit 1 echo "Copy wolfssl_version example...." mkdir -p .${EXAMPLES_DIR}/wolfssl_version - $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_version/wolfssl_version.ino ".${EXAMPLES_DIR}"/wolfssl_version/wolfssl_version.ino || exit 1 - $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_version/README.md ".${EXAMPLES_DIR}"/wolfssl_version/README.md || exit 1 + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_version/wolfssl_version.ino ".${EXAMPLES_DIR}"/wolfssl_version/wolfssl_version.ino || exit 1 + $CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_version/README.md ".${EXAMPLES_DIR}"/wolfssl_version/README.md || exit 1 else NO_ARDUINO_EXAMPLES=1 fi @@ -364,27 +384,39 @@ if [ "$THIS_OPERATION" = "INSTALL" ]; then # Nearly an ordinary copy, but we remove any lines with ">>" (typically edit with caution warning in comments) grep -v '>>' ../../examples/configs/user_settings_arduino.h > ".${ROOT_SRC_DIR}"/user_settings.h || exit 1 - # Show the user_settings.h revision string: + echo "This user_settings.h revision string:" grep "WOLFSSL_USER_SETTINGS_ID" ."${ROOT_SRC_DIR}/user_settings.h" echo "" if [ "$THIS_INSTALL_IS_GITHUB" = "true" ]; then echo "Installing to GitHub directory: $THIS_INSTALL_DIR" - cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1 + cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1 echo "Removing workspace library directory: .$ROOT_DIR" - rm -rf ".$ROOT_DIR" + rm -rf ".$ROOT_DIR" || exit 1 else echo "Installing to local directory:" if [ "$THIS_INSTALL_DIR" = "" ]; then - echo "mv .$ROOT_DIR $ARDUINO_ROOT" - mv ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1 + if [ -n "$WSL_DISTRO_NAME" ]; then + # setfattr not installed by default + # echo "Set system.wsl_case_sensitive .$ROOT_DIR" + # setfattr -x system.wsl_case_sensitive .$ROOT_DIR + # + # use copy instead of move to avoid possible system.wsl_case_sensitive warnings + echo "cp -r .\"$ROOT_DIR\" \"$ARDUINO_ROOT\"" + cp -r ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1 + echo "rm -rf .\"$ROOT_DIR\"" + rm -rf ."$ROOT_DIR" || exit 1 + else + echo "mv .$ROOT_DIR $ARDUINO_ROOT" + mv ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1 + fi echo "Arduino wolfSSL Version: $WOLFSSL_VERSION$WOLFSSL_VERSION_ARUINO_SUFFIX" else echo "cp -r .\"$ROOT_DIR\"/* \"$THIS_INSTALL_DIR\"" - mkdir -p "$THIS_INSTALL_DIR" || exit 1 - cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1 + mkdir -p "$THIS_INSTALL_DIR" || exit 1 + cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1 fi fi fi diff --git a/IDE/Espressif/ESP-IDF/examples/template/CMakeLists.txt b/IDE/Espressif/ESP-IDF/examples/template/CMakeLists.txt index 61110a150..feacf8c42 100644 --- a/IDE/Espressif/ESP-IDF/examples/template/CMakeLists.txt +++ b/IDE/Espressif/ESP-IDF/examples/template/CMakeLists.txt @@ -7,6 +7,19 @@ message(STATUS "Begin project ${CMAKE_PROJECT_NAME}") cmake_minimum_required(VERSION 3.16) +# For the main project using ESP-IDF version 6 or greater. +# Numerous "dangerous relocation: call8: call target out of range: memcpy" errors encountered +# So we'll allow long calls with the `-mlongcalls` compiler option for all components. +if(IDF_VERSION_MAJOR GREATER_EQUAL 6) + if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") + message(STATUS "Adding mlongcalls") + add_compile_options(-mlongcalls) + add_link_options(-mlongcalls) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlongcalls") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlongcalls") + endif() +endif() + # Optional no watchdog typically used for test & benchmark if (idf_target STREQUAL "esp8266" OR IDF_TARGET STREQUAL "esp8266" OR IDF_VERSION_MAJOR VERSION_LESS "5.0") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_ESP_NO_WATCHDOG=1") @@ -144,5 +157,15 @@ endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# Once the project is loaded, next check for ESP-IDF version 6 or greater. +# Numerous "dangerous relocation: call8: call target out of range: memcpy" errors encountered +# So we'll allow long calls with the `-mlongcalls` compiler option for all components. +if(IDF_VERSION_MAJOR GREATER_EQUAL 6) + if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") + message(STATUS "mlongcalls for all components") + idf_build_set_property(COMPILE_OPTIONS "-mlongcalls" APPEND) + endif() +endif() + project(wolfssl_template) message(STATUS "end project") diff --git a/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/include/user_settings.h b/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/include/user_settings.h index a51634417..9c14dc9df 100644 --- a/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/include/user_settings.h +++ b/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/include/user_settings.h @@ -30,7 +30,7 @@ /* This user_settings.h is for Espressif ESP-IDF * - * Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.7.0-1 + * Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.8.2-1 certs * * Do not include any wolfssl headers here. * @@ -257,11 +257,6 @@ #define WOLFSSL_AES_DIRECT #endif -/* Pick a cert buffer size: */ -/* #define USE_CERT_BUFFERS_2048 */ -/* #define USE_CERT_BUFFERS_1024 */ -#define USE_CERT_BUFFERS_2048 - /* The Espressif sdkconfig will have chipset info. ** ** Some possible values: @@ -377,10 +372,6 @@ /* #define DEBUG_WOLFSSL */ #define DEBUG_WOLFSSL_MALLOC -/* See test.c that sets cert buffers; we'll set them here: */ -#define USE_CERT_BUFFERS_256 -#define USE_CERT_BUFFERS_2048 - /* RSA_LOW_MEM: Half as much memory but twice as slow. */ #define RSA_LOW_MEM @@ -678,9 +669,6 @@ #undef HAVE_AESGCM #define HAVE_AESGCM -#else - /* default settings */ - #define USE_CERT_BUFFERS_2048 #endif /* Chipset detection from sdkconfig.h @@ -1058,10 +1046,9 @@ Turn on timer debugging (used when CPU cycles not available) #error "USE_CERT_BUFFERS_1024 is already defined. Pick one." #endif - /* Be sure to include in app when using example certs: */ - #include + /* Be sure to include in app, not here, when using example certs: */ + /* #include */ - #define USE_CERT_BUFFERS_256 #define CTX_CA_CERT ca_cert_der_2048 #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048 #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1 @@ -1085,10 +1072,9 @@ Turn on timer debugging (used when CPU cycles not available) #error "USE_CERT_BUFFERS_2048 is already defined. Pick one." #endif - /* Be sure to include in app when using example certs: */ - #include + /* Be sure to include in app, not here, when using example certs: */ + /* #include */ - #define USE_CERT_BUFFERS_256 #define CTX_CA_CERT ca_cert_der_1024 #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024 #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1 @@ -1108,7 +1094,6 @@ Turn on timer debugging (used when CPU cycles not available) #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1 #else /* Optionally define custom cert arrays, sizes, and types here */ - #error "Must define USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_1024" #endif #endif /* Conditional key and cert constant names */ diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/CMakeLists.txt b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/CMakeLists.txt index 17437542e..dcbd07ec5 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/CMakeLists.txt +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/CMakeLists.txt @@ -7,6 +7,19 @@ message(STATUS "Begin project ${CMAKE_PROJECT_NAME}") cmake_minimum_required(VERSION 3.16) +# For the main project using ESP-IDF version 6 or greater. +# Numerous "dangerous relocation: call8: call target out of range: memcpy" errors encountered +# So we'll allow long calls with the `-mlongcalls` compiler option for all components. +if(IDF_VERSION_MAJOR GREATER_EQUAL 6) + if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") + message(STATUS "Adding mlongcalls") + add_compile_options(-mlongcalls) + add_link_options(-mlongcalls) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlongcalls") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlongcalls") + endif() +endif() + # Optional no watchdog typically used for test & benchmark if (idf_target STREQUAL "esp8266" OR IDF_TARGET STREQUAL "esp8266" OR IDF_VERSION_MAJOR VERSION_LESS "5.0") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_ESP_NO_WATCHDOG=1") @@ -144,5 +157,15 @@ endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# Once the project is loaded, next check for ESP-IDF version 6 or greater. +# Numerous "dangerous relocation: call8: call target out of range: memcpy" errors encountered +# So we'll allow long calls with the `-mlongcalls` compiler option for all components. +if(IDF_VERSION_MAJOR GREATER_EQUAL 6) + if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") + message(STATUS "mlongcalls for all components") + idf_build_set_property(COMPILE_OPTIONS "-mlongcalls" APPEND) + endif() +endif() + project(wolfssl_benchmark) message(STATUS "end project") diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/include/user_settings.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/include/user_settings.h index a51634417..9c14dc9df 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/include/user_settings.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/include/user_settings.h @@ -30,7 +30,7 @@ /* This user_settings.h is for Espressif ESP-IDF * - * Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.7.0-1 + * Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.8.2-1 certs * * Do not include any wolfssl headers here. * @@ -257,11 +257,6 @@ #define WOLFSSL_AES_DIRECT #endif -/* Pick a cert buffer size: */ -/* #define USE_CERT_BUFFERS_2048 */ -/* #define USE_CERT_BUFFERS_1024 */ -#define USE_CERT_BUFFERS_2048 - /* The Espressif sdkconfig will have chipset info. ** ** Some possible values: @@ -377,10 +372,6 @@ /* #define DEBUG_WOLFSSL */ #define DEBUG_WOLFSSL_MALLOC -/* See test.c that sets cert buffers; we'll set them here: */ -#define USE_CERT_BUFFERS_256 -#define USE_CERT_BUFFERS_2048 - /* RSA_LOW_MEM: Half as much memory but twice as slow. */ #define RSA_LOW_MEM @@ -678,9 +669,6 @@ #undef HAVE_AESGCM #define HAVE_AESGCM -#else - /* default settings */ - #define USE_CERT_BUFFERS_2048 #endif /* Chipset detection from sdkconfig.h @@ -1058,10 +1046,9 @@ Turn on timer debugging (used when CPU cycles not available) #error "USE_CERT_BUFFERS_1024 is already defined. Pick one." #endif - /* Be sure to include in app when using example certs: */ - #include + /* Be sure to include in app, not here, when using example certs: */ + /* #include */ - #define USE_CERT_BUFFERS_256 #define CTX_CA_CERT ca_cert_der_2048 #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048 #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1 @@ -1085,10 +1072,9 @@ Turn on timer debugging (used when CPU cycles not available) #error "USE_CERT_BUFFERS_2048 is already defined. Pick one." #endif - /* Be sure to include in app when using example certs: */ - #include + /* Be sure to include in app, not here, when using example certs: */ + /* #include */ - #define USE_CERT_BUFFERS_256 #define CTX_CA_CERT ca_cert_der_1024 #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024 #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1 @@ -1108,7 +1094,6 @@ Turn on timer debugging (used when CPU cycles not available) #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1 #else /* Optionally define custom cert arrays, sizes, and types here */ - #error "Must define USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_1024" #endif #endif /* Conditional key and cert constant names */ diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/CMakeLists.txt b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/CMakeLists.txt index f9b3bbfd0..caa597d16 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/CMakeLists.txt +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/CMakeLists.txt @@ -7,6 +7,19 @@ message(STATUS "Begin project ${CMAKE_PROJECT_NAME}") cmake_minimum_required(VERSION 3.16) +# For the main project using ESP-IDF version 6 or greater. +# Numerous "dangerous relocation: call8: call target out of range: memcpy" errors encountered +# So we'll allow long calls with the `-mlongcalls` compiler option for all components. +if(IDF_VERSION_MAJOR GREATER_EQUAL 6) + if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") + message(STATUS "Adding mlongcalls") + add_compile_options(-mlongcalls) + add_link_options(-mlongcalls) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlongcalls") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlongcalls") + endif() +endif() + # Optional no watchdog typically used for test & benchmark if (idf_target STREQUAL "esp8266" OR IDF_TARGET STREQUAL "esp8266" OR IDF_VERSION_MAJOR VERSION_LESS "5.0") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_ESP_NO_WATCHDOG=1") @@ -144,5 +157,15 @@ endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# Once the project is loaded, next check for ESP-IDF version 6 or greater. +# Numerous "dangerous relocation: call8: call target out of range: memcpy" errors encountered +# So we'll allow long calls with the `-mlongcalls` compiler option for all components. +if(IDF_VERSION_MAJOR GREATER_EQUAL 6) + if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") + message(STATUS "mlongcalls for all components") + idf_build_set_property(COMPILE_OPTIONS "-mlongcalls" APPEND) + endif() +endif() + project(wolfssl_client) message(STATUS "end project") diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h index a51634417..9c14dc9df 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h @@ -30,7 +30,7 @@ /* This user_settings.h is for Espressif ESP-IDF * - * Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.7.0-1 + * Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.8.2-1 certs * * Do not include any wolfssl headers here. * @@ -257,11 +257,6 @@ #define WOLFSSL_AES_DIRECT #endif -/* Pick a cert buffer size: */ -/* #define USE_CERT_BUFFERS_2048 */ -/* #define USE_CERT_BUFFERS_1024 */ -#define USE_CERT_BUFFERS_2048 - /* The Espressif sdkconfig will have chipset info. ** ** Some possible values: @@ -377,10 +372,6 @@ /* #define DEBUG_WOLFSSL */ #define DEBUG_WOLFSSL_MALLOC -/* See test.c that sets cert buffers; we'll set them here: */ -#define USE_CERT_BUFFERS_256 -#define USE_CERT_BUFFERS_2048 - /* RSA_LOW_MEM: Half as much memory but twice as slow. */ #define RSA_LOW_MEM @@ -678,9 +669,6 @@ #undef HAVE_AESGCM #define HAVE_AESGCM -#else - /* default settings */ - #define USE_CERT_BUFFERS_2048 #endif /* Chipset detection from sdkconfig.h @@ -1058,10 +1046,9 @@ Turn on timer debugging (used when CPU cycles not available) #error "USE_CERT_BUFFERS_1024 is already defined. Pick one." #endif - /* Be sure to include in app when using example certs: */ - #include + /* Be sure to include in app, not here, when using example certs: */ + /* #include */ - #define USE_CERT_BUFFERS_256 #define CTX_CA_CERT ca_cert_der_2048 #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048 #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1 @@ -1085,10 +1072,9 @@ Turn on timer debugging (used when CPU cycles not available) #error "USE_CERT_BUFFERS_2048 is already defined. Pick one." #endif - /* Be sure to include in app when using example certs: */ - #include + /* Be sure to include in app, not here, when using example certs: */ + /* #include */ - #define USE_CERT_BUFFERS_256 #define CTX_CA_CERT ca_cert_der_1024 #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024 #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1 @@ -1108,7 +1094,6 @@ Turn on timer debugging (used when CPU cycles not available) #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1 #else /* Optionally define custom cert arrays, sizes, and types here */ - #error "Must define USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_1024" #endif #endif /* Conditional key and cert constant names */ diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/client-tls.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/client-tls.h index a38145fb9..b39e88782 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/client-tls.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/client-tls.h @@ -21,8 +21,23 @@ #ifndef _CLIENT_TLS_H_ #define _CLIENT_TLS_H_ -/* Local project, auto-generated configuration */ -#include "sdkconfig.h" +/* This example uses wolfssl test certificates */ +#if 1 + /* See wolfssl/certs_test.h */ + #if defined(CONFIG_IDF_TARGET_ESP32C2) || \ + defined(CONFIG_IDF_TARGET_ESP8684) || \ + defined(CONFIG_IDF_TARGET_ESP8266) + /* Use smaller certs for low-memory devices */ + #define USE_CERT_BUFFERS_1024 + #else + #define USE_CERT_BUFFERS_2048 + #endif + + /* always include smallest testing 32 byte RSA/ECC keys */ + #define USE_CERT_BUFFERS_256 +#else + /* define your own certificate macros; see user_settings.h */ +#endif #include #include diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/CMakeLists.txt b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/CMakeLists.txt index a61aed3f0..477b3be8b 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/CMakeLists.txt +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/CMakeLists.txt @@ -7,6 +7,19 @@ message(STATUS "Begin project ${CMAKE_PROJECT_NAME}") cmake_minimum_required(VERSION 3.16) +# For the main project using ESP-IDF version 6 or greater. +# Numerous "dangerous relocation: call8: call target out of range: memcpy" errors encountered +# So we'll allow long calls with the `-mlongcalls` compiler option for all components. +if(IDF_VERSION_MAJOR GREATER_EQUAL 6) + if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") + message(STATUS "Adding mlongcalls") + add_compile_options(-mlongcalls) + add_link_options(-mlongcalls) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlongcalls") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlongcalls") + endif() +endif() + # Optional no watchdog typically used for test & benchmark if (idf_target STREQUAL "esp8266" OR IDF_TARGET STREQUAL "esp8266" OR IDF_VERSION_MAJOR VERSION_LESS "5.0") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_ESP_NO_WATCHDOG=1") @@ -144,5 +157,15 @@ endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# Once the project is loaded, next check for ESP-IDF version 6 or greater. +# Numerous "dangerous relocation: call8: call target out of range: memcpy" errors encountered +# So we'll allow long calls with the `-mlongcalls` compiler option for all components. +if(IDF_VERSION_MAJOR GREATER_EQUAL 6) + if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") + message(STATUS "mlongcalls for all components") + idf_build_set_property(COMPILE_OPTIONS "-mlongcalls" APPEND) + endif() +endif() + project(wolfssl_server) message(STATUS "end project") diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/include/user_settings.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/include/user_settings.h index a51634417..9c14dc9df 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/include/user_settings.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/include/user_settings.h @@ -30,7 +30,7 @@ /* This user_settings.h is for Espressif ESP-IDF * - * Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.7.0-1 + * Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.8.2-1 certs * * Do not include any wolfssl headers here. * @@ -257,11 +257,6 @@ #define WOLFSSL_AES_DIRECT #endif -/* Pick a cert buffer size: */ -/* #define USE_CERT_BUFFERS_2048 */ -/* #define USE_CERT_BUFFERS_1024 */ -#define USE_CERT_BUFFERS_2048 - /* The Espressif sdkconfig will have chipset info. ** ** Some possible values: @@ -377,10 +372,6 @@ /* #define DEBUG_WOLFSSL */ #define DEBUG_WOLFSSL_MALLOC -/* See test.c that sets cert buffers; we'll set them here: */ -#define USE_CERT_BUFFERS_256 -#define USE_CERT_BUFFERS_2048 - /* RSA_LOW_MEM: Half as much memory but twice as slow. */ #define RSA_LOW_MEM @@ -678,9 +669,6 @@ #undef HAVE_AESGCM #define HAVE_AESGCM -#else - /* default settings */ - #define USE_CERT_BUFFERS_2048 #endif /* Chipset detection from sdkconfig.h @@ -1058,10 +1046,9 @@ Turn on timer debugging (used when CPU cycles not available) #error "USE_CERT_BUFFERS_1024 is already defined. Pick one." #endif - /* Be sure to include in app when using example certs: */ - #include + /* Be sure to include in app, not here, when using example certs: */ + /* #include */ - #define USE_CERT_BUFFERS_256 #define CTX_CA_CERT ca_cert_der_2048 #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048 #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1 @@ -1085,10 +1072,9 @@ Turn on timer debugging (used when CPU cycles not available) #error "USE_CERT_BUFFERS_2048 is already defined. Pick one." #endif - /* Be sure to include in app when using example certs: */ - #include + /* Be sure to include in app, not here, when using example certs: */ + /* #include */ - #define USE_CERT_BUFFERS_256 #define CTX_CA_CERT ca_cert_der_1024 #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024 #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1 @@ -1108,7 +1094,6 @@ Turn on timer debugging (used when CPU cycles not available) #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1 #else /* Optionally define custom cert arrays, sizes, and types here */ - #error "Must define USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_1024" #endif #endif /* Conditional key and cert constant names */ diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/include/server-tls.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/include/server-tls.h index 03781b2bd..a1d12ad2c 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/include/server-tls.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/include/server-tls.h @@ -21,6 +21,24 @@ #ifndef _SERVER_TLS_ #define _SERVER_TLS_ +/* This example uses wolfssl test certificates */ +#if 1 + /* See wolfssl/certs_test.h */ + #if defined(CONFIG_IDF_TARGET_ESP32C2) || \ + defined(CONFIG_IDF_TARGET_ESP8684) || \ + defined(CONFIG_IDF_TARGET_ESP8266) + /* Use smaller certs for low-memory devices */ + #define USE_CERT_BUFFERS_1024 + #else + #define USE_CERT_BUFFERS_2048 + #endif + + /* always include smallest testing 32 byte RSA/ECC keys */ + #define USE_CERT_BUFFERS_256 +#else + /* define your own certificate macros; see user_settings.h */ +#endif + #include /* includes wolfSSL user-settings.h */ #include #include "sdkconfig.h" diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/CMakeLists.txt b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/CMakeLists.txt index 2090c8ae8..ac32187d8 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/CMakeLists.txt +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/CMakeLists.txt @@ -7,6 +7,19 @@ message(STATUS "Begin project ${CMAKE_PROJECT_NAME}") cmake_minimum_required(VERSION 3.16) +# For the main project using ESP-IDF version 6 or greater. +# Numerous "dangerous relocation: call8: call target out of range: memcpy" errors encountered +# So we'll allow long calls with the `-mlongcalls` compiler option for all components. +if(IDF_VERSION_MAJOR GREATER_EQUAL 6) + if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") + message(STATUS "Adding mlongcalls") + add_compile_options(-mlongcalls) + add_link_options(-mlongcalls) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlongcalls") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlongcalls") + endif() +endif() + # Optional no watchdog typically used for test & benchmark if (idf_target STREQUAL "esp8266" OR IDF_TARGET STREQUAL "esp8266" OR IDF_VERSION_MAJOR VERSION_LESS "5.0") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_ESP_NO_WATCHDOG=1") @@ -144,5 +157,15 @@ endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# Once the project is loaded, next check for ESP-IDF version 6 or greater. +# Numerous "dangerous relocation: call8: call target out of range: memcpy" errors encountered +# So we'll allow long calls with the `-mlongcalls` compiler option for all components. +if(IDF_VERSION_MAJOR GREATER_EQUAL 6) + if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") + message(STATUS "mlongcalls for all components") + idf_build_set_property(COMPILE_OPTIONS "-mlongcalls" APPEND) + endif() +endif() + project(wolfssl_test) message(STATUS "end project") diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/include/user_settings.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/include/user_settings.h index a51634417..9c14dc9df 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/include/user_settings.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/include/user_settings.h @@ -30,7 +30,7 @@ /* This user_settings.h is for Espressif ESP-IDF * - * Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.7.0-1 + * Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.8.2-1 certs * * Do not include any wolfssl headers here. * @@ -257,11 +257,6 @@ #define WOLFSSL_AES_DIRECT #endif -/* Pick a cert buffer size: */ -/* #define USE_CERT_BUFFERS_2048 */ -/* #define USE_CERT_BUFFERS_1024 */ -#define USE_CERT_BUFFERS_2048 - /* The Espressif sdkconfig will have chipset info. ** ** Some possible values: @@ -377,10 +372,6 @@ /* #define DEBUG_WOLFSSL */ #define DEBUG_WOLFSSL_MALLOC -/* See test.c that sets cert buffers; we'll set them here: */ -#define USE_CERT_BUFFERS_256 -#define USE_CERT_BUFFERS_2048 - /* RSA_LOW_MEM: Half as much memory but twice as slow. */ #define RSA_LOW_MEM @@ -678,9 +669,6 @@ #undef HAVE_AESGCM #define HAVE_AESGCM -#else - /* default settings */ - #define USE_CERT_BUFFERS_2048 #endif /* Chipset detection from sdkconfig.h @@ -1058,10 +1046,9 @@ Turn on timer debugging (used when CPU cycles not available) #error "USE_CERT_BUFFERS_1024 is already defined. Pick one." #endif - /* Be sure to include in app when using example certs: */ - #include + /* Be sure to include in app, not here, when using example certs: */ + /* #include */ - #define USE_CERT_BUFFERS_256 #define CTX_CA_CERT ca_cert_der_2048 #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048 #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1 @@ -1085,10 +1072,9 @@ Turn on timer debugging (used when CPU cycles not available) #error "USE_CERT_BUFFERS_2048 is already defined. Pick one." #endif - /* Be sure to include in app when using example certs: */ - #include + /* Be sure to include in app, not here, when using example certs: */ + /* #include */ - #define USE_CERT_BUFFERS_256 #define CTX_CA_CERT ca_cert_der_1024 #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024 #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1 @@ -1108,7 +1094,6 @@ Turn on timer debugging (used when CPU cycles not available) #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1 #else /* Optionally define custom cert arrays, sizes, and types here */ - #error "Must define USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_1024" #endif #endif /* Conditional key and cert constant names */ diff --git a/IDE/INTIME-RTOS/Makefile b/IDE/INTIME-RTOS/Makefile new file mode 100644 index 000000000..3755c2920 --- /dev/null +++ b/IDE/INTIME-RTOS/Makefile @@ -0,0 +1,516 @@ +# Makefile for the INtime wolfSSL library component +# +SWENGENV := $(RMX_SRC_BASE)/tools/swenghg +# +# makefile -- defines the macros, directives and rules necessary to build the +# wolfSSL library. +# +# NOTES: +# 1. This makefile is a "wrapper" makefile for the Visual Studio 80 +# INtime package project. The makefile provides RCS and component +# release support not provided by the project's native visual Studio +# makefile. +# +# 2. The SWENG environment assumes makefile execution from a Windows NT +# environment. +# +# 3. The SWENG environment assumes that a user has Microsoft Network +# access to the ESO server directories. +# +# 4. A SWENG makefile makes no assumptions concerning a user's command +# path. All command pathnames are explicit. Furthermore, the +# directory component of a pathname is defined by a macro that can be +# overridden at makefile invocation. +# +# The same cannot be said for MS Developer Studio makefiles -- they +# assume MSVC and Windows NT commands are in the user's path. +# +# 5. A SWENG makefile makes no assumptions concerning a user's environment +# variable definitions. +# +# The same cannot be said for MS Developer Studio makefiles -- they +# assume various environment variables are set properly to build their +# components. +# +# 6. A SWENG makefile executes standard MKS and MSVC tools. Other tool +# sets require additional macro and rule definition. +# + +# Default macros and directives. +# +# NOTES: +# 1. These files must always be included before all component-specific +# macros and directives. + +.INCLUDE:$(SWENGENV)/macros.wnt +.INCLUDE:$(SWENGENV)/intimemacros.wnt + +# Component and version number macros: +# +# COMPONENT: The name of the product component built by this makefile. +# DUE TO THE IDIOSYNCRATIC NATURE OF RCS, THIS MACRO MUST NOT +# CONTAIN ANY SPECIAL CHARACTERS, INCLUDING " " AND "."! For +# example, the macro for the Real-Time Application Loader +# could be defined as: +# +# COMPONENT := Real_Time_Application_Loader +# +# In the SWENG environment, a PRODUCT is the complete software +# package sent to a customer (e.g., INtime V1.00). A PRODUCT +# is composed of one or more COMPONENTs (e.g., Real-Time +# Application Loader, NTX Library, etc.) +# +# When choosing names for new components, ensure that they +# are unique. +# +# VERSION: The version number associated with the component(s) built +# by this makefile. DUE TO THE IDIOSYNCRATIC NATURE OF RCS, +# THIS MACRO MUST NOT CONTAIN ANY SPECIAL CHARACTERS, +# INCLUDING " " AND "."! For example, the macro for version +# 1.00 is defined: +# +# VERSION := 100 +# +# NAME: A string used to name both the engineering version of the +# component built by this makefile and the source files used +# to build it. +# +# NOTES: +# 1. These macros must not be deleted or renamed. Their values should be +# modified to match the components built by this makefile. +# +# 2. The "engineer" target will not complete unless the COMPONENT, +# VERSION, and NAME macros are defined. + +COMPONENT := wolfssl_intime +VERSION := 572 +NAME := $(COMPONENT)_$(VERSION) + +# MS Developer Studio project name and directory macros. +# +# PROJECT: The project name for this component. +# +# SUB_PROJECTS: The sub-project name(s) for this component. +# +# TARG_DIR: The target directory for component files, relative to the +# project and sub-project directories (generally, "Debug" or +# "Release"). +# +# TARG_TYPE: The target type for the project and sub-projects +# (generally, "Debug" or "Release"). +# +# NOTES: +# 1. These macros must not be deleted or renamed. Their values should be +# modified to match the project/directory structure of the component(s) +# built by this makefile. Unused macros values should be defined as +# $(NULL). + +PROJECT := wolfssl +SUB_PROJECTS := $(NULL) +.IF $(DEBUG) +TARG_DIR := Debug +TARG_TYPE := Debug +.ELSE +TARG_DIR := Release +TARG_TYPE := Release +.END + +# MKS make search path for machine-generated files. +# +# NOTES: +# 1. All machine-generated target files that do not reside in the current +# working directory require a .SOURCE directive. Otherwise, a .SOURCE +# directive is optional (but will improve makefile performance). + +.SOURCE.lib: $(TARG_DIR) + +# File list macros: +# +# TARGETS: The component(s) built by this makefile. These are the files +# built by the default rule ("make" or "make all"). +# LOGFILE: A log file containing revision data for the project members +# (files) used to build the TARGETS. The file is built by the +# "engineer" rule. +# MAKEFILE: Makefile used to build the TARGETS (this file). +# ASM: Assembly source code files used to build the TARGETS (.asm). +# C: C source code files used to build the TARGETS (.c) +# CPP: C++ source code files used to build the TARGETS (.cpp). +# SRCS: The concatenation of ASM, C, and CPP. +# HDRS: Header files used to build the TARGETS (.h, .hpp, .inc). +# OBJ: Object files used to build the TARGETS (.obj). +# DEBRIS: Machine-generated files to be deleted by the "clean" rule. +# +# NOTES: +# 1. These macros must not be deleted or renamed. Their values may be +# modified to match the files used to build the component(s) associated +# with this makefile. +# +# 2. The "engineer" rule will not complete unless the LOGFILE macro is +# defined. + +EXEC_TARGS := libwolfssl572.lib + +SRC_TARGS := user_settings.h +TARGETS := $(EXEC_TARGS) +LOGFILE := $(PROJECT).txt +MAKEFILE := makefile +ASM := +C := +CPP := +RCFILE := + +SRCS := +OBJ := +CFGS := + +DEBRIS := $(LOGFILE) release* debug* *.sdf *.user *.aps *.bak *~ + +INCL_TARGS := wolfssl/callbacks.h \ + wolfssl/certs_test.h \ + wolfssl/crl.h \ + wolfssl/error-ssl.h \ + wolfssl/include.am \ + wolfssl/internal.h \ + wolfssl/ocsp.h \ + wolfssl/options.h \ + wolfssl/options.h.in \ + wolfssl/quic.h \ + wolfssl/sniffer.h \ + wolfssl/sniffer_error.h \ + wolfssl/sniffer_error.rc \ + wolfssl/ssl.h \ + wolfssl/test.h \ + wolfssl/version.h \ + wolfssl/version.h.in \ + wolfssl/wolfio.h \ + wolfssl/openssl/aes.h \ + wolfssl/openssl/asn1.h \ + wolfssl/openssl/asn1t.h \ + wolfssl/openssl/bio.h \ + wolfssl/openssl/bn.h \ + wolfssl/openssl/buffer.h \ + wolfssl/openssl/camellia.h \ + wolfssl/openssl/cmac.h \ + wolfssl/openssl/cms.h \ + wolfssl/openssl/compat_types.h \ + wolfssl/openssl/conf.h \ + wolfssl/openssl/crypto.h \ + wolfssl/openssl/des.h \ + wolfssl/openssl/dh.h \ + wolfssl/openssl/dsa.h \ + wolfssl/openssl/ec.h \ + wolfssl/openssl/ec448.h \ + wolfssl/openssl/ec25519.h \ + wolfssl/openssl/ecdh.h \ + wolfssl/openssl/ecdsa.h \ + wolfssl/openssl/ecdh.h \ + wolfssl/openssl/ecdsa.h \ + wolfssl/openssl/ed448.h \ + wolfssl/openssl/ed25519.h \ + wolfssl/openssl/engine.h \ + wolfssl/openssl/err.h \ + wolfssl/openssl/evp.h \ + wolfssl/openssl/fips_rand.h \ + wolfssl/openssl/hmac.h \ + wolfssl/openssl/include.am \ + wolfssl/openssl/kdf.h \ + wolfssl/openssl/lhash.h \ + wolfssl/openssl/md4.h \ + wolfssl/openssl/md5.h \ + wolfssl/openssl/modes.h \ + wolfssl/openssl/obj_mac.h \ + wolfssl/openssl/objects.h \ + wolfssl/openssl/ocsp.h \ + wolfssl/openssl/opensslconf.h \ + wolfssl/openssl/opensslv.h \ + wolfssl/openssl/ossl_typ.h \ + wolfssl/openssl/pem.h \ + wolfssl/openssl/pkcs7.h \ + wolfssl/openssl/pkcs12.h \ + wolfssl/openssl/rand.h \ + wolfssl/openssl/rc4.h \ + wolfssl/openssl/ripemd.h \ + wolfssl/openssl/rsa.h \ + wolfssl/openssl/sha.h \ + wolfssl/openssl/sha3.h \ + wolfssl/openssl/srp.h \ + wolfssl/openssl/ssl.h \ + wolfssl/openssl/ssl23.h \ + wolfssl/openssl/stack.h \ + wolfssl/openssl/tls1.h \ + wolfssl/openssl/txt_db.h \ + wolfssl/openssl/ui.h \ + wolfssl/openssl/x509.h \ + wolfssl/openssl/x509_vfy.h \ + wolfssl/openssl/x509v3.h \ + wolfssl/wolfcrypt/aes.h \ + wolfssl/wolfcrypt/arc4.h \ + wolfssl/wolfcrypt/asn.h \ + wolfssl/wolfcrypt/asn_public.h \ + wolfssl/wolfcrypt/async.h \ + wolfssl/wolfcrypt/blake2.h \ + wolfssl/wolfcrypt/blake2-impl.h \ + wolfssl/wolfcrypt/blake2-int.h \ + wolfssl/wolfcrypt/camellia.h \ + wolfssl/wolfcrypt/chacha.h \ + wolfssl/wolfcrypt/chacha20_poly1305.h \ + wolfssl/wolfcrypt/cmac.h \ + wolfssl/wolfcrypt/coding.h \ + wolfssl/wolfcrypt/compress.h \ + wolfssl/wolfcrypt/cpuid.h \ + wolfssl/wolfcrypt/cryptocb.h \ + wolfssl/wolfcrypt/curve448.h \ + wolfssl/wolfcrypt/curve25519.h \ + wolfssl/wolfcrypt/des3.h \ + wolfssl/wolfcrypt/dh.h \ + wolfssl/wolfcrypt/dilithium.h \ + wolfssl/wolfcrypt/dsa.h \ + wolfssl/wolfcrypt/ecc.h \ + wolfssl/wolfcrypt/eccsi.h \ + wolfssl/wolfcrypt/ed448.h \ + wolfssl/wolfcrypt/ed25519.h \ + wolfssl/wolfcrypt/error-crypt.h \ + wolfssl/wolfcrypt/ext_kyber.h \ + wolfssl/wolfcrypt/ext_lms.h \ + wolfssl/wolfcrypt/ext_xmss.h \ + wolfssl/wolfcrypt/falcon.h \ + wolfssl/wolfcrypt/fe_448.h \ + wolfssl/wolfcrypt/fe_operations.h \ + wolfssl/wolfcrypt/fips.h \ + wolfssl/wolfcrypt/fips_test.h \ + wolfssl/wolfcrypt/ge_448.h \ + wolfssl/wolfcrypt/ge_operations.h \ + wolfssl/wolfcrypt/hash.h \ + wolfssl/wolfcrypt/hmac.h \ + wolfssl/wolfcrypt/hpke.h \ + wolfssl/wolfcrypt/include.am \ + wolfssl/wolfcrypt/integer.h \ + wolfssl/wolfcrypt/kdf.h \ + wolfssl/wolfcrypt/kyber.h \ + wolfssl/wolfcrypt/lms.h \ + wolfssl/wolfcrypt/logging.h \ + wolfssl/wolfcrypt/md2.h \ + wolfssl/wolfcrypt/md4.h \ + wolfssl/wolfcrypt/md5.h \ + wolfssl/wolfcrypt/mem_track.h \ + wolfssl/wolfcrypt/memory.h \ + wolfssl/wolfcrypt/misc.h \ + wolfssl/wolfcrypt/mpi_class.h \ + wolfssl/wolfcrypt/mpi_superclass.h \ + wolfssl/wolfcrypt/pkcs7.h \ + wolfssl/wolfcrypt/pkcs11.h \ + wolfssl/wolfcrypt/pkcs12.h \ + wolfssl/wolfcrypt/poly1305.h \ + wolfssl/wolfcrypt/pwdbased.h \ + wolfssl/wolfcrypt/random.h \ + wolfssl/wolfcrypt/rc2.h \ + wolfssl/wolfcrypt/ripemd.h \ + wolfssl/wolfcrypt/rsa.h \ + wolfssl/wolfcrypt/sakke.h \ + wolfssl/wolfcrypt/selftest.h \ + wolfssl/wolfcrypt/settings.h \ + wolfssl/wolfcrypt/sha.h \ + wolfssl/wolfcrypt/sha3.h \ + wolfssl/wolfcrypt/sha256.h \ + wolfssl/wolfcrypt/sha512.h \ + wolfssl/wolfcrypt/signature.h \ + wolfssl/wolfcrypt/siphash.h \ + wolfssl/wolfcrypt/sm2.h \ + wolfssl/wolfcrypt/sm3.h \ + wolfssl/wolfcrypt/sm4.h \ + wolfssl/wolfcrypt/sp.h \ + wolfssl/wolfcrypt/sp_int.h \ + wolfssl/wolfcrypt/sphincs.h \ + wolfssl/wolfcrypt/srp.h \ + wolfssl/wolfcrypt/tfm.h \ + wolfssl/wolfcrypt/types.h \ + wolfssl/wolfcrypt/visibility.h \ + wolfssl/wolfcrypt/wc_encrypt.h \ + wolfssl/wolfcrypt/wc_kyber.h \ + wolfssl/wolfcrypt/wc_pkcs11.h \ + wolfssl/wolfcrypt/wc_port.h \ + wolfssl/wolfcrypt/wolfevent.h \ + wolfssl/wolfcrypt/wolfmath.h \ + wolfssl/wolfcrypt/xmss.h \ + wolfssl/wolfcrypt/port/nrf51.h \ + wolfssl/wolfcrypt/port/af_alg/afalg_hash.h \ + wolfssl/wolfcrypt/port/af_alg/wc_afalg.h \ + wolfssl/wolfcrypt/port/aria/aria-crypt.h \ + wolfssl/wolfcrypt/port/aria/aria-cryptocb.h \ + wolfssl/wolfcrypt/port/arm/cryptoCell.h \ + wolfssl/wolfcrypt/port/atmel/atmel.h \ + wolfssl/wolfcrypt/port/autosar/CryIf.h \ + wolfssl/wolfcrypt/port/autosar/Crypto.h \ + wolfssl/wolfcrypt/port/autosar/Csm.h \ + wolfssl/wolfcrypt/port/autosar/StandardTypes.h \ + wolfssl/wolfcrypt/port/caam/caam_driver.h \ + wolfssl/wolfcrypt/port/caam/caam_error.h \ + wolfssl/wolfcrypt/port/caam/caam_qnx.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam_aes.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam_cmac.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam_ecdsa.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam_fsl_nxp.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam_hash.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam_qnx.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam_rsa.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam_seco.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam_sha.h \ + wolfssl/wolfcrypt/port/caam/wolfcaam_x25519.h \ + wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h \ + wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h \ + wolfssl/wolfcrypt/port/cypress/psoc6_crypto.h \ + wolfssl/wolfcrypt/port/devcrypto/wc_devcrypto.h \ + wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h \ + wolfssl/wolfcrypt/port/Espressif/esp-sdk-lib.h \ + wolfssl/wolfcrypt/port/intel/quickassist.h \ + wolfssl/wolfcrypt/port/intel/quickassist_mem.h \ + wolfssl/wolfcrypt/port/intel/quickassist_sync.h \ + wolfssl/wolfcrypt/port/iotsafe/iotsafe.h \ + wolfssl/wolfcrypt/port/kcapi/kcapi_dh.h \ + wolfssl/wolfcrypt/port/kcapi/kcapi_ecc.h \ + wolfssl/wolfcrypt/port/kcapi/kcapi_hash.h \ + wolfssl/wolfcrypt/port/kcapi/kcapi_hmac.h \ + wolfssl/wolfcrypt/port/kcapi/kcapi_rsa.h \ + wolfssl/wolfcrypt/port/kcapi/wc_kcapi.h \ + wolfssl/wolfcrypt/port/liboqs/liboqs.h \ + wolfssl/wolfcrypt/port/maxim/maxq10xx.h \ + wolfssl/wolfcrypt/port/nxp/dcp_port.h \ + wolfssl/wolfcrypt/port/nxp/ksdk_port.h \ + wolfssl/wolfcrypt/port/nxp/se050_port.h \ + wolfssl/wolfcrypt/port/pic32/pic32mz-crypt.h \ + wolfssl/wolfcrypt/port/psa/psa.h \ + wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h \ + wolfssl/wolfcrypt/port/Renesas/renesas_sync.h \ + wolfssl/wolfcrypt/port/Renesas/renesas_tsip_types.h \ + wolfssl/wolfcrypt/port/Renesas/renesas-fspsm-crypt.h \ + wolfssl/wolfcrypt/port/Renesas/renesas-fspsm-types.h \ + wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h \ + wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h \ + wolfssl/wolfcrypt/port/silabs/silabs_aes.h \ + wolfssl/wolfcrypt/port/silabs/silabs_ecc.h \ + wolfssl/wolfcrypt/port/silabs/silabs_hash.h \ + wolfssl/wolfcrypt/port/silabs/silabs_random.h \ + wolfssl/wolfcrypt/port/st/stm32.h \ + wolfssl/wolfcrypt/port/st/stsafe.h \ + wolfssl/wolfcrypt/port/ti/ti-ccm.h \ + wolfssl/wolfcrypt/port/ti/ti-hash.h \ + wolfssl/wolfcrypt/port/xilinx/xil-sha3.h \ + wolfssl/wolfcrypt/port/xilinx/xil-versal-glue.h \ + wolfssl/wolfcrypt/port/xilinx/xil-versal-trng.h + + +# Default rules. +# +# NOTES: +# 1. These files must always be included after the macro definitions and +# before the component-specific rules. + +.INCLUDE:$(SWENGENV)/rules.wnt +.INCLUDE:$(SWENGENV)/intimerules.wnt + +# Component-specific rules, including: +# +# prodeng: checks TARGETS into an engineering release directory using the +# "puttarg.ksh" script. +# +# NOTES: +# 1. The "prodeng" rule must not be renamed or deleted! It should, +# however, be modified to reflect the engineering release requirements +# of the TARGETS. +# +# 2. Rules for each of the TARGETS should be added here. +# +# 3. Additional rules may be added as necessary. Care should be taken so +# that rules defined in the rules.wnt file are not redefined here. + +prodeng: "$(PROD_ENG)/rt/include/wolfssl572/wolfssl" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/openssl" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/af_alg" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/aria" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/arm" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/atmel" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/autosar" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/caam" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/cavium" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/cypress" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/devcrypto" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/espressif" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/intel" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/iotsafe" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/kcapi" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/liboqs" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/maxim" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/nxp" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/pic32" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/psa" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/Renesas" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/riscv" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/silabs" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/st" \ + "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/ti" "$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/xilinx" \ + "$(PROD_ENG)/rt/lib" +[@ +for f in $(EXEC_TARGS); do +$(SWENGENV)/puttarg $(PROD_ENG)/rt/lib $(TARG_DIR)/$$f Engineer $(NAME) "$(MESSAGE)" +done +for f in $(SRC_TARGS); do +$(SWENGENV)/puttarg $(PROD_ENG)/rt/include/wolfssl572 $$f Engineer $(NAME) "$(MESSAGE)" +done + +for f in $(INCL_TARGS); do +dir=`dirname $$f | gres "wolfssl(.*)" "\1"` +if [ ! -d $(PROD_ENG)/rt/include/wolfssl572/wolfssl$$dir ] ; then + mkdir $(PROD_ENG)/rt/include/wolfssl572/wolfssl$$dir +fi +$(SWENGENV)/puttarg $(PROD_ENG)/rt/include/wolfssl572/wolfssl$$dir ../../$$f Engineer $(NAME) "$(MESSAGE)" +done +] + +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/openssl" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfcrypt/port/af_alg" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/aria" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/arm" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/atmel" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/autosar" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/caam" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/cavium" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/cypress" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/devcrypto" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/espressif" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/intel" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/iotsafe" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/kcapi" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/liboqs" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/maxim" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/nxp" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/pic32" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/psa" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/Renesas" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/riscv" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/silabs" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/st" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/ti" \ +"$(PROD_ENG)/rt/include/wolfssl572/wolfssl/wolfcrypt/port/xilinx" \ +"$(PROD_ENG)/rt/lib": + $(MKSBIN)/mkdir -p $@ + +# Build project binaries, project help files, and sub-project binaries. +# +# NOTES: +# 1. To ensure that the correct environment is present when invoking a MS +# Developer Studio makefile, the rule initializes the required +# environment variables in a sub-shell before invoking the makefile. +# +# 2. Path vectors are converted to Microsoft-style pathname slashes +# via 'redmond.ksh' before passing them as environment variables to +# Microsoft tools. + +SOLUTIONFILE = wolfssl-lib.sln +.INCLUDE: $(SWENGENV)/vs2019.wnt + +$(EXEC_TARGS) .PROLOG: rt_tree +[@ +rm -f msbuild.log +msbuild $(SOLUTIONFILE) /t:Rebuild /p:Configuration=$(TARG_TYPE) /fileLogger +ec=$$? +if [ $$ec -ne 0 ]; then + echo Failed to build $(@) +else + echo Success! +fi +exit $$ec +] + diff --git a/IDE/INTIME-RTOS/include.am b/IDE/INTIME-RTOS/include.am index 5828c76ec..7c1288384 100644 --- a/IDE/INTIME-RTOS/include.am +++ b/IDE/INTIME-RTOS/include.am @@ -10,4 +10,7 @@ EXTRA_DIST += \ IDE/INTIME-RTOS/wolfExamples.c \ IDE/INTIME-RTOS/wolfExamples.h \ IDE/INTIME-RTOS/wolfExamples.vcxproj \ - IDE/INTIME-RTOS/wolfExamples.sln + IDE/INTIME-RTOS/wolfExamples.sln \ + IDE/INTIME-RTOS/wolfssl-lib.sln \ + IDE/INTIME-RTOS/wolfssl-lib.vcxproj \ + IDE/INTIME-RTOS/Makefile diff --git a/IDE/INTIME-RTOS/libwolfssl.vcxproj b/IDE/INTIME-RTOS/libwolfssl.vcxproj old mode 100755 new mode 100644 index 77f0703b2..87ab3de8f --- a/IDE/INTIME-RTOS/libwolfssl.vcxproj +++ b/IDE/INTIME-RTOS/libwolfssl.vcxproj @@ -1,210 +1,234 @@ - - - - - Debug - INtime - - - Release - INtime - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {1731767D-573F-45C9-A466-191DA0D180CF} - 8.1 - - - - StaticLibrary - NotSet - v140 - - - StaticLibrary - false - NotSet - v140 - - - - - - - - - - - - $(Configuration)_$(ProjectName)\ - - - $(Configuration)_$(ProjectName)\ - - - - - - 21076.20052 - /SAFESEH:NO %(AdditionalOptions) - rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib - $(SolutionDir)$(Configuration)\\libwolfssl.rsl - - - Async - _USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories) - - - - - - - 21076.20052 - /SAFESEH:NO %(AdditionalOptions) - rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib - $(SolutionDir)$(Configuration)\\libwolfssl.rsl - - - Async - _USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories) - - - - - - + + + + + Debug + INtime + + + Release + INtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {1731767D-573F-45C9-A466-191DA0D180CF} + 8.1 + + + + StaticLibrary + NotSet + v142 + + + StaticLibrary + false + NotSet + v142 + + + + + + + + + + + + $(Configuration)_$(ProjectName)\ + + + $(Configuration)_$(ProjectName)\ + + + + + + 21076.20052 + /SAFESEH:NO %(AdditionalOptions) + rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib + $(SolutionDir)$(Configuration)\\libwolfssl.rsl + + + Async + _USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions) + $(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories) + + + + + + + 21076.20052 + /SAFESEH:NO %(AdditionalOptions) + rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib + $(SolutionDir)$(Configuration)\\libwolfssl.rsl + + + Async + _USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions) + $(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories) + + + + + + \ No newline at end of file diff --git a/IDE/INTIME-RTOS/user_settings.h b/IDE/INTIME-RTOS/user_settings.h index 9b6a9ba07..83be2eec7 100644 --- a/IDE/INTIME-RTOS/user_settings.h +++ b/IDE/INTIME-RTOS/user_settings.h @@ -284,6 +284,9 @@ extern "C" { #undef OPENSSL_EXTRA #define OPENSSL_EXTRA +#undef OPENSSL_ALL +#define OPENSSL_ALL + #undef WOLFSSL_BASE64_ENCODE #define WOLFSSL_BASE64_ENCODE diff --git a/IDE/INTIME-RTOS/wolfExamples.vcxproj b/IDE/INTIME-RTOS/wolfExamples.vcxproj old mode 100755 new mode 100644 index f650244c0..90a8f5d20 --- a/IDE/INTIME-RTOS/wolfExamples.vcxproj +++ b/IDE/INTIME-RTOS/wolfExamples.vcxproj @@ -1,93 +1,93 @@ - - - - - Debug - INtime - - - Release - INtime - - - - - - - - - - - - - - - - {557A7EFD-2627-478A-A855-50F518DD13EE} - wolfExamples - 8.1 - - - - Application - NotSet - v140 - - - Application - false - NotSet - v140 - - - - - - - - - - - - $(Configuration)_$(ProjectName)\ - - - $(Configuration)_$(ProjectName)\ - - - - - - 21076.20053 - /SAFESEH:NO %(AdditionalOptions) - rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib;libwolfssl.lib - $(SolutionDir)$(Configuration)\\wolfExamples.rta - $(ProjectDir)$(Configuration);%(AdditionalLibraryDirectories) - - - Async - WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories) - - - - - - - 21076.20053 - /SAFESEH:NO %(AdditionalOptions) - rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib;libwolfssl.lib - $(SolutionDir)$(Configuration)\\wolfExamples.rta - $(ProjectDir)$(Configuration);%(AdditionalLibraryDirectories) - - - Async - WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories) - $(IntDir)vc$(PlatformToolsetVersion).pdb - - - - - - + + + + + Debug + INtime + + + Release + INtime + + + + + + + + + + + + + + + + {557A7EFD-2627-478A-A855-50F518DD13EE} + wolfExamples + 8.1 + + + + Application + NotSet + v142 + + + Application + false + NotSet + v142 + + + + + + + + + + + + $(Configuration)_$(ProjectName)\ + + + $(Configuration)_$(ProjectName)\ + + + + + + 21076.20053 + /SAFESEH:NO %(AdditionalOptions) + rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib;libwolfssl.lib + $(SolutionDir)$(Configuration)\\wolfExamples.rta + $(ProjectDir)$(Configuration);%(AdditionalLibraryDirectories) + + + Async + WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions) + $(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories) + + + + + + + 21076.20053 + /SAFESEH:NO %(AdditionalOptions) + rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib;libwolfssl.lib + $(SolutionDir)$(Configuration)\\wolfExamples.rta + $(ProjectDir)$(Configuration);%(AdditionalLibraryDirectories) + + + Async + WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + $(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories) + $(IntDir)vc$(PlatformToolsetVersion).pdb + + + + + + \ No newline at end of file diff --git a/IDE/INTIME-RTOS/wolfssl-lib.sln b/IDE/INTIME-RTOS/wolfssl-lib.sln new file mode 100644 index 000000000..8110ac245 --- /dev/null +++ b/IDE/INTIME-RTOS/wolfssl-lib.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolfssl-lib", "wolfssl-lib.vcxproj", "{3BBA3633-A077-4A57-A242-0A22328E5CF6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|INtime = Debug|INtime + Release|INtime = Release|INtime + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3BBA3633-A077-4A57-A242-0A22328E5CF6}.Debug|INtime.ActiveCfg = Debug|INtime + {3BBA3633-A077-4A57-A242-0A22328E5CF6}.Debug|INtime.Build.0 = Debug|INtime + {3BBA3633-A077-4A57-A242-0A22328E5CF6}.Release|INtime.ActiveCfg = Release|INtime + {3BBA3633-A077-4A57-A242-0A22328E5CF6}.Release|INtime.Build.0 = Release|INtime + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/IDE/INTIME-RTOS/wolfssl-lib.vcxproj b/IDE/INTIME-RTOS/wolfssl-lib.vcxproj new file mode 100644 index 000000000..c00ecf0c7 --- /dev/null +++ b/IDE/INTIME-RTOS/wolfssl-lib.vcxproj @@ -0,0 +1,363 @@ + + + + + Debug + INtime + + + Release + INtime + + + + + + + + true + true + + + true + true + + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + true + true + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {3BBA3633-A077-4A57-A242-0A22328E5CF6} + 10.0 + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + false + NotSet + v140 + + + + + + + + + + + + + 0 + Local + 0 + libwolfssl572 + + + 0 + Local + 0 + libwolfssl572 + + + + NotUsing + false + Default + MultiThreaded + DEBUG_WOLFSSL;_USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_DEBUG;INTIME_RTOS;%(PreprocessorDefinitions) + Async + true + false + false + false + false + + + Prompt + $(ProjectDir);$(ProjectDir)..\..\;$(intime)\rt\include\network7;$(intime)\rt\include;%(AdditionalIncludeDirectories) + + + Console + true + rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib + 0 + 21076.20052 + + + false + false + 0 + 0 + 0 + false + PromptImmediately + false + /SAFESEH:NO %(AdditionalOptions) + + + $(SolutionDir)$(Configuration)\$(TargetName).lib + + + + + NotUsing + MultiThreaded + true + false + _USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;INTIME_RTOS;%(PreprocessorDefinitions) + Async + OnlyExplicitInline + true + false + false + false + + + Prompt + $(ProjectDir);$(ProjectDir)..\..\;$(intime)\rt\include\network7;$(intime)\rt\include;%(AdditionalIncludeDirectories) + None + + + Console + false + rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib + 0 + 21076.20052 + + + false + false + 0 + 0 + 0 + PromptImmediately + false + /SAFESEH:NO %(AdditionalOptions) + + + $(SolutionDir)$(Configuration)\$(TargetName).lib + + + + + + \ No newline at end of file diff --git a/IDE/LINUX-SGX/build.sh b/IDE/LINUX-SGX/build.sh index c833b55c6..317765529 100755 --- a/IDE/LINUX-SGX/build.sh +++ b/IDE/LINUX-SGX/build.sh @@ -1,9 +1,22 @@ #!/bin/sh -CFLAGS_NEW="-DDEBUG_WOLFSSL" +CFLAGS_NEW="-DDEBUG_WOLFSSL -I/usr/lib/gcc/x86_64-linux-gnu/$(gcc -dumpversion)/include" export CFLAGS="${CFLAGS} ${CFLAGS_NEW}" echo ${CFLAGS} -make -f sgx_t_static.mk HAVE_WOLFSSL_BENCHMARK=1 HAVE_WOLFSSL_TEST=1 HAVE_WOLFSSL_SP=1 +# create an empty options.h file if none exist +if [ ! -f ../../wolfssl/options.h ]; then + touch ../../wolfssl/options.h +fi + +NEW_INCLUDE_PATH="$C_INCLUDE_PATH:/usr/lib/gcc/x86_64-linux-gnu/$(gcc -dumpversion)/include" +export C_INCLUDE_PATH="$NEW_INCLUDE_PATH" + + +# Build without assembly optimizations +#make -f sgx_t_static.mk HAVE_WOLFSSL_BENCHMARK=1 HAVE_WOLFSSL_TEST=1 HAVE_WOLFSSL_SP=1 + +# Build with assembly optimizations +make -f sgx_t_static.mk HAVE_WOLFSSL_BENCHMARK=1 HAVE_WOLFSSL_TEST=1 HAVE_WOLFSSL_SP=1 HAVE_WOLFSSL_ASSEMBLY=1 diff --git a/IDE/LINUX-SGX/clean.sh b/IDE/LINUX-SGX/clean.sh index 150f46a59..8a7716d3d 100755 --- a/IDE/LINUX-SGX/clean.sh +++ b/IDE/LINUX-SGX/clean.sh @@ -1,3 +1,4 @@ #!/bin/sh -make -f sgx_t_static.mk clean +make -f sgx_t_static.mk HAVE_WOLFSSL_BENCHMARK=1 HAVE_WOLFSSL_TEST=1 HAVE_WOLFSSL_SP=1 HAVE_WOLFSSL_ASSEMBLY=1 clean + diff --git a/IDE/LINUX-SGX/sgx_t_static.mk b/IDE/LINUX-SGX/sgx_t_static.mk index 1941bae02..5af62f7e7 100644 --- a/IDE/LINUX-SGX/sgx_t_static.mk +++ b/IDE/LINUX-SGX/sgx_t_static.mk @@ -44,7 +44,8 @@ endif Crypto_Library_Name := sgx_tcrypto -Wolfssl_C_Extra_Flags := -DWOLFSSL_SGX +Wolfssl_C_Extra_Flags := -DWOLFSSL_SGX\ + -DWOLFSSL_CUSTOM_CONFIG Wolfssl_C_Files :=$(WOLFSSL_ROOT)/wolfcrypt/src/aes.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/arc4.c\ @@ -52,6 +53,7 @@ Wolfssl_C_Files :=$(WOLFSSL_ROOT)/wolfcrypt/src/aes.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/blake2b.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/camellia.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/coding.c\ + $(WOLFSSL_ROOT)/wolfcrypt/src/cpuid.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/chacha.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/chacha20_poly1305.c\ $(WOLFSSL_ROOT)/src/crl.c\ @@ -88,11 +90,40 @@ Wolfssl_C_Files :=$(WOLFSSL_ROOT)/wolfcrypt/src/aes.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/signature.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/sp_c32.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/sp_c64.c\ + $(WOLFSSL_ROOT)/wolfcrypt/src/sp_x86_64.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/sp_int.c\ $(WOLFSSL_ROOT)/src/ssl.c\ $(WOLFSSL_ROOT)/src/tls.c\ $(WOLFSSL_ROOT)/wolfcrypt/src/wc_encrypt.c\ - $(WOLFSSL_ROOT)/wolfcrypt/src/wolfevent.c\ + $(WOLFSSL_ROOT)/wolfcrypt/src/wolfevent.c + + +ifeq ($(HAVE_WOLFSSL_ASSEMBLY), 1) + Wolfssl_ASM_Files := $(WOLFSSL_ROOT)/wolfcrypt/src/aes_asm.asm\ + $(WOLFSSL_ROOT)/wolfcrypt/src/sp_x86_64_asm.asm + + Wolfssl_S_Files := $(WOLFSSL_ROOT)/wolfcrypt/src/aes_asm.S\ + $(WOLFSSL_ROOT)/wolfcrypt/src/aes_gcm_asm.S\ + $(WOLFSSL_ROOT)/wolfcrypt/src/poly1305_asm.S\ + $(WOLFSSL_ROOT)/wolfcrypt/src/sha256_asm.S\ + $(WOLFSSL_ROOT)/wolfcrypt/src/sp_x86_64_asm.S\ + $(WOLFSSL_ROOT)/wolfcrypt/src/aes_xts_asm.S\ + $(WOLFSSL_ROOT)/wolfcrypt/src/sha3_asm.S\ + $(WOLFSSL_ROOT)/wolfcrypt/src/wc_mlkem_asm.S\ + $(WOLFSSL_ROOT)/wolfcrypt/src/chacha_asm.S\ + $(WOLFSSL_ROOT)/wolfcrypt/src/sha512_asm.S + + + Wolfssl_C_Extra_Flags += -DWOLFSSL_X86_64_BUILD\ + -DWOLFSSL_AESNI\ + -maes -mavx -mavx2 -msse4.2 + +ifeq ($(HAVE_WOLFSSL_SP), 1) + Wolfssl_C_Extra_Flags += -DWOLFSSL_SP_X86_64_ASM\ + -DWOLFSSL_SP_X86_64\ + -DWOLFSSL_SP_ASM +endif +endif Wolfssl_Include_Paths := -I$(WOLFSSL_ROOT)/ \ -I$(WOLFSSL_ROOT)/wolfcrypt/ \ @@ -111,7 +142,8 @@ endif ifeq ($(HAVE_WOLFSSL_SP), 1) Wolfssl_C_Extra_Flags += -DWOLFSSL_HAVE_SP_RSA \ -DWOLFSSL_HAVE_SP_DH \ - -DWOLFSSL_HAVE_SP_ECC + -DWOLFSSL_HAVE_SP_ECC \ + -DWOLFSSL_SP_MATH_ALL endif @@ -128,6 +160,8 @@ Wolfssl_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefau -Wl,--version-script=trusted/wolfcrypt.lds Wolfssl_C_Objects := $(Wolfssl_C_Files:.c=.o) +Wolfssl_C_Objects += $(Wolfssl_S_Files:.S=.o) +Wolfssl_C_Objects += $(Wolfssl_ASM_Files:.asm=.o) ifeq ($(SGX_MODE), HW) ifneq ($(SGX_DEBUG), 1) @@ -137,17 +171,17 @@ endif endif endif -override CFLAGS += $(Wolfssl_C_Flags) +override CPPFLAGS += $(Wolfssl_C_Flags) .PHONY: all run all: libwolfssl.sgx.static.lib.a ######## WolfSSL Objects ######## - libwolfssl.sgx.static.lib.a: $(Wolfssl_C_Objects) ar rcs libwolfssl.sgx.static.lib.a $(Wolfssl_C_Objects) @echo "LINK => $@" + @echo "Built with AES-NI ? $(HAVE_WOLFSSL_ASSEMBLY)" clean: @rm -f $(WOLFSSL_ROOT)/wolfcrypt/benchmark/*.o $(WOLFSSL_ROOT)/wolfcrypt/test/*.o static_trusted/wolfssl_t.* libwolfssl.sgx.static.lib.a $(Wolfssl_C_Objects) diff --git a/IDE/Renesas/e2studio/RA6M3/README.md b/IDE/Renesas/e2studio/RA6M3/README.md index 285d89799..9fe04ceba 100644 --- a/IDE/Renesas/e2studio/RA6M3/README.md +++ b/IDE/Renesas/e2studio/RA6M3/README.md @@ -21,25 +21,25 @@ The wolfssl Project Summary is listed below and is relevant for every project. |Board|EK-RA6M3| |Device|R7FA6M3AH3CFC| |Toolchain|GCC ARM Embedded| -|FSP Version|3.5.0| +|FSP Version|6.1.0| #### Selected software components |Components|Version| |:--|:--| -|Board Support Package Common Files|v3.5.0| -|Arm CMSIS Version 5 - Core (M)|v5.8.0+renesas.0.fsp.3.5.0| -|FreeRTOS|v10.4.3-LTS.Patch.2+fsp.3.5.0| -|RA6M3-EK Board Support Files|v3.5.0| -|Board support package for R7FA6M3AH3CFC|v3.5.0| -|Board support package for RA6M3|v3.5.0| -|Board support package for RA6M3 - FSP Data|v3.5.0| -|FreeRTOS - Memory Management - Heap 4|v10.4.3-LTS.Patch.2+fsp.3.5.0| -|r_ether to FreeRTOS+TCP Wrapper|v3.5.0| -|Ethernet|v3.5.0| -|Ethernet PHY|v3.5.0| -|FreeRTOS+TCP|v2.3.2-LTS.Patch.1+fsp.3.5.0| -|FreeRTOS - Buffer Allocation 2|v2.3.2-LTS.Patch.1+fsp.3.5.0| +|Board Support Package Common Files|v6.1.0| +|Arm CMSIS Version 5 - Core (M)|v6.1.0+renesas.0.fsp.6.1.0| +|FreeRTOS|v11.1.0+fsp.6.1.0| +|RA6M3-EK Board Support Files|v6.1.0| +|Board support package for R7FA6M3AH3CFC|v6.1.0| +|Board support package for RA6M3|v6.1.0| +|Board support package for RA6M3 - FSP Data|v6.1.0| +|FreeRTOS - Memory Management - Heap 4|v11.1.0+fsp.6.1.0| +|r_ether to FreeRTOS+TCP Wrapper|v6.1.0| +|Ethernet|v6.1.0| +|Ethernet PHY|v6.1.0| +|FreeRTOS+TCP|v4.3.3+fsp.6.1.0| +|FreeRTOS - Buffer Allocation 2|v4.3.3+fsp.6.1.0| ## Setup Steps @@ -51,11 +51,11 @@ The following steps explain how to generate the missing files and where to place 1.) Create a 'dummy' Renesas RA C Library Project. + Click File->New->`RA C/C++ Project` -+ Click `Renesas RA C Library Project`. Click Next + Enter `dummy_library` as the project name. Click Next. + Under `Board: Custom User Board`, select `EK-RA6M3`. -+ Under `RTOS: No RTOS`, select `FreeRTOS`. -+ Click Next. Select `FreeRTOS - Minimal - Static Allocation` ++ Select `None`. Click Next. ++ Select `Static Library`. Under `RTOS: No RTOS`, select `FreeRTOS`. Click Next ++ Select `FreeRTOS - Minimal - Static Allocation` + Click Finish. + Open Smart Configurator by clicking configuration.xml in the project + Go to `BSP` tab and increase Heap Size under `RA Common` on Properties page, e.g. 0x1000 @@ -64,17 +64,18 @@ The following steps explain how to generate the missing files and where to place |Property|Value| |:--|:--| -|Thread Symbol|wolfssl_tst_thread| -|Thread Name|wolf_tst_thread| +|Thread Symbol|wolfssl_tst_thd| +|Thread Name|wolf_tst_thd| |Thread Stack size|increase depending on your environment
e.g. 0xA000| -|Thread MemoryAllocation|Dynamic| +|Thread Memory Allocation Support Dynamic Allocation|Enabled| +|Memory Allocation Total Heap Size|increase depending on your environment
e.g. 0x20000| |Common General Use Mutexes|Enabled| |Common General Enable Backward Compatibility|Enabled| -|Common Memory Allocation Support Dynamic Allocation|Enabled| -|Common Memory Allocation Total Heap Size|increase depending on your environment
e.g. 0x20000| + + Add `Heap 4` stack to sce_tst_thread from `New Stack` -> `RTOS` -> `FreeRTOS Heap 4` -+ Add `FreeRTOS + TCP` stack to sce_tst_thread from `New Stack` -> `Networking` -> `FreeRTOS+TCP` and set properties ++ Add `FreeRTOS + TCP` stack to sce_tst_thread from `New Stack` -> `Networking` -> `FreeRTOS+TCP` and set properties. Go to `Add Ethernet Driver` box, and click the box to select `New` -> `Ethernet (r_ether)` +. Set properties. |Property|Value| |:--|:--| @@ -84,9 +85,10 @@ The following steps explain how to generate the missing files and where to place 2.) Create a 'dummy' Renesas RA C Project Using RA Library. + Click File->New->`RA C/C++ Project` -+ Click `Renesas RA C Project Using RA Library`. Click Next + Enter `dummy_app` as the project name. Click Next. -+ Under `Executable Using an RA Static library` ++ Under `Board: Custom User Board`, select `EK-RA6M3`. ++ Select `None`. Click Next. ++ Select `Executable Using an RA Static library`, and `No RTOS`. Click Finish + Enter `dummy_app` as the project name. Click Next + Select `dummy_library` from Select Renesas RA library project. + Click Finish. @@ -125,6 +127,7 @@ The following steps explain how to generate the missing files and where to place + Select and Copy the following folder inside dummy_app\ `script/` + `Debug/` + Paste the copied folders into each executable projects which are Crypt test, benchmark, client and server projects\ + The `dummy_app` project can now be deleted. diff --git a/IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/.cproject b/IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/.cproject index 09d968ab0..32e90c14a 100644 --- a/IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/.cproject +++ b/IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/.cproject @@ -54,7 +54,7 @@