Skip to content

Commit

Permalink
Fix legacy OpenSSL build
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Shen <overvenus@gmail.com>
  • Loading branch information
overvenus committed Dec 13, 2023
1 parent ec8f096 commit 6d2fce2
Showing 1 changed file with 2 additions and 4 deletions.
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();
}
}

0 comments on commit 6d2fce2

Please sign in to comment.