Sitelet https://github.com/rust-openssl/rust-openssl/commit/b460eb378c335610df5395a251408ad70bb60d42
Skip to content

Commit b460eb3

Browse files
alexclaude
andauthored
Prefer Homebrew openssl@4 and stop looking for openssl@1.1 (#2633)
Updates the macOS Homebrew auto-detection to try `openssl@4` first, falling back to `openssl@3` / `openssl@3.0`. The pre-3.0 `openssl@1.1` formula is no longer probed. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 649f2d9 commit b460eb3

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎openssl-sys/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Changed
6+
7+
* On macOS, the Homebrew auto-detection now prefers `openssl@4`, falls back to `openssl@3`/`openssl@3.0`, and no longer looks for `openssl@1.1`.
8+
59
## [v0.9.115] - 2026-05-03
610

711
### Added

‎openssl-sys/build/find_normal.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn get_openssl(target: &str) -> (Vec<PathBuf>, PathBuf) {
3232
}
3333

3434
fn resolve_with_wellknown_homebrew_location(dir: &str) -> Option<PathBuf> {
35-
let versions = ["openssl@3", "openssl@3.0", "openssl@1.1"];
35+
let versions = ["openssl@4", "openssl@3", "openssl@3.0"];
3636

3737
// Check up default aarch 64 Homebrew installation location first
3838
// for quick resolution if possible.

‎openssl-sys/build/main.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ fn postprocess(include_dirs: &[PathBuf]) -> Version {
308308
/// version string of OpenSSL.
309309
#[allow(clippy::unusual_byte_groupings)]
310310
fn validate_headers(include_dirs: &[PathBuf]) -> Version {
311-
// This `*-sys` crate only works with OpenSSL 1.1.0, 1.1.1 and 3.x.
311+
// This `*-sys` crate only works with OpenSSL 1.1.0, 1.1.1, 3.x, and 4.x.
312312
// To correctly expose the right API from this crate, take a look at
313313
// `opensslv.h` to see what version OpenSSL claims to be.
314314
println!("cargo:rerun-if-changed=build/expando.c");

‎openssl/src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//!
3131
//! ```not_rust
3232
//! # macOS (Homebrew)
33-
//! $ brew install openssl@3
33+
//! $ brew install openssl@4
3434
//!
3535
//! # macOS (MacPorts)
3636
//! $ sudo port install openssl

0 commit comments

Comments
 (0)