Kaydet (Commit) 8f0e74ed authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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: 's avatarTor Lillqvist <tml@collabora.com>
üst 1c394856
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment