mirror of
https://github.com/reactos/reactos.git
synced 2025-01-07 14:51:00 +00:00
Implement CryptSignHashW based WINE and old CryptSignHashA. Change CryptSignHashA to call CryptSignHashW.
svn path=/trunk/; revision=23921
This commit is contained in:
parent
d5168c3b05
commit
d6d0d40cad
1 changed files with 10 additions and 1 deletions
|
@ -1606,6 +1606,13 @@ BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, BYTE *pbData, DWORD dwDataLen,
|
|||
*/
|
||||
BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescription,
|
||||
DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
|
||||
{
|
||||
/* Since sDescription is ignored we dont need to convert it, we just pass null */
|
||||
return CryptSignHashW(hHash, dwKeySpec, NULL, dwFlags, pbSignature, pdwSigLen);
|
||||
}
|
||||
|
||||
BOOL WINAPI CryptSignHashW (HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescription,
|
||||
DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
|
||||
{
|
||||
PCRYPTHASH hash = (PCRYPTHASH)hHash;
|
||||
PCRYPTPROV prov;
|
||||
|
@ -1613,12 +1620,13 @@ BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescripti
|
|||
DPRINT("(0x%lx, %ld, %08ld, %p, %p)\n", hHash, dwKeySpec, dwFlags, pbSignature, pdwSigLen);
|
||||
if (sDescription)
|
||||
{
|
||||
/* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/cryptsignhash.asp */
|
||||
DPRINT("The sDescription parameter is not supported (and no longer used). Ignoring.\n");
|
||||
}
|
||||
|
||||
if (!hash)
|
||||
CRYPT_ReturnLastError(ERROR_INVALID_HANDLE);
|
||||
if (!pdwSigLen)
|
||||
if (!pdwSigLen || !hash->pProvider)
|
||||
CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER);
|
||||
|
||||
prov = hash->pProvider;
|
||||
|
@ -1626,6 +1634,7 @@ BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescripti
|
|||
dwFlags, pbSignature, pdwSigLen);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* CryptSetHashParam (ADVAPI32.@)
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue