Index: source/component/documentdigitalsignatures.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/component/documentdigitalsignatures.cxx,v retrieving revision 1.28 retrieving revision 1.28.30.2 diff -u -r1.28 -r1.28.30.2 --- source/component/documentdigitalsignatures.cxx 16 Sep 2006 14:34:35 -0000 1.28 +++ source/component/documentdigitalsignatures.cxx 6 Feb 2007 16:38:10 -0000 1.28.30.2 @@ -34,8 +34,8 @@ ************************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" +#include "precompiled_xmlsecurity.hxx" #include #include @@ -97,6 +97,8 @@ #endif #include + + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; namespace css = ::com::sun::star; @@ -304,7 +306,7 @@ if ( rSigInfo.SignatureIsValid ) { // Can only be valid if ALL streams are signed, which means real stream count == signed stream count - int nRealCount = 0; + unsigned int nRealCount = 0; for ( int i = rInfo.vSignatureReferenceInfors.size(); i; ) { const SignatureReferenceInformation& rInf = rInfo.vSignatureReferenceInfors[--i]; @@ -360,7 +362,6 @@ ::rtl::OUString sSerialNum = bigIntegerToNumericString( Author->getSerialNumber() ); Sequence< SvtSecurityOptions::Certificate > aTrustedAuthors = SvtSecurityOptions().GetTrustedAuthors(); - sal_Int32 nCnt = aTrustedAuthors.getLength(); const SvtSecurityOptions::Certificate* pAuthors = aTrustedAuthors.getConstArray(); const SvtSecurityOptions::Certificate* pAuthorsEnd = pAuthors + aTrustedAuthors.getLength(); for ( ; pAuthors != pAuthorsEnd; ++pAuthors ) @@ -384,11 +385,18 @@ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentProvider > xContentProvider; ::ucb::ContentBroker* pBroker = NULL; - if ( aLocObj.GetProtocol() == INET_PROT_FILE && ( pBroker = ::ucb::ContentBroker::get() ) ) - xContentProvider = pBroker->getContentProviderInterface(); - Sequence< ::rtl::OUString > aSecURLs = SvtSecurityOptions().GetSecureURLs(); - sal_Int32 nCnt = aSecURLs.getLength(); + //warning free code + //if ( aLocObj.GetProtocol() == INET_PROT_FILE && ( pBroker = ::ucb::ContentBroker::get() ) ) + // xContentProvider = pBroker->getContentProviderInterface(); + if ( aLocObj.GetProtocol() == INET_PROT_FILE) + { + pBroker = ::ucb::ContentBroker::get(); + if (pBroker) + xContentProvider = pBroker->getContentProviderInterface(); + } + + Sequence< ::rtl::OUString > aSecURLs = SvtSecurityOptions().GetSecureURLs(); const ::rtl::OUString* pSecURLs = aSecURLs.getConstArray(); const ::rtl::OUString* pSecURLsEnd = pSecURLs + aSecURLs.getLength(); for ( ; pSecURLs != pSecURLsEnd && !bFound; ++pSecURLs ) Index: source/component/registerservices.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/component/registerservices.cxx,v retrieving revision 1.3 retrieving revision 1.3.30.1 diff -u -r1.3 -r1.3.30.1 --- source/component/registerservices.cxx 16 Sep 2006 14:34:50 -0000 1.3 +++ source/component/registerservices.cxx 5 Feb 2007 13:54:17 -0000 1.3.30.1 @@ -51,12 +51,12 @@ extern "C" { -void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) +void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey ) +sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) { if (pRegistryKey) { @@ -82,7 +82,7 @@ return sal_False; } -void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) +void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void* pRet = NULL; Index: source/dialogs/certificateviewer.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/dialogs/certificateviewer.cxx,v retrieving revision 1.21 retrieving revision 1.21.30.1 diff -u -r1.21 -r1.21.30.1 --- source/dialogs/certificateviewer.cxx 16 Sep 2006 14:35:18 -0000 1.21 +++ source/dialogs/certificateviewer.cxx 6 Feb 2007 16:38:10 -0000 1.21.30.1 @@ -76,7 +76,7 @@ _rCtrl.SetPosPixel( _rStartIn_EndOut ); _rStartIn_EndOut.X() += XmlSec::ShrinkToFitWidth( _rCtrl, _nOffs ); } -}; +} CertificateViewer::CertificateViewer( Window* _pParent, Index: source/dialogs/digitalsignaturesdialog.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx,v retrieving revision 1.27 retrieving revision 1.27.30.1 diff -u -r1.27 -r1.27.30.1 --- source/dialogs/digitalsignaturesdialog.cxx 16 Sep 2006 14:35:31 -0000 1.27 +++ source/dialogs/digitalsignaturesdialog.cxx 5 Feb 2007 13:54:18 -0000 1.27.30.1 @@ -467,7 +467,7 @@ if ( bSigValid ) { // Can only be valid if ALL streams are signed, which means real stream count == signed stream count - int nRealCount = 0; + unsigned int nRealCount = 0; for ( int i = rInfo.vSignatureReferenceInfors.size(); i; ) { const SignatureReferenceInformation& rInf = rInfo.vSignatureReferenceInfors[--i]; Index: source/dialogs/macrosecurity.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/dialogs/macrosecurity.cxx,v retrieving revision 1.27 retrieving revision 1.27.30.1 diff -u -r1.27 -r1.27.30.1 --- source/dialogs/macrosecurity.cxx 16 Sep 2006 14:35:45 -0000 1.27 +++ source/dialogs/macrosecurity.cxx 5 Feb 2007 13:54:18 -0000 1.27.30.1 @@ -91,7 +91,7 @@ using namespace ::com::sun::star; -IMPL_LINK( MacroSecurity, OkBtnHdl, void*, EMTYARG ) +IMPL_LINK( MacroSecurity, OkBtnHdl, void*, EMPTYARG ) { mpLevelTP->ClosePage(); mpTrustSrcTP->ClosePage(); @@ -188,7 +188,7 @@ } -IMPL_LINK( MacroSecurityLevelTP, RadioButtonHdl, RadioButton*, EMTYARG ) +IMPL_LINK( MacroSecurityLevelTP, RadioButtonHdl, RadioButton*, EMPTYARG ) { USHORT nNewLevel = 0; if( maVeryHighRB.IsChecked() ) @@ -223,7 +223,7 @@ } -IMPL_LINK( MacroSecurityTrustedSourcesTP, ViewCertPBHdl, void*, EMTYARG ) +IMPL_LINK( MacroSecurityTrustedSourcesTP, ViewCertPBHdl, void*, EMPTYARG ) { if( maTrustCertLB.FirstSelected() ) { @@ -245,7 +245,7 @@ return 0; } -IMPL_LINK( MacroSecurityTrustedSourcesTP, RemoveCertPBHdl, void*, EMTYARG ) +IMPL_LINK( MacroSecurityTrustedSourcesTP, RemoveCertPBHdl, void*, EMPTYARG ) { if( maTrustCertLB.FirstSelected() ) { @@ -259,7 +259,7 @@ return 0; } -IMPL_LINK( MacroSecurityTrustedSourcesTP, AddLocPBHdl, void*, EMTYARG ) +IMPL_LINK( MacroSecurityTrustedSourcesTP, AddLocPBHdl, void*, EMPTYARG ) { try { @@ -300,7 +300,7 @@ return 0; } -IMPL_LINK( MacroSecurityTrustedSourcesTP, RemoveLocPBHdl, void*, EMTYARG ) +IMPL_LINK( MacroSecurityTrustedSourcesTP, RemoveLocPBHdl, void*, EMPTYARG ) { USHORT nSel = maTrustFileLocLB.GetSelectEntryPos(); if( nSel != LISTBOX_ENTRY_NOTFOUND ) @@ -322,13 +322,13 @@ return 0; } -IMPL_LINK( MacroSecurityTrustedSourcesTP, TrustCertLBSelectHdl, void*, EMTYARG ) +IMPL_LINK( MacroSecurityTrustedSourcesTP, TrustCertLBSelectHdl, void*, EMPTYARG ) { ImplCheckButtons(); return 0; } -IMPL_LINK( MacroSecurityTrustedSourcesTP, TrustFileLocLBSelectHdl, void*, EMTYARG ) +IMPL_LINK( MacroSecurityTrustedSourcesTP, TrustFileLocLBSelectHdl, void*, EMPTYARG ) { ImplCheckButtons(); return 0; Index: source/dialogs/resourcemanager.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/dialogs/resourcemanager.cxx,v retrieving revision 1.11 retrieving revision 1.11.30.2 diff -u -r1.11 -r1.11.30.2 --- source/dialogs/resourcemanager.cxx 16 Sep 2006 14:35:59 -0000 1.11 +++ source/dialogs/resourcemanager.cxx 6 Feb 2007 16:38:10 -0000 1.11.30.2 @@ -150,8 +150,8 @@ if( c == cEqualSign ) e = _bPreserveId? PRE_CONT : CONT; break; -// case EQUALSIGN: -// break; + case EQUALSIGN: + break; case PRE_CONT: if( c != cSpace ) { @@ -193,7 +193,7 @@ xub_StrLen nContStart = _rRawString.Search( _rPartId ); if( nContStart != STRING_NOTFOUND ) { - nContStart += _rPartId.Len(); + nContStart = nContStart + _rPartId.Len(); ++nContStart; // now it's start of content, directly after Id xub_StrLen nContEnd = _rRawString.Search( sal_Unicode( ',' ), nContStart ); @@ -214,7 +214,7 @@ { // search over some parts to find a string //static char* aIDs[] = { "CN", "OU", "O", "E", NULL }; - static char* aIDs[] = { "CN=", "OU=", "O=", "E=", NULL };// By CP + static char const * aIDs[] = { "CN=", "OU=", "O=", "E=", NULL };// By CP String sPart; int i = 0; while ( aIDs[i] ) @@ -223,7 +223,7 @@ xub_StrLen nContStart = _rRawString.Search( sPartId ); if ( nContStart != STRING_NOTFOUND ) { - nContStart += sPartId.Len(); + nContStart = nContStart + sPartId.Len(); //++nContStart; // now it's start of content, directly after Id // delete By CP xub_StrLen nContEnd = _rRawString.Search( sal_Unicode( ',' ), nContStart ); sPart = String( _rRawString, nContStart, nContEnd - nContStart ); Index: source/framework/buffernode.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/buffernode.cxx,v retrieving revision 1.4 retrieving revision 1.4.30.1 diff -u -r1.4 -r1.4.30.1 --- source/framework/buffernode.cxx 16 Sep 2006 14:36:42 -0000 1.4 +++ source/framework/buffernode.cxx 5 Feb 2007 13:54:18 -0000 1.4.30.1 @@ -49,10 +49,10 @@ namespace cssxc = com::sun::star::xml::crypto; BufferNode::BufferNode( const cssu::Reference< cssxw::XXMLElementWrapper >& xXMLElement ) - :m_xXMLElement(xXMLElement), - m_pParent(NULL), + :m_pParent(NULL), m_pBlocker(NULL), - m_bAllReceived(false) + m_bAllReceived(false), + m_xXMLElement(xXMLElement) { } Index: source/framework/decryptorimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/decryptorimpl.cxx,v retrieving revision 1.5 retrieving revision 1.5.30.1 diff -u -r1.5 -r1.5.30.1 --- source/framework/decryptorimpl.cxx 16 Sep 2006 14:36:56 -0000 1.5 +++ source/framework/decryptorimpl.cxx 5 Feb 2007 13:54:18 -0000 1.5.30.1 @@ -191,7 +191,7 @@ tryToPerform(); } -void SAL_CALL DecryptorImpl::removeDecryptionResultListener( const cssu::Reference< cssxc::sax::XDecryptionResultListener >& listener ) +void SAL_CALL DecryptorImpl::removeDecryptionResultListener( const cssu::Reference< cssxc::sax::XDecryptionResultListener >&) throw (cssu::RuntimeException) { } @@ -200,8 +200,7 @@ void SAL_CALL DecryptorImpl::initialize( const cssu::Sequence< cssu::Any >& aArguments ) throw (cssu::Exception, cssu::RuntimeException) { - sal_Int32 nLength = aArguments.getLength(); - OSL_ASSERT(nLength == 5); + OSL_ASSERT(aArguments.getLength() == 5); rtl::OUString ouTempString; Index: source/framework/elementcollector.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/elementcollector.cxx,v retrieving revision 1.4 retrieving revision 1.4.30.1 diff -u -r1.4 -r1.4.30.1 --- source/framework/elementcollector.cxx 16 Sep 2006 14:37:19 -0000 1.4 +++ source/framework/elementcollector.cxx 5 Feb 2007 13:54:18 -0000 1.4.30.1 @@ -58,9 +58,9 @@ :ElementMark(nSecurityId, nBufferId), m_nPriority(nPriority), m_bToModify(bToModify), - m_xReferenceResolvedListener(xReferenceResolvedListener), m_bAbleToNotify(false), - m_bNotified(false) + m_bNotified(false), + m_xReferenceResolvedListener(xReferenceResolvedListener) /****** ElementCollector/ElementCollector ************************************* * * NAME Index: source/framework/elementmark.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/elementmark.cxx,v retrieving revision 1.4 retrieving revision 1.4.30.1 diff -u -r1.4 -r1.4.30.1 --- source/framework/elementmark.cxx 16 Sep 2006 14:37:33 -0000 1.4 +++ source/framework/elementmark.cxx 5 Feb 2007 13:54:19 -0000 1.4.30.1 @@ -42,9 +42,9 @@ namespace cssxc = com::sun::star::xml::crypto; ElementMark::ElementMark(sal_Int32 nSecurityId, sal_Int32 nBufferId) - :m_nSecurityId(nSecurityId), + :m_pBufferNode(NULL), + m_nSecurityId(nSecurityId), m_nBufferId(nBufferId), - m_pBufferNode(NULL), m_type(cssxc::sax::ElementMarkType_ELEMENTMARK) /****** ElementMark/ElementMark *********************************************** * Index: source/framework/encryptionengine.hxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/encryptionengine.hxx,v retrieving revision 1.2 retrieving revision 1.2.118.1 diff -u -r1.2 -r1.2.118.1 --- source/framework/encryptionengine.hxx 9 Sep 2005 17:16:54 -0000 1.2 +++ source/framework/encryptionengine.hxx 5 Feb 2007 13:54:19 -0000 1.2.118.1 @@ -116,8 +116,7 @@ * for a Decryptor, decryption operation is performed. */ virtual void startEngine( const com::sun::star::uno::Reference< - com::sun::star::xml::crypto::XXMLEncryptionTemplate >& - xEncryptionTemplate) + com::sun::star::xml::crypto::XXMLEncryptionTemplate >&) throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException) {}; Index: source/framework/encryptorimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/encryptorimpl.cxx,v retrieving revision 1.6 retrieving revision 1.6.30.1 diff -u -r1.6 -r1.6.30.1 --- source/framework/encryptorimpl.cxx 16 Sep 2006 14:38:00 -0000 1.6 +++ source/framework/encryptorimpl.cxx 5 Feb 2007 13:54:19 -0000 1.6.30.1 @@ -201,7 +201,7 @@ } /* XReferenceCollector */ -void SAL_CALL EncryptorImpl::setReferenceCount( sal_Int32 count ) +void SAL_CALL EncryptorImpl::setReferenceCount(sal_Int32) throw (cssu::Exception, cssu::RuntimeException) { /* @@ -225,7 +225,7 @@ tryToPerform(); } -void SAL_CALL EncryptorImpl::removeEncryptionResultListener( const cssu::Reference< cssxc::sax::XEncryptionResultListener >& listener ) +void SAL_CALL EncryptorImpl::removeEncryptionResultListener( const cssu::Reference< cssxc::sax::XEncryptionResultListener >&) throw (cssu::RuntimeException) { } @@ -234,8 +234,7 @@ void SAL_CALL EncryptorImpl::initialize( const cssu::Sequence< cssu::Any >& aArguments ) throw (cssu::Exception, cssu::RuntimeException) { - sal_Int32 nLength = aArguments.getLength(); - OSL_ASSERT(nLength == 5); + OSL_ASSERT(aArguments.getLength() == 5); rtl::OUString ouTempString; Index: source/framework/saxeventkeeperimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/saxeventkeeperimpl.cxx,v retrieving revision 1.4 retrieving revision 1.4.30.1 diff -u -r1.4 -r1.4.30.1 --- source/framework/saxeventkeeperimpl.cxx 16 Sep 2006 14:38:19 -0000 1.4 +++ source/framework/saxeventkeeperimpl.cxx 5 Feb 2007 13:54:19 -0000 1.4.30.1 @@ -61,13 +61,13 @@ #define _USECOMPRESSEDDOCUMENTHANDLER SAXEventKeeperImpl::SAXEventKeeperImpl( ) - :m_nNextElementMarkId(1), + :m_pRootBufferNode(NULL), + m_pCurrentBufferNode(NULL), + m_nNextElementMarkId(1), m_pNewBlocker(NULL), m_pCurrentBlockingBufferNode(NULL), - m_pRootBufferNode(NULL), - m_pCurrentBufferNode(NULL), - m_bIsForwarding(false), - m_bIsReleasing(false) + m_bIsReleasing(false), + m_bIsForwarding(false) { m_vElementMarkBuffers.reserve(2); m_vNewElementCollectors.reserve(2); @@ -1216,8 +1216,8 @@ } void SAL_CALL SAXEventKeeperImpl::removeReferenceResolvedListener( - sal_Int32 referenceId, - const cssu::Reference< cssxc::sax::XReferenceResolvedListener >& listener ) + sal_Int32 /*referenceId*/, + const cssu::Reference< cssxc::sax::XReferenceResolvedListener >&) throw (cssu::RuntimeException) { } @@ -1231,7 +1231,7 @@ } void SAL_CALL SAXEventKeeperImpl::removeSAXEventKeeperStatusChangeListener( - const cssu::Reference< cssxc::sax::XSAXEventKeeperStatusChangeListener >& listener ) + const cssu::Reference< cssxc::sax::XSAXEventKeeperStatusChangeListener >&) throw (cssu::RuntimeException) { } @@ -1409,7 +1409,7 @@ } } -void SAL_CALL SAXEventKeeperImpl::setDocumentLocator( const cssu::Reference< cssxs::XLocator >& xLocator ) +void SAL_CALL SAXEventKeeperImpl::setDocumentLocator( const cssu::Reference< cssxs::XLocator >&) throw (cssxs::SAXException, cssu::RuntimeException) { } @@ -1418,9 +1418,7 @@ void SAL_CALL SAXEventKeeperImpl::initialize( const cssu::Sequence< cssu::Any >& aArguments ) throw (cssu::Exception, cssu::RuntimeException) { - sal_Int32 nLength = aArguments.getLength(); - - OSL_ASSERT(nLength == 1); + OSL_ASSERT(aArguments.getLength() == 1); aArguments[0] >>= m_xXMLDocument; m_xDocumentHandler = cssu::Reference< cssxs::XDocumentHandler >( @@ -1455,7 +1453,7 @@ #undef SERVICE_NAME cssu::Reference< cssu::XInterface > SAL_CALL SAXEventKeeperImpl_createInstance( - const cssu::Reference< cssl::XMultiServiceFactory > & rSMgr) + const cssu::Reference< cssl::XMultiServiceFactory > &) throw( cssu::Exception ) { return (cppu::OWeakObject*) new SAXEventKeeperImpl(); Index: source/framework/securityengine.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/securityengine.cxx,v retrieving revision 1.5 retrieving revision 1.5.30.1 diff -u -r1.5 -r1.5.30.1 --- source/framework/securityengine.cxx 16 Sep 2006 14:38:33 -0000 1.5 +++ source/framework/securityengine.cxx 5 Feb 2007 13:54:19 -0000 1.5.30.1 @@ -53,8 +53,8 @@ SecurityEngine::SecurityEngine( const cssu::Reference< cssl::XMultiServiceFactory >& rxMSF ) :mxMSF( rxMSF ), m_nIdOfTemplateEC(-1), - m_nIdOfKeyEC(-1), m_nNumOfResolvedReferences(0), + m_nIdOfKeyEC(-1), m_bMissionDone(false), m_nSecurityId(-1), m_nStatus(::com::sun::star::xml::crypto::SecurityOperationStatus_UNKNOWN) @@ -62,7 +62,7 @@ } /* XReferenceResolvedListener */ -void SAL_CALL SecurityEngine::referenceResolved( sal_Int32 referenceId ) +void SAL_CALL SecurityEngine::referenceResolved( sal_Int32 /*referenceId*/) throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException) { m_nNumOfResolvedReferences++; Index: source/framework/signaturecreatorimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/signaturecreatorimpl.cxx,v retrieving revision 1.6 retrieving revision 1.6.30.1 diff -u -r1.6 -r1.6.30.1 --- source/framework/signaturecreatorimpl.cxx 16 Sep 2006 14:38:47 -0000 1.6 +++ source/framework/signaturecreatorimpl.cxx 5 Feb 2007 13:54:19 -0000 1.6.30.1 @@ -241,7 +241,7 @@ } void SAL_CALL SignatureCreatorImpl::removeSignatureCreationResultListener( - const cssu::Reference< cssxc::sax::XSignatureCreationResultListener >& listener ) + const cssu::Reference< cssxc::sax::XSignatureCreationResultListener >&) throw (cssu::RuntimeException) { } @@ -250,8 +250,7 @@ void SAL_CALL SignatureCreatorImpl::initialize( const cssu::Sequence< cssu::Any >& aArguments ) throw (cssu::Exception, cssu::RuntimeException) { - sal_Int32 nLength = aArguments.getLength(); - OSL_ASSERT(nLength == 5); + OSL_ASSERT(aArguments.getLength() == 5); rtl::OUString ouTempString; Index: source/framework/signatureengine.hxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/signatureengine.hxx,v retrieving revision 1.2 retrieving revision 1.2.118.1 diff -u -r1.2 -r1.2.118.1 --- source/framework/signatureengine.hxx 9 Sep 2005 17:19:51 -0000 1.2 +++ source/framework/signatureengine.hxx 5 Feb 2007 13:54:19 -0000 1.2.118.1 @@ -145,8 +145,7 @@ * for a SignatureVerifier, verification operation is performed. */ virtual void startEngine( const com::sun::star::uno::Reference< - com::sun::star::xml::crypto::XXMLSignatureTemplate >& - xSignatureTemplate) + com::sun::star::xml::crypto::XXMLSignatureTemplate >&) throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException) {}; Index: source/framework/signatureverifierimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/signatureverifierimpl.cxx,v retrieving revision 1.5 retrieving revision 1.5.30.1 diff -u -r1.5 -r1.5.30.1 --- source/framework/signatureverifierimpl.cxx 16 Sep 2006 14:39:15 -0000 1.5 +++ source/framework/signatureverifierimpl.cxx 5 Feb 2007 13:54:19 -0000 1.5.30.1 @@ -184,7 +184,7 @@ } void SAL_CALL SignatureVerifierImpl::removeSignatureVerifyResultListener( - const cssu::Reference< cssxc::sax::XSignatureVerifyResultListener >& listener ) + const cssu::Reference< cssxc::sax::XSignatureVerifyResultListener >&) throw (cssu::RuntimeException) { } @@ -194,8 +194,7 @@ const cssu::Sequence< cssu::Any >& aArguments ) throw (cssu::Exception, cssu::RuntimeException) { - sal_Int32 nLength = aArguments.getLength(); - OSL_ASSERT(nLength == 5); + OSL_ASSERT(aArguments.getLength() == 5); rtl::OUString ouTempString; Index: source/framework/xmlencryptiontemplateimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx,v retrieving revision 1.5 retrieving revision 1.5.30.1 diff -u -r1.5 -r1.5.30.1 --- source/framework/xmlencryptiontemplateimpl.cxx 16 Sep 2006 14:39:29 -0000 1.5 +++ source/framework/xmlencryptiontemplateimpl.cxx 5 Feb 2007 13:54:20 -0000 1.5.30.1 @@ -57,9 +57,9 @@ using ::com::sun::star::xml::crypto::XXMLEncryptionTemplate ; XMLEncryptionTemplateImpl :: XMLEncryptionTemplateImpl( const Reference< XMultiServiceFactory >& aFactory ) - : m_xServiceManager( aFactory ), - m_xTemplate( NULL ), - m_xTarget( NULL ), + : m_xTemplate( NULL ), + m_xTarget( NULL ), + m_xServiceManager( aFactory ), m_nStatus ( ::com::sun::star::xml::crypto::SecurityOperationStatus_UNKNOWN ) { } @@ -107,7 +107,8 @@ } /* XInitialization */ -void SAL_CALL XMLEncryptionTemplateImpl :: initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException ) { +void SAL_CALL XMLEncryptionTemplateImpl :: initialize( const Sequence< Any >& /*aArguments*/ ) + throw( Exception, RuntimeException ) { // TBD } ; Index: source/framework/xmlsignaturetemplateimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx,v retrieving revision 1.5 retrieving revision 1.5.30.1 diff -u -r1.5 -r1.5.30.1 --- source/framework/xmlsignaturetemplateimpl.cxx 16 Sep 2006 14:39:43 -0000 1.5 +++ source/framework/xmlsignaturetemplateimpl.cxx 5 Feb 2007 13:54:20 -0000 1.5.30.1 @@ -61,8 +61,8 @@ using ::com::sun::star::xml::crypto::XXMLSignatureTemplate ; XMLSignatureTemplateImpl :: XMLSignatureTemplateImpl( const Reference< XMultiServiceFactory >& aFactory ) - :m_xServiceManager( aFactory ), - m_xTemplate( NULL ), + :m_xTemplate( NULL ), + m_xServiceManager( aFactory ), m_nStatus ( ::com::sun::star::xml::crypto::SecurityOperationStatus_UNKNOWN ) { } @@ -136,7 +136,7 @@ } /* XInitialization */ -void SAL_CALL XMLSignatureTemplateImpl :: initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException ) { +void SAL_CALL XMLSignatureTemplateImpl :: initialize( const Sequence< Any >& /*aArguments*/ ) throw( Exception, RuntimeException ) { // TBD } ; Index: source/framework/xsec_framework.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/framework/xsec_framework.cxx,v retrieving revision 1.3 retrieving revision 1.3.30.1 diff -u -r1.3 -r1.3.30.1 --- source/framework/xsec_framework.cxx 16 Sep 2006 14:39:57 -0000 1.3 +++ source/framework/xsec_framework.cxx 5 Feb 2007 13:54:20 -0000 1.3.30.1 @@ -64,14 +64,14 @@ { //================================================================================================== void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) + const sal_Char ** ppEnvTypeName, uno_Environment **) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } //================================================================================================== sal_Bool SAL_CALL component_writeInfo( - void * pServiceManager, void * pRegistryKey ) + void * /*pServiceManager*/, void * pRegistryKey ) { if (pRegistryKey) { @@ -148,7 +148,7 @@ //================================================================================================== void * SAL_CALL component_getFactory( - const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) + const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; Index: source/helper/documentsignaturehelper.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/helper/documentsignaturehelper.cxx,v retrieving revision 1.7 retrieving revision 1.7.30.1 diff -u -r1.7 -r1.7.30.1 --- source/helper/documentsignaturehelper.cxx 16 Sep 2006 14:40:11 -0000 1.7 +++ source/helper/documentsignaturehelper.cxx 5 Feb 2007 13:54:20 -0000 1.7.30.1 @@ -82,7 +82,7 @@ } } -std::vector< rtl::OUString > DocumentSignatureHelper::CreateElementList( const uno::Reference < embed::XStorage >& rxStore, const ::rtl::OUString rRootStorageName, DocumentSignatureMode eMode ) +std::vector< rtl::OUString > DocumentSignatureHelper::CreateElementList( const uno::Reference < embed::XStorage >& rxStore, const ::rtl::OUString /*rRootStorageName*/, DocumentSignatureMode eMode ) { std::vector< rtl::OUString > aElements; ::rtl::OUString aSep( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); @@ -124,8 +124,8 @@ { if ( ( pNames[n].match( aMatchStr ) ) && rxStore->isStorageElement( pNames[n] ) ) { - uno::Reference < embed::XStorage > xSubStore = rxStore->openStorageElement( pNames[n], embed::ElementModes::READ ); - ImplFillElementList( aElements, xSubStore, pNames[n]+aSep, true ); + uno::Reference < embed::XStorage > xTmpSubStore = rxStore->openStorageElement( pNames[n], embed::ElementModes::READ ); + ImplFillElementList( aElements, xTmpSubStore, pNames[n]+aSep, true ); } } } Index: source/helper/xmlsignaturehelper.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/helper/xmlsignaturehelper.cxx,v retrieving revision 1.25 retrieving revision 1.25.30.1 diff -u -r1.25 -r1.25.30.1 --- source/helper/xmlsignaturehelper.cxx 16 Sep 2006 14:40:25 -0000 1.25 +++ source/helper/xmlsignaturehelper.cxx 5 Feb 2007 13:54:20 -0000 1.25.30.1 @@ -258,11 +258,12 @@ /* * create a signature listener */ +/* ImplXMLSignatureListener* pSignatureListener = new ImplXMLSignatureListener( LINK( this, XMLSignatureHelper, SignatureCreationResultListener ), LINK( this, XMLSignatureHelper, SignatureVerifyResultListener ), LINK( this, XMLSignatureHelper, StartVerifySignatureElement ) ); - +*/ /* * configure the signature creation listener */ Index: source/helper/xmlsignaturehelper2.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/helper/xmlsignaturehelper2.cxx,v retrieving revision 1.7 retrieving revision 1.7.30.1 diff -u -r1.7 -r1.7.30.1 --- source/helper/xmlsignaturehelper2.cxx 16 Sep 2006 14:40:38 -0000 1.7 +++ source/helper/xmlsignaturehelper2.cxx 5 Feb 2007 13:54:20 -0000 1.7.30.1 @@ -173,7 +173,7 @@ } -void SAL_CALL UriBindingHelper::setUriBinding( const rtl::OUString& uri, const uno::Reference< io::XInputStream >& aInputStream ) +void SAL_CALL UriBindingHelper::setUriBinding( const rtl::OUString& /*uri*/, const uno::Reference< io::XInputStream >&) throw (uno::Exception, uno::RuntimeException) { } Index: source/helper/xsecctl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/helper/xsecctl.cxx,v retrieving revision 1.9 retrieving revision 1.9.30.1 diff -u -r1.9 -r1.9.30.1 --- source/helper/xsecctl.cxx 16 Sep 2006 14:40:51 -0000 1.9 +++ source/helper/xsecctl.cxx 5 Feb 2007 13:54:21 -0000 1.9.30.1 @@ -80,9 +80,9 @@ XSecController::XSecController( ) :m_nNextSecurityId(1), - m_bIsSAXEventKeeperSticky(false), m_bIsSAXEventKeeperConnected(false), m_nStatusOfSecurityComponents(UNINITIALIZED), + m_bIsSAXEventKeeperSticky(false), m_pErrorMessage(NULL), m_pXSecParser(NULL) { @@ -99,7 +99,7 @@ /** convert string to number with optional min and max values */ sal_Bool XSecController::convertNumber( sal_Int32& rValue, const rtl::OUString& rString, - sal_Int32 nMin, sal_Int32 nMax ) + sal_Int32 /*nMin*/, sal_Int32 /*nMax*/ ) { sal_Bool bNeg = sal_False; rValue = 0; @@ -1494,7 +1494,7 @@ checkChainingStatus(); } -void SAL_CALL XSecController::bufferStatusChanged( sal_Bool isBufferEmpty ) +void SAL_CALL XSecController::bufferStatusChanged( sal_Bool /*isBufferEmpty*/) throw (cssu::RuntimeException) { /* Index: source/helper/xsecsign.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/helper/xsecsign.cxx,v retrieving revision 1.9 retrieving revision 1.9.30.1 diff -u -r1.9 -r1.9.30.1 --- source/helper/xsecsign.cxx 16 Sep 2006 14:41:19 -0000 1.9 +++ source/helper/xsecsign.cxx 5 Feb 2007 13:54:21 -0000 1.9.30.1 @@ -236,7 +236,7 @@ } } -void XSecController::signAStream( sal_Int32 securityId, const rtl::OUString& uri, const rtl::OUString& objectURL, sal_Bool isBinary) +void XSecController::signAStream( sal_Int32 securityId, const rtl::OUString& uri, const rtl::OUString& /*objectURL*/, sal_Bool isBinary) { sal_Int32 type = ((isBinary==sal_True)?TYPE_BINARYSTREAM_REFERENCE:TYPE_XMLSTREAM_REFERENCE); Index: source/xmlsec/biginteger.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/biginteger.cxx,v retrieving revision 1.5 retrieving revision 1.5.30.1 diff -u -r1.5 -r1.5.30.1 --- source/xmlsec/biginteger.cxx 16 Sep 2006 14:41:59 -0000 1.5 +++ source/xmlsec/biginteger.cxx 5 Feb 2007 13:54:21 -0000 1.5.30.1 @@ -60,13 +60,13 @@ if( xmlSecBnInitialize( &bn, 0 ) < 0 ) { xmlFree( chNumeral ) ; - return NULL ; + return Sequence< sal_Int8 >(); } if( xmlSecBnFromDecString( &bn, chNumeral ) < 0 ) { xmlFree( chNumeral ) ; xmlSecBnFinalize( &bn ) ; - return NULL ; + return Sequence< sal_Int8 >(); } xmlFree( chNumeral ) ; @@ -74,13 +74,13 @@ length = xmlSecBnGetSize( &bn ) ; if( length <= 0 ) { xmlSecBnFinalize( &bn ) ; - return NULL ; + return Sequence< sal_Int8 >(); } bnInteger = xmlSecBnGetData( &bn ) ; if( bnInteger == NULL ) { xmlSecBnFinalize( &bn ) ; - return NULL ; + return Sequence< sal_Int8 >(); } Sequence< sal_Int8 > integer( length ) ; @@ -93,7 +93,7 @@ return integer ; } - return NULL ; + return Sequence< sal_Int8 >(); } OUString bigIntegerToNumericString ( Sequence< sal_Int8 > integer ) Index: source/xmlsec/certificateextension_xmlsecimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx,v retrieving revision 1.4 retrieving revision 1.4.30.1 diff -u -r1.4 -r1.4.30.1 --- source/xmlsec/certificateextension_xmlsecimpl.cxx 16 Sep 2006 14:42:13 -0000 1.4 +++ source/xmlsec/certificateextension_xmlsecimpl.cxx 5 Feb 2007 13:54:21 -0000 1.4.30.1 @@ -93,7 +93,7 @@ m_xExtnValue = extnv ; } else { - m_xExtnValue = NULL ; + m_xExtnValue = Sequence(); } if( id != NULL && idlen != 0 ) { @@ -103,7 +103,7 @@ m_xExtnId = extnId ; } else { - m_xExtnId = NULL ; + m_xExtnId = Sequence(); } m_critical = critical ; Index: source/xmlsec/errorcallback.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/errorcallback.cxx,v retrieving revision 1.7 retrieving revision 1.7.30.2 diff -u -r1.7 -r1.7.30.2 --- source/xmlsec/errorcallback.cxx 16 Sep 2006 14:42:40 -0000 1.7 +++ source/xmlsec/errorcallback.cxx 6 Feb 2007 16:38:11 -0000 1.7.30.2 @@ -154,20 +154,22 @@ // } // } -void errorCallback(const char *file, - int line, - const char *func, - const char *errorObject, - const char *errorSubject, - int reason, - const char *msg) + +extern "C" +void errorCallback(const char * /*file*/, + int /*line*/, + const char * /*func*/, + const char * /*errorObject*/, + const char * /*errorSubject*/, + int /*reason*/, + const char * /*msg*/) { #if OSL_DEBUG_LEVEL > 1 - const char * afunc = func ? func : ""; - const char * errObj = errorObject ? errorObject : ""; - const char * errSub = errorSubject ? errorSubject : ""; - const char * amsg = msg ? msg : ""; - fprintf(stdout, "xmlsec error: %s, %s, %s, %i %s \n", afunc, errObj, errSub, reason, amsg); +// const char * afunc = func ? func : ""; +// const char * errObj = errorObject ? errorObject : ""; +// const char * errSub = errorSubject ? errorSubject : ""; +// const char * amsg = msg ? msg : ""; +// fprintf(stdout, "xmlsec error: %s, %s, %s, %i %s \n", afunc, errObj, errSub, reason, amsg); #endif //ToDo write log message // if (g_xErrorRecorder.is() && !g_bErrorRecorded) Index: source/xmlsec/saxhelper.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/saxhelper.cxx,v retrieving revision 1.4 retrieving revision 1.4.30.1 diff -u -r1.4 -r1.4.30.1 --- source/xmlsec/saxhelper.cxx 16 Sep 2006 14:42:53 -0000 1.4 +++ source/xmlsec/saxhelper.cxx 5 Feb 2007 13:54:21 -0000 1.4.30.1 @@ -431,7 +431,7 @@ * In this case, locator is useless. */ void SAXHelper::setDocumentLocator( - const cssu::Reference< cssxs::XLocator > & xLocator ) + const cssu::Reference< cssxs::XLocator > &) throw( cssxs::SAXException , cssu::RuntimeException ) { //--Pseudo code if necessary Index: source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx,v retrieving revision 1.4 retrieving revision 1.4.30.2 diff -u -r1.4 -r1.4.30.2 --- source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx 16 Sep 2006 14:43:07 -0000 1.4 +++ source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx 6 Feb 2007 16:38:11 -0000 1.4.30.2 @@ -95,7 +95,7 @@ /* * creates the virtual root element */ - saxHelper.startElement(rtl::OUString(RTL_UTF8_USTRINGPARAM( "root" )), NULL); + saxHelper.startElement(rtl::OUString(RTL_UTF8_USTRINGPARAM( "root" )), cssu::Sequence()); m_pRootElement = saxHelper.getCurrentNode(); m_pCurrentElement = m_pRootElement; @@ -505,8 +505,10 @@ } XMLElementWrapper_XmlSecImpl* pElement - = ( XMLElementWrapper_XmlSecImpl* )xNodTunnel->getSomething( - XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; + = reinterpret_cast( + sal::static_int_cast( + xNodTunnel->getSomething( + XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ))) ; if( pElement == NULL ) { throw cssu::RuntimeException() ; @@ -593,7 +595,6 @@ break; default: throw cssu::RuntimeException(); - break; } pChild = pNextSibling; @@ -970,7 +971,6 @@ break; default: throw cssu::RuntimeException(); - break; } if (xSAXEventKeeper->isBlocking()) @@ -1111,7 +1111,7 @@ processingInstruction( aTarget, aData ); } -void SAL_CALL XMLDocumentWrapper_XmlSecImpl::_setDocumentLocator( sal_Int32 columnNumber, sal_Int32 lineNumber, const rtl::OUString& publicId, const rtl::OUString& systemId ) +void SAL_CALL XMLDocumentWrapper_XmlSecImpl::_setDocumentLocator( sal_Int32 /*columnNumber*/, sal_Int32 /*lineNumber*/, const rtl::OUString& /*publicId*/, const rtl::OUString& /*systemId*/ ) throw (cssxs::SAXException, cssu::RuntimeException) { } @@ -1139,7 +1139,7 @@ #undef SERVICE_NAME cssu::Reference< cssu::XInterface > SAL_CALL XMLDocumentWrapper_XmlSecImpl_createInstance( - const cssu::Reference< cssl::XMultiServiceFactory > & rSMgr) + const cssu::Reference< cssl::XMultiServiceFactory > &) throw( cssu::Exception ) { return (cppu::OWeakObject*) new XMLDocumentWrapper_XmlSecImpl( ); Index: source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx,v retrieving revision 1.3 retrieving revision 1.3.30.1 diff -u -r1.3 -r1.3.30.1 --- source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx 16 Sep 2006 14:43:21 -0000 1.3 +++ source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx 5 Feb 2007 13:54:22 -0000 1.3.30.1 @@ -115,7 +115,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL XMLElementWrapper_XmlSecImpl_createInstance( - const cssu::Reference< cssl::XMultiServiceFactory > & rSMgr) + const cssu::Reference< cssl::XMultiServiceFactory > &) throw( cssu::Exception ) { return (cppu::OWeakObject*) new XMLElementWrapper_XmlSecImpl(NULL); Index: source/xmlsec/xmlstreamio.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/xmlstreamio.cxx,v retrieving revision 1.3 retrieving revision 1.3.30.1 diff -u -r1.3 -r1.3.30.1 --- source/xmlsec/xmlstreamio.cxx 16 Sep 2006 14:43:35 -0000 1.3 +++ source/xmlsec/xmlstreamio.cxx 6 Feb 2007 16:38:11 -0000 1.3.30.1 @@ -61,6 +61,7 @@ ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XUriBinding > m_xUriBinding ; +extern "C" int xmlStreamMatch( const char* uri ) { ::com::sun::star::uno::Reference< com::sun::star::io::XInputStream > xInputStream ; @@ -78,6 +79,7 @@ return 0 ; } +extern "C" void* xmlStreamOpen( const char* uri ) { ::com::sun::star::uno::Reference< com::sun::star::io::XInputStream > xInputStream ; @@ -99,6 +101,7 @@ return NULL ; } +extern "C" int xmlStreamRead( void* context, char* buffer, int len ) { int numbers ; @@ -123,6 +126,7 @@ return numbers ; } +extern "C" int xmlStreamClose( void * context ) { ::com::sun::star::io::XInputStream* pInputStream ; Index: source/xmlsec/xsec_xmlsec.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx,v retrieving revision 1.3 retrieving revision 1.3.30.1 diff -u -r1.3 -r1.3.30.1 --- source/xmlsec/xsec_xmlsec.cxx 16 Sep 2006 14:43:49 -0000 1.3 +++ source/xmlsec/xsec_xmlsec.cxx 5 Feb 2007 13:54:22 -0000 1.3.30.1 @@ -70,7 +70,7 @@ #endif void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) + const sal_Char ** ppEnvTypeName, uno_Environment **) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } Index: source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx,v retrieving revision 1.13 retrieving revision 1.13.28.1 diff -u -r1.13 -r1.13.28.1 --- source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx 16 Sep 2006 14:44:02 -0000 1.13 +++ source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx 6 Feb 2007 16:38:11 -0000 1.13.28.1 @@ -36,6 +36,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmlsecurity.hxx" +#pragma warning(push,1) +#include "Windows.h" +#include "WinCrypt.h" +#pragma warning(pop) + #ifndef _SAL_CONFIG_H_ #include #endif @@ -52,9 +57,6 @@ #include #endif -#include "Windows.h" -#include "WinCrypt.h" - #include #include #include @@ -136,7 +138,7 @@ } /* XInitialization */ -void SAL_CALL SecurityEnvironment_MSCryptImpl :: initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException ) { +void SAL_CALL SecurityEnvironment_MSCryptImpl :: initialize( const Sequence< Any >& /*aArguments*/ ) throw( Exception, RuntimeException ) { //TODO } ; @@ -451,15 +453,17 @@ sal_Int32 length ; X509Certificate_MSCryptImpl* xcert ; std::list< X509Certificate_MSCryptImpl* > certsList ; - PCCERT_CONTEXT pCertContext ; + PCCERT_CONTEXT pCertContext = NULL; //firstly, we try to find private keys in given key store. if( m_hKeyStore != NULL ) { - pCertContext = NULL ; - while( pCertContext = CertEnumCertificatesInStore( m_hKeyStore, pCertContext ) ) { + pCertContext = CertEnumCertificatesInStore( m_hKeyStore, pCertContext ); + while (pCertContext) + { xcert = MswcryCertContextToXCert( pCertContext ) ; if( xcert != NULL ) certsList.push_back( xcert ) ; + pCertContext = CertEnumCertificatesInStore( m_hKeyStore, pCertContext ); } } @@ -485,8 +489,9 @@ */ hSystemKeyStore = CertOpenSystemStore( 0, "MY" ) ; if( hSystemKeyStore != NULL ) { - pCertContext = NULL ; - while( pCertContext = CertEnumCertificatesInStore( hSystemKeyStore, pCertContext ) ) { + pCertContext = CertEnumCertificatesInStore( hSystemKeyStore, pCertContext ); + while (pCertContext) + { // Add By CP for checking whether the certificate is a personal certificate or not. if(!(CryptAcquireCertificatePrivateKey(pCertContext, CRYPT_ACQUIRE_COMPARE_KEY_FLAG, @@ -496,6 +501,7 @@ NULL))) { // Not Privatekey found. SKIP this one; By CP + pCertContext = CertEnumCertificatesInStore( hSystemKeyStore, pCertContext ); continue; } // then TODO : Check the personal cert is valid or not. @@ -504,6 +510,7 @@ xcert = MswcryCertContextToXCert( pCertContext ) ; if( xcert != NULL ) certsList.push_back( xcert ) ; + pCertContext = CertEnumCertificatesInStore( hSystemKeyStore, pCertContext ); } } @@ -529,7 +536,7 @@ Reference< XCertificate > SecurityEnvironment_MSCryptImpl :: getCertificate( const OUString& issuerName, const Sequence< sal_Int8 >& serialNumber ) throw( SecurityException , RuntimeException ) { unsigned int i ; - sal_Int8 found = 0 ; +// sal_Int8 found = 0 ; LPSTR pszName ; X509Certificate_MSCryptImpl *xcert = NULL ; PCCERT_CONTEXT pCertContext = NULL ; @@ -559,9 +566,9 @@ return NULL ; } - if( !( certInfo.Issuer.pbData = ( BYTE* )malloc( certInfo.Issuer.cbData ) ) ) { + certInfo.Issuer.pbData = ( BYTE* )malloc( certInfo.Issuer.cbData ); + if(!certInfo.Issuer.pbData) throw RuntimeException() ; - } if( ! ( CertStrToName( X509_ASN_ENCODING | PKCS_7_ASN_ENCODING , @@ -577,7 +584,8 @@ //Get the SerialNumber cryptSerialNumber.cbData = serialNumber.getLength() ; - if( !( cryptSerialNumber.pbData = ( BYTE* )malloc( cryptSerialNumber.cbData ) ) ) + cryptSerialNumber.pbData = ( BYTE* )malloc( cryptSerialNumber.cbData); + if (!cryptSerialNumber.pbData) { free( certInfo.Issuer.pbData ) ; throw RuntimeException() ; @@ -801,18 +809,18 @@ hAdditionalStore = NULL; //CertGetCertificateChain searches by default in MY, CA, ROOT and TRUST - if( ! (bChain = CertGetCertificateChain( - NULL , - pCertContext , - NULL , //use current system time - hAdditionalStore, - &chainPara , - CERT_CHAIN_REVOCATION_CHECK_CHAIN | CERT_CHAIN_TIMESTAMP_TIME , - NULL , - &pChainContext))) - { - pChainContext = NULL ; - } + bChain = CertGetCertificateChain( + NULL , + pCertContext , + NULL , //use current system time + hAdditionalStore, + &chainPara , + CERT_CHAIN_REVOCATION_CHECK_CHAIN | CERT_CHAIN_TIMESTAMP_TIME , + NULL , + &pChainContext); + if (!bChain) + pChainContext = NULL; + //Close the additional store CertCloseStore(hCollectionStore, CERT_CLOSE_STORE_CHECK_FLAG); } @@ -959,18 +967,19 @@ hAdditionalStore = NULL; //CertGetCertificateChain searches by default in MY, CA, ROOT and TRUST - if( !(bChain = CertGetCertificateChain( - NULL , - pCertContext , - NULL , //use current system time - hAdditionalStore, - &chainPara , - CERT_CHAIN_REVOCATION_CHECK_CHAIN | CERT_CHAIN_TIMESTAMP_TIME , - NULL , - &pChainContext))) - { - pChainContext = NULL ; - } + bChain = CertGetCertificateChain( + NULL , + pCertContext , + NULL , //use current system time + hAdditionalStore, + &chainPara , + CERT_CHAIN_REVOCATION_CHECK_CHAIN | CERT_CHAIN_TIMESTAMP_TIME , + NULL , + &pChainContext); + + if (!bChain) + pChainContext = NULL; + //Close the additional store CertCloseStore(hCollectionStore, CERT_CLOSE_STORE_CHECK_FLAG); } Index: source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx,v retrieving revision 1.6 retrieving revision 1.6.118.1 diff -u -r1.6 -r1.6.118.1 --- source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx 9 Sep 2005 17:30:08 -0000 1.6 +++ source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx 6 Feb 2007 16:38:12 -0000 1.6.118.1 @@ -36,6 +36,11 @@ #ifndef _XSECURITYENVIRONMENT_MSCRYPTIMPL_HXX_ #define _XSECURITYENVIRONMENT_MSCRYPTIMPL_HXX_ +#pragma warning(push,1) +#include +#include +#pragma warning(pop) + #ifndef _SAL_CONFIG_H_ #include #endif @@ -93,10 +98,6 @@ #endif #include - -#include -#include - #include "xmlsec/xmlsec.h" class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper4< Index: source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx,v retrieving revision 1.4 retrieving revision 1.4.30.1 diff -u -r1.4 -r1.4.30.1 --- source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx 16 Sep 2006 14:44:16 -0000 1.4 +++ source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx 6 Feb 2007 16:38:12 -0000 1.4.30.1 @@ -169,7 +169,7 @@ } } -void SAL_CALL SEInitializer_MSCryptImpl::freeSecurityContext( const cssu::Reference< cssxc::XXMLSecurityContext >& securityContext ) +void SAL_CALL SEInitializer_MSCryptImpl::freeSecurityContext( const cssu::Reference< cssxc::XXMLSecurityContext >&) throw (cssu::RuntimeException) { /* Index: source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx,v retrieving revision 1.10 retrieving revision 1.10.30.1 diff -u -r1.10 -r1.10.30.1 --- source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx 16 Sep 2006 14:44:30 -0000 1.10 +++ source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx 6 Feb 2007 16:38:12 -0000 1.10.30.1 @@ -326,7 +326,7 @@ if( xExtn == NULL ) throw RuntimeException() ; - xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, ( unsigned char* )pExtn->pszObjId, strlen( pExtn->pszObjId ), pExtn->fCritical ) ; + xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, ( unsigned char* )pExtn->pszObjId, strlen( pExtn->pszObjId ), sal::static_int_cast(pExtn->fCritical) ) ; xExtns[i] = xExtn ; } @@ -337,7 +337,7 @@ } } -::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificateExtension > SAL_CALL X509Certificate_MSCryptImpl :: findCertificateExtension( const ::com::sun::star::uno::Sequence< sal_Int8 >& oid ) throw (::com::sun::star::uno::RuntimeException) { +::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificateExtension > SAL_CALL X509Certificate_MSCryptImpl :: findCertificateExtension( const ::com::sun::star::uno::Sequence< sal_Int8 >& /*oid*/ ) throw (::com::sun::star::uno::RuntimeException) { if( m_pCertContext != NULL && m_pCertContext->pCertInfo != NULL && m_pCertContext->pCertInfo->cExtension != 0 ) { CertificateExtension_XmlSecImpl* xExtn ; CERT_EXTENSION* pExtn ; @@ -353,7 +353,7 @@ if( xExtn == NULL ) throw RuntimeException() ; - xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, ( unsigned char* )pExtn->pszObjId, strlen( pExtn->pszObjId ), pExtn->fCritical ) ; + xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, ( unsigned char* )pExtn->pszObjId, strlen( pExtn->pszObjId ), sal::static_int_cast(pExtn->fCritical) ) ; } } Index: source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx,v retrieving revision 1.5 retrieving revision 1.5.118.1 diff -u -r1.5 -r1.5.118.1 --- source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx 9 Sep 2005 17:31:16 -0000 1.5 +++ source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx 6 Feb 2007 16:38:12 -0000 1.5.118.1 @@ -36,6 +36,11 @@ #ifndef _X509CERTIFICATE_MSCRYPTIMPL_HXX_ #define _X509CERTIFICATE_MSCRYPTIMPL_HXX_ +#pragma warning(push,1) +#include "Windows.h" +#include "WinCrypt.h" +#pragma warning(pop) + #ifndef _SAL_CONFIG_H_ #include #endif @@ -67,9 +72,6 @@ #ifndef _COM_SUN_STAR_SECURITY_XCERTIFICATE_HPP_ #include #endif - -#include "Windows.h" -#include "WinCrypt.h" class X509Certificate_MSCryptImpl : public ::cppu::WeakImplHelper2< ::com::sun::star::security::XCertificate , Index: source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx,v retrieving revision 1.7 retrieving revision 1.7.30.1 diff -u -r1.7 -r1.7.30.1 --- source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx 16 Sep 2006 14:44:44 -0000 1.7 +++ source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx 6 Feb 2007 16:38:12 -0000 1.7.30.1 @@ -104,7 +104,6 @@ xmlSecKeysMngrPtr pMngr = NULL ; xmlSecEncCtxPtr pEncCtx = NULL ; xmlNodePtr pEncryptedData = NULL ; - xmlNodePtr pEncryptedKey = NULL ; xmlNodePtr pContent = NULL ; if( !aTemplate.is() ) @@ -240,7 +239,6 @@ xmlSecKeysMngrPtr pMngr = NULL ; xmlSecEncCtxPtr pEncCtx = NULL ; xmlNodePtr pEncryptedData = NULL ; - xmlNodePtr pContent = NULL ; if( !aTemplate.is() ) throw RuntimeException() ; @@ -360,7 +358,7 @@ } /* XInitialization */ -void SAL_CALL XMLEncryption_MSCryptImpl :: initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException ) { +void SAL_CALL XMLEncryption_MSCryptImpl :: initialize( const Sequence< Any >& /*aArguments*/ ) throw( Exception, RuntimeException ) { // TBD } ; Index: source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx,v retrieving revision 1.4 retrieving revision 1.4.30.1 diff -u -r1.4 -r1.4.30.1 --- source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx 16 Sep 2006 14:44:58 -0000 1.4 +++ source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx 6 Feb 2007 16:38:12 -0000 1.4.30.1 @@ -147,7 +147,7 @@ return 0; } -void SAL_CALL XMLSecurityContext_MSCryptImpl::setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) +void SAL_CALL XMLSecurityContext_MSCryptImpl::setDefaultSecurityEnvironmentIndex( sal_Int32 /*nDefaultEnvIndex*/ ) throw (::com::sun::star::uno::RuntimeException) { //dummy @@ -274,7 +274,7 @@ #endif /* XInitialization */ -void SAL_CALL XMLSecurityContext_MSCryptImpl :: initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException ) { +void SAL_CALL XMLSecurityContext_MSCryptImpl :: initialize( const Sequence< Any >& /*aArguments*/ ) throw( Exception, RuntimeException ) { // TBD } ; Index: source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx,v retrieving revision 1.7 retrieving revision 1.7.30.1 diff -u -r1.7 -r1.7.30.1 --- source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx 16 Sep 2006 14:45:13 -0000 1.7 +++ source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx 6 Feb 2007 16:38:13 -0000 1.7.30.1 @@ -306,7 +306,7 @@ } /* XInitialization */ -void SAL_CALL XMLSignature_MSCryptImpl :: initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException ) { +void SAL_CALL XMLSignature_MSCryptImpl :: initialize( const Sequence< Any >& /*aArguments*/ ) throw( Exception, RuntimeException ) { // TBD } ; Index: source/xmlsec/mscrypt/xsec_mscrypt.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx,v retrieving revision 1.3 retrieving revision 1.3.30.1 diff -u -r1.3 -r1.3.30.1 --- source/xmlsec/mscrypt/xsec_mscrypt.cxx 16 Sep 2006 14:45:27 -0000 1.3 +++ source/xmlsec/mscrypt/xsec_mscrypt.cxx 6 Feb 2007 16:38:13 -0000 1.3.30.1 @@ -62,7 +62,7 @@ extern "C" { -sal_Bool SAL_CALL mscrypt_component_writeInfo( void* pServiceManager , void* pRegistryKey ) +sal_Bool SAL_CALL mscrypt_component_writeInfo( void* /*pServiceManager*/ , void* pRegistryKey ) { sal_Bool result = sal_False; sal_Int32 i ; @@ -142,7 +142,7 @@ return result; } -void* SAL_CALL mscrypt_component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* pRegistryKey ) +void* SAL_CALL mscrypt_component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* /*pRegistryKey*/ ) { void* pRet = 0; Reference< XSingleServiceFactory > xFactory ; Index: source/xmlsec/nss/makefile.mk =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/nss/makefile.mk,v retrieving revision 1.6 retrieving revision 1.6.118.1 diff -u -r1.6 -r1.6.118.1 --- source/xmlsec/nss/makefile.mk 9 Sep 2005 17:33:26 -0000 1.6 +++ source/xmlsec/nss/makefile.mk 5 Feb 2007 13:54:22 -0000 1.6.118.1 @@ -99,21 +99,21 @@ $(MOZ_INC)$/profile \ -I$(MOZ_INC)$/string \ -I$(MOZ_INC)$/embed_base -.IF "$(OS)" == "LINUX" -CFLAGS += -fPIC -g -CFLAGSCXX += \ - -fno-rtti -Wall -Wconversion -Wpointer-arith \ - -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -pthread -CDEFS += -DTRACING -.ELIF "$(OS)" == "NETBSD" -CFLAGS += -fPIC -CFLAGSCXX += \ - -fno-rtti -Wall -Wconversion -Wpointer-arith \ - -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -CDEFS += -DTRACING -.ENDIF +#.IF "$(OS)" == "LINUX" +#CFLAGS += -fPIC -g +#CFLAGSCXX += \ +# -fno-rtti -Wall -Wconversion -Wpointer-arith \ +# -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \ +# -Wno-long-long -pthread +#CDEFS += -DTRACING +#.ELIF "$(OS)" == "NETBSD" +#CFLAGS += -fPIC +#CFLAGSCXX += \ +# -fno-rtti -Wall -Wconversion -Wpointer-arith \ +# -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \ +# -Wno-long-long +#CDEFS += -DTRACING +#.ENDIF .ENDIF CDEFS += -DXMLSEC_CRYPTO_NSS -DXMLSEC_NO_XSLT Index: source/xmlsec/nss/securityenvironment_nssimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx,v retrieving revision 1.16 retrieving revision 1.16.30.1 diff -u -r1.16 -r1.16.30.1 --- source/xmlsec/nss/securityenvironment_nssimpl.cxx 16 Sep 2006 14:45:40 -0000 1.16 +++ source/xmlsec/nss/securityenvironment_nssimpl.cxx 5 Feb 2007 13:54:22 -0000 1.16.30.1 @@ -97,7 +97,7 @@ extern X509Certificate_NssImpl* NssCertToXCert( CERTCertificate* cert ) ; extern X509Certificate_NssImpl* NssPrivKeyToXCert( SECKEYPrivateKey* ) ; -char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* arg ) +char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ ) { uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); if ( xMSF.is() ) @@ -127,7 +127,7 @@ return NULL; } -SecurityEnvironment_NssImpl :: SecurityEnvironment_NssImpl( const Reference< XMultiServiceFactory >& aFactory ) : +SecurityEnvironment_NssImpl :: SecurityEnvironment_NssImpl( const Reference< XMultiServiceFactory >& ) : m_pHandler( NULL ) , m_tSymKeyList() , m_tPubKeyList() , m_tPriKeyList() { PK11_SetPasswordFunc( GetPasswordFunction ) ; @@ -165,7 +165,7 @@ } /* XInitialization */ -void SAL_CALL SecurityEnvironment_NssImpl :: initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException ) { +void SAL_CALL SecurityEnvironment_NssImpl :: initialize( const Sequence< Any >& ) throw( Exception, RuntimeException ) { // TBD } ; @@ -219,7 +219,7 @@ throw( RuntimeException ) { if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) { - return ( sal_Int64 )this ; + return sal::static_int_cast(reinterpret_cast(this)); } return 0 ; } @@ -242,7 +242,8 @@ SecurityEnvironment_NssImpl* SecurityEnvironment_NssImpl :: getImplementation( const Reference< XInterface > xObj ) { Reference< XUnoTunnel > xUT( xObj , UNO_QUERY ) ; if( xUT.is() ) { - return ( SecurityEnvironment_NssImpl* )xUT->getSomething( getUnoTunnelId() ) ; + return reinterpret_cast( + sal::static_int_cast(xUT->getSomething( getUnoTunnelId() ))) ; } else return NULL ; } @@ -546,7 +547,7 @@ return certSeq ; } - return NULL ; + return Sequence< Reference < XCertificate > > (); } Reference< XCertificate > SecurityEnvironment_NssImpl :: getCertificate( const OUString& issuerName, const Sequence< sal_Int8 >& serialNumber ) throw( SecurityException , RuntimeException ) @@ -666,7 +667,8 @@ throw RuntimeException() ; } - xcert = ( X509Certificate_NssImpl* )xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ) ; + xcert = reinterpret_cast( + sal::static_int_cast(xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ))) ; if( xcert == NULL ) { throw RuntimeException() ; } @@ -708,7 +710,7 @@ return xCertChain ; } - return NULL ; + return Sequence< Reference < XCertificate > >(); } Reference< XCertificate > SecurityEnvironment_NssImpl :: createCertificateFromRaw( const Sequence< sal_Int8 >& rawCertificate ) throw( SecurityException , RuntimeException ) { @@ -756,7 +758,8 @@ throw RuntimeException() ; } - xcert = ( X509Certificate_NssImpl* )xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ) ; + xcert = reinterpret_cast( + sal::static_int_cast(xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ))) ; if( xcert == NULL ) { throw RuntimeException() ; } @@ -769,7 +772,7 @@ //Get the system clock time timeboundary = PR_Now() ; - SECCertificateUsage usage = NULL; + SECCertificateUsage usage = 0; if( m_pHandler != NULL ) { status = CERT_VerifyCertificate( @@ -824,7 +827,8 @@ throw RuntimeException() ; } - xcert = ( X509Certificate_NssImpl* )xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ) ; + xcert = reinterpret_cast( + sal::static_int_cast(xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ))) ; if( xcert == NULL ) { throw RuntimeException() ; } @@ -918,7 +922,6 @@ xmlSecKeysMngrPtr SecurityEnvironment_NssImpl::createKeysManager() throw( Exception, RuntimeException ) { unsigned int i ; - PK11SlotInfo* slot = NULL ; CERTCertDBHandle* handler = NULL ; PK11SymKey* symKey = NULL ; SECKEYPublicKey* pubKey = NULL ; Index: source/xmlsec/nss/seinitializer_nssimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx,v retrieving revision 1.17 retrieving revision 1.17.30.2 diff -u -r1.17 -r1.17.30.2 --- source/xmlsec/nss/seinitializer_nssimpl.cxx 16 Sep 2006 14:45:55 -0000 1.17 +++ source/xmlsec/nss/seinitializer_nssimpl.cxx 6 Feb 2007 16:38:13 -0000 1.17.30.2 @@ -109,7 +109,8 @@ return true ; } -void nsscrypto_finalize() { +// must be extern "C" because we pass the function pointer to atexit +extern "C" void nsscrypto_finalize() { PK11_LogoutAll(); NSS_Shutdown(); } @@ -240,7 +241,7 @@ } } else - atexit( nsscrypto_finalize ) ; + atexit(nsscrypto_finalize ); pCertHandle = CERT_GetDefaultCertDB() ; @@ -257,8 +258,9 @@ cssu::Reference< cssl::XUnoTunnel > xEnvTunnel( xSecEnv , cssu::UNO_QUERY ) ; if( !xEnvTunnel.is() ) return NULL; - SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xEnvTunnel->getSomething( - SecurityEnvironment_NssImpl::getUnoTunnelId() ) ; + SecurityEnvironment_NssImpl* pSecEnv = reinterpret_cast( + sal::static_int_cast( + xEnvTunnel->getSomething(SecurityEnvironment_NssImpl::getUnoTunnelId() ))) ; pSecEnv->setCertDb(pCertHandle); sal_Int32 n = xSecCtx->addSecurityEnvironment(xSecEnv); @@ -274,7 +276,7 @@ } } -void SAL_CALL SEInitializer_NssImpl::freeSecurityContext( const cssu::Reference< cssxc::XXMLSecurityContext >& securityContext ) +void SAL_CALL SEInitializer_NssImpl::freeSecurityContext( const cssu::Reference< cssxc::XXMLSecurityContext >& ) throw (cssu::RuntimeException) { /* Index: source/xmlsec/nss/x509certificate_nssimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx,v retrieving revision 1.9 retrieving revision 1.9.30.1 diff -u -r1.9 -r1.9.30.1 --- source/xmlsec/nss/x509certificate_nssimpl.cxx 16 Sep 2006 14:46:10 -0000 1.9 +++ source/xmlsec/nss/x509certificate_nssimpl.cxx 5 Feb 2007 13:54:23 -0000 1.9.30.1 @@ -100,7 +100,7 @@ return serial ; } else { - return NULL ; + return ::com::sun::star::uno::Sequence< sal_Int8 >(); } } @@ -186,7 +186,7 @@ return issuerUid ; } else { - return NULL ; + return ::com::sun::star::uno::Sequence< sal_Int8 >(); } } @@ -198,7 +198,7 @@ return subjectUid ; } else { - return NULL ; + return ::com::sun::star::uno::Sequence< sal_Int8 >(); } } @@ -225,7 +225,7 @@ return xExtns ; } else { - return NULL ; + return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificateExtension > > (); } } @@ -267,7 +267,7 @@ return rawCert ; } else { - return NULL ; + return ::com::sun::star::uno::Sequence< sal_Int8 >(); } } @@ -313,7 +313,7 @@ /* XUnoTunnel */ sal_Int64 SAL_CALL X509Certificate_NssImpl :: getSomething( const Sequence< sal_Int8 >& aIdentifier ) throw( RuntimeException ) { if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) { - return ( sal_Int64 )this ; + return sal::static_int_cast(reinterpret_cast(this)); } return 0 ; } @@ -336,7 +336,8 @@ X509Certificate_NssImpl* X509Certificate_NssImpl :: getImplementation( const Reference< XInterface > xObj ) { Reference< XUnoTunnel > xUT( xObj , UNO_QUERY ) ; if( xUT.is() ) { - return ( X509Certificate_NssImpl* )xUT->getSomething( getUnoTunnelId() ) ; + return reinterpret_cast( + sal::static_int_cast(xUT->getSomething( getUnoTunnelId() ))); } else return NULL ; } @@ -378,7 +379,7 @@ } else { - return NULL; + return ::com::sun::star::uno::Sequence< sal_Int8 >(); } } @@ -415,7 +416,7 @@ } } - return NULL ; + return ::com::sun::star::uno::Sequence< sal_Int8 >(); } ::rtl::OUString SAL_CALL X509Certificate_NssImpl::getSignatureAlgorithm() Index: source/xmlsec/nss/xmlencryption_nssimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx,v retrieving revision 1.7 retrieving revision 1.7.30.1 diff -u -r1.7 -r1.7.30.1 --- source/xmlsec/nss/xmlencryption_nssimpl.cxx 16 Sep 2006 14:46:24 -0000 1.7 +++ source/xmlsec/nss/xmlencryption_nssimpl.cxx 5 Feb 2007 13:54:23 -0000 1.7.30.1 @@ -105,7 +105,6 @@ xmlSecKeysMngrPtr pMngr = NULL ; xmlSecEncCtxPtr pEncCtx = NULL ; xmlNodePtr pEncryptedData = NULL ; - xmlNodePtr pEncryptedKey = NULL ; xmlNodePtr pContent = NULL ; if( !aTemplate.is() ) @@ -126,7 +125,9 @@ throw RuntimeException() ; #endif - SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xSecTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ) ; + SecurityEnvironment_NssImpl* pSecEnv = + reinterpret_cast( + sal::static_int_cast(xSecTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ))) ; if( pSecEnv == NULL ) throw RuntimeException() ; @@ -141,7 +142,10 @@ throw RuntimeException() ; } - XMLElementWrapper_XmlSecImpl* pTemplate = ( XMLElementWrapper_XmlSecImpl* )xTplTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; + XMLElementWrapper_XmlSecImpl* pTemplate = + reinterpret_cast( + sal::static_int_cast( + xTplTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ))); if( pTemplate == NULL ) { throw RuntimeException() ; } @@ -157,7 +161,10 @@ throw XMLEncryptionException() ; } - XMLElementWrapper_XmlSecImpl* pTarget = ( XMLElementWrapper_XmlSecImpl* )xTgtTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; + XMLElementWrapper_XmlSecImpl* pTarget = + reinterpret_cast( + sal::static_int_cast( + xTgtTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ))); if( pTarget == NULL ) { throw RuntimeException() ; } @@ -273,7 +280,6 @@ xmlSecKeysMngrPtr pMngr = NULL ; xmlSecEncCtxPtr pEncCtx = NULL ; xmlNodePtr pEncryptedData = NULL ; - xmlNodePtr pContent = NULL ; if( !aTemplate.is() ) throw RuntimeException() ; @@ -292,7 +298,10 @@ throw RuntimeException() ; } - XMLElementWrapper_XmlSecImpl* pTemplate = ( XMLElementWrapper_XmlSecImpl* )xTplTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; + XMLElementWrapper_XmlSecImpl* pTemplate = + reinterpret_cast( + sal::static_int_cast( + xTplTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ))); if( pTemplate == NULL ) { throw RuntimeException() ; } @@ -329,7 +338,10 @@ throw RuntimeException() ; } - SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xSecTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ) ; + SecurityEnvironment_NssImpl* pSecEnv = + reinterpret_cast( + sal::static_int_cast( + xSecTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ))); if( pSecEnv == NULL ) throw RuntimeException() ; @@ -378,7 +390,7 @@ } /* XInitialization */ -void SAL_CALL XMLEncryption_NssImpl :: initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException ) { +void SAL_CALL XMLEncryption_NssImpl :: initialize( const Sequence< Any >& /*aArguments*/ ) throw( Exception, RuntimeException ) { // TBD } ; Index: source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx,v retrieving revision 1.5 retrieving revision 1.5.30.1 diff -u -r1.5 -r1.5.30.1 --- source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx 16 Sep 2006 14:46:38 -0000 1.5 +++ source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx 5 Feb 2007 13:54:23 -0000 1.5.30.1 @@ -71,8 +71,8 @@ XMLSecurityContext_NssImpl :: XMLSecurityContext_NssImpl( const Reference< XMultiServiceFactory >& aFactory ) ://i39448 : m_pKeysMngr( NULL ) , - m_nDefaultEnvIndex(-1) , - m_xServiceManager( aFactory )//, + m_xServiceManager( aFactory ) , + m_nDefaultEnvIndex(-1) //m_xSecurityEnvironment( NULL ) { //Init xmlsec library @@ -249,7 +249,7 @@ /* XInitialization */ -void SAL_CALL XMLSecurityContext_NssImpl :: initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException ) { +void SAL_CALL XMLSecurityContext_NssImpl :: initialize( const Sequence< Any >& /*aArguments*/ ) throw( Exception, RuntimeException ) { // TBD } ; Index: source/xmlsec/nss/xmlsignature_nssimpl.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx,v retrieving revision 1.7 retrieving revision 1.7.30.1 diff -u -r1.7 -r1.7.30.1 --- source/xmlsec/nss/xmlsignature_nssimpl.cxx 16 Sep 2006 14:46:52 -0000 1.7 +++ source/xmlsec/nss/xmlsignature_nssimpl.cxx 5 Feb 2007 13:54:23 -0000 1.7.30.1 @@ -127,7 +127,10 @@ throw RuntimeException() ; } - XMLElementWrapper_XmlSecImpl* pElement = ( XMLElementWrapper_XmlSecImpl* )xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; + XMLElementWrapper_XmlSecImpl* pElement = + reinterpret_cast( + sal::static_int_cast( + xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ))); if( pElement == NULL ) { throw RuntimeException() ; } @@ -154,7 +157,10 @@ throw RuntimeException() ; #endif - SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xSecTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ) ; + SecurityEnvironment_NssImpl* pSecEnv = + reinterpret_cast( + sal::static_int_cast( + xSecTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ))); if( pSecEnv == NULL ) throw RuntimeException() ; @@ -229,7 +235,10 @@ throw RuntimeException() ; } - XMLElementWrapper_XmlSecImpl* pElement = ( XMLElementWrapper_XmlSecImpl* )xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; + XMLElementWrapper_XmlSecImpl* pElement = + reinterpret_cast( + sal::static_int_cast( + xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ))); if( pElement == NULL ) throw RuntimeException() ; @@ -258,7 +267,10 @@ throw RuntimeException() ; } - SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xSecTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ) ; + SecurityEnvironment_NssImpl* pSecEnv = + reinterpret_cast( + sal::static_int_cast( + xSecTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ))); if( pSecEnv == NULL ) throw RuntimeException() ; @@ -309,7 +321,7 @@ } /* XInitialization */ -void SAL_CALL XMLSignature_NssImpl :: initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException ) { +void SAL_CALL XMLSignature_NssImpl :: initialize( const Sequence< Any >& /*aArguments*/ ) throw( Exception, RuntimeException ) { // TBD } ; Index: source/xmlsec/nss/xsec_nss.cxx =================================================================== RCS file: /cvs/xml/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx,v retrieving revision 1.3 retrieving revision 1.3.30.1 diff -u -r1.3 -r1.3.30.1 --- source/xmlsec/nss/xsec_nss.cxx 16 Sep 2006 14:47:06 -0000 1.3 +++ source/xmlsec/nss/xsec_nss.cxx 5 Feb 2007 13:54:23 -0000 1.3.30.1 @@ -62,7 +62,7 @@ extern "C" { -sal_Bool SAL_CALL nss_component_writeInfo( void* pServiceManager , void* pRegistryKey ) +sal_Bool SAL_CALL nss_component_writeInfo( void* /*pServiceManager*/ , void* pRegistryKey ) { sal_Bool result = sal_False; sal_Int32 i ; @@ -142,7 +142,7 @@ return result; } -void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* pRegistryKey ) +void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* /*pRegistryKey*/ ) { void* pRet = 0; Reference< XSingleServiceFactory > xFactory ;