Skip to content

Commit 1e7be45

Browse files
committed
Rewrite OCSP tests from bash to Python unittest
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.
1 parent 6a47d6b commit 1e7be45

6 files changed

Lines changed: 343 additions & 603 deletions

File tree

ide/winvs/user_settings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,7 @@
3636
#define HAVE_PKCS7
3737
#define HAVE_PKCS12
3838
#define HAVE_CRL
39+
#define HAVE_OCSP
40+
#define HAVE_OCSP_RESPONDER
3941

4042
#endif /* _WIN_USER_SETTINGS_H_ */

src/ocsp/clu_ocsp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,8 @@ int wolfCLU_OcspSetup(int argc, char** argv)
13071307
return ret;
13081308
}
13091309

1310+
StartTCP();
1311+
13101312
if (!(isClientMode ^ isResponderMode)) {
13111313
wolfCLU_LogError("Can't detect side (client vs responder) or multiple sides specified");
13121314
wolfCLU_OcspHelp();

tests/ocsp/include.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# All paths should be given relative to root directory
44

55
# Only register the consolidated test - interop test is a helper
6-
dist_noinst_SCRIPTS+=tests/ocsp/ocsp-test.sh
6+
dist_noinst_SCRIPTS+=tests/ocsp/ocsp-test.py

0 commit comments

Comments
 (0)