diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-11-02 23:06:26 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-11-03 15:31:22 +0100 |
commit | 8f0e74ed6d363c6eee6874872742721ef8ae4a36 (patch) | |
tree | c058c23f9e33058cbc26fd5b4b01c67b90614d5c | |
parent | 1c39485653d97e26aa3d5b51bf2fd0a1f4e14f0c (diff) |
Handle the case if no digital signature code is implemented (iOS, currently)
Change-Id: I1cf37fccdd3a58d50a015b3fc32c32fba89f2f09
Reviewed-on: https://gerrit.libreoffice.org/62795
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 1a503ca264f3..a22ebdc6087c 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -869,13 +869,20 @@ void SfxDocumentPage::ImplUpdateSignatures() SfxMedium* pMedium = pDoc->GetMedium(); if ( pMedium && !pMedium->GetName().isEmpty() && pMedium->GetStorage().is() ) { - Reference< security::XDocumentDigitalSignatures > xD( - security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext()) ); - + Reference< security::XDocumentDigitalSignatures > xD; + try + { + xD = security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext()); + } + catch ( const css::uno::DeploymentException& ) + { + } OUString s; Sequence< security::DocumentSignatureInformation > aInfos; - aInfos = xD->verifyDocumentContentSignatures( pMedium->GetZipStorageToSign_Impl(), - uno::Reference< io::XInputStream >() ); + + if ( xD.is() ) + aInfos = xD->verifyDocumentContentSignatures( pMedium->GetZipStorageToSign_Impl(), + uno::Reference< io::XInputStream >() ); if ( aInfos.getLength() > 1 ) s = m_aMultiSignedStr; else if ( aInfos.getLength() == 1 ) |