Skip to content

Commit e5a9ae5

Browse files
authored
Merge pull request #286 from aidangarske/ssh-git-test
Add git test for replace default
2 parents 00508d2 + 086adab commit e5a9ae5

Some content is hidden

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

43 files changed

+1772
-183
lines changed

.github/workflows/asan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Asan Test
33
# START OF COMMON SECTION
44
on:
55
push:
6-
branches: [ "*" ]
6+
branches: [ '*' ]
77
pull_request:
8-
branches: [ "*" ]
8+
branches: [ '*' ]
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/bind9.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
wolfssl_ref: [ 'v5.8.2-stable' ]
2525
openssl_ref: [ 'openssl-3.5.2' ]
2626
replace_default: [ true ]
27+
fips: [ false ]
2728

2829
test_bind:
2930
runs-on: ubuntu-22.04
@@ -42,6 +43,7 @@ jobs:
4243
openssl_ref: [ 'openssl-3.5.2' ]
4344
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
4445
replace_default: [ true ]
46+
fips: [ false ]
4547
env:
4648
WOLFSSL_PACKAGES_PATH: /tmp/wolfssl-packages
4749
OPENSSL_PACKAGES_PATH: /tmp/openssl-packages
@@ -81,6 +83,10 @@ jobs:
8183
apt install --reinstall -y \
8284
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb
8385
86+
- name: Verify wolfProvider is properly installed
87+
run: |
88+
$GITHUB_WORKSPACE/scripts/verify-install.sh ${{ matrix.replace_default && '--replace-default' || '' }} ${{ matrix.fips && '--fips' || '' }}
89+
8490
- name: Install bind9 test dependencies
8591
run: |
8692
apt-get update
@@ -113,6 +119,7 @@ jobs:
113119
working-directory: bind9
114120
shell: bash
115121
run: |
122+
116123
set +o pipefail # ignore errors from make check
117124
autoreconf -ivf
118125
./configure

.github/workflows/cjose.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
wolfssl_ref: [ 'v5.8.2-stable' ]
2525
openssl_ref: [ 'openssl-3.5.2' ]
2626
replace_default: [ true ]
27+
fips: [ false ]
2728

2829
test_cjose:
2930
runs-on: ubuntu-22.04
@@ -43,6 +44,7 @@ jobs:
4344
openssl_ref: [ 'openssl-3.5.2' ]
4445
force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ]
4546
replace_default: [ true ]
47+
fips: [ false ]
4648
env:
4749
WOLFSSL_PACKAGES_PATH: /tmp/wolfssl-packages
4850
OPENSSL_PACKAGES_PATH: /tmp/openssl-packages
@@ -88,12 +90,9 @@ jobs:
8890
apt install --reinstall -y \
8991
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb
9092
91-
92-
93-
- name: Check wolfProvider is installed
93+
- name: Verify wolfProvider is properly installed
9494
run: |
95-
openssl list -providers
96-
openssl list -providers | grep -q "wolfSSL Provider" || (echo "ERROR: libwolfprov not found in OpenSSL providers" && exit 1)
95+
$GITHUB_WORKSPACE/scripts/verify-install.sh ${{ matrix.replace_default && '--replace-default' || '' }} ${{ matrix.fips && '--fips' || '' }}
9796
9897
- name: Download cjose
9998
uses: actions/checkout@v4
@@ -114,10 +113,6 @@ jobs:
114113
- name: Run cjose tests
115114
working-directory: cjose
116115
run: |
117-
# wolfProvider is already loaded as the default provider
118-
echo "Current OpenSSL providers:"
119-
openssl list -providers
120-
openssl list -providers | grep -q "wolfSSL Provider" || (echo "ERROR: libwolfprov not found in OpenSSL providers" && exit 1)
121116
export ${{ matrix.force_fail }}
122117
123118
make test 2>&1 | tee cjose-test.log

.github/workflows/curl.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
wolfssl_ref: [ 'v5.8.2-stable' ]
2525
openssl_ref: [ 'openssl-3.5.2' ]
2626
replace_default: [ true ]
27+
fips: [ false ]
2728

2829
test_curl:
2930
runs-on: ubuntu-22.04
@@ -41,9 +42,7 @@ jobs:
4142
openssl_ref: [ 'openssl-3.5.2' ]
4243
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
4344
replace_default: [ true ]
44-
exclude:
45-
- curl_ref: 'master'
46-
force_fail: 'WOLFPROV_FORCE_FAIL=1'
45+
fips: [ false ]
4746
env:
4847
WOLFSSL_PACKAGES_PATH: /tmp/wolfssl-packages
4948
OPENSSL_PACKAGES_PATH: /tmp/openssl-packages
@@ -83,6 +82,10 @@ jobs:
8382
apt install --reinstall -y \
8483
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb
8584
85+
- name: Verify wolfProvider is properly installed
86+
run: |
87+
$GITHUB_WORKSPACE/scripts/verify-install.sh ${{ matrix.replace_default && '--replace-default' || '' }} ${{ matrix.fips && '--fips' || '' }}
88+
8689
- name: Install dependencies
8790
run: |
8891
apt-get update

.github/workflows/debian-package.yml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Debian Package Test
33
# START OF COMMON SECTION
44
on:
55
push:
6-
branches: [ '**' ] # 'master', 'main', 'release/**' ]
6+
branches: [ 'master', 'main', 'release/**' ]
77
pull_request:
88
branches: [ '*' ]
99

@@ -27,6 +27,9 @@ jobs:
2727
replace_default: [ true ]
2828

2929
libwolfprov-standalone:
30+
# Standalone mode is disabled until we re-enable support for it in the debian build.
31+
if: false
32+
3033
runs-on: ubuntu-22.04
3134
needs: build_wolfprovider
3235
# Run inside Debian Bookworm to match packaging environment
@@ -77,11 +80,9 @@ jobs:
7780
apt install --reinstall -y \
7881
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb
7982
80-
- name: Verify installation
83+
- name: Verify wolfProvider is properly installed
8184
run: |
82-
echo "Package Installation Verification:"
83-
dpkg -l | grep libwolfprov
84-
dpkg -L libwolfprov
85+
$GITHUB_WORKSPACE/scripts/verify-install.sh ${{ matrix.fips && '--fips' || '' }}
8586
8687
- name: Test OpenSSL provider functionality
8788
run: |
@@ -184,6 +185,11 @@ jobs:
184185
OPENSSL_PACKAGES_PATH: /tmp/openssl-packages
185186
WOLFPROV_PACKAGES_PATH: /tmp/wolfprov-packages
186187
steps:
188+
- name: Checkout wolfProvider
189+
uses: actions/checkout@v4
190+
with:
191+
fetch-depth: 1
192+
187193
- name: Checking OpenSSL/wolfProvider packages in cache
188194
uses: actions/cache/restore@v4
189195
id: wolfprov-cache
@@ -239,29 +245,9 @@ jobs:
239245
echo "Installed packages after wolfprov:"
240246
dpkg -l | grep -E "(wolfprov|wolfssl|openssl|libssl)"
241247
242-
- name: Test OpenSSL providers after wolfprov installation
248+
- name: Verify wolfProvider is properly installed
243249
run: |
244-
echo "Testing OpenSSL providers after wolfprov installation..."
245-
echo "Expected: This should show wolfprov as an available provider"
246-
247-
# Test openssl list -providers
248-
if openssl list -providers; then
249-
echo "SUCCESS: openssl list -providers works after wolfprov installation"
250-
else
251-
echo "FAILURE: openssl list -providers failed after wolfprov installation"
252-
exit 1
253-
fi
254-
255-
echo "Provider list after wolfprov installation:"
256-
openssl list -providers
257-
258-
# Check if wolfprov provider is available
259-
if openssl list -providers | grep -i "wolfprov"; then
260-
echo "SUCCESS: wolfprov provider is available"
261-
else
262-
echo "WARNING: wolfprov provider not found in provider list"
263-
echo "This might be expected if the provider needs to be explicitly loaded"
264-
fi
250+
$GITHUB_WORKSPACE/scripts/verify-install.sh ${{ matrix.replace_default && '--replace-default' || '' }} ${{ matrix.fips && '--fips' || '' }}
265251
266252
- name: Verify wolfprov configuration
267253
run: |

.github/workflows/git-ssh-dr.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Git SSH Default Replace Tests
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+
build_wolfprovider:
15+
uses: ./.github/workflows/build-wolfprovider.yml
16+
with:
17+
wolfssl_ref: ${{ matrix.wolfssl_ref }}
18+
openssl_ref: ${{ matrix.openssl_ref }}
19+
replace_default: ${{ matrix.replace_default }}
20+
strategy:
21+
matrix:
22+
wolfssl_ref: [ 'v5.8.2-stable' ]
23+
openssl_ref: [ 'openssl-3.5.2' ]
24+
replace_default: [ true ]
25+
fips: [ false ]
26+
27+
git-ssh-default-replace-test:
28+
runs-on: ubuntu-22.04
29+
container:
30+
image: debian:bookworm
31+
env:
32+
DEBIAN_FRONTEND: noninteractive
33+
needs: build_wolfprovider
34+
# This should be a safe limit for the tests to run.
35+
timeout-minutes: 20
36+
strategy:
37+
matrix:
38+
wolfssl_ref: [ 'v5.8.2-stable' ]
39+
openssl_ref: [ 'openssl-3.5.2' ]
40+
replace_default: [ true ]
41+
fips: [ false ]
42+
key_type: [ 'rsa', 'ecdsa', 'ed25519', 'chacha20-poly1305' ]
43+
force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ]
44+
iterations: [ 10 ] # Total of 50 runs
45+
env:
46+
WOLFSSL_PACKAGES_PATH: /tmp/wolfssl-packages
47+
OPENSSL_PACKAGES_PATH: /tmp/openssl-packages
48+
WOLFPROV_PACKAGES_PATH: /tmp/wolfprov-packages
49+
50+
steps:
51+
- name: Checkout wolfProvider
52+
uses: actions/checkout@v4
53+
with:
54+
fetch-depth: 1
55+
56+
- name: Checking OpenSSL/wolfProvider packages in cache
57+
uses: actions/cache/restore@v4
58+
id: wolfprov-cache
59+
with:
60+
path: |
61+
${{ env.WOLFSSL_PACKAGES_PATH }}
62+
${{ env.OPENSSL_PACKAGES_PATH }}
63+
${{ env.WOLFPROV_PACKAGES_PATH }}
64+
key: openssl-wolfprov-debian-packages-${{ github.sha }}${{ matrix.replace_default && '-replace-default' || '' }}
65+
fail-on-cache-miss: true
66+
67+
- name: Install wolfSSL/OpenSSL/wolfprov packages
68+
run: |
69+
printf "Installing OpenSSL/wolfProvider packages:\n"
70+
ls -la ${{ env.WOLFSSL_PACKAGES_PATH }}
71+
ls -la ${{ env.OPENSSL_PACKAGES_PATH }}
72+
ls -la ${{ env.WOLFPROV_PACKAGES_PATH }}
73+
74+
apt install --reinstall -y \
75+
${{ env.WOLFSSL_PACKAGES_PATH }}/libwolfssl_*.deb
76+
77+
apt install --reinstall -y \
78+
${{ env.OPENSSL_PACKAGES_PATH }}/openssl_*.deb \
79+
${{ env.OPENSSL_PACKAGES_PATH }}/libssl3_*.deb \
80+
${{ env.OPENSSL_PACKAGES_PATH }}/libssl-dev_*.deb
81+
82+
apt install --reinstall -y \
83+
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb
84+
85+
- name: Verify wolfProvider is properly installed
86+
run: |
87+
$GITHUB_WORKSPACE/scripts/verify-install.sh ${{ matrix.replace_default && '--replace-default' || '' }} ${{ matrix.fips && '--fips' || '' }}
88+
89+
- name: Set up environment
90+
run: |
91+
export DEBIAN_FRONTEND=noninteractive
92+
apt-get update
93+
apt-get install -y openssh-client openssh-server expect xxd git \
94+
net-tools git-all
95+
96+
- name: Run git + replace default + ssh test
97+
shell: bash
98+
run: |
99+
echo "=== Running Git + replace default + ssh Test ==="
100+
echo "Using the local test script for consistent testing"
101+
# Run the test with the matrix parameters
102+
echo "Testing with key type: ${{ matrix.key_type }}"
103+
echo "Running ${{ matrix.iterations }} iterations"
104+
105+
# Run the scripts test
106+
${{ matrix.force_fail }} ./scripts/test-git-ssh-dr.sh \
107+
--key-types "${{ matrix.key_type }}" \
108+
--iterations "${{ matrix.iterations }}" \
109+
--verbose
110+
111+
echo "=== Test completed for ${{ matrix.key_type }} ==="

.github/workflows/grpc.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
wolfssl_ref: [ 'v5.8.2-stable' ]
2525
openssl_ref: [ 'openssl-3.5.2' ]
2626
replace_default: [ true ]
27+
fips: [ false ]
2728

2829
test_grpc:
2930
runs-on: ubuntu-22.04
@@ -48,6 +49,7 @@ jobs:
4849
wolfssl_ref: [ 'v5.8.2-stable' ]
4950
openssl_ref: [ 'openssl-3.5.2' ]
5051
replace_default: [ true ]
52+
fips: [ false ]
5153
env:
5254
WOLFSSL_PACKAGES_PATH: /tmp/wolfssl-packages
5355
OPENSSL_PACKAGES_PATH: /tmp/openssl-packages
@@ -87,11 +89,15 @@ jobs:
8789
apt install --reinstall -y \
8890
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb
8991
92+
- name: Verify wolfProvider is properly installed
93+
run: |
94+
$GITHUB_WORKSPACE/scripts/verify-install.sh ${{ matrix.replace_default && '--replace-default' || '' }} ${{ matrix.fips && '--fips' || '' }}
95+
9096
- name: Install prerequisites
9197
run: |
9298
apt-get update
93-
apt-get install -y build-essential autoconf libtool pkg-config clang libc++-dev \
94-
iproute2 clang net-tools git python3-six
99+
apt-get install -y build-essential autoconf libtool pkg-config clang \
100+
libc++-dev iproute2 net-tools git python3-six
95101
96102
- name: Confirm IPv4 and IPv6 support
97103
run: |
@@ -129,6 +135,7 @@ jobs:
129135
- name: Run grpc tests with wolfProvider
130136
working-directory: ./grpc
131137
run: |
138+
132139
# Start the port server
133140
./tools/run_tests/start_port_server.py
134141

.github/workflows/iperf.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
wolfssl_ref: [ 'v5.8.2-stable' ]
2525
openssl_ref: [ 'openssl-3.5.2' ]
2626
replace_default: [ true ]
27+
fips: [ false ]
2728

2829
test_iperf:
2930
runs-on: ubuntu-22.04
@@ -41,6 +42,7 @@ jobs:
4142
openssl_ref: [ 'openssl-3.5.2' ]
4243
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
4344
replace_default: [ true ]
45+
fips: [ false ]
4446
env:
4547
WOLFSSL_PACKAGES_PATH: /tmp/wolfssl-packages
4648
OPENSSL_PACKAGES_PATH: /tmp/openssl-packages
@@ -80,10 +82,15 @@ jobs:
8082
apt install --reinstall -y \
8183
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb
8284
85+
- name: Verify wolfProvider is properly installed
86+
run: |
87+
$GITHUB_WORKSPACE/scripts/verify-install.sh ${{ matrix.replace_default && '--replace-default' || '' }} ${{ matrix.fips && '--fips' || '' }}
88+
8389
- name: Install dependencies
8490
run: |
8591
apt-get update
86-
apt-get install -y build-essential autoconf libtool pkg-config clang libc++-dev
92+
apt-get install -y build-essential autoconf libtool pkg-config clang \
93+
libc++-dev
8794
8895
- name: Checkout iperf
8996
uses: actions/checkout@v4

0 commit comments

Comments
 (0)