mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
Certificate: add option to not export the whole chain
This commit is contained in:
1 parent
892af7a843
commit
06a32eedd1
2 files changed
+6
-3
No files matched your search
+3
-1
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user