From 3eeaab4bed46e3320947d0f609b82007b65b5a46 Mon Sep 17 00:00:00 2001 From: Nils Larsch Date: Sat, 16 Jul 2005 12:37:36 +0000 Subject: make ./configure no-deprecated [no-dsa] [no-dh] [no-ec] [no-rsa] make depend all test work again PR: 1159 --- apps/apps.c | 2 ++ apps/dh.c | 1 + apps/dhparam.c | 1 + apps/dsa.c | 1 + apps/dsaparam.c | 1 + apps/gendh.c | 1 + apps/gendsa.c | 1 + apps/genrsa.c | 1 + apps/prime.c | 2 +- apps/req.c | 9 +++++++++ apps/rsa.c | 1 + apps/rsautl.c | 1 + apps/s_server.c | 8 ++++++++ apps/speed.c | 16 +++++++++++++++- apps/x509.c | 4 ++++ 15 files changed, 48 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/apps.c b/apps/apps.c index 248c65adb3..613c3ba495 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -125,7 +125,9 @@ #ifndef OPENSSL_NO_ENGINE #include #endif +#ifndef OPENSSL_NO_RSA #include +#endif #include #define NON_MAIN diff --git a/apps/dh.c b/apps/dh.c index cd01fed139..c4d891e125 100644 --- a/apps/dh.c +++ b/apps/dh.c @@ -57,6 +57,7 @@ * [including the GNU Public Licence.] */ +#include /* for OPENSSL_NO_DH */ #ifndef OPENSSL_NO_DH #include #include diff --git a/apps/dhparam.c b/apps/dhparam.c index e3cabcfcdc..04bd57c6e8 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -109,6 +109,7 @@ * */ +#include /* for OPENSSL_NO_DH */ #ifndef OPENSSL_NO_DH #include #include diff --git a/apps/dsa.c b/apps/dsa.c index b6f0ed3d02..a5ec5d7e6c 100644 --- a/apps/dsa.c +++ b/apps/dsa.c @@ -56,6 +56,7 @@ * [including the GNU Public Licence.] */ +#include /* for OPENSSL_NO_DSA */ #ifndef OPENSSL_NO_DSA #include #include diff --git a/apps/dsaparam.c b/apps/dsaparam.c index 14e79f9a21..c301e81af1 100644 --- a/apps/dsaparam.c +++ b/apps/dsaparam.c @@ -56,6 +56,7 @@ * [including the GNU Public Licence.] */ +#include /* for OPENSSL_NO_DSA */ /* Until the key-gen callbacks are modified to use newer prototypes, we allow * deprecated functions for openssl-internal code */ #ifdef OPENSSL_NO_DEPRECATED diff --git a/apps/gendh.c b/apps/gendh.c index 69baa50b01..47497864b0 100644 --- a/apps/gendh.c +++ b/apps/gendh.c @@ -57,6 +57,7 @@ * [including the GNU Public Licence.] */ +#include /* Until the key-gen callbacks are modified to use newer prototypes, we allow * deprecated functions for openssl-internal code */ #ifdef OPENSSL_NO_DEPRECATED diff --git a/apps/gendsa.c b/apps/gendsa.c index 6d2ed06c81..828e27f1c0 100644 --- a/apps/gendsa.c +++ b/apps/gendsa.c @@ -56,6 +56,7 @@ * [including the GNU Public Licence.] */ +#include /* for OPENSSL_NO_DSA */ #ifndef OPENSSL_NO_DSA #include #include diff --git a/apps/genrsa.c b/apps/genrsa.c index f0bb30c56b..4f62cfd04f 100644 --- a/apps/genrsa.c +++ b/apps/genrsa.c @@ -56,6 +56,7 @@ * [including the GNU Public Licence.] */ +#include /* Until the key-gen callbacks are modified to use newer prototypes, we allow * deprecated functions for openssl-internal code */ #ifdef OPENSSL_NO_DEPRECATED diff --git a/apps/prime.c b/apps/prime.c index 36bbe0841c..af2fed15af 100644 --- a/apps/prime.c +++ b/apps/prime.c @@ -115,7 +115,7 @@ int MAIN(int argc, char **argv) BN_print(bio_out,bn); BIO_printf(bio_out," is %sprime\n", - BN_is_prime(bn,checks,NULL,NULL,NULL) ? "" : "not "); + BN_is_prime_ex(bn,checks,NULL,NULL) ? "" : "not "); BN_free(bn); BIO_free_all(bio_out); diff --git a/apps/req.c b/apps/req.c index 511be7de74..f58e65ec85 100644 --- a/apps/req.c +++ b/apps/req.c @@ -79,6 +79,13 @@ #include #include #include +#include +#ifndef OPENSSL_NO_RSA +#include +#endif +#ifndef OPENSSL_NO_DSA +#include +#endif #define SECTION "req" @@ -724,7 +731,9 @@ bad: if (newreq && (pkey == NULL)) { +#ifndef OPENSSL_NO_RSA BN_GENCB cb; +#endif char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE"); if (randfile == NULL) ERR_clear_error(); diff --git a/apps/rsa.c b/apps/rsa.c index ee65720530..d5cb7b7212 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -56,6 +56,7 @@ * [including the GNU Public Licence.] */ +#include #ifndef OPENSSL_NO_RSA #include #include diff --git a/apps/rsautl.c b/apps/rsautl.c index a629ff50ac..463890950e 100644 --- a/apps/rsautl.c +++ b/apps/rsautl.c @@ -56,6 +56,7 @@ * */ +#include #ifndef OPENSSL_NO_RSA #include "apps.h" diff --git a/apps/s_server.c b/apps/s_server.c index afc27e15c9..f83dd82343 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -153,6 +153,12 @@ typedef unsigned int u_int; #include #include #include +#ifndef OPENSSL_NO_DH +#include +#endif +#ifndef OPENSSL_NO_RSA +#include +#endif #include "s_apps.h" #include "timeouts.h" @@ -530,7 +536,9 @@ int MAIN(int argc, char *argv[]) char *CApath=NULL,*CAfile=NULL; unsigned char *context = NULL; char *dhfile = NULL; +#ifndef OPENSSL_NO_ECDH char *named_curve = NULL; +#endif int badop=0,bugs=0; int ret=1; int off=0; diff --git a/apps/speed.c b/apps/speed.c index 8f2aac5ccb..474f20c5a4 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -286,9 +286,17 @@ static double results[ALGOR_NUM][SIZE_NUM]; static int lengths[SIZE_NUM]={16,64,256,1024,8*1024}; static double rsa_results[RSA_NUM][2]; static double dsa_results[DSA_NUM][2]; +#ifndef OPENSSL_NO_ECDSA static double ecdsa_results[EC_NUM][2]; +#endif +#ifndef OPENSSL_NO_ECDH static double ecdh_results[EC_NUM][1]; +#endif +#if defined(OPENSSL_NO_DSA) && !(defined(OPENSSL_NO_ECDSA) && defined(OPENSSL_NO_ECDH)) +static const char rnd_seed[] = "string to make the random number generator think it has entropy"; +static int rnd_fake = 0; +#endif #ifdef SIGALRM #if defined(__STDC__) || defined(sgi) || defined(_AIX) @@ -448,6 +456,7 @@ static double Time_F(int s) #endif /* if defined(OPENSSL_SYS_NETWARE) */ +#ifndef OPENSSL_NO_ECDH static const int KDF1_SHA1_len = 20; static void *KDF1_SHA1(const void *in, size_t inlen, void *out, size_t *outlen) { @@ -459,8 +468,9 @@ static void *KDF1_SHA1(const void *in, size_t inlen, void *out, size_t *outlen) return SHA1(in, inlen, out); #else return NULL; -#endif +#endif /* OPENSSL_NO_SHA */ } +#endif /* OPENSSL_NO_ECDH */ int MAIN(int, char **); @@ -695,8 +705,12 @@ int MAIN(int argc, char **argv) int rsa_doit[RSA_NUM]; int dsa_doit[DSA_NUM]; +#ifndef OPENSSL_NO_ECDSA int ecdsa_doit[EC_NUM]; +#endif +#ifndef OPENSSL_NO_ECDH int ecdh_doit[EC_NUM]; +#endif int doit[ALGOR_NUM]; int pr_header=0; const EVP_CIPHER *evp_cipher=NULL; diff --git a/apps/x509.c b/apps/x509.c index 393d0d1f47..5f61eb5c46 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -73,8 +73,12 @@ #include #include #include +#ifndef OPENSSL_NO_RSA #include +#endif +#ifndef OPENSSL_NO_DSA #include +#endif #undef PROG #define PROG x509_main -- cgit v1.2.3