Lines 4214-4241
Link Here
|
4214 |
for (ep = ellist.find("Cert"); ep != ellist.end(); ep++) { |
4214 |
for (ep = ellist.find("Cert"); ep != ellist.end(); ep++) { |
4215 |
if (ep->first != "Cert") |
4215 |
if (ep->first != "Cert") |
4216 |
break; |
4216 |
break; |
4217 |
pair<string, bool> rval = ep->second.getAttribute("serial"); |
4217 |
pair<string, bool> rval = ep->second.get()->getAttribute("serial"); |
4218 |
if (rval.second && strtol(rval.first.c_str(), NULL, 10) == serial) { |
4218 |
if (rval.second && strtol(rval.first.c_str(), NULL, 10) == serial) { |
4219 |
exists = true; |
4219 |
exists = true; |
4220 |
break; |
4220 |
break; |
4221 |
} |
4221 |
} |
4222 |
} |
4222 |
} |
4223 |
|
4223 |
|
4224 |
XMLElement cs("Cert"); |
4224 |
shared_ptr<XMLElement> cs_p = make_shared<XMLElement>("Cert"); |
4225 |
cs.setPretext("\n "); |
4225 |
cs_p->setPretext("\n "); |
4226 |
XMLElement se; |
4226 |
shared_ptr<XMLElement> se_p(new XMLElement); |
4227 |
se.setPretext(cs.getPretext() + " "); |
4227 |
se_p->setPretext(cs_p->getPretext() + " "); |
4228 |
se.setElementName("status"); |
4228 |
se_p->setElementName("status"); |
4229 |
se.setText(status); |
4229 |
se_p->setText(status); |
4230 |
cs.addElement(se); |
4230 |
cs_p->addElement(se_p); |
4231 |
|
4231 |
|
4232 |
cs.setAttribute("serial", sstr); |
4232 |
cs_p->setAttribute("serial", sstr); |
4233 |
cs.setText("\n "); |
4233 |
cs_p->setText("\n "); |
4234 |
|
4234 |
|
4235 |
if (exists) |
4235 |
if (exists) |
4236 |
ellist.erase(ep); |
4236 |
ellist.erase(ep); |
4237 |
|
4237 |
|
4238 |
sfile.addElement(cs); |
4238 |
sfile.addElement(cs_p); |
4239 |
sfile.setText("\n"); |
4239 |
sfile.setText("\n"); |
4240 |
return tqsl_dump_cert_status_data(sfile); |
4240 |
return tqsl_dump_cert_status_data(sfile); |
4241 |
} |
4241 |
} |