summaryrefslogtreecommitdiff
path: root/xmlsecurity
AgeCommit message (Collapse)Author
2019-04-21Properly initialize gpgme-w32spawn.exe path on WindowsMike Kaganski
On Windows, gpgme expects gpgme-w32spawn.exe to be in the same directory as the current process executable. This assumption might be wrong, e.g., for bundled python, which is in instdir/program/python-core-x.y.z/bin, while gpgme-w32spawn.exe is in instdir/program. In this case, if an operation in a python script requires initializing gpgme, it will be interrupted by a modal warning box telling that gpgme-w32spawn.exe was not found. If we can't find gpgme-w32spawn.exe in the current executable location, then try to find the spawn executable, and inform gpgme about actual location using gpgme_set_global_flag. Change-Id: Ie30a0d4a6666767e8c54f1bdc67b67570d6ea47a Reviewed-on: https://gerrit.libreoffice.org/71014 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-15loplugin:sequentialassign in writerfilter..xmlsecurityNoel Grandin
Change-Id: I41028c704eca08b71746c3c87e38926b95449775 Reviewed-on: https://gerrit.libreoffice.org/70735 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-15improve loplugin simplifyconstructNoel Grandin
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-13use more std::make_uniqueNoel Grandin
Change-Id: I7d85cbc9105c5e0c4a8d9a69c4ac9d6dfc07eabd Reviewed-on: https://gerrit.libreoffice.org/70663 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-09tdf#123747 xmlsecurity, ODF sign roundtrip: preserve invalid reference typeMiklos Vajna
Only add the correct type to new signatures to avoid breaking the hash of old ones. Change-Id: I30f892b292f84a0575a3d4ef5ccf3eddbe0090ca Reviewed-on: https://gerrit.libreoffice.org/70424 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-01tdf#42949 Fix IWYU warnings in include/sfx2/[sS]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4a3baffa8944b522b16b50975185759081662020 Reviewed-on: https://gerrit.libreoffice.org/69945 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-16weld SwEditRegionDlgCaolán McNamara
Change-Id: I6aacd013a344caa731841ff4f015017ba16c4aca Reviewed-on: https://gerrit.libreoffice.org/69325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-16clarify that set_visible(true/false) is just show/hideCaolán McNamara
ditch duplicate method Change-Id: Iea35d6437f48809a06e093241bddf301f00c502b Reviewed-on: https://gerrit.libreoffice.org/69302 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-07build: support disabling popplerAshod Nakashian
This adds --enable-poppler configure option. Poppler can be enabled/disabled by setting this parameter to yes or no. Change-Id: I42ba2d27de7b5014d28523394310616d20073b71 Reviewed-on: https://gerrit.libreoffice.org/68602 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/68842 Tested-by: Jenkins
2019-03-07log nice exception messages whereever possibleNoel Grandin
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05Introduce o3tl::underlyingEnumValueStephan Bergmann
Change-Id: I6554eb86326159b0da707539f45c411f61c0f3de Reviewed-on: https://gerrit.libreoffice.org/68761 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-26loplugin:indentation (clang-cl)Stephan Bergmann
Change-Id: I94689e4eed290b4505d2caba2d9802ef7fb6cffd Reviewed-on: https://gerrit.libreoffice.org/68378 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-25loplugin:unusedmethodsNoel Grandin
Change-Id: I085394e0f4b780dc5b376d5ac0e9d761434e3ead Reviewed-on: https://gerrit.libreoffice.org/68301 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-21loplugin:unusedfields in xmlhelp,xmlsecurityNoel Grandin
Change-Id: Id3858365a54e6ae96bf9e6c3e27a777441ab56ae Reviewed-on: https://gerrit.libreoffice.org/68133 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-19weld ChineseDictionaryDialogCaolán McNamara
and ChineseTranslationDialog Change-Id: I3b754c405c8379fc0c5fa94437cc0464a1dea999 Reviewed-on: https://gerrit.libreoffice.org/67991 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-14drop unneeded vcl includes, update pchCaolán McNamara
Change-Id: Idd2c4a812a9415c816427f8566d9e7159b4dd2a6 Reviewed-on: https://gerrit.libreoffice.org/67806 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-14weld MacroSecurity clusterCaolán McNamara
MacroSecurity, MacroSecurityLevelTP and MacroSecurityTrustedSourcesTP Change-Id: I0c3494a051cdac2723710484d5e00146d3f3dfe7 Reviewed-on: https://gerrit.libreoffice.org/67797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-14weld DigitalSignaturesDialogCaolán McNamara
Change-Id: I197f4805558b07aeb9e66734d0fb5c250c41ad3e Reviewed-on: https://gerrit.libreoffice.org/67796 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-14weld CertificateChooserCaolán McNamara
Change-Id: I46087a58d5cff7ea8ac86ef8ee670cc4a59d0120 Reviewed-on: https://gerrit.libreoffice.org/67795 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-14[API CHANGE] add setParentWindow to XDocumentDigitalSignaturesCaolán McNamara
so we can specify which window modal dialogs are modal to Change-Id: I7cd7348b5cd0f55d698553f313f745d5e0d6389d Reviewed-on: https://gerrit.libreoffice.org/67765 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-13weld CertificateViewer clusterCaolán McNamara
CertificateViewer, CertificateViewerGeneralTP, CertificateViewerDetailsTP, CertificateViewerCertPathTP Change-Id: I5792b673f17b3cd465ff17444776066139877ec1 Reviewed-on: https://gerrit.libreoffice.org/67756 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-13Pointer is pointlessNoel Grandin
since it is just a wrapper around PointerStyle Change-Id: I51f065e0d4ad8bd91f5c84c5819048c720a19267 Reviewed-on: https://gerrit.libreoffice.org/67711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-12tdf#120703 PVS: remove redundant static castsMike Kaganski
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I5fee1c4bebd1972fbb5e43da37149d4e2ff6ce0d Reviewed-on: https://gerrit.libreoffice.org/67664 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11new loplugin indentationNoel Grandin
look for mixed indentation in compound statements, which makes them hard to read, and sometimes makes it look like a statement is associated with a nearby if/for Change-Id: Ic8429cee1f9a86d938097a4a8769a2bce97b3361 Reviewed-on: https://gerrit.libreoffice.org/63283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-05tdf#42949 Fix IWYU warnings in include/svtools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I937ed12f2a96943664087ddcdd035f1347e84a57 Reviewed-on: https://gerrit.libreoffice.org/67102 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-18CppunitTest_xmlsecurity_pdfsigning: use CPPUNIT_TEST_FIXTURE()Miklos Vajna
Change-Id: Ia1ed6989737b765f2e4332f402fb5c11ef7f0f31 Reviewed-on: https://gerrit.libreoffice.org/66553 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-13Avoid OUString temporaries, simplifyMatteo Casalin
Change-Id: I85b3cc9684673a204c3bf7428940d8efb8082fb6 Reviewed-on: https://gerrit.libreoffice.org/66223 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-11o3tl::make_unique -> std::make_unique in xmlsecurity/Gabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ie15220b53c6687e1d4891df668b2dedeae5e4750 Reviewed-on: https://gerrit.libreoffice.org/65795 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-09CppunitTest_xmlsecurity_signing: use CPPUNIT_TEST_FIXTURE()Miklos Vajna
Change-Id: I3e6c7f5af6edb1c7ae4867aa46f56fec695e5bcf Reviewed-on: https://gerrit.libreoffice.org/65984 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-07Fix typoAndrea Gelmini
Change-Id: If1559d3ea1205c314f25c6d346fe344adebe7f96 Reviewed-on: https://gerrit.libreoffice.org/65915 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-31NSS: create a temporary database instead of in-memoryTomaž Vajngerl
When initializing for the in-memory database (NSS_NoDB_Init) the internal slot is read-only so a lot of actions (PK11_ImportCert) fails. Instead of that we create a new cert/key database inside the tmp directory and delete it on exit. This way there are no limitations and all the actions perform as expected. Change-Id: Iadec5dd8f3459be56ba57d077057eacf3e0797fc Reviewed-on: https://gerrit.libreoffice.org/65765 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-12-31Remove some useless whitespacesTomaž Vajngerl
Change-Id: Iebf7add3dd937afb6dad07a10ecbe768c0a79d36 Reviewed-on: https://gerrit.libreoffice.org/65764 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-12-30Fix typo in codeAndrea Gelmini
Change-Id: I671749843ee14b18c4786a132ca9c6ad30efc625 Reviewed-on: https://gerrit.libreoffice.org/65732 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-24Fix signing empty Configurations2/accelerator/current.xmlTomaž Vajngerl
When determining if a file is an XML file for siging, we need to read the manifest file to get an accurate detection. In case when we were signing in the GUI the manifest file was read when the storage was set. When we didn't sign over the GUI, the manifest was never read: the code was only present in the GUI code - "documentsignaturesdialog.cxx" so the detection was wrong and isXML returned "true" for current.xml. With this we move the manifest reading to DigitalSignatureManager, where the manifest is read when needed. Change-Id: If45a32af6410bc5f7c5afdb976b182bd69ab7d6b Reviewed-on: https://gerrit.libreoffice.org/65600 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-12-20tdf#42949 Fix IWYU warnings in include/vcl/[t-u]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib32ea54a3fa690a0722fa75ddb4121ec78c0b64f Reviewed-on: https://gerrit.libreoffice.org/65386 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-13Library_xsec_xmlsec: one dll implementation macro is enoughMiklos Vajna
Change-Id: Ie6111c5e29d2fb6d2857c0c51d84b5b720713260 Reviewed-on: https://gerrit.libreoffice.org/65064 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-08use Image(OUString) instead of Image(Bitmap(OUString))Noel Grandin
which benefits LOOL since we can delay creating the image until we know the dpi setting of the display we are going to write to. Achieved by perl -pi -w -e "s/\bImage\s*\(\s*BitmapEx\s*\((\w+)\s*\)\s*\)/Image\(\1\)/g" $( git grep -lw "BitmapEx" ) followed by git grep -nP '\bImage\s*\(\s*BitmapEx\s*\(' followed by commenting out the BitmapEx(OUString) constructor and seeing what needed adjusting. Change-Id: I3224e11937d720fa484b0d659d25673a9e809267 Reviewed-on: https://gerrit.libreoffice.org/64760 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-12-04tdf#118373 xmlsecurity: avoid stderr output on libxmlsec version checkMiklos Vajna
Make sure that our normal SAL_WARN() reporting is registered during the xmlSecCheckVersionExt() invocation, just like it's registered during other libxmlsec API calls. Change-Id: Ia19368b55dbae47974f48954f86b50e36d1462ff Reviewed-on: https://gerrit.libreoffice.org/64550 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2018-12-01convert to range forTomaž Vajngerl
Change-Id: I3558010129eaafdab94ca3f8a63abeda32318fbb Reviewed-on: https://gerrit.libreoffice.org/64336 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-12-01xmlsecurity: clean-up code a bitTomaž Vajngerl
Change-Id: I4a43f1f33f73919f56150310e7d05244d81b7510 Reviewed-on: https://gerrit.libreoffice.org/64294 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29remove unnecessary "if (!empty()" checks before loopsNoel Grandin
found with git grep -n -A4 'if.*!.*empty' | grep -B3 -P '(\bfor)|(\bwhile)|(\bdo)' Change-Id: I582235b7cf977a0f9fb4099eb306fdb4a07b5334 Reviewed-on: https://gerrit.libreoffice.org/64169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-28Fix typosAndrea Gelmini
Change-Id: I66f31ff16a5cd5d8fca7e920fdd6b77bb124dfbb Reviewed-on: https://gerrit.libreoffice.org/63321 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-11-28drop some unnecessary includesCaolán McNamara
Change-Id: I474b5762e6a07982fddc0315a67181399ea4c30e Reviewed-on: https://gerrit.libreoffice.org/64156 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-26sfx2: show partial signatures even if cert validation failsMiklos Vajna
Change-Id: I6060b7130827346ac5d6955bf38ebe3b476819fd Reviewed-on: https://gerrit.libreoffice.org/64022 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-21weld SwCondCollPageCaolán McNamara
and put back original SvTreeListBox a11y factory use Change-Id: I4ad8ce29d8fed6ec5d44e9a1d641919a89226b79 Reviewed-on: https://gerrit.libreoffice.org/63501 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-19weld TreeViewCaolán McNamara
a) use GtkTreeStores for GtkTreeViews b) ironically can't store GtkTreeStore contents in .ui apparently c) set show_expanders for all non-trees and unconverted cases d) on-demand subtrees Change-Id: I3c1036a222daba2c129b1a22ffeb3fe35005ae31 Reviewed-on: https://gerrit.libreoffice.org/63336 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-17Adapt to C++2a char_tStephan Bergmann
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-16loplugin:staticmethods improvementNoel Grandin
Change-Id: I8889ce8a7d2309b54454cfe4c6421282e1c6e755 Reviewed-on: https://gerrit.libreoffice.org/63434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>