diff options
118 files changed, 754 insertions, 724 deletions
diff --git a/apps/apps.c b/apps/apps.c index 1c182bafb6..ab6eb40579 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -502,11 +502,12 @@ int add_oid_section(CONF *conf) STACK_OF(CONF_VALUE) *sktmp; CONF_VALUE *cnf; int i; - if (!(p = NCONF_get_string(conf, NULL, "oid_section"))) { + + if ((p = NCONF_get_string(conf, NULL, "oid_section")) == NULL) { ERR_clear_error(); return 1; } - if (!(sktmp = NCONF_get_section(conf, p))) { + if ((sktmp = NCONF_get_section(conf, p)) == NULL) { BIO_printf(bio_err, "problem loading oid section %s\n", p); return 0; } @@ -1703,7 +1703,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, * Its best to dup the subject DN and then delete any email addresses * because this retains its structure. */ - if (!(dn_subject = X509_NAME_dup(subject))) { + if ((dn_subject = X509_NAME_dup(subject)) == NULL) { BIO_printf(bio_err, "Memory allocation failure\n"); goto end; } diff --git a/apps/cms.c b/apps/cms.c index 5eb5d2df6f..5293fbdc6d 100644 --- a/apps/cms.c +++ b/apps/cms.c @@ -717,8 +717,8 @@ int cms_main(int argc, char **argv) if ((encerts = sk_X509_new_null()) == NULL) goto end; while (*argv) { - if (!(cert = load_cert(*argv, FORMAT_PEM, - NULL, e, "recipient certificate file"))) + if ((cert = load_cert(*argv, FORMAT_PEM, NULL, e, + "recipient certificate file")) == NULL) goto end; sk_X509_push(encerts, cert); cert = NULL; @@ -727,24 +727,24 @@ int cms_main(int argc, char **argv) } if (certfile) { - if (!(other = load_certs(certfile, FORMAT_PEM, NULL, - e, "certificate file"))) { + if ((other = load_certs(certfile, FORMAT_PEM, NULL, e, + "certificate file")) == NULL) { ERR_print_errors(bio_err); goto end; } } if (recipfile && (operation == SMIME_DECRYPT)) { - if (!(recip = load_cert(recipfile, FORMAT_PEM, NULL, - e, "recipient certificate file"))) { + if ((recip = load_cert(recipfile, FORMAT_PEM, NULL, e, + "recipient certificate file")) == NULL) { ERR_print_errors(bio_err); goto end; } } if (operation == SMIME_SIGN_RECEIPT) { - if (!(signer = load_cert(signerfile, FORMAT_PEM, NULL, - e, "receipt signer certificate file"))) { + if ((signer = load_cert(signerfile, FORMAT_PEM, NULL, e, + "receipt signer certificate file")) == NULL) { ERR_print_errors(bio_err); goto end; } @@ -787,7 +787,7 @@ int cms_main(int argc, char **argv) } if (contfile) { BIO_free(indata); - if (!(indata = BIO_new_file(contfile, "rb"))) { + if ((indata = BIO_new_file(contfile, "rb")) == NULL) { BIO_printf(bio_err, "Can't read content file %s\n", contfile); goto end; } @@ -807,7 +807,7 @@ int cms_main(int argc, char **argv) if (rctfile) { char *rctmode = (rctformat == FORMAT_ASN1) ? "rb" : "r"; - if (!(rctin = BIO_new_file(rctfile, rctmode))) { + if ((rctin = BIO_new_file(rctfile, rctmode)) == NULL) { BIO_printf(bio_err, "Can't open receipt file %s\n", rctfile); goto end; } @@ -834,7 +834,7 @@ int cms_main(int argc, char **argv) goto end; if ((operation == SMIME_VERIFY) || (operation == SMIME_VERIFY_RECEIPT)) { - if (!(store = setup_verify(CAfile, CApath))) + if ((store = setup_verify(CAfile, CApath)) == NULL) goto end; X509_STORE_set_verify_cb(store, cms_cb); if (vpmtouched) diff --git a/apps/crl.c b/apps/crl.c index b8c592c6e2..443889a753 100644 --- a/apps/crl.c +++ b/apps/crl.c @@ -222,7 +222,7 @@ int crl_main(int argc, char **argv) goto end; if (do_ver) { - if (!(store = setup_verify(CAfile, CApath))) + if ((store = setup_verify(CAfile, CApath)) == NULL) goto end; lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file()); if (lookup == NULL) diff --git a/apps/crl2p7.c b/apps/crl2p7.c index fb2b085ead..f05ad4ae52 100644 --- a/apps/crl2p7.c +++ b/apps/crl2p7.c @@ -135,7 +135,8 @@ int crl2pkcs7_main(int argc, char **argv) nocrl = 1; break; case OPT_CERTFILE: - if (!certflst && !(certflst = sk_OPENSSL_STRING_new_null())) + if ((certflst == NULL) + && (certflst = sk_OPENSSL_STRING_ |