Skip to content

Commit 13a2e6f

Browse files
authored
Turn openssl-sys into a workspace dep (#12379)
Annoyingly matching is done on the crate name, not the package name, so renaming a workspace dep doesn't work.
1 parent 098fe87 commit 13a2e6f

File tree

10 files changed

+15
-4
lines changed

10 files changed

+15
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ rust-version = "1.65.0"
2323
asn1 = { version = "0.20.0", default-features = false }
2424
pyo3 = { version = "0.23.4", features = ["abi3"] }
2525
openssl = "0.10.69"
26+
openssl-sys = "0.9.104"
2627

2728
[profile.release]
2829
overflow-checks = true

src/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cryptography-x509-verification = { path = "cryptography-x509-verification" }
2020
cryptography-openssl = { path = "cryptography-openssl" }
2121
pem = { version = "3", default-features = false }
2222
openssl.workspace = true
23-
openssl-sys = "0.9.104"
23+
openssl-sys.workspace = true
2424
foreign-types-shared = "0.1"
2525
self_cell = "1"
2626

src/rust/cryptography-cffi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ rust-version.workspace = true
88

99
[dependencies]
1010
pyo3.workspace = true
11-
openssl-sys = "0.9.104"
11+
openssl-sys.workspace = true
1212

1313
[build-dependencies]
1414
cc = "1.2.11"

src/rust/cryptography-key-parsing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ rust-version.workspace = true
1010
asn1.workspace = true
1111
cfg-if = "1"
1212
openssl.workspace = true
13-
openssl-sys = "0.9.104"
13+
openssl-sys.workspace = true
1414
cryptography-x509 = { path = "../cryptography-x509" }
1515

1616
[lints.rust]

src/rust/cryptography-openssl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rust-version.workspace = true
99
[dependencies]
1010
cfg-if = "1"
1111
openssl.workspace = true
12-
ffi = { package = "openssl-sys", version = "0.9.101" }
12+
openssl-sys.workspace = true
1313
foreign-types = "0.3"
1414
foreign-types-shared = "0.1"
1515

src/rust/cryptography-openssl/src/aead.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// 2.0, and the BSD License. See the LICENSE file in the root of this repository
33
// for complete details.
44

5+
use openssl_sys as ffi;
6+
57
use crate::{cvt, cvt_p, OpenSSLResult};
68
use foreign_types_shared::{ForeignType, ForeignTypeRef};
79

src/rust/cryptography-openssl/src/cmac.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use std::ptr;
66

77
use foreign_types_shared::{ForeignType, ForeignTypeRef};
8+
use openssl_sys as ffi;
89

910
use crate::hmac::DigestBytes;
1011
use crate::{cvt, cvt_p, OpenSSLResult};

src/rust/cryptography-openssl/src/fips.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// 2.0, and the BSD License. See the LICENSE file in the root of this repository
33
// for complete details.
44

5+
#[cfg(not(any(CRYPTOGRAPHY_IS_LIBRESSL, CRYPTOGRAPHY_IS_BORINGSSL)))]
6+
use openssl_sys as ffi;
7+
58
#[cfg(CRYPTOGRAPHY_OPENSSL_300_OR_GREATER)]
69
use crate::{cvt, OpenSSLResult};
710
#[cfg(all(

src/rust/cryptography-openssl/src/hmac.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use std::ptr;
66

77
use foreign_types_shared::{ForeignType, ForeignTypeRef};
8+
use openssl_sys as ffi;
89

910
use crate::{cvt, cvt_p, OpenSSLResult};
1011

@@ -92,6 +93,7 @@ impl std::ops::Deref for DigestBytes {
9293
#[cfg(test)]
9394
mod tests {
9495
use super::DigestBytes;
96+
use openssl_sys as ffi;
9597

9698
#[test]
9799
fn test_digest_bytes() {

src/rust/cryptography-openssl/src/poly1305.rs

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

55
use std::mem::MaybeUninit;
66

7+
use openssl_sys as ffi;
8+
79
pub struct Poly1305State {
810
// The state data must be allocated in the heap so that its address does not change. This is
911
// because BoringSSL APIs that take a `poly1305_state*` ignore all the data before an aligned

0 commit comments

Comments
 (0)