Ticket #7506: 001-unique_path_windows.patch

File 001-unique_path_windows.patch, 790 bytes (added by anonymous, 9 years ago)
  • libs/filesystem/src/unique_path.cpp

     
    7676  HCRYPTPROV handle;
    7777  int errval = 0;
    7878
    79   if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, 0))
     79  if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
    8080  {
    8181    errval = ::GetLastError();
    8282    if (errval == NTE_BAD_KEYSET)
    8383    {
    84       if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_NEWKEYSET))
     84      if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT | CRYPT_NEWKEYSET))
    8585      {
    8686        errval = ::GetLastError();
    8787      }