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

Support BCRYPT_RNG_ALG_HANDLE rust-lang/rust#101325 #2533

Merged
merged 1 commit into from
Sep 3, 2022

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Sep 3, 2022

I haven't tested this on a Windows host, brace for CI...

@saethlin
Copy link
Member Author

saethlin commented Sep 3, 2022

cc @ChrisDenton @thomcc does this implementation make sense?

Copy link
Member

@ChrisDenton ChrisDenton left a comment

Choose a reason for hiding this comment

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

Yep, this looks right to me. The algorithm must be zero if the BCRYPT_USE_SYSTEM_PREFERRED_RNG flag is set and otherwise the only algorithm we currently use is the one given by the BCRYPT_RNG_ALG_HANDLE pseudo handle.

In the future we may have a fallback that uses BCryptOpenAlgorithmProvider to get an algorithm handle but miri will likely not need to use the fallback code path.

@saethlin
Copy link
Member Author

saethlin commented Sep 3, 2022

@bors r=ChrisDenton

@bors
Copy link
Contributor

bors commented Sep 3, 2022

📌 Commit ee1c1e6 has been approved by ChrisDenton

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 3, 2022

⌛ Testing commit ee1c1e6 with merge ec43f1d...

@bors
Copy link
Contributor

bors commented Sep 3, 2022

☀️ Test successful - checks-actions
Approved by: ChrisDenton
Pushing ec43f1d to master...

@bors bors merged commit ec43f1d into rust-lang:master Sep 3, 2022
@saethlin saethlin deleted the windows-rng branch September 13, 2022 19:22
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