Certificate: add option to not export the whole chain

This commit is contained in:
cberaud committed 2015-04-30 22:02:27 -04:00
1 parent 892af7a843
commit 06a32eedd1
2 files changed
+6 -3

No files matched your search

+3 -1
View File
@@ -447,7 +447,7 @@ Certificate::getIssuerUID() const
}
std::string
Certificate::toString() const
Certificate::toString(bool chain) const
{
std::ostringstream ss;
const Certificate* crt = this;
@@ -461,6 +461,8 @@ Certificate::toString() const
}
str.resize(buf_sz);
ss << str;
if (not chain)
break;
crt = crt->issuer.get();
}
return ss.str();