tdf#145538 Use range based for loops

Change-Id: Ib672cd1968de7bb99cd5f8737a09ce02b0490bf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167995
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
U-AMANDAQUARESMA\quare 2024-05-23 16:14:49 +02:00 committed by Ilmari Lauhakangas
parent 6bab548591
commit fc3e2c8bba

View file

@ -722,11 +722,11 @@ static HCERTSTORE getCertStoreForIntermediatCerts(
if (store == nullptr)
return nullptr;
for (int i = 0; i < seqCerts.getLength(); i++)
for (const auto& i : seqCerts)
{
SAL_INFO("xmlsecurity.xmlsec", "Added temporary certificate: " << seqCerts[i]->getSubjectName());
SAL_INFO("xmlsecurity.xmlsec", "Added temporary certificate: " << i->getSubjectName());
uno::Sequence<sal_Int8> data = seqCerts[i]->getEncoded();
uno::Sequence<sal_Int8> data = i->getEncoded();
PCCERT_CONTEXT cert = CertCreateCertificateContext(
X509_ASN_ENCODING, reinterpret_cast<const BYTE*>(&data[0]), data.getLength());
//Adding the certificate creates a copy and not just increases the ref count