diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-11 19:50:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-12 10:25:05 +0100 |
commit | 1aaa14a63a2678397a2b34abdf0d9c896fd5c760 (patch) | |
tree | d25b81de3224330b597649e0127c289523732a52 /xmlsecurity | |
parent | 216f32464ccb0f096e5fdf77f82baf30ae7bab5f (diff) |
explicitly assert that xSignatureInfo shouldn't be empty
Change-Id: I4cd1be8b4c0b7ecb727e6a997679a9b74c03bc15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112362
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/qa/unit/signing/signing.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index 5908f9059ffc..d9661d348138 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -918,6 +918,8 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSignatureLineOOXML) = xSignatures->verifyScriptingContentSignatures(xStorage, uno::Reference<io::XInputStream>()); + CPPUNIT_ASSERT(xSignatureInfo.getLength()); + // The signature should have a valid signature, and signature line with two valid images CPPUNIT_ASSERT(xSignatureInfo[0].SignatureIsValid); CPPUNIT_ASSERT_EQUAL(OUString("{DEE0514B-13E8-4674-A831-46E3CDB18BB4}"), @@ -937,6 +939,8 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSignatureLineODF) uno::Sequence<security::DocumentSignatureInformation> xSignatureInfo = pObjectShell->GetDocumentSignatureInformation(false); + CPPUNIT_ASSERT(xSignatureInfo.getLength()); + CPPUNIT_ASSERT(xSignatureInfo[0].SignatureIsValid); CPPUNIT_ASSERT_EQUAL(OUString("{41CF56EE-331B-4125-97D8-2F5669DD3AAC}"), xSignatureInfo[0].SignatureLineId); |