From 8ec8a1747ec2c805b1b8b647e9483d82e5012983 Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Mon, 18 Nov 2024 20:46:06 +0900 Subject: [PATCH] fix to use `rand::rngs::OsRng` instead Signed-off-by: Jun Kimura --- modules/remote-attestation/src/ias_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/remote-attestation/src/ias_utils.rs b/modules/remote-attestation/src/ias_utils.rs index c5793799..3b335145 100644 --- a/modules/remote-attestation/src/ias_utils.rs +++ b/modules/remote-attestation/src/ias_utils.rs @@ -67,7 +67,7 @@ pub(crate) fn get_quote( spid: sgx_spid_t, ) -> Result<(Vec, sgx_report_t), Error> { let mut quote_nonce = sgx_quote_nonce_t { rand: [0; 16] }; - rand::thread_rng().fill_bytes(&mut quote_nonce.rand); + rand::rngs::OsRng.fill_bytes(&mut quote_nonce.rand); let (p_sigrl, sigrl_size) = if sigrl.is_empty() { (ptr::null(), 0)