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
a4196fc3
Kaydet (Commit)
a4196fc3
authored
Haz 05, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, Convert XMultiServiceFactory in xmlsecurity module
Change-Id: Ia134170d07f33c2649b2a2620f40bc7b45ec7e16
üst
27c6434f
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
96 additions
and
82 deletions
+96
-82
Library_xsec_fw.mk
xmlsecurity/Library_xsec_fw.mk
+1
-0
decryptorimpl.cxx
xmlsecurity/source/framework/decryptorimpl.cxx
+5
-4
decryptorimpl.hxx
xmlsecurity/source/framework/decryptorimpl.hxx
+4
-4
encryptionengine.cxx
xmlsecurity/source/framework/encryptionengine.cxx
+10
-10
encryptionengine.hxx
xmlsecurity/source/framework/encryptionengine.hxx
+5
-1
encryptorimpl.cxx
xmlsecurity/source/framework/encryptorimpl.cxx
+33
-33
encryptorimpl.hxx
xmlsecurity/source/framework/encryptorimpl.hxx
+5
-4
securityengine.cxx
xmlsecurity/source/framework/securityengine.cxx
+2
-3
securityengine.hxx
xmlsecurity/source/framework/securityengine.hxx
+1
-4
signaturecreatorimpl.cxx
xmlsecurity/source/framework/signaturecreatorimpl.cxx
+6
-5
signaturecreatorimpl.hxx
xmlsecurity/source/framework/signaturecreatorimpl.hxx
+5
-4
signatureengine.cxx
xmlsecurity/source/framework/signatureengine.cxx
+4
-3
signatureengine.hxx
xmlsecurity/source/framework/signatureengine.hxx
+5
-1
signatureverifierimpl.cxx
xmlsecurity/source/framework/signatureverifierimpl.cxx
+4
-3
signatureverifierimpl.hxx
xmlsecurity/source/framework/signatureverifierimpl.hxx
+6
-3
No files found.
xmlsecurity/Library_xsec_fw.mk
Dosyayı görüntüle @
a4196fc3
...
...
@@ -19,6 +19,7 @@ $(eval $(call gb_Library_set_include,xsec_fw,\
$(eval
$(call
gb_Library_use_sdk_api,xsec_fw))
$(eval
$(call
gb_Library_use_libraries,xsec_fw,\
comphelper
\
cppu
\
cppuhelper
\
sal
\
...
...
xmlsecurity/source/framework/decryptorimpl.cxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -22,7 +22,9 @@
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
using
namespace
com
::
sun
::
star
::
uno
;
namespace
cssu
=
com
::
sun
::
star
::
uno
;
namespace
cssl
=
com
::
sun
::
star
::
lang
;
namespace
cssxc
=
com
::
sun
::
star
::
xml
::
crypto
;
...
...
@@ -31,9 +33,8 @@ namespace cssxw = com::sun::star::xml::wrapper;
#define SERVICE_NAME "com.sun.star.xml.crypto.sax.Decryptor"
#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.DecryptorImpl"
DecryptorImpl
::
DecryptorImpl
(
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
rxMSF
)
DecryptorImpl
::
DecryptorImpl
(
const
Reference
<
XComponentContext
>
&
xContext
)
:
DecryptorImpl_Base
(
xContext
)
{
mxMSF
=
rxMSF
;
}
DecryptorImpl
::~
DecryptorImpl
()
...
...
@@ -198,10 +199,10 @@ cssu::Sequence< OUString > SAL_CALL DecryptorImpl_getSupportedServiceNames( )
}
#undef SERVICE_NAME
cssu
::
Reference
<
cssu
::
XInterface
>
SAL_CALL
DecryptorImpl_createInstance
(
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
rSMgr
)
cssu
::
Reference
<
cssu
::
XInterface
>
SAL_CALL
DecryptorImpl_createInstance
(
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
xMSF
)
throw
(
cssu
::
Exception
)
{
return
(
cppu
::
OWeakObject
*
)
new
DecryptorImpl
(
rSMgr
);
return
(
cppu
::
OWeakObject
*
)
new
DecryptorImpl
(
comphelper
::
getComponentContext
(
xMSF
)
);
}
/* XServiceInfo */
...
...
xmlsecurity/source/framework/decryptorimpl.hxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -29,13 +29,14 @@
#include "encryptionengine.hxx"
class
DecryptorImpl
:
public
cppu
::
ImplInheritanceHelper3
typedef
cppu
::
ImplInheritanceHelper3
<
EncryptionEngine
,
com
::
sun
::
star
::
xml
::
crypto
::
sax
::
XDecryptionResultBroadcaster
,
com
::
sun
::
star
::
lang
::
XInitialization
,
com
::
sun
::
star
::
lang
::
XServiceInfo
>
>
DecryptorImpl_Base
;
class
DecryptorImpl
:
public
DecryptorImpl_Base
/****** DecryptorImpl.hxx/CLASS DecryptorImpl *********************************
*
* NAME
...
...
@@ -63,8 +64,7 @@ private:
throw
(
com
::
sun
::
star
::
uno
::
Exception
,
com
::
sun
::
star
::
uno
::
RuntimeException
);
public
:
explicit
DecryptorImpl
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxMSF
);
explicit
DecryptorImpl
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
xContext
);
virtual
~
DecryptorImpl
();
/* XDecryptionResultBroadcaster */
...
...
xmlsecurity/source/framework/encryptionengine.cxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -23,14 +23,14 @@
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
namespace
cssu
=
com
::
sun
::
star
::
uno
;
using
namespace
com
::
sun
::
star
::
uno
;
namespace
cssxc
=
com
::
sun
::
star
::
xml
::
crypto
;
namespace
cssxw
=
com
::
sun
::
star
::
xml
::
wrapper
;
#define ENCRYPTION_TEMPLATE "com.sun.star.xml.crypto.XMLEncryptionTemplate"
EncryptionEngine
::
EncryptionEngine
(
)
:
m_nIdOfBlocker
(
-
1
)
EncryptionEngine
::
EncryptionEngine
(
const
Reference
<
XComponentContext
>
&
xContext
)
:
m_
xContext
(
xContext
),
m_
nIdOfBlocker
(
-
1
)
{
}
...
...
@@ -82,7 +82,7 @@ bool EncryptionEngine::checkReady() const
}
void
EncryptionEngine
::
tryToPerform
(
)
throw
(
cssu
::
Exception
,
cssu
::
RuntimeException
)
throw
(
Exception
,
RuntimeException
)
/****** EncryptionEngine/tryToPerform ****************************************
*
* NAME
...
...
@@ -113,12 +113,12 @@ void EncryptionEngine::tryToPerform( )
if
(
checkReady
())
{
const
OUString
sEncryptionTemplate
(
ENCRYPTION_TEMPLATE
);
cssu
::
Reference
<
cssxc
::
XXMLEncryptionTemplate
>
xEncryptionTemplate
(
m
xMSF
->
createInstance
(
sEncryptionTemplate
),
cssu
::
UNO_QUERY
);
Reference
<
cssxc
::
XXMLEncryptionTemplate
>
xEncryptionTemplate
(
m
_xContext
->
getServiceManager
()
->
createInstanceWithContext
(
sEncryptionTemplate
,
m_xContext
),
UNO_QUERY
);
OSL_ASSERT
(
xEncryptionTemplate
.
is
()
);
cssu
::
Reference
<
cssxw
::
XXMLElementWrapper
>
xXMLElement
Reference
<
cssxw
::
XXMLElementWrapper
>
xXMLElement
=
m_xSAXEventKeeper
->
getElement
(
m_nIdOfTemplateEC
);
xEncryptionTemplate
->
setTemplate
(
xXMLElement
);
...
...
@@ -162,12 +162,12 @@ void EncryptionEngine::clearUp( ) const
* Email: michael.mi@sun.com
******************************************************************************/
{
cssu
::
Reference
<
cssxc
::
sax
::
XReferenceResolvedBroadcaster
>
xReferenceResolvedBroadcaster
(
m_xSAXEventKeeper
,
cssu
::
UNO_QUERY
);
Reference
<
cssxc
::
sax
::
XReferenceResolvedBroadcaster
>
xReferenceResolvedBroadcaster
(
m_xSAXEventKeeper
,
UNO_QUERY
);
xReferenceResolvedBroadcaster
->
removeReferenceResolvedListener
(
m_nIdOfTemplateEC
,
(
const
cssu
::
Reference
<
cssxc
::
sax
::
XReferenceResolvedListener
>
)((
SecurityEngine
*
)
this
));
(
const
Reference
<
cssxc
::
sax
::
XReferenceResolvedListener
>
)((
SecurityEngine
*
)
this
));
m_xSAXEventKeeper
->
removeElementCollector
(
m_nIdOfTemplateEC
);
...
...
xmlsecurity/source/framework/encryptionengine.hxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -50,6 +50,10 @@ class EncryptionEngine : public cppu::ImplInheritanceHelper1
* Email: michael.mi@sun.com
******************************************************************************/
{
private
:
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xContext
;
protected
:
/*
* the Encryption bridge component, which performs encrypt and decrypt
...
...
@@ -64,7 +68,7 @@ protected:
sal_Int32
m_nIdOfBlocker
;
protected
:
EncryptionEngine
(
);
EncryptionEngine
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
xContext
);
virtual
~
EncryptionEngine
(){};
virtual
void
tryToPerform
(
)
...
...
xmlsecurity/source/framework/encryptorimpl.cxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -22,8 +22,9 @@
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
namespace
cssu
=
com
::
sun
::
star
::
uno
;
using
namespace
com
::
sun
::
star
::
uno
;
namespace
cssl
=
com
::
sun
::
star
::
lang
;
namespace
cssxc
=
com
::
sun
::
star
::
xml
::
crypto
;
namespace
cssxw
=
com
::
sun
::
star
::
xml
::
wrapper
;
...
...
@@ -31,10 +32,9 @@ namespace cssxw = com::sun::star::xml::wrapper;
#define SERVICE_NAME "com.sun.star.xml.crypto.sax.Encryptor"
#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.EncryptorImpl"
EncryptorImpl
::
EncryptorImpl
(
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
rxMSF
)
EncryptorImpl
::
EncryptorImpl
(
const
Reference
<
XComponentContext
>
&
xContext
)
:
EncryptorImpl
(
xContext
)
{
m_nReferenceId
=
-
1
;
mxMSF
=
rxMSF
;
}
EncryptorImpl
::~
EncryptorImpl
()
...
...
@@ -79,7 +79,7 @@ bool EncryptorImpl::checkReady() const
}
void
EncryptorImpl
::
notifyResultListener
()
const
throw
(
cssu
::
Exception
,
cssu
::
RuntimeException
)
throw
(
Exception
,
RuntimeException
)
/****** DecryptorImpl/notifyResultListener ***********************************
*
* NAME
...
...
@@ -103,16 +103,16 @@ void EncryptorImpl::notifyResultListener() const
* Email: michael.mi@sun.com
******************************************************************************/
{
cssu
::
Reference
<
cssxc
::
sax
::
XEncryptionResultListener
>
xEncryptionResultListener
(
m_xResultListener
,
cssu
::
UNO_QUERY
)
;
Reference
<
cssxc
::
sax
::
XEncryptionResultListener
>
xEncryptionResultListener
(
m_xResultListener
,
UNO_QUERY
)
;
xEncryptionResultListener
->
encrypted
(
m_nSecurityId
,
m_nStatus
);
}
void
EncryptorImpl
::
startEngine
(
const
cssu
::
Reference
<
void
EncryptorImpl
::
startEngine
(
const
Reference
<
cssxc
::
XXMLEncryptionTemplate
>&
xEncryptionTemplate
)
throw
(
cssu
::
Exception
,
cssu
::
RuntimeException
)
throw
(
Exception
,
RuntimeException
)
/****** EncryptorImpl/startEngine ********************************************
*
* NAME
...
...
@@ -137,9 +137,9 @@ void EncryptorImpl::startEngine( const cssu::Reference<
* Email: michael.mi@sun.com
******************************************************************************/
{
cssu
::
Reference
<
cssxc
::
XXMLEncryptionTemplate
>
xResultTemplate
;
Reference
<
cssxc
::
XXMLEncryptionTemplate
>
xResultTemplate
;
cssu
::
Reference
<
cssxw
::
XXMLElementWrapper
>
Reference
<
cssxw
::
XXMLElementWrapper
>
xXMLElement
=
m_xSAXEventKeeper
->
getElement
(
m_nReferenceId
);
xEncryptionTemplate
->
setTarget
(
xXMLElement
);
...
...
@@ -149,14 +149,14 @@ void EncryptorImpl::startEngine( const cssu::Reference<
xEncryptionTemplate
,
m_xSecurityEnvironment
);
m_nStatus
=
xResultTemplate
->
getStatus
();
}
catch
(
cssu
::
Exception
&
)
catch
(
Exception
&
)
{
m_nStatus
=
cssxc
::
SecurityOperationStatus_RUNTIMEERROR_FAILED
;
}
if
(
m_nStatus
==
cssxc
::
SecurityOperationStatus_OPERATION_SUCCEEDED
)
{
cssu
::
Reference
<
cssxw
::
XXMLElementWrapper
>
xResultEncryption
Reference
<
cssxw
::
XXMLElementWrapper
>
xResultEncryption
=
xResultTemplate
->
getTemplate
();
m_xSAXEventKeeper
->
setElement
(
m_nIdOfTemplateEC
,
xResultEncryption
);
m_xSAXEventKeeper
->
setElement
(
m_nReferenceId
,
NULL
);
...
...
@@ -165,7 +165,7 @@ void EncryptorImpl::startEngine( const cssu::Reference<
/* XReferenceCollector */
void
SAL_CALL
EncryptorImpl
::
setReferenceCount
(
sal_Int32
)
throw
(
cssu
::
Exception
,
cssu
::
RuntimeException
)
throw
(
Exception
,
RuntimeException
)
{
/*
* dummp method, because there is only one reference in
...
...
@@ -175,27 +175,27 @@ void SAL_CALL EncryptorImpl::setReferenceCount(sal_Int32)
}
void
SAL_CALL
EncryptorImpl
::
setReferenceId
(
sal_Int32
id
)
throw
(
cssu
::
Exception
,
cssu
::
RuntimeException
)
throw
(
Exception
,
RuntimeException
)
{
m_nReferenceId
=
id
;
}
/* XEncryptionResultBroadcaster */
void
SAL_CALL
EncryptorImpl
::
addEncryptionResultListener
(
const
cssu
::
Reference
<
cssxc
::
sax
::
XEncryptionResultListener
>&
listener
)
throw
(
cssu
::
Exception
,
cssu
::
RuntimeException
)
void
SAL_CALL
EncryptorImpl
::
addEncryptionResultListener
(
const
Reference
<
cssxc
::
sax
::
XEncryptionResultListener
>&
listener
)
throw
(
Exception
,
RuntimeException
)
{
m_xResultListener
=
listener
;
tryToPerform
();
}
void
SAL_CALL
EncryptorImpl
::
removeEncryptionResultListener
(
const
cssu
::
Reference
<
cssxc
::
sax
::
XEncryptionResultListener
>&
)
throw
(
cssu
::
RuntimeException
)
void
SAL_CALL
EncryptorImpl
::
removeEncryptionResultListener
(
const
Reference
<
cssxc
::
sax
::
XEncryptionResultListener
>&
)
throw
(
RuntimeException
)
{
}
/* XInitialization */
void
SAL_CALL
EncryptorImpl
::
initialize
(
const
cssu
::
Sequence
<
cssu
::
Any
>&
aArguments
)
throw
(
cssu
::
Exception
,
cssu
::
RuntimeException
)
void
SAL_CALL
EncryptorImpl
::
initialize
(
const
Sequence
<
Any
>&
aArguments
)
throw
(
Exception
,
RuntimeException
)
{
OSL_ASSERT
(
aArguments
.
getLength
()
==
5
);
...
...
@@ -212,47 +212,47 @@ void SAL_CALL EncryptorImpl::initialize( const cssu::Sequence< cssu::Any >& aArg
OUString
EncryptorImpl_getImplementationName
()
throw
(
cssu
::
RuntimeException
)
throw
(
RuntimeException
)
{
return
OUString
(
IMPLEMENTATION_NAME
);
}
sal_Bool
SAL_CALL
EncryptorImpl_supportsService
(
const
OUString
&
ServiceName
)
throw
(
cssu
::
RuntimeException
)
throw
(
RuntimeException
)
{
return
ServiceName
==
SERVICE_NAME
;
}
cssu
::
Sequence
<
OUString
>
SAL_CALL
EncryptorImpl_getSupportedServiceNames
(
)
throw
(
cssu
::
RuntimeException
)
Sequence
<
OUString
>
SAL_CALL
EncryptorImpl_getSupportedServiceNames
(
)
throw
(
RuntimeException
)
{
cssu
::
Sequence
<
OUString
>
aRet
(
1
);
Sequence
<
OUString
>
aRet
(
1
);
OUString
*
pArray
=
aRet
.
getArray
();
pArray
[
0
]
=
OUString
(
SERVICE_NAME
);
return
aRet
;
}
#undef SERVICE_NAME
cssu
::
Reference
<
cssu
::
XInterface
>
SAL_CALL
EncryptorImpl_createInstance
(
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
rSMgr
)
throw
(
cssu
::
Exception
)
Reference
<
XInterface
>
SAL_CALL
EncryptorImpl_createInstance
(
const
Reference
<
cssl
::
XMultiServiceFactory
>&
xMSF
)
throw
(
Exception
)
{
return
(
cppu
::
OWeakObject
*
)
new
EncryptorImpl
(
rSMgr
);
return
(
cppu
::
OWeakObject
*
)
new
EncryptorImpl
(
comphelper
::
getComponentContext
(
xMSF
)
);
}
/* XServiceInfo */
OUString
SAL_CALL
EncryptorImpl
::
getImplementationName
(
)
throw
(
cssu
::
RuntimeException
)
throw
(
RuntimeException
)
{
return
EncryptorImpl_getImplementationName
();
}
sal_Bool
SAL_CALL
EncryptorImpl
::
supportsService
(
const
OUString
&
rServiceName
)
throw
(
cssu
::
RuntimeException
)
throw
(
RuntimeException
)
{
return
EncryptorImpl_supportsService
(
rServiceName
);
}
cssu
::
Sequence
<
OUString
>
SAL_CALL
EncryptorImpl
::
getSupportedServiceNames
(
)
throw
(
cssu
::
RuntimeException
)
Sequence
<
OUString
>
SAL_CALL
EncryptorImpl
::
getSupportedServiceNames
(
)
throw
(
RuntimeException
)
{
return
EncryptorImpl_getSupportedServiceNames
();
}
...
...
xmlsecurity/source/framework/encryptorimpl.hxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -30,14 +30,16 @@
#include "encryptionengine.hxx"
class
EncryptorImpl
:
public
cppu
::
ImplInheritanceHelper4
typedef
cppu
::
ImplInheritanceHelper4
<
EncryptionEngine
,
com
::
sun
::
star
::
xml
::
crypto
::
sax
::
XEncryptionResultBroadcaster
,
com
::
sun
::
star
::
xml
::
crypto
::
sax
::
XReferenceCollector
,
com
::
sun
::
star
::
lang
::
XInitialization
,
com
::
sun
::
star
::
lang
::
XServiceInfo
>
>
EncryptorImpl_Base
;
class
EncryptorImpl
:
public
EncryptorImpl_Base
/****** EncryptorImpl.hxx/CLASS EncryptorImpl *********************************
*
* NAME
...
...
@@ -70,8 +72,7 @@ private:
throw
(
com
::
sun
::
star
::
uno
::
Exception
,
com
::
sun
::
star
::
uno
::
RuntimeException
);
public
:
explicit
EncryptorImpl
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxMSF
);
explicit
EncryptorImpl
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
xContext
);
virtual
~
EncryptorImpl
();
/* XEncryptionResultBroadcaster */
...
...
xmlsecurity/source/framework/securityengine.cxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -24,9 +24,8 @@
namespace
cssu
=
com
::
sun
::
star
::
uno
;
namespace
cssl
=
com
::
sun
::
star
::
lang
;
SecurityEngine
::
SecurityEngine
(
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
rxMSF
)
:
mxMSF
(
rxMSF
),
m_nIdOfTemplateEC
(
-
1
),
SecurityEngine
::
SecurityEngine
()
:
m_nIdOfTemplateEC
(
-
1
),
m_nNumOfResolvedReferences
(
0
),
m_nIdOfKeyEC
(
-
1
),
m_bMissionDone
(
false
),
...
...
xmlsecurity/source/framework/securityengine.hxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -50,8 +50,6 @@ class SecurityEngine : public cppu::WeakImplHelper3
******************************************************************************/
{
protected
:
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
mxMSF
;
/*
* A SAXEventKeeper internally maintians all resources that a security
...
...
@@ -106,8 +104,7 @@ protected:
m_xResultListener
;
protected
:
explicit
SecurityEngine
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxMSF
=
NULL
);
explicit
SecurityEngine
();
virtual
~
SecurityEngine
()
{};
/*
...
...
xmlsecurity/source/framework/signaturecreatorimpl.cxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -22,7 +22,9 @@
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
using
namespace
com
::
sun
::
star
::
uno
;
namespace
cssu
=
com
::
sun
::
star
::
uno
;
namespace
cssl
=
com
::
sun
::
star
::
lang
;
namespace
cssxc
=
com
::
sun
::
star
::
xml
::
crypto
;
...
...
@@ -31,10 +33,9 @@ namespace cssxw = com::sun::star::xml::wrapper;
#define SERVICE_NAME "com.sun.star.xml.crypto.sax.SignatureCreator"
#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.SignatureCreatorImpl"
SignatureCreatorImpl
::
SignatureCreatorImpl
(
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
rxMSF
)
:
m_nIdOfBlocker
(
-
1
)
SignatureCreatorImpl
::
SignatureCreatorImpl
(
const
Reference
<
XComponentContext
>
&
xContext
)
:
SignatureCreatorImpl_Base
(
xContext
),
m_nIdOfBlocker
(
-
1
)
{
mxMSF
=
rxMSF
;
}
SignatureCreatorImpl
::~
SignatureCreatorImpl
(
)
...
...
@@ -247,10 +248,10 @@ cssu::Sequence< OUString > SAL_CALL SignatureCreatorImpl_getSupportedServiceName
#undef SERVICE_NAME
cssu
::
Reference
<
cssu
::
XInterface
>
SAL_CALL
SignatureCreatorImpl_createInstance
(
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
rSMgr
)
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
xMSF
)
throw
(
cssu
::
Exception
)
{
return
(
cppu
::
OWeakObject
*
)
new
SignatureCreatorImpl
(
rSMgr
);
return
(
cppu
::
OWeakObject
*
)
new
SignatureCreatorImpl
(
comphelper
::
getComponentContext
(
xMSF
)
);
}
/* XServiceInfo */
...
...
xmlsecurity/source/framework/signaturecreatorimpl.hxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -30,14 +30,16 @@
#include "signatureengine.hxx"
class
SignatureCreatorImpl
:
public
cppu
::
ImplInheritanceHelper4
typedef
cppu
::
ImplInheritanceHelper4
<
SignatureEngine
,
com
::
sun
::
star
::
xml
::
crypto
::
sax
::
XBlockerMonitor
,
com
::
sun
::
star
::
xml
::
crypto
::
sax
::
XSignatureCreationResultBroadcaster
,
com
::
sun
::
star
::
lang
::
XInitialization
,
com
::
sun
::
star
::
lang
::
XServiceInfo
>
>
SignatureCreatorImpl_Base
;
class
SignatureCreatorImpl
:
public
SignatureCreatorImpl_Base
/****** SignatureCreatorImpl.hxx/CLASS SignatureCreatorImpl *******************
*
* NAME
...
...
@@ -71,8 +73,7 @@ private:
throw
(
com
::
sun
::
star
::
uno
::
Exception
,
com
::
sun
::
star
::
uno
::
RuntimeException
);
public
:
explicit
SignatureCreatorImpl
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxMSF
);
explicit
SignatureCreatorImpl
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
xContext
);
virtual
~
SignatureCreatorImpl
();
/* XBlockerMonitor */
...
...
xmlsecurity/source/framework/signatureengine.cxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -23,6 +23,7 @@
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
using
namespace
com
::
sun
::
star
::
uno
;
namespace
cssu
=
com
::
sun
::
star
::
uno
;
namespace
cssl
=
com
::
sun
::
star
::
lang
;
namespace
cssxc
=
com
::
sun
::
star
::
xml
::
crypto
;
...
...
@@ -30,8 +31,8 @@ namespace cssxw = com::sun::star::xml::wrapper;
#define SIGNATURE_TEMPLATE "com.sun.star.xml.crypto.XMLSignatureTemplate"
SignatureEngine
::
SignatureEngine
(
)
:
m_nTotalReferenceNumber
(
-
1
)
SignatureEngine
::
SignatureEngine
(
const
Reference
<
XComponentContext
>
&
xContext
)
:
m_xContext
(
xContext
),
m_nTotalReferenceNumber
(
-
1
)
{
}
...
...
@@ -115,7 +116,7 @@ void SignatureEngine::tryToPerform( )
{
const
OUString
ouSignatureTemplate
(
SIGNATURE_TEMPLATE
);
cssu
::
Reference
<
cssxc
::
XXMLSignatureTemplate
>
xSignatureTemplate
(
m
xMSF
->
createInstance
(
ouSignatureTemplate
),
cssu
::
UNO_QUERY
);
xSignatureTemplate
(
m
_xContext
->
getServiceManager
()
->
createInstanceWithContext
(
ouSignatureTemplate
,
m_xContext
),
cssu
::
UNO_QUERY
);
OSL_ASSERT
(
xSignatureTemplate
.
is
()
);
...
...
xmlsecurity/source/framework/signatureengine.hxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -30,6 +30,7 @@
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
#include <com/sun/star/xml/crypto/XUriBinding.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase2.hxx>
...
...
@@ -56,6 +57,9 @@ class SignatureEngine : public cppu::ImplInheritanceHelper2
* Email: michael.mi@sun.com
******************************************************************************/
{
private
:
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xContext
;
protected
:
/*
...
...
@@ -87,7 +91,7 @@ protected:
com
::
sun
::
star
::
io
::
XInputStream
>
>
m_vXInputStreams
;
protected
:
SignatureEngine
(
);
SignatureEngine
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
xContext
);
virtual
~
SignatureEngine
()
{};
virtual
void
tryToPerform
(
)
...
...
xmlsecurity/source/framework/signatureverifierimpl.cxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -22,6 +22,7 @@
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
namespace
cssu
=
com
::
sun
::
star
::
uno
;
namespace
cssl
=
com
::
sun
::
star
::
lang
;
...
...
@@ -30,9 +31,9 @@ namespace cssxc = com::sun::star::xml::crypto;
#define SERVICE_NAME "com.sun.star.xml.crypto.sax.SignatureVerifier"
#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.SignatureVerifierImpl"
SignatureVerifierImpl
::
SignatureVerifierImpl
(
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
rxMSF
)
SignatureVerifierImpl
::
SignatureVerifierImpl
(
const
cssu
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
)
:
SignatureVerifierImpl_Base
(
xContext
)
{
mxMSF
=
rxMSF
;
}
SignatureVerifierImpl
::~
SignatureVerifierImpl
()
...
...
@@ -196,7 +197,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL SignatureVerifierImpl_createInstanc
const
cssu
::
Reference
<
cssl
::
XMultiServiceFactory
>&
rSMgr
)
throw
(
cssu
::
Exception
)
{
return
(
cppu
::
OWeakObject
*
)
new
SignatureVerifierImpl
(
rSMgr
);
return
(
cppu
::
OWeakObject
*
)
new
SignatureVerifierImpl
(
comphelper
::
getComponentContext
(
rSMgr
)
);
}
/* XServiceInfo */
...
...
xmlsecurity/source/framework/signatureverifierimpl.hxx
Dosyayı görüntüle @
a4196fc3
...
...
@@ -25,17 +25,20 @@
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase3.hxx>
#include "signatureengine.hxx"
class
SignatureVerifierImpl
:
public
cppu
::
ImplInheritanceHelper3
typedef
cppu
::
ImplInheritanceHelper3
<
SignatureEngine
,
com
::
sun
::
star
::
xml
::
crypto
::
sax
::
XSignatureVerifyResultBroadcaster
,
com
::
sun
::
star
::
lang
::
XInitialization
,
com
::
sun
::
star
::
lang
::
XServiceInfo
>
>
SignatureVerifierImpl_Base
;
class
SignatureVerifierImpl
:
public
SignatureVerifierImpl_Base
/****** SignatureVerifier.hxx/CLASS SignatureVerifierImpl *********************
*
* NAME
...
...
@@ -64,7 +67,7 @@ private:
public
:
explicit
SignatureVerifierImpl
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxMSF
);
com
::
sun
::
star
::
uno
::
XComponentContext
>&
rxContext
);
virtual
~
SignatureVerifierImpl
();
/* XSignatureVerifyResultBroadcaster */
...
...
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