From 2dd76ef8186fe3eacaab5ecbc7821d4e8bb1fc02 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 8 Sep 2024 15:38:15 -0400 Subject: [PATCH 1/4] Test against 3.4.0-alpha1 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52e712a11..5366e8ff4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,6 +153,8 @@ jobs: version: e23fe9b6eecc10e4f9ea1f0027fea5eaee7bd6b6 - name: openssl version: vendored + - name: openssl + version: 3.4.0-alpha1 - name: openssl version: 3.3.0 - name: openssl From 6654131d6a176bada798427568066fd62c1e8699 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 8 Sep 2024 15:53:41 -0400 Subject: [PATCH 2/4] download from github --- .github/workflows/ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5366e8ff4..b1c7b188f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,18 +159,19 @@ jobs: version: 3.3.0 - name: openssl version: 3.2.0 - dl-path: / - name: openssl version: 1.1.1w - dl-path: / - name: openssl version: 1.1.0l + old: true dl-path: /old/1.1.0 - name: openssl version: 1.0.2u + old: true dl-path: /old/1.0.2 - name: openssl version: 1.0.1u + old: true dl-path: /old/1.0.1 include: - target: x86_64-unknown-linux-gnu @@ -257,7 +258,11 @@ jobs: run: | case "${{ matrix.library.name }}" in "openssl") - url="https://www.openssl.org/source${{ matrix.library.dl-path }}/openssl-${{ matrix.library.version }}.tar.gz" + if [[ "${{ matrix.library.old }}" == "true" ]]; then + url="https://www.openssl.org/source${{ matrix.library.dl-path }}/openssl-${{ matrix.library.version }}.tar.gz" + else + url="https://github.com/openssl/openssl/releases/download/openssl-${{ matrix.library.version }}/openssl-${{ matrix.library.version }}.tar.gz" + fi tar_flags="--strip-components=1" ;; "libressl") From 16e41768f254af561ea96e0274744fb35758fb83 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 8 Sep 2024 16:12:25 -0400 Subject: [PATCH 3/4] fixes --- openssl-sys/build/cfgs.rs | 3 +++ openssl-sys/build/main.rs | 1 + openssl-sys/src/evp.rs | 26 +++++++++++++++++++++----- openssl-sys/src/obj_mac.rs | 8 +++++++- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/openssl-sys/build/cfgs.rs b/openssl-sys/build/cfgs.rs index bbd3be59f..cd03888e6 100644 --- a/openssl-sys/build/cfgs.rs +++ b/openssl-sys/build/cfgs.rs @@ -71,6 +71,9 @@ pub fn get(openssl_version: Option, libressl_version: Option) -> Vec<& } else { let openssl_version = openssl_version.unwrap(); + if openssl_version >= 0x3_04_00_00_0 { + cfgs.push("ossl340"); + } if openssl_version >= 0x3_03_00_00_0 { cfgs.push("ossl330"); } diff --git a/openssl-sys/build/main.rs b/openssl-sys/build/main.rs index 50ecc0f08..c9bddf538 100644 --- a/openssl-sys/build/main.rs +++ b/openssl-sys/build/main.rs @@ -120,6 +120,7 @@ fn main() { println!("cargo:rustc-check-cfg=cfg(ossl310)"); println!("cargo:rustc-check-cfg=cfg(ossl320)"); println!("cargo:rustc-check-cfg=cfg(ossl330)"); + println!("cargo:rustc-check-cfg=cfg(ossl340)"); check_ssl_kind(); diff --git a/openssl-sys/src/evp.rs b/openssl-sys/src/evp.rs index a3a8a84fb..4d26f0f60 100644 --- a/openssl-sys/src/evp.rs +++ b/openssl-sys/src/evp.rs @@ -184,12 +184,28 @@ cfg_if! { pub const EVP_PKEY_OP_DERIVE: c_int = 1 << 10; } } +#[cfg(ossl340)] +pub const EVP_PKEY_OP_SIGNMSG: c_int = 1 << 14; +#[cfg(ossl340)] +pub const EVP_PKEY_OP_VERIFYMSG: c_int = 1 << 15; -pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN - | EVP_PKEY_OP_VERIFY - | EVP_PKEY_OP_VERIFYRECOVER - | EVP_PKEY_OP_SIGNCTX - | EVP_PKEY_OP_VERIFYCTX; +cfg_if! { + if #[cfg(ossl340)] { + pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN + | EVP_PKEY_OP_SIGNMSG + | EVP_PKEY_OP_VERIFY + | EVP_PKEY_OP_VERIFYMSG + | EVP_PKEY_OP_VERIFYRECOVER + | EVP_PKEY_OP_SIGNCTX + | EVP_PKEY_OP_VERIFYCTX; + } else { + pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN + | EVP_PKEY_OP_VERIFY + | EVP_PKEY_OP_VERIFYRECOVER + | EVP_PKEY_OP_SIGNCTX + | EVP_PKEY_OP_VERIFYCTX; + } +} pub const EVP_PKEY_OP_TYPE_CRYPT: c_int = EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT; diff --git a/openssl-sys/src/obj_mac.rs b/openssl-sys/src/obj_mac.rs index 400f73388..8dd720a7a 100644 --- a/openssl-sys/src/obj_mac.rs +++ b/openssl-sys/src/obj_mac.rs @@ -346,7 +346,6 @@ pub const NID_id_mod_cmp2000: c_int = 284; pub const NID_info_access: c_int = 177; pub const NID_biometricInfo: c_int = 285; pub const NID_qcStatements: c_int = 286; -pub const NID_ac_auditEntity: c_int = 287; pub const NID_ac_targeting: c_int = 288; pub const NID_aaControls: c_int = 289; pub const NID_sbgp_ipAddrBlock: c_int = 290; @@ -1015,3 +1014,10 @@ pub const NID_shake256: c_int = 1101; pub const NID_chacha20_poly1305: c_int = 1018; #[cfg(libressl271)] pub const NID_chacha20_poly1305: c_int = 967; +cfg_if! { + if #[cfg(ossl340)] { + pub const NID_ac_auditEntity: c_int = 1323; + } else { + pub const NID_ac_auditEntity: c_int = 287; + } +} From 92130d57d3ff4a2c2bf487f85ecdb164cc712b1d Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 8 Sep 2024 16:25:51 -0400 Subject: [PATCH 4/4] remove bad test check --- openssl/src/version.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/openssl/src/version.rs b/openssl/src/version.rs index f1a324c12..12ab3d8ae 100644 --- a/openssl/src/version.rs +++ b/openssl/src/version.rs @@ -131,5 +131,4 @@ fn test_versions() { if !built_on().is_empty() { assert!(built_on().starts_with("built on:")); } - assert!(dir().starts_with("OPENSSLDIR:")); }