forked from wolfSSL/wolfssl
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'wolfSSL:master' into zig-pkg
- Loading branch information
Showing
65 changed files
with
3,873 additions
and
1,508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM ubuntu | ||
|
||
# Set timezone to UTC | ||
RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev python3-subunit mesa-common-dev zstd liblz4-tool file locales libacl1 vim && apt clean -y && rm -rf /var/lib/apt/lists/* | ||
RUN locale-gen en_US.UTF-8 | ||
|
||
# Add in non-root user | ||
ENV UID_OF_DOCKERUSER 1000 | ||
RUN useradd -m -s /bin/bash -g users -u ${UID_OF_DOCKERUSER} dockerUser | ||
RUN chown -R dockerUser:users /home/dockerUser && chown dockerUser:users /opt | ||
|
||
USER dockerUser | ||
|
||
RUN cd /opt && git clone git://git.yoctoproject.org/poky | ||
WORKDIR /opt/poky | ||
|
||
ARG YOCTO_VERSION=kirkstone | ||
RUN git checkout -t origin/${YOCTO_VERSION} -b ${YOCTO_VERSION} && git pull | ||
|
||
RUN /bin/bash -c "source oe-init-build-env && bitbake core-image-minimal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Assume we're in wolfssl/Docker/yocto | ||
WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/../..; pwd) | ||
|
||
DOCKER_BUILD_OPTIONS="$1" | ||
if [ "${DOCKER_BASE_IMAGE}" != "" ]; then | ||
DOCKER_BUILD_OPTIONS+=" --build-arg DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}" | ||
fi | ||
|
||
NUM_FAILURES=0 | ||
|
||
CUR_DATE=$(date -u +%F) | ||
for ver in kirkstone dunfell; do | ||
echo "Building wolfssl/yocto:${ver}-${CUR_DATE} as ${DOCKER_BUILD_OPTIONS}" | ||
docker build -t wolfssl/yocto:${ver}-${CUR_DATE} --build-arg YOCTO_VERSION=${ver} -f Dockerfile "${WOLFSSL_DIR}/Docker/yocto" && \ | ||
docker tag wolfssl/yocto:${ver}-${CUR_DATE} wolfssl/yocto:${ver}-latest | ||
if [ $? -eq 0 ]; then | ||
echo "Pushing containers to DockerHub" | ||
docker push wolfssl/yocto:${ver}-${CUR_DATE} && docker push wolfssl/yocto:${ver}-latest | ||
else | ||
echo "Warning: Build wolfssl/yocto:${ver} failed. Continuing" | ||
((NUM_FAILURES++)) | ||
fi | ||
done | ||
|
||
echo "Script completed in $SECONDS seconds. Had $NUM_FAILURES failures." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Arduino wolfSSL Library | ||
|
||
The library is modified from wolfSSL Release ${WOLFSSL_VERSION} for the Arduino platform. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Syntax Coloring Map For wolfSSL | ||
# See https://arduino.github.io/arduino-cli/0.35/library-specification/#keywords | ||
# | ||
# Be sure to use tabs, not spaces. This might help: | ||
# tr ' ' '\t' < keywords1.txt > keywords.txt | ||
|
||
#============================================= | ||
# Datatypes (KEYWORD1) | ||
#============================================= | ||
|
||
|
||
#============================================= | ||
# Methods and Functions (KEYWORD2) | ||
#============================================= | ||
wolfSSL_SetIORecv KEYWORD1 | ||
|
||
#============================================= | ||
# Instances (KEYWORD2) | ||
#============================================= | ||
ctx KEYWORD2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name=wolfSSL | ||
version=${WOLFSSL_VERSION}${WOLFSSL_VERSION_ARUINO_SUFFIX} | ||
author=wolfSSL inc | ||
maintainer=wolfSSL inc <support@wolfssl.com> | ||
sentence=A lightweight SSL/TLS library written in ANSI C and targeted for embedded, RTOS, and resource-constrained environments. | ||
paragraph=Manual: https://www.wolfssl.com/documentation/manuals/wolfssl/index.html. | ||
category=Communication | ||
url=https://www.wolfssl.com/ | ||
architectures=* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# wolfSSL Arduino Examples | ||
|
||
There are currently two example Arduino sketches: | ||
|
||
* [wolfssl_client](./wolfssl_client/README.md): Basic TLS listening client. | ||
* [wolfssl_server](./wolfssl_server/README.md): Basic TLS server. | ||
|
||
Examples have been most recently confirmed operational on the | ||
[Arduino IDE](https://www.arduino.cc/en/software) 2.2.1. | ||
|
||
For examples on other platforms, see the [IDE directory](https://github.com/wolfssl/wolfssl/tree/master/IDE). | ||
Additional examples can be found on [wolfSSL/wolfssl-examples](https://github.com/wolfSSL/wolfssl-examples/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Arduino Basic TLS Listening Client | ||
|
||
Open the [wolfssl_client.ino](./wolfssl_client.ino) file in the Arduino IDE. | ||
|
||
Other IDE products are also supported, such as: | ||
|
||
- [PlatformIO in VS Code](https://docs.platformio.org/en/latest/frameworks/arduino.html) | ||
- [VisualGDB](https://visualgdb.com/tutorials/arduino/) | ||
- [VisualMicro](https://www.visualmicro.com/) | ||
|
||
For examples on other platforms, see the [IDE directory](https://github.com/wolfssl/wolfssl/tree/master/IDE). | ||
Additional examples can be found on [wolfSSL/wolfssl-examples](https://github.com/wolfSSL/wolfssl-examples/). | ||
|
||
|
||
### Troubleshooting | ||
|
||
When encountering odd errors such as `undefined reference to ``_impure_ptr'`, try cleaning the Arduino | ||
cache directories. For Windows, that's typically in: | ||
|
||
```text | ||
C:\Users\%USERNAME%\AppData\Local\Temp\arduino\sketches | ||
``` |
Oops, something went wrong.