Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions build/crypto.m4
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,23 @@ dnl
dnl Since OpenSSL 1.1.0
dnl
AC_DEFUN([TS_CHECK_CRYPTO_OCSP], [
enable_tls_ocsp=yes
_ocsp_saved_LIBS=$LIBS

TS_ADDTO(LIBS, [$OPENSSL_LIBS])
AC_CHECK_HEADERS(openssl/ocsp.h, [ocsp_have_headers=1], [enable_tls_ocsp=no])

if test "$ocsp_have_headers" == "1"; then
AC_CHECK_FUNCS(OCSP_sendreq_new OCSP_REQ_CTX_add1_header OCSP_REQ_CTX_set1_req, [enable_tls_ocsp=yes], [enable_tls_ocsp=no])
AC_LINK_IFELSE(
[
AC_LANG_PROGRAM([[
#include <openssl/ocsp.h>
]],
[[
OCSP_sendreq_new(NULL, NULL, NULL, 0);
OCSP_REQ_CTX_add1_header(NULL, NULL, NULL);
OCSP_REQ_CTX_set1_req(NULL, NULL);
]])
], [], [enable_tls_ocsp=no])

LIBS=$_ocsp_saved_LIBS
fi
LIBS=$_ocsp_saved_LIBS

AC_MSG_CHECKING(whether OCSP is supported)
AC_MSG_RESULT([$enable_tls_ocsp])
Expand Down