Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Commit

Permalink
Update files/patch-src_openssl_cert.cpp
Browse files Browse the repository at this point in the history
* Enforce explicit use of shared_ptr in tqsl_setCertificateStatus()
  • Loading branch information
jj1bdx committed Jul 18, 2014
1 parent ff1a60b commit 3b4c8ae
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions files/patch-src_openssl_cert.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- src/openssl_cert.cpp.orig 2014-07-12 13:18:13.000000000 -0700
+++ src/openssl_cert.cpp 2014-07-17 16:36:04.000000000 -0700
@@ -4214,7 +4214,7 @@
@@ -4214,20 +4214,22 @@
for (ep = ellist.find("Cert"); ep != ellist.end(); ep++) {
if (ep->first != "Cert")
break;
Expand All @@ -9,21 +9,30 @@
if (rval.second && strtol(rval.first.c_str(), NULL, 10) == serial) {
exists = true;
break;
@@ -4227,7 +4227,7 @@
}
}

- XMLElement cs("Cert");
+ shared_ptr<XMLElement> cs_p = make_shared<XMLElement>("Cert");
+ XMLElement cs = *cs_p;
cs.setPretext("\n ");
- XMLElement se;
+ shared_ptr<XMLElement> se_p(new XMLElement);
+ XMLElement se = *se_p;
se.setPretext(cs.getPretext() + " ");
se.setElementName("status");
se.setText(status);
- cs.addElement(se);
+ cs.addElement(shared_ptr<XMLElement>(&se));
+ cs.addElement(se_p);

cs.setAttribute("serial", sstr);
cs.setText("\n ");
@@ -4235,7 +4235,7 @@
@@ -4235,7 +4237,7 @@
if (exists)
ellist.erase(ep);

- sfile.addElement(cs);
+ sfile.addElement(shared_ptr<XMLElement>(&cs));
+ sfile.addElement(cs_p);
sfile.setText("\n");
return tqsl_dump_cert_status_data(sfile);
}

1 comment on commit 3b4c8ae

@jj1bdx
Copy link
Owner Author

@jj1bdx jj1bdx commented on 3b4c8ae Jul 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by 26a88f7

Please sign in to comment.