Skip to content

Commit

Permalink
make
Browse files Browse the repository at this point in the history
    	./configure no-deprecated [no-dsa] [no-dh] [no-ec] [no-rsa]
    	make depend all test
work again

PR: 1159
  • Loading branch information
Nils Larsch committed Jul 16, 2005
1 parent 57eb1d3 commit 3eeaab4
Show file tree
Hide file tree
Showing 61 changed files with 266 additions and 52 deletions.
2 changes: 2 additions & 0 deletions apps/apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@
#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
#endif
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#include <openssl/bn.h>

#define NON_MAIN
Expand Down
1 change: 1 addition & 0 deletions apps/dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
* [including the GNU Public Licence.]
*/

#include <openssl/opensslconf.h> /* for OPENSSL_NO_DH */
#ifndef OPENSSL_NO_DH
#include <stdio.h>
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions apps/dhparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
*
*/

#include <openssl/opensslconf.h> /* for OPENSSL_NO_DH */
#ifndef OPENSSL_NO_DH
#include <stdio.h>
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions apps/dsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/

#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */
#ifndef OPENSSL_NO_DSA
#include <stdio.h>
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions apps/dsaparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/

#include <openssl/opensslconf.h> /* 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
Expand Down
1 change: 1 addition & 0 deletions apps/gendh.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
* [including the GNU Public Licence.]
*/

#include <openssl/opensslconf.h>
/* Until the key-gen callbacks are modified to use newer prototypes, we allow
* deprecated functions for openssl-internal code */
#ifdef OPENSSL_NO_DEPRECATED
Expand Down
1 change: 1 addition & 0 deletions apps/gendsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/

#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */
#ifndef OPENSSL_NO_DSA
#include <stdio.h>
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions apps/genrsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/

#include <openssl/opensslconf.h>
/* Until the key-gen callbacks are modified to use newer prototypes, we allow
* deprecated functions for openssl-internal code */
#ifdef OPENSSL_NO_DEPRECATED
Expand Down
2 changes: 1 addition & 1 deletion apps/prime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 9 additions & 0 deletions apps/req.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@
#include <openssl/x509v3.h>
#include <openssl/objects.h>
#include <openssl/pem.h>
#include <openssl/bn.h>
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#ifndef OPENSSL_NO_DSA
#include <openssl/dsa.h>
#endif

#define SECTION "req"

Expand Down Expand Up @@ -724,7 +731,9 @@ int MAIN(int argc, char **argv)

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();
Expand Down
1 change: 1 addition & 0 deletions apps/rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* [including the GNU Public Licence.]
*/

#include <openssl/opensslconf.h>
#ifndef OPENSSL_NO_RSA
#include <stdio.h>
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions apps/rsautl.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
*
*/

#include <openssl/opensslconf.h>
#ifndef OPENSSL_NO_RSA

#include "apps.h"
Expand Down
8 changes: 8 additions & 0 deletions apps/s_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ typedef unsigned int u_int;
#include <openssl/x509.h>
#include <openssl/ssl.h>
#include <openssl/rand.h>
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
#endif
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#include "s_apps.h"
#include "timeouts.h"

Expand Down Expand Up @@ -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;
Expand Down
16 changes: 15 additions & 1 deletion apps/speed.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand All @@ -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 **);
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions apps/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@
#include <openssl/x509v3.h>
#include <openssl/objects.h>
#include <openssl/pem.h>
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#ifndef OPENSSL_NO_DSA
#include <openssl/dsa.h>
#endif

#undef PROG
#define PROG x509_main
Expand Down
4 changes: 4 additions & 0 deletions crypto/asn1/t_pkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@

static int print(BIO *fp,const char *str, const BIGNUM *num,
unsigned char *buf,int off);
#ifndef OPENSSL_NO_EC
static int print_bin(BIO *fp, const char *str, const unsigned char *num,
size_t len, int off);
#endif
#ifndef OPENSSL_NO_RSA
#ifndef OPENSSL_NO_FP_API
int RSA_print_fp(FILE *fp, const RSA *x, int off)
Expand Down Expand Up @@ -601,6 +603,7 @@ static int print(BIO *bp, const char *number, const BIGNUM *num, unsigned char *
return(1);
}

#ifndef OPENSSL_NO_EC
static int print_bin(BIO *fp, const char *name, const unsigned char *buf,
size_t len, int off)
{
Expand Down Expand Up @@ -638,6 +641,7 @@ static int print_bin(BIO *fp, const char *name, const unsigned char *buf,

return 1;
}
#endif

#ifndef OPENSSL_NO_DH
#ifndef OPENSSL_NO_FP_API
Expand Down
4 changes: 4 additions & 0 deletions crypto/asn1/t_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#ifndef OPENSSL_NO_DSA
#include <openssl/dsa.h>
#endif

#ifndef OPENSSL_NO_FP_API
int X509_REQ_print_fp(FILE *fp, X509_REQ *x)
Expand Down
4 changes: 4 additions & 0 deletions crypto/asn1/t_spki.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@
#include "cryptlib.h"
#include <openssl/x509.h>
#include <openssl/asn1.h>
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#ifndef OPENSSL_NO_DSA
#include <openssl/dsa.h>
#endif
#include <openssl/bn.h>

/* Print out an SPKI */
Expand Down
4 changes: 4 additions & 0 deletions crypto/asn1/x_pubkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@
#include "cryptlib.h"
#include <openssl/asn1t.h>
#include <openssl/x509.h>
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#ifndef OPENSSL_NO_DSA
#include <openssl/dsa.h>
#endif

/* Minor tweak to operation: free up EVP_PKEY */
static int pubkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
Expand Down
2 changes: 2 additions & 0 deletions crypto/dsa/dsa_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@
#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
#endif
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
#endif

const char *DSA_version="DSA" OPENSSL_VERSION_PTEXT;

Expand Down
1 change: 1 addition & 0 deletions crypto/dsa/dsatest.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
#include <openssl/rand.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/bn.h>

#ifdef OPENSSL_NO_DSA
int main(int argc, char *argv[])
Expand Down
3 changes: 2 additions & 1 deletion crypto/ecdh/ecdhtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@

#include "../e_os.h"

#include <openssl/opensslconf.h> /* for OPENSSL_NO_ECDH */
#include <openssl/crypto.h>
#include <openssl/bio.h>
#include <openssl/bn.h>
#include <openssl/ec.h>
#include <openssl/objects.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
Expand All @@ -89,6 +89,7 @@ int main(int argc, char *argv[])
return(0);
}
#else
#include <openssl/ec.h>
#include <openssl/ecdh.h>

#ifdef OPENSSL_SYS_WIN16
Expand Down
7 changes: 1 addition & 6 deletions crypto/ecdsa/ecdsatest.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@
*
*/

/* Until the key-gen callbacks are modified to use newer prototypes, we allow
* deprecated functions for openssl-internal code */
#ifdef OPENSSL_NO_DEPRECATED
#undef OPENSSL_NO_DEPRECATED
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -92,6 +86,7 @@ int main(int argc, char * argv[])
#include <openssl/crypto.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <openssl/bn.h>
#include <openssl/ecdsa.h>
#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
Expand Down
3 changes: 2 additions & 1 deletion crypto/engine/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ eng_openssl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_openssl.c
eng_padlock.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
eng_padlock.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
eng_padlock.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
eng_padlock.o: ../../include/openssl/engine.h ../../include/openssl/evp.h
eng_padlock.o: ../../include/openssl/engine.h ../../include/openssl/err.h
eng_padlock.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
eng_padlock.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
eng_padlock.o: ../../include/openssl/opensslconf.h
eng_padlock.o: ../../include/openssl/opensslv.h
Expand Down
6 changes: 6 additions & 0 deletions crypto/engine/eng_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,15 @@
#include <openssl/pem.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#ifndef OPENSSL_NO_DSA
#include <openssl/dsa.h>
#endif
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
#endif

/* This testing gunk is implemented (and explained) lower down. It also assumes
* the application explicitly calls "ENGINE_load_openssl()" because this is no
Expand Down
1 change: 1 addition & 0 deletions crypto/engine/eng_padlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
#include <openssl/aes.h>
#endif
#include <openssl/rand.h>
#include <openssl/err.h>

#ifndef OPENSSL_NO_HW
#ifndef OPENSSL_NO_HW_PADLOCK
Expand Down
17 changes: 0 additions & 17 deletions crypto/engine/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,6 @@
extern "C" {
#endif

/* Fixups for missing algorithms */
#ifdef OPENSSL_NO_RSA
typedef void RSA_METHOD;
#endif
#ifdef OPENSSL_NO_DSA
typedef void DSA_METHOD;
#endif
#ifdef OPENSSL_NO_DH
typedef void DH_METHOD;
#endif
#ifdef OPENSSL_NO_ECDH
typedef void ECDH_METHOD;
#endif
#ifdef OPENSSL_NO_ECDSA
typedef void ECDSA_METHOD;
#endif

/* These flags are used to control combinations of algorithm (methods)
* by bitwise "OR"ing. */
#define ENGINE_METHOD_RSA (unsigned int)0x0001
Expand Down
4 changes: 4 additions & 0 deletions crypto/evp/evp_pkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@
#include "cryptlib.h"
#include <openssl/x509.h>
#include <openssl/rand.h>
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#ifndef OPENSSL_NO_DSA
#include <openssl/dsa.h>
#endif
#include <openssl/bn.h>

#ifndef OPENSSL_NO_DSA
Expand Down
Loading

0 comments on commit 3eeaab4

Please sign in to comment.