summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
AgeCommit message (Collapse)Author
2018-10-01tdf#116085 make sure Certificate Manager is found with GPG4win v3Cor Nouws
Change-Id: I3a7ab7ec046a6bbff4b4a020e76356ffd454bab8 Reviewed-on: https://gerrit.libreoffice.org/61061 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 89a60912bba7ffd6f65ea99f4664f343c5025c95) Reviewed-on: https://gerrit.libreoffice.org/61173 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-07-19xmlsecurity UI: restore lost AdES default for PDF signingMiklos Vajna
Regression from 13596e704e4b48e8b0892867b3f3fc351a2729f9 (Don't pass ODF version, just retrieve it directly, 2018-05-17). Change-Id: Ia031e597c610000db2820920c3dc1b58430dcc12 Reviewed-on: https://gerrit.libreoffice.org/57246 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit a9c0289886ee5519d4a718d8e3145d66b187faac) Reviewed-on: https://gerrit.libreoffice.org/57259 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-06-29tdf#118425 xmlsecurity UI: fix OOXML signingMiklos Vajna
Regression from 13596e704e4b48e8b0892867b3f3fc351a2729f9 (Don't pass ODF version, just retrieve it directly, 2018-05-17), just checking the file format explicitly like the PDF signing does fixes the problem. Change-Id: I1ba7cf9096e01c6c5a2d3875b08fa3a66acae829 Reviewed-on: https://gerrit.libreoffice.org/56635 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 02119ce226ef7c1fcf419aa0933aa95381ee309b) Reviewed-on: https://gerrit.libreoffice.org/56663 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-04-25SvTabListBox::SetTabs, pass count explicitNoel Grandin
passing count as first element in array, dodgy. Change-Id: I49905b554b3b4d6cc3fa419a36389cd2e5ded463
2018-03-27loplugin:expressionalwayszero improvementsNoel Grandin
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-02-26convert remaining ErrorBox to weld::MessageDialogCaolán McNamara
and convert remaining QueryBox to weld::MessageDialog Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
2018-02-25convert remaining InfoBox to weld::MessageDialogCaolán McNamara
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>
2018-02-22weld native message dialogsCaolán McNamara
just the straight-forward MessageDialog cases first a) remove border_width from message dialog .ui so as to take the default border width b) retain 12 as default message dialog border for vcl widget case c) remove layour_style from message dialog button boxes so as to take the default mode (a no-op for vcl widget case) d) use gtk response ids (vcl builder will converts to vcl ones) Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154 Reviewed-on: https://gerrit.libreoffice.org/50143 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-16tdf#115011 don't crash on non-existent gpg supportThorsten Behrens
Change-Id: I90679472898648ccf0811c67c17f7bad41d4e347 Reviewed-on: https://gerrit.libreoffice.org/47984 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-12More loplugin:cstylecast: xmlsecurityStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Ica6e96072435aa4df4e74accdfe06f798a640bbe
2017-12-11loplugin:conststringvar (clang-cl)Stephan Bergmann
Change-Id: Icb0e32716ae58886912a1a1c7c50e66f30256227 Reviewed-on: https://gerrit.libreoffice.org/46202 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-07gpg4libre: permit multi-select encrypt certThorsten Behrens
And pass down all necessary parameters everywhere Change-Id: I152b9d84c0e35be9e5193a9a6f67de9fb86133b0
2017-12-07gpg4libre: find keymanager executable on WindowsThorsten Behrens
Change-Id: If93c06ad90d708b0fbaf476bda6fdb902bd77b1e
2017-10-26vcl: make MapMode constructor explicitMichael Stahl
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-23loplugin:includeform: xmlsecurityStephan Bergmann
Change-Id: I9c3eca51fec52a255fcf280fe4e5ecc2ebbee5f3
2017-09-27loplugin:flatten in vcl..xmlsecurityNoel Grandin
Change-Id: I730fc0b3b6b7ac1803d75b5d9e007b15395888c6 Reviewed-on: https://gerrit.libreoffice.org/42826 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-03gpg4libre: Recycle certificate selection dialog for encryptionKatarina Behrens
Change-Id: I699ecff1f62b3dae7ac275823c6721810589c4cf Reviewed-on: https://gerrit.libreoffice.org/41507 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-10tdf#109046 Show correct signature type for OpenPGPSamuel Mehrbrodt
gpg4libre Change-Id: I9c05f68e16928d14a29058f5bb9aa35c90b8f48b Reviewed-on: https://gerrit.libreoffice.org/39744 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-10Related tdf#108977 Fix crash when vieweing non-existing certificateSamuel Mehrbrodt
gpg4libre Change-Id: If72c2ee818b67b48753ee293de4f02b4832b9d96 Reviewed-on: https://gerrit.libreoffice.org/39743 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-10tdf#108977 Show signature info also for keys we don't have locallySamuel Mehrbrodt
gpg4libre Change-Id: I89593224590007e61bce95c14922c08551282067 Reviewed-on: https://gerrit.libreoffice.org/39742 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-28tdf#108794 gpg4libre: Use key id to get the right keySamuel Mehrbrodt
Change-Id: I5950d192e19e652cbb7680db426bfbd28907a1cb Reviewed-on: https://gerrit.libreoffice.org/39308 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-27gpg4libre: Show message when no cert manager foundSamuel Mehrbrodt
Change-Id: I0da5f20b049ab2d8c992cb2a04dcf544f0b35aa1 Reviewed-on: https://gerrit.libreoffice.org/39289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-06-27gpg4libre: Add seahorse to list of certificate managersSamuel Mehrbrodt
which is the Gnome default app for ḱey management Change-Id: I4c27074f83538640fb1729c5cfddd96981d35f40 Reviewed-on: https://gerrit.libreoffice.org/39288 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-06-27tdf#108711 GPG key selection should only be possible for ODF >= 1.2 documentsSamuel Mehrbrodt
gpg4libre Change-Id: I6dbdaefddacf55c9381d156ada20cb3f25d4b3cb Reviewed-on: https://gerrit.libreoffice.org/39263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-27gpg4libre: Show error message when signing failsSamuel Mehrbrodt
Change-Id: I58f3febaaaaa225952e87ad3f092950ace37d15d Reviewed-on: https://gerrit.libreoffice.org/39283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-23gpg4libre: Warn before removing document signaturesKatarina Behrens
simple version, no "do not show this message again" checkbox Change-Id: Iba8ac8cda51acac748174c864aa5c205f2efcc8f Reviewed-on: https://gerrit.libreoffice.org/38962 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-22xmlsecurity: fix loplugin:passstuffbyref warningsMiklos Vajna
Change-Id: I627abfe33e9c2fc4243276706c1624ce19943678
2017-06-21gpg4libre: some code improvements, add metadata for OpenPGP keysThorsten Behrens
Change-Id: I1beb692b9a9a34b5f0cf743ba9e4a145ac582184
2017-06-21gpg4libre: Make viewing signatures work for gpg signaturesSamuel Mehrbrodt
Change-Id: Ic10846cb87e23ca9ffa0eb0d64c56fcf79c73a9d
2017-06-21gpg4libre: List both (x509 and gpg) existing signaturesSamuel Mehrbrodt
Change-Id: I57ae79f7632885bf5c5aadcad3fb5ad4a5a9413d
2017-06-21gpg4libre: Make signature dialog work with two signing servicesSamuel Mehrbrodt
Change-Id: I0b47e6dba38222bb6b4f778c4206d3b37bc93089
2017-06-21gpg4libre: initial GPG signature validationThorsten Behrens
Change-Id: I80afd77f74a6cb3f3fb7da03a6a4b74b132360d2
2017-06-07gpg4libre: add 'Start certificate manager' buttonKatarina Behrens
Change-Id: Ief3239fd1b3ff1f4e2e95e4413aa9f707f3dfb50 Reviewed-on: https://gerrit.libreoffice.org/36689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-19make string translation loading more uniformCaolán McNamara
change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-07revert OSL_ASSERT changesChris Sherlock
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert xmlsecurity module away from OSL_ASSERT to assertChris Sherlock
Change-Id: Ib5297ceb307e8f8d475b7ff0523e6a57f72434a5
2017-04-28clang-tidy readability-simplify-boolean-exprNoel Grandin
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a Reviewed-on: https://gerrit.libreoffice.org/36450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-03use actual UNO enums in vcl..xmlsecurityNoel Grandin
Change-Id: Id862544f27ebcbe8363f93dc83192d0f0cddb5cc Reviewed-on: https://gerrit.libreoffice.org/36041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-11Fix typosAndrea Gelmini
Change-Id: I23b16792005d66588e3439eb6482adda96c45673 Reviewed-on: https://gerrit.libreoffice.org/35064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-04gpg4libre: List and view GPG keysSamuel Mehrbrodt
* Add GPG implementation of css::xml::crypto UNO interfaces (part of that is only stub atm) * List gpg keys along with other certificates * Viewing gpg certificates: Not all properties are implemented yet Change-Id: I7f60b26efe949a94bf8fe1b8d4d428002c2995b1 Reviewed-on: https://gerrit.libreoffice.org/33843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-02xmlsecurity: avoid using the SerialNumberAdapter wrapperMiklos Vajna
This service is only used in xmlsecurity and it's a wrapper around two free functions in the same module. Change-Id: Ibc5a026b51eda6c2b4b27b7254dedc220dbf909a Reviewed-on: https://gerrit.libreoffice.org/34772 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28loplugin:stringconstant check for unnecessary OUString constructor..Noel Grandin
..calls when creating exceptions Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe Reviewed-on: https://gerrit.libreoffice.org/33617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-21convert VclButtonsType to scoped enumNoel Grandin
Change-Id: I9b91108c18e190060dc71546977aa8a3c11f06e1 Reviewed-on: https://gerrit.libreoffice.org/32285 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
2016-12-07xmlsecurity DigitalSignaturesDialog: show signature type on the UIMiklos Vajna
The code already knew if the signature was AdES-enabled or not, but that info wasn't available on the UI. The values are all names of standards, Andras says it's OK to have them non-translatable. Change-Id: I20baf0871fe2c84b04b7fc64014061e341744db8 Reviewed-on: https://gerrit.libreoffice.org/31718 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-30xmlsecurity: don't write unchanged signatures back to the fileMiklos Vajna
It's not useful, OTOH it can happen that something goes wrong and the result does not match the original. One situation when this can happen is when non-XAdES signatures are read, but the checkbox to write XAdES signature is enabled. Change-Id: Icafad914175b29f7c0245220258bd1420ccd7b9c Reviewed-on: https://gerrit.libreoffice.org/31437 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-16xmlsecurity: fix alignment for XAdES checkboxMiklos Vajna
And rename it to AdES, as the PDF PAdES generation will be affected by this checkbox in the near future. Change-Id: I06121e4eb9debac7a55a737a71780c2fa5c4d084 Reviewed-on: https://gerrit.libreoffice.org/30908 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-11-10More work in progress on XAdES compliant ODF signingTor Lillqvist
Pass an XAdES flag to a couple more functions and adapt to that. Factor out writeDigestMethod() and writeSignedProperties() from OOXMLSecExporter::Impl to DocumentSignatureHelper and use them in an additional place. Write xd:UnsignedProperties with EncapsulatedX509Certificate. Probably much more work needed. Change-Id: I2a0cd1db6dd487b9c7ba256ad29473de3d271cd8
2016-11-08xmlsecurity: move the sec context from the format helpers to the sign managerMiklos Vajna
The signature manager always creates an XML helper, and optionally creates a PDF helper as well. Both of them initialize xmlsec, and when the signature manager is deleted, there are two de-inits, leading to an assertion failure in xmlsec. Fix the problem by moving the duplicated xmlsec init to the signature manager. This has the additional benefit that general security-related code no longer has to talk to the XML helper, it can use the signature manager, which feels more natural. (What viewing a certificate had to do with XML?) Change-Id: If6a6bc433636445f3782849a367d4a7ac0be7688 Reviewed-on: https://gerrit.libreoffice.org/30695 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>