Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn openssl-sys into a workspace dep #12379

Merged
merged 1 commit into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 3 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,9 @@
// 2.0, and the BSD License. See the LICENSE file in the root of this repository
// for complete details.

#[cfg(not(any(CRYPTOGRAPHY_IS_LIBRESSL, CRYPTOGRAPHY_IS_BORINGSSL)))]
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