Skip to content

Support BCRYPT_RNG_ALG_HANDLE rust-lang/rust#101325 - #2533

Merged
bors merged 1 commit into
rust-lang:masterfrom
saethlin:windows-rng
Sep 3, 2022
Merged

bors merged 1 commit into
rust-lang:masterfrom
saethlin:windows-rng

Conversation

@saethlin

@saethlin saethlin commented Sep 3, 2022 •

Copy link
Copy Markdown
Member

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

@saethlin

saethlin commented Sep 3, 2022

Copy link
Copy Markdown
Member Author

cc @ChrisDenton @thomcc does this implementation make sense?

@ChrisDenton ChrisDenton left a comment

Copy link
Copy Markdown
Member

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

saethlin commented Sep 3, 2022

Copy link
Copy Markdown
Member Author

@bors r=ChrisDenton

@bors

bors commented Sep 3, 2022

Copy link
Copy Markdown
Contributor

📌 Commit ee1c1e6 has been approved by ChrisDenton

It is now in the queue for this repository.

@bors

bors commented Sep 3, 2022

Copy link
Copy Markdown
Contributor

⌛ Testing commit ee1c1e6 with merge ec43f1d...

@bors

bors commented Sep 3, 2022

Copy link
Copy Markdown
Contributor

☀️ 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
github-actions Bot pushed a commit that referenced this pull request Aug 8, 2025
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