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
ee2b08ed
Kaydet (Commit)
ee2b08ed
authored
Ock 05, 2016
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmlsecurity: convert TYPE_...__REFERENCE constants to scoped enum
Change-Id: Ic2248b3bc6460e65bdf4eb30af4f8893a7f0e68d
üst
9adca57f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
16 deletions
+19
-16
sigstruct.hxx
xmlsecurity/inc/xmlsecurity/sigstruct.hxx
+8
-5
documentsignaturehelper.cxx
xmlsecurity/source/helper/documentsignaturehelper.cxx
+2
-2
xsecctl.cxx
xmlsecurity/source/helper/xsecctl.cxx
+2
-2
xsecctl.hxx
xmlsecurity/source/helper/xsecctl.hxx
+1
-1
xsecsign.cxx
xmlsecurity/source/helper/xsecsign.cxx
+3
-3
xsecverify.cxx
xmlsecurity/source/helper/xsecverify.cxx
+3
-3
No files found.
xmlsecurity/inc/xmlsecurity/sigstruct.hxx
Dosyayı görüntüle @
ee2b08ed
...
...
@@ -29,17 +29,20 @@
/*
* type of reference
*/
#define TYPE_SAMEDOCUMENT_REFERENCE 1
#define TYPE_BINARYSTREAM_REFERENCE 2
#define TYPE_XMLSTREAM_REFERENCE 3
enum
class
SignatureReferenceType
{
SAMEDOCUMENT
=
1
,
BINARYSTREAM
=
2
,
XMLSTREAM
=
3
};
struct
SignatureReferenceInformation
{
sal_Int32
nType
;
SignatureReferenceType
nType
;
OUString
ouURI
;
OUString
ouDigestValue
;
SignatureReferenceInformation
(
sal_Int32
type
,
const
OUString
&
uri
)
SignatureReferenceInformation
(
SignatureReferenceType
type
,
const
OUString
&
uri
)
{
nType
=
type
;
ouURI
=
uri
;
...
...
xmlsecurity/source/helper/documentsignaturehelper.cxx
Dosyayı görüntüle @
ee2b08ed
...
...
@@ -341,8 +341,8 @@ bool DocumentSignatureHelper::checkIfAllFilesAreSigned(
for
(
int
i
=
sigInfo
.
vSignatureReferenceInfors
.
size
();
i
;
)
{
const
SignatureReferenceInformation
&
rInf
=
sigInfo
.
vSignatureReferenceInfors
[
--
i
];
// There is also an extra entry of type
TYPE_SAMEDOCUMENT_REFERENCE
because of signature date.
if
(
(
rInf
.
nType
==
TYPE_BINARYSTREAM_REFERENCE
)
||
(
rInf
.
nType
==
TYPE_XMLSTREAM_REFERENCE
)
)
// There is also an extra entry of type
SignatureReferenceType::SAMEDOCUMENT
because of signature date.
if
(
(
rInf
.
nType
==
SignatureReferenceType
::
BINARYSTREAM
)
||
(
rInf
.
nType
==
SignatureReferenceType
::
XMLSTREAM
)
)
{
OUString
sReferenceURI
=
rInf
.
ouURI
;
if
(
alg
==
OOo2Document
)
...
...
xmlsecurity/source/helper/xsecctl.cxx
Dosyayı görüntüle @
ee2b08ed
...
...
@@ -778,7 +778,7 @@ void XSecController::exportSignature(
const
SignatureReferenceInformation
&
refInfor
=
vReferenceInfors
[
j
];
pAttributeList
=
new
SvXMLAttributeList
();
if
(
refInfor
.
nType
!=
TYPE_SAMEDOCUMENT_REFERENCE
)
if
(
refInfor
.
nType
!=
SignatureReferenceType
::
SAMEDOCUMENT
)
/*
* stream reference
*/
...
...
@@ -800,7 +800,7 @@ void XSecController::exportSignature(
xDocumentHandler
->
startElement
(
tag_Reference
,
cssu
::
Reference
<
cssxs
::
XAttributeList
>
(
pAttributeList
)
);
{
/* Write Transforms element */
if
(
refInfor
.
nType
==
TYPE_XMLSTREAM_REFERENCE
)
if
(
refInfor
.
nType
==
SignatureReferenceType
::
XMLSTREAM
)
/*
* xml stream, so c14n transform is needed
*/
...
...
xmlsecurity/source/helper/xsecctl.hxx
Dosyayı görüntüle @
ee2b08ed
...
...
@@ -130,7 +130,7 @@ public:
xReferenceResolvedListener
=
xListener
;
}
void
addReference
(
sal_Int32
type
,
const
OUString
&
uri
,
sal_Int32
keeperId
)
void
addReference
(
SignatureReferenceType
type
,
const
OUString
&
uri
,
sal_Int32
keeperId
)
{
signatureInfor
.
vSignatureReferenceInfors
.
push_back
(
SignatureReferenceInformation
(
type
,
uri
));
...
...
xmlsecurity/source/helper/xsecsign.cxx
Dosyayı görüntüle @
ee2b08ed
...
...
@@ -165,14 +165,14 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
internalSignatureInfor
.
signatureInfor
.
ouSignatureId
=
createId
();
internalSignatureInfor
.
signatureInfor
.
ouPropertyId
=
createId
();
internalSignatureInfor
.
addReference
(
TYPE_SAMEDOCUMENT_REFERENCE
,
internalSignatureInfor
.
signatureInfor
.
ouPropertyId
,
-
1
);
internalSignatureInfor
.
addReference
(
SignatureReferenceType
::
SAMEDOCUMENT
,
internalSignatureInfor
.
signatureInfor
.
ouPropertyId
,
-
1
);
size
++
;
if
(
!
internalSignatureInfor
.
signatureInfor
.
ouDescription
.
isEmpty
())
{
// Only mention the hash of the description in the signature if it's non-empty.
internalSignatureInfor
.
signatureInfor
.
ouDescriptionPropertyId
=
createId
();
internalSignatureInfor
.
addReference
(
TYPE_SAMEDOCUMENT_REFERENCE
,
internalSignatureInfor
.
signatureInfor
.
ouDescriptionPropertyId
,
-
1
);
internalSignatureInfor
.
addReference
(
SignatureReferenceType
::
SAMEDOCUMENT
,
internalSignatureInfor
.
signatureInfor
.
ouDescriptionPropertyId
,
-
1
);
size
++
;
}
...
...
@@ -192,7 +192,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
void
XSecController
::
signAStream
(
sal_Int32
securityId
,
const
OUString
&
uri
,
const
OUString
&
/*objectURL*/
,
bool
isBinary
)
{
sal_Int32
type
=
isBinary
?
TYPE_BINARYSTREAM_REFERENCE
:
TYPE_XMLSTREAM_REFERENCE
;
SignatureReferenceType
type
=
isBinary
?
SignatureReferenceType
::
BINARYSTREAM
:
SignatureReferenceType
::
XMLSTREAM
;
int
index
=
findSignatureInfor
(
securityId
);
...
...
xmlsecurity/source/helper/xsecverify.cxx
Dosyayı görüntüle @
ee2b08ed
...
...
@@ -119,14 +119,14 @@ void XSecController::addReference( const OUString& ouUri)
return
;
}
InternalSignatureInformation
&
isi
=
m_vInternalSignatureInformations
.
back
();
isi
.
addReference
(
TYPE_SAMEDOCUMENT_REFERENCE
,
ouUri
,
-
1
);
isi
.
addReference
(
SignatureReferenceType
::
SAMEDOCUMENT
,
ouUri
,
-
1
);
}
void
XSecController
::
addStreamReference
(
const
OUString
&
ouUri
,
bool
isBinary
)
{
sal_Int32
type
=
(
isBinary
?
TYPE_BINARYSTREAM_REFERENCE
:
TYPE_XMLSTREAM_REFERENCE
);
SignatureReferenceType
type
=
(
isBinary
?
SignatureReferenceType
::
BINARYSTREAM
:
SignatureReferenceType
::
XMLSTREAM
);
if
(
m_vInternalSignatureInformations
.
empty
())
{
...
...
@@ -173,7 +173,7 @@ void XSecController::setReferenceCount() const
for
(
int
i
=
0
;
i
<
refNum
;
++
i
)
{
if
(
refInfors
[
i
].
nType
==
TYPE_SAMEDOCUMENT_REFERENCE
)
if
(
refInfors
[
i
].
nType
==
SignatureReferenceType
::
SAMEDOCUMENT
)
/*
* same-document reference
*/
...
...
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