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
abe9f412
Kaydet (Commit)
abe9f412
authored
Kas 11, 2016
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More EncapsulatedX509Certificate work
Change-Id: I64239dfcfbc2383c2bf53c0cb86196d3f2c79330
üst
a2c6112a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
5 deletions
+29
-5
xmlsignaturehelper.hxx
xmlsecurity/inc/xmlsignaturehelper.hxx
+2
-0
documentsignaturemanager.cxx
xmlsecurity/source/helper/documentsignaturemanager.cxx
+10
-0
xmlsignaturehelper.cxx
xmlsecurity/source/helper/xmlsignaturehelper.cxx
+5
-0
xsecctl.cxx
xmlsecurity/source/helper/xsecctl.cxx
+6
-3
xsecctl.hxx
xmlsecurity/source/helper/xsecctl.hxx
+2
-1
xsecparser.cxx
xmlsecurity/source/helper/xsecparser.cxx
+1
-1
xsecverify.cxx
xmlsecurity/source/helper/xsecverify.cxx
+3
-0
No files found.
xmlsecurity/inc/xmlsignaturehelper.hxx
Dosyayı görüntüle @
abe9f412
...
...
@@ -159,6 +159,8 @@ public:
void
SetX509Certificate
(
sal_Int32
nSecurityId
,
const
OUString
&
ouX509IssuerName
,
const
OUString
&
ouX509SerialNumber
,
const
OUString
&
ouX509Cert
,
const
OUString
&
ouX509CertDigest
);
void
AddEncapsulatedX509Certificate
(
const
OUString
&
ouEncapsulatedX509Certificate
);
void
SetDateTime
(
sal_Int32
nSecurityId
,
const
Date
&
rDate
,
const
tools
::
Time
&
rTime
);
void
SetDescription
(
sal_Int32
nSecurityId
,
const
OUString
&
rDescription
);
...
...
xmlsecurity/source/helper/documentsignaturemanager.cxx
Dosyayı görüntüle @
abe9f412
...
...
@@ -279,6 +279,16 @@ bool DocumentSignatureManager::add(const uno::Reference<security::XCertificate>&
maSignatureHelper
.
SetX509Certificate
(
nSecurityId
,
xCert
->
getIssuerName
(),
aCertSerial
,
aStrBuffer
.
makeStringAndClear
(),
aCertDigest
);
uno
::
Sequence
<
uno
::
Reference
<
security
::
XCertificate
>
>
aCertPath
=
getSecurityEnvironment
()
->
buildCertificatePath
(
xCert
);
const
uno
::
Reference
<
security
::
XCertificate
>*
pCertPath
=
aCertPath
.
getConstArray
();
sal_Int32
nCnt
=
aCertPath
.
getLength
();
for
(
int
i
=
0
;
i
<
nCnt
;
i
++
)
{
sax
::
Converter
::
encodeBase64
(
aStrBuffer
,
pCertPath
[
i
]
->
getEncoded
());
maSignatureHelper
.
AddEncapsulatedX509Certificate
(
aStrBuffer
.
makeStringAndClear
());
}
std
::
vector
<
OUString
>
aElements
=
DocumentSignatureHelper
::
CreateElementList
(
mxStore
,
meSignatureMode
,
DocumentSignatureAlgorithm
::
OOo3_2
);
DocumentSignatureHelper
::
AppendContentTypes
(
mxStore
,
aElements
);
...
...
xmlsecurity/source/helper/xmlsignaturehelper.cxx
Dosyayı görüntüle @
abe9f412
...
...
@@ -120,6 +120,11 @@ void XMLSignatureHelper::SetX509Certificate(
ouX509CertDigest
);
}
void
XMLSignatureHelper
::
AddEncapsulatedX509Certificate
(
const
OUString
&
ouEncapsulatedX509Certificate
)
{
mpXSecController
->
addEncapsulatedX509Certificate
(
ouEncapsulatedX509Certificate
);
}
void
XMLSignatureHelper
::
SetDateTime
(
sal_Int32
nSecurityId
,
const
::
Date
&
rDate
,
const
tools
::
Time
&
rTime
)
{
css
::
util
::
DateTime
stDateTime
=
::
DateTime
(
rDate
,
rTime
).
GetUNODateTime
();
...
...
xmlsecurity/source/helper/xsecctl.cxx
Dosyayı görüntüle @
abe9f412
...
...
@@ -584,9 +584,12 @@ void writeUnsignedProperties(
xDocumentHandler
->
startElement
(
"xd:CertificateValues"
,
uno
::
Reference
<
xml
::
sax
::
XAttributeList
>
(
new
SvXMLAttributeList
()));
{
xDocumentHandler
->
startElement
(
"xd:EncapsulatedX509Certificate"
,
uno
::
Reference
<
xml
::
sax
::
XAttributeList
>
(
new
SvXMLAttributeList
()));
xDocumentHandler
->
characters
(
signatureInfo
.
ouX509Certificate
);
xDocumentHandler
->
endElement
(
"xd:EncapsulatedX509Certificate"
);
for
(
const
auto
&
i
:
signatureInfo
.
maEncapsulatedX509Certificates
)
{
xDocumentHandler
->
startElement
(
"xd:EncapsulatedX509Certificate"
,
uno
::
Reference
<
xml
::
sax
::
XAttributeList
>
(
new
SvXMLAttributeList
()));
xDocumentHandler
->
characters
(
i
);
xDocumentHandler
->
endElement
(
"xd:EncapsulatedX509Certificate"
);
}
}
xDocumentHandler
->
endElement
(
"xd:CertificateValues"
);
...
...
xmlsecurity/source/helper/xsecctl.hxx
Dosyayı görüntüle @
abe9f412
...
...
@@ -314,7 +314,6 @@ private:
void
setDate
(
OUString
&
ouDate
);
void
setDescription
(
const
OUString
&
rDescription
);
void
setCertDigest
(
const
OUString
&
rCertDigest
);
void
addEncapsulatedX509Certificate
(
const
OUString
&
rEncapsulatedX509Certificate
);
public
:
void
setSignatureBytes
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
rBytes
);
...
...
@@ -385,6 +384,8 @@ public:
const
OUString
&
ouX509Cert
,
const
OUString
&
ouX509CertDigest
);
void
addEncapsulatedX509Certificate
(
const
OUString
&
rEncapsulatedX509Certificate
);
void
setDate
(
sal_Int32
nSecurityId
,
const
css
::
util
::
DateTime
&
rDateTime
);
...
...
xmlsecurity/source/helper/xsecparser.cxx
Dosyayı görüntüle @
abe9f412
...
...
@@ -286,7 +286,7 @@ void SAL_CALL XSecParser::endElement( const OUString& aName )
else
if
(
aName
==
"xd:CertDigest"
)
{
m_pXSecController
->
setCertDigest
(
m_ouCertDigest
);
m_bIn
X509Certificate
=
false
;
m_bIn
CertDigest
=
false
;
}
else
if
(
aName
==
"xd:EncapsulatedX509Certificate"
||
aName
==
"xades:EncapsulatedX509Certificate"
)
{
...
...
xmlsecurity/source/helper/xsecverify.cxx
Dosyayı görüntüle @
abe9f412
...
...
@@ -299,6 +299,9 @@ void XSecController::addEncapsulatedX509Certificate(const OUString& rEncapsulate
if
(
m_vInternalSignatureInformations
.
empty
())
return
;
if
(
rEncapsulatedX509Certificate
.
isEmpty
())
return
;
InternalSignatureInformation
&
rInformation
=
m_vInternalSignatureInformations
.
back
();
rInformation
.
signatureInfor
.
maEncapsulatedX509Certificates
.
insert
(
rEncapsulatedX509Certificate
);
}
...
...
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