Skip to content

Commit

Permalink
Merge pull request #2356 from botovq/rm-ec-method
Browse files Browse the repository at this point in the history
Remove EC_METHOD and EC_GROUP_new for LibreSSL 4.1
  • Loading branch information
alex authored Jan 31, 2025
2 parents 4f11354 + 36720a5 commit bab03c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openssl-sys/build/cfgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ pub fn get(openssl_version: Option<u64>, libressl_version: Option<u64>) -> Vec<&
if libressl_version >= 0x4_00_00_00_0 {
cfgs.push("libressl400");
}
if libressl_version >= 0x4_01_00_00_0 {
cfgs.push("libressl410");
}
} else {
let openssl_version = openssl_version.unwrap();

Expand Down
1 change: 1 addition & 0 deletions openssl-sys/build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ fn main() {
println!("cargo:rustc-check-cfg=cfg(libressl382)");
println!("cargo:rustc-check-cfg=cfg(libressl390)");
println!("cargo:rustc-check-cfg=cfg(libressl400)");
println!("cargo:rustc-check-cfg=cfg(libressl410)");

println!("cargo:rustc-check-cfg=cfg(ossl101)");
println!("cargo:rustc-check-cfg=cfg(ossl102)");
Expand Down
2 changes: 2 additions & 0 deletions openssl-sys/src/handwritten/ec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub enum point_conversion_form_t {
POINT_CONVERSION_HYBRID = 6,
}

#[cfg(not(libressl410))]
pub enum EC_METHOD {}
pub enum EC_GROUP {}
pub enum EC_POINT {}
Expand All @@ -17,6 +18,7 @@ extern "C" {
#[cfg(not(osslconf = "OPENSSL_NO_EC2M"))]
pub fn EC_GF2m_simple_method() -> *const EC_METHOD;

#[cfg(not(libressl410))]
pub fn EC_GROUP_new(meth: *const EC_METHOD) -> *mut EC_GROUP;

pub fn EC_GROUP_free(group: *mut EC_GROUP);
Expand Down

0 comments on commit bab03c4

Please sign in to comment.