nocrl = 1;
break;
case OPT_CERTFILE:
- if (!certflst && !(certflst = sk_OPENSSL_STRING_new_null()))
+ if ((certflst == NULL)
+ && (certflst = sk_OPENSSL_STRING_new_null()) == NULL)
goto end;
if (!sk_OPENSSL_STRING_push(certflst, *(++argv))) {
sk_OPENSSL_STRING_free(certflst);
argc = opt_num_rest();
argv = opt_rest();
+ if (!app_load_modules(NULL))
+ goto end;
+
if (!nocrl) {
- in = bio_open_default(infile, RB(informat));
+ in = bio_open_default(infile, 'r', informat);
if (in == NULL)
goto end;
sk_OPENSSL_STRING_free(certflst);
- out = bio_open_default(outfile, WB(outformat));
+ out = bio_open_default(outfile, 'w', outformat);
if (out == NULL)
goto end;
BIO_free(in);
BIO_free_all(out);
PKCS7_free(p7);
- if (crl != NULL)
- X509_CRL_free(crl);
+ X509_CRL_free(crl);
return (ret);
}
end:
/* never need to OPENSSL_free x */
BIO_free(in);
- if (sk != NULL)
- sk_X509_INFO_free(sk);
+ sk_X509_INFO_free(sk);
return (ret);
}