Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/packages/debian-wolfssl.tar.gz
Binary file not shown.
19 changes: 15 additions & 4 deletions .github/scripts/check-workflow-result.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,30 +107,41 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then

# Define expected failures
EXPECTED_FAILS="auth_token_testdriver crypto_testdriver pkt_testdriver tls_crypt_testdriver"

# This test may fail when replace-default is enabled
OPTIONAL_FAILS="provider_testdriver"

# Create temporary files for sorted lists
TEMP_DIR=$(mktemp -d)
ACTUAL_SORTED="${TEMP_DIR}/actual_sorted.txt"
EXPECTED_SORTED="${TEMP_DIR}/expected_sorted.txt"
OPTIONAL_SORTED="${TEMP_DIR}/optional_sorted.txt"

# Clean and sort both lists
echo "$ACTUAL_FAILS" | tr ' ' '\n' | grep -v '^$' | sort > "$ACTUAL_SORTED"
echo "$EXPECTED_FAILS" | tr ' ' '\n' | grep -v '^$' | sort > "$EXPECTED_SORTED"

echo "$OPTIONAL_FAILS" | tr ' ' '\n' | grep -v '^$' | sort > "$OPTIONAL_SORTED"

echo "DEBUG: Actual failed tests: $(tr '\n' ' ' < "$ACTUAL_SORTED")"
echo "DEBUG: Expected failed tests: $(tr '\n' ' ' < "$EXPECTED_SORTED")"

echo "DEBUG: Optional failed tests: $(tr '\n' ' ' < "$OPTIONAL_SORTED")"

# Find missing in actual (in expected but not in actual)
MISSING=$(comm -23 "$EXPECTED_SORTED" "$ACTUAL_SORTED" | tr '\n' ' ')
# Find extra in actual (in actual but not in expected)
EXTRA=$(comm -13 "$EXPECTED_SORTED" "$ACTUAL_SORTED" | tr '\n' ' ')

# Strip out optional failures
EXTRA=$(comm -23 "$EXTRA" "$OPTIONAL_SORTED" | tr '\n' ' ')
# List the optional failures
OPTIONAL_FAILS=$(comm -13 "$EXPECTED_SORTED" "$OPTIONAL_SORTED" | tr '\n' ' ')

# Clean up temporary files
rm -rf "$TEMP_DIR"

echo "Test(s) that should have failed: $MISSING"
echo "Test(s) that shouldn't have failed: $EXTRA"

echo "Test(s) that failed (optional): $OPTIONAL_FAILS"

if [ -z "$MISSING" ] && [ -z "$EXTRA" ]; then
echo "PASS: Actual failed tests match expected."
exit 0
Expand Down
64 changes: 64 additions & 0 deletions .github/scripts/install-packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash
# install-packages.sh
#
# Copyright (C) 2006-2025 wolfSSL Inc.
#
# This file is part of wolfProvider.
#
# wolfProvider is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# wolfProvider is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with wolfProvider. If not, see <http://www.gnu.org/licenses/>.

set -e

echo "WolfSSL artifacts:"
ls -la /tmp/wolfssl-artifacts || true
echo "OpenSSL/wolfProvider artifacts:"
ls -la /tmp/openssl-wolfprov-artifacts || true

# Install wolfSSL first
wolfssl_debs=$(ls -1 /tmp/wolfssl-artifacts/*.deb 2>/dev/null || true)
if [ -n "$wolfssl_debs" ]; then
echo "Installing wolfSSL packages: $wolfssl_debs"
apt install -y $wolfssl_debs
fi

# Install OpenSSL packages (runtime + development headers)
openssl_debs=$(ls -1 /tmp/openssl-wolfprov-artifacts/openssl_[0-9]*.deb 2>/dev/null || true)
libssl3_debs=$(ls -1 /tmp/openssl-wolfprov-artifacts/libssl3_[0-9]*.deb 2>/dev/null || true)
libssl_dev_debs=$(ls -1 /tmp/openssl-wolfprov-artifacts/libssl-dev_[0-9]*.deb 2>/dev/null || true)

# Install in dependency order: libssl3 first, then openssl, then dev headers
if [ -n "$libssl3_debs" ]; then
echo "Installing libssl3: $libssl3_debs"
apt install -y $libssl3_debs
fi
if [ -n "$openssl_debs" ]; then
echo "Installing openssl: $openssl_debs"
apt install -y $openssl_debs
fi
if [ -n "$libssl_dev_debs" ]; then
echo "Installing libssl-dev: $libssl_dev_debs"
apt install -y $libssl_dev_debs
fi

# Install wolfProvider main package only (no dev/debug needed for testing)
wolfprov_main=$(ls -1 /tmp/openssl-wolfprov-artifacts/libwolfprov_[0-9]*.deb 2>/dev/null | head -n1 || true)

if [ -z "$wolfprov_main" ]; then
echo "ERROR: libwolfprov main package not found in artifacts"
ls -la /tmp/openssl-wolfprov-artifacts
exit 1
fi

echo "Installing wolfProvider main package: $wolfprov_main"
apt install -y "$wolfprov_main"
17 changes: 6 additions & 11 deletions .github/scripts/pam-pkcs11-test.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
#!/bin/bash
set -euo pipefail
set -x

echo "[*] Setting up environment..."
SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)/$(basename "$0")"
REPO_ROOT=$(git -C "$(dirname "$SCRIPT_PATH")" rev-parse --show-toplevel)
source $REPO_ROOT/scripts/env-setup || true

if [[ -z "${OPENSSL_MODULES:-}" ]]; then
echo "Environment not set up: OPENSSL_MODULES is not defined or empty"
exit 1
elif [[ ! -d "$OPENSSL_MODULES" ]]; then
echo "Could not find wolfProvider at $OPENSSL_MODULES"
echo "Please build it first..."
# Confirm wolfProvider is configured by running openssl list -providers
if openssl list -providers | grep -qi wolf; then
echo "wolfProvider is configured"
else
echo "wolfProvider is not configured"
exit 1
fi

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Asan Test
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
#pull_request:
#branches: [ "*" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
75 changes: 50 additions & 25 deletions .github/workflows/bind9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Bind9 Tests
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
#pull_request:
#branches: [ '*' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -18,52 +18,78 @@ jobs:
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
openssl_ref: ${{ matrix.openssl_ref }}
replace_default: ${{ matrix.replace_default }}
strategy:
matrix:
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
openssl_ref: [ 'openssl-3.5.0' ]
wolfssl_ref: [ 'v5.8.2-stable' ]
openssl_ref: [ 'openssl-3.5.2' ]
replace_default: [ true ]

test_bind:
runs-on: ubuntu-22.04
container:
image: debian:bookworm
env:
DEBIAN_FRONTEND: noninteractive
needs: build_wolfprovider
# This should be a safe limit for the tests to run.
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
bind_ref: [ 'v9.18.28' ]
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
openssl_ref: [ 'openssl-3.5.0' ]
wolfssl_ref: [ 'v5.8.2-stable' ]
openssl_ref: [ 'openssl-3.5.2' ]
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
replace_default: [ true ]
env:
WOLFSSL_PACKAGES_PATH: /tmp/wolfssl-packages
OPENSSL_PACKAGES_PATH: /tmp/openssl-packages
WOLFPROV_PACKAGES_PATH: /tmp/wolfprov-packages
steps:
- name: Checkout wolfProvider
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Retrieving wolfSSL/wolfProvider from cache
- name: Checking OpenSSL/wolfProvider packages in cache
uses: actions/cache/restore@v4
id: wolfprov-cache
with:
path: |
wolfssl-install
wolfprov-install
openssl-install/lib64
openssl-install/include
openssl-install/bin

key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
${{ env.WOLFSSL_PACKAGES_PATH }}
${{ env.OPENSSL_PACKAGES_PATH }}
${{ env.WOLFPROV_PACKAGES_PATH }}
key: openssl-wolfprov-debian-packages-${{ github.sha }}${{ matrix.replace_default && '-replace-default' || '' }}
fail-on-cache-miss: true

- name: Install wolfSSL/OpenSSL/wolfprov packages
run: |
printf "Installing OpenSSL/wolfProvider packages:\n"
ls -la ${{ env.WOLFSSL_PACKAGES_PATH }}
ls -la ${{ env.OPENSSL_PACKAGES_PATH }}
ls -la ${{ env.WOLFPROV_PACKAGES_PATH }}

apt install --reinstall -y \
${{ env.WOLFSSL_PACKAGES_PATH }}/libwolfssl_*.deb

apt install --reinstall -y \
${{ env.OPENSSL_PACKAGES_PATH }}/openssl_*.deb \
${{ env.OPENSSL_PACKAGES_PATH }}/libssl3_*.deb \
${{ env.OPENSSL_PACKAGES_PATH }}/libssl-dev_*.deb

apt install --reinstall -y \
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb

- name: Install bind9 test dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt install -y build-essential automake libtool gnutls-bin \
pkg-config make libidn2-dev libuv1-dev libnghttp2-dev libcap-dev \
libjemalloc-dev zlib1g-dev libxml2-dev libjson-c-dev libcmocka-dev \
python3-pytest python3-dnspython python3-hypothesis
sudo PERL_MM_USE_DEFAULT=1 cpan -i Net::DNS
apt-get update
apt install -y build-essential automake libtool gnutls-bin \
pkg-config make libidn2-dev libuv1-dev libnghttp2-dev libcap-dev \
libjemalloc-dev zlib1g-dev libxml2-dev libjson-c-dev libcmocka-dev \
python3-pytest python3-dnspython python3-hypothesis patch iproute2 \
net-tools
PERL_MM_USE_DEFAULT=1 cpan -i Net::DNS

- name: Checkout bind9
uses: actions/checkout@v4
Expand All @@ -85,15 +111,14 @@ jobs:

- name: Build and test bind9 with wolfProvider
working-directory: bind9
shell: bash
run: |
# Set up the environment for wolfProvider
source $GITHUB_WORKSPACE/scripts/env-setup

set +o pipefail # ignore errors from make check
autoreconf -ivf
./configure
make clean
make -j$(nproc)
sudo ./bin/tests/system/ifconfig.sh up
./bin/tests/system/ifconfig.sh up

export ${{ matrix.force_fail }}
make -j$(nproc) check 2>&1 | tee bind9-test.log
Expand Down
Loading
Loading