diff options
author | relyea%netscape.com <devnull@localhost> | 2001-03-10 01:35:17 +0000 |
---|---|---|
committer | relyea%netscape.com <devnull@localhost> | 2001-03-10 01:35:17 +0000 |
commit | dcea6695c96d99d18b377ca2be55715b89560509 (patch) | |
tree | 61582665c47cf35760ab8121717b3743a65a1111 | |
parent | fd39885d1938a487202bf84dfb0f323aac04d03b (diff) | |
download | nss-hg-dcea6695c96d99d18b377ca2be55715b89560509.tar.gz |
CK_ULONG != unsigned int on 64 bit platforms. Fix the cast which was obviously
put in to remove a warning.
bug 70713
-rw-r--r-- | security/nss/lib/pk11wrap/pk11skey.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/security/nss/lib/pk11wrap/pk11skey.c b/security/nss/lib/pk11wrap/pk11skey.c index c3d366389..9ccaa2f53 100644 --- a/security/nss/lib/pk11wrap/pk11skey.c +++ b/security/nss/lib/pk11wrap/pk11skey.c @@ -4541,6 +4541,7 @@ PK11_ExportEncryptedPrivateKeyInfo(PK11SlotInfo *slot, SECOidTag algTag, PK11SymKey *key = NULL; SECStatus rv = SECSuccess; CK_MECHANISM pbeMech, cryptoMech; + CK_ULONG encBufLenPtr; CK_RV crv; SECItem encryptedKey = {siBuffer,NULL,0}; int encryptBufLen; @@ -4598,6 +4599,7 @@ PK11_ExportEncryptedPrivateKeyInfo(PK11SlotInfo *slot, SECOidTag algTag, goto loser; } encryptedKey.len = (unsigned int)encryptBufLen; + encBufLenPtr = (CK_ULONG) encryptBufLen; encryptedKey.data = (unsigned char *)PORT_ZAlloc(encryptedKey.len); if(!encryptedKey.data) { rv = SECFailure; @@ -4612,8 +4614,9 @@ PK11_ExportEncryptedPrivateKeyInfo(PK11SlotInfo *slot, SECOidTag algTag, PK11_EnterSlotMonitor(pk->pkcs11Slot); crv = PK11_GETTAB(pk->pkcs11Slot)->C_WrapKey(pk->pkcs11Slot->session, &cryptoMech, key->objectID, pk->pkcs11ID, encryptedKey.data, - (CK_ULONG_PTR)(&encryptedKey.len)); + &encBufLenPtr); PK11_ExitSlotMonitor(pk->pkcs11Slot); + encryptedKey.len = (unsigned int) encBufLenPtr; if(crv != CKR_OK) { rv = SECFailure; goto loser; |