Skip to content

Commit

Permalink
Constify command options
Browse files Browse the repository at this point in the history
Reviewed-by: Kurt Roeckx <[email protected]>
Reviewed-by: Richard Levitte <[email protected]>
Reviewed-by: Rich Salz <[email protected]>
(Merged from openssl#1694)
  • Loading branch information
FdaSilvaYY committed Oct 14, 2016
1 parent 83bd048 commit 44c83eb
Show file tree
Hide file tree
Showing 48 changed files with 112 additions and 112 deletions.
2 changes: 1 addition & 1 deletion apps/asn1pars.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/ca.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/ciphers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/cms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/crl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/crl2p7.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/dgst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/dhparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/dsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/dsaparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/ecparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/errstr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/gendsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/genpkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)"},
Expand Down
2 changes: 1 addition & 1 deletion apps/genrsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/nseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/ocsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions apps/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ int main(int argc, char *argv[])
EXIT(ret);
}

OPTIONS exit_options[] = {
const OPTIONS exit_options[] = {
{NULL}
};

Expand Down Expand Up @@ -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, '-',
Expand Down Expand Up @@ -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}
};
Expand Down
2 changes: 1 addition & 1 deletion apps/passwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, '-',
Expand Down
2 changes: 1 addition & 1 deletion apps/pkcs12.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/pkcs7.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/pkcs8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)"},
Expand Down
2 changes: 1 addition & 1 deletion apps/pkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)"},
Expand Down
2 changes: 1 addition & 1 deletion apps/pkeyparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/pkeyutl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/prime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Loading

0 comments on commit 44c83eb

Please sign in to comment.