#include "winbase.h"
#include "winreg.h"
#include "wincrypt.h"
-#include "lmcons.h"
#include "handle.h"
#include "implglue.h"
#include "objbase.h"
*/
#define RSAENH_MAGIC_HASH 0x85938417u
#define RSAENH_MAX_HASH_SIZE 104
-#define RSAENH_HASHSTATE_IDLE 0
#define RSAENH_HASHSTATE_HASHING 1
#define RSAENH_HASHSTATE_FINISHED 2
typedef struct _RSAENH_TLS1PRF_PARAMS
*phProv = new_key_container(szKeyContainerName, dwFlags, pVTable);
break;
+ case CRYPT_VERIFYCONTEXT|CRYPT_NEWKEYSET:
case CRYPT_VERIFYCONTEXT:
if (pszContainer) {
TRACE("pszContainer should be NULL\n");
pCryptHash->aiAlgid = Algid;
pCryptHash->hKey = hKey;
pCryptHash->hProv = hProv;
- pCryptHash->dwState = RSAENH_HASHSTATE_IDLE;
+ pCryptHash->dwState = RSAENH_HASHSTATE_HASHING;
pCryptHash->pHMACInfo = (PHMAC_INFO)NULL;
pCryptHash->dwHashSize = peaAlgidInfo->dwDefaultLen >> 3;
init_data_blob(&pCryptHash->tpPRFParams.blobLabel);
return TRUE;
}
- if (pCryptHash->dwState == RSAENH_HASHSTATE_IDLE) {
- SetLastError(NTE_BAD_HASH_STATE);
- return FALSE;
- }
-
if (pbData && (pCryptHash->dwState != RSAENH_HASHSTATE_FINISHED))
{
finalize_hash(pCryptHash);
return FALSE;
}
- if (pCryptHash->dwState == RSAENH_HASHSTATE_IDLE)
- pCryptHash->dwState = RSAENH_HASHSTATE_HASHING;
-
if (pCryptHash->dwState != RSAENH_HASHSTATE_HASHING)
{
SetLastError(NTE_BAD_HASH_STATE);