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
fe61130c
Kaydet (Commit)
fe61130c
authored
Tem 16, 2004
tarafından
Michael Mi
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add "cryptoken.default" support
Issue number: Submitted by: Reviewed by:
üst
85e61350
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
3 deletions
+53
-3
xmlsignaturehelper.cxx
xmlsecurity/source/helper/xmlsignaturehelper.cxx
+53
-3
No files found.
xmlsecurity/source/helper/xmlsignaturehelper.cxx
Dosyayı görüntüle @
fe61130c
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlsignaturehelper.cxx,v $
*
* $Revision: 1.
3
$
* $Revision: 1.
4
$
*
* last change: $Author: m
t $ $Date: 2004-07-15 07:16:11
$
* last change: $Author: m
mi $ $Date: 2004-07-16 02:22:26
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -76,6 +76,10 @@
#include <tools/date.hxx>
#include <tools/time.hxx>
//MM : search for the default profile
#include <unotools/streamhelper.hxx>
//MM : end
/* SEInitializer component */
#define SEINITIALIZER_COMPONENT "com.sun.star.xml.crypto.SEInitializer"
...
...
@@ -106,7 +110,53 @@ bool XMLSignatureHelper::Init( const rtl::OUString& rTokenPath )
DBG_ASSERT
(
!
mxSecurityContext
.
is
(),
"XMLSignatureHelper::Init - mxSecurityContext already set!"
);
ImplCreateSEInitializer
();
mxSecurityContext
=
mxSEInitializer
->
createSecurityContext
(
rTokenPath
);
//MM : search for the default profile
rtl
::
OUString
tokenPath
=
rTokenPath
;
if
(
tokenPath
.
getLength
()
==
0
)
{
rtl
::
OUString
aDefaultCryptokenFileName
=
rtl
::
OUString
::
createFromAscii
(
"cryptoken.default"
);
SvFileStream
*
pStream
=
new
SvFileStream
(
aDefaultCryptokenFileName
,
STREAM_READ
);
if
(
pStream
!=
NULL
)
{
pStream
->
Seek
(
STREAM_SEEK_TO_END
);
ULONG
nBytes
=
pStream
->
Tell
();
if
(
nBytes
>
0
)
{
pStream
->
Seek
(
STREAM_SEEK_TO_BEGIN
);
SvLockBytesRef
xLockBytes
=
new
SvLockBytes
(
pStream
,
TRUE
);
uno
::
Reference
<
io
::
XInputStream
>
xInputStream
=
new
utl
::
OInputStreamHelper
(
xLockBytes
,
nBytes
);
if
(
xInputStream
.
is
())
{
uno
::
Sequence
<
sal_Int8
>
tokenFileName
(
1024
);
int
numbers
=
xInputStream
->
readBytes
(
tokenFileName
,
1024
);
const
sal_Int8
*
readBytes
=
(
const
sal_Int8
*
)
tokenFileName
.
getArray
();
sal_Char
cToken
[
1024
];
for
(
int
i
=
0
;
i
<
numbers
;
i
++
)
{
cToken
[
i
]
=
(
sal_Char
)(
*
(
readBytes
+
i
));
}
xInputStream
->
closeInput
();
tokenPath
=
rtl
::
OStringToOUString
(
rtl
::
OString
((
const
sal_Char
*
)
cToken
,
numbers
),
RTL_TEXTENCODING_UTF8
);
}
}
}
}
mxSecurityContext
=
mxSEInitializer
->
createSecurityContext
(
tokenPath
);
//MM : end
//MM : search for the default profile
//mxSecurityContext = mxSEInitializer->createSecurityContext( rTokenPath );
//MM : end
return
mxSecurityContext
.
is
();
}
...
...
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