diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2016-03-13 14:07:50 +0100 |
---|---|---|
committer | FdaSilvaYY <fdasilvayy@gmail.com> | 2016-10-14 18:25:50 +0200 |
commit | 44c83ebd7089825a82545c9cacc4c4e2de81d001 (patch) | |
tree | eae27fae044aedfa92aa31b114836f3b197de850 /apps | |
parent | Fix C++ support: set $target{cxx} correctly (diff) | |
download | openssl-44c83ebd7089825a82545c9cacc4c4e2de81d001.tar.xz openssl-44c83ebd7089825a82545c9cacc4c4e2de81d001.zip |
Constify command options
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1694)
Diffstat (limited to 'apps')
48 files changed, 112 insertions, 112 deletions
diff --git a/apps/asn1pars.c b/apps/asn1pars.c index 0bc48e3f5e..c4b2038bdd 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"}, @@ -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 c0f43ea2e8..7b99757d7b 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 21f096192a..306e159f7e 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 06b6e5b92c..3847faa427 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 9c5f79f9f3..cb2461e2e0 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 b10b93e588..2fb5a758d0 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 ab2e787f76..302be2dd57 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 6aef5026e3..f608d7d276 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 404266009e..027597b666 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"}, @@ -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 4e6cf22908..d1dcf1d75e 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 10ab15af27..33edd6c2d1 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 ffd3137426..da1d91898b 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 5fda799d14..6bbbe2f6ae 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 4c05493bfa..272cbb17a5 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 7abb3e6ff1..93e15d80f1 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 4d104d2882..bdcb20c7ac 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 018d5ebdb6..a97fe1828f 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 41ea970307..8f6084214d 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 fceb458542..f6a8f9df55 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 e4fb6d3f12..681af49b8e 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 93489d6a56..24150089fa 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 85994cda26..bd4d51e977 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 3592a0f1dc..f31008a259 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 50ee05f784..426ef92808 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 f6bcb8f84e..a387db9e84 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 02e28e2665..b847eb90fd 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 b0f5969a22..1092cf215e 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 5f6f07f89d..b931e73a0b 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 21baf173cf..1f6a2af47c 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 d60f1ecf86..e6e9e3ead4 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 4e10ded790..281e6cd428 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 8ebe1eca6d..55ca9354de 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 bd2f53a6f4..807bc702b2 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 84f0164ceb..268c86cfd9 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 6ec792cee1..0442aecf96 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 2051459c3b..eaecb7ed8d 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 263502c753..315f69d613 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 2b63e69cdc..38624cf47b 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 0c8660f537..7696d3b18f 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 e9dc8a9fa7..bc46d45908 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 c65103d6a0..70eeafc8ca 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 69175ebc58..643352e75d 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"}, @@ -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 47a8c86cc3..a8a6209a1b 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 e3c8299fcf..28523b7bee 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 3539602e1e..78f2c027a3 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)"}, |