apps: Don't include progs.h in apps.h
authorRichard Levitte <levitte@openssl.org>
Wed, 31 Jan 2018 10:13:10 +0000 (11:13 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 31 Jan 2018 22:45:12 +0000 (23:45 +0100)
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)

48 files changed:
apps/apps.h
apps/asn1pars.c
apps/ca.c
apps/ciphers.c
apps/cms.c
apps/crl.c
apps/crl2p7.c
apps/dgst.c
apps/dhparam.c
apps/dsa.c
apps/dsaparam.c
apps/ec.c
apps/ecparam.c
apps/enc.c
apps/engine.c
apps/errstr.c
apps/gendsa.c
apps/genpkey.c
apps/genrsa.c
apps/nseq.c
apps/ocsp.c
apps/openssl.c
apps/passwd.c
apps/pkcs12.c
apps/pkcs7.c
apps/pkcs8.c
apps/pkey.c
apps/pkeyparam.c
apps/pkeyutl.c
apps/prime.c
apps/rand.c
apps/rehash.c
apps/req.c
apps/rsa.c
apps/rsautl.c
apps/s_client.c
apps/s_server.c
apps/s_time.c
apps/sess_id.c
apps/smime.c
apps/speed.c
apps/spkac.c
apps/srp.c
apps/storeutl.c
apps/ts.c
apps/verify.c
apps/version.c
apps/x509.c

index 601797b1b6669dee4cbf462271e7ec914274ea44..a740ad4599a745c1ea562fa041c7ffd3ad6c395e 100644 (file)
@@ -600,6 +600,4 @@ typedef struct verify_options_st {
 
 extern VERIFY_CB_ARGS verify_args;
 
-# include "progs.h"
-
 #endif
index 56a9adc2ffcb23be00d3aff37f39eee927e339ee..f1d32116262b52255b2076fead44e26a7ab57509 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/err.h>
 #include <openssl/evp.h>
 #include <openssl/x509.h>
index 9b1d9bdaac8f9003695e788ad1c5632b6493dace..477d8b4aa089688a070dfeadc0b511ca4353dd14 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -32,6 +32,7 @@
 #endif
 
 #include "apps.h"
+#include "progs.h"
 
 #ifndef W_OK
 # define F_OK 0
index d171b865eb9257f2fe9c8dd73cbc1f9ec544ddab..744589da84737625daf4843293aa4b095b513ca3 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 
index 45ab25970653eae0979082ac81c0f21bd78a37df..e9d760c999b78f51f873aad243cf662469bf2710 100644 (file)
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 
 #ifndef OPENSSL_NO_CMS
 
index 5e1f109a6bde54264d9668681a41ae613a9d1c1d..c81c32331591cb8fd38f76b4a36ba0b73dd451c5 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/bio.h>
 #include <openssl/err.h>
 #include <openssl/x509.h>
index 79217e9efce7bc10dfef5e1e9f2cdc4eacdf05bc..282e3cc5fb6ce5682192325ba8c80ea8b8837980 100644 (file)
@@ -11,6 +11,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/err.h>
 #include <openssl/evp.h>
 #include <openssl/x509.h>
index ba63e123dee29034981e50ef8dcfc90219851530..80e8e843b2615802e1a4e1f74563c691d211e07e 100644 (file)
@@ -11,6 +11,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/bio.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
index 2a78ce28fc754583794593e092ef72f71e15ad9f..82ecc94a8f751686aa074010565846b8ae2e6d9c 100644 (file)
@@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <time.h>
 # include <string.h>
 # include "apps.h"
+# include "progs.h"
 # include <openssl/bio.h>
 # include <openssl/err.h>
 # include <openssl/bn.h>
index 74a68ff64b47dda79d7caa04c51740518a4b4b2f..e9b6f05ca9cda84d501bece4f3f0965a8ae75f36 100644 (file)
@@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <string.h>
 # include <time.h>
 # include "apps.h"
+# include "progs.h"
 # include <openssl/bio.h>
 # include <openssl/err.h>
 # include <openssl/dsa.h>
index ff66fcc64c797a167581507f59ac13ee32fc2ffa..69a85aa2f6fdb46148cc1233660af6cba8f2dec6 100644 (file)
@@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <time.h>
 # include <string.h>
 # include "apps.h"
+# include "progs.h"
 # include <openssl/bio.h>
 # include <openssl/err.h>
 # include <openssl/bn.h>
index 6fc6a6f62533e477bd62ccbe5168f9b25e47f9ad..c9d7ded070d5071734571ba4cb5e34690bfcdc72 100644 (file)
--- a/apps/ec.c
+++ b/apps/ec.c
@@ -16,6 +16,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <stdlib.h>
 # include <string.h>
 # include "apps.h"
+# include "progs.h"
 # include <openssl/bio.h>
 # include <openssl/err.h>
 # include <openssl/evp.h>
index 1f3770e2847d40bb54459f5f08075df6601aa8e9..5e6ee2a3b48b5d051ba5544ae75a053e9e5b3aa4 100644 (file)
@@ -18,6 +18,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <time.h>
 # include <string.h>
 # include "apps.h"
+# include "progs.h"
 # include <openssl/bio.h>
 # include <openssl/err.h>
 # include <openssl/bn.h>
index af882598cc1eaf873378cd2ba9c892584c46945a..5153251b31238ac2a8f605fcfad5f924f662252b 100644 (file)
@@ -12,6 +12,7 @@
 #include <string.h>
 #include <limits.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/bio.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
index 8ada13dce5646b4d18a67fdd4845fe40896f264a..328fe1ff762364462310f96e5e3bcf946c57457a 100644 (file)
@@ -13,6 +13,7 @@ NON_EMPTY_TRANSLATION_UNIT
 #else
 
 # include "apps.h"
+# include "progs.h"
 # include <stdio.h>
 # include <stdlib.h>
 # include <string.h>
index 3ce4acf744ecf9a1146e37ceab8b68cc8765a324..af33a68c8c8f58736adfd03983ff418831134a64 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/bio.h>
 #include <openssl/err.h>
 #include <openssl/ssl.h>
index c57511cfa1fa5fc6a1b83698d2070b2ba71e90fd..14bfeacd8f47fd0e394ae5059d4374afdd0869d4 100644 (file)
@@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <sys/types.h>
 # include <sys/stat.h>
 # include "apps.h"
+# include "progs.h"
 # include <openssl/bio.h>
 # include <openssl/err.h>
 # include <openssl/bn.h>
index 469ea1c943c417c5bae39a3336ed82e08ad2cb64..7e7a1cc29310615bb6ee19d4144ab1c0386ebae8 100644 (file)
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/pem.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
index f14785290284f9b527fc605eb50c2c5ee09e95da..93df823083026c3a60da7443d1738c7f31387dd0 100644 (file)
@@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <sys/types.h>
 # include <sys/stat.h>
 # include "apps.h"
+# include "progs.h"
 # include <openssl/bio.h>
 # include <openssl/err.h>
 # include <openssl/bn.h>
index 82850b81180a49eb2278b3af30645d3ad419d277..fe6eab8c60fb316c9f4d6add50f97a9ededb7dad 100644 (file)
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/pem.h>
 #include <openssl/err.h>
 
index 4a68e52d743930f10ac53d6a07e5942f6fb8abe0..122aee6770eea2d6fbda883a2105965547f54d12 100644 (file)
@@ -25,6 +25,7 @@ NON_EMPTY_TRANSLATION_UNIT
 
 /* Needs to be included before the openssl headers */
 # include "apps.h"
+# include "progs.h"
 # include <openssl/e_os2.h>
 # include <openssl/crypto.h>
 # include <openssl/err.h>
index 8b75a8affbf88ed89fe9f32502054f6dd2db0262..fe1eabdede777044bc15bba9d9b2e2f981059a5a 100644 (file)
@@ -27,8 +27,9 @@
 #ifdef OPENSSL_SYS_VMS
 # include <unixio.h>
 #endif
-#define INCLUDE_FUNCTION_TABLE
 #include "apps.h"
+#define INCLUDE_FUNCTION_TABLE
+#include "progs.h"
 
 /* Structure to hold the number of columns to be displayed and the
  * field width used to display them.
index 85e7a6ebcd2b4b6cc32cc07ea2f5d5646a1de20c..a01f1e7dcdcae55270fb1ce5b171bf46cfbff91b 100644 (file)
@@ -10,6 +10,7 @@
 #include <string.h>
 
 #include "apps.h"
+#include "progs.h"
 
 #include <openssl/bio.h>
 #include <openssl/err.h>
index 6a2f7c004365229b7a67ee5750084bfaf091c379..1a353e169dc0a04e606dbe545a32215bb86fb633 100644 (file)
@@ -16,6 +16,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <stdlib.h>
 # include <string.h>
 # include "apps.h"
+# include "progs.h"
 # include <openssl/crypto.h>
 # include <openssl/err.h>
 # include <openssl/pem.h>
index 8dc77927f19be8fc712fd15405cd212d8c890e9e..afeae64fba0efcca5a8b18d51aa9c0967d7e7081 100644 (file)
@@ -12,6 +12,7 @@
 #include <string.h>
 #include <time.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/err.h>
 #include <openssl/objects.h>
 #include <openssl/evp.h>
index dfc23e5b59bde147d5788cfae438d69e2dcd49e1..ca6ab0156fd1c2b1540f5fb41f5e3b978e55abe4 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/pem.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
index 6160e5a381d0bca0b23d8c9542646550a5d57dbb..0e961dd95e211b20d17af58c7f398b3410023e2a 100644 (file)
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/pem.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
index 35cdd8dc928c865ae42adba5f7ffb1cb064c1bde..b3c610b2f3945ef8cc4b637a995dd79528c84ff4 100644 (file)
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/pem.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
index 07646c8639338a4fe8c218defac0fb21e2351d32..e24782fc52fc7bac644a26a369fd993767f0c99f 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "apps.h"
+#include "progs.h"
 #include <string.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
index 9aa32d02b07296ce121caa73444b379b97ac0ed6..27f4e2849b131217c158e136f2bccab6888f90cc 100644 (file)
@@ -10,6 +10,7 @@
 #include <string.h>
 
 #include "apps.h"
+#include "progs.h"
 #include <openssl/bn.h>
 
 typedef enum OPTION_choice {
index 0ab22a99c851bf9b73c923487a8a43739534b471..b9f4598f661269b06d8fb7cc3f006604aac3b827 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "apps.h"
+#include "progs.h"
 
 #include <ctype.h>
 #include <stdio.h>
index c14bce4007bd36f12a2fce3706eac93994a27e22..e049bfeb4925269266d388d8e51860ce3e60a944 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include "apps.h"
+#include "progs.h"
 
 #if defined(OPENSSL_SYS_UNIX) || defined(__APPLE__) || \
     (defined(__VMS) && defined(__DECC) && __CRTL_VER >= 80300000)
index dca6038a285481a4812ba2448ace7aab275222fe..f67f93a1f79910aa877ac6aee440dac4cf46bb65 100644 (file)
@@ -12,6 +12,7 @@
 #include <time.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/bio.h>
 #include <openssl/evp.h>
 #include <openssl/conf.h>
index 698c046437cb1e7e0c9ce5525cd989b03e9455ad..d7a5ab8da9e989fed89c80561063822850240282 100644 (file)
@@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <string.h>
 # include <time.h>
 # include "apps.h"
+# include "progs.h"
 # include <openssl/bio.h>
 # include <openssl/err.h>
 # include <openssl/rsa.h>
index ca9cb791c7b746870bffa929972886dafd9cd407..f146a489a9bcced0ff14703f394b64dd284380ef 100644 (file)
@@ -13,6 +13,7 @@ NON_EMPTY_TRANSLATION_UNIT
 #else
 
 # include "apps.h"
+# include "progs.h"
 # include <string.h>
 # include <openssl/err.h>
 # include <openssl/pem.h>
index 814a52a9349b0c3187d4bc15a9b22fa2c8c2a8d2..774345e256d4f5a923cc2a881e41b204c1febe31 100644 (file)
@@ -30,6 +30,7 @@ typedef unsigned int u_int;
 #endif
 
 #include "apps.h"
+#include "progs.h"
 #include <openssl/x509.h>
 #include <openssl/ssl.h>
 #include <openssl/err.h>
index bbe44f79a4732e87d3fb13a18f704d6af27ea469..f124b12a4897ced1a20b7664130d10d0c7aee790 100644 (file)
@@ -37,6 +37,7 @@ typedef unsigned int u_int;
 
 #include <openssl/bn.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/x509.h>
index 7e2498872138b6a999b98ced249b58112bc335b6..b5c8b6324f7c01267d09901672e28dd30dd9b7df 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef OPENSSL_NO_SOCK
 
 #include "apps.h"
+#include "progs.h"
 #include <openssl/x509.h>
 #include <openssl/ssl.h>
 #include <openssl/pem.h>
index f0c76b1917c4a1a65b34c82cce14913803d875b1..838a63d4e6c59c90c2238e3bf37a98928e1052e2 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/bio.h>
 #include <openssl/err.h>
 #include <openssl/x509.h>
index 43d63704f99b664f74f4b289449a12f946f8e8fb..1c00b0f439f403eb601669bd482c79bec2e596d4 100644 (file)
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/crypto.h>
 #include <openssl/pem.h>
 #include <openssl/err.h>
index db4b14fab693f52ff450e0d0ef982f1e458362db..c59f266fc90e932fab1e815e52fdc35f38ad8588 100644 (file)
@@ -20,6 +20,7 @@
 #include <string.h>
 #include <math.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/crypto.h>
 #include <openssl/rand.h>
 #include <openssl/err.h>
index c0817517c29c037470317320b26093a3edaaa361..eeee6e398ea5c8a964f132c4aac32405fd0fccc0 100644 (file)
@@ -12,6 +12,7 @@
 #include <string.h>
 #include <time.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/bio.h>
 #include <openssl/conf.h>
 #include <openssl/err.h>
index b8fcf71609c2bbaa77aeb1465140b2da72a1d521..123b5579b0d58f4bd72d7e6c83b65085e826c1e7 100644 (file)
@@ -22,6 +22,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <openssl/buffer.h>
 # include <openssl/srp.h>
 # include "apps.h"
+# include "progs.h"
 
 # define BASE_SECTION    "srp"
 # define CONFIG_FILE "openssl.cnf"
index 77f0f3f0f5755becb6912b5ed5220073d4777ed4..55a11e594d1f214f4dad137b64c36a1c65b44bd3 100644 (file)
@@ -10,6 +10,7 @@
 #include <openssl/opensslconf.h>
 
 #include "apps.h"
+#include "progs.h"
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/store.h>
index 96da50e51e78cf538a9893041b7d7a09e4fbdd79..13cca9e0257b54f7a53750a000c70216f9354358 100644 (file)
--- a/apps/ts.c
+++ b/apps/ts.c
@@ -15,6 +15,7 @@ NON_EMPTY_TRANSLATION_UNIT
 # include <stdlib.h>
 # include <string.h>
 # include "apps.h"
+# include "progs.h"
 # include <openssl/bio.h>
 # include <openssl/err.h>
 # include <openssl/pem.h>
index 1dccf76130048357a253b0f6a4209882743c9c53..765782e9c88371e059857925590305a643afb14c 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/bio.h>
 #include <openssl/err.h>
 #include <openssl/x509.h>
index 7fc9a27d678421722bb95a4377037be998e4c020..5066482a07cdee5e0b80c0354ff391b63ca7d382 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/evp.h>
 #include <openssl/crypto.h>
 #include <openssl/bn.h>
index 001c3959aa335b71fc53eda3e04e99a92a931fb8..78031247292ea477df3a9c4f83880ef691a8a57e 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "apps.h"
+#include "progs.h"
 #include <openssl/bio.h>
 #include <openssl/asn1.h>
 #include <openssl/err.h>