16
16
build_wolfprovider :
17
17
name : Build wolfProvider
18
18
runs-on : ubuntu-22.04
19
- timeout-minutes : 20
19
+ timeout-minutes : 10
20
20
strategy :
21
21
matrix :
22
22
wolfssl_ref : [ 'master', 'v5.7.4-stable' ]
35
35
wolfssl-install
36
36
wolfprov-install
37
37
provider.conf
38
-
39
38
key : wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
40
39
lookup-only : true
41
40
@@ -48,89 +47,27 @@ jobs:
48
47
path : |
49
48
openssl-source
50
49
openssl-install
51
-
52
50
key : ossl-depends
53
51
54
52
# If not yet built this version, build it now
55
53
- name : Build wolfProvider
56
54
if : steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
57
55
run : |
58
56
WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
59
-
60
- - name : Print errors
61
- if : ${{ failure() }}
62
- run : |
63
- if [ -f test-suite.log ] ; then
64
- cat test-suite.log
65
- fi
66
-
67
- build_wolfprovider_force_fail :
68
- name : Build wolfProvider with FORCE_FAIL
69
- runs-on : ubuntu-22.04
70
- timeout-minutes : 20
71
- strategy :
72
- matrix :
73
- wolfssl_ref : [ 'master', 'v5.7.4-stable' ]
74
- steps :
75
- - name : Checkout wolfProvider
76
- uses : actions/checkout@v4
77
-
78
- # Check if this version of wolfssl/wolfprovider has already been built,
79
- # mark to cache these items on post if we do end up building
80
- - name : Checking wolfSSL/wolfProvider in cache
81
- uses : actions/cache@v4
82
- id : wolfprov-force-fail-cache
83
- with :
84
- path : |
85
- wolfssl-source-force-fail
86
- wolfssl-install-force-fail
87
- wolfprov-install-force-fail
88
- provider-force-fail.conf
89
-
90
- key : wolfprov-force-fail-${{ matrix.wolfssl_ref }}-${{ github.sha }}
91
- lookup-only : true
92
-
93
- # If wolfssl/wolfprovider have not yet been built, pull ossl from cache
94
- - name : Checking OpenSSL in cache
95
- if : steps.wolfprov-force-fail-cache.outputs.cache-hit != 'true'
96
- uses : actions/cache@v4
97
- id : openssl-cache
98
- with :
99
- path : |
100
- openssl-source
101
- openssl-install
102
-
103
- key : ossl-depends
104
-
105
- # If not yet built this version, build it now with FORCE_FAIL
106
- - name : Build wolfProvider with FORCE_FAIL
107
- if : steps.wolfprov-force-fail-cache.outputs.cache-hit != 'true'
108
- run : |
109
- # Build with FORCE_FAIL enabled
110
- WOLFPROV_DEBUG=1 WOLFPROV_FORCE_FAIL=1 WOLFSSL_TAG=${{ matrix.wolfssl_ref }} \
111
- WOLFSSL_SOURCE_DIR=$GITHUB_WORKSPACE/wolfssl-source-force-fail \
112
- WOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/wolfssl-install-force-fail \
113
- WOLFPROV_INSTALL_DIR=$GITHUB_WORKSPACE/wolfprov-install-force-fail \
114
- ./scripts/build-wolfprovider.sh
115
-
116
- # Create a provider.conf file for the force-fail build
117
- cp provider.conf provider-force-fail.conf
118
-
119
57
- name : Print errors
120
58
if : ${{ failure() }}
121
59
run : |
122
60
if [ -f test-suite.log ] ; then
123
61
cat test-suite.log
124
62
fi
125
-
126
63
test_stunnel :
127
64
runs-on : ubuntu-22.04
128
65
needs : build_wolfprovider
129
66
# This should be a safe limit for the tests to run.
130
- timeout-minutes : 20
67
+ timeout-minutes : 10
131
68
strategy :
132
69
matrix :
133
- stunnel_ref : [ 'master', '5.71' ]
70
+ stunnel_ref : [ 5.67 ]
134
71
wolfssl_ref : [ 'master', 'v5.7.4-stable' ]
135
72
steps :
136
73
- name : Retrieving OpenSSL from cache
140
77
path : |
141
78
openssl-source
142
79
openssl-install
143
-
144
80
key : ossl-depends
145
81
fail-on-cache-miss : true
146
82
@@ -153,92 +89,31 @@ jobs:
153
89
wolfssl-install
154
90
wolfprov-install
155
91
provider.conf
156
-
157
92
key : wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
158
93
fail-on-cache-miss : true
159
94
160
- - name : Install stunnel dependencies
95
+ - name : Install dependencies
161
96
run : |
162
97
sudo apt-get update
163
- sudo apt-get install -y libwrap0-dev
164
-
98
+ sudo apt-get install -y build-essential autoconf automake \
99
+ libtool pkg-config libwrap0-dev autoconf-archive \
100
+ autotools-dev m4
165
101
- name : Build stunnel
166
102
uses : wolfSSL/actions-build-autotools-project@v1
167
103
with :
168
104
repository : mtrojnar/stunnel
105
+ ref : stunnel-${{ matrix.stunnel_ref }}
169
106
path : stunnel
170
- ref : ${{ matrix.stunnel_ref }}
171
- configure : --with-ssl=$GITHUB_WORKSPACE/openssl-install
172
- check : false
107
+ configure : --with-ssl=$GITHUB_WORKSPACE/openssl-install/
108
+ check : true
173
109
174
- - name : Test stunnel with wolfProvider
175
- working-directory : stunnel
110
+ - name : Verify stunnel with wolfProvider
111
+ working-directory : ./ stunnel
176
112
run : |
113
+ # Setup environment for wolfProvider
177
114
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/wolfssl-install/lib:$GITHUB_WORKSPACE/openssl-install/lib64
178
115
export OPENSSL_CONF=$GITHUB_WORKSPACE/provider.conf
179
116
export OPENSSL_MODULES=$GITHUB_WORKSPACE/wolfprov-install/lib
117
+ # Verify stunnel
118
+ ldd src/stunnel | grep -E '(libssl|libcrypto)'
180
119
./src/stunnel -version
181
- make check
182
-
183
- test_stunnel_force_fail :
184
- runs-on : ubuntu-22.04
185
- needs : build_wolfprovider_force_fail
186
- # This should be a safe limit for the tests to run.
187
- timeout-minutes : 20
188
- strategy :
189
- matrix :
190
- stunnel_ref : [ 'master', '5.71' ]
191
- wolfssl_ref : [ 'master', 'v5.7.4-stable' ]
192
- steps :
193
- - name : Retrieving OpenSSL from cache
194
- uses : actions/cache/restore@v4
195
- id : openssl-cache
196
- with :
197
- path : |
198
- openssl-source
199
- openssl-install
200
-
201
- key : ossl-depends
202
- fail-on-cache-miss : true
203
-
204
- - name : Retrieving wolfSSL/wolfProvider from cache
205
- uses : actions/cache/restore@v4
206
- id : wolfprov-force-fail-cache
207
- with :
208
- path : |
209
- wolfssl-source-force-fail
210
- wolfssl-install-force-fail
211
- wolfprov-install-force-fail
212
- provider-force-fail.conf
213
-
214
- key : wolfprov-force-fail-${{ matrix.wolfssl_ref }}-${{ github.sha }}
215
- fail-on-cache-miss : true
216
-
217
- - name : Install stunnel dependencies
218
- run : |
219
- sudo apt-get update
220
- sudo apt-get install -y libwrap0-dev
221
-
222
- - name : Build stunnel
223
- uses : wolfSSL/actions-build-autotools-project@v1
224
- with :
225
- repository : mtrojnar/stunnel
226
- path : stunnel
227
- ref : ${{ matrix.stunnel_ref }}
228
- configure : --with-ssl=$GITHUB_WORKSPACE/openssl-install
229
- check : false
230
-
231
- - name : Test stunnel with wolfProvider (FORCE_FAIL)
232
- working-directory : stunnel
233
- run : |
234
- export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/wolfssl-install-force-fail/lib:$GITHUB_WORKSPACE/openssl-install/lib64
235
- export OPENSSL_CONF=$GITHUB_WORKSPACE/provider-force-fail.conf
236
- export OPENSSL_MODULES=$GITHUB_WORKSPACE/wolfprov-install-force-fail/lib
237
-
238
- # Verify that stunnel fails when using wolfProvider with FORCE_FAIL
239
- # First check that stunnel version works (doesn't use provider)
240
- ./src/stunnel -version
241
-
242
- # Now run a test that should fail due to WOLFPROV_FORCE_FAIL=1
243
- # We expect this to fail, so we invert the exit code
244
- ! make check || (echo "ERROR: Tests passed with WOLFPROV_FORCE_FAIL=1, which indicates wolfProvider is not being used" && exit 1)
0 commit comments