Created stubs for all cryptographic functions.
This commit is contained in:
parent
bc878ef4d9
commit
ef58632ac2
|
@ -38,44 +38,44 @@ debug_channels (advapi reg)
|
|||
@ stdcall CreateServiceA(long ptr ptr long long long long ptr ptr ptr ptr ptr ptr) CreateServiceA
|
||||
@ stdcall CreateServiceW (long ptr ptr long long long long ptr ptr ptr ptr ptr ptr) CreateServiceW
|
||||
@ stdcall CryptAcquireContextA(ptr str str long long) CryptAcquireContextA
|
||||
@ stub CryptAcquireContextW
|
||||
@ stub CryptContextAddRef
|
||||
@ stub CryptCreateHash
|
||||
@ stub CryptDecrypt
|
||||
@ stub CryptDeriveKey
|
||||
@ stub CryptDestroyHash
|
||||
@ stub CryptDestroyKey
|
||||
@ stub CryptDuplicateKey
|
||||
@ stub CryptDuplicateHash
|
||||
@ stub CryptEncrypt
|
||||
@ stub CryptEnumProvidersA
|
||||
@ stub CryptEnumProvidersW
|
||||
@ stub CryptEnumProviderTypesA
|
||||
@ stub CryptEnumProviderTypesW
|
||||
@ stub CryptExportKey
|
||||
@ stub CryptGenKey
|
||||
@ stub CryptGetKeyParam
|
||||
@ stub CryptGetHashParam
|
||||
@ stub CryptGetProvParam
|
||||
@ stdcall CryptAcquireContextW(ptr wstr wstr long long) CryptAcquireContextW
|
||||
@ stdcall CryptContextAddRef(long ptr long) CryptContextAddRef
|
||||
@ stdcall CryptCreateHash(long long long long ptr) CryptCreateHash
|
||||
@ stdcall CryptDecrypt(long long long long ptr ptr) CryptDecrypt
|
||||
@ stdcall CryptDeriveKey(long long long long ptr) CryptDeriveKey
|
||||
@ stdcall CryptDestroyHash(long) CryptDestroyHash
|
||||
@ stdcall CryptDestroyKey(long) CryptDestroyHash
|
||||
@ stdcall CryptDuplicateHash(long ptr long ptr) CryptDuplicateHash
|
||||
@ stdcall CryptDuplicateKey(long ptr long ptr) CryptDuplicateKey
|
||||
@ stdcall CryptEncrypt(long long long long ptr ptr long) CryptEncrypt
|
||||
@ stdcall CryptEnumProvidersA(long ptr long ptr ptr ptr) CryptEnumProvidersA
|
||||
@ stdcall CryptEnumProvidersW(long ptr long ptr ptr ptr) CryptEnumProvidersW
|
||||
@ stdcall CryptEnumProviderTypesA(long ptr long ptr ptr ptr) CryptEnumProviderTypesA
|
||||
@ stdcall CryptEnumProviderTypesW(long ptr long ptr ptr ptr) CryptEnumProviderTypesW
|
||||
@ stdcall CryptExportKey(long long long long ptr ptr) CryptExportKey
|
||||
@ stdcall CryptGenKey(long long long ptr) CryptGenKey
|
||||
@ stdcall CryptGenRandom(long long ptr) CryptGenRandom
|
||||
@ stub CryptGetDefaultProviderA
|
||||
@ stub CryptGetDefaultProviderW
|
||||
@ stub CryptGetUserKey
|
||||
@ stub CryptHashData
|
||||
@ stub CryptHashSessionKey
|
||||
@ stub CryptImportKey
|
||||
@ stdcall CryptGetDefaultProviderA(long ptr long ptr ptr) CryptGetDefaultProviderA
|
||||
@ stdcall CryptGetDefaultProviderW(long ptr long ptr ptr) CryptGetDefaultProviderW
|
||||
@ stdcall CryptGetHashParam(long long ptr ptr long) CryptGetHashParam
|
||||
@ stdcall CryptGetKeyParam(long long ptr ptr long) CryptGetKeyParam
|
||||
@ stdcall CryptGetProvParam(long long ptr ptr long) CryptGetProvParam
|
||||
@ stdcall CryptGetUserKey(long long ptr) CryptGetUserKey
|
||||
@ stdcall CryptHashData(long ptr long long) CryptHashData
|
||||
@ stdcall CryptHashSessionKey(long long long) CryptHashSessionKey
|
||||
@ stdcall CryptImportKey(long ptr long long long ptr) CryptImportKey
|
||||
@ stdcall CryptReleaseContext(long long) CryptReleaseContext
|
||||
@ stub CryptSetHashParam
|
||||
@ stdcall CryptSignHashA(long long str long ptr ptr) CryptSignHashA
|
||||
@ stdcall CryptSignHashW(long long wstr long ptr ptr) CryptSignHashW
|
||||
@ stdcall CryptSetHashParam(long long ptr long) CryptSetHashParam
|
||||
@ stdcall CryptSetKeyParam(long long ptr long) CryptSetKeyParam
|
||||
@ stub CryptSetProvParam
|
||||
@ stub CryptSignHashA
|
||||
@ stub CryptSignHashW
|
||||
@ stub CryptSetProviderA
|
||||
@ stub CryptSetProviderW
|
||||
@ stub CryptSetProviderExA
|
||||
@ stub CryptSetProviderExW
|
||||
@ stub CryptVerifySignatureA
|
||||
@ stub CryptVerifySignatureW
|
||||
@ stdcall CryptSetProviderA(str long) CryptSetProviderA
|
||||
@ stdcall CryptSetProviderW(wstr long) CryptSetProviderW
|
||||
@ stdcall CryptSetProviderExA(str long ptr long) CryptSetProviderExA
|
||||
@ stdcall CryptSetProviderExW(wstr long ptr long) CryptSetProviderExW
|
||||
@ stdcall CryptSetProvParam(long long ptr long) CryptSetProvParam
|
||||
@ stdcall CryptVerifySignatureA(long ptr long long str long) CryptVerifySignatureA
|
||||
@ stdcall CryptVerifySignatureW(long ptr long long wstr long) CryptVerifySignatureW
|
||||
@ stub DeleteAce
|
||||
@ stdcall DeleteService(long) DeleteService
|
||||
@ stdcall DeregisterEventSource(long) DeregisterEventSource
|
||||
|
|
|
@ -24,71 +24,406 @@ DEFAULT_DEBUG_CHANNEL(advapi);
|
|||
*
|
||||
* RETURNS TRUE on success, FALSE on failure.
|
||||
*/
|
||||
|
||||
BOOL WINAPI
|
||||
CryptAcquireContextA( HCRYPTPROV *phProv, LPCSTR pszContainer,
|
||||
LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
|
||||
BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
|
||||
LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p, %s, %s, %ld, %08lx): stub!\n", phProv, pszContainer,
|
||||
pszProvider, dwProvType, dwFlags);
|
||||
return FALSE;
|
||||
FIXME("(%p, %s, %s, %ld, %08lx): stub!\n", phProv, pszContainer,
|
||||
pszProvider, dwProvType, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptAcquireContextW (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
|
||||
LPCWSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p, %s, %s, %ld, %08lx): stub!\n", phProv, debugstr_w(pszContainer),
|
||||
debugstr_w(pszProvider), dwProvType, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptGenRandom (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptGenRandom (HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
FIXME("(0x%lx, %ld, %p): stub!\n", hProv, dwLen, pbBuffer);
|
||||
/*
|
||||
FIXME: Currently this function is just a stub, it is missing functionality in
|
||||
the following (major) ways:
|
||||
(1) It makes no use of the passed in HCRYPTPROV handle. (ie. it doesn't
|
||||
use a cryptographic service provider (CSP)
|
||||
(2) It doesn't use the values in the passed in pbBuffer to further randomize
|
||||
its internal seed.
|
||||
(3) MSDN mentions that this function produces "cryptographically random"
|
||||
data, which is "... far more random than the data generated by the typical
|
||||
random number generator such as the one shipped with your C compiler".
|
||||
We are currently using the C runtime rand() function. ^_^
|
||||
|
||||
See MSDN documentation for CryptGenRandom for more information.
|
||||
*/
|
||||
|
||||
if (dwLen <= 0)
|
||||
return FALSE;
|
||||
|
||||
srand(time(NULL));
|
||||
for (i=0; i<dwLen; i++)
|
||||
{
|
||||
*pbBuffer = (BYTE)(rand() % 256);
|
||||
pbBuffer++;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptContextAddRef (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptContextAddRef (HCRYPTPROV hProv, DWORD *pdwReserved, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, %p, %08lx): stub!\n", hProv, pdwReserved, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptCreateHash (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey,
|
||||
DWORD dwFlags, HCRYPTHASH *phHash)
|
||||
{
|
||||
FIXME("(0x%lx, 0x%x, 0x%lx, %08lx, %p): stub!\n", hProv, Algid, hKey, dwFlags, phHash);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptDecrypt (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptDecrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final,
|
||||
DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen)
|
||||
{
|
||||
FIXME("(0x%lx, 0x%lx, %d, %08lx, %p, %p): stub!\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptDeriveKey (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptDeriveKey (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData,
|
||||
DWORD dwFlags, HCRYPTKEY *phKey)
|
||||
{
|
||||
FIXME("(0x%lx, %d, 0x%ld, %08ld, %p): stub!\n", hProv, Algid, hBaseData, dwFlags, phKey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptDestroyHash (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptDestroyHash (HCRYPTHASH hHash)
|
||||
{
|
||||
FIXME("(0x%lx): stub!\n", hHash);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptDestroyKey (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptDestroyKey (HCRYPTKEY hKey)
|
||||
{
|
||||
FIXME("(0x%lx): stub!\n", hKey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptDuplicateHash (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptDuplicateHash (HCRYPTHASH hHash, DWORD *pdwReserved,
|
||||
DWORD dwFlags, HCRYPTHASH *phHash)
|
||||
{
|
||||
FIXME("(0x%lx, %p, %08ld, %p): stub!\n", hHash, pdwReserved, dwFlags, phHash);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptDuplicateKey (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptDuplicateKey (HCRYPTKEY hKey, DWORD *pdwReserved, DWORD dwFlags, HCRYPTKEY *phKey)
|
||||
{
|
||||
FIXME("(0x%lx, %p, %08ld, %p): stub!\n", hKey, pdwReserved, dwFlags, phKey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptEncrypt (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptEncrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final,
|
||||
DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen, DWORD dwBufLen)
|
||||
{
|
||||
FIXME("(0x%lx, 0x%lx, %d, %08ld, %p, %p, %ld): stub!\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen, dwBufLen);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptEnumProvidersA (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptEnumProvidersA (DWORD dwIndex, DWORD *pdwReserved,
|
||||
DWORD dwFlags, DWORD *pdwProvType, LPSTR pszProvName, DWORD *pcbProvName)
|
||||
{
|
||||
FIXME("(%ld, %p, %ld, %p, %p, %p): stub!\n", dwIndex, pdwReserved, dwFlags,
|
||||
pdwProvType, pszProvName, pcbProvName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptEnumProvidersW (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
|
||||
DWORD dwFlags, DWORD *pdwProvType, LPWSTR pszProvName, DWORD *pcbProvName)
|
||||
{
|
||||
FIXME("(%ld, %p, %08ld, %p, %p, %p): stub!\n", dwIndex, pdwReserved, dwFlags,
|
||||
pdwProvType, pszProvName, pcbProvName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptEnumProviderTypesA (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved,
|
||||
DWORD dwFlags, DWORD *pdwProvType, LPSTR pszTypeName, DWORD *pcbTypeName)
|
||||
{
|
||||
FIXME("(%ld, %p, %08ld, %p, %p, %p): stub!\n", dwIndex, pdwReserved, dwFlags, pdwProvType, pszTypeName, pcbTypeName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptEnumProviderTypesW (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved,
|
||||
DWORD dwFlags, DWORD *pdwProvType, LPWSTR pszTypeName, DWORD *pcbTypeName)
|
||||
{
|
||||
FIXME("(%ld, %p, %08ld, %p, %p, %p): stub!\n", dwIndex, pdwReserved, dwFlags,
|
||||
pdwProvType, pszTypeName, pcbTypeName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptExportKey (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptExportKey (HCRYPTKEY hKey, HCRYPTKEY hExpKey, DWORD dwBlobType,
|
||||
DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen)
|
||||
{
|
||||
FIXME("(0x%lx, 0x%lx, %ld, %08ld, %p, %p): stub!\n", hKey, hExpKey, dwBlobType, dwFlags, pbData, pdwDataLen);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptGenKey (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptGenKey (HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, HCRYPTKEY *phKey)
|
||||
{
|
||||
FIXME("(0x%lx, %d, %08ld, %p): stub!\n", hProv, Algid, dwFlags, phKey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptGetDefaultProviderA (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptGetDefaultProviderA (DWORD dwProvType, DWORD *pdwReserved,
|
||||
DWORD dwFlags, LPSTR pszProvName, DWORD *pcbProvName)
|
||||
{
|
||||
FIXME("(%ld, %p, %ld, %p, %p): stub!\n", dwProvType, pdwReserved, dwFlags, pszProvName, pcbProvName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptGetDefaultProviderW (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptGetDefaultProviderW (DWORD dwProvType, DWORD *pdwReserved,
|
||||
DWORD dwFlags, LPWSTR pszProvName, DWORD *pcbProvName)
|
||||
{
|
||||
FIXME("(%ld, %p, %08ld, %p, %p): stub!\n", dwProvType, pdwReserved, dwFlags, pszProvName, pcbProvName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptGetHashParam (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptGetHashParam (HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData,
|
||||
DWORD *pdwDataLen, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, %ld, %p, %p, %08ld): stub!\n", hHash, dwParam, pbData, pdwDataLen, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptGetKeyParam (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptGetKeyParam (HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData,
|
||||
DWORD *pdwDataLen, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, %ld, %p, %p, %08ld): stub!\n", hKey, dwParam, pbData, pdwDataLen, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptGetProvParam (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptGetProvParam (HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData,
|
||||
DWORD *pdwDataLen, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, %ld, %p, %p, %08ld): stub!\n", hProv, dwParam, pbData, pdwDataLen, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptGetUserKey (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptGetUserKey (HCRYPTPROV hProv, DWORD dwKeySpec, HCRYPTKEY *phUserKey)
|
||||
{
|
||||
FIXME("(0x%lx, %ld, %p): stub!\n", hProv, dwKeySpec, phUserKey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptHashData (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptHashData (HCRYPTHASH hHash, BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, %p, %ld, %08ld): stub!\n", hHash, pbData, dwDataLen, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptHashSessionKey (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptHashSessionKey (HCRYPTHASH hHash, HCRYPTKEY hKey, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, 0x%lx, %08ld): stub!\n", hHash, hKey, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptImportKey (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, BYTE *pbData, DWORD dwDataLen,
|
||||
HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY *phKey)
|
||||
{
|
||||
FIXME("(0x%lx, %p, %ld, 0x%lx, %08ld, %p): stub!\n", hProv, pbData, dwDataLen, hPubKey, dwFlags, phKey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptReleaseContext (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, %08ld): stub!\n", hProv, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptSignHashA (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescription,
|
||||
DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
|
||||
{
|
||||
FIXME("(0x%lx, %ld, %s, %08ld, %p, %p): stub!\n", hHash, dwKeySpec, sDescription, dwFlags, pbSignature, pdwSigLen);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptSignHashW (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptSignHashW (HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescription,
|
||||
DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
|
||||
{
|
||||
FIXME("(0x%lx, %ld, %s, %08ld, %p, %p): stub!\n", hHash, dwKeySpec, debugstr_w(sDescription), dwFlags, pbSignature, pdwSigLen);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptSetHashParam (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptSetHashParam (HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, %ld, %p, %08ld): stub!\n", hHash, dwParam, pbData, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptSetKeyParam (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI
|
||||
CryptSetKeyParam( HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, DWORD dwFlags)
|
||||
BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%lx, %lx, %p, %lx): stub!\n", hKey, dwParam, pbData, dwFlags);
|
||||
return FALSE;
|
||||
FIXME("(%lx, %lx, %p, %lx): stub!\n", hKey, dwParam, pbData, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* CryptGenRandom (ADVAPI32.@)
|
||||
* CryptSetProviderA (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI
|
||||
CryptGenRandom (HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer)
|
||||
BOOL WINAPI CryptSetProviderA (LPCSTR pszProvName, DWORD dwProvType)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
FIXME("(0x%lx, %ld, %p): stub!\n", hProv, dwLen, pbBuffer);
|
||||
/*
|
||||
FIXME: Currently this function is just a stub, it is missing functionality in
|
||||
the following (major) ways:
|
||||
(1) It makes no use of the passed in HCRYPTPROV handle. (ie. it doesn't
|
||||
use a cryptographic service provider (CSP)
|
||||
(2) It doesn't use the values in the passed in pbBuffer to further randomize
|
||||
its internal seed.
|
||||
(3) MSDN mentions that this function produces "cryptographically random"
|
||||
data, which is "... far more random than the data generated by the typical
|
||||
random number generator such as the one shipped with your C compiler".
|
||||
We are currently using the C runtime rand() function. ^_^
|
||||
|
||||
See MSDN documentation for CryptGenRandom for more information.
|
||||
*/
|
||||
|
||||
if (dwLen <= 0)
|
||||
return FALSE;
|
||||
|
||||
srand(time(NULL));
|
||||
for (i=0; i<dwLen; i++)
|
||||
{
|
||||
*pbBuffer = (BYTE)(rand() % 256);
|
||||
pbBuffer++;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
FIXME("(%s, %ld): stub!\n", pszProvName, dwProvType);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* CryptReleaseContext (ADVAPI32.@)
|
||||
* CryptSetProviderW (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI
|
||||
CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags)
|
||||
BOOL WINAPI CryptSetProviderW (LPCWSTR pszProvName, DWORD dwProvType)
|
||||
{
|
||||
FIXME("(0x%lx, 0x%lx): stub!\n", hProv, dwFlags);
|
||||
return FALSE;
|
||||
FIXME("(%s, %ld): stub!\n", debugstr_w(pszProvName), dwProvType);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptSetProviderEx (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptSetProviderExA (LPCSTR pszProvName, DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%s, %ld, %p, %08ld): stub!\n", pszProvName, dwProvType, pdwReserved, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptSetProviderExW (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptSetProviderExW (LPCWSTR pszProvName, DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%s, %ld, %p, %08ld): stub!\n", debugstr_w(pszProvName), dwProvType, pdwReserved, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptSetProvParam (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, %ld, %p, %08ld): stub!\n", hProv, dwParam, pbData, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptVerifySignatureA (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, BYTE *pbSignature, DWORD dwSigLen,
|
||||
HCRYPTKEY hPubKey, LPCSTR sDescription, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, %p, %ld, 0x%lx, %s, %08ld): stub!\n", hHash, pbSignature,
|
||||
dwSigLen, hPubKey, sDescription, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CryptVerifySignatureW (ADVAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI CryptVerifySignatureW (HCRYPTHASH hHash, BYTE *pbSignature, DWORD dwSigLen,
|
||||
HCRYPTKEY hPubKey, LPCWSTR sDescription, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(0x%lx, %p, %ld, 0x%lx, %s, %08ld): stub!\n", hHash, pbSignature,
|
||||
dwSigLen, hPubKey, debugstr_w(sDescription), dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue