Skip to content

Commit

Permalink
Merge pull request #1 from diorcety/master
Browse files Browse the repository at this point in the history
Early Boost fix
  • Loading branch information
taxilian committed Nov 13, 2013
2 parents d964449 + e3c1552 commit 42302bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/filesystem/v3/src/unique_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ void system_crypt_random(void* buf, std::size_t len, boost::system::error_code*
HCRYPTPROV handle;
int errval = 0;

if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, 0))
if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
{
errval = ::GetLastError();
if (errval == NTE_BAD_KEYSET)
{
if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_NEWKEYSET))
if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT | CRYPT_NEWKEYSET))
{
errval = ::GetLastError();
}
Expand Down

0 comments on commit 42302bd

Please sign in to comment.