Author: akhaldi
Date: Sat Apr 19 18:11:58 2014
New Revision: 62813
URL:
http://svn.reactos.org/svn/reactos?rev=62813&view=rev
Log:
[RSAENH]
* Sync with Wine 1.7.17.
CORE-8080
Modified:
trunk/reactos/dll/win32/rsaenh/handle.c
trunk/reactos/dll/win32/rsaenh/handle.h
trunk/reactos/dll/win32/rsaenh/implglue.c
trunk/reactos/dll/win32/rsaenh/implglue.h
trunk/reactos/dll/win32/rsaenh/mpi.c
trunk/reactos/dll/win32/rsaenh/rsaenh.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/rsaenh/handle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rsaenh/handle.c?…
==============================================================================
--- trunk/reactos/dll/win32/rsaenh/handle.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rsaenh/handle.c [iso-8859-1] Sat Apr 19 18:11:58 2014
@@ -90,13 +90,13 @@
* dwType [I] A magic value that identifies the referenced object's type.
*
* RETURNS
- * non zero, if handle is valid.
- * zero, if handle is not valid.
- */
-int is_valid_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType)
+ * TRUE, if handle is valid.
+ * FALSE, if handle is not valid.
+ */
+BOOL is_valid_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType)
{
unsigned int index = HANDLE2INDEX(handle);
- int ret = 0;
+ BOOL ret = FALSE;
TRACE("(lpTable=%p, handle=%ld)\n", lpTable, handle);
@@ -113,8 +113,8 @@
/* Check if this handle references an object of the correct type. */
if (lpTable->paEntries[index].pObject->dwType != dwType) goto exit;
-
- ret = 1;
+
+ ret = TRUE;
exit:
LeaveCriticalSection(&lpTable->mutex);
return ret;
@@ -129,13 +129,13 @@
* lpTable [I] Pointer to the table, which is to be grown
*
* RETURNS
- * non zero, if successful
- * zero, if not successful (out of memory on process heap)
+ * TRUE, if successful
+ * FALSE, if not successful (out of memory on process heap)
*
* NOTES
* This is a support function for alloc_handle. Do not call!
*/
-static int grow_handle_table(struct handle_table *lpTable)
+static BOOL grow_handle_table(struct handle_table *lpTable)
{
struct handle_table_entry *newEntries;
unsigned int i, newIEntries;
@@ -143,8 +143,8 @@
newIEntries = lpTable->iEntries + TABLE_SIZE_INCREMENT;
newEntries = HeapAlloc(GetProcessHeap(), 0, sizeof(struct
handle_table_entry)*newIEntries);
- if (!newEntries)
- return 0;
+ if (!newEntries)
+ return FALSE;
if (lpTable->paEntries)
{
@@ -161,7 +161,7 @@
lpTable->paEntries = newEntries;
lpTable->iEntries = newIEntries;
- return 1;
+ return TRUE;
}
/******************************************************************************
@@ -177,12 +177,12 @@
* be stored. If not successful, this will be
* INVALID_HANDLE_VALUE
* RETURNS
- * non zero, if successful
- * zero, if not successful (no free handle)
- */
-static int alloc_handle(struct handle_table *lpTable, OBJECTHDR *lpObject, HCRYPTKEY
*lpHandle)
-{
- int ret = 0;
+ * TRUE, if successful
+ * FALSE, if not successful (no free handle)
+ */
+static BOOL alloc_handle(struct handle_table *lpTable, OBJECTHDR *lpObject, HCRYPTKEY
*lpHandle)
+{
+ BOOL ret = FALSE;
TRACE("(lpTable=%p, lpObject=%p, lpHandle=%p)\n", lpTable, lpObject,
lpHandle);
@@ -200,7 +200,7 @@
lpTable->iFirstFree = lpTable->paEntries[lpTable->iFirstFree].iNextFree;
InterlockedIncrement(&lpObject->refcount);
- ret = 1;
+ ret = TRUE;
exit:
LeaveCriticalSection(&lpTable->mutex);
return ret;
@@ -224,14 +224,14 @@
* to be released.
*
* RETURNS
- * non zero, if successful
- * zero, if not successful (invalid handle)
- */
-int release_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType)
+ * TRUE, if successful
+ * FALSE, if not successful (invalid handle)
+ */
+BOOL release_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType)
{
unsigned int index = HANDLE2INDEX(handle);
OBJECTHDR *pObject;
- int ret = 0;
+ BOOL ret = FALSE;
TRACE("(lpTable=%p, handle=%ld)\n", lpTable, handle);
@@ -251,8 +251,8 @@
lpTable->paEntries[index].pObject = NULL;
lpTable->paEntries[index].iNextFree = lpTable->iFirstFree;
lpTable->iFirstFree = index;
-
- ret = 1;
+
+ ret = TRUE;
exit:
LeaveCriticalSection(&lpTable->mutex);
return ret;
@@ -266,16 +266,16 @@
* PARAMS
* lpTable [I] Pointer to the handle table, in which the handle is looked up.
* handle [I] The handle, which is to be looked up
- * lplpObject [O] Pointer to the variable, into which the pointer to the
- * object looked up is copied.
- * RETURNS
- * non zero, if successful
- * zero, if not successful (invalid handle)
- */
-int lookup_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType, OBJECTHDR
**lplpObject)
-{
- int ret = 0;
-
+ * lplpObject [O] Pointer to the variable, into which the pointer to the
+ * object looked up is copied.
+ * RETURNS
+ * TRUE, if successful
+ * FALSE, if not successful (invalid handle)
+ */
+BOOL lookup_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType,
OBJECTHDR **lplpObject)
+{
+ BOOL ret = FALSE;
+
TRACE("(lpTable=%p, handle=%ld, lplpObject=%p)\n", lpTable, handle,
lplpObject);
EnterCriticalSection(&lpTable->mutex);
@@ -286,7 +286,7 @@
}
*lplpObject = lpTable->paEntries[HANDLE2INDEX(handle)].pObject;
- ret = 1;
+ ret = TRUE;
exit:
LeaveCriticalSection(&lpTable->mutex);
return ret;
@@ -304,14 +304,14 @@
* copy [O] Pointer to a handle variable, where the copied handle is put.
*
* RETURNS
- * non zero, if successful
- * zero, if not successful (invalid handle or out of memory)
- */
-int copy_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType, HCRYPTKEY
*copy)
+ * TRUE, if successful
+ * FALSE, if not successful (invalid handle or out of memory)
+ */
+BOOL copy_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType, HCRYPTKEY
*copy)
{
OBJECTHDR *pObject;
- int ret;
-
+ BOOL ret;
+
TRACE("(lpTable=%p, handle=%ld, copy=%p)\n", lpTable, handle, copy);
EnterCriticalSection(&lpTable->mutex);
@@ -319,7 +319,7 @@
{
*copy = (HCRYPTKEY)INVALID_HANDLE_VALUE;
LeaveCriticalSection(&lpTable->mutex);
- return 0;
+ return FALSE;
}
ret = alloc_handle(lpTable, pObject, copy);
Modified: trunk/reactos/dll/win32/rsaenh/handle.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rsaenh/handle.h?…
==============================================================================
--- trunk/reactos/dll/win32/rsaenh/handle.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rsaenh/handle.h [iso-8859-1] Sat Apr 19 18:11:58 2014
@@ -58,10 +58,10 @@
void init_handle_table (struct handle_table *lpTable) DECLSPEC_HIDDEN;
void destroy_handle_table(struct handle_table *lpTable) DECLSPEC_HIDDEN;
-int release_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType)
DECLSPEC_HIDDEN;
-int copy_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType,
HCRYPTKEY *copy) DECLSPEC_HIDDEN;
-int lookup_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType,
OBJECTHDR **lplpObject) DECLSPEC_HIDDEN;
-int is_valid_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType)
DECLSPEC_HIDDEN;
+BOOL release_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType)
DECLSPEC_HIDDEN;
+BOOL copy_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType,
HCRYPTKEY *copy) DECLSPEC_HIDDEN;
+BOOL lookup_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType,
OBJECTHDR **lplpObject) DECLSPEC_HIDDEN;
+BOOL is_valid_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType)
DECLSPEC_HIDDEN;
HCRYPTKEY new_object (struct handle_table *lpTable, size_t cbSize, DWORD dwType,
DESTRUCTOR destructor,
OBJECTHDR **ppObject) DECLSPEC_HIDDEN;
Modified: trunk/reactos/dll/win32/rsaenh/implglue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rsaenh/implglue.…
==============================================================================
--- trunk/reactos/dll/win32/rsaenh/implglue.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rsaenh/implglue.c [iso-8859-1] Sat Apr 19 18:11:58 2014
@@ -87,7 +87,7 @@
return TRUE;
}
-BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, CONST BYTE *pbData,
+BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, const BYTE *pbData,
DWORD dwDataLen)
{
switch (aiAlgid)
@@ -170,7 +170,7 @@
return TRUE;
}
-BOOL duplicate_hash_impl(ALG_ID aiAlgid, CONST HASH_CONTEXT *pSrcHashContext,
+BOOL duplicate_hash_impl(ALG_ID aiAlgid, const HASH_CONTEXT *pSrcHashContext,
HASH_CONTEXT *pDestHashContext)
{
*pDestHashContext = *pSrcHashContext;
@@ -252,7 +252,7 @@
return TRUE;
}
-BOOL duplicate_key_impl(ALG_ID aiAlgid, CONST KEY_CONTEXT *pSrcKeyContext,
+BOOL duplicate_key_impl(ALG_ID aiAlgid, const KEY_CONTEXT *pSrcKeyContext,
KEY_CONTEXT *pDestKeyContext)
{
switch (aiAlgid)
@@ -300,8 +300,8 @@
}
}
-BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContext, CONST
BYTE *in, BYTE *out,
- DWORD enc)
+BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContext, const
BYTE *in,
+ BYTE *out, DWORD enc)
{
unsigned long inlen, outlen;
BYTE *in_reversed = NULL;
@@ -409,7 +409,7 @@
return TRUE;
}
-BOOL import_public_key_impl(CONST BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
+BOOL import_public_key_impl(const BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
DWORD dwPubExp)
{
BYTE *pbTemp;
@@ -484,7 +484,7 @@
return TRUE;
}
-BOOL import_private_key_impl(CONST BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
+BOOL import_private_key_impl(const BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD
dwKeyLen,
DWORD dwDataLen, DWORD dwPubExp)
{
BYTE *pbTemp, *pbBigNum;
Modified: trunk/reactos/dll/win32/rsaenh/implglue.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rsaenh/implglue.…
==============================================================================
--- trunk/reactos/dll/win32/rsaenh/implglue.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rsaenh/implglue.h [iso-8859-1] Sat Apr 19 18:11:58 2014
@@ -73,31 +73,31 @@
} KEY_CONTEXT;
BOOL init_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext) DECLSPEC_HIDDEN;
-BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, CONST BYTE *pbData,
+BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, const BYTE *pbData,
DWORD dwDataLen) DECLSPEC_HIDDEN;
BOOL finalize_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, BYTE *pbHashValue)
DECLSPEC_HIDDEN;
-BOOL duplicate_hash_impl(ALG_ID aiAlgid, CONST HASH_CONTEXT *pSrcHashContext,
+BOOL duplicate_hash_impl(ALG_ID aiAlgid, const HASH_CONTEXT *pSrcHashContext,
HASH_CONTEXT *pDestHashContext) DECLSPEC_HIDDEN;
BOOL new_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen)
DECLSPEC_HIDDEN;
BOOL free_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext) DECLSPEC_HIDDEN;
BOOL setup_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
DWORD dwEffectiveKeyLen, DWORD dwSaltLen, BYTE *abKeyValue)
DECLSPEC_HIDDEN;
-BOOL duplicate_key_impl(ALG_ID aiAlgid, CONST KEY_CONTEXT *pSrcKeyContext,
+BOOL duplicate_key_impl(ALG_ID aiAlgid, const KEY_CONTEXT *pSrcKeyContext,
KEY_CONTEXT *pDestKeyContext) DECLSPEC_HIDDEN;
/* dwKeySpec is optional for symmetric key algorithms */
-BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContext, CONST
BYTE *pbIn, BYTE *pbOut,
- DWORD enc) DECLSPEC_HIDDEN;
+BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContext, const
BYTE *pbIn,
+ BYTE *pbOut, DWORD enc) DECLSPEC_HIDDEN;
BOOL encrypt_stream_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, BYTE *pbInOut, DWORD
dwLen) DECLSPEC_HIDDEN;
BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD
dwKeyLen,
DWORD *pdwPubExp) DECLSPEC_HIDDEN;
-BOOL import_public_key_impl(CONST BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
+BOOL import_public_key_impl(const BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
DWORD dwPubExp) DECLSPEC_HIDDEN;
BOOL export_private_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD
dwKeyLen,
DWORD *pdwPubExp) DECLSPEC_HIDDEN;
-BOOL import_private_key_impl(CONST BYTE* pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
+BOOL import_private_key_impl(const BYTE* pbSrc, KEY_CONTEXT *pKeyContext, DWORD
dwKeyLen,
DWORD dwDataLen, DWORD dwPubExp) DECLSPEC_HIDDEN;
BOOL gen_rand_impl(BYTE *pbBuffer, DWORD dwLen) DECLSPEC_HIDDEN;
Modified: trunk/reactos/dll/win32/rsaenh/mpi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rsaenh/mpi.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/rsaenh/mpi.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rsaenh/mpi.c [iso-8859-1] Sat Apr 19 18:11:58 2014
@@ -1387,7 +1387,7 @@
{
int x, res;
- /* if its less than zero return */
+ /* if it's less than zero return */
if (b <= 0) {
return MP_OKAY;
}
@@ -1624,7 +1624,7 @@
norm = 0;
}
- /* note hac does 0 based, so if used==5 then its 0,1,2,3,4, e.g. use 4 */
+ /* note hac does 0 based, so if used==5 then it's 0,1,2,3,4, e.g. use 4 */
n = x.used - 1;
t = y.used - 1;
@@ -1745,17 +1745,17 @@
return res;
}
-static int s_is_power_of_two(mp_digit b, int *p)
+static BOOL s_is_power_of_two(mp_digit b, int *p)
{
int x;
for (x = 1; x < DIGIT_BIT; x++) {
if (b == (((mp_digit)1)<<x)) {
*p = x;
- return 1;
+ return TRUE;
}
}
- return 0;
+ return FALSE;
}
/* single digit division (based on routine from MPI) */
@@ -2536,7 +2536,7 @@
goto __ERR;
}
- /* if its too low */
+ /* if it's too low */
while (mp_cmp_d(&C, 0) == MP_LT) {
if ((res = mp_add(&C, b, &C)) != MP_OKAY) {
goto __ERR;
@@ -2821,13 +2821,13 @@
/* divide the smallest by the GCD */
if (mp_cmp_mag(a, b) == MP_LT) {
- /* store quotient in t2 such that t2 * b is the LCM */
+ /* store quotient in t2 so that t2 * b is the LCM */
if ((res = mp_div(a, &t1, &t2, NULL)) != MP_OKAY) {
goto __T;
}
res = mp_mul(b, &t2, c);
} else {
- /* store quotient in t2 such that t2 * a is the LCM */
+ /* store quotient in t2 so that t2 * a is the LCM */
if ((res = mp_div(b, &t1, &t2, NULL)) != MP_OKAY) {
goto __T;
}
Modified: trunk/reactos/dll/win32/rsaenh/rsaenh.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rsaenh/rsaenh.c?…
==============================================================================
--- trunk/reactos/dll/win32/rsaenh/rsaenh.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rsaenh/rsaenh.c [iso-8859-1] Sat Apr 19 18:11:58 2014
@@ -37,11 +37,12 @@
#include <windef.h>
//#include "winbase.h"
#include <winreg.h>
-//#include "wincrypt.h"
+#include <wincrypt.h>
#include "handle.h"
#include "implglue.h"
#include <objbase.h>
#include <rpcproxy.h>
+#include <aclapi.h>
WINE_DEFAULT_DEBUG_CHANNEL(crypt);
@@ -335,7 +336,7 @@
static BOOL import_key(
HCRYPTPROV hProv,
- CONST BYTE *pbData,
+ const BYTE *pbData,
DWORD dwDataLen,
HCRYPTKEY hPubKey,
DWORD dwFlags,
@@ -347,7 +348,7 @@
RSAENH_CPHashData(
HCRYPTPROV hProv,
HCRYPTHASH hHash,
- CONST BYTE *pbData,
+ const BYTE *pbData,
DWORD dwDataLen,
DWORD dwFlags
);
@@ -398,8 +399,8 @@
* Success: TRUE (pbParam was copied into pbBuffer or pbBuffer is NULL)
* Failure: FALSE (pbBuffer is not large enough to hold pbParam). Last error:
ERROR_MORE_DATA
*/
-static inline BOOL copy_param(
- BYTE *pbBuffer, DWORD *pdwBufferSize, CONST BYTE *pbParam, DWORD dwParamSize)
+static inline BOOL copy_param(BYTE *pbBuffer, DWORD *pdwBufferSize, const BYTE *pbParam,
+ DWORD dwParamSize)
{
if (pbBuffer)
{
@@ -461,7 +462,8 @@
* NOTES
* Use free_data_blob to release resources occupied by copy_data_blob.
*/
-static inline BOOL copy_data_blob(PCRYPT_DATA_BLOB dst, CONST PCRYPT_DATA_BLOB src) {
+static inline BOOL copy_data_blob(PCRYPT_DATA_BLOB dst, const PCRYPT_DATA_BLOB src)
+{
dst->pbData = HeapAlloc(GetProcessHeap(), 0, src->cbData);
if (!dst->pbData) {
SetLastError(NTE_NO_MEMORY);
@@ -489,8 +491,8 @@
* NOTES
* Release resources occupied by concat_data_blobs with free_data_blobs
*/
-static inline BOOL concat_data_blobs(PCRYPT_DATA_BLOB dst, CONST PCRYPT_DATA_BLOB src1,
- CONST PCRYPT_DATA_BLOB src2)
+static inline BOOL concat_data_blobs(PCRYPT_DATA_BLOB dst, const PCRYPT_DATA_BLOB src1,
+ const PCRYPT_DATA_BLOB src2)
{
dst->cbData = src1->cbData + src2->cbData;
dst->pbData = HeapAlloc(GetProcessHeap(), 0, dst->cbData);
@@ -655,7 +657,8 @@
* pbData [I] Pointer to data stream to be hashed.
* dwDataLen [I] Length of data stream.
*/
-static inline void update_hash(CRYPTHASH *pCryptHash, CONST BYTE *pbData, DWORD
dwDataLen) {
+static inline void update_hash(CRYPTHASH *pCryptHash, const BYTE *pbData, DWORD
dwDataLen)
+{
BYTE *pbTemp;
switch (pCryptHash->aiAlgid)
@@ -1099,7 +1102,7 @@
* dwFlags [I] Flags indicating which keyset to be opened.
* phKey [O] Returned key
*/
-static BOOL open_container_key(LPCSTR pszContainerName, DWORD dwFlags, HKEY *phKey)
+static BOOL open_container_key(LPCSTR pszContainerName, DWORD dwFlags, REGSAM access,
HKEY *phKey)
{
CHAR szRSABase[MAX_PATH];
HKEY hRootKey;
@@ -1113,7 +1116,7 @@
/* @@ Wine registry key: HKLM\Software\Wine\Crypto\RSA */
/* @@ Wine registry key: HKCU\Software\Wine\Crypto\RSA */
- return RegOpenKeyExA(hRootKey, szRSABase, 0, KEY_READ, phKey) ==
+ return RegOpenKeyExA(hRootKey, szRSABase, 0, access, phKey) ==
ERROR_SUCCESS;
}
@@ -1383,7 +1386,7 @@
HCRYPTPROV hKeyContainer;
HCRYPTKEY hCryptKey;
- if (!open_container_key(pszContainerName, dwFlags, &hKey))
+ if (!open_container_key(pszContainerName, dwFlags, KEY_READ, &hKey))
{
SetLastError(NTE_BAD_KEYSET);
return (HCRYPTPROV)INVALID_HANDLE_VALUE;
@@ -1434,14 +1437,14 @@
* Failure: FALSE (NTE_BAD_ALGID)
*/
static BOOL build_hash_signature(BYTE *pbSignature, DWORD dwLen, ALG_ID aiAlgid,
- CONST BYTE *abHashValue, DWORD dwHashLen, DWORD dwFlags)
+ const BYTE *abHashValue, DWORD dwHashLen, DWORD
dwFlags)
{
/* These prefixes are meant to be concatenated with hash values of the
* respective kind to form a PKCS #7 DigestInfo. */
static const struct tagOIDDescriptor {
ALG_ID aiAlgid;
DWORD dwLen;
- CONST BYTE abOID[19];
+ const BYTE abOID[19];
} aOIDDescriptor[] = {
{ CALG_MD2, 18, { 0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48,
0x86, 0xf7, 0x0d, 0x02, 0x02, 0x05, 0x00, 0x04, 0x10 } },
@@ -1529,7 +1532,8 @@
* Success: TRUE
* Failure: FALSE
*/
-static BOOL tls1_p(HCRYPTHASH hHMAC, CONST PCRYPT_DATA_BLOB pblobSeed, PBYTE pbBuffer,
DWORD dwBufferLen)
+static BOOL tls1_p(HCRYPTHASH hHMAC, const PCRYPT_DATA_BLOB pblobSeed, BYTE *pbBuffer,
+ DWORD dwBufferLen)
{
CRYPTHASH *pHMAC;
BYTE abAi[RSAENH_MAX_HASH_SIZE];
@@ -1587,8 +1591,8 @@
* Success: TRUE
* Failure: FALSE
*/
-static BOOL tls1_prf(HCRYPTPROV hProv, HCRYPTPROV hSecret, CONST PCRYPT_DATA_BLOB
pblobLabel,
- CONST PCRYPT_DATA_BLOB pblobSeed, PBYTE pbBuffer, DWORD
dwBufferLen)
+static BOOL tls1_prf(HCRYPTPROV hProv, HCRYPTPROV hSecret, const PCRYPT_DATA_BLOB
pblobLabel,
+ const PCRYPT_DATA_BLOB pblobSeed, BYTE *pbBuffer, DWORD
dwBufferLen)
{
HMAC_INFO hmacInfo = { 0, NULL, 0, NULL, 0 };
HCRYPTHASH hHMAC = (HCRYPTHASH)INVALID_HANDLE_VALUE;
@@ -1656,7 +1660,7 @@
* Success: TRUE
* Failure: FALSE (NTE_BAD_LEN, too much data to pad)
*/
-static BOOL pad_data(CONST BYTE *abData, DWORD dwDataLen, BYTE *abBuffer, DWORD
dwBufferLen,
+static BOOL pad_data(const BYTE *abData, DWORD dwDataLen, BYTE *abBuffer, DWORD
dwBufferLen,
DWORD dwFlags)
{
DWORD i;
@@ -1697,7 +1701,7 @@
* Success: TRUE
* Failure: FALSE, (NTE_BAD_DATA, no valid PKCS1 padding or buffer too small)
*/
-static BOOL unpad_data(CONST BYTE *abData, DWORD dwDataLen, BYTE *abBuffer, DWORD
*dwBufferLen,
+static BOOL unpad_data(const BYTE *abData, DWORD dwDataLen, BYTE *abBuffer, DWORD
*dwBufferLen,
DWORD dwFlags)
{
DWORD i;
@@ -2721,13 +2725,13 @@
* Success: TRUE.
* Failure: FALSE.
*/
-static BOOL import_private_key(HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLen,
+static BOOL import_private_key(HCRYPTPROV hProv, const BYTE *pbData, DWORD dwDataLen,
DWORD dwFlags, BOOL fStoreKey, HCRYPTKEY *phKey)
{
KEYCONTAINER *pKeyContainer;
CRYPTKEY *pCryptKey;
- CONST BLOBHEADER *pBlobHeader = (CONST BLOBHEADER*)pbData;
- CONST RSAPUBKEY *pRSAPubKey = (CONST RSAPUBKEY*)(pBlobHeader+1);
+ const BLOBHEADER *pBlobHeader = (const BLOBHEADER*)pbData;
+ const RSAPUBKEY *pRSAPubKey = (const RSAPUBKEY*)(pBlobHeader+1);
BOOL ret;
if (dwFlags & CRYPT_IPSEC_HMAC_KEY)
@@ -2771,7 +2775,7 @@
*phKey = new_key(hProv, pBlobHeader->aiKeyAlg, MAKELONG(0,pRSAPubKey->bitlen),
&pCryptKey);
if (*phKey == (HCRYPTKEY)INVALID_HANDLE_VALUE) return FALSE;
setup_key(pCryptKey);
- ret = import_private_key_impl((CONST BYTE*)(pRSAPubKey+1),
&pCryptKey->context,
+ ret = import_private_key_impl((const BYTE*)(pRSAPubKey+1),
&pCryptKey->context,
pRSAPubKey->bitlen/8, dwDataLen,
pRSAPubKey->pubexp);
if (ret) {
if (dwFlags & CRYPT_EXPORTABLE)
@@ -2818,13 +2822,13 @@
* Success: TRUE.
* Failure: FALSE.
*/
-static BOOL import_public_key(HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLen,
+static BOOL import_public_key(HCRYPTPROV hProv, const BYTE *pbData, DWORD dwDataLen,
DWORD dwFlags, BOOL fStoreKey, HCRYPTKEY *phKey)
{
KEYCONTAINER *pKeyContainer;
CRYPTKEY *pCryptKey;
- CONST BLOBHEADER *pBlobHeader = (CONST BLOBHEADER*)pbData;
- CONST RSAPUBKEY *pRSAPubKey = (CONST RSAPUBKEY*)(pBlobHeader+1);
+ const BLOBHEADER *pBlobHeader = (const BLOBHEADER*)pbData;
+ const RSAPUBKEY *pRSAPubKey = (const RSAPUBKEY*)(pBlobHeader+1);
ALG_ID algID;
BOOL ret;
@@ -2856,7 +2860,7 @@
*phKey = new_key(hProv, algID, MAKELONG(0,pRSAPubKey->bitlen), &pCryptKey);
if (*phKey == (HCRYPTKEY)INVALID_HANDLE_VALUE) return FALSE;
setup_key(pCryptKey);
- ret = import_public_key_impl((CONST BYTE*)(pRSAPubKey+1),
&pCryptKey->context,
+ ret = import_public_key_impl((const BYTE*)(pRSAPubKey+1),
&pCryptKey->context,
pRSAPubKey->bitlen >> 3,
pRSAPubKey->pubexp);
if (ret) {
if (dwFlags & CRYPT_EXPORTABLE)
@@ -2897,14 +2901,13 @@
* Success: TRUE.
* Failure: FALSE.
*/
-static BOOL import_symmetric_key(HCRYPTPROV hProv, CONST BYTE *pbData,
- DWORD dwDataLen, HCRYPTKEY hPubKey,
- DWORD dwFlags, HCRYPTKEY *phKey)
+static BOOL import_symmetric_key(HCRYPTPROV hProv, const BYTE *pbData, DWORD dwDataLen,
+ HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY *phKey)
{
CRYPTKEY *pCryptKey, *pPubKey;
- CONST BLOBHEADER *pBlobHeader = (CONST BLOBHEADER*)pbData;
- CONST ALG_ID *pAlgid = (CONST ALG_ID*)(pBlobHeader+1);
- CONST BYTE *pbKeyStream = (CONST BYTE*)(pAlgid + 1);
+ const BLOBHEADER *pBlobHeader = (const BLOBHEADER*)pbData;
+ const ALG_ID *pAlgid = (const ALG_ID*)(pBlobHeader+1);
+ const BYTE *pbKeyStream = (const BYTE*)(pAlgid + 1);
BYTE *pbDecrypted;
DWORD dwKeyLen;
@@ -2974,14 +2977,13 @@
* Success: TRUE.
* Failure: FALSE.
*/
-static BOOL import_plaintext_key(HCRYPTPROV hProv, CONST BYTE *pbData,
- DWORD dwDataLen, DWORD dwFlags,
- HCRYPTKEY *phKey)
+static BOOL import_plaintext_key(HCRYPTPROV hProv, const BYTE *pbData, DWORD dwDataLen,
+ DWORD dwFlags, HCRYPTKEY *phKey)
{
CRYPTKEY *pCryptKey;
- CONST BLOBHEADER *pBlobHeader = (CONST BLOBHEADER*)pbData;
- CONST DWORD *pKeyLen = (CONST DWORD *)(pBlobHeader + 1);
- CONST BYTE *pbKeyStream = (CONST BYTE*)(pKeyLen + 1);
+ const BLOBHEADER *pBlobHeader = (const BLOBHEADER*)pbData;
+ const DWORD *pKeyLen = (const DWORD *)(pBlobHeader + 1);
+ const BYTE *pbKeyStream = (const BYTE*)(pKeyLen + 1);
if (dwDataLen < sizeof(BLOBHEADER)+sizeof(DWORD)+*pKeyLen)
{
@@ -3053,12 +3055,11 @@
* Success: TRUE.
* Failure: FALSE.
*/
-static BOOL import_key(HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLen,
- HCRYPTKEY hPubKey, DWORD dwFlags, BOOL fStoreKey,
- HCRYPTKEY *phKey)
+static BOOL import_key(HCRYPTPROV hProv, const BYTE *pbData, DWORD dwDataLen, HCRYPTKEY
hPubKey,
+ DWORD dwFlags, BOOL fStoreKey, HCRYPTKEY *phKey)
{
KEYCONTAINER *pKeyContainer;
- CONST BLOBHEADER *pBlobHeader = (CONST BLOBHEADER*)pbData;
+ const BLOBHEADER *pBlobHeader = (const BLOBHEADER*)pbData;
if (!lookup_handle(&handle_table, hProv, RSAENH_MAGIC_CONTAINER,
(OBJECTHDR**)&pKeyContainer))
@@ -3124,7 +3125,7 @@
* Success: TRUE.
* Failure: FALSE.
*/
-BOOL WINAPI RSAENH_CPImportKey(HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLen,
+BOOL WINAPI RSAENH_CPImportKey(HCRYPTPROV hProv, const BYTE *pbData, DWORD dwDataLen,
HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY *phKey)
{
TRACE("(hProv=%08lx, pbData=%p, dwDataLen=%d, hPubKey=%08lx, dwFlags=%08x,
phKey=%p)\n",
@@ -3321,11 +3322,11 @@
switch (dwParam)
{
case HP_ALGID:
- return copy_param(pbData, pdwDataLen, (CONST
BYTE*)&pCryptHash->aiAlgid,
+ return copy_param(pbData, pdwDataLen, (const
BYTE*)&pCryptHash->aiAlgid,
sizeof(ALG_ID));
case HP_HASHSIZE:
- return copy_param(pbData, pdwDataLen, (CONST
BYTE*)&pCryptHash->dwHashSize,
+ return copy_param(pbData, pdwDataLen, (const
BYTE*)&pCryptHash->dwHashSize,
sizeof(DWORD));
case HP_HASHVAL:
@@ -3619,37 +3620,37 @@
case KP_PADDING:
dwValue = PKCS5_PADDING;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwValue,
sizeof(DWORD));
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwValue,
sizeof(DWORD));
case KP_KEYLEN:
dwValue = pCryptKey->dwKeyLen << 3;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwValue,
sizeof(DWORD));
-
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwValue,
sizeof(DWORD));
+
case KP_EFFECTIVE_KEYLEN:
if (pCryptKey->dwEffectiveKeyLen)
dwValue = pCryptKey->dwEffectiveKeyLen;
else
dwValue = pCryptKey->dwKeyLen << 3;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwValue,
sizeof(DWORD));
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwValue,
sizeof(DWORD));
case KP_BLOCKLEN:
dwValue = pCryptKey->dwBlockLen << 3;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwValue,
sizeof(DWORD));
-
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwValue,
sizeof(DWORD));
+
case KP_MODE:
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&pCryptKey->dwMode,
sizeof(DWORD));
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&pCryptKey->dwMode,
sizeof(DWORD));
case KP_MODE_BITS:
- return copy_param(pbData, pdwDataLen, (CONST
BYTE*)&pCryptKey->dwModeBits,
+ return copy_param(pbData, pdwDataLen, (const
BYTE*)&pCryptKey->dwModeBits,
sizeof(DWORD));
-
+
case KP_PERMISSIONS:
- return copy_param(pbData, pdwDataLen, (CONST
BYTE*)&pCryptKey->dwPermissions,
+ return copy_param(pbData, pdwDataLen, (const
BYTE*)&pCryptKey->dwPermissions,
sizeof(DWORD));
case KP_ALGID:
- return copy_param(pbData, pdwDataLen, (CONST
BYTE*)&pCryptKey->aiAlgid, sizeof(DWORD));
-
+ return copy_param(pbData, pdwDataLen, (const
BYTE*)&pCryptKey->aiAlgid, sizeof(DWORD));
+
default:
SetLastError(NTE_BAD_TYPE);
return FALSE;
@@ -3678,6 +3679,7 @@
* - PP_SIG_KEYSIZE_INC: RSA signature keywidth granularity in bits.
* - PP_KEYX_KEYSIZE_INC: RSA key-exchange keywidth granularity in bits.
* - PP_ENUMALGS{_EX}: Query provider capabilities.
+ * - PP_KEYSET_SEC_DESCR: Retrieve security descriptor on container.
*/
BOOL WINAPI RSAENH_CPGetProvParam(HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData,
DWORD *pdwDataLen, DWORD dwFlags)
@@ -3692,7 +3694,7 @@
* Returning this BLOB seems to satisfy IE. The marked 0x00 seem
* to be 'don't care's. If you know anything more specific about
* this provider parameter, please report to wine-devel(a)winehq.org */
- static CONST BYTE abWTF[96] = {
+ static const BYTE abWTF[96] = {
0xb0, 0x25, 0x63, 0x86, 0x9c, 0xab, 0xb6, 0x37,
0xe8, 0x82, /**/0x00,/**/ 0x72, 0x06, 0xb2, /**/0x00,/**/ 0x3b,
0x60, 0x35, /**/0x00,/**/ 0x3b, 0x88, 0xce, /**/0x00,/**/ 0x82,
@@ -3727,42 +3729,42 @@
{
case PP_CONTAINER:
case PP_UNIQUE_CONTAINER:/* MSDN says we can return the same value as
PP_CONTAINER */
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)pKeyContainer->szName,
+ return copy_param(pbData, pdwDataLen, (const BYTE*)pKeyContainer->szName,
strlen(pKeyContainer->szName)+1);
case PP_NAME:
- return copy_param(pbData, pdwDataLen, (CONST
BYTE*)pKeyContainer->szProvName,
+ return copy_param(pbData, pdwDataLen, (const
BYTE*)pKeyContainer->szProvName,
strlen(pKeyContainer->szProvName)+1);
case PP_PROVTYPE:
dwTemp = PROV_RSA_FULL;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwTemp,
sizeof(dwTemp));
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwTemp,
sizeof(dwTemp));
case PP_KEYSPEC:
dwTemp = AT_SIGNATURE | AT_KEYEXCHANGE;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwTemp,
sizeof(dwTemp));
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwTemp,
sizeof(dwTemp));
case PP_KEYSET_TYPE:
dwTemp = pKeyContainer->dwFlags & CRYPT_MACHINE_KEYSET;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwTemp,
sizeof(dwTemp));
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwTemp,
sizeof(dwTemp));
case PP_KEYSTORAGE:
dwTemp = CRYPT_SEC_DESCR;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwTemp,
sizeof(dwTemp));
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwTemp,
sizeof(dwTemp));
case PP_SIG_KEYSIZE_INC:
case PP_KEYX_KEYSIZE_INC:
dwTemp = 8;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwTemp,
sizeof(dwTemp));
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwTemp,
sizeof(dwTemp));
case PP_IMPTYPE:
dwTemp = CRYPT_IMPL_SOFTWARE;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwTemp,
sizeof(dwTemp));
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwTemp,
sizeof(dwTemp));
case PP_VERSION:
dwTemp = 0x00000200;
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwTemp,
sizeof(dwTemp));
-
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&dwTemp,
sizeof(dwTemp));
+
case PP_ENUMCONTAINERS:
if ((dwFlags & CRYPT_FIRST) == CRYPT_FIRST)
pKeyContainer->dwEnumContainersCtr = 0;
@@ -3771,7 +3773,7 @@
return TRUE;
}
- if (!open_container_key("", dwFlags, &hKey))
+ if (!open_container_key("", dwFlags, KEY_READ, &hKey))
{
SetLastError(ERROR_NO_MORE_ITEMS);
return FALSE;
@@ -3821,22 +3823,50 @@
memcpy(provEnumalgs.szName, aProvEnumAlgsEx
[pKeyContainer->dwPersonality][pKeyContainer->dwEnumAlgsCtr].szName,
20*sizeof(CHAR));
-
- return copy_param(pbData, pdwDataLen, (CONST BYTE*)&provEnumalgs,
+
+ return copy_param(pbData, pdwDataLen, (const BYTE*)&provEnumalgs,
sizeof(PROV_ENUMALGS));
} else {
if (pbData && (*pdwDataLen >= sizeof(PROV_ENUMALGS_EX)))
pKeyContainer->dwEnumAlgsCtr = ((dwFlags & CRYPT_FIRST) ==
CRYPT_FIRST) ?
0 : pKeyContainer->dwEnumAlgsCtr+1;
-
+
return copy_param(pbData, pdwDataLen,
- (CONST BYTE*)&aProvEnumAlgsEx
+ (const BYTE*)&aProvEnumAlgsEx
[pKeyContainer->dwPersonality][pKeyContainer->dwEnumAlgsCtr],
sizeof(PROV_ENUMALGS_EX));
}
case PP_CRYPT_COUNT_KEY_USE: /* Asked for by IE About dialog */
return copy_param(pbData, pdwDataLen, abWTF, sizeof(abWTF));
+
+ case PP_KEYSET_SEC_DESCR:
+ {
+ SECURITY_DESCRIPTOR *sd;
+ DWORD err, len, flags = (pKeyContainer->dwFlags &
CRYPT_MACHINE_KEYSET);
+
+ if (!open_container_key(pKeyContainer->szName, flags, KEY_READ,
&hKey))
+ {
+ SetLastError(NTE_BAD_KEYSET);
+ return FALSE;
+ }
+
+ err = GetSecurityInfo(hKey, SE_REGISTRY_KEY, dwFlags, NULL, NULL, NULL, NULL,
(void **)&sd);
+ RegCloseKey(hKey);
+ if (err)
+ {
+ SetLastError(err);
+ return FALSE;
+ }
+
+ len = GetSecurityDescriptorLength(sd);
+ if (*pdwDataLen >= len) memcpy(pbData, sd, len);
+ else SetLastError(ERROR_INSUFFICIENT_BUFFER);
+ *pdwDataLen = len;
+
+ LocalFree(sd);
+ return TRUE;
+ }
default:
/* MSDN: Unknown parameter number in dwParam */
@@ -4080,7 +4110,7 @@
* The actual hash value is queried with CPGetHashParam, which will finalize
* the hash. Updating a finalized hash will fail with a last error NTE_BAD_HASH_STATE.
*/
-BOOL WINAPI RSAENH_CPHashData(HCRYPTPROV hProv, HCRYPTHASH hHash, CONST BYTE *pbData,
+BOOL WINAPI RSAENH_CPHashData(HCRYPTPROV hProv, HCRYPTHASH hHash, const BYTE *pbData,
DWORD dwDataLen, DWORD dwFlags)
{
CRYPTHASH *pCryptHash;
@@ -4088,7 +4118,7 @@
TRACE("(hProv=%08lx, hHash=%08lx, pbData=%p, dwDataLen=%d,
dwFlags=%08x)\n",
hProv, hHash, pbData, dwDataLen, dwFlags);
- if (dwFlags)
+ if (dwFlags & ~CRYPT_USERDATA)
{
SetLastError(NTE_BAD_FLAGS);
return FALSE;
@@ -4313,8 +4343,56 @@
*/
BOOL WINAPI RSAENH_CPSetProvParam(HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData, DWORD
dwFlags)
{
- FIXME("(stub)\n");
- return FALSE;
+ KEYCONTAINER *pKeyContainer;
+ HKEY hKey;
+
+ TRACE("(hProv=%08lx, dwParam=%08x, pbData=%p, dwFlags=%08x)\n", hProv,
dwParam, pbData, dwFlags);
+
+ if (!lookup_handle(&handle_table, hProv, RSAENH_MAGIC_CONTAINER, (OBJECTHDR
**)&pKeyContainer))
+ {
+ SetLastError(NTE_BAD_UID);
+ return FALSE;
+ }
+
+ switch (dwParam)
+ {
+ case PP_KEYSET_SEC_DESCR:
+ {
+ SECURITY_DESCRIPTOR *sd = (SECURITY_DESCRIPTOR *)pbData;
+ DWORD err, flags = (pKeyContainer->dwFlags & CRYPT_MACHINE_KEYSET);
+ BOOL def, present;
+ REGSAM access = WRITE_DAC | WRITE_OWNER | ACCESS_SYSTEM_SECURITY;
+ PSID owner = NULL, group = NULL;
+ PACL dacl = NULL, sacl = NULL;
+
+ if (!open_container_key(pKeyContainer->szName, flags, access, &hKey))
+ {
+ SetLastError(NTE_BAD_KEYSET);
+ return FALSE;
+ }
+
+ if ((dwFlags & OWNER_SECURITY_INFORMATION &&
!GetSecurityDescriptorOwner(sd, &owner, &def)) ||
+ (dwFlags & GROUP_SECURITY_INFORMATION &&
!GetSecurityDescriptorGroup(sd, &group, &def)) ||
+ (dwFlags & DACL_SECURITY_INFORMATION &&
!GetSecurityDescriptorDacl(sd, &present, &dacl, &def)) ||
+ (dwFlags & SACL_SECURITY_INFORMATION &&
!GetSecurityDescriptorSacl(sd, &present, &sacl, &def)))
+ {
+ RegCloseKey(hKey);
+ return FALSE;
+ }
+
+ err = SetSecurityInfo(hKey, SE_REGISTRY_KEY, dwFlags, owner, group, dacl, sacl);
+ RegCloseKey(hKey);
+ if (err)
+ {
+ SetLastError(err);
+ return FALSE;
+ }
+ return TRUE;
+ }
+ default:
+ FIXME("unimplemented parameter %08x\n", dwParam);
+ return FALSE;
+ }
}
/******************************************************************************
@@ -4378,7 +4456,7 @@
*pdwSigLen = pCryptKey->dwKeyLen;
if (sDescription) {
- if (!RSAENH_CPHashData(hProv, hHash, (CONST BYTE*)sDescription,
+ if (!RSAENH_CPHashData(hProv, hHash, (const BYTE*)sDescription,
(DWORD)lstrlenW(sDescription)*sizeof(WCHAR), 0))
{
goto out;
@@ -4420,7 +4498,7 @@
* Success: TRUE (Signature is valid)
* Failure: FALSE (GetLastError() == NTE_BAD_SIGNATURE, if signature is invalid)
*/
-BOOL WINAPI RSAENH_CPVerifySignature(HCRYPTPROV hProv, HCRYPTHASH hHash, CONST BYTE
*pbSignature,
+BOOL WINAPI RSAENH_CPVerifySignature(HCRYPTPROV hProv, HCRYPTHASH hHash, const BYTE
*pbSignature,
DWORD dwSigLen, HCRYPTKEY hPubKey, LPCWSTR
sDescription,
DWORD dwFlags)
{
@@ -4469,7 +4547,7 @@
}
if (sDescription) {
- if (!RSAENH_CPHashData(hProv, hHash, (CONST BYTE*)sDescription,
+ if (!RSAENH_CPHashData(hProv, hHash, (const BYTE*)sDescription,
(DWORD)lstrlenW(sDescription)*sizeof(WCHAR), 0))
{
return FALSE;
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Apr 19 18:11:58 2014
@@ -167,7 +167,7 @@
reactos/dll/win32/riched32 # Synced to Wine-1.7.1
reactos/dll/win32/rpcrt4 # Synced to Wine-1.7.1
reactos/dll/win32/rsabase # Synced to Wine-1.7.1
-reactos/dll/win32/rsaenh # Synced to Wine-1.7.1
+reactos/dll/win32/rsaenh # Synced to Wine-1.7.17
reactos/dll/win32/sccbase # Synced to Wine-1.7.1
reactos/dll/win32/schannel # Synced to Wine-1.7.1
reactos/dll/win32/scrrun # Synced to Wine-1.7.1