From 93db87e4ed8935219aee42a33beeafbc5145bf0a Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 7 May 2026 06:40:17 -0400 Subject: [PATCH] Rust wrapper: remove outdated set_rng safety contract comments --- wrapper/rust/wolfssl-wolfcrypt/src/ecc.rs | 7 ------- wrapper/rust/wolfssl-wolfcrypt/src/rsa.rs | 7 ------- 2 files changed, 14 deletions(-) diff --git a/wrapper/rust/wolfssl-wolfcrypt/src/ecc.rs b/wrapper/rust/wolfssl-wolfcrypt/src/ecc.rs index b89f5ca160..1141446865 100644 --- a/wrapper/rust/wolfssl-wolfcrypt/src/ecc.rs +++ b/wrapper/rust/wolfssl-wolfcrypt/src/ecc.rs @@ -1685,13 +1685,6 @@ impl ECC { /// * `rng`: The `RNG` struct instance to associate with this `ECC` /// instance. /// - /// # Safety contract - /// - /// The caller must ensure that the `RNG` instance is not dropped before - /// this `ECC` instance. The `ECC` struct holds an internal pointer to the - /// `RNG`'s underlying `WC_RNG` context, and dropping the `RNG` first - /// would result in a dangling pointer. - /// /// # Returns /// /// Returns Ok(()) on success or Err(e) containing the wolfSSL library diff --git a/wrapper/rust/wolfssl-wolfcrypt/src/rsa.rs b/wrapper/rust/wolfssl-wolfcrypt/src/rsa.rs index ff25bcffee..6110bc2c1a 100644 --- a/wrapper/rust/wolfssl-wolfcrypt/src/rsa.rs +++ b/wrapper/rust/wolfssl-wolfcrypt/src/rsa.rs @@ -1187,13 +1187,6 @@ impl RSA { /// * `rng`: The `RNG` struct instance to associate with this `RSA` /// instance. /// - /// # Safety contract - /// - /// The caller must ensure that the `RNG` instance is not dropped before - /// this `RSA` instance. The `RSA` struct holds an internal pointer to the - /// `RNG`'s underlying `WC_RNG` context, and dropping the `RNG` first - /// would result in a dangling pointer. - /// /// # Returns /// /// Returns Ok(()) on success or Err(e) containing the wolfSSL library