handling redirect_ssl, because these need to be done the same way regardless
of client session crypto
* serv_crypto.c: pasted a bunch of Nathan's #ifdef blocks from sysdep.c in
order to gain greater portability (or even to get it to compile on splorph)
$Log$
+ Revision 590.46 2002/01/06 21:25:26 ajc
+ * sysdep.c: in client_write(), handle redirect_fp and redirect_sock *before*
+ handling redirect_ssl, because these need to be done the same way regardless
+ of client session crypto
+ * serv_crypto.c: pasted a bunch of Nathan's #ifdef blocks from sysdep.c in
+ order to gain greater portability (or even to get it to compile on splorph)
+
Revision 590.45 2002/01/06 11:13:33 error
* Enable SSL/TLS support in the client (again)
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
#include <unistd.h>
#include <sys/types.h>
#include "sysdep.h"
+
#ifdef HAVE_OPENSSL
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#endif
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
+
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
#include <stdio.h>
#include "server.h"
#include "serv_crypto.h"
int retval;
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;
sock = CC->client_socket;
}
+#ifdef HAVE_OPENSSL
+ if (CC->redirect_ssl) {
+ client_write_ssl(buf, nbytes);
+ return;
+ }
+#endif
+
while (bytes_written < nbytes) {
retval = write(sock, &buf[bytes_written],
nbytes - bytes_written);