Author: hdu
Date: Thu Dec 12 14:14:49 2013
New Revision: 1550421
URL: http://svn.apache.org/r1550421
Log:
#i123840# fix a 64->32bit narrowing conversion in nss/ciphercontext.cxx
Modified:
openoffice/trunk/main/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
Modified: openoffice/trunk/main/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx?rev=1550421&r1=1550420&r2=1550421&view=diff
==============================================================================
--- openoffice/trunk/main/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
(original)
+++ openoffice/trunk/main/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx Thu
Dec 12 14:14:49 2013
@@ -38,11 +38,11 @@ uno::Reference< xml::crypto::XCipherCont
xResult->m_pSlot = PK11_GetBestSlot( nNSSCipherID, NULL );
if ( xResult->m_pSlot )
{
- SECItem aKeyItem = { siBuffer, const_cast< unsigned char* >(
reinterpret_cast< const unsigned char* >( aKey.getConstArray() ) ),
aKey.getLength() };
+ SECItem aKeyItem = { siBuffer, const_cast< unsigned char* >(
reinterpret_cast< const unsigned char* >( aKey.getConstArray() ) ),
static_cast<unsigned>(aKey.getLength()) };
xResult->m_pSymKey = PK11_ImportSymKey( xResult->m_pSlot,
nNSSCipherID, PK11_OriginDerive, bEncryption ? CKA_ENCRYPT : CKA_DECRYPT,
&aKeyItem, NULL );
if ( xResult->m_pSymKey )
{
- SECItem aIVItem = { siBuffer, const_cast< unsigned char* >(
reinterpret_cast< const unsigned char* >( aInitializationVector.getConstArray()
) ), aInitializationVector.getLength() };
+ SECItem aIVItem = { siBuffer, const_cast< unsigned char* >(
reinterpret_cast< const unsigned char* >( aInitializationVector.getConstArray()
) ), static_cast<unsigned>(aInitializationVector.getLength()) };
xResult->m_pSecParam = PK11_ParamFromIV( nNSSCipherID, &aIVItem );
if ( xResult->m_pSecParam )
{