提交 8f8c11d8 编写于 作者: R Richard Levitte

Don't build OCSP stuff when OCSP is disabled

Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2173)
上级 327d38d0
......@@ -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)
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册