Continues NASM support. This might work now. Its still experimental but it
authorDr. Stephen Henson <steve@openssl.org>
Mon, 12 Jul 1999 23:35:10 +0000 (23:35 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 12 Jul 1999 23:35:10 +0000 (23:35 +0000)
passes all the tests. Added documentation in INSTALL.W32.

CHANGES
INSTALL.W32
ms/do_masm.bat [new file with mode: 0755]
ms/do_nasm.bat [new file with mode: 0755]

diff --git a/CHANGES b/CHANGES
index fbdd510da59e763d1d15e03f50b63f0316dfb44f..cf503b69e151710f794c7ba6fb8e1c3fd565f615 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,12 @@
 
  Changes between 0.9.3a and 0.9.4
 
+  *) Add support for the the free Netwide assembler (NASM) under Win32,
+     since not many people have MASM (ml) and it can be hard to obtain.
+     This is currently experimental but it seems to work OK and pass all
+     the tests. Check out INSTALL.W32 for info.
+     [Steve Henson]
+
   *) Fix memory leaks in s3_clnt.c: All non-anonymous SSL3/TLS1 connections
      without temporary keys kept an extra copy of the server key,
      and connections with temporary keys did not free everything in case
@@ -19,6 +25,7 @@
      2. Change unsigned int to int in b_dump.c to avoid "signed/unsigned
         comparison" warnings.
      3. Add sk_<TYPE>_sort to DEF file generator and do make update.
+     [Steve Henson]
 
   *) Add a debugging option to PKCS#5 v2 key generation function: when
      you #define DEBUG_PKCS5V2 passwords, salts, iteration counts and
index 84c522a182e9576a191d7e172b13e6ed68e3a88c..615d1419f13dd8ab36a951fbb7c22d03ba994c46 100644 (file)
   * Borland C
   * GNU C (Mingw32 or Cygwin32)
 
+ If you want to compile in the assembly language routines with Visual C++ then
+ you will need an assembler. This is worth doing because it will result in
+ faster code: for example it will typically result in a 2 times speedup in the
+ RSA routines. Currently the following assemblers are supported:
+
+  * Microsoft MASM (aka "ml")
+  * Free Netwide Assembler NASM.
+
+ MASM was I believe distributed in the past with VC++ and it is also part of
+ the MSDN SDKs. It is no longer distributed as part of VC++ and can be hard
+ to get hold of. It can be purchased: see Microsoft's site for details at:
+ http://www.microsoft.com/
+
+ NASM is freely available. Version 0.98 was used during testing: other versions
+ may also work. It is available from many places, see for example:
+ http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
+ The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
+
  If you are compiling from a tarball or a CVS snapshot then the Win32 files
  may well be not up to date. This may mean that some "tweaking" is required to
  get it all to work. See the trouble shooting section later on for if (when?)
  Visual C++
  ----------
 
- Firstly you should run Configure and build the Win32 Makefiles:
+ Firstly you should run Configure:
 
  > perl Configure VC-WIN32
+
+ Next you need to build the Makefiles and optionally the assembly language
+ files.
+
+ If you are using MASM then run:
+
+ > ms\do_masm
+
+ If you are using NASM then run:
+
+ > ms\do_nasm
+
+ If you don't want to use the assembly language files at all then run:
+
  > ms\do_ms
 
  If you get errors about things not having numbers assigned then check the
 
  Tweaks:
 
- There are various changes you can make to the Win32 compile environment. If
- you have the MASM assembler 'ml' then you can try the assembly language code.
- To do this remove the 'no-asm' part from do_ms.bat. You can also add 'debug'
here to make a debugging version of the library.
+ There are various changes you can make to the Win32 compile environment. By
+ default the library is not compiled with debugging symbols. If you add 'debug'
+ to the mk1mk.pl lines in the do_* batch file then debugging symbols will be
compiled in.
 
  The default Win32 environment is to leave out any Windows NT specific
  features.
 
  > perl util\mkdef.pl crypto ssl update
 
- then ms\do_ms should not give a warning any more. However the numbers that
+ then ms\do_XXX should not give a warning any more. However the numbers that
  get assigned by this technique may not match those that eventually get
  assigned in the CVS tree: so anything linked against this version of the
  library may need to be recompiled.
diff --git a/ms/do_masm.bat b/ms/do_masm.bat
new file mode 100755 (executable)
index 0000000..5b64fec
--- /dev/null
@@ -0,0 +1,68 @@
+@echo off\r
+echo Generating x86 for MASM assember\r
+\r
+echo Bignum\r
+cd crypto\bn\asm\r
+perl x86.pl win32 > bn-win32.asm\r
+cd ..\..\..\r
+\r
+echo DES\r
+cd crypto\des\asm\r
+perl des-586.pl win32 > d-win32.asm\r
+cd ..\..\..\r
+\r
+echo "crypt(3)"\r
+\r
+cd crypto\des\asm\r
+perl crypt586.pl win32 > y-win32.asm\r
+cd ..\..\..\r
+\r
+echo Blowfish\r
+\r
+cd crypto\bf\asm\r
+perl bf-586.pl win32 > b-win32.asm\r
+cd ..\..\..\r
+\r
+echo CAST5\r
+cd crypto\cast\asm\r
+perl cast-586.pl win32 > c-win32.asm\r
+cd ..\..\..\r
+\r
+echo RC4\r
+cd crypto\rc4\asm\r
+perl rc4-586.pl win32 > r4-win32.asm\r
+cd ..\..\..\r
+\r
+echo MD5\r
+cd crypto\md5\asm\r
+perl md5-586.pl win32 > m5-win32.asm\r
+cd ..\..\..\r
+\r
+echo SHA1\r
+cd crypto\sha\asm\r
+perl sha1-586.pl win32 > s1-win32.asm\r
+cd ..\..\..\r
+\r
+echo RIPEMD160\r
+cd crypto\ripemd\asm\r
+perl rmd-586.pl win32 > rm-win32.asm\r
+cd ..\..\..\r
+\r
+echo RC5\32\r
+cd crypto\rc5\asm\r
+perl rc5-586.pl win32 > r5-win32.asm\r
+cd ..\..\..\r
+\r
+echo on\r
+\r
+perl util\mkfiles.pl >MINFO\r
+rem perl util\mk1mf.pl VC-MSDOS no-sock >ms\msdos.mak\r
+rem perl util\mk1mf.pl VC-W31-32 >ms\w31.mak\r
+perl util\mk1mf.pl dll VC-W31-32 >ms\w31dll.mak\r
+perl util\mk1mf.pl VC-WIN32 >ms\nt.mak\r
+perl util\mk1mf.pl dll VC-WIN32 >ms\ntdll.mak\r
+\r
+perl util\mkdef.pl 16 libeay > ms\libeay16.def\r
+perl util\mkdef.pl 32 libeay > ms\libeay32.def\r
+perl util\mkdef.pl 16 ssleay > ms\ssleay16.def\r
+perl util\mkdef.pl 32 ssleay > ms\ssleay32.def\r
diff --git a/ms/do_nasm.bat b/ms/do_nasm.bat
new file mode 100755 (executable)
index 0000000..8859c15
--- /dev/null
@@ -0,0 +1,69 @@
+\r
+@echo off\r
+echo Generating x86 for NASM assember\r
+\r
+echo Bignum\r
+cd crypto\bn\asm\r
+perl x86.pl win32n > bn-win32.asm\r
+cd ..\..\..\r
+\r
+echo DES\r
+cd crypto\des\asm\r
+perl des-586.pl win32n > d-win32.asm\r
+cd ..\..\..\r
+\r
+echo "crypt(3)"\r
+\r
+cd crypto\des\asm\r
+perl crypt586.pl win32n > y-win32.asm\r
+cd ..\..\..\r
+\r
+echo Blowfish\r
+\r
+cd crypto\bf\asm\r
+perl bf-586.pl win32n > b-win32.asm\r
+cd ..\..\..\r
+\r
+echo CAST5\r
+cd crypto\cast\asm\r
+perl cast-586.pl win32n > c-win32.asm\r
+cd ..\..\..\r
+\r
+echo RC4\r
+cd crypto\rc4\asm\r
+perl rc4-586.pl win32n > r4-win32.asm\r
+cd ..\..\..\r
+\r
+echo MD5\r
+cd crypto\md5\asm\r
+perl md5-586.pl win32n > m5-win32.asm\r
+cd ..\..\..\r
+\r
+echo SHA1\r
+cd crypto\sha\asm\r
+perl sha1-586.pl win32n > s1-win32.asm\r
+cd ..\..\..\r
+\r
+echo RIPEMD160\r
+cd crypto\ripemd\asm\r
+perl rmd-586.pl win32n > rm-win32.asm\r
+cd ..\..\..\r
+\r
+echo RC5\32\r
+cd crypto\rc5\asm\r
+perl rc5-586.pl win32n > r5-win32.asm\r
+cd ..\..\..\r
+\r
+echo on\r
+\r
+perl util\mkfiles.pl >MINFO\r
+rem perl util\mk1mf.pl VC-MSDOS no-sock >ms\msdos.mak\r
+rem perl util\mk1mf.pl VC-W31-32 >ms\w31.mak\r
+perl util\mk1mf.pl dll VC-W31-32 >ms\w31dll.mak\r
+perl util\mk1mf.pl nasm VC-WIN32 >ms\nt.mak\r
+perl util\mk1mf.pl dll nasm VC-WIN32 >ms\ntdll.mak\r
+\r
+perl util\mkdef.pl 16 libeay > ms\libeay16.def\r
+perl util\mkdef.pl 32 libeay > ms\libeay32.def\r
+perl util\mkdef.pl 16 ssleay > ms\ssleay16.def\r
+perl util\mkdef.pl 32 ssleay > ms\ssleay32.def\r