diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-02-28 13:59:05 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-02-28 18:44:33 +0100 |
commit | ff49a550df626a4b02869b86f1ca9b9a5a421e44 (patch) | |
tree | 17e4a59a0c5b95dd5ed494ce95e8b0ceb32cfbf9 /vcl | |
parent | 0694a66e8e5ad3c83f28a093add009ecc37d500b (diff) |
Fix the tests failing when invalid certificate is in cert store
Change-Id: I72055c814a11a76c4934610bcad9c24aae21164e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130690
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/filter/ipdf/ipdf.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx index 8ed49813e88b..a2732b58d862 100644 --- a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx +++ b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx @@ -115,17 +115,17 @@ CPPUNIT_TEST_FIXTURE(VclFilterIpdfTest, testPDFAddVisibleSignatureLastPage) uno::Reference<view::XSelectionSupplier> xSelectionSupplier(pBaseModel->getCurrentController(), uno::UNO_QUERY); xSelectionSupplier->select(uno::makeAny(xShape)); - uno::Sequence<uno::Reference<security::XCertificate>> aCertificates - = getSecurityContext()->getSecurityEnvironment()->getPersonalCertificates(); - if (!aCertificates.hasElements()) + auto xCert = GetValidCertificate( + getSecurityContext()->getSecurityEnvironment()->getPersonalCertificates()); + if (!xCert) { return; } SdrView* pView = SfxViewShell::Current()->GetDrawView(); - svx::SignatureLineHelper::setShapeCertificate(pView, aCertificates[0]); + svx::SignatureLineHelper::setShapeCertificate(pView, xCert); // When: do the actual signing. - pObjectShell->SignDocumentContentUsingCertificate(aCertificates[0]); + pObjectShell->SignDocumentContentUsingCertificate(xCert); // Then: count the # of shapes on the signature widget/annotation. std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get(); |