if (url) { crl->url = PORT_ArenaStrdup(crl->arena,url); }
crl_storeCRL (PK11SlotInfo *slot,char *url,                  CERTSignedCrl *newCrl, SECItem *derCrl, int type){    CERTSignedCrl *oldCrl = NULL, *crl = NULL;    CK_OBJECT_HANDLE crlHandle;    oldCrl = SEC_FindCrlByKeyOnSlot(slot, &newCrl->crl.derName, type);    /* if there is an old crl, make sure the one we are installing     * is newer. If not, exit out, otherwise delete the old crl.     */    if (oldCrl != NULL) {	/* if it's already there, quietly continue */	if (SECITEM_CompareItem(newCrl->derCrl, oldCrl->derCrl) 						== SECEqual) {	    crl = newCrl;	    crl->slot = PK11_ReferenceSlot(slot);	    crl->pkcs11ID = oldCrl->pkcs11ID;	    goto done;	}        if (!SEC_CrlIsNewer(&newCrl->crl,&oldCrl->crl)) {            if (type == SEC_CRL_TYPE) {                PORT_SetError(SEC_ERROR_OLD_CRL);            } else {                PORT_SetError(SEC_ERROR_OLD_KRL);            }            goto done;        }        if ((SECITEM_CompareItem(&newCrl->crl.derName,                &oldCrl->crl.derName) != SECEqual) &&            (type == SEC_KRL_TYPE) ) {            PORT_SetError(SEC_ERROR_CKL_CONFLICT);            goto done;        }        /* if we have a url in the database, use that one */        if (oldCrl->url) {	    url = oldCrl->url;        }        /* really destroy this crl */        /* first drum it out of the permanment Data base */        SEC_DeletePermCRL(oldCrl);    }    /* Write the new entry into the data base */    crlHandle = PK11_PutCrl(slot, derCrl, &newCrl->crl.derName, url, type);    if (crlHandle != CK_INVALID_HANDLE) {	crl = newCrl;	crl->slot = PK11_ReferenceSlot(slot);	crl->pkcs11ID = crlHandle;    }done:    if (oldCrl) SEC_DestroyCrl(oldCrl);    return crl;}