Commit 8f8c11d8 authored by Richard Levitte's avatar Richard Levitte
Browse files

Don't build OCSP stuff when OCSP is disabled

parent 327d38d0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -20,9 +20,11 @@ static int final_ec_pt_formats(SSL *s, unsigned int context, int sent,
                                       int *al);
#endif
static int init_session_ticket(SSL *s, unsigned int context);
#ifndef OPENSSL_NO_OCSP
static int init_status_request(SSL *s, unsigned int context);
static int final_status_request(SSL *s, unsigned int context, int sent,
                                        int *al);
#endif
#ifndef OPENSSL_NO_NEXTPROTONEG
static int init_npn(SSL *s, unsigned int context);
#endif
@@ -777,6 +779,7 @@ static int init_session_ticket(SSL *s, unsigned int context)
    return 1;
}

#ifndef OPENSSL_NO_OCSP
static int init_status_request(SSL *s, unsigned int context)
{
    if (s->server)
@@ -801,6 +804,7 @@ static int final_status_request(SSL *s, unsigned int context, int sent,

    return 1;
}
#endif

#ifndef OPENSSL_NO_NEXTPROTONEG
static int init_npn(SSL *s, unsigned int context)
+6 −0
Original line number Diff line number Diff line
@@ -23,12 +23,14 @@
static char *cert = NULL;
static char *privkey = NULL;

#ifndef OPENSSL_NO_OCSP
static const unsigned char orespder[] = "Dummy OCSP Response";
static int ocsp_server_called = 0;
static int ocsp_client_called = 0;

static int cdummyarg = 1;
static X509 *ocspcert = NULL;
#endif

#define NUM_EXTRA_CERTS 40

@@ -145,6 +147,7 @@ static int test_large_message_dtls(void)
}
#endif

#ifndef OPENSSL_NO_OCSP
static int ocsp_server_cb(SSL *s, void *arg)
{
    int *argi = (int *)arg;
@@ -378,6 +381,7 @@ static int test_tlsext_status_type(void)

    return testresult;
}
#endif

typedef struct ssl_session_test_fixture {
    const char *test_case_name;
@@ -1022,7 +1026,9 @@ int test_main(int argc, char *argv[])
#ifndef OPENSSL_NO_DTLS
    ADD_TEST(test_large_message_dtls);
#endif
#ifndef OPENSSL_NO_OCSP
    ADD_TEST(test_tlsext_status_type);
#endif
    ADD_TEST(test_session_with_only_int_cache);
    ADD_TEST(test_session_with_only_ext_cache);
    ADD_TEST(test_session_with_both_cache);