summaryrefslogtreecommitdiff
path: root/xmlsecurity/workben
AgeCommit message (Collapse)Author
2020-11-19xmlsecurity: handle MDP permission during PDF verifyMiklos Vajna
(cherry picked from commit 586f6abee92af3cdabdce034b607b9a046ed3946) Conflicts: include/vcl/filter/PDFiumLibrary.hxx vcl/source/pdf/PDFiumLibrary.cxx xmlsecurity/source/helper/pdfsignaturehelper.cxx (cherry picked from commit 00479937dc071246cc27f33fd6397668448a7ed9) Change-Id: I626fca7c03079fb0374c577dcfe024e7db6ed5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106067 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-09-09xmlsecurity: pdf incremental updates that are non-commenting are invalidMiklos Vajna
I.e. it's OK to add incremental updates for annotation/commenting purposes and that doesn't invalite existing signatures. Everything else does. (cherry picked from commit 61834cd574568613f0b0a2ee099a60fa5a8d9804) Change-Id: I4607c242b3c6f6b01517b02407e9e7a095e2e069 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102327 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-27xmlsecurity: detect unsigned incremental update between signaturesMiklos Vajna
(cherry picked from commit 7468d5df5ec79783eae84b62bdc5ecf12f0ca255) Conflicts: xmlsecurity/source/pdfio/pdfdocument.cxx Change-Id: I269ed858852ee7d1275adf340c8cc1565fc30693 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99478 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-18loplugin:logexceptionnicely in xmlhelp..xmlsecurityNoel Grandin
Change-Id: Idbf0de3f953b08f98144241346533ad30f49269e Reviewed-on: https://gerrit.libreoffice.org/74285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-12Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories w* x* Change-Id: I27bff44da3d34d24262031c7489e755311599bc5 Reviewed-on: https://gerrit.libreoffice.org/57307 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-21Turn on clang-format for these filesMiklos Vajna
I (tried to) keep these files consistent locally with astyle in the past, switching to clang-format makes sure that the recent problem with introducing inconsistencies in these files doesn't happen again. (On the flip side, it's great to see that now others also touch this PDF/pdfium code. :-) ) Change-Id: I6065eab77c584197a82fe48e7d3e81b445106efd Reviewed-on: https://gerrit.libreoffice.org/51701 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-04tdf#42949 Fix some more Include What You Use warningsMiklos Vajna
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a Reviewed-on: https://gerrit.libreoffice.org/47348 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-06xmlsecurity: no need to have pdfio/pdfdocument.hxx as a global headerMiklos Vajna
Which means xmlsecurity can be again a module that has no public headers. Change-Id: I3d0b03680398f80196fac187263e770fd44ed0ed Reviewed-on: https://gerrit.libreoffice.org/41966 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-17svl: move byte-array verification from vclAshod Nakashian
Also use comphelper::Base64 and DateTime::CreateFromUnixTime to avoid depending on sax. Change-Id: If1853f8d9481c9caa0625a111707531bbc495f75 Reviewed-on: https://gerrit.libreoffice.org/39993 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-07-15emfplus: completed isolation/migration of Emf/WmfArmin Le Grand
Decided to keep the migrated/isolated Emf/Wmf reader which are now hidden behind a Uno Api. Had to re-implement WMF_EXTERNALHEADER (now WmfExternal, own file/header) to not break anything. It *seems* to just scale something and could be done after import, but I could not be sure. Also needed a callback hook to allow getting the Metafile out of a MetafilePrimitive in a lower module (vcl relative to drawinglayer) which is needed as long as primitives are not completely on Uno Api. Deleted all Emf/Wmf reader stuff from vcl. Change-Id: Ic5540defa8ec770728280df4df3f12e1f48cfc3a
2017-06-02convert GRFILTER constants to ERRCODE_GRFILTER_Noel Grandin
since various code mixes these constants in with ErrCode values from other code, let us just make it into real ErrCode values. Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95 Reviewed-on: https://gerrit.libreoffice.org/38313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-27xmlsecurity pdfverify: go via vcl graphic filterMiklos Vajna
Initially some proof of concept code was implemented here, but then I copied that to VCL and it got fixes there, so call into vcl from here instead of invoking pdfium directly. Change-Id: I8590cbe94876ff6aff3f870535a99062304f3996 Reviewed-on: https://gerrit.libreoffice.org/37016 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-22vcl: move in PDF tokenizer from xmlsecurityMiklos Vajna
The PDF code in xmlsecurity served two purposes: - a generic PDF tokenizer - signature verification The first purpose is useful to have in VCL, so the PDF export code can use it as well when it comes to PDF image handling. This commit just moves most of the PDF code to VCL, it does not touch the PDF export code yet. With this, also the somewhat odd xmlsecurity dependency of CppunitTest_vcl_pdfexport can be removed as well. Change-Id: I6fe8294ed5c4aa4d79f4b2ddef80a4d1c9d566cc Reviewed-on: https://gerrit.libreoffice.org/35513 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-21xmlsecurity: separate signature verification from PDF tokenizerMiklos Vajna
Signature verification code depends on sax and xmloff, but the rest of the PDF tokenizer could be otherwise moved down to lower layers without problems. Change-Id: Ieca57279e9517935821c1d34f217fd10548035ef Reviewed-on: https://gerrit.libreoffice.org/35512 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-02-24vcl: add initial CppunitTest_vcl_pdfexportMiklos Vajna
Invoke the PDF export filter and then use the PDF tokenizer from xmlsecurity to assert the contents of created PDF file. The testcase fails with commit 6db0f1feb1d9931d2726dd11a889c58815710ce0 (tdf#106059 PDF export: create a reference XObject for PDF images, 2017-02-22) reverted. Change-Id: I90526fef41d9560ae447f586df766bc50a491c43 Reviewed-on: https://gerrit.libreoffice.org/34609 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-02-23xmlsecurity: clean up leftover signaturetestMiklos Vajna
Which is not even built since gbuildification. Change-Id: I5fbacc32289c4a534d49ca9042cca4e40fa53815 Reviewed-on: https://gerrit.libreoffice.org/34565 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-02-10pdfverify preview: fix macOS color spaceMiklos Vajna
Unlike on Linux and Windows, we need to do an ARGB -> BGRA conversion here. Change-Id: Ifa539973de439de25125e544cfbbe941d08dee00
2017-02-10xmlsecurity: use pdfium to generate a preview in pdfverifyMiklos Vajna
This is just test code to check if the bundled pdfium is usable. Change-Id: I1f1d808796fe77924518cd004d99affe70279e88 Reviewed-on: https://gerrit.libreoffice.org/34081 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-22Revert "[API CHANGE] createSecurityContext() was always called with an empty ↵Tor Lillqvist
string" I got cold feet. I don't want to have to revert this many years later instead, when some obscure 3rd-party software stops working. This reverts commit e1ce7bad62f07faf8f21adac6c3848d142f61953.
2016-12-21[API CHANGE] createSecurityContext() was always called with an empty stringTor Lillqvist
So drop the parameter then and propagate fallout in the Windows implementation in xmlsecurity. The NSS implementation already ignored the parameter completely. This interface is not 'published' and the parameter was even marked as 'reserved for internal use' so I doubt any external code has used it. Change-Id: I5915b941b79cfddadc8137c32ed07c20c9ccaa37
2016-12-16cid#1374075 cid#1374076 Executable_pdfverify: uncaught exceptionsMiklos Vajna
SAL_INFO() throwing std::length_error and other uninteresting cases. Change-Id: I841c7d81ff51c95ea60d63625e296f9886798f92
2016-12-05convert FSysStyle to o3tl::typed_flagsNoel Grandin
Change-Id: I58a63a0e6f619442f21827064644ecd8ca57b8ff
2016-11-22Executable_pdfverify: move pdfverify.cxx to workben/Miklos Vajna
That's where the implementation of such internal test binaries usually are. Change-Id: Ib7d2eb95de96d0d82e90e51f58da3a0c15a2ec71 Reviewed-on: https://gerrit.libreoffice.org/31073 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-07-26masses of MessBoxes not being disposed promptlyCaolán McNamara
since... commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f Date: Thu May 28 21:35:43 2015 +0100 tdf#91702 - fix stack-based MessBox allocation. There is no special ScopedVclPtr<X>::Create or ScopedVclPtrInstance<X>::Create just VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo doesn't call dispose on the owned X Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-05use uno::Reference::set method instead of assignmentNoel Grandin
Change-Id: I60e52ef2abc3107ba77e81811dfe1bffbfd77218
2015-10-21remove untyped Link<>Noel Grandin
Change-Id: I809f9e10309ceadda0a82c3818277323b34ec61b Reviewed-on: https://gerrit.libreoffice.org/19491 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-29tdf#91702 - fix stack-based MessBox allocation.Michael Meeks
Change-Id: I62dd164e281911d9db3de453789a5badc7cd5fd7 Reviewed-on: https://gerrit.libreoffice.org/15954 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-08Related #82088: removed last css aliases in hxxStefan Weiberg
* Only unfixed header namespace alias in ConnectionLog.hxx: LogLevel = ::com::sun::star::logging::LogLevel Change-Id: I48c941a4762830f2265c8241f4c1695a43ec891a Reviewed-on: https://gerrit.libreoffice.org/11333 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2013-08-18fdo#57950: Remove some chained appends in xmlsecurityJelle van der Waa
Change-Id: I35ac622abb995a9259f0774f463ec2816b3668b6 Reviewed-on: https://gerrit.libreoffice.org/5477 Reviewed-by: Andrzej J.R. Hunt <andrzej@ahunt.org> Tested-by: Andrzej J.R. Hunt <andrzej@ahunt.org>
2013-08-17Revert "fdo#57950: Remove some chained appends in xmlsecurity"Andrzej J.R. Hunt
This reverts commit 4f20c9f6f95c117bcdb520682df4fa1429a56477 Change-Id: I4d8cef801d570b0c20e580144e79a5940b100271 Reviewed-on: https://gerrit.libreoffice.org/5476 Reviewed-by: Andrzej J.R. Hunt <andrzej@ahunt.org> Tested-by: Andrzej J.R. Hunt <andrzej@ahunt.org>
2013-08-17fdo#57950: Remove some chained appends in xmlsecurityJelle van der Waa
Change-Id: If70fa38ad4836b6dacdd0c5577c66b78be6826a6 Reviewed-on: https://gerrit.libreoffice.org/5465 Reviewed-by: Andrzej J.R. Hunt <andrzej@ahunt.org> Tested-by: Andrzej J.R. Hunt <andrzej@ahunt.org>
2013-08-11fdo#62475 removed pointless commentsJelle van der Waa
Change-Id: I02b264a9661bcefaea96d6c5743352914154427d Reviewed-on: https://gerrit.libreoffice.org/5345 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-05-21fdo#46808, GetStorageFromURL now takes an XComponentContextNoel Grandin
Change-Id: I300748914c913ecd9d433cb6f549a000717b538d
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-02-25remove some trivial duplicatesThomas Arnhold
Change-Id: Ie736cb6d5ff7f4d1998338f4a3a3a3b0a67c79ad
2013-01-20Fix missing parenthesisJulien Nabet
Change-Id: Id372cde73af484d2d03149d7bbb9f23132cdabf8
2012-10-31Get rid of vcl::unohelper::GetMultiServiceFactoryStephan Bergmann
...which effectively is just a glorious wrapper around comphelper::getProcessServiceFactory. In turn gets also rid of ImplSVAppData's mxMSF and mpMSFTempFileName and the rSMgr parameter to InitVCL. All the VCL users "soffice", "spadmin", and "unopkg gui" appear to still work fine. Change-Id: I797d48f7d0d8c35bb82124c9ab0ee63850c4d863
2012-09-25String -> OUStringIvan Timofeev
Change-Id: I4fc17b5fff7a00edc96bd4f75565b5f041c1dcb0
2012-09-14Improvement on previous commit, UCB clean upStephan Bergmann
* As UCB is only ever initialized with "Local"/"Office", remove this configuration vector completely. The "create" ctor creates an instance internally initialized with those "Local"/"Office" keys. Special (test) code can still instantiate an uninitialized one via plain createInstance. And for backwards compatilibity process startup still ensures to create an initialized instance early, in case there is still code out there (in extensions) that later calls plain createInstance and expects to get the already-initialized (single) instance. * XInitialization is an "implementation detail" of the UniversalContentBroker service, do not expose in XUniversalContentBroker. * ucbhelper/configurationkeys.hxx is no longer needed and is removed. * ucbhelper/contentbroker.hxx is an empty wrapper and is removed; however, that requires ucbhelper::Content constructors to take explicit XComponentContext arguments now. * The only remaining code in ucbhelper/source/client/contentbroker.cxx is Android-only InitUCBHelper. Is that relevant still? Change-Id: I3f7bddd0456bffbcd13590c66d9011915c760f28
2012-09-04Some clean up of previous commitStephan Bergmann
Change-Id: I0ea6d6439f97fcf74162c19671483aaa17b5a6cb
2012-09-04fdo#46808, Adapt DocumentDigitalSignatures UNO service to new styleNoel Grandin
Rename service from "Decryptor" to "DocumentDigitalSignatures" to be consistent with the other UNO services, and with it's own header file name. Add service constructor for passing in arguments. Change-Id: Iaca0c40bb2f1a1af2ef9ca29361bfd023ade2678
2012-07-17re-base on ALv2 code. Includes:Michael Meeks
retain presence of MPL licensed nssrenam.h symbol renamer.
2012-07-02Remove unused definesThomas Arnhold
Some of them were commented out for documentation purpose. Change-Id: I29a6b2cbe774b527f0c3a0be5675160817a7f3ce
2012-05-29targeted string re-workNorbert Thiebaud
Change-Id: Ib4a0e8fcd128c949034d2d183ff045bb433fce8b
2012-03-01New IMPL_LINK_NOARG to work around SAL_UNUSED_PARAMETER problemStephan Bergmann
...see ebe26f72e90337da2d14f3029de148904e3e30b6 "WaE: 'unused' attribute ignored when parsing type" for the problem.
2011-11-27remove include of pch header from xmlsecurityNorbert Thiebaud