summaryrefslogtreecommitdiff
path: root/xmlsecurity/source
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2013-12-12 14:14:49 +0000
committerHerbert Dürr <hdu@apache.org>2013-12-12 14:14:49 +0000
commitff19bc876f2e2c13f9040e148c32ed8c1c1ab9ca (patch)
tree3c2926991f24c708c91b538d8b3895ad24fa5ea0 /xmlsecurity/source
parent5e7c8cd9c6772d9b9e5747e74768c61143a7ed01 (diff)
#i123840# fix a 64->32bit narrowing conversion in nss/ciphercontext.cxx
Notes
Notes: prefer: 785bf20ab312dd46f3269f70e62b2c9d58bcb8af
Diffstat (limited to 'xmlsecurity/source')
-rw-r--r--xmlsecurity/source/xmlsec/nss/ciphercontext.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
index fe505ae6ee92..080ac9a5fd80 100644
--- a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
+++ b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
@@ -38,11 +38,11 @@ uno::Reference< xml::crypto::XCipherContext > OCipherContext::Create( CK_MECHANI
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 )
{