Skip to content

Commit

Permalink
openssl cms: add error message if operation option is missing
Browse files Browse the repository at this point in the history
If the `openssl cms` command is called without specifying an
operation option, it replies with the following laconic error message:

    cms: Use -help for summary.

This commit adds a helpful error message:

    No operation option (-encrypt|-decrypt|-sign|-verify|...) specified.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#8861)
  • Loading branch information
mspncp committed May 2, 2019
1 parent 31fc48d commit 42151b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/cms.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ int cms_main(int argc, char **argv)
goto opthelp;
}
} else if (!operation) {
BIO_printf(bio_err, "No operation option (-encrypt|-decrypt|-sign|-verify|...) specified.\n");
goto opthelp;
}

Expand Down

0 comments on commit 42151b8

Please sign in to comment.