summaryrefslogtreecommitdiff
path: root/xmlsecurity
AgeCommit message (Collapse)AuthorFilesLines
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin1-4/+3
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14clang-tidy performance-unnecessary-value-param in variousNoel Grandin6-14/+14
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907 Reviewed-on: https://gerrit.libreoffice.org/24019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14loplugin:passstuffbyref in variousNoel Grandin1-1/+1
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-13tdf#94306 remove unused boost dependenciesJochen Nitschke1-1/+0
remove <boost/noncopyable.hpp> in pch and remove boost from makefile if it was the only boost entry. Change-Id: Icb945ae59c137571f4f63807601738eea5c3e831 Reviewed-on: https://gerrit.libreoffice.org/24061 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-13tdf#94306 replace boost::noncopyable in stoc to xmlsec..Jochen Nitschke1-3/+3
Replace with C++11 delete copy-constructur and copy-assignment. Remove boost/noncopyable.hpp includes. Add missing default ctors. With this commit there should be no users of boost::noncopyable left. Change-Id: I6b1e47824912a6a80cc3f00f34938ebc048d8975 Reviewed-on: https://gerrit.libreoffice.org/24051 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-12Avoid reserved identifiersStephan Bergmann3-7/+7
Change-Id: I6075ee18168f19e73c415bf4f0c3423b7a489175
2016-04-12Remove unused _USECOMPRESSEDDOCUMENTHANDLERStephan Bergmann1-24/+4
...introduced with 9f34fde7a8750b856570b5e855d2ecb226bf0c23 "libxmlsec" but always unconditionally defined. Fix some indentation. Change-Id: Ib46d4d7153d84975e9bcd8351779634f8d43240c
2016-04-06-Werror,-Winconsistent-missing-overrideStephan Bergmann1-18/+18
Change-Id: I9e6a44fb54484aebc3f223b3c71d2de18bb5d553
2016-04-04Use std::size_tMiklos Vajna2-18/+18
And include <cstddef> where necessary. Change-Id: Icc1208528d6a8b04375d55ccbf3cd6ef046b454f Reviewed-on: https://gerrit.libreoffice.org/23796 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-02cleanup: remove unused Reference.h(xx) includesJochen Nitschke3-3/+0
and unused using-declarations from Reference.h Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19 Reviewed-on: https://gerrit.libreoffice.org/23735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-03-31Typo in HAVE_BROKEN_STATIC_INITILIZER_LISTStephan Bergmann1-2/+2
Change-Id: Ia29868d1832b529d438a5a5448b751683c226846
2016-03-31tdf#97525 vcl: make DeletionListener internalJochen Nitschke1-1/+0
move include/vcl/impdel.hxx to vcl/inc/ include impdel.hxx in salframe.hxx remove vcl/impdel.hxx includes in pch add missing <list> includes Change-Id: Id146363b2e20ce0238542929c26a83efb1e8c4bd Reviewed-on: https://gerrit.libreoffice.org/23664 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-24xmlsecurity: fix Windows XP buildMiklos Vajna1-0/+5
xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx(511) : error C2065: ´CERT_SHA256_HASH_PROP_ID´ : undeclared identifier Change-Id: I644d6797d81a506ca9b91d83eead16503af93905 Reviewed-on: https://gerrit.libreoffice.org/23494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-03-16CppunitTest_xmlsecurity_signing: fix typo in testODFBroken()Miklos Vajna1-1/+1
On a system where the certificate can be validated, the expected result is OK, not PARTIAL_OK (copy&paste problem from OOXML). Change-Id: I1b52921498de24c9a14a780bf48b791ec1e0c706
2016-03-15Re-introduce two lines apparently accidentally removed yesterdayTor Lillqvist1-0/+3
... in 43d57d105d2acf97e79e90f8d640923b91ac64a8. Change-Id: I07a1b9cb4edb34558c1b4aaf56a01b635de49f65
2016-03-14com::sun::star->css in xmlsecurity/Noel Grandin78-1260/+1156
Change-Id: I4b89f97671ab526e5731d2f1f99802e23f3fd4b5
2016-03-11xmlsecurity: extract OOXML export code into its own classMiklos Vajna4-362/+545
It was odd that import code had its own OOXMLSecParser, but export code was buried in the controller. Change-Id: Ie1964bf9c54a8b779981e8d72bf4810090cf960c
2016-03-11CppunitTest_xmlsecurity_signing: add ODF verification testcasesMiklos Vajna3-0/+34
Change-Id: I08734b7841fc83b327ebbf5c8ae43f7969e94e12
2016-03-11tdf#97966: Remove 'static' keywordsWastack1-1/+1
Change-Id: Id70f9e55fb4ad7d3a501399b055208ea10369c82 Reviewed-on: https://gerrit.libreoffice.org/23131 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-11xmlsecurity: add missing CSP switch to certificate generator scriptMiklos Vajna1-1/+2
Without this the generated .p12 test file can't be used for SHA2 signing on Windows, as xmlsec.git's README points out. Change-Id: Ib97a337eca3b92dde5e0ccadee7420c492a8971c
2016-03-11xmlsecurity: clean up no longer relevant email addressesMiklos Vajna29-717/+0
Change-Id: I224a0914bd3506b4e2ce057c53838ec78187b060
2016-03-10Extract Directories from BootstrapFixtureBaseStephan Bergmann1-6/+6
(as some tests derive from the latter only for the Directories part, not for the setUp/tearDown overrides: those tests will be cleaned up next) Change-Id: Ib6b78eea868b8bc21d4cc6e8fd9e1d025deca05f Reviewed-on: https://gerrit.libreoffice.org/23078 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-09Indentation fixesMiklos Vajna1-2/+2
Change-Id: I536ab12cfedb6dae605af2f29a7a9b34fad06ba0
2016-03-08new loplugin:constantparamNoel Grandin2-13/+5
finds parameters that are only ever being called with a single value Change-Id: Ibd0c9b6e6dbc1d1b5d5a005eaa19959560a6e50f
2016-03-07xmlsecurity: check that osl::File::copy actually succeedsMichael Stahl1-2/+4
... which it doesn't, currently. Change-Id: I0280a11006afb08b95ff643e8b999b4e5a733d2d
2016-03-07xmlsecurity: default to OK instead of Cancel in CertificateChooserMiklos Vajna1-2/+2
Change-Id: I2dd2d2caf772cf5a0e564367acff0c5522b2c286
2016-03-07CppunitTest_xmlsecurity_signing: add remove all testcaseMiklos Vajna1-0/+46
Fails without the previous commit. Change-Id: I7606b9a5ef3509077b1a3a6e884f0e2bb4c79614
2016-03-07xmlsecurity OOXML export: remove signature content types when removing ...Miklos Vajna1-3/+1
... signatures. ExportSignatureContentTypes() was already a "remove all, and then re-add necessary entries" operation, so just make sure we still call it for zero signatures and it'll do the right thing. Change-Id: If9182b39ac6d8f2cf66f33a02d9ddcab170ba5ea
2016-03-07CppunitTest_xmlsecurity_signing: avoid modifying tracked test documentMiklos Vajna1-1/+6
Without this, running the test modified xmlsecurity/qa/unit/signing/data/partial.docx. Change-Id: I3dd5cb6c90037fce0c550be9b1c189959b848ebe
2016-03-07xmlsecurity OOXML export: remove signature storage with the last signatureMiklos Vajna1-1/+4
So that no empty _xmlsignatures directory is left around after removing signatures. Change-Id: I3af77ba943a483a009a4eebaf40a58404f479e5a
2016-03-07xmlsecurity OOXML export: remove signature relation with the last signatureMiklos Vajna3-11/+35
The signature relation refers to _xmlsignatures/origin.sigs, but that's not written when all signatures are removed. Change-Id: I5ee1c8849962cba4b338e6f43243bcf89aedad36
2016-03-07xmlsecurity OOXML export: don't write signature relations when all ...Miklos Vajna2-3/+12
... signatures are removed. With this, the _xmlsignatures/ sub-storage inside the document is empty when all signatures are removed. Change-Id: I391bd1d3b6fdb724952a7158a043b1e602d532a9
2016-03-07xmlsecurity: extract final signature export logic from DigitalSignaturesDialogMiklos Vajna3-50/+48
To be able to unit-test this later without creating a vcl dialog. Change-Id: I4794e212ffefc2efa3bddaf58e6c6bf2a4ea8d9a
2016-03-07tdf#97703 removed empty setUp/tearDown methodsChirag Manwani1-10/+0
Change-Id: I244d481bce4723d172e26c0d31aab0a541334604 Reviewed-on: https://gerrit.libreoffice.org/22959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-04CppunitTest_xmlsecurity_signing: add signature removal testcaseMiklos Vajna2-0/+28
Fails with the previous commit reverted. Change-Id: I050a03fa923980e46b31eff457d0b83f6c38ceaf
2016-03-04xmlsecurity OOXML export: handle keeping all signatures but oneMiklos Vajna2-8/+37
The removal of the _xmlsignatures sub-storage in DocumentSignatureHelper::OpenSignatureStream() serves 3 purposes: 1) Remove no longer needed signature streams 2) Truncate signatures relation stream 3) Truncate still needed signature streams 2) and 3) could be done using io::XTruncate as well, but if the whole storage is removed to handle 1), then individual truncate() calls are not necessary. Change-Id: Id9ed9c87c94f340dc947124b28f085561798d361
2016-03-04xmlsecurity: extract signature removal logic from DigitalSignaturesDialogMiklos Vajna3-17/+20
So that it'll be possible to call that code without an active dialog, from a headless unit test. Change-Id: I1728a666ff5d84b337efd7e2b7eb68469896257a
2016-03-04CppunitTest_xmlsecurity_signing: add signature append testcaseMiklos Vajna1-1/+30
Fails with e.g. commit 963264a417ce807201f0021fc6000ce7d6cf0245 (xmlsecurity OOXML export: don't loose old signatures when adding a new one, 2016-03-03) reverted. Change-Id: Ia2b0f3d8914bca14075481f5ac8cd4c0033d26c1
2016-03-04xmlsecurity OOXML export: only cache existing signatures, not our temp. oneMiklos Vajna6-21/+30
When adding a signature, first we export it to a temp. storage, then read it back, show the verification to the user, and then later we do or do not write the temp. storage back to the original one. This means the signature gets exported two times, and MSO only considers the final result valid. So when caching signatures (to avoid a real export based on our data model), don't cache the one we just added to the temp. storage, but do a real export second time as well. With this, MSO considers our appended signature (next to an existing one) valid, too. Change-Id: I4d615298463e037ea4e654ff5c3addcef8b0a094
2016-03-04xmlsecurity OOXML export: fix appending new signatures next to existing onesMiklos Vajna4-6/+42
We append a new signature to a document by re-exporting the existing ones, then writing the new signature. Given that existing signatures aren't canonicalized before hashing, write them back as-is. With this, our own signature verification is happy about the export result, containing an existing and a newly created signature. Change-Id: I0ff57a2266c6070a945f0c45ca5793406678be60
2016-03-03xmlsecurity OOXML export: don't attempt to sign other signaturesMiklos Vajna1-1/+3
For one, MSO doesn't do that either by default. For another, this would currently result in a io::IOException, because: - the root storage is opened read-write, to be able to add the signature - then _xmlsignatures/newsig is opened read-write to be able to write the signature - opening _xmlsignatures/something as read-only still opens the _xmlsignatures storage as read-write -> boom, we tried to open the same sub-storage read-write two times, OStorage::openStorageElement() detects that Change-Id: I2b90dc044bcfb835df4f19a339a0447e69f42975
2016-03-03xmlsecurity OOXML export: don't loose old signatures when adding a new oneMiklos Vajna1-0/+4
With this, at least we don't completely throw away existing signatures. The roundtrip of them isn't perfect yet, though. Change-Id: Ibc3408364403a057169e384902afe13b1e397480
2016-03-03xmlsecurity: avoid calculating the certificate digest late in XSecControllerMiklos Vajna6-26/+31
Every other aspect of the certificate is calculated earlier in DocumentSignatureManager, so calculate the digest there as well. Change-Id: Icd97f3ecb084bbce60fcdfa496b6aaf0ac75026d
2016-03-01Exclude xmlsec headers from precompiled headersAshod Nakashian2-3/+6
Internal headers should not be exposed, rather xmlsec-wrapper.h should be used. Unfortunately, the latter causes undefined symbols on Linux when pch is enabled. Change-Id: Id68f1cde5090f1a8ba9530894e08edbeb3ad4165 Reviewed-on: https://gerrit.libreoffice.org/22811 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-02-29XMLSEC_NO_SIZE_T is /not/ used with MSVCStephan Bergmann2-12/+3
...where external/libxmlsec/ExternalProject_xmlsec.mk uses win32/configure.js instead of configure. But that inconsistency generally got hidden on Windows by xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx including the raw xmlsec include files instead of xmlsecurity/xmlsec-wrapper.h, so only gets noticed when using --disable-pch (as is needed when building with clang-cl). TODO: Don't know how to fix bin/update_pch so that precompiled_xsec_xmlsec.hxx doesn't get broken again on the next update. Change-Id: If385066a1e0f949d943aab7e9a5e969fbf0d0794
2016-02-29sfx2 classification: don't sort items on the toolbar listboxMiklos Vajna1-1/+1
Assuming the policy follows a least-confidential -> most-confidential order, doing a lexicographical sort on the category names does more harm than good. So use a vector instead of a name-indexed map for categories. Also, don't duplicate the label map for the current state, but just store the state in the same category structure that is used for other (currently not used) categories as well. Change-Id: I1672192e572abfc22b6aeeb152ee7484086cea91
2016-02-26Spurious "typename"Stephan Bergmann1-2/+1
Change-Id: Ic6e31ba0c542f0347b95f3930a13670acbc4f61f
2016-02-26-Werror,-Winconsistent-missing-overrideStephan Bergmann1-18/+18
Change-Id: I1da31c370ce60ce107f70e9d8767af04297defca
2016-02-26Improve failure outputStephan Bergmann1-2/+12
Change-Id: Ia542ab0644611ff8e36c8b52138e1ef064972606
2016-02-24convert DocPasswordRequestType to scoped enumNoel Grandin1-1/+1
Change-Id: I25d217ca2cf3e8cc4dfaccc6dc7d5453ffdc6cb6