Skip to content

Commit c7bea9d

Browse files
committed
Merge remote-tracking branch 'origin/master' into PQC
# Conflicts: # doc/dox_comments/header_files/doxygen_pages.h
2 parents d4d338e + 2c0c28d commit c7bea9d

356 files changed

Lines changed: 50274 additions & 25512 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.

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ end_of_line = lf
88
charset = utf-8
99
trim_trailing_whitespace = true
1010
insert_final_newline = true
11+
12+
[*.{ads,adb,gpr}]
13+
indent_size = 3

.github/workflows/ada.yml

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,59 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@master
1717

18-
- name: Install gnat
18+
- name: Install alire
19+
uses: alire-project/setup-alire@v5
20+
21+
- name: Install wolfssl Ada
22+
working-directory: ./wrapper/Ada
23+
run: alr install
24+
25+
- name: Build default.gpr
26+
working-directory: ./wrapper/Ada
27+
run: alr exec -- gprbuild default.gpr -j$(nproc)
28+
29+
- name: Run Ada wrapper tests
30+
working-directory: ./wrapper/Ada/tests
31+
run: alr run
32+
33+
- name: Run Ada examples
34+
id: examples
35+
working-directory: ./wrapper/Ada/examples
1936
run: |
20-
sudo apt-get update
21-
sudo apt-get install -y gnat gprbuild
37+
alr build
38+
39+
echo "Running sha256_main example..."
40+
alr run sha256_main
2241
23-
- name: Checkout wolfssl
24-
uses: actions/checkout@master
25-
with:
26-
repository: wolfssl/wolfssl
27-
path: wolfssl
42+
echo "Running aes_verify_main example..."
43+
alr run aes_verify_main
2844
29-
- name: Build wolfssl Ada
30-
working-directory: ./wolfssl/wrapper/Ada
45+
echo "Running rsa_verify_main example..."
46+
alr run rsa_verify_main
47+
48+
echo "Running TLS server/client example..."
49+
alr run tls_server_main &> server.log &
50+
SERVER_PID=$!
51+
sleep 1
52+
echo "test message" | alr run tls_client_main --args=127.0.0.1
53+
kill $SERVER_PID || true
54+
55+
- name: show errors
56+
if: ${{ failure() && steps.examples.outcome == 'failure' }}
57+
run: cat ./wrapper/Ada/examples/server.log
58+
59+
- name: Run Ada wrapper tests (valgrind)
60+
working-directory: ./wrapper/Ada/tests
3161
run: |
32-
mkdir obj
33-
gprbuild default.gpr
34-
gprbuild examples.gpr
62+
sudo apt-get update
63+
sudo apt-get install -y valgrind
64+
valgrind --leak-check=full --error-exitcode=1 \
65+
--suppressions=valgrind.supp ./bin/tests
66+
67+
- name: Run gnatprove on wolfssl
68+
working-directory: ./wrapper/Ada
69+
run: alr gnatprove --level=4 -P wolfssl.gpr -j 0 --warnings=error --checks-as-errors --proof-warnings -U
70+
71+
- name: Run gnatprove on examples
72+
working-directory: ./wrapper/Ada/examples
73+
run: alr gnatprove --level=4 -P examples.gpr -j 0 --warnings=error --checks-as-errors --proof-warnings -U
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Async Examples
2+
3+
on:
4+
push:
5+
branches: [ 'master', 'main', 'release/**' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
async_examples:
15+
if: github.repository_owner == 'wolfssl'
16+
runs-on: ubuntu-24.04
17+
timeout-minutes: 10
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
extra_cflags:
22+
- ''
23+
- '-DWOLFSSL_SMALL_CERT_VERIFY'
24+
- '-DWOLFSSL_STATIC_MEMORY'
25+
name: Async Examples (${{ matrix.extra_cflags || 'default' }})
26+
steps:
27+
- uses: actions/checkout@v4
28+
name: Checkout wolfSSL
29+
30+
- name: Build async examples (no configure)
31+
run: |
32+
make -C examples/async clean
33+
make -C examples/async EXTRA_CFLAGS="${{ matrix.extra_cflags }}"
34+
35+
- name: Run async examples
36+
run: |
37+
set -euo pipefail
38+
39+
MIN_PENDING=100
40+
41+
run_pair() {
42+
local label="$1"
43+
shift
44+
local args="$*"
45+
local ready="/tmp/wolfssl_async_ready_${label}"
46+
rm -f "$ready"
47+
48+
WOLFSSL_ASYNC_READYFILE="$ready" \
49+
./examples/async/async_server $args \
50+
> "/tmp/async_server_${label}.log" 2>&1 &
51+
local pid=$!
52+
53+
WOLFSSL_ASYNC_READYFILE="$ready" \
54+
./examples/async/async_client $args 127.0.0.1 11111 \
55+
> "/tmp/async_client_${label}.log" 2>&1
56+
local rc=$?
57+
58+
kill "$pid" >/dev/null 2>&1 || true
59+
wait "$pid" >/dev/null 2>&1 || true
60+
61+
if [ "$rc" -ne 0 ]; then
62+
echo "FAIL: $label (exit=$rc)"
63+
return 1
64+
fi
65+
66+
# Validate WC_PENDING_E count is a proper value
67+
local count
68+
count=$(awk '/WC_PENDING_E count:/ {print $NF}' \
69+
"/tmp/async_client_${label}.log")
70+
if [ -z "$count" ] || [ "$count" -lt "$MIN_PENDING" ]; then
71+
echo "FAIL: $label - WC_PENDING_E count too low:" \
72+
"${count:-missing} (expected >= $MIN_PENDING)"
73+
return 1
74+
fi
75+
echo "PASS: $label (WC_PENDING_E: $count)"
76+
return 0
77+
}
78+
79+
# TLS 1.3
80+
run_pair ecc_tls13 --ecc
81+
run_pair x25519_tls13 --x25519
82+
83+
# TLS 1.2
84+
run_pair ecc_tls12 --tls12 --ecc
85+
run_pair x25519_tls12 --tls12 --x25519
86+
87+
# TLS 1.3 mutual auth
88+
run_pair ecc_tls13_mutual --mutual --ecc
89+
run_pair x25519_tls13_mutual --mutual --x25519
90+
91+
# TLS 1.2 mutual auth
92+
run_pair ecc_tls12_mutual --mutual --tls12 --ecc
93+
run_pair x25519_tls12_mutual --mutual --tls12 --x25519
94+
95+
96+
- name: Print async logs
97+
if: ${{ failure() }}
98+
run: |
99+
for f in /tmp/async_server_*.log /tmp/async_client_*.log; do
100+
if [ -f "$f" ]; then
101+
echo "==> $f"
102+
cat "$f"
103+
fi
104+
done

.github/workflows/async.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
]
2525
name: make check
2626
if: github.repository_owner == 'wolfssl'
27-
runs-on: ubuntu-22.04
27+
runs-on: ubuntu-24.04
2828
# This should be a safe limit for the tests to run.
2929
timeout-minutes: 6
3030
steps:

.github/workflows/bind.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
name: Build wolfSSL
1818
if: github.repository_owner == 'wolfssl'
1919
# Just to keep it the same as the testing target
20-
runs-on: ubuntu-22.04
20+
runs-on: ubuntu-24.04
2121
# This should be a safe limit for the tests to run.
2222
timeout-minutes: 4
2323
steps:
@@ -47,7 +47,7 @@ jobs:
4747
ref: [ 9.18.0, 9.18.28, 9.18.33 ]
4848
name: ${{ matrix.ref }}
4949
if: github.repository_owner == 'wolfssl'
50-
runs-on: ubuntu-22.04
50+
runs-on: ubuntu-24.04
5151
# This should be a safe limit for the tests to run.
5252
timeout-minutes: 10
5353
needs: build_wolfssl
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: WolfSSL CMake Autoconf Interworking Test
2+
3+
on:
4+
push:
5+
branches: [ 'master', 'main', 'release/**' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
jobs:
10+
build:
11+
if: github.repository_owner == 'wolfssl'
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
# pull wolfSSL
16+
- uses: actions/checkout@v4
17+
18+
# install cmake and autotools
19+
- name: Install cmake
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y cmake autoconf automake libtool
23+
24+
# build and install wolfssl via autotools for CMake consumer test
25+
- name: Build wolfssl with autotools
26+
run: |
27+
./autogen.sh
28+
./configure --prefix="$GITHUB_WORKSPACE/install-autoconf" --enable-all
29+
make -j $(nproc)
30+
make install
31+
32+
# CMake consumer test using the autotools install
33+
- name: CMake consumer test (autotools install)
34+
run: |
35+
mkdir -p cmake/consumer/build
36+
cd cmake/consumer/build
37+
cmake -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/install-autoconf" ..
38+
cmake --build .
39+
./wolfssl_consumer
40+
cd ..
41+
rm -rf build

.github/workflows/cmake.yml

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,24 @@ jobs:
1313

1414
steps:
1515
# pull wolfSSL
16-
- uses: actions/checkout@master
16+
- uses: actions/checkout@v4
1717

1818
# install cmake
1919
- name: Install cmake
2020
run: |
2121
sudo apt-get update
2222
sudo apt-get install -y cmake
2323
24-
# pull wolfssl
25-
- name: Checkout wolfssl
26-
uses: actions/checkout@master
27-
with:
28-
repository: wolfssl/wolfssl
29-
path: wolfssl
30-
3124
# build wolfssl
3225
- name: Build wolfssl
33-
working-directory: ./wolfssl
3426
run: |
3527
mkdir build
3628
cd build
3729
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DWOLFSSL_INSTALL=yes -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install" \
3830
-DWOLFSSL_16BIT:BOOL=no -DWOLFSSL_32BIT:BOOL=no -DWOLFSSL_AES:BOOL=yes \
39-
-DWOLFSSL_AESCBC:BOOL=yes -DWOLFSSL_AESCCM:BOOL=yes -DWOLFSSL_AESCFB:BOOL=yes \
31+
-DWOLFSSL_AESCBC:BOOL=yes -DWOLFSSL_AESCCM:BOOL=yes -DWOLFSSL_AESCFB:BOOL=yes -DWOLFSSL_AESECB:BOOL=yes \
4032
-DWOLFSSL_AESCTR:BOOL=yes -DWOLFSSL_AESGCM:STRING=yes -DWOLFSSL_AESKEYWRAP:BOOL=yes \
41-
-DWOLFSSL_AESOFB:BOOL=yes -DWOLFSSL_AESSIV:BOOL=yes -DWOLFSSL_ALIGN_DATA:BOOL=yes \
33+
-DWOLFSSL_AESOFB:BOOL=yes -DWOLFSSL_AESCTS:BOOL=yes -DWOLFSSL_AESSIV:BOOL=yes -DWOLFSSL_ALIGN_DATA:BOOL=yes \
4234
-DWOLFSSL_ALPN:BOOL=ON -DWOLFSSL_ALT_CERT_CHAINS:BOOL=ON -DWOLFSSL_ARC4:BOOL=yes \
4335
-DWOLFSSL_ARIA:BOOL=no -DWOLFSSL_ASIO:BOOL=no -DWOLFSSL_ASM:BOOL=yes -DWOLFSSL_ASN:BOOL=yes \
4436
-DWOLFSSL_ASYNC_THREADS:BOOL=no -DWOLFSSL_BASE64_ENCODE:BOOL=yes -DWOLFSSL_CAAM:BOOL=no \
@@ -51,7 +43,7 @@ jobs:
5143
-DWOLFSSL_CURVE448:STRING=yes -DWOLFSSL_DEBUG:BOOL=yes -DWOLFSSL_DES3:BOOL=ON \
5244
-DWOLFSSL_DES3_TLS_SUITES:BOOL=no -DWOLFSSL_DH:STRING=yes -DWOLFSSL_DH_DEFAULT_PARAMS:BOOL=yes \
5345
-DWOLFSSL_DSA:BOOL=yes -DWOLFSSL_DTLS:BOOL=ON -DWOLFSSL_DTLS13:BOOL=yes \
54-
-DWOLFSSL_DTLS_CID:BOOL=yes -DWOLFSSL_ECC:STRING=yes \
46+
-DWOLFSSL_DTLS_CID:BOOL=yes -DWOLFSSL_DTLS_CH_FRAG:BOOL=yes -DWOLFSSL_ECC:STRING=yes \
5547
-DWOLFSSL_ECCCUSTCURVES:STRING=all -DWOLFSSL_ECCSHAMIR:BOOL=yes \
5648
-DWOLFSSL_ECH:BOOL=yes -DWOLFSSL_ED25519:BOOL=yes -DWOLFSSL_ED448:STRING=yes \
5749
-DWOLFSSL_ENCKEYS:BOOL=yes -DWOLFSSL_ENC_THEN_MAC:BOOL=yes -DWOLFSSL_ERROR_QUEUE:BOOL=yes \
@@ -78,8 +70,9 @@ jobs:
7870
-DWOLFSSL_TLSX:BOOL=yes -DWOLFSSL_TPM:BOOL=yes -DWOLFSSL_CLU:BOOL=yes -DWOLFSSL_USER_SETTINGS:BOOL=no \
7971
-DWOLFSSL_USER_SETTINGS_ASM:BOOL=no -DWOLFSSL_WOLFSSH:BOOL=ON -DWOLFSSL_X86_64_BUILD_ASM:BOOL=yes \
8072
-DWOLFSSL_MLKEM=1 -DWOLFSSL_LMS=1 -DWOLFSSL_LMSSHA256192=1 -DWOLFSSL_EXPERIMENTAL=1 \
81-
-DWOLFSSL_X963KDF:BOOL=yes \
82-
-DCMAKE_C_FLAGS="-DWOLFSSL_DTLS_CH_FRAG" \
73+
-DWOLFSSL_X963KDF:BOOL=yes -DWOLFSSL_DILITHIUM:BOOL=yes -DWOLFSSL_PKCS11:BOOL=yes \
74+
-DWOLFSSL_ECCSI:BOOL=yes -DWOLFSSL_SAKKE:BOOL=yes -DWOLFSSL_SIPHASH:BOOL=yes \
75+
-DWOLFSSL_WC_RSA_DIRECT:BOOL=yes -DWOLFSSL_PUBLIC_MP:BOOL=yes \
8376
..
8477
cmake --build .
8578
ctest -j $(nproc)
@@ -89,12 +82,8 @@ jobs:
8982
cd ..
9083
rm -rf build
9184
92-
# Kyber Cmake broken
93-
# -DWOLFSSL_KYBER:BOOL=yes
94-
9585
# build "lean-tls" wolfssl
9686
- name: Build wolfssl with lean-tls
97-
working-directory: ./wolfssl
9887
run: |
9988
mkdir build
10089
cd build
@@ -107,3 +96,21 @@ jobs:
10796
# clean up
10897
cd ..
10998
rm -rf build
99+
100+
# CMake build with user_settings.h
101+
- name: Build wolfssl with user_settings.h
102+
run: |
103+
mkdir build
104+
cp examples/configs/user_settings_all.h ./build/user_settings.h
105+
cd build
106+
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DWOLFSSL_INSTALL=yes -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install" \
107+
-DWOLFSSL_USER_SETTINGS=ON -DWOLFSSL_USER_SETTINGS_ASM=ON -DWOLFSSL_EXAMPLES=ON -DWOLFSSL_CRYPT_TESTS=ON \
108+
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -I ." \
109+
..
110+
cmake --build .
111+
ctest -j $(nproc)
112+
cmake --install .
113+
114+
# clean up
115+
cd ..
116+
rm -rf build

.github/workflows/codespell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414
jobs:
1515
codespell:
1616
if: github.repository_owner == 'wolfssl'
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-24.04
1818
steps:
1919
- uses: actions/checkout@v4
2020

@@ -23,7 +23,7 @@ jobs:
2323
check_filenames: true
2424
check_hidden: true
2525
# Add comma separated list of words that occur multiple times that should be ignored (sorted alphabetically, case sensitive)
26-
ignore_words_list: adin,aNULL,brunch,carryIn,chainG,ciph,cLen,cliKs,dout,haveA,inCreated,inOut,inout,larg,LEAPYEAR,Merget,optionA,parm,parms,repid,rIn,userA,ser,siz,te,Te,HSI,
26+
ignore_words_list: adin,aNULL,brunch,carryIn,chainG,ciph,cLen,cliKs,dout,haveA,inCreated,inOut,inout,larg,LEAPYEAR,Merget,optionA,parm,parms,repid,rIn,userA,ser,siz,te,Te,HSI,failT,
2727
# The exclude_file contains lines of code that should be ignored. This is useful for individual lines which have non-words that can safely be ignored.
2828
exclude_file: '.codespellexcludelines'
2929
# To skip files entirely from being processed, add it to the following list:

.github/workflows/coverity-scan-fixes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
coverity:
1212
if: github.repository_owner == 'wolfssl'
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- uses: actions/checkout@v4
1616
with:

.github/workflows/curl.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
build_wolfssl:
1717
name: Build wolfSSL
1818
if: github.repository_owner == 'wolfssl'
19-
runs-on: ubuntu-22.04
19+
runs-on: ubuntu-24.04
2020
# This should be a safe limit for the tests to run.
2121
timeout-minutes: 4
2222
steps:
@@ -40,7 +40,7 @@ jobs:
4040
test_curl:
4141
name: ${{ matrix.curl_ref }}
4242
if: github.repository_owner == 'wolfssl'
43-
runs-on: ubuntu-22.04
43+
runs-on: ubuntu-24.04
4444
# This should be a safe limit for the tests to run.
4545
timeout-minutes: 15
4646
needs: build_wolfssl

0 commit comments

Comments
 (0)