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

Add rand_priv_bytes #2126

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix legacy OpenSSL build
Signed-off-by: Neil Shen <overvenus@gmail.com>
  • Loading branch information
overvenus committed Dec 13, 2023
commit 6d2fce23d11ac882af04686e5ef0015504547d5d
6 changes: 2 additions & 4 deletions openssl/src/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,16 @@ pub fn keep_random_devices_open(keep: bool) {

#[cfg(test)]
mod tests {
use super::{rand_bytes, rand_priv_bytes};

#[test]
fn test_rand_bytes() {
let mut buf = [0; 32];
rand_bytes(&mut buf).unwrap();
super::rand_bytes(&mut buf).unwrap();
}

#[test]
#[cfg(ossl111)]
fn test_rand_priv_bytes() {
let mut buf = [0; 32];
rand_priv_bytes(&mut buf).unwrap();
super::rand_priv_bytes(&mut buf).unwrap();
}
}