if (signerinfo->certList != NULL) { CERT_DestroyCertList(signerinfo->certList); signerinfo->certList = NULL; }
NSS_CMSSignerInfo_IncludeCerts(NSSCMSSignerInfo *signerinfo, NSSCMSCertChainMode cm, SECCertUsage usage){    if (signerinfo->cert == NULL)	return SECFailure;    switch (cm) {    case NSSCMSCM_None:	signerinfo->certList = NULL;	break;    case NSSCMSCM_CertOnly:	signerinfo->certList = CERT_CertListFromCert(signerinfo->cert);	break;    case NSSCMSCM_CertChain:	signerinfo->certList = CERT_CertChainFromCert(signerinfo->cert, usage, PR_FALSE);	break;    case NSSCMSCM_CertChainWithRoot:	signerinfo->certList = CERT_CertChainFromCert(signerinfo->cert, usage, PR_TRUE);	break;    }    if (cm != NSSCMSCM_None && signerinfo->certList == NULL)	return SECFailure;        return SECSuccess;}