Skip to content

Commit

Permalink
CryptUnprotectData now reports correct function name on error (fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
mhammond committed Apr 2, 2021
1 parent 1a938d3 commit e0a7d99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion win32/src/win32crypt/win32cryptmodule.cpp
Expand Up @@ -109,7 +109,7 @@ static PyObject *PyCryptUnprotectData(PyObject *self, PyObject *args, PyObject *
BOOL bsuccess;
Py_BEGIN_ALLOW_THREADS bsuccess =
CryptUnprotectData(&DataIn, &DataDescr, pOptionalEntropy, pReserved, pPromptStruct, Flags, &DataOut);
Py_END_ALLOW_THREADS if (!bsuccess) PyWin_SetAPIError("CryptProtectData");
Py_END_ALLOW_THREADS if (!bsuccess) PyWin_SetAPIError("CryptUnprotectData");
else
{
ret = Py_BuildValue("NN", PyWinObject_FromWCHAR(DataDescr), PyWinObject_FromDATA_BLOB(&DataOut));
Expand Down

0 comments on commit e0a7d99

Please sign in to comment.