/* Check for NULL PKCS12 structure */
- if (!p12) {
+ if (p12 == NULL) {
PKCS12err(PKCS12_F_PKCS12_PARSE,
PKCS12_R_INVALID_NULL_PKCS12_POINTER);
return 0;
* password are two different things...
*/
- if (!pass || !*pass) {
+ if (pass == NULL || *pass == '\0') {
if (PKCS12_verify_mac(p12, NULL, 0))
pass = NULL;
else if (PKCS12_verify_mac(p12, "", 0))
}
while ((x = sk_X509_pop(ocerts))) {
- if (pkey && *pkey && cert && !*cert) {
+ if (pkey != NULL && *pkey != NULL
+ && cert != NULL && *cert == NULL) {
ERR_set_mark();
if (X509_check_private_key(x, *pkey)) {
*cert = x;
}
if (ca && x) {
- if (!*ca)
+ if (*ca == NULL)
*ca = sk_X509_new_null();
- if (!*ca)
+ if (*ca == NULL)
goto err;
if (!sk_X509_push(*ca, x))
goto err;
switch (PKCS12_SAFEBAG_get_nid(bag)) {
case NID_keyBag:
- if (!pkey || *pkey)
+ if (pkey == NULL || *pkey != NULL)
return 1;
*pkey = EVP_PKCS82PKEY(PKCS12_SAFEBAG_get0_p8inf(bag));
if (*pkey == NULL)
break;
case NID_pkcs8ShroudedKeyBag:
- if (!pkey || *pkey)
+ if (pkey == NULL || *pkey != NULL)
return 1;
if ((p8 = PKCS12_decrypt_skey(bag, pass, passlen)) == NULL)
return 0;