Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change CryptAcquireContextW to try CRYPT_NEWKEYSET flag if key container doesnt exist already #3691

Merged
merged 1 commit into from
Nov 3, 2017

Conversation

takhlaq
Copy link
Contributor

@takhlaq takhlaq commented Nov 1, 2017

fixes issues with sys_ss_random_number_generator failing

@takhlaq takhlaq changed the title change CryptAcquireContextW to use CRYPT_VERIFYCONTEXT flag change CryptAcquireContextW to try CRYPT_NEWKEYSET flag if key container doesnt exist already Nov 1, 2017
@@ -13,7 +13,10 @@ const HCRYPTPROV s_crypto_provider = []() -> HCRYPTPROV

if (!CryptAcquireContextW(&result, nullptr, nullptr, PROV_RSA_FULL, 0))
{
return 0;
if (!CryptAcquireContextW(&result, nullptr, nullptr, PROV_RSA_FULL, CRYPT_NEWKEYSET))
Copy link
Member

@AniLeo AniLeo Nov 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it not a single if with && condition.
Probably doesn't matter anyways, compiler should generate the same code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o ya lol
done

@Nekotekina Nekotekina merged commit 3d0dced into RPCS3:master Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants