From 7718ee8b42a2dde24942d05e299bab1da9c601aa Mon Sep 17 00:00:00 2001
From: Anthony Ramine <aramine@cloudflare.com>
Date: Mon, 6 Nov 2023 10:06:03 +0100
Subject: [PATCH 1/3] Add cargo-release metadata

---
 Cargo.toml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Cargo.toml b/Cargo.toml
index 21b6d443..96487c3e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,6 +12,12 @@ version = "4.0.0-rc.1"
 repository = "https://github.com/cloudflare/boring"
 edition = "2021"
 
+[workspace.metadata.release]
+pre-release-commit-message = "Release {{version}}"
+shared-version = true
+tag-prefix = ""
+publish = false
+
 [workspace.dependencies]
 boring-sys = { version = "4.0.0-rc.1", path = "./boring-sys" }
 boring = { version = "4.0.0-rc.1", path = "./boring" }

From cc4d92e4ae0ae00470a398736cf1f1b1b5bdb254 Mon Sep 17 00:00:00 2001
From: Anthony Ramine <aramine@cloudflare.com>
Date: Mon, 6 Nov 2023 10:14:55 +0100
Subject: [PATCH 2/3] Update release notes

---
 RELEASE_NOTES | 55 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 53 insertions(+), 2 deletions(-)

diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index ff87fa0d..b9e1dee4 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,5 +1,56 @@
+4.0.0-rc.2
+- 2023-11-06 Add cargo-release metadata
+- 2023-11-02 Remove Sync trait bounds on callback futures
+- 2023-10-30 Update Cargo.toml
+- 2023-10-26 hyper and tokio "full" feature for dev builds only
+
+4.0.0-rc.1
+- 2023-10-26 Specify exact versions of dependent crates in the workspace manifest
+- 2023-10-16 Add CI for cross-building from macOS
+- 2023-10-16 Introduce BORING_BSSL_SYSROOT and BORING_BSSL_EXTERNAL_TOOLCHAIN
+- 2023-10-16 Check for CMAKE_TOOLCHAIN_FILE when creating cmake config
+- 2023-10-16 Introduce target-specific env vars
+- 2023-10-16 Continue looping if candidate cxx isn't found in verify_fips_clang_version
+- 2023-10-12 Introduce set_async_get_session_callback
+- 2023-10-12 Allow returning GetSessionPendingError from get session callbacks
+- 2023-10-24 Test set_get_session_callback
+- 2023-10-24 Test new session callback on server side
+- 2023-10-24 Move session tests to their own module
+- 2023-10-11 Replace feature no-patches with BORING_BSSL{,_FIPS}_ASSUME_PATCHED
+- 2023-10-11 Remove feature rpk from hyper-boring and tokio-boring
+- 2023-10-10 Introduce a new set of env variables for FIPS-like builds
+- 2023-10-10 Use prefix BORING_BSSL_ for all boringssl env variables
+- 2023-10-10 Don't read BORINGSSL_BUILD_DIR anymore
+- 2023-10-10 Don't use env::current_dir in build script
+- 2023-10-10 Introduce struct Config in build script
+- 2023-10-11 Change X509VerifyResult to Result<(), X509VerifyError>
+- 2023-10-11 Introduce bindings for all X509_V_ERR_* constants
+- 2023-02-17 Add SHA224, SHA512, SHA512-256 tests
+- 2023-02-17 Expose SHA512-256
+- 2023-10-09 Remove boring::fips::enable (fixes #150)
+- 2023-10-09 Remove futures from ex data slots once they resolve
+- 2023-10-06 Introduce SslSignatureAlgorithm::RSA_PKCS1_MD5_SHA1
+- 2023-10-06 Introduce Ssl::set_certificate
+- 2023-07-28 Introduce async callbacks
+- 2023-08-02 Implement SslContextBuilder::set_private_key_method
+- 2023-07-28 Change signature for set_select_certificate_callback
+- 2023-08-04 Introduce AsyncStreamBridge
+- 2023-06-23 Add a few WouldBlock cases
+- 2023-08-04 Introduce helper module in tokio-boring tests
+- 2023-08-03 Introduce setup_accept and setup_connect
+- 2023-09-14 Panic on error when setting default curves list
+- 2023-06-23 Introduce ssl::Error::would_block
+- 2023-09-22 deps: update to bindgen 0.68
+- 2023-10-06 Fix clippy lints
+- 2023-08-15 Add new(), connect(), accept() and handshake() to SslStream
+- 2023-09-18 Enable P-521 with "kx-safe-default"
+- 2023-08-15 Provide into_ssl() for ConnectConfiguration
+
 3.1.0
-- 2023-09-12 Release 3.1.0
+- 2023-09-13 Update Cargo.toml
+- 2023-09-13 Update RELEASE_NOTES
+- 2023-09-13 Update RELEASE_NOTES
+- 2023-09-12 Release 3.0.5
 - 2023-09-12 tweaks for ergonomic linking
 - 2023-08-08 Use features to set key exchange preferences
 - 2023-08-30 Introduce `no-patches` feature
@@ -10,9 +61,9 @@
 - 2023-08-25 add CI jobs to run `cargo package`
 - 2023-08-15 Fix -Z minimal-versions
 - 2023-08-29 Separate `fips` and `fips-link-precompiled` features.
-- 2023-08-05 Bump version in Cargo.toml
 
 3.0.4
+- 2023-08-05 Bump version in Cargo.toml
 - 2023-08-05 Release 3.0.4
 - 2023-08-05 Add missing cmake files to the package
 

From 5c7992438830bbb6b54d595f1c5a010bb7f12d00 Mon Sep 17 00:00:00 2001
From: Anthony Ramine <aramine@cloudflare.com>
Date: Mon, 6 Nov 2023 10:16:57 +0100
Subject: [PATCH 3/3] Release 4.0.0-rc.2

---
 Cargo.toml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 96487c3e..02fd175b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,7 +8,7 @@ members = [
 resolver = "2"
 
 [workspace.package]
-version = "4.0.0-rc.1"
+version = "4.0.0-rc.2"
 repository = "https://github.com/cloudflare/boring"
 edition = "2021"
 
@@ -19,9 +19,9 @@ tag-prefix = ""
 publish = false
 
 [workspace.dependencies]
-boring-sys = { version = "4.0.0-rc.1", path = "./boring-sys" }
-boring = { version = "4.0.0-rc.1", path = "./boring" }
-tokio-boring = { version = "4.0.0-rc.1", path = "./tokio-boring" }
+boring-sys = { version = "4.0.0-rc.2", path = "./boring-sys" }
+boring = { version = "4.0.0-rc.2", path = "./boring" }
+tokio-boring = { version = "4.0.0-rc.2", path = "./tokio-boring" }
 
 bindgen = { version = "0.68.1", default-features = false, features = ["runtime"] }
 cmake = "0.1.18"