Commit f9840d6 1 parent 38686ee commit f9840d6 Copy full SHA for f9840d6
File tree 3 files changed +11
-4
lines changed
3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ default = ["alloc", "dev_urandom_fallback"]
200
200
alloc = []
201
201
dev_urandom_fallback = []
202
202
less-safe-getrandom-custom-or-rdrand = []
203
+ less-safe-getrandom-espidf = []
203
204
slow_tests = []
204
205
std = [" alloc" ]
205
206
unstable-testing-arm-no-hw = []
Original file line number Diff line number Diff line change 32
32
//! </a> and <a href="https://docs.rs/getrandom/0.2.10/getrandom/#rdrand-on-x86">
33
33
//! RDRAND on x86
34
34
//! </a> for additional details.
35
+ //! <tr><td><code>less-safe-getrandom-espidf</code>
36
+ //! <td>Treat getrandom as a secure random number generator (see
37
+ //! <code>SecureRandom</code>) on the esp-idf target. While the esp-idf
38
+ //! target does have hardware RNG, it is beyond the scope of ring to
39
+ //! ensure its configuration. This feature allows ring to build
40
+ //! on esp-idf despite the liklihood that RNG is not secure.
41
+ //! This feature only works with <code>os = espidf</code> targets.
42
+ //! See <a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/random.html">
35
43
//! <tr><td><code>std</code>
36
44
//! <td>Enable features that use libstd, in particular
37
45
//! <code>std::error::Error</code> integration. Implies `alloc`.
Original file line number Diff line number Diff line change @@ -125,10 +125,8 @@ impl crate::sealed::Sealed for SystemRandom {}
125
125
// system's) CSPRNG. Avoid using it on targets where it uses the `rdrand`
126
126
// implementation.
127
127
#[ cfg( any(
128
- all(
129
- feature = "less-safe-getrandom-custom-or-rdrand" ,
130
- any( target_os = "none" , target_os = "espidf" )
131
- ) ,
128
+ all( feature = "less-safe-getrandom-custom-or-rdrand" , target_os = "none" ) ,
129
+ all( feature = "less-safe-getrandom-espidf" , target_os = "espidf" ) ,
132
130
target_os = "aix" ,
133
131
target_os = "android" ,
134
132
target_os = "dragonfly" ,
You can’t perform that action at this time.
0 commit comments