diff --git a/apps/asn1pars.c b/apps/asn1pars.c index 0bc48e3f5e2a07e0814d7781efc07e36bc5a86f9..c4b2038bdd6be7d74830f249ad2213c83fdfd7b3 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -30,7 +30,7 @@ typedef enum OPTION_choice { OPT_ITEM } OPTION_CHOICE; -OPTIONS asn1parse_options[] = { +const OPTIONS asn1parse_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "input format - one of DER PEM"}, {"in", OPT_IN, '<', "input file"}, diff --git a/apps/ca.c b/apps/ca.c index ecd628ff622b19cfc4a44d70671a018b3ede7875..39de2db738ab2aaf79159735734614d0c58b943e 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -155,7 +155,7 @@ typedef enum OPTION_choice { OPT_CRL_REASON, OPT_CRL_HOLD, OPT_CRL_COMPROMISE, OPT_CRL_CA_COMPROMISE } OPTION_CHOICE; -OPTIONS ca_options[] = { +const OPTIONS ca_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"verbose", OPT_VERBOSE, '-', "Verbose output during processing"}, {"config", OPT_CONFIG, 's', "A config file"}, diff --git a/apps/ciphers.c b/apps/ciphers.c index c0f43ea2e8b4b1a9aff68af4cafd07e8f2b2189f..7b99757d7b465e10d7fdd5e8eb238373d7dcca21 100644 --- a/apps/ciphers.c +++ b/apps/ciphers.c @@ -26,7 +26,7 @@ typedef enum OPTION_choice { OPT_V, OPT_UPPER_V, OPT_S } OPTION_CHOICE; -OPTIONS ciphers_options[] = { +const OPTIONS ciphers_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"v", OPT_V, '-', "Verbose listing of the SSL/TLS ciphers"}, {"V", OPT_UPPER_V, '-', "Even more verbose"}, diff --git a/apps/cms.c b/apps/cms.c index 21f096192a666546d5caac7cdde32c6aaa9000e1..306e159f7eda867fbdb336df20c97ce58092f991 100644 --- a/apps/cms.c +++ b/apps/cms.c @@ -84,7 +84,7 @@ typedef enum OPTION_choice { OPT_CIPHER } OPTION_CHOICE; -OPTIONS cms_options[] = { +const OPTIONS cms_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [options] cert.pem...\n"}, {OPT_HELP_STR, 1, '-', " cert.pem... recipient certs for encryption\n"}, diff --git a/apps/crl.c b/apps/crl.c index 06b6e5b92ccac924c3242c2429abacbbd6ecabf9..3847faa427ff452ae3049f7cedeb4cfd0a0decef 100644 --- a/apps/crl.c +++ b/apps/crl.c @@ -26,7 +26,7 @@ typedef enum OPTION_choice { OPT_NOOUT, OPT_NAMEOPT, OPT_MD } OPTION_CHOICE; -OPTIONS crl_options[] = { +const OPTIONS crl_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "Input format; default PEM"}, {"in", OPT_IN, '<', "Input file - default stdin"}, diff --git a/apps/crl2p7.c b/apps/crl2p7.c index 9c5f79f9f37988d0db709eda6eeaf82d44a1044a..cb2461e2e0a339381b49b063e204a6b889f9af2b 100644 --- a/apps/crl2p7.c +++ b/apps/crl2p7.c @@ -25,7 +25,7 @@ typedef enum OPTION_choice { OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_NOCRL, OPT_CERTFILE } OPTION_CHOICE; -OPTIONS crl2pkcs7_options[] = { +const OPTIONS crl2pkcs7_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "Input format - DER or PEM"}, {"outform", OPT_OUTFORM, 'F', "Output format - DER or PEM"}, diff --git a/apps/dgst.c b/apps/dgst.c index b10b93e5880671aa9a90370101470c7fc8b39802..2fb5a758d05706894eb9f737644988b96d1ff510 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -36,7 +36,7 @@ typedef enum OPTION_choice { OPT_DIGEST } OPTION_CHOICE; -OPTIONS dgst_options[] = { +const OPTIONS dgst_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [options] [file...]\n"}, {OPT_HELP_STR, 1, '-', " file... files to digest (default is stdin)\n"}, diff --git a/apps/dhparam.c b/apps/dhparam.c index ab2e787f76e4da3e95aa935214b06c52c891ab0b..302be2dd5737b5963acc89afb04557cab96e49bd 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -39,7 +39,7 @@ typedef enum OPTION_choice { OPT_RAND, OPT_DSAPARAM, OPT_C, OPT_2, OPT_5 } OPTION_CHOICE; -OPTIONS dhparam_options[] = { +const OPTIONS dhparam_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [flags] [numbits]\n"}, {OPT_HELP_STR, 1, '-', "Valid options are:\n"}, {"help", OPT_HELP, '-', "Display this summary"}, diff --git a/apps/dsa.c b/apps/dsa.c index 6aef5026e397d32e2e64f50b1a2ed59563f6224d..f608d7d276931e26d37ab9e08af44bcaa26a28e9 100644 --- a/apps/dsa.c +++ b/apps/dsa.c @@ -34,7 +34,7 @@ typedef enum OPTION_choice { OPT_PUBOUT, OPT_CIPHER, OPT_PASSIN, OPT_PASSOUT } OPTION_CHOICE; -OPTIONS dsa_options[] = { +const OPTIONS dsa_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'f', "Input format, DER PEM PVK"}, {"outform", OPT_OUTFORM, 'F', "Output format, DER PEM PVK"}, diff --git a/apps/dsaparam.c b/apps/dsaparam.c index 404266009eaa7dcb4685bb17d20ac1b8c822154e..027597b66688b86f704cd49dc27f280c65cfbada 100644 --- a/apps/dsaparam.c +++ b/apps/dsaparam.c @@ -44,7 +44,7 @@ typedef enum OPTION_choice { OPT_TIMEBOMB } OPTION_CHOICE; -OPTIONS dsaparam_options[] = { +const OPTIONS dsaparam_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "Input format - DER or PEM"}, {"in", OPT_IN, '<', "Input file"}, diff --git a/apps/ec.c b/apps/ec.c index 007bf0a89c95a52f8ca5d4df6ea8150660dac5e1..368d226f4eeb4b049a6fc90905eb32ec56917c71 100644 --- a/apps/ec.c +++ b/apps/ec.c @@ -42,7 +42,7 @@ typedef enum OPTION_choice { OPT_NO_PUBLIC, OPT_CHECK } OPTION_CHOICE; -OPTIONS ec_options[] = { +const OPTIONS ec_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"in", OPT_IN, 's', "Input file"}, {"inform", OPT_INFORM, 'f', "Input format - DER or PEM"}, diff --git a/apps/ecparam.c b/apps/ecparam.c index 4e6cf22908f93dfaf4fcb861551ae5026a769c91..d1dcf1d75edadded2781fdefdf03cbee813041d9 100644 --- a/apps/ecparam.c +++ b/apps/ecparam.c @@ -45,7 +45,7 @@ typedef enum OPTION_choice { OPT_CONV_FORM, OPT_PARAM_ENC, OPT_GENKEY, OPT_RAND, OPT_ENGINE } OPTION_CHOICE; -OPTIONS ecparam_options[] = { +const OPTIONS ecparam_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "Input format - default PEM (DER or PEM)"}, {"outform", OPT_OUTFORM, 'F', "Output format - default PEM"}, diff --git a/apps/enc.c b/apps/enc.c index 10ab15af27c1a3e3ecd0b12cda48c04b49b12de5..33edd6c2d1d7a70faef7df9932a88a7ea554e211 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -41,7 +41,7 @@ typedef enum OPTION_choice { OPT_UPPER_S, OPT_IV, OPT_MD, OPT_CIPHER } OPTION_CHOICE; -OPTIONS enc_options[] = { +const OPTIONS enc_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"ciphers", OPT_LIST, '-', "List ciphers"}, {"in", OPT_IN, '<', "Input file"}, diff --git a/apps/engine.c b/apps/engine.c index ffd3137426de1fb6fe4a734076d78d141ed8e737..da1d91898bab20e1a301309ab7b1b3236dd9fb59 100644 --- a/apps/engine.c +++ b/apps/engine.c @@ -26,7 +26,7 @@ typedef enum OPTION_choice { OPT_V = 100, OPT_VV, OPT_VVV, OPT_VVVV } OPTION_CHOICE; -OPTIONS engine_options[] = { +const OPTIONS engine_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [options] engine...\n"}, {OPT_HELP_STR, 1, '-', " engine... Engines to load\n"}, diff --git a/apps/errstr.c b/apps/errstr.c index 5fda799d1486b76b76a69f439f39fe271f4618a9..6bbbe2f6ae63fc2afc6b1df43b258467f54120fe 100644 --- a/apps/errstr.c +++ b/apps/errstr.c @@ -20,7 +20,7 @@ typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP } OPTION_CHOICE; -OPTIONS errstr_options[] = { +const OPTIONS errstr_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [options] errnum...\n"}, {OPT_HELP_STR, 1, '-', " errnum Error number\n"}, {"help", OPT_HELP, '-', "Display this summary"}, diff --git a/apps/gendsa.c b/apps/gendsa.c index 4c05493bfa5d92be32e3737294501818169b6832..272cbb17a5605ec355330605770ed34c3818b3ea 100644 --- a/apps/gendsa.c +++ b/apps/gendsa.c @@ -29,7 +29,7 @@ typedef enum OPTION_choice { OPT_OUT, OPT_PASSOUT, OPT_ENGINE, OPT_RAND, OPT_CIPHER } OPTION_CHOICE; -OPTIONS gendsa_options[] = { +const OPTIONS gendsa_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [args] dsaparam-file\n"}, {OPT_HELP_STR, 1, '-', "Valid options are:\n"}, {"help", OPT_HELP, '-', "Display this summary"}, diff --git a/apps/genpkey.c b/apps/genpkey.c index 7abb3e6ff11f4bb24562325674d1454476bd0844..93e15d80f14a77c79d92bbd8e1653f80e4befc94 100644 --- a/apps/genpkey.c +++ b/apps/genpkey.c @@ -26,7 +26,7 @@ typedef enum OPTION_choice { OPT_ALGORITHM, OPT_PKEYOPT, OPT_GENPARAM, OPT_TEXT, OPT_CIPHER } OPTION_CHOICE; -OPTIONS genpkey_options[] = { +const OPTIONS genpkey_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"out", OPT_OUT, '>', "Output file"}, {"outform", OPT_OUTFORM, 'F', "output format (DER or PEM)"}, diff --git a/apps/genrsa.c b/apps/genrsa.c index 4d104d2882c2d6f10d8ed9deb0cc3b0bd85702de..bdcb20c7ac3cd07094f1643b197d092e292f618e 100644 --- a/apps/genrsa.c +++ b/apps/genrsa.c @@ -36,7 +36,7 @@ typedef enum OPTION_choice { OPT_OUT, OPT_RAND, OPT_PASSOUT, OPT_CIPHER } OPTION_CHOICE; -OPTIONS genrsa_options[] = { +const OPTIONS genrsa_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"3", OPT_3, '-', "Use 3 for the E value"}, {"F4", OPT_F4, '-', "Use F4 (0x10001) for the E value"}, diff --git a/apps/nseq.c b/apps/nseq.c index 018d5ebdb65502a920359b5cefc2bcfb34ee2f34..a97fe1828f06d1c9d9d3564287638c4daae19494 100644 --- a/apps/nseq.c +++ b/apps/nseq.c @@ -18,7 +18,7 @@ typedef enum OPTION_choice { OPT_TOSEQ, OPT_IN, OPT_OUT } OPTION_CHOICE; -OPTIONS nseq_options[] = { +const OPTIONS nseq_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"toseq", OPT_TOSEQ, '-', "Output NS Sequence file"}, {"in", OPT_IN, '<', "Input file"}, diff --git a/apps/ocsp.c b/apps/ocsp.c index 41ea97030786e9b1b3d54a7f46ef0117b6745476..8f6084214dac4620eb336c80d56c43b565f7c139 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -99,7 +99,7 @@ typedef enum OPTION_choice { OPT_MD } OPTION_CHOICE; -OPTIONS ocsp_options[] = { +const OPTIONS ocsp_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"out", OPT_OUTFILE, '>', "Output filename"}, {"timeout", OPT_TIMEOUT, 'p', diff --git a/apps/openssl.c b/apps/openssl.c index fceb458542a6685db73d485aa5d6483ab5960f79..f6a8f9df55ae932cbb6ad4e1aa5665be0305169e 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -264,7 +264,7 @@ int main(int argc, char *argv[]) EXIT(ret); } -OPTIONS exit_options[] = { +const OPTIONS exit_options[] = { {NULL} }; @@ -322,7 +322,7 @@ typedef enum HELPLIST_CHOICE { OPT_PK_ALGORITHMS, OPT_DISABLED, OPT_MISSING_HELP } HELPLIST_CHOICE; -OPTIONS list_options[] = { +const OPTIONS list_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"commands", OPT_COMMANDS, '-', "List of standard commands"}, {"digest-commands", OPT_DIGEST_COMMANDS, '-', @@ -397,7 +397,7 @@ typedef enum HELP_CHOICE { OPT_hERR = -1, OPT_hEOF = 0, OPT_hHELP } HELP_CHOICE; -OPTIONS help_options[] = { +const OPTIONS help_options[] = { {"help", OPT_hHELP, '-', "Display this summary"}, {NULL} }; diff --git a/apps/passwd.c b/apps/passwd.c index e4fb6d3f1296cade1ff5f4598744c2b2851656aa..681af49b8ef16e0c1e665d7981f32a2eacf30b4c 100644 --- a/apps/passwd.c +++ b/apps/passwd.c @@ -67,7 +67,7 @@ typedef enum OPTION_choice { OPT_1, OPT_5, OPT_6, OPT_CRYPT, OPT_SALT, OPT_STDIN } OPTION_CHOICE; -OPTIONS passwd_options[] = { +const OPTIONS passwd_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"in", OPT_IN, '<', "Pead passwords from file"}, {"noverify", OPT_NOVERIFY, '-', diff --git a/apps/pkcs12.c b/apps/pkcs12.c index 93489d6a5670840df83f887bc3f5c37416ce1f9a..24150089fa4b328cd1e8355fb9d7182f56f693c3 100644 --- a/apps/pkcs12.c +++ b/apps/pkcs12.c @@ -56,7 +56,7 @@ typedef enum OPTION_choice { OPT_CAFILE, OPT_NOCAPATH, OPT_NOCAFILE, OPT_ENGINE } OPTION_CHOICE; -OPTIONS pkcs12_options[] = { +const OPTIONS pkcs12_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"nokeys", OPT_NOKEYS, '-', "Don't output private keys"}, {"keyex", OPT_KEYEX, '-', "Set MS key exchange type"}, diff --git a/apps/pkcs7.c b/apps/pkcs7.c index 85994cda26cdde1cce7da3c332464bb80a154c4d..bd4d51e9776ee4c48b4d0fe009f7308adab54515 100644 --- a/apps/pkcs7.c +++ b/apps/pkcs7.c @@ -25,7 +25,7 @@ typedef enum OPTION_choice { OPT_TEXT, OPT_PRINT, OPT_PRINT_CERTS, OPT_ENGINE } OPTION_CHOICE; -OPTIONS pkcs7_options[] = { +const OPTIONS pkcs7_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "Input format - DER or PEM"}, {"in", OPT_IN, '<', "Input file"}, diff --git a/apps/pkcs8.c b/apps/pkcs8.c index 3592a0f1dc21b13ac908a921bd3f7bd0cd742aa1..f31008a2597d379b96b49632ba8e8b77ef39798d 100644 --- a/apps/pkcs8.c +++ b/apps/pkcs8.c @@ -27,7 +27,7 @@ typedef enum OPTION_choice { OPT_TRADITIONAL } OPTION_CHOICE; -OPTIONS pkcs8_options[] = { +const OPTIONS pkcs8_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "Input format (DER or PEM)"}, {"outform", OPT_OUTFORM, 'F', "Output format (DER or PEM)"}, diff --git a/apps/pkey.c b/apps/pkey.c index 50ee05f7849962a8db13eb59d9902571ecafed53..426ef92808f5ce9825d7e72e54a3202965ab1d02 100644 --- a/apps/pkey.c +++ b/apps/pkey.c @@ -21,7 +21,7 @@ typedef enum OPTION_choice { OPT_TEXT, OPT_NOOUT, OPT_MD, OPT_TRADITIONAL } OPTION_CHOICE; -OPTIONS pkey_options[] = { +const OPTIONS pkey_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'f', "Input format (DER or PEM)"}, {"outform", OPT_OUTFORM, 'F', "Output format (DER or PEM)"}, diff --git a/apps/pkeyparam.c b/apps/pkeyparam.c index f6bcb8f84efe4018a2e935e7c0db25a9e50ee021..a387db9e84a64d33d9ade00ad5ac892c4acf3821 100644 --- a/apps/pkeyparam.c +++ b/apps/pkeyparam.c @@ -19,7 +19,7 @@ typedef enum OPTION_choice { OPT_IN, OPT_OUT, OPT_TEXT, OPT_NOOUT, OPT_ENGINE } OPTION_CHOICE; -OPTIONS pkeyparam_options[] = { +const OPTIONS pkeyparam_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"in", OPT_IN, '<', "Input file"}, {"out", OPT_OUT, '>', "Output file"}, diff --git a/apps/pkeyutl.c b/apps/pkeyutl.c index 02e28e2665f28c00411623f33c56c86574cdf55e..b847eb90fd4946dab4b6593e9e6e06c4b348b6bb 100644 --- a/apps/pkeyutl.c +++ b/apps/pkeyutl.c @@ -39,7 +39,7 @@ typedef enum OPTION_choice { OPT_PEERFORM, OPT_KEYFORM, OPT_PKEYOPT, OPT_KDF, OPT_KDFLEN } OPTION_CHOICE; -OPTIONS pkeyutl_options[] = { +const OPTIONS pkeyutl_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"in", OPT_IN, '<', "Input file - default stdin"}, {"out", OPT_OUT, '>', "Output file - default stdout"}, diff --git a/apps/prime.c b/apps/prime.c index b0f5969a2203d6c87310bc146ca33d473720facf..1092cf215e4b6c3031c9e63fb9fa08e89149fd17 100644 --- a/apps/prime.c +++ b/apps/prime.c @@ -17,7 +17,7 @@ typedef enum OPTION_choice { OPT_HEX, OPT_GENERATE, OPT_BITS, OPT_SAFE, OPT_CHECKS } OPTION_CHOICE; -OPTIONS prime_options[] = { +const OPTIONS prime_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [options] [number...]\n"}, {OPT_HELP_STR, 1, '-', " number Number to check for primality\n"}, diff --git a/apps/progs.h b/apps/progs.h index 5f6f07f89d16f0313023927cb2e017c65335113d..b931e73a0b80da7c57a74ab062acb157a1bdbbc7 100644 --- a/apps/progs.h +++ b/apps/progs.h @@ -73,54 +73,54 @@ extern int verify_main(int argc, char *argv[]); extern int version_main(int argc, char *argv[]); extern int x509_main(int argc, char *argv[]); -extern OPTIONS asn1parse_options[]; -extern OPTIONS ca_options[]; -extern OPTIONS ciphers_options[]; -extern OPTIONS cms_options[]; -extern OPTIONS crl_options[]; -extern OPTIONS crl2pkcs7_options[]; -extern OPTIONS dgst_options[]; -extern OPTIONS dhparam_options[]; -extern OPTIONS dsa_options[]; -extern OPTIONS dsaparam_options[]; -extern OPTIONS ec_options[]; -extern OPTIONS ecparam_options[]; -extern OPTIONS enc_options[]; -extern OPTIONS engine_options[]; -extern OPTIONS errstr_options[]; -extern OPTIONS exit_options[]; -extern OPTIONS gendsa_options[]; -extern OPTIONS genpkey_options[]; -extern OPTIONS genrsa_options[]; -extern OPTIONS help_options[]; -extern OPTIONS list_options[]; -extern OPTIONS nseq_options[]; -extern OPTIONS ocsp_options[]; -extern OPTIONS passwd_options[]; -extern OPTIONS pkcs12_options[]; -extern OPTIONS pkcs7_options[]; -extern OPTIONS pkcs8_options[]; -extern OPTIONS pkey_options[]; -extern OPTIONS pkeyparam_options[]; -extern OPTIONS pkeyutl_options[]; -extern OPTIONS prime_options[]; -extern OPTIONS rand_options[]; -extern OPTIONS rehash_options[]; -extern OPTIONS req_options[]; -extern OPTIONS rsa_options[]; -extern OPTIONS rsautl_options[]; -extern OPTIONS s_client_options[]; -extern OPTIONS s_server_options[]; -extern OPTIONS s_time_options[]; -extern OPTIONS sess_id_options[]; -extern OPTIONS smime_options[]; -extern OPTIONS speed_options[]; -extern OPTIONS spkac_options[]; -extern OPTIONS srp_options[]; -extern OPTIONS ts_options[]; -extern OPTIONS verify_options[]; -extern OPTIONS version_options[]; -extern OPTIONS x509_options[]; +extern const OPTIONS asn1parse_options[]; +extern const OPTIONS ca_options[]; +extern const OPTIONS ciphers_options[]; +extern const OPTIONS cms_options[]; +extern const OPTIONS crl_options[]; +extern const OPTIONS crl2pkcs7_options[]; +extern const OPTIONS dgst_options[]; +extern const OPTIONS dhparam_options[]; +extern const OPTIONS dsa_options[]; +extern const OPTIONS dsaparam_options[]; +extern const OPTIONS ec_options[]; +extern const OPTIONS ecparam_options[]; +extern const OPTIONS enc_options[]; +extern const OPTIONS engine_options[]; +extern const OPTIONS errstr_options[]; +extern const OPTIONS exit_options[]; +extern const OPTIONS gendsa_options[]; +extern const OPTIONS genpkey_options[]; +extern const OPTIONS genrsa_options[]; +extern const OPTIONS help_options[]; +extern const OPTIONS list_options[]; +extern const OPTIONS nseq_options[]; +extern const OPTIONS ocsp_options[]; +extern const OPTIONS passwd_options[]; +extern const OPTIONS pkcs12_options[]; +extern const OPTIONS pkcs7_options[]; +extern const OPTIONS pkcs8_options[]; +extern const OPTIONS pkey_options[]; +extern const OPTIONS pkeyparam_options[]; +extern const OPTIONS pkeyutl_options[]; +extern const OPTIONS prime_options[]; +extern const OPTIONS rand_options[]; +extern const OPTIONS rehash_options[]; +extern const OPTIONS req_options[]; +extern const OPTIONS rsa_options[]; +extern const OPTIONS rsautl_options[]; +extern const OPTIONS s_client_options[]; +extern const OPTIONS s_server_options[]; +extern const OPTIONS s_time_options[]; +extern const OPTIONS sess_id_options[]; +extern const OPTIONS smime_options[]; +extern const OPTIONS speed_options[]; +extern const OPTIONS spkac_options[]; +extern const OPTIONS srp_options[]; +extern const OPTIONS ts_options[]; +extern const OPTIONS verify_options[]; +extern const OPTIONS version_options[]; +extern const OPTIONS x509_options[]; #ifdef INCLUDE_FUNCTION_TABLE static FUNCTION functions[] = { @@ -209,31 +209,31 @@ static FUNCTION functions[] = { { FT_general, "version", version_main, version_options }, { FT_general, "x509", x509_main, x509_options }, #ifndef OPENSSL_NO_MD2 - { FT_md, "md2", dgst_main}, + { FT_md, "md2", dgst_main }, #endif #ifndef OPENSSL_NO_MD4 - { FT_md, "md4", dgst_main}, + { FT_md, "md4", dgst_main }, #endif - { FT_md, "md5", dgst_main}, + { FT_md, "md5", dgst_main }, #ifndef OPENSSL_NO_GOST - { FT_md, "gost", dgst_main}, + { FT_md, "gost", dgst_main }, #endif - { FT_md, "sha1", dgst_main}, - { FT_md, "sha224", dgst_main}, - { FT_md, "sha256", dgst_main}, - { FT_md, "sha384", dgst_main}, - { FT_md, "sha512", dgst_main}, + { FT_md, "sha1", dgst_main }, + { FT_md, "sha224", dgst_main }, + { FT_md, "sha256", dgst_main }, + { FT_md, "sha384", dgst_main }, + { FT_md, "sha512", dgst_main }, #ifndef OPENSSL_NO_MDC2 - { FT_md, "mdc2", dgst_main}, + { FT_md, "mdc2", dgst_main }, #endif #ifndef OPENSSL_NO_RMD160 - { FT_md, "rmd160", dgst_main}, + { FT_md, "rmd160", dgst_main }, #endif #ifndef OPENSSL_NO_BLAKE2 - { FT_md, "blake2b512", dgst_main}, + { FT_md, "blake2b512", dgst_main }, #endif #ifndef OPENSSL_NO_BLAKE2 - { FT_md, "blake2s256", dgst_main}, + { FT_md, "blake2s256", dgst_main }, #endif { FT_cipher, "aes-128-cbc", enc_main, enc_options }, { FT_cipher, "aes-128-ecb", enc_main, enc_options }, diff --git a/apps/progs.pl b/apps/progs.pl index 21baf173cff9a4aa12339745320546c830f9c4eb..1f6a2af47cbd10f9ac52b8cdd537bc689657641a 100644 --- a/apps/progs.pl +++ b/apps/progs.pl @@ -63,7 +63,7 @@ foreach (@ARGV) { print "\n"; foreach (@ARGV) { - printf "extern OPTIONS %s_options[];\n", $_; + printf "extern const OPTIONS %s_options[];\n", $_; } print "\n#ifdef INCLUDE_FUNCTION_TABLE\n"; @@ -102,7 +102,7 @@ foreach my $cmd ( "sha1", "sha224", "sha256", "sha384", "sha512", "mdc2", "rmd160", "blake2b512", "blake2s256" ) { - my $str = " { FT_md, \"".$cmd."\", dgst_main},\n"; + my $str = " { FT_md, \"".$cmd."\", dgst_main },\n"; if (grep { $cmd eq $_ } @disablables) { print "#ifndef OPENSSL_NO_".uc($cmd)."\n${str}#endif\n"; } elsif (my $disabler = $md_disabler{$cmd}) { diff --git a/apps/rand.c b/apps/rand.c index d60f1ecf8658f5b47d1cb1570a007cab5d372c1b..e6e9e3ead4b4ee67d5ff9bbd72cd9889c573d18d 100644 --- a/apps/rand.c +++ b/apps/rand.c @@ -22,7 +22,7 @@ typedef enum OPTION_choice { OPT_OUT, OPT_ENGINE, OPT_RAND, OPT_BASE64, OPT_HEX } OPTION_CHOICE; -OPTIONS rand_options[] = { +const OPTIONS rand_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [flags] num\n"}, {OPT_HELP_STR, 1, '-', "Valid options are:\n"}, {"help", OPT_HELP, '-', "Display this summary"}, diff --git a/apps/rehash.c b/apps/rehash.c index 4e10ded7903e50534ae7b7174b8a0faeaba6d47c..281e6cd42815be444c49914fd15b2f7f41305543 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -399,7 +399,7 @@ typedef enum OPTION_choice { OPT_COMPAT, OPT_OLD, OPT_N, OPT_VERBOSE } OPTION_CHOICE; -OPTIONS rehash_options[] = { +const OPTIONS rehash_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [options] [cert-directory...]\n"}, {OPT_HELP_STR, 1, '-', "Valid options are:\n"}, {"help", OPT_HELP, '-', "Display this summary"}, @@ -467,7 +467,7 @@ int rehash_main(int argc, char **argv) } #else -OPTIONS rehash_options[] = { +const OPTIONS rehash_options[] = { {NULL} }; diff --git a/apps/req.c b/apps/req.c index 8ebe1eca6d4589d3f2f2f949105d268472ef1cb8..55ca9354de5079a7727d60ce0c0134d4c8525439 100644 --- a/apps/req.c +++ b/apps/req.c @@ -82,7 +82,7 @@ typedef enum OPTION_choice { OPT_REQEXTS, OPT_MD } OPTION_CHOICE; -OPTIONS req_options[] = { +const OPTIONS req_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "Input format - DER or PEM"}, {"outform", OPT_OUTFORM, 'F', "Output format - DER or PEM"}, diff --git a/apps/rsa.c b/apps/rsa.c index bd2f53a6f4fb871b5050d9293d34bbaba70adedc..807bc702b2f4397ac97e30380d8d0e5af2d81726 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -35,7 +35,7 @@ typedef enum OPTION_choice { OPT_NOOUT, OPT_TEXT, OPT_MODULUS, OPT_CHECK, OPT_CIPHER } OPTION_CHOICE; -OPTIONS rsa_options[] = { +const OPTIONS rsa_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'f', "Input format, one of DER NET PEM"}, {"outform", OPT_OUTFORM, 'f', "Output format, one of DER NET PEM PVK"}, diff --git a/apps/rsautl.c b/apps/rsautl.c index 84f0164cebb61b72e8beed24d6ce8316db6a1e7e..268c86cfd9bcb4b7b84e025f8f667612645478e2 100644 --- a/apps/rsautl.c +++ b/apps/rsautl.c @@ -35,7 +35,7 @@ typedef enum OPTION_choice { OPT_PUBIN, OPT_CERTIN, OPT_INKEY, OPT_PASSIN, OPT_KEYFORM } OPTION_CHOICE; -OPTIONS rsautl_options[] = { +const OPTIONS rsautl_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"in", OPT_IN, '<', "Input file"}, {"out", OPT_OUT, '>', "Output file"}, diff --git a/apps/s_client.c b/apps/s_client.c index 6ec792cee1752f7cec72c000f41fb3cf00ae0556..0442aecf96e243b1e58d865db3ff6a63daae6a7c 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -558,7 +558,7 @@ typedef enum OPTION_choice { OPT_DANE_TLSA_RRDATA, OPT_DANE_EE_NO_NAME } OPTION_CHOICE; -OPTIONS s_client_options[] = { +const OPTIONS s_client_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"host", OPT_HOST, 's', "Use -connect instead"}, {"port", OPT_PORT, 'p', "Use -connect instead"}, diff --git a/apps/s_server.c b/apps/s_server.c index 2051459c3b34e2e17a87d0e2a8e11fcb4905ddda..eaecb7ed8d03ebe46e5a7b7200e102b310c528dd 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -679,7 +679,7 @@ typedef enum OPTION_choice { OPT_X_ENUM } OPTION_CHOICE; -OPTIONS s_server_options[] = { +const OPTIONS s_server_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"port", OPT_PORT, 'p', "TCP/IP port to listen on for connections (default is " PORT ")"}, diff --git a/apps/s_time.c b/apps/s_time.c index 263502c753ea16d272ada6c453eac7ae024b8764..315f69d61380aac1c9aff039b36e4f3f0de74168 100644 --- a/apps/s_time.c +++ b/apps/s_time.c @@ -59,7 +59,7 @@ typedef enum OPTION_choice { OPT_WWW } OPTION_CHOICE; -OPTIONS s_time_options[] = { +const OPTIONS s_time_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"connect", OPT_CONNECT, 's', "Where to connect as post:port (default is " SSL_CONNECT_NAME ")"}, diff --git a/apps/sess_id.c b/apps/sess_id.c index 2b63e69cdcc0f75893cbe920ebb67963180907f5..38624cf47bccbc8a5dba945e19c0a9083ed26fd7 100644 --- a/apps/sess_id.c +++ b/apps/sess_id.c @@ -23,7 +23,7 @@ typedef enum OPTION_choice { OPT_TEXT, OPT_CERT, OPT_NOOUT, OPT_CONTEXT } OPTION_CHOICE; -OPTIONS sess_id_options[] = { +const OPTIONS sess_id_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "Input format - default PEM (DER or PEM)"}, {"outform", OPT_OUTFORM, 'f', diff --git a/apps/smime.c b/apps/smime.c index 0c8660f5378b5845d233f5c7de6c394ac858854d..7696d3b18f0642fbf7df844a1b1b6da8c451281a 100644 --- a/apps/smime.c +++ b/apps/smime.c @@ -45,7 +45,7 @@ typedef enum OPTION_choice { OPT_OUTFORM, OPT_CONTENT } OPTION_CHOICE; -OPTIONS smime_options[] = { +const OPTIONS smime_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [options] cert.pem...\n"}, {OPT_HELP_STR, 1, '-', " cert.pem... recipient certs for encryption\n"}, diff --git a/apps/speed.c b/apps/speed.c index e9dc8a9fa7fd4c189e67685626fecf1fe1439a96..bc46d4590846489d2d3034b23dfcb086cd501138 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -363,7 +363,7 @@ typedef enum OPTION_choice { OPT_MR, OPT_MB, OPT_MISALIGN, OPT_ASYNCJOBS } OPTION_CHOICE; -OPTIONS speed_options[] = { +const OPTIONS speed_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [options] ciphers...\n"}, {OPT_HELP_STR, 1, '-', "Valid options are:\n"}, {"help", OPT_HELP, '-', "Display this summary"}, diff --git a/apps/spkac.c b/apps/spkac.c index c65103d6a09020d1e7550b0a16b7255abb1e208b..70eeafc8ca1b694ff5ff3c7d9c22dfe073e5beca 100644 --- a/apps/spkac.c +++ b/apps/spkac.c @@ -27,7 +27,7 @@ typedef enum OPTION_choice { OPT_SPKSECT } OPTION_CHOICE; -OPTIONS spkac_options[] = { +const OPTIONS spkac_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"in", OPT_IN, '<', "Input file"}, {"out", OPT_OUT, '>', "Output file"}, diff --git a/apps/srp.c b/apps/srp.c index 69175ebc58c633116f77ad2beadc7b3848cdc870..643352e75d251d21c463ad481b9e02538710ba08 100644 --- a/apps/srp.c +++ b/apps/srp.c @@ -186,7 +186,7 @@ typedef enum OPTION_choice { OPT_PASSIN, OPT_PASSOUT, OPT_ENGINE } OPTION_CHOICE; -OPTIONS srp_options[] = { +const OPTIONS srp_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"verbose", OPT_VERBOSE, '-', "Talk a lot while doing things"}, {"config", OPT_CONFIG, '<', "A config file"}, diff --git a/apps/ts.c b/apps/ts.c index e785ea054859b8dfd969b784b3fbb389892056ca..6c0adb1423430e2c11eb2e51496b010055f440ea 100644 --- a/apps/ts.c +++ b/apps/ts.c @@ -86,7 +86,7 @@ typedef enum OPTION_choice { OPT_MD, OPT_V_ENUM } OPTION_CHOICE; -OPTIONS ts_options[] = { +const OPTIONS ts_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"config", OPT_CONFIG, '<', "Configuration file"}, {"section", OPT_SECTION, 's', "Section to use within config file"}, diff --git a/apps/verify.c b/apps/verify.c index 47a8c86cc34cd81227f20ed1e201d62d94ff860b..a8a6209a1b45d3e1872e345155765e7b2d0c3557 100644 --- a/apps/verify.c +++ b/apps/verify.c @@ -31,7 +31,7 @@ typedef enum OPTION_choice { OPT_VERBOSE } OPTION_CHOICE; -OPTIONS verify_options[] = { +const OPTIONS verify_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [options] cert.pem...\n"}, {OPT_HELP_STR, 1, '-', "Valid options are:\n"}, {"help", OPT_HELP, '-', "Display this summary"}, diff --git a/apps/version.c b/apps/version.c index e3c8299fcf9ae562de537589c317de7a283293e4..28523b7bee3c810bf61ffc81f0b8ec79e7553586 100644 --- a/apps/version.c +++ b/apps/version.c @@ -35,7 +35,7 @@ typedef enum OPTION_choice { OPT_B, OPT_D, OPT_E, OPT_F, OPT_O, OPT_P, OPT_V, OPT_A } OPTION_CHOICE; -OPTIONS version_options[] = { +const OPTIONS version_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"a", OPT_A, '-', "Show all data"}, {"b", OPT_B, '-', "Show build date"}, diff --git a/apps/x509.c b/apps/x509.c index 3539602e1e08bcc762caf34f70cdb02e90f7cc32..78f2c027a346228fe3da8c00a42a0aa932ef6aa5 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -59,7 +59,7 @@ typedef enum OPTION_choice { OPT_BADSIG, OPT_MD, OPT_ENGINE, OPT_NOCERT } OPTION_CHOICE; -OPTIONS x509_options[] = { +const OPTIONS x509_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'f', "Input format - default PEM (one of DER, NET or PEM)"},