summaryrefslogtreecommitdiff
path: root/xmlsecurity
AgeCommit message (Collapse)AuthorFilesLines
2018-06-01xmlsecurity: add ecdsa option to certificate generator scriptMiklos Vajna1-14/+34
Change-Id: I8bb48c46aaea9ef4ce4bc4ab58ea8b88fe0e48a2 Reviewed-on: https://gerrit.libreoffice.org/55159 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-01loplugin: look for CPPUNIT_ASSERT_EQUALS with params swappedNoel Grandin1-2/+2
idea originally from either tml or moggi, can't remember which Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d Reviewed-on: https://gerrit.libreoffice.org/55126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-01Move signature line to signed propertiesSamuel Mehrbrodt2-61/+53
So that a modification will result in an invalid signature. Change-Id: Ib40e0b941d56e29c134993e1d41f496aa183bd7f Reviewed-on: https://gerrit.libreoffice.org/55079 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-30Fix commentsSamuel Mehrbrodt1-1/+1
Signature lines is no longer ooxml specific Change-Id: I092dbc31b30d30bf68b4cb733cb7cb8520c99738 Reviewed-on: https://gerrit.libreoffice.org/55058 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-30xmlsecurity windows: let cert picker and PDF sign find ECDSA keysMiklos Vajna4-6/+79
Need to incrementally migrate the remaining places (ODF, OOXML signing) to CNG, then flip the default. SVL_CRYPTO_CNG=1 is needed till then. (The testcase passes with and without the fix when SVL_CRYPTO_CNG is not specified; it fails without the fix when SVL_CRYPTO_CNG is specified.) Change-Id: Ide9d3b109bbd955a9cb83b18bba6aa72269f4d34 Reviewed-on: https://gerrit.libreoffice.org/55030 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-25xmlsecurity nss: fix OOXML signing with ECDSA keyMiklos Vajna3-1/+56
Change-Id: Id2b59887fcd69e294a6d9db17ec0446615054ecc Reviewed-on: https://gerrit.libreoffice.org/54779 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-24xmlsecurity: Ask current datetime only onceTakeshi Abe3-11/+6
... and pass it as the sole argument to XMLSignatureHelper::SetDateTime(). Change-Id: I7f3e8dc90bb34ca347a1ad5a79717a338af3bed9 Reviewed-on: https://gerrit.libreoffice.org/54706 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-23Remove leftover "#undef DEBUG"Stephan Bergmann2-15/+0
...which might have had a purpose in the past, but look unused today. (DEBUG is defined in solenv/gbuild/gbuild.mk iff dbglevel >= 2, and `make Library_xsec_xmlsec dbglevel=2` doesn't run into any problems for me with the undefs removed.) Change-Id: I7f941e8c2d454f4206fb17bc791247606ffe6309 Reviewed-on: https://gerrit.libreoffice.org/54718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-22Related tdf#83877 Select certificate ok button label doesn't matchSamuel Mehrbrodt4-2/+24
Change the button to "Select" instead of sign when we only want to select a certificate. Change-Id: Ifa896e502c8680497d71912ddd1058ab0b71542b Reviewed-on: https://gerrit.libreoffice.org/52823 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-22tdf#83877 Use Signer comments as signature descriptionSamuel Mehrbrodt1-4/+5
Change-Id: Ia9f18addeee9cf86989c873419113ddbd07c219f Reviewed-on: https://gerrit.libreoffice.org/54551 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-22tdf#83877 Add valid/invalid images to signaturesSamuel Mehrbrodt10-15/+173
Change-Id: I958c1bad2f32383ebaaeb7d42c761f0d1dfefc35 Reviewed-on: https://gerrit.libreoffice.org/54513 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-18tdf#83877 Write SignatureLineId to ODF & OOXML signaturesSamuel Mehrbrodt11-6/+76
Change-Id: I483a3b7895cdcb10ef9d6dacf167ed0f8db7e723 Reviewed-on: https://gerrit.libreoffice.org/54432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-18tdf#109180 xmlsecurity nss: fix signing with ECDSA keyMiklos Vajna18-27/+172
Using an ECDSA key but writing RSA URIs would fail later in libxmlsec. Also fix up CppunitTest_xmlsecurity_signing (env vars were set too late), so that the new testcase actually fails without the fix. Change-Id: I9e584844d5cd046952b2f19130aeaa5a765bfc0a Reviewed-on: https://gerrit.libreoffice.org/54400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-18Fix some IWYU warningsMiklos Vajna4-7/+57
Change-Id: I11d874caad9174fb1a70121f1772e117753ee519 Reviewed-on: https://gerrit.libreoffice.org/54503 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-15Sign Signature LineSamuel Mehrbrodt7-3/+127
This adds a new context menu entry "Sign Signature Line" to signature lines. You can directly sign the document from there. Still missing is the updating of the graphic to reflect the valid/invalid signature state. Change-Id: Ib8bc8c57f9d5370a10e379f86f9e41e57c715e3f Reviewed-on: https://gerrit.libreoffice.org/53778 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-05Fix typosAndrea Gelmini1-1/+1
Change-Id: I92078fdece135754744d85424956dbb071f3899e Reviewed-on: https://gerrit.libreoffice.org/53638 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-04xmlsecurity windows: stop using the "xmlSec" prefix for own codeMiklos Vajna3-14/+24
xmlSec is the prefix for symbols from libxmlsec, it's confusing if our own code uses that as well. Change-Id: I3b003d2de067ba85e9f092c3c6aeac00dd4b1784 Reviewed-on: https://gerrit.libreoffice.org/53820 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-27xmlsecurity: remove duplicated Windows-specific component fileMiklos Vajna2-57/+0
Change-Id: Iefc96ded8e53004a22041ee4299200a3d02a7eb5 Reviewed-on: https://gerrit.libreoffice.org/53545 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-26xmlsecurity mscrypto: create SEInitializer instances with a constructorMiklos Vajna10-251/+38
Allows getting rid of the xsec_mscrypt / xsec_nss factory constructs. Change-Id: Idcc3351f7cc3b37a65e6f78018f062439e48bc3d Reviewed-on: https://gerrit.libreoffice.org/53463 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-25SvTabListBox::SetTabs, pass count explicitNoel Grandin4-10/+10
passing count as first element in array, dodgy. Change-Id: I49905b554b3b4d6cc3fa419a36389cd2e5ded463
2018-04-16Fix typosAndrea Gelmini1-1/+1
Change-Id: Ife28cd9399cfcb375bad764dac7424eda50d430d Reviewed-on: https://gerrit.libreoffice.org/52198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-14look for check buttons without underlinesCaolán McNamara1-0/+1
Change-Id: Ia9963190cf3dccbfa82951a3f2c0e29e00171429 Reviewed-on: https://gerrit.libreoffice.org/52847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-13xmlsecurity nss: create SEInitializer instances with a constructorMiklos Vajna4-37/+43
And split NSSInitializer and SEInitializer into two implementations, they are not the same on Windows, so it simplifies things if they're also split on other platforms. Change-Id: Ifc0ea7e35e804232ee492b7eea9c25662c9b499e Reviewed-on: https://gerrit.libreoffice.org/52801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-09use more DBG_UNHANDLED_EXCEPTIONNoel Grandin2-4/+6
so we get nice logs of the exception dynamic type for UNO exceptions. Change-Id: Ic0b10dc14d354a2c9a0591b3a51d2f1640d54bdb Reviewed-on: https://gerrit.libreoffice.org/52465 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-07xmlsecurity mscrypt: create SecurityEnvironment instances with a constructorMiklos Vajna4-78/+51
Change-Id: Ic121dc33252a1ac41bfdb09086d355321fd8d990 Reviewed-on: https://gerrit.libreoffice.org/52472 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke4-4/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-29loplugin:unusedmethodsNoel Grandin4-47/+0
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3 Reviewed-on: https://gerrit.libreoffice.org/52066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29xmlsecurity nss: create SecurityEnvironment instances with a constructorMiklos Vajna4-41/+12
Change-Id: If4b18747292dd265d789b70078979361bd044fde Reviewed-on: https://gerrit.libreoffice.org/52039 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-28No need to open this test doc read/writeStephan Bergmann1-2/+1
...fail when SRCDIR is a read-only tree Change-Id: I80a372b3eb71faed1215305a55df93390c846eed Reviewed-on: https://gerrit.libreoffice.org/52020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-28Copy test doc to temp location before opening read/writeStephan Bergmann1-1/+6
...otherwise fails if SRCDIR is a read-only tree Change-Id: I0b81be5ba055dac133e5ee638f21c3c5f4d5736b Reviewed-on: https://gerrit.libreoffice.org/52015 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-28loplugin:virtualdown in xmloff/xmlsecurityNoel Grandin4-9/+3
Change-Id: I884fe180be98fe29ddb7d2daf4c61f733236e8bd Reviewed-on: https://gerrit.libreoffice.org/51987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-27loplugin:expressionalwayszero improvementsNoel Grandin1-1/+1
Change-Id: I00bdbc58d2295a0be30b47c85eae6b9abfec17b2 Reviewed-on: https://gerrit.libreoffice.org/51868 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-26use boost::optional in OutDevStateNoel Grandin1-0/+2
Change-Id: I83fb85fcba6cd2a5dc4f99fdfd3238d72afb7bc2 Reviewed-on: https://gerrit.libreoffice.org/51770 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-23xmlsecurity: remove no longer needed Windows XP workaroundMiklos Vajna1-5/+0
Change-Id: Id3f024fefc0b2bd6f837ecfdd907f0d107600910 Reviewed-on: https://gerrit.libreoffice.org/51759 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-22xmlsecurity: create XMLDocumentWrapper instances with a constructorMiklos Vajna5-78/+50
Change-Id: I23bca00fb0fbcae92e73c4a106b08edd5caf5cf9 Reviewed-on: https://gerrit.libreoffice.org/51720 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-21Turn on clang-format for these filesMiklos Vajna4-67/+125
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-03-20drop unnecessary includesCaolán McNamara2-3/+0
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc Reviewed-on: https://gerrit.libreoffice.org/51603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-18properly check for gpgconf (and --create-socketdir) workingRene Engelhard2-1/+11
Change-Id: I21268e5950381845eb90bf66a42a99adc3821eaa Reviewed-on: https://gerrit.libreoffice.org/51493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-03-18gpg4libre: fix failing gpg test due to over-long filenamesThorsten Behrens1-1/+11
With long workdir path, gpg sometimes fails with 'gpg: can't connect to the agent: File name too long' error. WK recommends to create preferred socket dir under /run/user, needs prepping though via gpgconf. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84720 Change-Id: I2edb27758b2d4581d54eabf549dcdfed0106dba4 Reviewed-on: https://gerrit.libreoffice.org/50978 Tested-by: Rene Engelhard <rene@debian.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-03-12loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin1-1/+1
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008 Reviewed-on: https://gerrit.libreoffice.org/50996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08loplugin:unnecessaryoverride (clang-cl)Stephan Bergmann2-9/+0
Change-Id: I96c2e28f14e50eed5b729170cd30fd54f00d89f3 Reviewed-on: https://gerrit.libreoffice.org/50944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-05Resolves: tdf#116188 set min version on all .ui files to 3.18Caolán McNamara6-6/+6
which is already the min for the runtime Change-Id: Ifebe099f1f94a36f65a31989689400327a823dcd Reviewed-on: https://gerrit.libreoffice.org/50776 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-05drop sax::tools::*base64 methodsNoel Grandin2-6/+8
and use the underlying comphelper methods rather. This is so that I can break the dependency that tools has on sax, and can add methods that make sax depend on tools. Change-Id: I8a2d6ce2ffc3529a0020710ade6a1748ee5af7d5 Reviewed-on: https://gerrit.libreoffice.org/50767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-02forcepoint #16: fix heap-use-after-freeMiklos Vajna2-0/+2
PDFDocument::Tokenize() in the aKeyword == "obj" case allocates a PDFObjectElement, stores it as an owning pointer inside rElements, and also stores two non-owning references to it in m_aOffsetObjects and m_aIDObjects. So make sure those 2 other containers are also cleared then elements go away. LO_TRACE="valgrind" bin/run pdfverify <sample> doesn't report errors anymore after the fix. Change-Id: Ie103de3e24a1080257a79e53b994e8536a9597bc Reviewed-on: https://gerrit.libreoffice.org/50627 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-02delete colordata.hxxNoel Grandin1-1/+0
move what we still need into color.hxx Change-Id: Ied7e31eb16468aa334c666b1499a6262f16a6350 Reviewed-on: https://gerrit.libreoffice.org/50561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-02xmlsecurity: create XMLElementWrapper instances with a constructorMiklos Vajna9-56/+25
Change-Id: I0fe7d0a21b0ea35b537466316a637a0a46c52fe5 Reviewed-on: https://gerrit.libreoffice.org/50601 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-01xmlsecurity mscrypt: create XMLSecurityContext instances with a constructorMiklos Vajna4-128/+58
Change-Id: If535e153e587448232bf1451fa159d976e61be37 Reviewed-on: https://gerrit.libreoffice.org/50534 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-02-26convert remaining ErrorBox to weld::MessageDialogCaolán McNamara1-2/+4
and convert remaining QueryBox to weld::MessageDialog Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
2018-02-26xmlsecurity nss: create XMLSecurityContext instances with a constructorMiklos Vajna5-161/+57
Change-Id: I0133469e08b6d48aaf949e928ec4436d309963eb Reviewed-on: https://gerrit.libreoffice.org/50223 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-25convert remaining InfoBox to weld::MessageDialogCaolán McNamara1-5/+9
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8 Reviewed-on: https://gerrit.libreoffice.org/50205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>