Replace usage of rtl/memory.h in xmlsecurity their equivalent from string.h
Change-Id: Id4a088864ee28163160d6ac408592952fe6c797d
This commit is contained in:
parent
1af0e36fb6
commit
9b2e6d4536
@ -17,6 +17,7 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push,1)
|
||||
@ -48,8 +49,6 @@
|
||||
#include <osl/nlsupport.h>
|
||||
#include <osl/process.h>
|
||||
|
||||
#include <rtl/memory.h>
|
||||
|
||||
#include "../diagnose.hxx"
|
||||
|
||||
using namespace xmlsecurity;
|
||||
@ -211,7 +210,7 @@ Reference< XSingleServiceFactory > SecurityEnvironment_MSCryptImpl :: impl_creat
|
||||
sal_Int64 SAL_CALL SecurityEnvironment_MSCryptImpl :: getSomething( const Sequence< sal_Int8 >& aIdentifier )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) {
|
||||
if( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) {
|
||||
return ( sal_Int64 )this ;
|
||||
}
|
||||
return 0 ;
|
||||
@ -947,7 +946,7 @@ sal_Int32 SecurityEnvironment_MSCryptImpl :: verifyCertificate(
|
||||
CERT_ENHKEY_USAGE enhKeyUsage ;
|
||||
CERT_USAGE_MATCH certUsage ;
|
||||
CERT_CHAIN_PARA chainPara ;
|
||||
rtl_zeroMemory(&chainPara, sizeof(CERT_CHAIN_PARA));
|
||||
memset(&chainPara, 0, sizeof(CERT_CHAIN_PARA));
|
||||
|
||||
//Prepare parameter for CertGetCertificateChain
|
||||
enhKeyUsage.cUsageIdentifier = 0 ;
|
||||
|
@ -17,6 +17,8 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <sal/config.h>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include "x509certificate_mscryptimpl.hxx"
|
||||
@ -471,7 +473,7 @@ void X509Certificate_MSCryptImpl :: setRawCert( Sequence< sal_Int8 > rawCert ) t
|
||||
|
||||
/* XUnoTunnel */
|
||||
sal_Int64 SAL_CALL X509Certificate_MSCryptImpl :: getSomething( const Sequence< sal_Int8 >& aIdentifier ) throw( RuntimeException ) {
|
||||
if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) {
|
||||
if( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) {
|
||||
return ( sal_Int64 )this ;
|
||||
}
|
||||
return 0 ;
|
||||
|
@ -130,23 +130,23 @@ uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::convertWithCipherContext( c
|
||||
if ( nToConvertLen == 0 )
|
||||
{
|
||||
m_aLastBlock.realloc( nOldLastBlockLen + aData.getLength() );
|
||||
rtl_copyMemory( m_aLastBlock.getArray() + nOldLastBlockLen, aData.getConstArray(), aData.getLength() );
|
||||
memcpy( m_aLastBlock.getArray() + nOldLastBlockLen, aData.getConstArray(), aData.getLength() );
|
||||
// aToConvert stays empty
|
||||
}
|
||||
else if ( nToConvertLen < nOldLastBlockLen )
|
||||
{
|
||||
rtl_copyMemory( aToConvert.getArray(), m_aLastBlock.getConstArray(), nToConvertLen );
|
||||
rtl_copyMemory( m_aLastBlock.getArray(), m_aLastBlock.getConstArray() + nToConvertLen, nOldLastBlockLen - nToConvertLen );
|
||||
memcpy( aToConvert.getArray(), m_aLastBlock.getConstArray(), nToConvertLen );
|
||||
memcpy( m_aLastBlock.getArray(), m_aLastBlock.getConstArray() + nToConvertLen, nOldLastBlockLen - nToConvertLen );
|
||||
m_aLastBlock.realloc( nOldLastBlockLen - nToConvertLen + aData.getLength() );
|
||||
rtl_copyMemory( m_aLastBlock.getArray() + nOldLastBlockLen - nToConvertLen, aData.getConstArray(), aData.getLength() );
|
||||
memcpy( m_aLastBlock.getArray() + nOldLastBlockLen - nToConvertLen, aData.getConstArray(), aData.getLength() );
|
||||
}
|
||||
else
|
||||
{
|
||||
rtl_copyMemory( aToConvert.getArray(), m_aLastBlock.getConstArray(), nOldLastBlockLen );
|
||||
memcpy( aToConvert.getArray(), m_aLastBlock.getConstArray(), nOldLastBlockLen );
|
||||
if ( nToConvertLen > nOldLastBlockLen )
|
||||
rtl_copyMemory( aToConvert.getArray() + nOldLastBlockLen, aData.getConstArray(), nToConvertLen - nOldLastBlockLen );
|
||||
memcpy( aToConvert.getArray() + nOldLastBlockLen, aData.getConstArray(), nToConvertLen - nOldLastBlockLen );
|
||||
m_aLastBlock.realloc( nAvailableData - nToConvertLen );
|
||||
rtl_copyMemory( m_aLastBlock.getArray(), aData.getConstArray() + nToConvertLen - nOldLastBlockLen, nAvailableData - nToConvertLen );
|
||||
memcpy( m_aLastBlock.getArray(), aData.getConstArray() + nToConvertLen - nOldLastBlockLen, nAvailableData - nToConvertLen );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ Reference< XSingleServiceFactory > SecurityEnvironment_NssImpl :: impl_createFac
|
||||
sal_Int64 SAL_CALL SecurityEnvironment_NssImpl :: getSomething( const Sequence< sal_Int8 >& aIdentifier )
|
||||
throw( RuntimeException )
|
||||
{
|
||||
if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) {
|
||||
if( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) {
|
||||
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this));
|
||||
}
|
||||
return 0 ;
|
||||
|
@ -304,7 +304,7 @@ void X509Certificate_NssImpl :: setRawCert( Sequence< sal_Int8 > rawCert ) throw
|
||||
|
||||
/* 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 ) ) {
|
||||
if( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) {
|
||||
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this));
|
||||
}
|
||||
return 0 ;
|
||||
|
@ -17,6 +17,7 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "xmlelementwrapper_xmlsecimpl.hxx"
|
||||
#include <cppuhelper/typeprovider.hxx>
|
||||
@ -56,7 +57,7 @@ sal_Int64 SAL_CALL XMLElementWrapper_XmlSecImpl::getSomething( const cssu::Seque
|
||||
throw (cssu::RuntimeException)
|
||||
{
|
||||
if (aIdentifier.getLength() == 16 &&
|
||||
0 == rtl_compareMemory(
|
||||
0 == memcmp(
|
||||
getUnoTunnelImplementationId().getConstArray(),
|
||||
aIdentifier.getConstArray(),
|
||||
16 ))
|
||||
|
Loading…
x
Reference in New Issue
Block a user