summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2018-11-26 09:21:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-12-06 11:10:40 +0100
commite5871345dbf77bd09df6dd7bd201d3f9e84e2390 (patch)
tree49d8ab26d4e713e335a2ac0c386295a104769e8b /sfx2/source
parent41f19175c2e4c344c582c8b57a803f5ec4e5aaad (diff)
sfx2: show partial signatures even if cert validation fails
(cherry picked from commit 4a59a8aba8c9d451edff790d9281d0095c1bd78e) Conflicts: xmlsecurity/qa/unit/signing/signing.cxx Change-Id: I6060b7130827346ac5d6955bf38ebe3b476819fd Reviewed-on: https://gerrit.libreoffice.org/64174 Tested-by: Jenkins Reviewed-by: Sophie Gautier <gautier.sophie@gmail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/doc/objserv.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 8267795cc6cd..f69afb5e059e 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1067,6 +1067,10 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
sMessage = SfxResId(STR_SIGNATURE_OK);
aInfoBarType = InfoBarType::Info;
break;
+ case SignatureState::NOTVALIDATED_PARTIAL_OK:
+ sMessage = SfxResId(STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK);
+ aInfoBarType = InfoBarType::Warning;
+ break;
//FIXME SignatureState::Unknown, own message?
default:
break;
@@ -1284,7 +1288,9 @@ SignatureState SfxObjectShell::ImplCheckSignaturesInformation( const uno::Sequen
}
}
- if ( nResult == SignatureState::OK && !bCertValid )
+ if (nResult == SignatureState::OK && !bCertValid && !bCompleteSignature)
+ nResult = SignatureState::NOTVALIDATED_PARTIAL_OK;
+ else if (nResult == SignatureState::OK && !bCertValid)
nResult = SignatureState::NOTVALIDATED;
else if ( nResult == SignatureState::OK && bCertValid && !bCompleteSignature)
nResult = SignatureState::PARTIAL_OK;