Skip to content

Commit 8d60e21

Browse files
authored
Merge pull request #2302 from sfackler/sfackler-patch-1
Test against 3.4.0-alpha1
2 parents 22a66be + 92130d5 commit 8d60e21

File tree

6 files changed

+42
-10
lines changed

6 files changed

+42
-10
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,22 +153,25 @@ jobs:
153153
version: e23fe9b6eecc10e4f9ea1f0027fea5eaee7bd6b6
154154
- name: openssl
155155
version: vendored
156+
- name: openssl
157+
version: 3.4.0-alpha1
156158
- name: openssl
157159
version: 3.3.0
158160
- name: openssl
159161
version: 3.2.0
160-
dl-path: /
161162
- name: openssl
162163
version: 1.1.1w
163-
dl-path: /
164164
- name: openssl
165165
version: 1.1.0l
166+
old: true
166167
dl-path: /old/1.1.0
167168
- name: openssl
168169
version: 1.0.2u
170+
old: true
169171
dl-path: /old/1.0.2
170172
- name: openssl
171173
version: 1.0.1u
174+
old: true
172175
dl-path: /old/1.0.1
173176
include:
174177
- target: x86_64-unknown-linux-gnu
@@ -255,7 +258,11 @@ jobs:
255258
run: |
256259
case "${{ matrix.library.name }}" in
257260
"openssl")
258-
url="https://www.openssl.org/source${{ matrix.library.dl-path }}/openssl-${{ matrix.library.version }}.tar.gz"
261+
if [[ "${{ matrix.library.old }}" == "true" ]]; then
262+
url="https://www.openssl.org/source${{ matrix.library.dl-path }}/openssl-${{ matrix.library.version }}.tar.gz"
263+
else
264+
url="https://github.com/openssl/openssl/releases/download/openssl-${{ matrix.library.version }}/openssl-${{ matrix.library.version }}.tar.gz"
265+
fi
259266
tar_flags="--strip-components=1"
260267
;;
261268
"libressl")

openssl-sys/build/cfgs.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ pub fn get(openssl_version: Option<u64>, libressl_version: Option<u64>) -> Vec<&
7171
} else {
7272
let openssl_version = openssl_version.unwrap();
7373

74+
if openssl_version >= 0x3_04_00_00_0 {
75+
cfgs.push("ossl340");
76+
}
7477
if openssl_version >= 0x3_03_00_00_0 {
7578
cfgs.push("ossl330");
7679
}

openssl-sys/build/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ fn main() {
120120
println!("cargo:rustc-check-cfg=cfg(ossl310)");
121121
println!("cargo:rustc-check-cfg=cfg(ossl320)");
122122
println!("cargo:rustc-check-cfg=cfg(ossl330)");
123+
println!("cargo:rustc-check-cfg=cfg(ossl340)");
123124

124125
check_ssl_kind();
125126

openssl-sys/src/evp.rs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,28 @@ cfg_if! {
184184
pub const EVP_PKEY_OP_DERIVE: c_int = 1 << 10;
185185
}
186186
}
187+
#[cfg(ossl340)]
188+
pub const EVP_PKEY_OP_SIGNMSG: c_int = 1 << 14;
189+
#[cfg(ossl340)]
190+
pub const EVP_PKEY_OP_VERIFYMSG: c_int = 1 << 15;
187191

188-
pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN
189-
| EVP_PKEY_OP_VERIFY
190-
| EVP_PKEY_OP_VERIFYRECOVER
191-
| EVP_PKEY_OP_SIGNCTX
192-
| EVP_PKEY_OP_VERIFYCTX;
192+
cfg_if! {
193+
if #[cfg(ossl340)] {
194+
pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN
195+
| EVP_PKEY_OP_SIGNMSG
196+
| EVP_PKEY_OP_VERIFY
197+
| EVP_PKEY_OP_VERIFYMSG
198+
| EVP_PKEY_OP_VERIFYRECOVER
199+
| EVP_PKEY_OP_SIGNCTX
200+
| EVP_PKEY_OP_VERIFYCTX;
201+
} else {
202+
pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN
203+
| EVP_PKEY_OP_VERIFY
204+
| EVP_PKEY_OP_VERIFYRECOVER
205+
| EVP_PKEY_OP_SIGNCTX
206+
| EVP_PKEY_OP_VERIFYCTX;
207+
}
208+
}
193209

194210
pub const EVP_PKEY_OP_TYPE_CRYPT: c_int = EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT;
195211

openssl-sys/src/obj_mac.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,6 @@ pub const NID_id_mod_cmp2000: c_int = 284;
346346
pub const NID_info_access: c_int = 177;
347347
pub const NID_biometricInfo: c_int = 285;
348348
pub const NID_qcStatements: c_int = 286;
349-
pub const NID_ac_auditEntity: c_int = 287;
350349
pub const NID_ac_targeting: c_int = 288;
351350
pub const NID_aaControls: c_int = 289;
352351
pub const NID_sbgp_ipAddrBlock: c_int = 290;
@@ -1015,3 +1014,10 @@ pub const NID_shake256: c_int = 1101;
10151014
pub const NID_chacha20_poly1305: c_int = 1018;
10161015
#[cfg(libressl271)]
10171016
pub const NID_chacha20_poly1305: c_int = 967;
1017+
cfg_if! {
1018+
if #[cfg(ossl340)] {
1019+
pub const NID_ac_auditEntity: c_int = 1323;
1020+
} else {
1021+
pub const NID_ac_auditEntity: c_int = 287;
1022+
}
1023+
}

openssl/src/version.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,4 @@ fn test_versions() {
131131
if !built_on().is_empty() {
132132
assert!(built_on().starts_with("built on:"));
133133
}
134-
assert!(dir().starts_with("OPENSSLDIR:"));
135134
}

0 commit comments

Comments
 (0)