Make it possible to turn off compilation of hardware support through

the configuration parameter 'no-hw'.
This commit is contained in:
Richard Levitte 2000-06-30 11:02:02 +00:00
parent 93e147dd32
commit ae02fc5348
6 changed files with 19 additions and 1 deletions

View file

@ -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$/)

View 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

View 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;
}

View 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 */

View 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 */

View 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 */