#include "database.h"
#include "housekeeping.h"
#include "tools.h"
+#include "serv_crypto.h"
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
void init_sysdep(void) {
int a;
+#ifdef HAVE_OPENSSL
+ init_ssl();
+#endif
+
/* Set up a bunch of semaphores to be used for critical sections */
for (a=0; a<MAX_SEMAPHORES; ++a) {
pthread_mutex_init(&Critters[a], NULL);
}
-
/*
* client_write() ... Send binary data to the client.
*/
int sock;
+#ifdef HAVE_OPENSSL
+ if (CC->redirect_ssl) {
+ client_write_ssl(buf, nbytes);
+ return;
+ }
+#endif
+
if (CC->redirect_fp != NULL) {
fwrite(buf, nbytes, 1, CC->redirect_fp);
return;
struct timeval tv;
int retval;
+#ifdef HAVE_OPENSSL
+ if (CC->redirect_ssl) {
+ return (client_read_ssl(buf, bytes, timeout));
+ }
+#endif
len = 0;
while(len<bytes) {
FD_ZERO(&rfds);
--num_threads;
return NULL;
}
-
-
-