summaryrefslogtreecommitdiffstats
path: root/crypto/x509/v3_cpols.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-09-16 21:28:57 +0200
committerRichard Levitte <levitte@openssl.org>2019-10-09 21:32:15 +0200
commit12a765a5235f181c2f4992b615eb5f892c368e88 (patch)
tree67ece1a3fb210bd4895aea73649773fc912a60d6 /crypto/x509/v3_cpols.c
parentRefactor -passin/-passout documentation (diff)
downloadopenssl-12a765a5235f181c2f4992b615eb5f892c368e88.tar.xz
openssl-12a765a5235f181c2f4992b615eb5f892c368e88.zip
Explicitly test against NULL; do not use !p or similar
Also added blanks lines after declarations in a couple of places. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9916)
Diffstat (limited to 'crypto/x509/v3_cpols.c')
-rw-r--r--crypto/x509/v3_cpols.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/x509/v3_cpols.c b/crypto/x509/v3_cpols.c
index f9a239b6f2..e70ab61d50 100644
--- a/crypto/x509/v3_cpols.c
+++ b/crypto/x509/v3_cpols.c
@@ -124,8 +124,9 @@ static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method,
continue;
} else if (*pstr == '@') {
STACK_OF(CONF_VALUE) *polsect;
+
polsect = X509V3_get_section(ctx, pstr + 1);
- if (!polsect) {
+ if (polsect == NULL) {
X509V3err(X509V3_F_R2I_CERTPOL, X509V3_R_INVALID_SECTION);
X509V3_conf_err(cnf);
@@ -221,7 +222,7 @@ static POLICYINFO *policy_section(X509V3_CTX *ctx,
X509V3_section_free(ctx, unot);
if (!qual)
goto err;
- if (!pol->qualifiers)
+ if (pol->qualifiers == NULL)
pol->qualifiers = sk_POLICYQUALINFO_new_null();
if (!sk_POLICYQUALINFO_push(pol->qualifiers, qual))
goto merr;
@@ -232,7 +233,7 @@ static POLICYINFO *policy_section(X509V3_CTX *ctx,
goto err;
}
}
- if (!pol->policyid) {
+ if (pol->policyid == NULL) {
X509V3err(X509V3_F_POLICY_SECTION, X509V3_R_NO_POLICY_IDENTIFIER);
goto err;
}