summaryrefslogtreecommitdiff
path: root/apps/enc.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2017-08-20 17:10:48 -0400
committerRich Salz <rsalz@openssl.org>2017-08-21 10:58:49 -0400
commitc27363f566274a65067d7559f9669f300f957183 (patch)
tree8f6f6166011fdf04e168c4582212554874a20e98 /apps/enc.c
parentb73b4d73de328de73c5a74ccc53291cd86a141e9 (diff)
downloadopenssl-new-c27363f566274a65067d7559f9669f300f957183.tar.gz
Check # of arguments for remaining commands.
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/4201)
Diffstat (limited to 'apps/enc.c')
-rw-r--r--apps/enc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/enc.c b/apps/enc.c
index db5d3a2991..9c85ee58b6 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -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);