]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tools: use OCSP functions only when OCSP is enabled
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 24 Dec 2014 22:16:17 +0000 (00:16 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 24 Dec 2014 22:16:17 +0000 (00:16 +0200)
src/cli-debug.c
src/common.c
src/tests.c

index fa0c087c5ecac5e217a6c42102bd1d6c7ddcbe84..b188201ece99d4f609bd7076f60c9d42d48aeb48 100644 (file)
@@ -169,8 +169,10 @@ static const TLS_TEST tls_tests[] = {
 #endif
        {"for max record size (RFC6066) support", test_max_record_size, "yes",
         "no", "dunno"},
+#ifdef ENABLE_OCSP
        {"for OCSP status response (RFC6066) support", test_ocsp_status, "yes",
         "no", "dunno"},
+#endif
        {"for OpenPGP authentication (RFC6091) support", test_openpgp1,
         "yes", "no", "dunno"},
        {NULL, NULL, NULL, NULL, NULL}
index eaff478cdf857a3b5a6d3b040f7f22573386f2ec..ae46468c2fdca078961026416052a08057c3bd83 100644 (file)
@@ -562,9 +562,11 @@ int print_info(gnutls_session_t session, int verbose, int print_cert)
                printf(" safe renegotiation,");
        if (gnutls_session_etm_status(session)!=0)
                printf(" EtM,");
+#ifdef ENABLE_OCSP
        if (gnutls_ocsp_status_request_is_checked(session, GNUTLS_OCSP_SR_IS_AVAIL)!=0) {
                printf(" OCSP status request%s,", gnutls_ocsp_status_request_is_checked(session,0)!=0?"":"[ignored]");
        }
+#endif
        printf("\n");
 
 #ifdef ENABLE_DTLS_SRTP
index 5b570f7b552e9047f0206cb63e2edcb5ddd6a009..2e59066bd0dd890f509d12b271e02efa3b2c939c 100644 (file)
@@ -246,6 +246,7 @@ test_code_t test_safe_renegotiation(gnutls_session_t session)
        return ret;
 }
 
+#ifdef ENABLE_OCSP
 test_code_t test_ocsp_status(gnutls_session_t session)
 {
        int ret;
@@ -325,6 +326,7 @@ test_code_t test_ext_master_secret(gnutls_session_t session)
 
        return TEST_FAILED;
 }
+#endif
 
 test_code_t test_safe_renegotiation_scsv(gnutls_session_t session)
 {