summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-11-30 17:41:25 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-11-30 17:47:31 +0000
commit7226ee0586191a495f427c2adbde68b1a47d2dbc (patch)
tree43918ac9f85b574d9665f00d966b5b2ea2cd2f54 /xmlsecurity
parentbef9ba5e062b340b1835db94620f7ea4fa0b123b (diff)
xmlsecurity: don't write unchanged signatures back to the file
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>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index a3dd54a04318..382c21260319 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -357,7 +357,8 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, SignatureHighlightHdl, SvTreeListBox*,
IMPL_LINK_NOARG(DigitalSignaturesDialog, OKButtonHdl, Button*, void)
{
- maSignatureManager.write(m_bAdESCompliant);
+ if (mbSignaturesChanged)
+ maSignatureManager.write(m_bAdESCompliant);
EndDialog(RET_OK);
}