[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev patch to build Lynx 2.8.3 with SSL by BCC32
From: |
Hataguchi Takeshi |
Subject: |
lynx-dev patch to build Lynx 2.8.3 with SSL by BCC32 |
Date: |
Sat, 7 Oct 2000 14:37:09 +0900 (JST) |
I wrote a patch to build Lynx 2.8.3 with SSL by BCC32 (Borland C++
for Win32).
Please note there is no warranty for this patch and instruction.
I don't know how secure it is, nor how to distribute the binary
using this patch from a certain country to other countries.
----
Brief instruction to build Lynx 2.8.3 with SSL by BCC32
1. get and build OpenSSL (http://www.openssl.org/).
2. get and extract Lynx 2.8.3rel.1 sources (http://lynx.isc.org/release/).
3. apply SSL patch for Lynx 2.8.3 (http://www.moxienet.com/lynx/).
4. apply SSL patch for Lynx 2.8.3 Win32 (this patch).
5. put SSL libraries and include files (libeay32.lib, ssleay32.lib and
openssl/*.h) into the curses directory.
6. build Lynx following the instruction of the INSTALLATION in the
lynx2-8-3 directory.
--
Takeshi Hataguchi
E-mail: address@hidden
diff -ru orig/lynx2-8-3/WWW/Library/Implementation/HTTP.c
lynx2-8-3/WWW/Library/Implementation/HTTP.c
--- orig/lynx2-8-3/WWW/Library/Implementation/HTTP.c Sat Oct 7 11:01:06 2000
+++ lynx2-8-3/WWW/Library/Implementation/HTTP.c Sat Oct 7 13:01:24 2000
@@ -110,11 +110,19 @@
if(RAND_status()==0) {
char rand_file[256];
time_t t;
+#ifndef _WINDOWS
pid_t pid;
+#else
+ DWORD thrid;
+#endif
long l,seed;
t=time(NULL);
+#ifndef _WINDOWS
pid=getpid();
+#else
+ thrid=GetCurrentThreadId();
+#endif
RAND_file_name((char *)&rand_file,256);
CTRACE((tfp,"HTTP: Seeding PRNG\n"));
if(rand_file!=NULL) {
@@ -123,14 +131,26 @@
}
/* Seed in time (mod_ssl does this) */
RAND_seed((unsigned char *)&t,sizeof(time_t));
+#ifndef _WINDOWS
/* Seed in pid (mod_ssl does this) */
RAND_seed((unsigned char *)&pid,sizeof(pid_t));
+#else
+ RAND_seed((unsigned char *)&thrid,sizeof(DWORD));
+#endif
/* Initialize system's random number generator */
RAND_bytes((unsigned char *)&seed,sizeof(long));
+#ifndef _WINDOWS
srand48(seed);
+#else
+ srand(seed);
+#endif
while(RAND_status()==0) {
/* Repeatedly seed the PRNG using the system's random number generator
until it has been seeded with enough data */
+#ifndef _WINDOWS
l=lrand48();
+#else
+ l=_lrand();
+#endif
RAND_seed((unsigned char *)&l,sizeof(long));
}
if(rand_file!=NULL) {
diff -ru orig/lynx2-8-3/lynx.rsp lynx2-8-3/lynx.rsp
--- orig/lynx2-8-3/lynx.rsp Mon Mar 27 12:14:00 2000
+++ lynx2-8-3/lynx.rsp Sun Sep 24 07:36:20 2000
@@ -80,3 +80,5 @@
../obj/xsystem.obj
../curses/PDCURSES.LIB
../curses/ZLIB.LIB
+../curses/libeay32.lib
+../curses/ssleay32.lib
diff -ru orig/lynx2-8-3/makefile.bcb lynx2-8-3/makefile.bcb
--- orig/lynx2-8-3/makefile.bcb Mon Apr 17 19:59:16 2000
+++ lynx2-8-3/makefile.bcb Sun Sep 24 07:43:56 2000
@@ -34,7 +34,7 @@
#DEBUG=-v -y
CC_FLAGS = $(DEBUG) \
--I./;$(ETC_LIB);SRC;$(WWW_LIB);$(BCC_INC);SRC/CHRTRANS \
+-I./;$(ETC_LIB);$(ETC_LIB)/openssl;SRC;$(WWW_LIB);$(BCC_INC);SRC/CHRTRANS \
-DNO_UNISTD_H \
-DVC="2.14FM" \
-D_WINDOWS \
@@ -67,7 +67,8 @@
-D_WIN_CC=1 \
-DCJK_EX \
-DSH_EX \
--DWIN_EX
+-DWIN_EX \
+-DUSE_SSL
#
# Dependency List
@@ -80,6 +81,8 @@
Dep_lynxdexe = \
$(ETC_LIB)/zlib.lib\
$(ETC_LIB)/pdcurses.lib\
+ $(ETC_LIB)/libeay32.lib\
+ $(ETC_LIB)/ssleay32.lib\
$(OBJ)/HTDOS.obj\
$(OBJ)/UCAuto.obj\
$(OBJ)/UCAux.obj\
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev patch to build Lynx 2.8.3 with SSL by BCC32,
Hataguchi Takeshi <=