We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8aa2e3 commit d2ae1b5Copy full SHA for d2ae1b5
boringtun/src/ffi/mod.rs
@@ -13,6 +13,7 @@ use hex::encode as encode_hex;
13
use libc::{raise, SIGSEGV};
14
use parking_lot::Mutex;
15
use rand::rngs::OsRng;
16
+use rand::TryRngCore;
17
use tracing;
18
use tracing_subscriber::fmt;
19
@@ -100,7 +101,7 @@ pub struct x25519_key {
100
101
#[no_mangle]
102
pub extern "C" fn x25519_secret_key() -> x25519_key {
103
x25519_key {
- key: StaticSecret::random_from_rng(OsRng).to_bytes(),
104
+ key: StaticSecret::random_from_rng(&mut OsRng.unwrap_mut()).to_bytes(),
105
}
106
107
0 commit comments