Skip to content

Commit

Permalink
Turn openssl-sys into a workspace dep
Browse files Browse the repository at this point in the history
Annoyingly matching is done on the crate name, not the package name, so renaming a workspace dep doesn't work.
  • Loading branch information
alex committed Feb 1, 2025
1 parent b0169ec commit a64a2cf
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ rust-version = "1.65.0"
asn1 = { version = "0.20.0", default-features = false }
pyo3 = { version = "0.23.4", features = ["abi3"] }
openssl = "0.10.69"
openssl-sys = "0.9.104"

[profile.release]
overflow-checks = true
2 changes: 1 addition & 1 deletion src/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cryptography-x509-verification = { path = "cryptography-x509-verification" }
cryptography-openssl = { path = "cryptography-openssl" }
pem = { version = "3", default-features = false }
openssl.workspace = true
openssl-sys = "0.9.104"
openssl-sys.workspace = true
foreign-types-shared = "0.1"
self_cell = "1"

Expand Down
2 changes: 1 addition & 1 deletion src/rust/cryptography-cffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rust-version.workspace = true

[dependencies]
pyo3.workspace = true
openssl-sys = "0.9.104"
openssl-sys.workspace = true

[build-dependencies]
cc = "1.2.10"
Expand Down
2 changes: 1 addition & 1 deletion src/rust/cryptography-key-parsing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rust-version.workspace = true
asn1.workspace = true
cfg-if = "1"
openssl.workspace = true
openssl-sys = "0.9.104"
openssl-sys.workspace = true
cryptography-x509 = { path = "../cryptography-x509" }

[lints.rust]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/cryptography-openssl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rust-version.workspace = true
[dependencies]
cfg-if = "1"
openssl.workspace = true
ffi = { package = "openssl-sys", version = "0.9.101" }
openssl-sys.workspace = true
foreign-types = "0.3"
foreign-types-shared = "0.1"

Expand Down
2 changes: 2 additions & 0 deletions src/rust/cryptography-openssl/src/aead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// 2.0, and the BSD License. See the LICENSE file in the root of this repository
// for complete details.

use openssl_sys as ffi;

use crate::{cvt, cvt_p, OpenSSLResult};
use foreign_types_shared::{ForeignType, ForeignTypeRef};

Expand Down
1 change: 1 addition & 0 deletions src/rust/cryptography-openssl/src/cmac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use std::ptr;

use foreign_types_shared::{ForeignType, ForeignTypeRef};
use openssl_sys as ffi;

use crate::hmac::DigestBytes;
use crate::{cvt, cvt_p, OpenSSLResult};
Expand Down
2 changes: 2 additions & 0 deletions src/rust/cryptography-openssl/src/fips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// 2.0, and the BSD License. See the LICENSE file in the root of this repository
// for complete details.

use openssl_sys as ffi;

#[cfg(CRYPTOGRAPHY_OPENSSL_300_OR_GREATER)]
use crate::{cvt, OpenSSLResult};
#[cfg(all(
Expand Down
2 changes: 2 additions & 0 deletions src/rust/cryptography-openssl/src/hmac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use std::ptr;

use foreign_types_shared::{ForeignType, ForeignTypeRef};
use openssl_sys as ffi;

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

Expand Down Expand Up @@ -92,6 +93,7 @@ impl std::ops::Deref for DigestBytes {
#[cfg(test)]
mod tests {
use super::DigestBytes;
use openssl_sys as ffi;

#[test]
fn test_digest_bytes() {
Expand Down
2 changes: 2 additions & 0 deletions src/rust/cryptography-openssl/src/poly1305.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use std::mem::MaybeUninit;

use openssl_sys as ffi;

pub struct Poly1305State {
// The state data must be allocated in the heap so that its address does not change. This is
// because BoringSSL APIs that take a `poly1305_state*` ignore all the data before an aligned
Expand Down

0 comments on commit a64a2cf

Please sign in to comment.