OpenJDK / amber / amber
changeset 55544:c02b8d6384ab
8221407: Windows 32bit build error in libsunmscapi/security.cpp
Reviewed-by: clanger
author | stuefe |
---|---|
date | Tue, 26 Mar 2019 15:52:08 +0100 |
parents | 6640fd9196d9 |
children | c12b897021ea |
files | src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp Tue Mar 26 15:46:15 2019 +0100 +++ b/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp Tue Mar 26 15:52:08 2019 +0100 @@ -502,7 +502,7 @@ else { if ((dwKeySpec & CERT_NCRYPT_KEY_SPEC) == CERT_NCRYPT_KEY_SPEC) { - PP("CNG %I64d", hCryptProv); + PP("CNG %I64d", (__int64)hCryptProv); } else { // Private key is available BOOL bGetUserKey = ::CryptGetUserKey(hCryptProv, dwKeySpec, &hUserKey); //deprecated @@ -517,7 +517,7 @@ // Set cipher mode to ECB DWORD dwCipherMode = CRYPT_MODE_ECB; ::CryptSetKeyParam(hUserKey, KP_MODE, (BYTE*)&dwCipherMode, NULL); //deprecated - PP("CAPI %I64d %I64d", hCryptProv, hUserKey); + PP("CAPI %I64d %I64d", (__int64)hCryptProv, (__int64)hUserKey); } // If the private key is present in smart card, we may not be able to // determine the key length by using the private key handle. However, @@ -863,8 +863,8 @@ SS_CHECK(::NCryptTranslateHandle( NULL, &hk, - hCryptProv, - hCryptKey, + (HCRYPTPROV)hCryptProv, + (HCRYPTKEY)hCryptKey, NULL, 0)); } @@ -1087,8 +1087,8 @@ SS_CHECK(::NCryptTranslateHandle( NULL, &hk, - hCryptProv, - hCryptKey, + (HCRYPTPROV)hCryptProv, + (HCRYPTKEY)hCryptKey, NULL, 0)); } @@ -1920,7 +1920,7 @@ // Determine the size of the blob if (hCryptKey == 0) { SS_CHECK(::NCryptExportKey( - hCryptProv, NULL, BCRYPT_ECCPUBLIC_BLOB, + (NCRYPT_KEY_HANDLE)hCryptProv, NULL, BCRYPT_ECCPUBLIC_BLOB, NULL, NULL, 0, &dwBlobLen, NCRYPT_SILENT_FLAG)); } else { if (! ::CryptExportKey((HCRYPTKEY) hCryptKey, 0, PUBLICKEYBLOB, 0, NULL, //deprecated @@ -1939,7 +1939,7 @@ // Generate key blob if (hCryptKey == 0) { SS_CHECK(::NCryptExportKey( - hCryptProv, NULL, BCRYPT_ECCPUBLIC_BLOB, + (NCRYPT_KEY_HANDLE)hCryptProv, NULL, BCRYPT_ECCPUBLIC_BLOB, NULL, pbKeyBlob, dwBlobLen, &dwBlobLen, NCRYPT_SILENT_FLAG)); } else { if (! ::CryptExportKey((HCRYPTKEY) hCryptKey, 0, PUBLICKEYBLOB, 0, //deprecated