apps: Don't include progs.h in apps.h

Everything in apps includes apps.h, because that one declares apps
internal library routines.  However, progs.h doesn't declare library
routines, but rather the main commands and their options, and there's
no reason why the library modules should include it.

So, remove the inclusion of progs.h from apps.h and add that inclusion
in all command source files.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5222)
This commit is contained in:
Richard Levitte 2018-01-31 11:13:10 +01:00
parent 79a0e87648
commit dab2cd68e7
48 changed files with 48 additions and 3 deletions

View file

@ -600,6 +600,4 @@ typedef struct verify_options_st {
extern VERIFY_CB_ARGS verify_args; extern VERIFY_CB_ARGS verify_args;
# include "progs.h"
#endif #endif

View file

@ -11,6 +11,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/x509.h> #include <openssl/x509.h>

View file

@ -32,6 +32,7 @@
#endif #endif
#include "apps.h" #include "apps.h"
#include "progs.h"
#ifndef W_OK #ifndef W_OK
# define F_OK 0 # define F_OK 0

View file

@ -11,6 +11,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/ssl.h> #include <openssl/ssl.h>

View file

@ -12,6 +12,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#ifndef OPENSSL_NO_CMS #ifndef OPENSSL_NO_CMS

View file

@ -11,6 +11,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/x509.h> #include <openssl/x509.h>

View file

@ -11,6 +11,7 @@
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/x509.h> #include <openssl/x509.h>

View file

@ -11,6 +11,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/evp.h> #include <openssl/evp.h>

View file

@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <time.h> # include <time.h>
# include <string.h> # include <string.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/bio.h> # include <openssl/bio.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/bn.h> # include <openssl/bn.h>

View file

@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <string.h> # include <string.h>
# include <time.h> # include <time.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/bio.h> # include <openssl/bio.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/dsa.h> # include <openssl/dsa.h>

View file

@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <time.h> # include <time.h>
# include <string.h> # include <string.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/bio.h> # include <openssl/bio.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/bn.h> # include <openssl/bn.h>

View file

@ -16,6 +16,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <stdlib.h> # include <stdlib.h>
# include <string.h> # include <string.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/bio.h> # include <openssl/bio.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/evp.h> # include <openssl/evp.h>

View file

@ -18,6 +18,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <time.h> # include <time.h>
# include <string.h> # include <string.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/bio.h> # include <openssl/bio.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/bn.h> # include <openssl/bn.h>

View file

@ -12,6 +12,7 @@
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/evp.h> #include <openssl/evp.h>

View file

@ -13,6 +13,7 @@ NON_EMPTY_TRANSLATION_UNIT
#else #else
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <stdio.h> # include <stdio.h>
# include <stdlib.h> # include <stdlib.h>
# include <string.h> # include <string.h>

View file

@ -11,6 +11,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/ssl.h> #include <openssl/ssl.h>

View file

@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <sys/types.h> # include <sys/types.h>
# include <sys/stat.h> # include <sys/stat.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/bio.h> # include <openssl/bio.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/bn.h> # include <openssl/bn.h>

View file

@ -10,6 +10,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/evp.h> #include <openssl/evp.h>

View file

@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <sys/types.h> # include <sys/types.h>
# include <sys/stat.h> # include <sys/stat.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/bio.h> # include <openssl/bio.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/bn.h> # include <openssl/bn.h>

View file

@ -10,6 +10,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/err.h> #include <openssl/err.h>

View file

@ -25,6 +25,7 @@ NON_EMPTY_TRANSLATION_UNIT
/* Needs to be included before the openssl headers */ /* Needs to be included before the openssl headers */
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/e_os2.h> # include <openssl/e_os2.h>
# include <openssl/crypto.h> # include <openssl/crypto.h>
# include <openssl/err.h> # include <openssl/err.h>

View file

@ -27,8 +27,9 @@
#ifdef OPENSSL_SYS_VMS #ifdef OPENSSL_SYS_VMS
# include <unixio.h> # include <unixio.h>
#endif #endif
#define INCLUDE_FUNCTION_TABLE
#include "apps.h" #include "apps.h"
#define INCLUDE_FUNCTION_TABLE
#include "progs.h"
/* Structure to hold the number of columns to be displayed and the /* Structure to hold the number of columns to be displayed and the
* field width used to display them. * field width used to display them.

View file

@ -10,6 +10,7 @@
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/err.h> #include <openssl/err.h>

View file

@ -16,6 +16,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <stdlib.h> # include <stdlib.h>
# include <string.h> # include <string.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/crypto.h> # include <openssl/crypto.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/pem.h> # include <openssl/pem.h>

View file

@ -12,6 +12,7 @@
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/objects.h> #include <openssl/objects.h>
#include <openssl/evp.h> #include <openssl/evp.h>

View file

@ -11,6 +11,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/evp.h> #include <openssl/evp.h>

View file

@ -10,6 +10,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/evp.h> #include <openssl/evp.h>

View file

@ -10,6 +10,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/evp.h> #include <openssl/evp.h>

View file

@ -8,6 +8,7 @@
*/ */
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <string.h> #include <string.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/pem.h> #include <openssl/pem.h>

View file

@ -10,6 +10,7 @@
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bn.h> #include <openssl/bn.h>
typedef enum OPTION_choice { typedef enum OPTION_choice {

View file

@ -8,6 +8,7 @@
*/ */
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>

View file

@ -9,6 +9,7 @@
*/ */
#include "apps.h" #include "apps.h"
#include "progs.h"
#if defined(OPENSSL_SYS_UNIX) || defined(__APPLE__) || \ #if defined(OPENSSL_SYS_UNIX) || defined(__APPLE__) || \
(defined(__VMS) && defined(__DECC) && __CRTL_VER >= 80300000) (defined(__VMS) && defined(__DECC) && __CRTL_VER >= 80300000)

View file

@ -12,6 +12,7 @@
#include <time.h> #include <time.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/conf.h> #include <openssl/conf.h>

View file

@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <string.h> # include <string.h>
# include <time.h> # include <time.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/bio.h> # include <openssl/bio.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/rsa.h> # include <openssl/rsa.h>

View file

@ -13,6 +13,7 @@ NON_EMPTY_TRANSLATION_UNIT
#else #else
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <string.h> # include <string.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/pem.h> # include <openssl/pem.h>

View file

@ -30,6 +30,7 @@ typedef unsigned int u_int;
#endif #endif
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/x509.h> #include <openssl/x509.h>
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include <openssl/err.h> #include <openssl/err.h>

View file

@ -37,6 +37,7 @@ typedef unsigned int u_int;
#include <openssl/bn.h> #include <openssl/bn.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/x509.h> #include <openssl/x509.h>

View file

@ -18,6 +18,7 @@
#ifndef OPENSSL_NO_SOCK #ifndef OPENSSL_NO_SOCK
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/x509.h> #include <openssl/x509.h>
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include <openssl/pem.h> #include <openssl/pem.h>

View file

@ -11,6 +11,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/x509.h> #include <openssl/x509.h>

View file

@ -12,6 +12,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/crypto.h> #include <openssl/crypto.h>
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/err.h> #include <openssl/err.h>

View file

@ -20,6 +20,7 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/crypto.h> #include <openssl/crypto.h>
#include <openssl/rand.h> #include <openssl/rand.h>
#include <openssl/err.h> #include <openssl/err.h>

View file

@ -12,6 +12,7 @@
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/conf.h> #include <openssl/conf.h>
#include <openssl/err.h> #include <openssl/err.h>

View file

@ -22,6 +22,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <openssl/buffer.h> # include <openssl/buffer.h>
# include <openssl/srp.h> # include <openssl/srp.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# define BASE_SECTION "srp" # define BASE_SECTION "srp"
# define CONFIG_FILE "openssl.cnf" # define CONFIG_FILE "openssl.cnf"

View file

@ -10,6 +10,7 @@
#include <openssl/opensslconf.h> #include <openssl/opensslconf.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/store.h> #include <openssl/store.h>

View file

@ -15,6 +15,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <stdlib.h> # include <stdlib.h>
# include <string.h> # include <string.h>
# include "apps.h" # include "apps.h"
# include "progs.h"
# include <openssl/bio.h> # include <openssl/bio.h>
# include <openssl/err.h> # include <openssl/err.h>
# include <openssl/pem.h> # include <openssl/pem.h>

View file

@ -11,6 +11,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/x509.h> #include <openssl/x509.h>

View file

@ -11,6 +11,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/crypto.h> #include <openssl/crypto.h>
#include <openssl/bn.h> #include <openssl/bn.h>

View file

@ -11,6 +11,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "apps.h" #include "apps.h"
#include "progs.h"
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/asn1.h> #include <openssl/asn1.h>
#include <openssl/err.h> #include <openssl/err.h>