Jelajahi Sumber

Make the Windows/DOS build system understand "fips".

Richard Levitte 20 tahun lalu
induk
melakukan
c1b971d5b2
12 mengubah file dengan 39 tambahan dan 31 penghapusan
  1. 9 4
      INSTALL.W32
  2. 7 5
      ms/do_masm.bat
  3. 7 7
      ms/do_ms.bat
  4. 7 6
      ms/do_nasm.bat
  5. 2 2
      ms/do_nt.bat
  6. 1 1
      util/pl/BC-16.pl
  7. 1 1
      util/pl/BC-32.pl
  8. 1 1
      util/pl/Mingw32.pl
  9. 1 1
      util/pl/OS2-EMX.pl
  10. 1 1
      util/pl/VC-16.pl
  11. 1 1
      util/pl/VC-32.pl
  12. 1 1
      util/pl/ultrix.pl

+ 9 - 4
INSTALL.W32

@@ -46,12 +46,13 @@
  http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
  http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
  The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
  The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
 
 
- Firstly you should run Configure:
+ Firstly you should run Configure (to build a FIPS-certified variant of
+ OpenSSL, add the option "fips"):
 
 
  > perl Configure VC-WIN32
  > perl Configure VC-WIN32
 
 
  Next you need to build the Makefiles and optionally the assembly language
  Next you need to build the Makefiles and optionally the assembly language
- files:
+ files (to build a FIPS-certified variant of OpenSSL, add the argument "fips"):
 
 
  - If you are using MASM then run:
  - If you are using MASM then run:
 
 
@@ -100,10 +101,12 @@
  Borland C++ builder 5
  Borland C++ builder 5
  ---------------------
  ---------------------
 
 
- * Configure for building with Borland Builder:
+ * Configure for building with Borland Builder (to build a FIPS-certified
+   variant of OpenSSL, add the option "fips"):
    > perl Configure BC-32
    > perl Configure BC-32
 
 
- * Create the appropriate makefile
+ * Create the appropriate makefile (to build a FIPS-certified variant of
+   OpenSSL, add the argument "fips")
    > ms\do_nasm
    > ms\do_nasm
 
 
  * Build
  * Build
@@ -194,6 +197,8 @@
    occur, try
    occur, try
    > ms\mingw32 no-asm
    > ms\mingw32 no-asm
    instead.
    instead.
+   If you want to build a FIPS-certified variant of OpenSSL, add the argument
+   "fips"
 
 
    libcrypto.a and libssl.a are the static libraries. To use the DLLs,
    libcrypto.a and libssl.a are the static libraries. To use the DLLs,
    link with libeay32.a and libssl32.a instead.
    link with libeay32.a and libssl32.a instead.

+ 7 - 5
ms/do_masm.bat

@@ -1,3 +1,5 @@
+rem use "fips" as the first argument to make a proper FIPS build.
+
 @echo off
 @echo off
 echo Generating x86 for MASM assember
 echo Generating x86 for MASM assember
 
 
@@ -56,11 +58,11 @@ cd ..\..\..
 echo on
 echo on
 
 
 perl util\mkfiles.pl >MINFO
 perl util\mkfiles.pl >MINFO
-rem perl util\mk1mf.pl VC-MSDOS no-sock >ms\msdos.mak
-rem perl util\mk1mf.pl VC-W31-32 >ms\w31.mak
-perl util\mk1mf.pl dll VC-W31-32 >ms\w31dll.mak
-perl util\mk1mf.pl VC-WIN32 >ms\nt.mak
-perl util\mk1mf.pl dll VC-WIN32 >ms\ntdll.mak
+rem perl util\mk1mf.pl no-sock %1 VC-MSDOS >ms\msdos.mak
+rem perl util\mk1mf.pl %1 VC-W31-32 >ms\w31.mak
+perl util\mk1mf.pl dll %1 VC-W31-32 >ms\w31dll.mak
+perl util\mk1mf.pl %1 VC-WIN32 >ms\nt.mak
+perl util\mk1mf.pl dll %1 VC-WIN32 >ms\ntdll.mak
 
 
 perl util\mkdef.pl 16 libeay > ms\libeay16.def
 perl util\mkdef.pl 16 libeay > ms\libeay16.def
 perl util\mkdef.pl 32 libeay > ms\libeay32.def
 perl util\mkdef.pl 32 libeay > ms\libeay32.def

+ 7 - 7
ms/do_ms.bat

@@ -1,12 +1,12 @@
 
 
 perl util\mkfiles.pl >MINFO
 perl util\mkfiles.pl >MINFO
-rem perl util\mk1mf.pl VC-MSDOS no-sock >ms\msdos.mak
-rem perl util\mk1mf.pl VC-W31-32 >ms\w31.mak
-perl util\mk1mf.pl dll VC-W31-32 >ms\w31dll.mak
-perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak
-perl util\mk1mf.pl dll no-asm VC-WIN32 >ms\ntdll.mak
-perl util\mk1mf.pl no-asm VC-CE >ms\ce.mak
-perl util\mk1mf.pl dll no-asm VC-CE >ms\cedll.mak
+rem perl util\mk1mf.pl no-sock %1 VC-MSDOS >ms\msdos.mak
+rem perl util\mk1mf.pl %1 VC-W31-32 >ms\w31.mak
+perl util\mk1mf.pl dll %1 VC-W31-32 >ms\w31dll.mak
+perl util\mk1mf.pl no-asm %1 VC-WIN32 >ms\nt.mak
+perl util\mk1mf.pl dll no-asm %1 VC-WIN32 >ms\ntdll.mak
+perl util\mk1mf.pl no-asm %1 VC-CE >ms\ce.mak
+perl util\mk1mf.pl dll no-asm %1 VC-CE >ms\cedll.mak
 
 
 perl util\mkdef.pl 16 libeay > ms\libeay16.def
 perl util\mkdef.pl 16 libeay > ms\libeay16.def
 perl util\mkdef.pl 32 libeay > ms\libeay32.def
 perl util\mkdef.pl 32 libeay > ms\libeay32.def

+ 7 - 6
ms/do_nasm.bat

@@ -1,3 +1,4 @@
+rem use "fips" as the first argument to make a proper FIPS build.
 
 
 @echo off
 @echo off
 echo Generating x86 for NASM assember
 echo Generating x86 for NASM assember
@@ -57,12 +58,12 @@ cd ..\..\..
 echo on
 echo on
 
 
 perl util\mkfiles.pl >MINFO
 perl util\mkfiles.pl >MINFO
-rem perl util\mk1mf.pl VC-MSDOS no-sock >ms\msdos.mak
-rem perl util\mk1mf.pl VC-W31-32 >ms\w31.mak
-perl util\mk1mf.pl dll VC-W31-32 >ms\w31dll.mak
-perl util\mk1mf.pl nasm VC-WIN32 >ms\nt.mak
-perl util\mk1mf.pl dll nasm VC-WIN32 >ms\ntdll.mak
-perl util\mk1mf.pl nasm BC-NT >ms\bcb.mak
+rem perl util\mk1mf.pl no-sock %1 VC-MSDOS >ms\msdos.mak
+rem perl util\mk1mf.pl %1 VC-W31-32 >ms\w31.mak
+perl util\mk1mf.pl dll %1 VC-W31-32 >ms\w31dll.mak
+perl util\mk1mf.pl nasm %1 VC-WIN32 >ms\nt.mak
+perl util\mk1mf.pl dll nasm %1 VC-WIN32 >ms\ntdll.mak
+perl util\mk1mf.pl nasm %1 BC-NT >ms\bcb.mak
 
 
 perl util\mkdef.pl 16 libeay > ms\libeay16.def
 perl util\mkdef.pl 16 libeay > ms\libeay16.def
 perl util\mkdef.pl 32 libeay > ms\libeay32.def
 perl util\mkdef.pl 32 libeay > ms\libeay32.def

+ 2 - 2
ms/do_nt.bat

@@ -1,7 +1,7 @@
 
 
 perl util\mkfiles.pl >MINFO
 perl util\mkfiles.pl >MINFO
-perl util\mk1mf.pl no-asm VC-NT >ms\nt.mak
-perl util\mk1mf.pl dll no-asm VC-NT >ms\ntdll.mak
+perl util\mk1mf.pl no-asm %1 VC-NT >ms\nt.mak
+perl util\mk1mf.pl dll no-asm %1 VC-NT >ms\ntdll.mak
 
 
 perl util\mkdef.pl libeay NT > ms\libeay32.def
 perl util\mkdef.pl libeay NT > ms\libeay32.def
 perl util\mkdef.pl ssleay NT > ms\ssleay32.def
 perl util\mkdef.pl ssleay NT > ms\ssleay32.def

+ 1 - 1
util/pl/BC-16.pl

@@ -64,7 +64,7 @@ $lfile='';
 
 
 $asm='bcc -c -B -Tml';
 $asm='bcc -c -B -Tml';
 $afile='/o';
 $afile='/o';
-if ($no_asm)
+if ($no_asm || $fips)
 	{
 	{
 	$bn_asm_obj='';
 	$bn_asm_obj='';
 	$bn_asm_src='';
 	$bn_asm_src='';

+ 1 - 1
util/pl/BC-32.pl

@@ -62,7 +62,7 @@ $des_enc_src='';
 $bf_enc_obj='';
 $bf_enc_obj='';
 $bf_enc_src='';
 $bf_enc_src='';
 
 
-if (!$no_asm)
+if (!$no_asm && !$fips)
 	{
 	{
 	$bn_mulw_obj='crypto\bn\asm\bn_win32.obj';
 	$bn_mulw_obj='crypto\bn\asm\bn_win32.obj';
 	$bn_mulw_src='crypto\bn\asm\bn_win32.asm';
 	$bn_mulw_src='crypto\bn\asm\bn_win32.asm';

+ 1 - 1
util/pl/Mingw32.pl

@@ -21,7 +21,7 @@ if ($debug)
 else
 else
 	{ $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -mcpu=i486 -Wall"; }
 	{ $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -mcpu=i486 -Wall"; }
 
 
-if ($gaswin and !$no_asm)
+if ($gaswin and !$no_asm and !$fips)
 	{
 	{
         $bn_asm_obj='$(OBJ_D)\bn-win32.o';
         $bn_asm_obj='$(OBJ_D)\bn-win32.o';
         $bn_asm_src='crypto/bn/asm/bn-win32.s';
         $bn_asm_src='crypto/bn/asm/bn-win32.s';

+ 1 - 1
util/pl/OS2-EMX.pl

@@ -48,7 +48,7 @@ $des_enc_src="";
 $bf_enc_obj="";
 $bf_enc_obj="";
 $bf_enc_src="";
 $bf_enc_src="";
 
 
-if (!$no_asm)
+if (!$no_asm && !$fips)
 	{
 	{
 	$bn_asm_obj="crypto/bn/asm/bn-os2$obj crypto/bn/asm/co-os2$obj";
 	$bn_asm_obj="crypto/bn/asm/bn-os2$obj crypto/bn/asm/co-os2$obj";
 	$bn_asm_src="crypto/bn/asm/bn-os2.asm crypto/bn/asm/co-os2.asm";
 	$bn_asm_src="crypto/bn/asm/bn-os2.asm crypto/bn/asm/co-os2.asm";

+ 1 - 1
util/pl/VC-16.pl

@@ -90,7 +90,7 @@ $des_enc_src='';
 $bf_enc_obj='';
 $bf_enc_obj='';
 $bf_enc_src='';
 $bf_enc_src='';
 
 
-if (!$no_asm)
+if (!$no_asm && !$fips)
 	{
 	{
 	if ($asmbits == 32)
 	if ($asmbits == 32)
 		{
 		{

+ 1 - 1
util/pl/VC-32.pl

@@ -64,7 +64,7 @@ $des_enc_src='';
 $bf_enc_obj='';
 $bf_enc_obj='';
 $bf_enc_src='';
 $bf_enc_src='';
 
 
-if (!$no_asm)
+if (!$no_asm && !$fips)
 	{
 	{
 	$bn_asm_obj='crypto\bn\asm\bn_win32.obj';
 	$bn_asm_obj='crypto\bn\asm\bn_win32.obj';
 	$bn_asm_src='crypto\bn\asm\bn_win32.asm';
 	$bn_asm_src='crypto\bn\asm\bn_win32.asm';

+ 1 - 1
util/pl/ultrix.pl

@@ -17,7 +17,7 @@ else
 
 
 $cflags.=" -std1 -DL_ENDIAN";
 $cflags.=" -std1 -DL_ENDIAN";
 
 
-if (!$no_asm)
+if (!$no_asm && !$fips)
 	{
 	{
 	$bn_asm_obj='$(OBJ_D)/mips1.o';
 	$bn_asm_obj='$(OBJ_D)/mips1.o';
 	$bn_asm_src='crypto/bn/asm/mips1.s';
 	$bn_asm_src='crypto/bn/asm/mips1.s';