Make it possible to turn off compilation of hardware support through
authorRichard Levitte <levitte@openssl.org>
Fri, 30 Jun 2000 11:02:02 +0000 (11:02 +0000)
committerRichard Levitte <levitte@openssl.org>
Fri, 30 Jun 2000 11:02:02 +0000 (11:02 +0000)
the configuration parameter 'no-hw'.

Configure
crypto/engine/engine_int.h
crypto/engine/engine_list.c
crypto/engine/hw_atalla.c
crypto/engine/hw_cswift.c
crypto/engine/hw_ncipher.c

index fba942b7ba7681194861c9f4ddb4713b89562ac5..d729173ea667d2699d6c5ffe99ba5cc79d20d5ef 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -10,7 +10,7 @@ use strict;
 
 # see INSTALL for instructions.
 
-my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx] [rsaref] [no-threads] [no-asm] [no-dso] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n";
+my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [rsaref] [no-threads] [no-asm] [no-dso] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n";
 
 # Options:
 #
@@ -27,6 +27,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-
 #               Generic OpenSSL-style methods relating to this support
 #               are always compiled but return NULL if the hardware
 #               support isn't compiled.
+# no-hw         do not compile support for any crypto hardware.
 # rsaref        use RSAref
 # [no-]threads  [don't] try to create a library that is suitable for
 #               multithreaded applications (default is "threads" if we
@@ -481,6 +482,11 @@ foreach (@ARGV)
                $flags .= "-DNO_HW_$hw ";
                $openssl_other_defines .= "#define NO_HW_$hw\n";
                }
+       elsif (/^no-hw$/)
+               {
+               $flags .= "-DNO_HW ";
+               $openssl_other_defines .= "#define NO_HW\n";
+               }
        elsif (/^386$/)
                { $processor=386; }
        elsif (/^rsaref$/)
index 194110cc39e33dbf2feabf85586cbd508f50ec25..510810f2c057ce2fefe07883ae3a6e01eb135372 100644 (file)
@@ -130,6 +130,8 @@ typedef struct engine_st
 /* Returns a structure of software only methods (the default). */
 ENGINE *ENGINE_openssl();
 
+#ifndef NO_HW
+
 #ifndef NO_HW_CSWIFT
 /* Returns a structure of cswift methods ... NB: This can exist and be
  * "used" even on non-cswift systems because the "init" will fail if the
@@ -146,6 +148,8 @@ ENGINE *ENGINE_ncipher();
 ENGINE *ENGINE_atalla();
 #endif /* !NO_HW_ATALLA */
 
+#endif /* !NO_HW */
+
 #ifdef  __cplusplus
 }
 #endif
index 642645362279ad0d44d8538ec88f87681f414818..d764c606611ca899b833365b2baea3ede579f085 100644 (file)
@@ -185,6 +185,7 @@ static int engine_internal_check(void)
         * with our statically compiled-in engines. */
        if(!engine_list_add(ENGINE_openssl()))
                return 0;
+#ifndef NO_HW
 #ifndef NO_HW_CSWIFT
        if(!engine_list_add(ENGINE_cswift()))
                return 0;
@@ -197,6 +198,7 @@ static int engine_internal_check(void)
        if(!engine_list_add(ENGINE_atalla()))
                return 0;
 #endif /* !NO_HW_ATALLA */
+#endif /* !NO_HW */
        engine_list_flag = 1;
        return 1;
        }
index f9ff3efdbe7d741c67feed006f214682a9fbcf55..7e6a351c359c85a888816ec9c96e476138baab8d 100644 (file)
@@ -63,6 +63,7 @@
 #include "engine_int.h"
 #include <openssl/engine.h>
 
+#ifndef NO_HW
 #ifndef NO_HW_ATALLA
 
 #include "vendor_defns/atalla.h"
@@ -434,3 +435,4 @@ static int atalla_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
        }
 
 #endif /* !NO_HW_ATALLA */
+#endif /* !NO_HW */
index c170eb3e0fbf54ef2881432bbafb6fe235e8d042..13eab370be8aadd91c4909c5457456e00d50aa1f 100644 (file)
@@ -63,6 +63,7 @@
 #include "engine_int.h"
 #include <openssl/engine.h>
 
+#ifndef NO_HW
 #ifndef NO_HW_CSWIFT
 
 /* Attribution notice: Rainbow have generously allowed me to reproduce
@@ -730,3 +731,4 @@ static int cswift_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
        }
 
 #endif /* !NO_HW_CSWIFT */
+#endif /* !NO_HW */
index 6d4fc9edd0aacb19e446ebaa281a1f22f9efa554..1a0c41ef10312cab18fa7b6be381df614d6e7c02 100644 (file)
@@ -64,6 +64,7 @@
 #include "engine_int.h"
 #include <openssl/engine.h>
 
+#ifndef NO_HW
 #ifndef NO_HW_NCIPHER
 
 /* Attribution notice: nCipher har said several times that it's OK for
@@ -773,3 +774,4 @@ static void log_message(void *logstream, const char *message)
        }
 
 #endif /* !NO_HW_NCIPHER */
+#endif /* !NO_HW */