Loading apps/enc.c +4 −0 Original line number Diff line number Diff line Loading @@ -263,6 +263,10 @@ int enc_main(int argc, char **argv) break; } } if (opt_num_rest() != 0) { BIO_printf(bio_err, "Extra arguments given.\n"); goto opthelp; } if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) { BIO_printf(bio_err, "%s: AEAD ciphers not supported\n", prog); Loading apps/genrsa.c +9 −3 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ int genrsa_main(int argc, char **argv) switch (o) { case OPT_EOF: case OPT_ERR: opthelp: BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); goto end; case OPT_HELP: Loading Loading @@ -111,11 +112,16 @@ int genrsa_main(int argc, char **argv) } argc = opt_num_rest(); argv = opt_rest(); private = 1; if (argv[0] && (!opt_int(argv[0], &num) || num <= 0)) if (argc == 1) { if (!opt_int(argv[0], &num) || num <= 0) goto end; } else if (argc > 0) { BIO_printf(bio_err, "Extra arguments given.\n"); goto opthelp; } private = 1; if (!app_passwd(NULL, passoutarg, NULL, &passout)) { BIO_printf(bio_err, "Error getting password\n"); goto end; Loading apps/openssl.c +7 −4 Original line number Diff line number Diff line Loading @@ -388,6 +388,7 @@ int list_main(int argc, char **argv) switch (o) { case OPT_EOF: /* Never hit, but suppresses warning */ case OPT_ERR: opthelp: BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); return 1; case OPT_HELP: Loading Loading @@ -429,12 +430,14 @@ int list_main(int argc, char **argv) } done = 1; } if (!done) { BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); return 1; if (opt_num_rest() != 0) { BIO_printf(bio_err, "Extra arguments given.\n"); goto opthelp; } if (!done) goto opthelp; return 0; } Loading apps/prime.c +8 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ int prime_main(int argc, char **argv) switch (o) { case OPT_EOF: case OPT_ERR: opthelp: BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); goto end; case OPT_HELP: Loading @@ -69,9 +70,14 @@ int prime_main(int argc, char **argv) argc = opt_num_rest(); argv = opt_rest(); if (argc == 0 && !generate) { if (generate) { if (argc != 0) { BIO_printf(bio_err, "Extra arguments given.\n"); goto opthelp; } } else if (argc == 0) { BIO_printf(bio_err, "%s: No prime specified\n", prog); goto end; goto opthelp; } if (generate) { Loading apps/rand.c +6 −2 Original line number Diff line number Diff line Loading @@ -77,9 +77,13 @@ int rand_main(int argc, char **argv) } argc = opt_num_rest(); argv = opt_rest(); if (argc != 1 || !opt_int(argv[0], &num) || num < 0) if (argc == 1) { if (!opt_int(argv[0], &num) || num <= 0) goto end; } else if (argc > 0) { BIO_printf(bio_err, "Extra arguments given.\n"); goto opthelp; } out = bio_open_default(outfile, 'w', format); if (out == NULL) Loading Loading
apps/enc.c +4 −0 Original line number Diff line number Diff line Loading @@ -263,6 +263,10 @@ int enc_main(int argc, char **argv) break; } } if (opt_num_rest() != 0) { BIO_printf(bio_err, "Extra arguments given.\n"); goto opthelp; } if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) { BIO_printf(bio_err, "%s: AEAD ciphers not supported\n", prog); Loading
apps/genrsa.c +9 −3 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ int genrsa_main(int argc, char **argv) switch (o) { case OPT_EOF: case OPT_ERR: opthelp: BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); goto end; case OPT_HELP: Loading Loading @@ -111,11 +112,16 @@ int genrsa_main(int argc, char **argv) } argc = opt_num_rest(); argv = opt_rest(); private = 1; if (argv[0] && (!opt_int(argv[0], &num) || num <= 0)) if (argc == 1) { if (!opt_int(argv[0], &num) || num <= 0) goto end; } else if (argc > 0) { BIO_printf(bio_err, "Extra arguments given.\n"); goto opthelp; } private = 1; if (!app_passwd(NULL, passoutarg, NULL, &passout)) { BIO_printf(bio_err, "Error getting password\n"); goto end; Loading
apps/openssl.c +7 −4 Original line number Diff line number Diff line Loading @@ -388,6 +388,7 @@ int list_main(int argc, char **argv) switch (o) { case OPT_EOF: /* Never hit, but suppresses warning */ case OPT_ERR: opthelp: BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); return 1; case OPT_HELP: Loading Loading @@ -429,12 +430,14 @@ int list_main(int argc, char **argv) } done = 1; } if (!done) { BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); return 1; if (opt_num_rest() != 0) { BIO_printf(bio_err, "Extra arguments given.\n"); goto opthelp; } if (!done) goto opthelp; return 0; } Loading
apps/prime.c +8 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ int prime_main(int argc, char **argv) switch (o) { case OPT_EOF: case OPT_ERR: opthelp: BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); goto end; case OPT_HELP: Loading @@ -69,9 +70,14 @@ int prime_main(int argc, char **argv) argc = opt_num_rest(); argv = opt_rest(); if (argc == 0 && !generate) { if (generate) { if (argc != 0) { BIO_printf(bio_err, "Extra arguments given.\n"); goto opthelp; } } else if (argc == 0) { BIO_printf(bio_err, "%s: No prime specified\n", prog); goto end; goto opthelp; } if (generate) { Loading
apps/rand.c +6 −2 Original line number Diff line number Diff line Loading @@ -77,9 +77,13 @@ int rand_main(int argc, char **argv) } argc = opt_num_rest(); argv = opt_rest(); if (argc != 1 || !opt_int(argv[0], &num) || num < 0) if (argc == 1) { if (!opt_int(argv[0], &num) || num <= 0) goto end; } else if (argc > 0) { BIO_printf(bio_err, "Extra arguments given.\n"); goto opthelp; } out = bio_open_default(outfile, 'w', format); if (out == NULL) Loading