summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-11-11 18:24:14 +0100
committerAndras Timar <atimar@suse.com>2012-11-11 18:24:14 +0100
commit06ec1c089519ef3249464aa09eadf03a8db93a39 (patch)
tree85b2eb6d8ba6ca95e18e1ff82151224cb14106f6 /xmlsecurity
parent8e0d67bed54633d555a4601a5d79e2d5ba7ab2bb (diff)
parent3f899eae02eaad0b967de749fe09b869ba93ad6d (diff)
Merge branch 'master' into feature/killsdf
Conflicts: Repository.mk RepositoryFixes.mk connectivity/prj/build.lst extensions/prj/build.lst filter/prj/build.lst fpicker/prj/build.lst l10ntools/StaticLibrary_transex.mk saxon/build.xml shell/prj/build.lst solenv/gbuild/AllLangResTarget.mk solenv/gbuild/Configuration.mk solenv/gbuild/UI.mk ucb/source/ucp/webdav/webdavcontent.cxx
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/xmlsecurity/certificateviewer.hxx2
-rw-r--r--xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx5
-rw-r--r--xmlsecurity/qa/certext/SanCertExt.cxx6
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx4
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx20
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx18
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx9
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx35
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx58
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.hxx16
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx8
-rw-r--r--xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx50
-rw-r--r--xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx4
-rw-r--r--xmlsecurity/source/xmlsec/saxhelper.cxx1
-rw-r--r--xmlsecurity/workben/signaturetest.cxx2
15 files changed, 114 insertions, 124 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
index 26b03fb06582..91def5575271 100644
--- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
@@ -142,7 +142,7 @@ private:
DECL_LINK( ViewCertHdl, void* );
DECL_LINK( CertSelectHdl, void* );
void Clear( void );
- SvLBoxEntry* InsertCert( SvLBoxEntry* _pParent, const OUString& _rName,
+ SvTreeListEntry* InsertCert( SvTreeListEntry* _pParent, const OUString& _rName,
cssu::Reference< dcss::security::XCertificate > rxCert,
bool bValid);
diff --git a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
index 6325282bb780..03ef04831e89 100644
--- a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
@@ -31,7 +31,7 @@
#include <xmlsecurity/sigstruct.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/XWriter.hpp>
#include <com/sun/star/xml/crypto/XUriBinding.hpp>
#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
#include <com/sun/star/xml/crypto/sax/XSecurityController.hpp>
@@ -112,7 +112,6 @@ private:
Link maStartVerifySignatureHdl;
private:
- void ImplCreateSEInitializer();
DECL_LINK( SignatureCreationResultListener, XMLSignatureCreationResult*);
DECL_LINK( SignatureVerifyResultListener, XMLSignatureVerifyResult* );
DECL_LINK( StartVerifySignatureElement, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >* );
@@ -179,7 +178,7 @@ public:
// MT: ??? I think only for adding/removing, not for new signatures...
// MM: Yes, but if you want to insert a new signature into an existing signature file, those function
// will be very usefull, see Mission 3 in the new "multisigdemo" program :-)
- ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler> CreateDocumentHandlerWithHeader( const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xOutputStream );
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XWriter> CreateDocumentHandlerWithHeader( const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xOutputStream );
void CloseDocumentHandler( const ::com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler>& xDocumentHandler );
void ExportSignature( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler >& xDocumentHandler, const SignatureInformation& signatureInfo );
};
diff --git a/xmlsecurity/qa/certext/SanCertExt.cxx b/xmlsecurity/qa/certext/SanCertExt.cxx
index 9c76d01e2ed8..f223bfb4abcb 100644
--- a/xmlsecurity/qa/certext/SanCertExt.cxx
+++ b/xmlsecurity/qa/certext/SanCertExt.cxx
@@ -22,7 +22,7 @@
#include <com/sun/star/security/XSanExtension.hpp>
#include <com/sun/star/security/ExtAltNameType.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
-#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
+#include <com/sun/star/xml/crypto/SEInitializer.hpp>
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#include <com/sun/star/security/XCertificate.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -44,7 +44,6 @@
using namespace com::sun::star;
#define OID_SUBJECT_ALTERNATIVE_NAME "2.5.29.17"
-#define SEINITIALIZER_COMPONENT "com.sun.star.xml.crypto.SEInitializer"
namespace {
@@ -129,8 +128,7 @@ namespace {
{
uno::Reference< uno::XComponentContext > context(connection_.getComponentContext(), uno::UNO_QUERY_THROW);
uno::Reference< lang::XMultiServiceFactory > factory(context->getServiceManager(), uno::UNO_QUERY_THROW);
- uno::Reference< xml::crypto::XSEInitializer > xSEInitializer(factory->createInstance(
- rtl::OUString::createFromAscii( SEINITIALIZER_COMPONENT )), uno::UNO_QUERY_THROW);
+ uno::Reference< xml::crypto::XSEInitializer > xSEInitializer = xml::crypto::SEInitializer::create(context);
uno::Reference< xml::crypto::XXMLSecurityContext > xSecurityContext(
xSEInitializer->createSecurityContext(rtl::OUString()));
return xSecurityContext->getSecurityEnvironment();
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 27a486dca6fd..cfc0db0f22f3 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -46,7 +46,7 @@ sal_uInt16 CertificateChooser::GetSelectedEntryPos( void ) const
{
sal_uInt16 nSel = INVAL_SEL;
- SvLBoxEntry* pSel = maCertLB.FirstSelected();
+ SvTreeListEntry* pSel = maCertLB.FirstSelected();
if( pSel )
nSel = (sal_uInt16) ( sal_uIntPtr ) pSel->GetUserData();
@@ -177,7 +177,7 @@ void CertificateChooser::ImplInitialize()
sEntry.append( XmlSec::GetContentPart( maCerts[ nC ]->getIssuerName() ) );
sEntry.append( '\t' );
sEntry.append( XmlSec::GetDateString( maCerts[ nC ]->getNotValidAfter() ) );
- SvLBoxEntry* pEntry = maCertLB.InsertEntry( sEntry.makeStringAndClear() );
+ SvTreeListEntry* pEntry = maCertLB.InsertEntry( sEntry.makeStringAndClear() );
pEntry->SetUserData( ( void* )(sal_IntPtr)nC ); // missuse user data as index
}
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 7a7486e229c8..de1076006189 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -223,7 +223,7 @@ void CertificateViewerDetailsTP::Clear( void )
{
maElementML.SetText( OUString() );
sal_uLong i = 0;
- SvLBoxEntry* pEntry = maElementsLB.GetEntry( i );
+ SvTreeListEntry* pEntry = maElementsLB.GetEntry( i );
while( pEntry )
{
delete ( Details_UserDatat* ) pEntry->GetUserData();
@@ -237,7 +237,7 @@ void CertificateViewerDetailsTP::Clear( void )
void CertificateViewerDetailsTP::InsertElement( const OUString& _rField, const OUString& _rValue,
const OUString& _rDetails, bool _bFixedWidthFont )
{
- SvLBoxEntry* pEntry = maElementsLB.InsertEntry( _rField );
+ SvTreeListEntry* pEntry = maElementsLB.InsertEntry( _rField );
maElementsLB.SetEntryText( _rValue, pEntry, 1 );
pEntry->SetUserData( ( void* ) new Details_UserDatat( _rDetails, _bFixedWidthFont ) );
}
@@ -335,7 +335,7 @@ void CertificateViewerDetailsTP::ActivatePage()
IMPL_LINK_NOARG(CertificateViewerDetailsTP, ElementSelectHdl)
{
- SvLBoxEntry* pEntry = maElementsLB.FirstSelected();
+ SvTreeListEntry* pEntry = maElementsLB.FirstSelected();
OUString aElementText;
bool bFixedWidthFont;
if( pEntry )
@@ -426,7 +426,7 @@ void CertificateViewerCertPathTP::ActivatePage()
const Reference< security::XCertificate >* pCertPath = aCertPath.getConstArray();
sal_Int32 i, nCnt = aCertPath.getLength();
- SvLBoxEntry* pParent = NULL;
+ SvTreeListEntry* pParent = NULL;
for( i = nCnt; i; )
{
const Reference< security::XCertificate > rCert = pCertPath[ --i ];
@@ -453,7 +453,7 @@ void CertificateViewerCertPathTP::ActivatePage()
IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl)
{
- SvLBoxEntry* pEntry = maCertPathLB.FirstSelected();
+ SvTreeListEntry* pEntry = maCertPathLB.FirstSelected();
if( pEntry )
{
CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, ((CertPath_UserData*)pEntry->GetUserData())->mxCert, false );
@@ -466,7 +466,7 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl)
IMPL_LINK_NOARG(CertificateViewerCertPathTP, CertSelectHdl)
{
OUString sStatus;
- SvLBoxEntry* pEntry = maCertPathLB.FirstSelected();
+ SvTreeListEntry* pEntry = maCertPathLB.FirstSelected();
if( pEntry )
{
CertPath_UserData* pData = (CertPath_UserData*) pEntry->GetUserData();
@@ -483,7 +483,7 @@ void CertificateViewerCertPathTP::Clear( void )
{
maCertStatusML.SetText( OUString() );
sal_uLong i = 0;
- SvLBoxEntry* pEntry = maCertPathLB.GetEntry( i );
+ SvTreeListEntry* pEntry = maCertPathLB.GetEntry( i );
while( pEntry )
{
delete ( CertPath_UserData* ) pEntry->GetUserData();
@@ -494,12 +494,12 @@ void CertificateViewerCertPathTP::Clear( void )
maCertPathLB.Clear();
}
-SvLBoxEntry* CertificateViewerCertPathTP::InsertCert(
- SvLBoxEntry* _pParent, const OUString& _rName, cssu::Reference< dcss::security::XCertificate > rxCert,
+SvTreeListEntry* CertificateViewerCertPathTP::InsertCert(
+ SvTreeListEntry* _pParent, const OUString& _rName, cssu::Reference< dcss::security::XCertificate > rxCert,
bool bValid)
{
Image aImage = bValid ? maCertImage : maCertNotValidatedImage;
- SvLBoxEntry* pEntry = maCertPathLB.InsertEntry( _rName, aImage, aImage, _pParent );
+ SvTreeListEntry* pEntry = maCertPathLB.InsertEntry( _rName, aImage, aImage, _pParent );
pEntry->SetUserData( ( void* ) new CertPath_UserData( rxCert, bValid ) );
return pEntry;
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 951ed3171c72..eb67af93f76d 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -39,7 +39,7 @@
#include <com/sun/star/security/SerialNumberAdapter.hpp>
#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
#include <com/sun/star/xml/dom/XDocumentBuilder.hpp>
-#include <com/sun/star/packages/manifest/XManifestReader.hpp>
+#include <com/sun/star/packages/manifest/ManifestReader.hpp>
#include <rtl/ustrbuf.hxx>
@@ -268,9 +268,8 @@ void DigitalSignaturesDialog::SetStorage( const com::sun::star::uno::Reference <
mxStore = rxStore;
maSignatureHelper.SetStorage( mxStore, m_sODFVersion);
- Reference < css::packages::manifest::XManifestReader > xReader(
- mxCtx->getServiceManager()->createInstanceWithContext(
- OUSTR("com.sun.star.packages.manifest.ManifestReader"), mxCtx), UNO_QUERY_THROW);
+ Reference < css::packages::manifest::XManifestReader > xReader =
+ css::packages::manifest::ManifestReader::create(mxCtx);
//Get the manifest.xml
Reference < css::embed::XStorage > xSubStore(rxStore->openStorageElement(
@@ -378,9 +377,10 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, OKButtonHdl)
embed::ElementModes::WRITE|embed::ElementModes::TRUNCATE, false );
uno::Reference< io::XOutputStream > xOutputStream(
aStreamHelper.xSignatureStream, uno::UNO_QUERY );
- uno::Reference< com::sun::star::xml::sax::XDocumentHandler> xDocumentHandler =
+ uno::Reference< com::sun::star::xml::sax::XWriter> xSaxWriter =
maSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream );
+ uno::Reference< xml::sax::XDocumentHandler> xDocumentHandler(xSaxWriter, UNO_QUERY_THROW);
size_t nInfos = maCurrentSignatureInformations.size();
for( size_t n = 0 ; n < nInfos ; ++n )
maSignatureHelper.ExportSignature(
@@ -471,10 +471,11 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, AddButtonHdl)
css::embed::ElementModes::WRITE|css::embed::ElementModes::TRUNCATE, true);
Reference< css::io::XOutputStream > xOutputStream(
aStreamHelper.xSignatureStream, UNO_QUERY_THROW);
- Reference< css::xml::sax::XDocumentHandler> xDocumentHandler =
+ Reference< css::xml::sax::XWriter> xSaxWriter =
maSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream );
// Export old signatures...
+ uno::Reference< xml::sax::XDocumentHandler> xDocumentHandler(xSaxWriter, UNO_QUERY_THROW);
size_t nInfos = maCurrentSignatureInformations.size();
for ( size_t n = 0; n < nInfos; n++ )
maSignatureHelper.ExportSignature( xDocumentHandler, maCurrentSignatureInformations[n]);
@@ -534,9 +535,10 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, RemoveButtonHdl)
css::embed::ElementModes::WRITE | css::embed::ElementModes::TRUNCATE, true);
Reference< css::io::XOutputStream > xOutputStream(
aStreamHelper.xSignatureStream, UNO_QUERY_THROW);
- Reference< css::xml::sax::XDocumentHandler> xDocumentHandler =
+ Reference< css::xml::sax::XWriter> xSaxWriter =
maSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream );
+ uno::Reference< xml::sax::XDocumentHandler> xDocumentHandler(xSaxWriter, UNO_QUERY_THROW);
size_t nInfos = maCurrentSignatureInformations.size();
for( size_t n = 0 ; n < nInfos ; ++n )
maSignatureHelper.ExportSignature( xDocumentHandler, maCurrentSignatureInformations[ n ] );
@@ -679,7 +681,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
aImage = maSigsValidImg.GetImage();
}
- SvLBoxEntry* pEntry = maSignaturesLB.InsertEntry( OUString(), aImage, aImage );
+ SvTreeListEntry* pEntry = maSignaturesLB.InsertEntry( OUString(), aImage, aImage );
maSignaturesLB.SetEntryText( aSubject, pEntry, 1 );
maSignaturesLB.SetEntryText( aIssuer, pEntry, 2 );
maSignaturesLB.SetEntryText( aDateTimeStr, pEntry, 3 );
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index c814c5968cba..3f5b37dc1d5c 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -34,7 +34,7 @@
#include <comphelper/processfactory.hxx>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
+#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <tools/urlobj.hxx>
@@ -228,9 +228,8 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, AddLocPBHdl)
{
try
{
- rtl::OUString aService( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) );
- uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
- uno::Reference < ui::dialogs::XFolderPicker > xFolderPicker( xFactory->createInstance( aService ), uno::UNO_QUERY );
+ uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ uno::Reference < ui::dialogs::XFolderPicker2 > xFolderPicker = ui::dialogs::FolderPicker::create(xContext);
short nRet = xFolderPicker->execute();
@@ -314,7 +313,7 @@ void MacroSecurityTrustedSourcesTP::FillCertLB( void )
// create from RawData
xCert = mpDlg->mxSecurityEnvironment->createCertificateFromAscii( rEntry[ 2 ] );
- SvLBoxEntry* pLBEntry = maTrustCertLB.InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
+ SvTreeListEntry* pLBEntry = maTrustCertLB.InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
maTrustCertLB.SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
maTrustCertLB.SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
pLBEntry->SetUserData( ( void* ) (sal_IntPtr)nEntry ); // missuse user data as index
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 26318d80e0a1..ca9ef0662171 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -36,13 +36,12 @@
#include <com/sun/star/security/SerialNumberAdapter.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
+#include <com/sun/star/xml/sax/Writer.hpp>
+#include <com/sun/star/xml/crypto/SEInitializer.hpp>
#include <tools/date.hxx>
#include <tools/time.hxx>
-/* SEInitializer component */
-#define SEINITIALIZER_COMPONENT "com.sun.star.xml.crypto.SEInitializer"
-
#define TAG_DOCUMENTSIGNATURES "document-signatures"
#define NS_DOCUMENTSIGNATURES "http://openoffice.org/2004/documentsignatures"
#define NS_DOCUMENTSIGNATURES_ODF_1_2 "urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0"
@@ -67,7 +66,7 @@ bool XMLSignatureHelper::Init()
DBG_ASSERT( !mxSEInitializer.is(), "XMLSignatureHelper::Init - mxSEInitializer already set!" );
DBG_ASSERT( !mxSecurityContext.is(), "XMLSignatureHelper::Init - mxSecurityContext already set!" );
- ImplCreateSEInitializer();
+ mxSEInitializer = com::sun::star::xml::crypto::SEInitializer::create( mxCtx );
if ( mxSEInitializer.is() )
mxSecurityContext = mxSEInitializer->createSecurityContext( ::rtl::OUString() );
@@ -75,14 +74,6 @@ bool XMLSignatureHelper::Init()
return mxSecurityContext.is();
}
-void XMLSignatureHelper::ImplCreateSEInitializer()
-{
- rtl::OUString sSEInitializer( SEINITIALIZER_COMPONENT );
- uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
- mxSEInitializer = uno::Reference< com::sun::star::xml::crypto::XSEInitializer > (
- xMCF->createInstanceWithContext( sSEInitializer, mxCtx ), uno::UNO_QUERY );
-}
-
void XMLSignatureHelper::SetStorage(
const Reference < css::embed::XStorage >& rxStorage,
::rtl::OUString sODFVersion)
@@ -150,18 +141,14 @@ void XMLSignatureHelper::AddForSigning( sal_Int32 nSecurityId, const rtl::OUStri
}
-uno::Reference<xml::sax::XDocumentHandler> XMLSignatureHelper::CreateDocumentHandlerWithHeader(
+uno::Reference<xml::sax::XWriter> XMLSignatureHelper::CreateDocumentHandlerWithHeader(
const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xOutputStream )
{
/*
* get SAX writer component
*/
uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
- uno::Reference< io::XActiveDataSource > xSaxWriter(
- xMCF->createInstanceWithContext(rtl::OUString(
- "com.sun.star.xml.sax.Writer"), mxCtx ), uno::UNO_QUERY );
-
- DBG_ASSERT( xSaxWriter.is(), "can't instantiate XML writer" );
+ uno::Reference< xml::sax::XWriter > xSaxWriter = xml::sax::Writer::create(mxCtx);
/*
* connect XML writer to output stream
@@ -169,12 +156,6 @@ uno::Reference<xml::sax::XDocumentHandler> XMLSignatureHelper::CreateDocumentHan
xSaxWriter->setOutputStream( xOutputStream );
/*
- * prepare document handler
- */
- uno::Reference<xml::sax::XDocumentHandler>
- xDocHandler( xSaxWriter,uno::UNO_QUERY);
-
- /*
* write the xml context for signatures
*/
rtl::OUString tag_AllSignatures(TAG_DOCUMENTSIGNATURES);
@@ -190,12 +171,12 @@ uno::Reference<xml::sax::XDocumentHandler> XMLSignatureHelper::CreateDocumentHan
rtl::OUString(ATTR_XMLNS),
sNamespace);
- xDocHandler->startDocument();
- xDocHandler->startElement(
+ xSaxWriter->startDocument();
+ xSaxWriter->startElement(
tag_AllSignatures,
uno::Reference< com::sun::star::xml::sax::XAttributeList > (pAttributeList));
- return xDocHandler;
+ return xSaxWriter;
}
void XMLSignatureHelper::CloseDocumentHandler( const uno::Reference<xml::sax::XDocumentHandler>& xDocumentHandler )
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 29dadaf5b37e..a1c01d304e52 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -53,7 +53,7 @@
#include <rtl/strbuf.hxx>
#include <osl/file.hxx>
#include <osl/thread.h>
-#include <rtl/logfile.hxx>
+#include <sal/log.hxx>
#include "seinitializer_nssimpl.hxx"
#include "../diagnose.hxx"
@@ -88,14 +88,14 @@ extern "C" void nsscrypto_finalize();
namespace
{
-bool nsscrypto_initialize( const css::uno::Reference< css::lang::XMultiServiceFactory > &xMSF, bool & out_nss_init );
+bool nsscrypto_initialize( const css::uno::Reference< css::uno::XComponentContext > &rxContext, bool & out_nss_init );
struct InitNSSInitialize
{
- css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
- InitNSSInitialize( const css::uno::Reference< css::lang::XMultiServiceFactory > &xMSF )
- : mxMSF( xMSF )
+ InitNSSInitialize( const css::uno::Reference< css::uno::XComponentContext > &rxContext )
+ : m_xContext( rxContext )
{
}
@@ -103,7 +103,7 @@ struct InitNSSInitialize
{
static bool bInitialized = false;
bool bNSSInit = false;
- bInitialized = nsscrypto_initialize( mxMSF, bNSSInit );
+ bInitialized = nsscrypto_initialize( m_xContext, bNSSInit );
if (bNSSInit)
atexit(nsscrypto_finalize );
return & bInitialized;
@@ -167,12 +167,17 @@ void deleteRootsModule()
}
}
-::rtl::OString getMozillaCurrentProfile( const css::uno::Reference< css::lang::XMultiServiceFactory > &rxMSF )
+::rtl::OString getMozillaCurrentProfile( const css::uno::Reference< css::uno::XComponentContext > &rxContext )
{
// first, try to get the profile from "MOZILLA_CERTIFICATE_FOLDER"
const char* pEnv = getenv("MOZILLA_CERTIFICATE_FOLDER");
if (pEnv)
+ {
+ SAL_INFO(
+ "xmlsecurity.xmlsec",
+ "Using Mozilla profile from MOZILLA_CERTIFICATE_FOLDER=" << pEnv);
return rtl::OString(pEnv);
+ }
// second, try to get saved user-preference
try
@@ -181,11 +186,19 @@ void deleteRootsModule()
officecfg::Office::Common::Security::Scripting::CertDir::get().get_value_or(rtl::OUString());
if (!sUserSetCertPath.isEmpty())
+ {
+ SAL_INFO(
+ "xmlsecurity.xmlsec",
+ "Using Mozilla profile from /org.openoffice.Office.Common/"
+ "Security/Scripting/CertDir: " << sUserSetCertPath);
return rtl::OUStringToOString(sUserSetCertPath, osl_getThreadTextEncoding());
+ }
}
catch (const uno::Exception &e)
{
- SAL_WARN("xmlsecurity", "getMozillaCurrentProfile: caught exception" << e.Message);
+ SAL_WARN(
+ "xmlsecurity.xmlsec",
+ "getMozillaCurrentProfile: caught exception " << e.Message);
}
// third, dig around to see if there's one available
@@ -195,8 +208,7 @@ void deleteRootsModule()
mozilla::MozillaProductType_Mozilla };
int nProduct = SAL_N_ELEMENTS(productTypes);
- uno::Reference<uno::XInterface> xInstance = rxMSF->createInstance(
- "com.sun.star.mozilla.MozillaBootstrap");
+ uno::Reference<uno::XInterface> xInstance = rxContext->getServiceManager()->createInstanceWithContext("com.sun.star.mozilla.MozillaBootstrap", rxContext);
OSL_ENSURE( xInstance.is(), "failed to create instance" );
uno::Reference<mozilla::XMozillaBootstrap> xMozillaBootstrap
@@ -212,13 +224,15 @@ void deleteRootsModule()
if (!profile.isEmpty())
{
rtl::OUString sProfilePath = xMozillaBootstrap->getProfilePath( productTypes[i], profile );
+ SAL_INFO(
+ "xmlsecurity.xmlsec",
+ "Using Mozilla profile " << sProfilePath);
return rtl::OUStringToOString(sProfilePath, osl_getThreadTextEncoding());
}
}
}
- RTL_LOGFILE_PRODUCT_TRACE( "XMLSEC: No Mozilla Profile found!" );
-
+ SAL_INFO("xmlsecurity.xmlsec", "No Mozilla profile found");
return rtl::OString();
}
@@ -243,7 +257,7 @@ void deleteRootsModule()
//return true - whole initialization was successful
//param out_nss_init = true: at least the NSS initialization (NSS_InitReadWrite
//was successful and therefor NSS_Shutdown should be called when terminating.
-bool nsscrypto_initialize( const css::uno::Reference< css::lang::XMultiServiceFactory > &xMSF, bool & out_nss_init )
+bool nsscrypto_initialize( const css::uno::Reference< css::uno::XComponentContext > &rxContext, bool & out_nss_init )
{
bool return_value = true;
@@ -251,9 +265,9 @@ bool nsscrypto_initialize( const css::uno::Reference< css::lang::XMultiServiceFa
rtl::OString sCertDir;
#ifdef XMLSEC_CRYPTO_NSS
- sCertDir = getMozillaCurrentProfile(xMSF);
+ sCertDir = getMozillaCurrentProfile(rxContext);
#else
- (void) xMSF;
+ (void) rxContext;
#endif
xmlsec_trace( "Using profile: %s", sCertDir.getStr() );
@@ -389,8 +403,8 @@ extern "C" void nsscrypto_finalize()
} // namespace
ONSSInitializer::ONSSInitializer(
- const css::uno::Reference< css::lang::XMultiServiceFactory > &rxMSF)
- :mxMSF( rxMSF )
+ const css::uno::Reference< css::uno::XComponentContext > &rxContext)
+ :m_xContext( rxContext )
{
}
@@ -398,10 +412,10 @@ ONSSInitializer::~ONSSInitializer()
{
}
-bool ONSSInitializer::initNSS( const css::uno::Reference< css::lang::XMultiServiceFactory > &xMSF )
+bool ONSSInitializer::initNSS( const css::uno::Reference< css::uno::XComponentContext > &rxContext )
{
return *rtl_Instance< bool, InitNSSInitialize, ::osl::MutexGuard, GetNSSInitStaticMutex >
- ::create( InitNSSInitialize( xMSF ), GetNSSInitStaticMutex() );
+ ::create( InitNSSInitialize( rxContext ), GetNSSInitStaticMutex() );
}
css::uno::Reference< css::xml::crypto::XDigestContext > SAL_CALL ONSSInitializer::getDigestContext( ::sal_Int32 nDigestID, const css::uno::Sequence< css::beans::NamedValue >& aParams )
@@ -431,7 +445,7 @@ css::uno::Reference< css::xml::crypto::XDigestContext > SAL_CALL ONSSInitializer
throw css::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unexpected arguments provided for digest creation." ) ), css::uno::Reference< css::uno::XInterface >(), 2 );
css::uno::Reference< css::xml::crypto::XDigestContext > xResult;
- if( initNSS( mxMSF ) )
+ if( initNSS( m_xContext ) )
{
PK11Context* pContext = PK11_CreateDigestContext( nNSSDigestID );
if ( pContext && PK11_DigestBegin( pContext ) == SECSuccess )
@@ -461,7 +475,7 @@ css::uno::Reference< css::xml::crypto::XCipherContext > SAL_CALL ONSSInitializer
throw css::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unexpected cipher requested." ) ), css::uno::Reference< css::uno::XInterface >(), 1 );
css::uno::Reference< css::xml::crypto::XCipherContext > xResult;
- if( initNSS( mxMSF ) )
+ if( initNSS( m_xContext ) )
{
if ( aInitializationVector.getLength() != PK11_GetIVLength( nNSSCipherID ) )
throw css::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unexpected length of initialization vector." ) ), css::uno::Reference< css::uno::XInterface >(), 3 );
@@ -497,7 +511,7 @@ cssu::Sequence< rtl::OUString > SAL_CALL ONSSInitializer_getSupportedServiceName
cssu::Reference< cssu::XInterface > SAL_CALL ONSSInitializer_createInstance( const cssu::Reference< cssl::XMultiServiceFactory > & rSMgr)
throw( cssu::Exception )
{
- return (cppu::OWeakObject*) new ONSSInitializer( rSMgr );
+ return (cppu::OWeakObject*) new ONSSInitializer( comphelper::getComponentContext(rSMgr) );
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
index d88344b991fe..4e6197d0e923 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
@@ -20,33 +20,31 @@
#ifndef _NSSINITIALIZER_HXX
#define _NSSINITIALIZER_HXX
-#include <com/sun/star/xml/crypto/XDigestContextSupplier.hpp>
-#include <com/sun/star/xml/crypto/XCipherContextSupplier.hpp>
+#include <com/sun/star/xml/crypto/XNSSInitializer.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase2.hxx>
#define NSS_SERVICE_NAME "com.sun.star.xml.crypto.NSSInitializer"
-class ONSSInitializer : public cppu::WeakImplHelper3
+class ONSSInitializer : public cppu::WeakImplHelper2
<
- ::com::sun::star::xml::crypto::XDigestContextSupplier,
- ::com::sun::star::xml::crypto::XCipherContextSupplier,
+ ::com::sun::star::xml::crypto::XNSSInitializer,
::com::sun::star::lang::XServiceInfo
>
{
protected:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
ONSSInitializer()
{}
public:
- ONSSInitializer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF );
+ ONSSInitializer( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext );
virtual ~ONSSInitializer();
- bool initNSS( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &xMSF );
+ bool initNSS( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext );
/* XDigestContextSupplier */
virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XDigestContext > SAL_CALL getDigestContext( ::sal_Int32 nDigestID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aParams ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 1d7280747c24..33a1ea3cc223 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -45,7 +45,7 @@
#include <cppuhelper/servicefactory.hxx>
#include <comphelper/docpasswordrequest.hxx>
#include <xmlsecurity/biginteger.hxx>
-#include <rtl/logfile.h>
+#include <sal/log.hxx>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <vector>
#include "boost/scoped_array.hpp"
@@ -236,7 +236,6 @@ const Sequence< sal_Int8>& SecurityEnvironment_NssImpl :: getUnoTunnelId() {
::rtl::OUString SecurityEnvironment_NssImpl::getSecurityEnvironmentInformation() throw( ::com::sun::star::uno::RuntimeException )
{
- rtl::OUString result;
::rtl::OUStringBuffer buff;
for (CIT_SLOTS is = m_Slots.begin(); is != m_Slots.end(); is++)
{
@@ -445,7 +444,10 @@ void SecurityEnvironment_NssImpl::updateSlots()
if(pSlot != NULL)
{
- RTL_LOGFILE_TRACE2( "XMLSEC: Found a slot: SlotName=%s, TokenName=%s", PK11_GetSlotName(pSlot), PK11_GetTokenName(pSlot) );
+ SAL_INFO(
+ "xmlsecurity.xmlsec",
+ "Found a slot: SlotName=" << PK11_GetSlotName(pSlot)
+ << ", TokenName=" << PK11_GetTokenName(pSlot));
//The following code which is commented out checks if a slot, that is a smart card for example, is
// able to generate a symmetric key of type CKM_DES3_CBC. If this fails then this token
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
index 53741dfae3eb..666e3490ba7f 100644
--- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
@@ -39,6 +39,7 @@
#undef DEBUG_WAS_DEFINED
#endif
+#include <comphelper/processfactory.hxx>
#include <sal/types.h>
#include <rtl/bootstrap.hxx>
#include <rtl/string.hxx>
@@ -59,7 +60,6 @@
namespace css = ::com::sun::star;
-namespace cssu = css::uno;
namespace cssl = css::lang;
namespace cssxc = css::xml::crypto;
@@ -72,11 +72,9 @@ using ::rtl::OString;
#define SECURITY_ENVIRONMENT "com.sun.star.xml.crypto.SecurityEnvironment"
#define SECURITY_CONTEXT "com.sun.star.xml.crypto.XMLSecurityContext"
- int nProduct = 4;
-SEInitializer_NssImpl::SEInitializer_NssImpl(
- const css::uno::Reference< css::lang::XMultiServiceFactory > &rxMSF )
+SEInitializer_NssImpl::SEInitializer_NssImpl( const css::uno::Reference< css::uno::XComponentContext > &rxContext )
{
- mxMSF = rxMSF;
+ m_xContext = rxContext;
}
SEInitializer_NssImpl::~SEInitializer_NssImpl()
@@ -84,13 +82,13 @@ SEInitializer_NssImpl::~SEInitializer_NssImpl()
}
/* XSEInitializer */
-cssu::Reference< cssxc::XXMLSecurityContext > SAL_CALL
+uno::Reference< cssxc::XXMLSecurityContext > SAL_CALL
SEInitializer_NssImpl::createSecurityContext( const ::rtl::OUString& )
- throw (cssu::RuntimeException)
+ throw (uno::RuntimeException)
{
CERTCertDBHandle *pCertHandle = NULL ;
- if( !initNSS( mxMSF ) )
+ if( !initNSS( m_xContext ) )
return NULL;
pCertHandle = CERT_GetDefaultCertDB() ;
@@ -99,13 +97,13 @@ cssu::Reference< cssxc::XXMLSecurityContext > SAL_CALL
{
/* Build XML Security Context */
const rtl::OUString sSecyrutyContext ( RTL_CONSTASCII_USTRINGPARAM( SECURITY_CONTEXT ) );
- cssu::Reference< cssxc::XXMLSecurityContext > xSecCtx( mxMSF->createInstance ( sSecyrutyContext ), cssu::UNO_QUERY );
+ uno::Reference< cssxc::XXMLSecurityContext > xSecCtx( m_xContext->getServiceManager()->createInstanceWithContext(sSecyrutyContext, m_xContext), uno::UNO_QUERY );
if( !xSecCtx.is() )
return NULL;
const rtl::OUString sSecyrutyEnvironment ( RTL_CONSTASCII_USTRINGPARAM( SECURITY_ENVIRONMENT ) );
- cssu::Reference< cssxc::XSecurityEnvironment > xSecEnv( mxMSF->createInstance ( sSecyrutyEnvironment ), cssu::UNO_QUERY );
- cssu::Reference< cssl::XUnoTunnel > xEnvTunnel( xSecEnv , cssu::UNO_QUERY ) ;
+ uno::Reference< cssxc::XSecurityEnvironment > xSecEnv( m_xContext->getServiceManager()->createInstanceWithContext(sSecyrutyEnvironment, m_xContext), uno::UNO_QUERY );
+ uno::Reference< cssl::XUnoTunnel > xEnvTunnel( xSecEnv , uno::UNO_QUERY ) ;
if( !xEnvTunnel.is() )
return NULL;
SecurityEnvironment_NssImpl* pSecEnv = reinterpret_cast<SecurityEnvironment_NssImpl*>(
@@ -118,7 +116,7 @@ cssu::Reference< cssxc::XXMLSecurityContext > SAL_CALL
xSecCtx->setDefaultSecurityEnvironmentIndex( n );
return xSecCtx;
}
- catch( cssu::Exception& )
+ catch( const uno::Exception& )
{
//PK11_LogoutAll();
//NSS_Shutdown();
@@ -126,8 +124,8 @@ cssu::Reference< cssxc::XXMLSecurityContext > SAL_CALL
}
}
-void SAL_CALL SEInitializer_NssImpl::freeSecurityContext( const cssu::Reference< cssxc::XXMLSecurityContext >& )
- throw (cssu::RuntimeException)
+void SAL_CALL SEInitializer_NssImpl::freeSecurityContext( const uno::Reference< cssxc::XXMLSecurityContext >& )
+ throw (uno::RuntimeException)
{
/*
* because the security context will free all its content when it
@@ -139,47 +137,47 @@ void SAL_CALL SEInitializer_NssImpl::freeSecurityContext( const cssu::Reference<
}
rtl::OUString SEInitializer_NssImpl_getImplementationName ()
- throw (cssu::RuntimeException)
+ throw (uno::RuntimeException)
{
return rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( IMPLEMENTATION_NAME ) );
}
sal_Bool SAL_CALL SEInitializer_NssImpl_supportsService( const rtl::OUString& ServiceName )
- throw (cssu::RuntimeException)
+ throw (uno::RuntimeException)
{
return ( ServiceName == SE_SERVICE_NAME || ServiceName == NSS_SERVICE_NAME );
}
-cssu::Sequence< rtl::OUString > SAL_CALL SEInitializer_NssImpl_getSupportedServiceNames( )
- throw (cssu::RuntimeException)
+uno::Sequence< rtl::OUString > SAL_CALL SEInitializer_NssImpl_getSupportedServiceNames( )
+ throw (uno::RuntimeException)
{
- cssu::Sequence < rtl::OUString > aRet(2);
+ uno::Sequence < rtl::OUString > aRet(2);
rtl::OUString* pArray = aRet.getArray();
pArray[0] = rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( SE_SERVICE_NAME ) );
pArray[1] = rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( NSS_SERVICE_NAME ) );
return aRet;
}
-cssu::Reference< cssu::XInterface > SAL_CALL SEInitializer_NssImpl_createInstance( const cssu::Reference< cssl::XMultiServiceFactory > & rSMgr)
- throw( cssu::Exception )
+uno::Reference< uno::XInterface > SAL_CALL SEInitializer_NssImpl_createInstance( const uno::Reference< lang::XMultiServiceFactory > & rxMSF)
+ throw( uno::Exception )
{
- return (cppu::OWeakObject*) new SEInitializer_NssImpl(rSMgr);
+ return (cppu::OWeakObject*) new SEInitializer_NssImpl(comphelper::getComponentContext(rxMSF));
}
/* XServiceInfo */
rtl::OUString SAL_CALL SEInitializer_NssImpl::getImplementationName( )
- throw (cssu::RuntimeException)
+ throw (uno::RuntimeException)
{
return SEInitializer_NssImpl_getImplementationName();
}
sal_Bool SAL_CALL SEInitializer_NssImpl::supportsService( const rtl::OUString& rServiceName )
- throw (cssu::RuntimeException)
+ throw (uno::RuntimeException)
{
return SEInitializer_NssImpl_supportsService( rServiceName );
}
-cssu::Sequence< rtl::OUString > SAL_CALL SEInitializer_NssImpl::getSupportedServiceNames( )
- throw (cssu::RuntimeException)
+uno::Sequence< rtl::OUString > SAL_CALL SEInitializer_NssImpl::getSupportedServiceNames( )
+ throw (uno::RuntimeException)
{
return SEInitializer_NssImpl_getSupportedServiceNames();
}
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
index 35e6f2f92367..f75f8dbb8e83 100644
--- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
@@ -36,7 +36,7 @@ class SEInitializer_NssImpl : public cppu::ImplInheritanceHelper1
>
{
public:
- SEInitializer_NssImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF );
+ SEInitializer_NssImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext );
virtual ~SEInitializer_NssImpl();
/* XSEInitializer */
@@ -70,7 +70,7 @@ com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL SEInitializer_NssImpl_ge
throw ( ::com::sun::star::uno::RuntimeException );
com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL SEInitializer_NssImpl_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
+SAL_CALL SEInitializer_NssImpl_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rxMSF)
throw ( ::com::sun::star::uno::Exception );
#endif
diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx
index 3276d17c2d86..dbf1b3704702 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.cxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.cxx
@@ -62,7 +62,6 @@ const xmlChar** attrlist_to_nxmlstr( const cssu::Sequence< cssxcsax::XMLAttribut
xmlChar* attname = NULL ;
xmlChar* attvalue = NULL ;
const xmlChar** attrs = NULL ;
- rtl::OUString oustr ;
sal_Int32 nLength = aAttributes.getLength();
diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx
index 1653b8fbadbc..59f7f3b29efd 100644
--- a/xmlsecurity/workben/signaturetest.cxx
+++ b/xmlsecurity/workben/signaturetest.cxx
@@ -96,7 +96,7 @@ void Main();
}
comphelper::setProcessServiceFactory( xMSF );
- InitVCL( xMSF );
+ InitVCL();
::Main();
DeInitVCL();