diff options
author | Rich Salz <rsalz@akamai.com> | 2015-05-06 19:43:59 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-11 16:06:38 +0200 |
commit | 75ebbd9aa411c5b8b19ded6ace2b34181566b56a (patch) | |
tree | 6bc9cd77b2794b25f9cd9aac1c66f4626fb975a5 /crypto/pkcs12/p12_kiss.c | |
parent | Add missing NULL check in X509V3_parse_list() (diff) | |
download | openssl-75ebbd9aa411c5b8b19ded6ace2b34181566b56a.tar.xz openssl-75ebbd9aa411c5b8b19ded6ace2b34181566b56a.zip |
Use p==NULL not !p (in if statements, mainly)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/pkcs12/p12_kiss.c')
-rw-r--r-- | crypto/pkcs12/p12_kiss.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/pkcs12/p12_kiss.c b/crypto/pkcs12/p12_kiss.c index cd1842789f..a2dbc42eab 100644 --- a/crypto/pkcs12/p12_kiss.c +++ b/crypto/pkcs12/p12_kiss.c @@ -179,7 +179,7 @@ static int parse_pk12(PKCS12 *p12, const char *pass, int passlen, int i, bagnid; PKCS7 *p7; - if (!(asafes = PKCS12_unpack_authsafes(p12))) + if ((asafes = PKCS12_unpack_authsafes(p12)) == NULL) return 0; for (i = 0; i < sk_PKCS7_num(asafes); i++) { p7 = sk_PKCS7_value(asafes, i); @@ -236,14 +236,14 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, case NID_keyBag: if (!pkey || *pkey) return 1; - if (!(*pkey = EVP_PKCS82PKEY(bag->value.keybag))) + if ((*pkey = EVP_PKCS82PKEY(bag->value.keybag)) == NULL) return 0; break; case NID_pkcs8ShroudedKeyBag: if (!pkey || *pkey) return 1; - if (!(p8 = PKCS12_decrypt_skey(bag, pass, passlen))) + if ((p8 = PKCS12_decrypt_skey(bag, pass, passlen)) == NULL) return 0; *pkey = EVP_PKCS82PKEY(p8); PKCS8_PRIV_KEY_INFO_free(p8); @@ -254,7 +254,7 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, case NID_certBag: if (M_PKCS12_cert_bag_type(bag) != NID_x509Certificate) return 1; - if (!(x509 = PKCS12_certbag2x509(bag))) + if ((x509 = PKCS12_certbag2x509(bag)) == NULL) return 0; if (lkid && !X509_keyid_set1(x509, lkid->data, lkid->length)) { X509_free(x509); |