Skip to content

wolfssl 5.8.0 Release for Arduino #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025
Merged

Conversation

gojimmypi
Copy link
Contributor

wolfSSL 5.8.0 Release for Arduino

This is not the final release of v5.8.0 for Arduino, rather the as-released version of wolfssl v5.8.0-stable.

I plan to apply a minor post release fix that did not make it in time for the wolfssl release as I was traveling. See wolfSSL/wolfssl#8668 which I will apply here in a separate PR before publishing this repo to the Arduino library.

Unlike the prior 5.7.6 Release, this PR used a more elaborate script wrapper for wolfssl-arduino.sh, in particular to clone fresh repositories such as the examples moved to wolfSSL/wolfssl-examples/Arduino in wolfSSL/wolfssl-examples#499 and wolfSSL/wolfssl#8514:

# start from a clean publish directory:
cd /mnt/c/temp/
mkdir publish
cd publish

# set version to publish
WOLFSSL_VERSION=5.8.0
WOLFSSL_VERSION_TAG=v$WOLFSSL_VERSION-stable

# set repo root current user is using arduino-wolfssl from fork
export THIS_USER=$(whoami)

# set repo root using wolfssl from supplementary fork, otherwise current user
export REPO_USER=wolfSSL
# export REPO_USER=$(whoami)

# root from which clones created and used for publishing
THIS_ROOT=$(pwd)

# Assume we'll use the latest master of wolfssl-examples-publish
export WOLFSSL_EXAMPLES_ROOT="$THIS_ROOT/wolfssl-examples-publish"
echo "Publishing examples from: $WOLFSSL_EXAMPLES_ROOT"
echo "WOLFSSL_VERSION: $WOLFSSL_VERSION"
echo "WOLFSSL_VERSION_TAG: $WOLFSSL_VERSION_TAG"

# Checkout clean repositories
git clone https://github.com/$REPO_USER/wolfssl.git          wolfssl-publish
git clone https://github.com/$REPO_USER/wolfssl-examples.git wolfssl-examples-publish
git clone https://github.com/$THIS_USER/arduino-wolfssl.git  arduino-wolfssl-publish


# Checkout the wolfSSL release.
cd wolfssl-publish
git fetch --tags
git checkout "$WOLFSSL_VERSION_TAG"
cd "$THIS_ROOT/wolfssl-publish/IDE/ARDUINO"

# Optionally install locally for testing.
# If removing an existing install, consider saving any changes that may have been made to
#
# ~/Arduino/libraries/wolfssl/src/user_settings.h
#
# ./wolfssl-arduino.sh INSTALL

# Install to arduino-wolfssl-publish. This is the directory from which to create a new PR:
./wolfssl-arduino.sh INSTALL "$THIS_ROOT/arduino-wolfssl-publish"


# Commit to create version update PR
# We'll create a arduino-wolfssl PR from a THIS_USER fork
cd "$THIS_ROOT/arduino-wolfssl-publish"
git remote add upstream https://github.com/wolfSSL/arduino-wolfssl.git

# Ensure any new files are included
git add .
git checkout -b Arduino-$WOLFSSL_VERSION
# (gpg sign as needed here), then commit:
git commit -m "wolfssl $WOLFSSL_VERSION Release for Arduino"

# push commit, disabled here:
# git push

echo "git push and cleanup skipped"
exit 0

# cleanup
echo "Cleanup: $THIS_ROOT"
rm -rf "$THIS_ROOT/wolfssl-publish"
rm -rf "$THIS_ROOT/wolfssl-examples-publish"
rm -rf "$THIS_ROOT/arduino-wolfssl-publish"

Output from wolfssl-arduino.sh should look like:

$ ./wolfssl-arduino.sh INSTALL "$THIS_ROOT/arduino-wolfssl-publish"
The Arduino library root is: /home/gojimmypi/Arduino/libraries
Install is active.
Installing to /home/gojimmypi/arduino-wolfssl-publish
Target is a GitHub root repository.
EXTRA_EXAMPLES_DIR=/home/gojimmypi/wolfssl-examples-publish/Arduino
Found wolfSSL version 5.8.0
# WOLFSSL_VERSION_ARUINO_SUFFIX

Step 01: mkdir ./wolfssl
Step 02: mkdir ./wolfssl/src
Step 03: mkdir ./wolfssl/src/wolfssl
Step 04: cp    ../../wolfssl/*.h              ./wolfssl/src/wolfssl
Step 05: mkdir ./wolfssl/src/wolfssl/wolfcrypt
Step 06: cp    ../../wolfssl/wolfcrypt/*.h    ./wolfssl/src/wolfssl/wolfcrypt
Step 07: mkdir ./wolfssl/src/wolfcrypt
Step 08: mkdir ./wolfssl/src/wolfcrypt/src
Step 09: cp    ../../wolfcrypt/src/*.c        ./wolfssl/src/wolfcrypt/src
Step 10: mkdir ./wolfssl/src/src
Copy examples....
Copy template example....
Copy wolfssl_AES_CTR example....
Copy wolfssl_client example....
Copy wolfssl_server example....
Copy wolfssl_version example....
Step 11: Final root file copy
Step 12: Workspace to publish:

# Arduino wolfSSL Library

This library is restructured from [wolfSSL](https://github.com/wolfSSL/wolfssl/) Release 5.8.0 for the Arduino platform.

total 456
drwxr-xr-x 1 gojimmypi gojimmypi    512 May  7 10:22 .
drwxr-xr-x 1 gojimmypi gojimmypi    512 May  7 10:22 ..
-rw-r--r-- 1 gojimmypi gojimmypi    173 May  7 10:22 .editorconfig
-rw-r--r-- 1 gojimmypi gojimmypi  11242 May  7 10:22 .gitignore
-rw-r--r-- 1 gojimmypi gojimmypi  18092 May  7 10:22 COPYING
-rw-r--r-- 1 gojimmypi gojimmypi 298312 May  7 10:22 ChangeLog.md
-rw-r--r-- 1 gojimmypi gojimmypi    469 May  7 10:22 LICENSING
-rw-r--r-- 1 gojimmypi gojimmypi  14852 May  7 10:22 README
-rw-r--r-- 1 gojimmypi gojimmypi  19906 May  7 10:22 README.md
drwxr-xr-x 1 gojimmypi gojimmypi    512 May  7 10:22 examples
-rw-r--r-- 1 gojimmypi gojimmypi    623 May  7 10:22 keywords.txt
-rw-r--r-- 1 gojimmypi gojimmypi    373 May  7 10:22 library.properties
drwxr-xr-x 1 gojimmypi gojimmypi    512 May  7 10:22 src

Config:
cp ../../examples/configs/user_settings_arduino.h  ./wolfssl/src/user_settings.h
#define WOLFSSL_USER_SETTINGS_ID "Arduino user_settings.h v5.7.6"

Installing to GitHub directory: /home/gojimmypi/arduino-wolfssl-publish
Removing workspace library directory: ./wolfssl
Done!

Reminder that the Arduino library requires this repository to be updated, and a tag created before being available in the Arduino library. See the requirements of Arduino libraries as described in the Arduino Library Specification.

See also:

https://downloads.arduino.cc/libraries/logs/github.com/wolfSSL/Arduino-wolfSSL/

https://docs.arduino.cc/learn/starting-guide/software-libraries/

Initial #1 and prior #8

@dgarske dgarske merged commit a2f4ff3 into wolfSSL:main May 7, 2025
@gojimmypi
Copy link
Contributor Author

@dgarske thank you for the prompt review and merge.

I've created https://github.com/wolfSSL/Arduino-wolfSSL/releases/tag/5.8.0 that should be automatically published to Arduino library soon.

See https://downloads.arduino.cc/libraries/logs/github.com/wolfSSL/Arduino-wolfSSL/ for Arduino publishing status. It should be available within an hour or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants