don't assert in this case, better to return
Change-Id: I38cef1185bef0de67bbb579c5c64e2697f953b0b Reviewed-on: https://gerrit.libreoffice.org/64297 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
parent
9e61f831f0
commit
2645829f40
1 changed files with 5 additions and 3 deletions
|
@ -1367,10 +1367,12 @@ bool ChildSession::signDocumentContent(const char* buffer, int length, const std
|
||||||
Poco::JSON::Parser parser;
|
Poco::JSON::Parser parser;
|
||||||
Poco::JSON::Object::Ptr root = parser.parse(json).extract<Poco::JSON::Object::Ptr>();
|
Poco::JSON::Object::Ptr root = parser.parse(json).extract<Poco::JSON::Object::Ptr>();
|
||||||
|
|
||||||
for (auto& chainPtr : *root->getArray("chain"))
|
for (auto& rChainPtr : *root->getArray("chain"))
|
||||||
{
|
{
|
||||||
assert(chainPtr.isString());
|
if (!rChainPtr.isString())
|
||||||
std::string chainCertificate = chainPtr;
|
return false;
|
||||||
|
|
||||||
|
std::string chainCertificate = rChainPtr;
|
||||||
std::vector<unsigned char> binaryChainCertificate = decodeBase64(extractCertificate(chainCertificate));
|
std::vector<unsigned char> binaryChainCertificate = decodeBase64(extractCertificate(chainCertificate));
|
||||||
|
|
||||||
bResult = getLOKitDocument()->addCertificate(
|
bResult = getLOKitDocument()->addCertificate(
|
||||||
|
|
Loading…
Reference in a new issue