Fix on normal DPAPI unprotect

This commit is contained in:
Benjamin DELPY 2015-07-29 01:10:48 +02:00
parent 10c317014e
commit f7c4ccbe3f

View File

@ -472,7 +472,7 @@ BOOL kuhl_m_dpapi_unprotect_raw_or_blob(LPCVOID pDataIn, DWORD dwDataInLen, LPWS
if(!status && ((masterkey && masterkeyLen) || isNormalAPI)) if(!status && ((masterkey && masterkeyLen) || isNormalAPI))
{ {
status = kull_m_dpapi_unprotect_raw_or_blob(pDataIn, dwDataInLen, ppszDataDescr, (pOptionalEntropy && dwOptionalEntropyLen) ? pOptionalEntropy : entropy, (pOptionalEntropy && dwOptionalEntropyLen) ? dwOptionalEntropyLen : entropyLen, pPrompt, CRYPTPROTECT_SYSTEM | (pPrompt ? 0 : CRYPTPROTECT_UI_FORBIDDEN), pDataOut, dwDataOutLen, masterkey, masterkeyLen, szPassword); status = kull_m_dpapi_unprotect_raw_or_blob(pDataIn, dwDataInLen, ppszDataDescr, (pOptionalEntropy && dwOptionalEntropyLen) ? pOptionalEntropy : entropy, (pOptionalEntropy && dwOptionalEntropyLen) ? dwOptionalEntropyLen : entropyLen, pPrompt, /*CRYPTPROTECT_SYSTEM |*/ (pPrompt ? 0 : CRYPTPROTECT_UI_FORBIDDEN), pDataOut, dwDataOutLen, masterkey, masterkeyLen, szPassword);
if(status && masterkey && masterkeyLen) if(status && masterkey && masterkeyLen)
kuhl_m_dpapi_oe_masterkey_add(&blob->guidMasterKey, masterkey, masterkeyLen); kuhl_m_dpapi_oe_masterkey_add(&blob->guidMasterKey, masterkey, masterkeyLen);