diff options
Diffstat (limited to 'xmlsecurity/source/xmlsec')
4 files changed, 14 insertions, 14 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx index fbf99a799e67..1a5b47319c8f 100644 --- a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx +++ b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx @@ -157,7 +157,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::convertWithCipherContext( c { int nResultLen = 0; aResult.realloc( aToConvert.getLength() + m_nBlockSize ); - if ( PK11_CipherOp( m_pContext, reinterpret_cast< unsigned char* >( aResult.getArray() ), &nResultLen, aResult.getLength(), const_cast< unsigned char* >( reinterpret_cast< const unsigned char* >( aToConvert.getConstArray() ) ), aToConvert.getLength() ) != SECSuccess ) + if ( PK11_CipherOp( m_pContext, reinterpret_cast< unsigned char* >( aResult.getArray() ), &nResultLen, aResult.getLength(), reinterpret_cast< const unsigned char* >( aToConvert.getConstArray() ), aToConvert.getLength() ) != SECSuccess ) { m_bBroken = true; Dispose(); @@ -221,7 +221,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::finalizeCipherContextAndDis { int nPrefResLen = 0; aResult.realloc( m_aLastBlock.getLength() + m_nBlockSize ); - if ( PK11_CipherOp( m_pContext, reinterpret_cast< unsigned char* >( aResult.getArray() ), &nPrefResLen, aResult.getLength(), const_cast< unsigned char* >( reinterpret_cast< const unsigned char* >( m_aLastBlock.getConstArray() ) ), m_aLastBlock.getLength() ) != SECSuccess ) + if ( PK11_CipherOp( m_pContext, reinterpret_cast< unsigned char* >( aResult.getArray() ), &nPrefResLen, aResult.getLength(), reinterpret_cast< const unsigned char* >( m_aLastBlock.getConstArray() ), m_aLastBlock.getLength() ) != SECSuccess ) { m_bBroken = true; Dispose(); diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index cfa3b8a9a896..0355e27bb7a6 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -437,7 +437,7 @@ Reference< XCertificate > SecurityEnvironment_NssImpl :: getCertificate( const O // Create cert info from issue and serial OString ostr = OUStringToOString( issuerName , RTL_TEXTENCODING_UTF8 ) ; - chIssuer = PL_strndup( ( char* )ostr.getStr(), ( int )ostr.getLength() ) ; + chIssuer = PL_strndup( ostr.getStr(), ( int )ostr.getLength() ) ; nmIssuer = CERT_AsciiToName( chIssuer ) ; if( nmIssuer == NULL ) { PL_strfree( chIssuer ) ; @@ -508,7 +508,7 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_NssImpl :: buildCerti //Get the system clock time timeboundary = PR_Now() ; - certChain = CERT_GetCertChainFromCert( ( CERTCertificate* )cert, timeboundary, certUsageAnyCA ) ; + certChain = CERT_GetCertChainFromCert( const_cast<CERTCertificate*>(cert), timeboundary, certUsageAnyCA ) ; } else { certChain = NULL ; } @@ -844,13 +844,13 @@ sal_Int32 SecurityEnvironment_NssImpl::getCertificateCharacters( if (cert->slot != NULL) { - priKey = PK11_FindPrivateKeyFromCert( cert->slot, ( CERTCertificate* )cert, NULL ) ; + priKey = PK11_FindPrivateKeyFromCert( cert->slot, const_cast<CERTCertificate*>(cert), NULL ) ; } if(priKey == NULL) { for (CIT_SLOTS is = m_Slots.begin(); is != m_Slots.end(); is++) { - priKey = PK11_FindPrivateKeyFromCert(*is, (CERTCertificate*)cert, NULL); + priKey = PK11_FindPrivateKeyFromCert(*is, const_cast<CERTCertificate*>(cert), NULL); if (priKey) break; } diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx index ee0d950813cc..cd15cc6dbe3e 100644 --- a/xmlsecurity/source/xmlsec/saxhelper.cxx +++ b/xmlsecurity/source/xmlsec/saxhelper.cxx @@ -273,7 +273,7 @@ void SAXHelper::startElement( if( fullName != NULL ) { - xmlFree( ( xmlChar* )fullName ) ; + xmlFree( const_cast<xmlChar*>(fullName) ) ; fullName = NULL ; } @@ -281,7 +281,7 @@ void SAXHelper::startElement( { for( int i = 0 ; attrs[i] != NULL ; ++i ) { - xmlFree( ( xmlChar* )attrs[i] ) ; + xmlFree( const_cast<xmlChar*>(attrs[i]) ) ; attrs[i] = NULL ; } @@ -322,7 +322,7 @@ void SAXHelper::characters( const OUString& aChars ) if( chars != NULL ) { - xmlFree( ( xmlChar* )chars ) ; + xmlFree( const_cast<xmlChar*>(chars) ) ; } } @@ -340,7 +340,7 @@ void SAXHelper::ignorableWhitespace( const OUString& aWhitespaces ) if( chars != NULL ) { - xmlFree( ( xmlChar* )chars ) ; + xmlFree( const_cast<xmlChar*>(chars) ) ; } } diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx index 76ea5e393245..062fee4112b1 100644 --- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx @@ -271,12 +271,12 @@ void XMLDocumentWrapper_XmlSecImpl::sendStartElement( if (xHandler.is()) { xHandler->startElement( - OUString(C2U ( ((sal_Char*)(sNodeName.getStr())) )), + OUString(C2U ( sNodeName.getStr() )), xAttrList); } xHandler2->startElement( - OUString(C2U ( ((sal_Char*)(sNodeName.getStr())) )), + OUString(C2U ( sNodeName.getStr() )), xAttrList); } @@ -318,10 +318,10 @@ void XMLDocumentWrapper_XmlSecImpl::sendEndElement( if (xHandler.is()) { - xHandler->endElement(OUString(C2U ( ((sal_Char*)(sNodeName.getStr())) ))); + xHandler->endElement(OUString(C2U ( sNodeName.getStr() ))); } - xHandler2->endElement(OUString(C2U ( ((sal_Char*)(sNodeName.getStr())) ))); + xHandler2->endElement(OUString(C2U ( sNodeName.getStr() ))); } void XMLDocumentWrapper_XmlSecImpl::sendNode( |