} else {
} else if ((cert->tokenCAs == SECPKCS12TargetTokenNoCAs) || ((cert->tokenCAs == SECPKCS12TargetTokenIntermediateCAs) && !isIntermediateCA)) {
sec_pkcs12_add_cert(sec_PKCS12SafeBag *cert, PRBool keyExists, void *wincx){    SECItem *derCert, *nickName;    char *nickData = NULL;    SECStatus rv;    if(!cert) {	return SECFailure;    }    if(cert->problem || cert->noInstall || cert->installed) {	return SECSuccess;    }    derCert = &cert->safeBagContent.certBag->value.x509Cert;    PORT_Assert(!cert->problem && !cert->noInstall);    nickName = sec_pkcs12_get_nickname(cert);    if(nickName) {	nickData = (char *)nickName->data;    }    if(keyExists) {	CERTCertificate *newCert;	newCert = CERT_NewTempCertificate(CERT_GetDefaultCertDB(),	                                  derCert, NULL, PR_FALSE, PR_FALSE);	if(!newCert) {	     if(nickName) SECITEM_ZfreeItem(nickName, PR_TRUE);	     cert->error = PORT_GetError();	     cert->problem = PR_TRUE;	     return SECFailure;	}	rv = PK11_ImportCertForKeyToSlot(cert->slot, newCert, nickData, 					 PR_TRUE, wincx);	CERT_DestroyCertificate(newCert);    } else {	SECItem *certList[2];	certList[0] = derCert;	certList[1] = NULL;	rv = CERT_ImportCerts(CERT_GetDefaultCertDB(), certUsageUserCertImport,			      1, certList, NULL, PR_TRUE, PR_FALSE, nickData);    }    cert->installed = PR_TRUE;    if(nickName) SECITEM_ZfreeItem(nickName, PR_TRUE);    return rv;}