Skip to content

Commit 97b6b00

Browse files
committed
Merge branch 'master' of https://github.com/wolfssl/wolfssl
2 parents 2fafa72 + 5a5a8c9 commit 97b6b00

114 files changed

Lines changed: 3433 additions & 1266 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/multi-compiler.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,32 @@ jobs:
1212
include:
1313
- CC: gcc-9
1414
CXX: g++-9
15+
OS: ubuntu-latest
1516
- CC: gcc-10
1617
CXX: g++-10
18+
OS: ubuntu-latest
1719
- CC: gcc-11
1820
CXX: g++-11
21+
OS: ubuntu-latest
1922
- CC: gcc-12
2023
CXX: g++-12
24+
OS: ubuntu-latest
25+
- CC: clang-10
26+
CXX: clang++-10
27+
OS: ubuntu-20.04
28+
- CC: clang-11
29+
CXX: clang++-11
30+
OS: ubuntu-20.04
2131
- CC: clang-12
2232
CXX: clang++-12
33+
OS: ubuntu-20.04
2334
- CC: clang-13
2435
CXX: clang++-13
36+
OS: ubuntu-latest
2537
- CC: clang-14
2638
CXX: clang++-14
27-
runs-on: ubuntu-latest
39+
OS: ubuntu-latest
40+
runs-on: ${{ matrix.OS }}
2841
# This should be a safe limit for the tests to run.
2942
timeout-minutes: 4
3043
steps:
@@ -34,3 +47,7 @@ jobs:
3447
CC: ${{ matrix.CC }}
3548
CXX: ${{ matrix.CXX }}
3649
run: ./autogen.sh && ./configure && make && make dist
50+
- name: Show log on errors
51+
if: ${{ failure() }}
52+
run: |
53+
cat config.log

.github/workflows/os-check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
--enable-opensslextra --enable-sessioncerts
2020
CPPFLAGS=''-DWOLFSSL_DTLS_NO_HVR_ON_RESUME -DHAVE_EXT_CACHE
2121
-DWOLFSSL_TICKET_HAVE_ID -DHAVE_EX_DATA -DSESSION_CACHE_DYNAMIC_MEM'' ',
22+
'--enable-all --enable-secure-renegotiation',
23+
'--enable-all --enable-haproxy --enable-quic',
2224
]
2325
name: make check
2426
runs-on: ${{ matrix.os }}

.github/workflows/packaging.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ jobs:
1616
- name: Configure wolfSSL
1717
run: |
1818
autoreconf -ivf
19-
./configure --enable-distro --disable-examples --disable-silent-rules
19+
./configure --enable-distro --enable-all \
20+
--disable-openssl-compatible-defaults --enable-intelasm \
21+
--enable-dtls13 --enable-dtls-mtu \
22+
--enable-sp-asm --disable-examples --disable-silent-rules
23+
24+
- name: Make sure OPENSSL_COMPATIBLE_DEFAULTS is not present in options.h
25+
run: |
26+
! grep OPENSSL_COMPATIBLE_DEFAULTS wolfssl/options.h
2027
2128
- name: Build wolfSSL .deb
2229
run: make deb-docker

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ XXX-fips-test
410410

411411
# ASYNC
412412
/wolfAsyncCrypt
413+
/async
413414

414415
# Generated user_settings_asm.h.
415416
user_settings_asm.h

Docker/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ ARG UID=1000
1818
ARG GID=1000
1919
RUN groupadd -f -g ${GID} docker && ( getent passwd ${UID} || useradd -ms /bin/bash ${USER} -u ${UID} -g ${GID} )
2020

21+
# Add github.com as an SSH known host
22+
RUN ssh -o StrictHostKeyChecking=no -T git@github.com; cat ~/.ssh/known_hosts >> /etc/ssh/ssh_known_hosts
23+
2124
# install ccache
2225
RUN mkdir -p /opt/ccache/bin && for prog in gcc g++ cc c++ cpp arm-none-eabi-c++ arm-none-eabi-cpp arm-none-eabi-gcc arm-none-eabi-g++; do ln -s /usr/bin/ccache /opt/ccache/bin/$(basename $prog); done
2326
ENV PATH /opt/ccache/bin:$PATH
@@ -44,4 +47,7 @@ RUN setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/tcpdump
4447
# Allow non-root to use gdb on processes (will need SYS_PTRACE capability when running the container)
4548
RUN setcap 'CAP_SYS_PTRACE+eip' /usr/bin/gdb
4649

47-
USER ${UID}:${GID}
50+
# Add in Jenkins userID
51+
RUN for i in $(seq 1001 1010); do ( getent passwd ${i} || useradd -ms /bin/bash jenkins${i} -u ${i} -g ${GID} ); done
52+
53+
USER ${UID}:${GID}

Docker/Dockerfile.cross-compiler

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ARG DOCKER_BASE_IMAGE=wolfssl/wolfssl-builder
2+
FROM $DOCKER_BASE_IMAGE
3+
4+
USER root
5+
6+
ARG DEPS_TESTING="gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu"
7+
RUN DEBIAN_FRONTEND=noninteractive apt update \
8+
&& apt install -y ${DEPS_TESTING} \
9+
&& apt clean -y && rm -rf /var/lib/apt/lists/*
10+
11+
USER docker

Docker/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ This is a Docker environment for compiling, testing and running WolfSSL. Use `ru
33

44
When the compilation and tests succeed, you will be dropped in to a shell environment within the container. This can be useful to build other things within the environment. Additional tests can be run as well as debugging of code.
55

6+
# Docker Hub
7+
These images are also uploaded to the wolfSSL's [Docker Hub page](https://hub.docker.com/orgs/wolfssl/repositories). There is a convenience script here `buildAndPush.sh` that will create the appropriate containers and push them to the repo.
8+
69
# FAQ
710
## permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
811
You need to be added to the `docker` group to run Docker containers. Run `sudo usermod -aG docker $USER`. You may need to restart the Docker daemon.
912

1013
## Unable to access symlinked files outside of WolfSSL
1114
The volume mounted in the Docker container needs to have all files that your compilation will need. To solve this, you have a couple options:
1215
1. Change the `WOLFSSL_DIR` variable in the `run.sh` to one higher up (by adding `/..` to the path). Then update the `docker build` to include the correct path to the Dockerfile and the `docker run` argument to the working directory (`-w`) to the WolfSSL source directory
13-
2. Move the external repository to within the WolfSSL directory. For example create an `external` folder which has your files. This route may have complications when stashing Git work.
16+
2. Move the external repository to within the WolfSSL directory. For example create an `external` folder which has your files. This route may have complications when stashing Git work.

Docker/buildAndPush.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
# Assume we're in wolfssl/Docker
4+
WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/..; pwd)
5+
6+
DOCKER_BUILD_OPTIONS="$1"
7+
if [ "${DOCKER_BASE_IMAGE}" != "" ]; then
8+
DOCKER_BUILD_OPTIONS+=" --build-arg DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}"
9+
fi
10+
11+
NUM_FAILURES=0
12+
13+
CUR_DATE=$(date -u +%F)
14+
echo "Building wolfssl/wolfssl-builder:${CUR_DATE} as ${DOCKER_BUILD_OPTIONS}"
15+
docker build -t wolfssl/wolfssl-builder:${CUR_DATE} ${DOCKER_BUILD_OPTIONS} "${WOLFSSL_DIR}/Docker" && \
16+
docker tag wolfssl/wolfssl-builder:${CUR_DATE} wolfssl/wolfssl-builder:latest && \
17+
docker build --build-arg DOCKER_BASE_IMAGE=wolfssl/wolfssl-builder:${CUR_DATE} -t wolfssl/testing-cross-compiler:${CUR_DATE} "${WOLFSSL_DIR}/Docker" -f Dockerfile.cross-compiler && \
18+
docker tag wolfssl/testing-cross-compiler:${CUR_DATE} wolfssl/testing-cross-compiler:latest
19+
20+
if [ $? -eq 0 ]; then
21+
echo "Pushing containers to DockerHub"
22+
docker push wolfssl/wolfssl-builder:${CUR_DATE} && docker push wolfssl/wolfssl-builder:latest && \
23+
docker push wolfssl/testing-cross-compiler:${CUR_DATE} && docker push wolfssl/testing-cross-compiler:latest
24+
else
25+
echo "Warning: Build wolfssl/wolfssl-builder failed. Continuing"
26+
((NUM_FAILURES++))
27+
fi
28+
29+
echo "Building wolfssl/wolfCLU:${CUR_DATE}"
30+
docker buildx build --pull --push --build-arg DUMMY=${CUR_DATE} -t wolfssl/wolfclu:${CUR_DATE} --platform=linux/amd64,linux/arm64,linux/arm/v7 "${WOLFSSL_DIR}/Docker/wolfCLU" && \
31+
docker buildx build --pull --push --build-arg DUMMY=${CUR_DATE} -t wolfssl/wolfclu:latest --platform=linux/amd64,linux/arm64,linux/arm/v7 "${WOLFSSL_DIR}/Docker/wolfCLU"
32+
if [ $? -ne 0 ]; then
33+
echo "Warning: Build wolfssl/wolfclu failed. Continuing"
34+
((NUM_FAILURES++))
35+
fi
36+
37+
echo "Script completed in $SECONDS seconds. Had $NUM_FAILURES failures."

Docker/include.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
# All paths should be given relative to the root
44

55
EXTRA_DIST+= Docker/Dockerfile
6+
EXTRA_DIST+= Docker/Dockerfile.cross-compiler
67
EXTRA_DIST+= Docker/run.sh
78
EXTRA_DIST+= Docker/README.md
89

10+
ignore_files+=Docker/buildAndPush.sh
911
ignore_files+=Docker/OpenWRT/Dockerfile
1012
ignore_files+=Docker/OpenWRT/runTests.sh
1113
ignore_files+=Docker/OpenWRT/README.md

Docker/run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ echo "Running with \"${*}\"..."
55
# Assume we're in wolfssl/Docker
66
WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/..; pwd)
77

8-
docker build -t wolfssl --build-arg UID=$(id -u) --build-arg GID=$(id -g) "${WOLFSSL_DIR}/Docker" && \
9-
docker run --rm -it -v ${HOME}/.gitconfig:/home/docker/.gitconfig:ro -v ${HOME}/.ssh:/home/docker/.ssh:ro -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl /bin/bash -c "./autogen.sh && ./configure ${*@Q} && make" && \
10-
docker run --rm -it -v ${HOME}/.gitconfig:/home/docker/.gitconfig:ro -v ${HOME}/.ssh:/home/docker/.ssh:ro -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl /bin/bash
8+
docker build -t wolfssl/wolfssl-builder --build-arg UID=$(id -u) --build-arg GID=$(id -g) "${WOLFSSL_DIR}/Docker" && \
9+
docker run --rm -it -v ${HOME}/.gitconfig:/home/docker/.gitconfig:ro -v ${HOME}/.ssh:/home/docker/.ssh:ro -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl/wolfssl-builder /bin/bash -c "./autogen.sh && ./configure ${*@Q} && make" && \
10+
docker run --rm -it -v ${HOME}/.gitconfig:/home/docker/.gitconfig:ro -v ${HOME}/.ssh:/home/docker/.ssh:ro -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl/wolfssl-builder /bin/bash
1111

1212
exitval=$?
1313
echo "Exited with error code $exitval"

0 commit comments

Comments
 (0)