}
NSSTrustDomain_FindCertificateByIssuerAndSerialNumber(  NSSTrustDomain *td,  NSSDER *issuer,  NSSDER *serialNumber){    NSSCertificate *rvCert = NULL;    NSSToken *tok;    /* Try the cache */    rvCert = nssTrustDomain_GetCertForIssuerAndSNFromCache(td,                                                           issuer,                                                            serialNumber);    if (rvCert) {	return rvCert;    }    /* Not cached, look for it on tokens */    for (tok  = (NSSToken *)nssListIterator_Start(td->tokens);         tok != (NSSToken *)NULL;         tok  = (NSSToken *)nssListIterator_Next(td->tokens))    {	rvCert = nssToken_FindCertificateByIssuerAndSerialNumber(tok,	                                                         NULL,	                                                         issuer,	                                                         serialNumber,	                                        nssTokenSearchType_TokenOnly);#ifdef NSS_3_4_CODE	if (!rvCert) {	    /* Some tokens expect a decoded serial number.  For compatibility,	     * try the search again.	     */	    NSSDER decodedSerial;	    SECItem ds = { 0 };	    SECItem sn;	    SECStatus secrv;	    sn.data = serialNumber->data;	    sn.len = serialNumber->size;	    secrv = SEC_ASN1DecodeItem(NULL, &ds, SEC_IntegerTemplate, &sn);	    if (secrv == SECSuccess) {		decodedSerial.data = ds.data;		decodedSerial.size = ds.len;		rvCert = nssToken_FindCertificateByIssuerAndSerialNumber(tok,	                                        NULL,	                                        issuer,	                                        &decodedSerial,	                                        nssTokenSearchType_TokenOnly);		PORT_Free(ds.data);	    }	}#endif	if (rvCert) {	    /* cache it */	    nssTrustDomain_AddCertsToCache(td, &rvCert, 1);	    break;	}    }    nssListIterator_Finish(td->tokens);    return rvCert;}