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)
}
ret = 0;
end:
- if (p7 != NULL)
- PKCS7_free(p7);
- if (in != NULL)
- BIO_free(in);
- if (out != NULL)
- BIO_free_all(out);
+ PKCS7_free(p7);
+ BIO_free(in);
+ BIO_free_all(out);
apps_shutdown();
OPENSSL_EXIT(ret);
}