X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fpkcs7.c;h=643507f216a046d214e372e54653af6862aa7111;hp=4d80f8249e10105a8e8da0289eefbdaeca4613e3;hb=c1559f5046092b542f8033bb8eec8bd88ce0d8f2;hpb=d8d2e503593ac429fa04b96c7722dcf1c33bdeb3 diff --git a/apps/pkcs7.c b/apps/pkcs7.c index 4d80f8249e..643507f216 100644 --- a/apps/pkcs7.c +++ b/apps/pkcs7.c @@ -189,11 +189,11 @@ int MAIN(int argc, char **argv) if (infile == NULL) BIO_set_fp(in, stdin, BIO_NOCLOSE); else { - if (BIO_read_filename(in, infile) <= 0) - if (in == NULL) { - perror(infile); - goto end; - } + if (BIO_read_filename(in, infile) <= 0) { + BIO_printf(bio_err, "unable to load input file\n"); + ERR_print_errors(bio_err); + goto end; + } } if (informat == FORMAT_ASN1)