summaryrefslogtreecommitdiff
path: root/xmlsecurity
AgeCommit message (Collapse)AuthorFilesLines
2016-08-03masses of MessBoxes not being disposed promptlyCaolán McNamara2-2/+2
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 (cherry picked from commit a860df25dd7bf62ecb6b3d3ed38803b981f56d52) Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f Reviewed-on: https://gerrit.libreoffice.org/27537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-05Certificate viewer dialog can have various kinds of parentsStephan Bergmann1-3/+5
...like the "Security Warning: Domain Name Mismatch" WarnDialog (cf. TITLE_UUI_SSLWARN_DOMAINMISMATCH in uui), not only a CertificateChooser. Regression introduced with c42be58e4c006ab3e1f262b644789cba8659d0ab "Show the certificate use also in the View Certificate dialog", for which this fix is hopefully fine. Change-Id: I6efced1ebaad07c314fe7a5dd1cdc8e91d34555e (cherry picked from commit d746a99558a3f9c8625988ed87264ff12b355859) Reviewed-on: https://gerrit.libreoffice.org/26908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-25(nearly) nothing uses GetUniqueId anymore, so remove it.Caolán McNamara1-2/+0
The odd one out is the usage in Formula, which attempts to restore focus to a particular window identified by an unique id. In this case restore focus by keeping a VclPtr to the desired window. Change-Id: I1dc335325c109d75745c6bba2e12662e6ae50638
2016-05-20Show the certificate use also in the View Certificate dialogTor Lillqvist4-1/+13
Change-Id: I25ba55456be62307348eec529bfd434f8a90bac4
2016-05-20Add SAL_INFOs of the list of system and physical cert storesTor Lillqvist1-0/+70
Change-Id: I5c232e72c4a7fc18bc0f7ea29a9c912bf71284ba
2016-05-19loplugin:stringconstantTor Lillqvist1-1/+1
Change-Id: I30520ef862d5c925d1f5c236fb37aa719005bb49
2016-05-19Add column displaying intended usage to certificate chooserTor Lillqvist3-4/+97
The names for the KeyUsage bits defined in RFC3280 are stored in the .ui file for localisation Change-Id: Ia2cbfd28c8a5df6c94d4926fe98ea7048ff41dde
2016-05-19Make X509Certificate_MSCryptImpl::getCertificateUsage() actually workTor Lillqvist1-7/+26
According to MSDN, calling CryptDecodeObject() with X509_KEY_USAGE fills in a CRYPT_BIT_BLOB struct, not a CERT_KEY_USAGE_RESTRICTION_INFO one. Avoid potential complications of using CRYPT_DECODE_NOCOPY_FLAG. Instead, just follow the normal pattern of first finding out the size of buffer needed, allocate a such buffer, and then call the API again, passing that buffer. When called without CRYPT_DECODE_NOCOPY_FLAG, at least, it's what pbData points to that contains the usage bits, not the pointer value itself. Add SAL_WARNs for cleartext error messages in all error cases. Change-Id: I9b9f7d08d6013753d127c723dedd959109a85c97
2016-05-19clang-tidy misc-unused-alias-declsNoel Grandin4-5/+0
Change-Id: Iabde7a84b9c2758e0d2b2ffe0fb99fcfa51ff124 Reviewed-on: https://gerrit.libreoffice.org/25075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-13clang-tidy modernize-loop-convert in writerfilter to xmlsecurityNoel Grandin2-9/+6
Change-Id: I334411c6b57c028ffb41b5deb72002f9d54038c3 Reviewed-on: https://gerrit.libreoffice.org/24923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-29sw, xmlsecurity: indentation fixesMiklos Vajna1-2/+2
Change-Id: Iafb20132df4aba6b45cf49a7814084f66d087b25
2016-04-28Unit test for tdf#96097: Can't save/pointer nullGuillaume Smaha3-0/+111
Change-Id: I56af30142bba8579ca7f24bbbb2d12390832051b Reviewed-on: https://gerrit.libreoffice.org/24372 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-04-22Avoid reserved identifierStephan Bergmann1-2/+2
Change-Id: I2577b4986f1b033253b368c570507e757893f98c
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann10-22/+22
Change-Id: I96cef821fc1d87963b8928af5dfc8ba97557da74
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