Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
6861a8ee
Kaydet (Commit)
6861a8ee
authored
Ock 12, 2016
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmlsecurity: handle no META-INF in DocumentSignatureHelper
Change-Id: I7e0ac2d43e97fe9cb67a58c8dd8d83c1068f501d
üst
1d436cdb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
documentsignaturehelper.cxx
xmlsecurity/source/helper/documentsignaturehelper.cxx
+26
-18
No files found.
xmlsecurity/source/helper/documentsignaturehelper.cxx
Dosyayı görüntüle @
6861a8ee
...
...
@@ -32,6 +32,7 @@
#include <osl/diagnose.h>
#include <rtl/uri.hxx>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
uno
;
namespace
...
...
@@ -300,27 +301,34 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream(
SignatureStreamHelper
aHelper
;
try
uno
::
Reference
<
container
::
XNameAccess
>
xNameAccess
(
rxStore
,
uno
::
UNO_QUERY
);
if
(
!
xNameAccess
.
is
())
return
aHelper
;
if
(
xNameAccess
->
hasByName
(
"META-INF"
))
{
OUString
aSIGStoreName
(
"META-INF"
);
aHelper
.
xSignatureStorage
=
rxStore
->
openStorageElement
(
aSIGStoreName
,
nSubStorageOpenMode
);
if
(
aHelper
.
xSignatureStorage
.
is
()
)
try
{
OUString
aSIGStreamName
;
if
(
eDocSigMode
==
SignatureModeDocumentContent
)
aSIGStreamName
=
DocumentSignatureHelper
::
GetDocumentContentSignatureDefaultStreamName
();
else
if
(
eDocSigMode
==
SignatureModeMacros
)
aSIGStreamName
=
DocumentSignatureHelper
::
GetScriptingContentSignatureDefaultStreamName
();
else
aSIGStreamName
=
DocumentSignatureHelper
::
GetPackageSignatureDefaultStreamName
();
aHelper
.
xSignatureStream
=
aHelper
.
xSignatureStorage
->
openStreamElement
(
aSIGStreamName
,
nOpenMode
);
OUString
aSIGStoreName
(
"META-INF"
);
aHelper
.
xSignatureStorage
=
rxStore
->
openStorageElement
(
aSIGStoreName
,
nSubStorageOpenMode
);
if
(
aHelper
.
xSignatureStorage
.
is
()
)
{
OUString
aSIGStreamName
;
if
(
eDocSigMode
==
SignatureModeDocumentContent
)
aSIGStreamName
=
DocumentSignatureHelper
::
GetDocumentContentSignatureDefaultStreamName
();
else
if
(
eDocSigMode
==
SignatureModeMacros
)
aSIGStreamName
=
DocumentSignatureHelper
::
GetScriptingContentSignatureDefaultStreamName
();
else
aSIGStreamName
=
DocumentSignatureHelper
::
GetPackageSignatureDefaultStreamName
();
aHelper
.
xSignatureStream
=
aHelper
.
xSignatureStorage
->
openStreamElement
(
aSIGStreamName
,
nOpenMode
);
}
}
catch
(
css
::
io
::
IOException
&
)
{
// Doesn't have to exist...
DBG_ASSERT
(
nOpenMode
==
css
::
embed
::
ElementModes
::
READ
,
"Error creating signature stream..."
);
}
}
catch
(
css
::
io
::
IOException
&
)
{
// Doesn't have to exist...
DBG_ASSERT
(
nOpenMode
==
css
::
embed
::
ElementModes
::
READ
,
"Error creating signature stream..."
);
}
return
aHelper
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment