Skip to content

Commit d0929af

Browse files
committed
Fix no-ocsp.
Reviewed-by: Richard Levitte <levitte@openssl.org>
1 parent d8631eb commit d0929af

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/sslapitest.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@
2121
static char *cert = NULL;
2222
static char *privkey = NULL;
2323

24+
#ifndef OPENSSL_NO_OCSP
2425
static const unsigned char orespder[] = "Dummy OCSP Response";
2526
static int ocsp_server_called = 0;
2627
static int ocsp_client_called = 0;
2728

2829
static int cdummyarg = 1;
2930
static X509 *ocspcert = NULL;
31+
#endif
3032

3133
#define NUM_EXTRA_CERTS 40
3234

@@ -116,6 +118,7 @@ static int test_large_message_dtls(void)
116118
}
117119
#endif
118120

121+
#ifndef OPENSSL_NO_OCSP
119122
static int ocsp_server_cb(SSL *s, void *arg)
120123
{
121124
int *argi = (int *)arg;
@@ -167,6 +170,7 @@ static int ocsp_client_cb(SSL *s, void *arg)
167170
return 1;
168171
}
169172

173+
170174
static int test_tlsext_status_type(void)
171175
{
172176
SSL_CTX *cctx = NULL, *sctx = NULL;
@@ -349,6 +353,7 @@ static int test_tlsext_status_type(void)
349353

350354
return testresult;
351355
}
356+
#endif /* ndef OPENSSL_NO_OCSP */
352357

353358
typedef struct ssl_session_test_fixture {
354359
const char *test_case_name;
@@ -866,7 +871,9 @@ int main(int argc, char *argv[])
866871
#ifndef OPENSSL_NO_DTLS
867872
ADD_TEST(test_large_message_dtls);
868873
#endif
874+
#ifndef OPENSSL_NO_OCSP
869875
ADD_TEST(test_tlsext_status_type);
876+
#endif
870877
ADD_TEST(test_session_with_only_int_cache);
871878
ADD_TEST(test_session_with_only_ext_cache);
872879
ADD_TEST(test_session_with_both_cache);

0 commit comments

Comments
 (0)