wolfSSL / Arduino-wolfSSL

This repository is a restructured copy of https://github.com/wolfSSL/wolfssl/ for the Arduino environment. Any Pull Requests for code changes should be opened there.
https://www.wolfssl.com
GNU General Public License v2.0
11 stars 7 forks source link

Arduino examples needed #4

Open gojimmypi opened 7 months ago

gojimmypi commented 7 months ago

As noted in https://github.com/arduino/library-registry/pull/4056#issuecomment-1947527696 the wolfSSL Arduino examples should be added to this repository.

Additionally, the wolfCrypt Benchmark and wolfCrypt Test apps should be adapted to Arduino and added here as well.

The wolfssl-arduino.sh install script will need to be updated.

tobozo commented 7 months ago

On Arduino I'm getting same error as in this issue) , which can only be solved by modifying the core.

However Arduino-WolfSSL works as a library dependency with platformio and espidf, the only missing bit to get it there is the library.json file at the root of the project.

Here's the file I've added on my local copy (limited to esp32):

library.json

{
  "name": "wolfssl",
  "description": "A lightweight SSL/TLS library written in ANSI C and targeted for embedded, RTOS, and resource-constrained environments. Manual: https://www.wolfssl.com/documentation/manuals/wolfssl/index.html.",
  "keywords": "wolfssl, ssl, tls",
  "authors": {
    "name": "wolfSSL inc",
    "url": "https://github.com/wolfSSL",
    "maintainer": true
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/wolfSSL/Arduino-WolfSSL.git"
  },
  "version": "5.6.6-Arduino.1",
  "frameworks": ["arduino", "espidf", "*"],
  "platforms": ["espressif32"],
  "headers": ["wolfssl.h"],
  "build": {
    "libArchive": false
  }
}
gojimmypi commented 7 months ago

Hi @tobozo & thanks for taking this new wolfSSL Arduino library for a test drive!

There are indeed some outstanding issues that need to still be resolved:

I'm hoping to get these issues tidied up in the very near future at which time I plan to publish a blog on getting started.

I certainly appreciate your interest and thanks for sending along the sample library library.json. I'm interested in your thoughts on the Espressif espressif/arduino-esp32 ... how you use it any why... in comparison to the regular ESP-IDF or the Arduino IDE.

Best Regards

gojimmypi commented 7 months ago

Hi @tobozo

With the recent merge of https://github.com/wolfSSL/wolfssl/pull/7304 and #5, there are now 2 new Arduino IDE examples in place:

There's a pending release that should include these in the Arduino IDE examples menu. (see log).

You can test drive right away by using the wolfssl-arduino.sh script, with instructions in the description for #5 and/or the README

Please try it out and let me know how it goes. Thank you.

gojimmypi commented 5 months ago

A considerable amount of progress has been made on the wolfSSL Arduino library.

The latest release is now published at the Arduino Registry:

https://www.arduino.cc/reference/en/libraries/wolfssl/

This Arduino-wolfSSL also now contains the above-mentioned TLS Client and Server examples. They can be found in the Arduino IDE under:

File - Examples - (Examples from Custom Libraries) - wolfssl - wolfssl_server

image

I've been able to get wolfSSL TLS working on an Arduino device with as little as 32KB RAM. See my microblog where I used the Arduino Nano 33 IoT SAMD21 with only 32KB RAM + 256KB flash.

I'm leaving this issue open, as I still need to add the wolfssl_test and wolfssl_benchmark examples.

I also have wolfSSL over at PlatformIO, including Arduino support.

For those interested in post-release updates for PlatformIO, there's a wolfssl-staging owner.