diff --git a/CHANGELOG.md b/CHANGELOG.md index a9cbe6c..aacd9f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.23.4 - 2022-07-14 + +* [Disable automatic rerandomization of contexts under WASM](https://github.com/rust-bitcoin/rust-secp256k1/pull/474) + # 0.23.3 - 2022-06-29 * [Add must_use for mut self key manipulation methods](https://github.com/rust-bitcoin/rust-secp256k1/pull/465) diff --git a/Cargo.toml b/Cargo.toml index 03af3d3..de7ff34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "secp256k1" -version = "0.23.3" +version = "0.23.4" authors = [ "Dawid Ciężarkiewicz ", "Andrew Poelstra " ] license = "CC0-1.0" diff --git a/src/context.rs b/src/context.rs index 12afb0f..fca1dc4 100644 --- a/src/context.rs +++ b/src/context.rs @@ -47,7 +47,7 @@ pub mod global { static mut CONTEXT: Option> = None; ONCE.call_once(|| unsafe { let mut ctx = Secp256k1::new(); - #[cfg(all(feature = "rand-std", not(feature = "global-context-less-secure")))] + #[cfg(all(not(target_arch = "wasm32"), feature = "rand-std", not(feature = "global-context-less-secure")))] { ctx.randomize(&mut rand::thread_rng()); } @@ -202,7 +202,7 @@ mod alloc_only { size, }; - #[cfg(feature = "rand-std")] + #[cfg(all(not(target_arch = "wasm32"), feature = "rand-std", not(feature = "global-context-less-secure")))] { ctx.randomize(&mut rand::thread_rng()); }