VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Password.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Password.c')
-rw-r--r--src/Common/Password.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Common/Password.c b/src/Common/Password.c
index b1584dbe..8014713c 100644
--- a/src/Common/Password.c
+++ b/src/Common/Password.c
@@ -230,7 +230,13 @@ int ChangePwd (const char *lpszVolume, Password *oldPassword, int old_pkcs5, BOO
}
if (Randinit ())
+ {
+ if (CryptoAPILastError == ERROR_SUCCESS)
+ nStatus = ERR_RAND_INIT_FAILED;
+ else
+ nStatus = ERR_CAPI_INIT_FAILED;
goto error;
+ }
SetRandomPoolEnrichedByUserStatus (FALSE); /* force the display of the random enriching dialog */