forked from wolfSSL/wolfssl
linux crl dir monitoring fixes
This commit is contained in:
@@ -500,7 +500,7 @@ AC_ARG_ENABLE(crl,
|
|||||||
|
|
||||||
if test "$ENABLED_CRL" = "yes"
|
if test "$ENABLED_CRL" = "yes"
|
||||||
then
|
then
|
||||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
|
AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL -DHAVE_CRL_MONITOR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL([BUILD_CRL], [test "x$ENABLED_CRL" = "xyes"])
|
AM_CONDITIONAL([BUILD_CRL], [test "x$ENABLED_CRL" = "xyes"])
|
||||||
|
@@ -393,7 +393,8 @@ static void* DoMonitor(void* arg)
|
|||||||
#elif __linux__
|
#elif __linux__
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <linux/inotify.h>
|
#include <sys/inotify.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
/* linux monitoring */
|
/* linux monitoring */
|
||||||
static void* DoMonitor(void* arg)
|
static void* DoMonitor(void* arg)
|
||||||
@@ -411,7 +412,7 @@ static void* DoMonitor(void* arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (crl->monitors[0].path) {
|
if (crl->monitors[0].path) {
|
||||||
wd = inotify_add_watch(notifyFd, crl->monitors[0].path, IN_CREATE |
|
wd = inotify_add_watch(notifyFd, crl->monitors[0].path, IN_CLOSE_WRITE |
|
||||||
IN_DELETE);
|
IN_DELETE);
|
||||||
if (wd < 0) {
|
if (wd < 0) {
|
||||||
CYASSL_MSG("PEM notify add watch failed");
|
CYASSL_MSG("PEM notify add watch failed");
|
||||||
@@ -420,7 +421,7 @@ static void* DoMonitor(void* arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (crl->monitors[1].path) {
|
if (crl->monitors[1].path) {
|
||||||
wd = inotify_add_watch(notifyFd, crl->monitors[1].path, IN_CREATE |
|
wd = inotify_add_watch(notifyFd, crl->monitors[1].path, IN_CLOSE_WRITE |
|
||||||
IN_DELETE);
|
IN_DELETE);
|
||||||
if (wd < 0) {
|
if (wd < 0) {
|
||||||
CYASSL_MSG("DER notify add watch failed");
|
CYASSL_MSG("DER notify add watch failed");
|
||||||
|
@@ -72,5 +72,7 @@ endif
|
|||||||
|
|
||||||
if BUILD_CRL
|
if BUILD_CRL
|
||||||
src_libcyassl_la_SOURCES += src/crl.c
|
src_libcyassl_la_SOURCES += src/crl.c
|
||||||
|
src_libcyassl_la_CFLAGS += $(PTHREAD_CFLAGS)
|
||||||
|
src_libcyassl_la_LIBADD += $(PTHREAD_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user