summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-04-17 09:27:29 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-04-17 09:27:29 +0000
commitbf2b92ce7a351853f5208c48a09f1d9fa7c04124 (patch)
tree5e1259cda8ea18aaad4bef101333d025c95f5c3b /xmlsecurity
parent0b8b1ae928d6ebdd10711fc7417251f5dc6ce83e (diff)
INTEGRATION: CWS jl51 (1.16.30); FILE MERGED
2007/02/05 13:54:22 jl 1.16.30.1: #i69228 warning free code
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx31
1 files changed, 17 insertions, 14 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index fcf9f405f34c..f0db8b29ecf9 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: securityenvironment_nssimpl.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: obo $ $Date: 2006-09-16 14:45:40 $
+ * last change: $Author: ihi $ $Date: 2007-04-17 10:27:29 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -97,7 +97,7 @@ using ::com::sun::star::security::XCertificate ;
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 @@ char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* arg )
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 @@ SecurityEnvironment_NssImpl :: ~SecurityEnvironment_NssImpl() {
}
/* 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 @@ sal_Int64 SAL_CALL SecurityEnvironment_NssImpl :: getSomething( const Sequence<
throw( RuntimeException )
{
if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) {
- return ( sal_Int64 )this ;
+ return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this));
}
return 0 ;
}
@@ -242,7 +242,8 @@ const Sequence< sal_Int8>& SecurityEnvironment_NssImpl :: getUnoTunnelId() {
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<SecurityEnvironment_NssImpl*>(
+ sal::static_int_cast<sal_uIntPtr>(xUT->getSomething( getUnoTunnelId() ))) ;
} else
return NULL ;
}
@@ -546,7 +547,7 @@ SecurityEnvironment_NssImpl::getPersonalCertificates() throw( SecurityException
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 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_NssImpl :: buildCerti
throw RuntimeException() ;
}
- xcert = ( X509Certificate_NssImpl* )xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ) ;
+ xcert = reinterpret_cast<X509Certificate_NssImpl*>(
+ sal::static_int_cast<sal_uIntPtr>(xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ))) ;
if( xcert == NULL ) {
throw RuntimeException() ;
}
@@ -708,7 +710,7 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_NssImpl :: buildCerti
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 @@ sal_Int32 SecurityEnvironment_NssImpl :: verifyCertificate( const ::com::sun::st
throw RuntimeException() ;
}
- xcert = ( X509Certificate_NssImpl* )xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ) ;
+ xcert = reinterpret_cast<X509Certificate_NssImpl*>(
+ sal::static_int_cast<sal_uIntPtr>(xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ))) ;
if( xcert == NULL ) {
throw RuntimeException() ;
}
@@ -769,7 +772,7 @@ sal_Int32 SecurityEnvironment_NssImpl :: verifyCertificate( const ::com::sun::st
//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 @@ sal_Int32 SecurityEnvironment_NssImpl::getCertificateCharacters(
throw RuntimeException() ;
}
- xcert = ( X509Certificate_NssImpl* )xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ) ;
+ xcert = reinterpret_cast<X509Certificate_NssImpl*>(
+ sal::static_int_cast<sal_uIntPtr>(xCertTunnel->getSomething( X509Certificate_NssImpl::getUnoTunnelId() ))) ;
if( xcert == NULL ) {
throw RuntimeException() ;
}
@@ -918,7 +922,6 @@ X509Certificate_NssImpl* NssPrivKeyToXCert( SECKEYPrivateKey* priKey )
xmlSecKeysMngrPtr SecurityEnvironment_NssImpl::createKeysManager() throw( Exception, RuntimeException ) {
unsigned int i ;
- PK11SlotInfo* slot = NULL ;
CERTCertDBHandle* handler = NULL ;
PK11SymKey* symKey = NULL ;
SECKEYPublicKey* pubKey = NULL ;