generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Description
Problem:
I actually came here from aws-lc-rust. I tried to use the following minimal example with x86_64-win7-windows-msvc but as soon as the library tries to access ProcessPrng the program aborts.
use aws_lc_rs::rand::{SecureRandom, SystemRandom};
fn main() {
let rng = SystemRandom::new();
let mut buffer = [0u8; 32];
println!("Going to fill bytes...");
if rng.fill(&mut buffer).is_err() { // <-- Crash in `init_processprng`
println!("Error filling random bytes");
} else {
println!("Everything is okay");
}
}Erroneous line:
aws-lc/crypto/rand_extra/windows.c
Line 68 in 745359e
| g_processprng_fn = (ProcessPrngFunction)(void(*)(void))GetProcAddress(hmod, "ProcessPrng"); |
Solution:
Rust recently switched from BCryptGenRandom to ProcessPrng but allowed a path for Windows 7.
rust-lang/rust#121337
Is a similar solution also possible in this project?
Metadata
Metadata
Assignees
Labels
No labels