]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Added support for building and linking with
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 4 Jun 2008 10:53:57 +0000 (10:53 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 4 Jun 2008 10:53:57 +0000 (10:53 +0000)
openssl-0.9.8h on Windows.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2982 e7ae566f-a301-0410-adde-c780ea21d3b5

install-win32/Makefile.am
install-win32/buildopensslpath.bat [deleted file]
install-win32/openssl/README.txt [new file with mode: 0644]
install-win32/openssl/openssl097.patch [moved from install-win32/openssl.patch with 100% similarity]
install-win32/openssl/openssl098.patch [new file with mode: 0644]
install-win32/settings.in

index 559544c03cec564f9d182cbdc72c29ebcd4757d5..f939f861a9ea963a9debb4465a4609177f4f4fa3 100644 (file)
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 
 dist_noinst_DATA = \
+       openssl \
        GetWindowsVersion.nsi \
        build-pkcs11-helper.sh \
        buildinstaller \
-       buildopensslpath.bat \
        ddk-common \
        doclean \
        dosname.pl \
@@ -44,7 +44,6 @@ dist_noinst_DATA = \
        maketap \
        maketapinstall \
        maketext \
-       openssl.patch \
        openvpn.nsi \
        setpath.nsi \
        settings.in \
diff --git a/install-win32/buildopensslpath.bat b/install-win32/buildopensslpath.bat
deleted file mode 100755 (executable)
index b77ce12..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-REM set path for OpenSSL build
-
-set PATH=c:\bin;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\MinGW\bin;c:\msys\1.0\bin
diff --git a/install-win32/openssl/README.txt b/install-win32/openssl/README.txt
new file mode 100644 (file)
index 0000000..cebd6ae
--- /dev/null
@@ -0,0 +1,22 @@
+Rebuild OpenSSL tarball without symbolic links, so
+it can be extracted on Windows (run on Unix):
+
+  [download tarball and .asc sig]
+  gpg --verify openssl-0.9.8h.tar.gz.asc
+  tar xfz openssl-0.9.8h.tar.gz
+  rm openssl-0.9.8h.tar.gz
+  tar cfzh openssl-0.9.8h.tar.gz openssl-0.9.8h
+
+To apply patch (in MSYS shell):
+
+  cd /c/src/openssl-0.9.8h
+  patch -p1 <../21/install-win32/openssl/openssl098.patch
+
+To build OpenSSL, open a command prompt window, then:
+
+  cd \src\openssl-0.9.8h
+  ms\mw
+
+To build a new patch (optional):
+
+  diff -urw openssl-0.9.8h.orig openssl-0.9.8h | grep -v '^Only in' >openssl098.patch
diff --git a/install-win32/openssl/openssl098.patch b/install-win32/openssl/openssl098.patch
new file mode 100644 (file)
index 0000000..896ff0c
--- /dev/null
@@ -0,0 +1,67 @@
+diff -urw tmp/openssl-0.9.8h/crypto/pqueue/pqueue.c openssl-0.9.8h/crypto/pqueue/pqueue.c
+--- tmp/openssl-0.9.8h/crypto/pqueue/pqueue.c  Tue Jun 28 06:53:34 2005
++++ openssl-0.9.8h/crypto/pqueue/pqueue.c      Wed Jun  4 02:52:42 2008
+@@ -199,10 +199,10 @@
+       return found;
+       }
+-#if PQ_64BIT_IS_INTEGER
+ void
+ pqueue_print(pqueue_s *pq)
+       {
++#if PQ_64BIT_IS_INTEGER
+       pitem *item = pq->items;
+       while(item != NULL)
+@@ -210,8 +210,8 @@
+               printf("item\t" PQ_64BIT_PRINT "\n", item->priority);
+               item = item->next;
+               }
+-      }
+ #endif
++      }
+ pitem *
+ pqueue_iterator(pqueue_s *pq)
+diff -urw tmp/openssl-0.9.8h/ms/mw.bat openssl-0.9.8h/ms/mw.bat
+--- tmp/openssl-0.9.8h/ms/mw.bat       Sat Feb 22 11:00:10 2003
++++ openssl-0.9.8h/ms/mw.bat   Wed Jun  4 02:56:54 2008
+@@ -1,17 +1,23 @@
+ @rem OpenSSL with Mingw32\r
+ @rem --------------------\r
\r
++@rem Include MinGW, MSYS, and ActiveState Perl in path
++set PATH=c:\bin;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\MinGW\bin;c:\msys\1.0\bin
++
+ @rem Makefile\r
+ perl util\mkfiles.pl >MINFO\r
+-perl util\mk1mf.pl Mingw32 >ms\mingw32.mak\r
++perl util\mk1mf.pl no-idea no-mdc2 no-rc5 Mingw32 >ms\mingw32.mak
++
+ @rem DLL definition files\r
+-perl util\mkdef.pl 32 libeay >ms\libeay32.def\r
++perl util\mkdef.pl no-idea no-mdc2 no-rc5 32 libeay >ms\libeay32.def
+ if errorlevel 1 goto end\r
+-perl util\mkdef.pl 32 ssleay >ms\ssleay32.def\r
++perl util\mkdef.pl no-idea no-mdc2 no-rc5 32 ssleay >ms\ssleay32.def
+ if errorlevel 1 goto end\r
\r
+ @rem Build the libraries\r
+-make -f ms/mingw32.mak\r
++
++@rem JY added --win32
++make --win32 -f ms/mingw32.mak
+ if errorlevel 1 goto end\r
\r
+ @rem Generate the DLLs and input libraries\r
+@@ -20,7 +26,9 @@
+ dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a\r
+ if errorlevel 1 goto end\r
\r
++@rem JY added openssl.exe linked to DLL
++gcc -o openssl  tmp\verify.o tmp\asn1pars.o tmp\req.o tmp\dgst.o tmp\dh.o tmp\dhparam.o tmp\enc.o tmp\passwd.o tmp\gendh.o tmp\errstr.o tmp\ca.o tmp\pkcs7.o tmp\crl2p7.o tmp\crl.o tmp\rsa.o tmp\rsautl.o tmp\dsa.o tmp\dsaparam.o tmp\x509.o tmp\genrsa.o tmp\gendsa.o tmp\s_server.o tmp\s_client.o tmp\speed.o tmp\s_time.o tmp\apps.o tmp\s_cb.o tmp\s_socket.o tmp\app_rand.o tmp\version.o tmp\sess_id.o tmp\ciphers.o tmp\nseq.o tmp\pkcs12.o tmp\pkcs8.o tmp\spkac.o tmp\smime.o tmp\rand.o tmp\engine.o tmp\ocsp.o tmp\prime.o tmp\openssl.o -leay32 -lssl32 -L. -lwsock32 -lgdi32
++
+ echo Done compiling OpenSSL\r
\r
+ :end\r
+-\r
index ecf7a2ca7d99c34e69a6959afb2ab94642531e49..0e232267549f050ba2e0e4dc4265876de9b1210d 100644 (file)
@@ -22,7 +22,7 @@
 ;!define OPENVPN_XGUI_DIR "../ovpnxml"
 
 # Prebuilt libraries.  DMALLOC is optional.
-!define OPENSSL_DIR      "../openssl-0.9.7m"
+!define OPENSSL_DIR      "../openssl-0.9.8h"
 !define LZO_DIR                  "../lzo-2.02"
 !define PKCS11_HELPER_DIR "../pkcs11-helper"
 !define DMALLOC_DIR      "../dmalloc-5.4.2"