xmlsecurity/qa/unit/signing/signing.cxx  |   18 +++++++++---------
 xmlsecurity/qa/unit/signing/signing2.cxx |    2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 09622587088ee8a3d35abc17aab24b165d2eabfd
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Sun Nov 19 13:20:51 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Sun Nov 19 20:38:12 2023 +0100

    Extended loplugin:ostr: xmlsecurity
    
    Change-Id: I639bf4af888e5af615379515d92ad70025d8ac15
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159660
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index 3d87fb40030d..e564e3761aeb 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -875,14 +875,14 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testXAdESNotype)
     // attribute", i.e. the signature without such an attribute was not 
preserved correctly.
     assertXPathNoAttribute(pXmlDoc,
                            
"/odfds:document-signatures/dsig:Signature[1]/dsig:SignedInfo/"
-                           "dsig:Reference[starts-with(@URI, 
'#idSignedProperties')]",
-                           "Type");
+                           "dsig:Reference[starts-with(@URI, 
'#idSignedProperties')]"_ostr,
+                           "Type"_ostr);
 
     // New signature always has the Type attribute.
     assertXPath(pXmlDoc,
                 "/odfds:document-signatures/dsig:Signature[2]/dsig:SignedInfo/"
-                "dsig:Reference[starts-with(@URI, '#idSignedProperties')]",
-                "Type", "http://uri.etsi.org/01903#SignedProperties";);
+                "dsig:Reference[starts-with(@URI, 
'#idSignedProperties')]"_ostr,
+                "Type"_ostr, "http://uri.etsi.org/01903#SignedProperties";);
 }
 
 /// Creates a XAdES signature from scratch.
@@ -929,15 +929,15 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testXAdES)
     // Assert that the digest algorithm is SHA-256 in the bAdESCompliant case, 
not SHA-1.
     assertXPath(pXmlDoc,
                 "/odfds:document-signatures/dsig:Signature/dsig:SignedInfo/"
-                "dsig:Reference[@URI='content.xml']/dsig:DigestMethod",
-                "Algorithm", ALGO_XMLDSIGSHA256);
+                "dsig:Reference[@URI='content.xml']/dsig:DigestMethod"_ostr,
+                "Algorithm"_ostr, ALGO_XMLDSIGSHA256);
 
     // Assert that the digest of the signing certificate is included.
-    assertXPath(pXmlDoc, "//xd:CertDigest", 1);
+    assertXPath(pXmlDoc, "//xd:CertDigest"_ostr, 1);
 
     // Assert that the Type attribute is set on all URI's that start with 
#idSignedProperties
-    assertXPath(pXmlDoc, "//dsig:Reference[starts-with(@URI, 
'#idSignedProperties')]", "Type",
-                "http://uri.etsi.org/01903#SignedProperties";);
+    assertXPath(pXmlDoc, "//dsig:Reference[starts-with(@URI, 
'#idSignedProperties')]"_ostr,
+                "Type"_ostr, "http://uri.etsi.org/01903#SignedProperties";);
 }
 
 CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_ODT)
diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx 
b/xmlsecurity/qa/unit/signing/signing2.cxx
index d0bb816d9ee6..832a414ff2bc 100644
--- a/xmlsecurity/qa/unit/signing/signing2.cxx
+++ b/xmlsecurity/qa/unit/signing/signing2.cxx
@@ -62,7 +62,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest2, 
testPreserveMacroSignatureODB)
     xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
 
     // Make sure the signature is still there
-    assertXPath(pXmlDoc, "//dsig:Signature", "Id",
+    assertXPath(pXmlDoc, "//dsig:Signature"_ostr, "Id"_ostr,
                 
"ID_00a7002f009000bc00ce00f7004400460080002f002e00e400e0003700df00e8");
 }
 

Reply via email to