# include <openssl/x509v3.h>
# include <openssl/rand.h>
-# if defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_NO_SOCK)
+# if defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_NO_SOCK) \
+ && !defined(OPENSSL_NO_POSIX_IO)
# define OCSP_DAEMON
# include <sys/types.h>
# include <sys/wait.h>
int accept_count = -1, add_nonce = 1, noverify = 0, use_ssl = -1;
int vpmtouched = 0, badsig = 0, i, ignore_err = 0, nmin = 0, ndays = -1;
int req_text = 0, resp_text = 0, ret = 1;
-# ifndef OPENSSL_NO_SOCK
int req_timeout = -1;
-# endif
long nsec = MAX_VALIDITY_PERIOD, maxage = -1;
unsigned long sign_flags = 0, verify_flags = 0, rflags = 0;
OPTION_CHOICE o;
goto opthelp;
trailing_md = 1;
break;
-# ifdef OCSP_DAEMON
case OPT_MULTI:
+# ifdef OCSP_DAEMON
multi = atoi(opt_arg());
- break;
# endif
+ break;
}
}
if (trailing_md) {
}
if (ridx_filename != NULL
- && (rkey != NULL || rsigner != NULL || rca_cert != NULL)) {
+ && (rkey == NULL || rsigner == NULL || rca_cert == NULL)) {
BIO_printf(bio_err,
"Responder mode requires certificate, key, and CA.\n");
goto end;
va_start(ap, fmt);
# ifdef OCSP_DAEMON
if (multi) {
- vsyslog(level, fmt, ap);
+ char buf[1024];
+ if (vsnprintf(buf, sizeof(buf), fmt, ap) > 0) {
+ syslog(level, "%s", buf);
+ }
if (level >= LOG_ERR)
ERR_print_errors_cb(print_syslog, &level);
}
else if (WIFSIGNALED(status))
syslog(LOG_WARNING, "child process: %ld, term signal %d%s",
(long)fpid, WTERMSIG(status),
- WCOREDUMP(status) ? " (core dumped)" : "");
+#ifdef WCOREDUMP
+ WCOREDUMP(status) ? " (core dumped)" :
+#endif
+ "");
sleep(1);
}
break;