Commit a5e55f62 authored by Richard Levitte's avatar Richard Levitte
Browse files

RT4669: dgst can only sign/verify one file

Check arg count and print an error message.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 6180c0ff
Loading
Loading
Loading
Loading
+5 −0
Changes for apps/dgst.c: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -243,6 +243,11 @@ int MAIN(int argc, char **argv)
        argv++;
    }

    if (keyfile != NULL && argc > 1) {
        BIO_printf(bio_err, "Can only sign or verify one file\n");
        goto end;
    }

    if (do_verify && !sigfile) {
        BIO_printf(bio_err,
                   "No signature to verify: use the -signature option\n");