New "algorithm define" OPENSSL_NO_GMP. Update mkdef.pl and Configure script
authorDr. Stephen Henson <steve@openssl.org>
Tue, 19 Apr 2005 13:24:44 +0000 (13:24 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 19 Apr 2005 13:24:44 +0000 (13:24 +0000)
to use it.

Configure
crypto/engine/eng_all.c
crypto/engine/engine.h
util/mkdef.pl

index 581a7013b84e81492f8ea1f6d6a247ec5e1adc09..1cf439d849cb53e34d12f7823b888a8ba254445e 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -582,6 +582,7 @@ my $zlib=1;      # but "no-zlib" is default
 my $no_krb5=0;   # but "no-krb5" is implied unless "--with-krb5-..." is used
 my $no_asm=0;
 my $no_dso=0;
+my $no_gmp=0;
 my @skip=();
 my $Makefile="Makefile";
 my $des_locl="crypto/des/des_locl.h";
@@ -611,6 +612,7 @@ my $perl;
 # All of the following is disabled by default (RC5 was enabled before 0.9.8):
 
 my %disabled = ( # "what"         => "comment"
+                "gmp"            => "default",
                  "mdc2"           => "default",
                  "rc5"            => "default",
                  "shared"         => "default",
index 93c54d0f6f09e65ed635bf832675500ab97c7fc9..86b2f9a1c33b3bfc931b35937fed7b3a711d81cb 100644 (file)
@@ -102,7 +102,7 @@ void ENGINE_load_builtin_engines(void)
 #if defined(__OpenBSD__) || defined(__FreeBSD__)
        ENGINE_load_cryptodev();
 #endif
-#if defined(OPENSSL_USE_GMP) && !defined(OPENSSL_NO_HW_GMP)
+#if !defined(OPENSSL_NO_GMP) && !defined(OPENSSL_NO_HW_GMP)
        ENGINE_load_gmp();
 #endif
 #endif
index 14fefea47470000d76d2ef7ed752041d55f99706..e25090c90ca5687f2745bc89058ed63d6dbb7c03 100644 (file)
@@ -341,7 +341,9 @@ void ENGINE_load_aep(void);
 void ENGINE_load_atalla(void);
 void ENGINE_load_chil(void);
 void ENGINE_load_cswift(void);
+#ifndef OPENSSL_NO_GMP
 void ENGINE_load_gmp(void);
+#endif
 void ENGINE_load_nuron(void);
 void ENGINE_load_sureware(void);
 void ENGINE_load_ubsec(void);
index e2a83c9fc7351b0b6cdf0948bdab7f8991eb2a2e..e6064baf6cb374e4ec23e9c27c3e2179ae1af073 100755 (executable)
@@ -93,7 +93,7 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
                         # External "algorithms"
                         "FP_API", "STDIO", "SOCK", "KRB5",
                         # Engines
-                        "STATIC_ENGINE", "ENGINE", "HW",
+                        "STATIC_ENGINE", "ENGINE", "HW", "GMP",
                         # Deprecated functions
                         "DEPRECATED" );
 
@@ -112,7 +112,8 @@ my $no_cast;
 my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2;
 my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5;
 my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw;
-my $no_fp_api; my $no_static_engine; my $no_deprecated;
+my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated;
+
 
 foreach (@ARGV, split(/ /, $options))
        {
@@ -184,6 +185,7 @@ foreach (@ARGV, split(/ /, $options))
        elsif (/^no-krb5$/)     { $no_krb5=1; }
        elsif (/^no-engine$/)   { $no_engine=1; }
        elsif (/^no-hw$/)       { $no_hw=1; }
+       elsif (/^no-gmp$/)      { $no_gmp=1; }
        }
 
 
@@ -1084,6 +1086,7 @@ sub is_valid
                        if ($keyword eq "HW" && $no_hw) { return 0; }
                        if ($keyword eq "FP_API" && $no_fp_api) { return 0; }
                        if ($keyword eq "STATIC_ENGINE" && $no_static_engine) { return 0; }
+                       if ($keyword eq "GMP" && $no_gmp) { return 0; }
                        if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; }
 
                        # Nothing recognise as true