Commit d730ccf
committed
Rewrite tests into python scripts for easier portability
- Add shared test helper and cross-platform test runner
- Extract binary lookup and run_wolfssl() into tests/wolfclu_test.py so all test files share the same logic for finding the wolfssl binary across Linux (./wolfssl) and Windows (x64/Debug/wolfssl.exe etc.).
- Add tests/run_tests.py which discovers and runs all *-test.py files, intended for Windows where `make check` is not available.
- Enable PKCS7 and CRL in MSVC
- Fix three Windows bugs uncovered by the test:
- Add StartTCP() (WSAStartup) in client and server setup so Winsock is initialized before gethostbyname/connect calls
- Pass SNI hostname (-S flag) to the underlying client_test so modern TLS servers accept the connection
- Implement checkStdin() for Windows using WaitForSingleObject so s_client exits promptly when stdin is a closed pipe
- Update user_settings.h with defines required for TLS 1.3 and full wolfCLU functionality: WOLFSSL_TLS13, HAVE_HKDF, WC_RSA_PSS, HAVE_SUPPORTED_CURVES, HAVE_FFDHE_2048, HAVE_SNI.
- Fix run_wolfssl() to use stdin=DEVNULL when no input is provided, preventing subprocesses from blocking on inherited stdin (e.g. over SSH/network sessions on Windows).
- Also add WOLFCLU_SKIP_SLOW_TESTS env var to skip slow tests on Windows, and optimize large file creation to a single write.
- Add HAVE_PKCS12 to Windows user_settings.h. Skip binary DER stdin test on Windows where pipe binary mode is unreliable.
- Combine ocsp-test.sh and ocsp-interop-test.sh into a single Python test module that tests all client/responder combinations (wolfssl and openssl).
- Add StartTCP() in OCSP setup for Winsock initialization on Windows.
- Add HAVE_OCSP and HAVE_OCSP_RESPONDER to Windows user_settings.h.
- Rewrite base64 test from bash to Python unittest
- Rewrite bench test from bash to Python unittest
- Rewrite client test to Python and fix Windows networking bugs
- Replace tests/client/client-test.sh with a cross-platform Python unittest.
- Rewrite dgst test from bash to Python unittest
- Rewrite dh test from bash to Python unittest
- Rewrite dsa test from bash to Python unittest
- Rewrite enc test from bash to Python unittest
- Rewrite genkey sign/verify test from bash to Python unittest
- Rewrite hash test from bash to Python unittest
- Rewrite pkcs7/pkcs8/pkcs12 tests from bash to Python unittest
- Rewrite pkey/rsa/ecparam tests from bash to Python unittest
- Rewrite rand test from bash to Python unittest
- Rewrite server test from bash to Python unittest
- Rewrite encdec test from bash to Python unittest
- Rewrite x509/CRL tests from bash to Python unittest
- Rewrite OCSP tests from bash to Python unittest
- Rewrite OCSP SCGI test from bash to Python, drop nginx dependency
- Replace nginx + bash with a pure-Python HTTP-to-SCGI proxy using stdlib http.server and raw sockets for the SCGI netstring protocol. No external dependencies needed.
- Remove nginx from CI apt-get installs since it is no longer required for testing.1 parent cb5d98a commit d730ccf
84 files changed
Lines changed: 5250 additions & 4143 deletions
File tree
- .github/workflows
- ide/winvs
- src
- client
- ocsp
- server
- tools
- tests
- base64
- bench
- client
- dgst
- dh
- dsa
- encrypt
- genkey_sign_ver
- hash
- ocsp-scgi
- ocsp
- pkcs
- pkey
- rand
- server
- testEncDec
- x509
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
30 | 41 | | |
31 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2091 | 2091 | | |
2092 | 2092 | | |
2093 | 2093 | | |
2094 | | - | |
2095 | 2094 | | |
2096 | 2095 | | |
2097 | 2096 | | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
2098 | 2109 | | |
2099 | 2110 | | |
2100 | 2111 | | |
| |||
2107 | 2118 | | |
2108 | 2119 | | |
2109 | 2120 | | |
2110 | | - | |
| 2121 | + | |
2111 | 2122 | | |
2112 | | - | |
2113 | 2123 | | |
2114 | | - | |
2115 | 2124 | | |
2116 | 2125 | | |
2117 | 2126 | | |
| |||
4224 | 4233 | | |
4225 | 4234 | | |
4226 | 4235 | | |
4227 | | - | |
4228 | 4236 | | |
4229 | 4237 | | |
4230 | 4238 | | |
| |||
4234 | 4242 | | |
4235 | 4243 | | |
4236 | 4244 | | |
4237 | | - | |
4238 | 4245 | | |
4239 | 4246 | | |
4240 | 4247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
196 | 205 | | |
197 | 206 | | |
198 | 207 | | |
| |||
264 | 273 | | |
265 | 274 | | |
266 | 275 | | |
| 276 | + | |
267 | 277 | | |
268 | 278 | | |
269 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1307 | 1307 | | |
1308 | 1308 | | |
1309 | 1309 | | |
| 1310 | + | |
| 1311 | + | |
1310 | 1312 | | |
1311 | 1313 | | |
1312 | 1314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| |||
0 commit comments