summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/helper/documentsignaturemanager.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index 095abb543cb6..c247a40db917 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -363,14 +363,13 @@ bool DocumentSignatureManager::add(
uno::Sequence<uno::Reference<security::XCertificate>> aCertPath
= xSecurityContext->getSecurityEnvironment()->buildCertificatePath(xCert);
- const uno::Reference<security::XCertificate>* pCertPath = aCertPath.getConstArray();
- sal_Int32 nCnt = aCertPath.getLength();
OUStringBuffer aStrBuffer;
- for (int i = 0; i < nCnt; i++)
+ for (uno::Reference<security::XCertificate> const& rxCertificate : aCertPath)
{
- comphelper::Base64::encode(aStrBuffer, pCertPath[i]->getEncoded());
- maSignatureHelper.AddEncapsulatedX509Certificate(aStrBuffer.makeStringAndClear());
+ comphelper::Base64::encode(aStrBuffer, rxCertificate->getEncoded());
+ OUString aString = aStrBuffer.makeStringAndClear();
+ maSignatureHelper.AddEncapsulatedX509Certificate(aString);
}
std::vector<OUString> aElements = DocumentSignatureHelper::CreateElementList(