add freebsd crl-monitor support
This commit is contained in:
parent
dd259b12c7
commit
d4035e5f62
@ -613,10 +613,10 @@ AC_ARG_ENABLE(crl-monitor,
|
||||
if test "$ENABLED_CRL_MONITOR" = "yes"
|
||||
then
|
||||
case $host_os in
|
||||
*linux* | *darwin*)
|
||||
*linux* | *darwin* | *freebsd*)
|
||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;;
|
||||
*)
|
||||
AC_MSG_ERROR([crl monitor only allowed on linux or OS X]) ;;
|
||||
AC_MSG_ERROR([crl monitor only allowed on linux, OS X, or freebsd]) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@ -787,6 +787,7 @@ echo " * LEANPSK: $ENABLED_LEANPSK"
|
||||
echo " * ECC: $ENABLED_ECC"
|
||||
echo " * OCSP: $ENABLED_OCSP"
|
||||
echo " * CRL: $ENABLED_CRL"
|
||||
echo " * CRL-MONITOR: $ENABLED_CRL_MONITOR"
|
||||
echo " * NTRU: $ENABLED_NTRU"
|
||||
echo ""
|
||||
echo "---"
|
||||
|
14
src/crl.c
14
src/crl.c
@ -328,12 +328,20 @@ static int SwapLists(CYASSL_CRL* crl)
|
||||
}
|
||||
|
||||
|
||||
#ifdef __MACH__
|
||||
#if (defined(__MACH__) || defined(__FreeBSD__))
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/time.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef __MACH__
|
||||
#define XEVENT_MODE O_EVTONLY
|
||||
#elif defined(__FreeBSD__)
|
||||
#define XEVENT_MODE EVFILT_VNODE
|
||||
#endif
|
||||
|
||||
|
||||
/* OS X monitoring */
|
||||
static void* DoMonitor(void* arg)
|
||||
{
|
||||
@ -354,7 +362,7 @@ static void* DoMonitor(void* arg)
|
||||
fDER = -1;
|
||||
|
||||
if (crl->monitors[0].path) {
|
||||
fPEM = open(crl->monitors[0].path, O_EVTONLY);
|
||||
fPEM = open(crl->monitors[0].path, XEVENT_MODE);
|
||||
if (fPEM == -1) {
|
||||
CYASSL_MSG("PEM event dir open failed");
|
||||
return NULL;
|
||||
@ -362,7 +370,7 @@ static void* DoMonitor(void* arg)
|
||||
}
|
||||
|
||||
if (crl->monitors[1].path) {
|
||||
fDER = open(crl->monitors[1].path, O_EVTONLY);
|
||||
fDER = open(crl->monitors[1].path, XEVENT_MODE);
|
||||
if (fDER == -1) {
|
||||
CYASSL_MSG("DER event dir open failed");
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user