Skip to content

Commit 125211d

Browse files
committed
Merge #474: Disable re-randomization under more conditions
d206891 bump version to 0.23.4 (Andrew Poelstra) b01337c context: unconditionally disable auto-rerandomization on wasm (Andrew Poelstra) 7482846 apply `global-context-not-secure` logic to Secp256k1::new (Andrew Poelstra) Pull request description: Fixes #470 ACKs for top commit: Kixunil: ACK d206891 tcharding: ACK d206891 sanket1729: ACK d206891 Tree-SHA512: 2a7db5b75f55a007aa780b6317804c819c0366e207623220f72a06c2af09087accf1bc834f05899897afcc2035f5e9a5480d8a7ffff83536327c695602ba138d
2 parents 6741aa0 + d206891 commit 125211d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.23.4 - 2022-07-14
2+
3+
* [Disable automatic rerandomization of contexts under WASM](https://github.com/rust-bitcoin/rust-secp256k1/pull/474)
4+
15
# 0.23.3 - 2022-06-29
26

37
* [Add must_use for mut self key manipulation methods](https://github.com/rust-bitcoin/rust-secp256k1/pull/465)

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "secp256k1"
3-
version = "0.23.3"
3+
version = "0.23.4"
44
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
55
"Andrew Poelstra <[email protected]>" ]
66
license = "CC0-1.0"

src/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub mod global {
4747
static mut CONTEXT: Option<Secp256k1<All>> = None;
4848
ONCE.call_once(|| unsafe {
4949
let mut ctx = Secp256k1::new();
50-
#[cfg(all(feature = "rand-std", not(feature = "global-context-less-secure")))]
50+
#[cfg(all(not(target_arch = "wasm32"), feature = "rand-std", not(feature = "global-context-less-secure")))]
5151
{
5252
ctx.randomize(&mut rand::thread_rng());
5353
}
@@ -202,7 +202,7 @@ mod alloc_only {
202202
size,
203203
};
204204

205-
#[cfg(feature = "rand-std")]
205+
#[cfg(all(not(target_arch = "wasm32"), feature = "rand-std", not(feature = "global-context-less-secure")))]
206206
{
207207
ctx.randomize(&mut rand::thread_rng());
208208
}

0 commit comments

Comments
 (0)