From 29a28ee50321fd43e043a45874dda0b75d32a1c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Sat, 5 Feb 2000 21:28:09 +0000 Subject: [PATCH] Cosmetic changes. --- apps/apps.h | 3 +-- apps/openssl.c | 5 +---- apps/progs.h | 7 ++----- apps/progs.pl | 7 ++----- crypto/bn/exptest.c | 1 + crypto/dsa/dsatest.c | 2 ++ crypto/err/err.h | 6 +++--- 7 files changed, 12 insertions(+), 19 deletions(-) diff --git a/apps/apps.h b/apps/apps.h index 793126da02..51733d7e0e 100644 --- a/apps/apps.h +++ b/apps/apps.h @@ -65,7 +65,6 @@ #include #include #include -#include "progs.h" int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn); int app_RAND_write_file(const char *file, BIO *bio_e); @@ -114,7 +113,7 @@ extern BIO *bio_err; #define do_pipe_sig() #endif -#if defined(MONOLITH) && !defined(SSLEAY) +#if defined(MONOLITH) # define apps_startup() do_pipe_sig() #else # if defined(MSDOS) || defined(WIN16) || defined(WIN32) diff --git a/apps/openssl.c b/apps/openssl.c index 17f9fe6ba7..6b48f22e94 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -70,10 +70,9 @@ #include #include #include -#define SSLEAY /* turn off a few special case MONOLITH macros */ #define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */ -#define SSLEAY_SRC #include "apps.h" +#include "progs.h" #include "s_apps.h" #include @@ -374,5 +373,3 @@ static unsigned long MS_CALLBACK hash(FUNCTION *a) { return(lh_strhash(a->name)); } - -#undef SSLEAY diff --git a/apps/progs.h b/apps/progs.h index 2bd335c39d..05e117d55d 100644 --- a/apps/progs.h +++ b/apps/progs.h @@ -1,4 +1,5 @@ -/* This file was generated by progs.pl. */ +/* apps/progs.h */ +/* automatically generated by progs.pl for openssl.c */ extern int verify_main(int argc,char *argv[]); extern int asn1parse_main(int argc,char *argv[]); @@ -32,8 +33,6 @@ extern int pkcs8_main(int argc,char *argv[]); extern int spkac_main(int argc,char *argv[]); extern int smime_main(int argc,char *argv[]); -#ifdef SSLEAY_SRC /* Defined only in openssl.c. */ - #define FUNC_TYPE_GENERAL 1 #define FUNC_TYPE_MD 2 #define FUNC_TYPE_CIPHER 3 @@ -246,5 +245,3 @@ FUNCTION functions[] = { #endif {0,NULL,NULL} }; -#endif - diff --git a/apps/progs.pl b/apps/progs.pl index 243a12d59d..9842d2ace7 100644 --- a/apps/progs.pl +++ b/apps/progs.pl @@ -1,6 +1,7 @@ #!/usr/local/bin/perl -print "/* This file was generated by progs.pl. */\n\n"; +print "/* apps/progs.h */\n"; +print "/* automatically generated by progs.pl for openssl.c */\n\n"; grep(s/^asn1pars$/asn1parse/,@ARGV); @@ -9,8 +10,6 @@ foreach (@ARGV) print <<'EOF'; -#ifdef SSLEAY_SRC /* Defined only in openssl.c. */ - #define FUNC_TYPE_GENERAL 1 #define FUNC_TYPE_MD 2 #define FUNC_TYPE_CIPHER 3 @@ -76,5 +75,3 @@ foreach ( } print "\t{0,NULL,NULL}\n\t};\n"; -print "#endif\n\n"; - diff --git a/crypto/bn/exptest.c b/crypto/bn/exptest.c index b6c7b18a3a..3e86f2ea0e 100644 --- a/crypto/bn/exptest.c +++ b/crypto/bn/exptest.c @@ -173,6 +173,7 @@ int main(int argc, char *argv[]) BN_free(b); BN_free(m); BN_CTX_free(ctx); + ERR_remove_state(0); CRYPTO_mem_leaks(out); BIO_free(out); printf(" done\n"); diff --git a/crypto/dsa/dsatest.c b/crypto/dsa/dsatest.c index 0705060071..309a7cda89 100644 --- a/crypto/dsa/dsatest.c +++ b/crypto/dsa/dsatest.c @@ -136,6 +136,7 @@ int main(int argc, char **argv) unsigned char sig[256]; unsigned int siglen; + ERR_load_crypto_strings(); RAND_seed(rnd_seed, sizeof rnd_seed); if (bio_err == NULL) @@ -199,6 +200,7 @@ end: if (!ret) ERR_print_errors(bio_err); if (dsa != NULL) DSA_free(dsa); + ERR_remove_state(0); CRYPTO_mem_leaks(bio_err); if (bio_err != NULL) { diff --git a/crypto/err/err.h b/crypto/err/err.h index 131372c91b..15bafbff43 100644 --- a/crypto/err/err.h +++ b/crypto/err/err.h @@ -241,9 +241,9 @@ void ERR_print_errors(BIO *bp); void ERR_add_error_data(int num, ...); #endif void ERR_load_strings(int lib,ERR_STRING_DATA str[]); -void ERR_load_ERR_strings(void ); -void ERR_load_crypto_strings(void ); -void ERR_free_strings(void ); +void ERR_load_ERR_strings(void); +void ERR_load_crypto_strings(void); +void ERR_free_strings(void); void ERR_remove_state(unsigned long pid); /* if zero we look it up */ ERR_STATE *ERR_get_state(void); -- 2.25.1