Use workspace metadata for crates
This commit is contained in:
parent
c4e8a94a69
commit
d1ee9bfd86
|
|
@ -198,8 +198,8 @@ jobs:
|
||||||
- run: cargo test --features fips
|
- run: cargo test --features fips
|
||||||
name: Run tests
|
name: Run tests
|
||||||
|
|
||||||
test-rpk:
|
test-features:
|
||||||
name: Test RPK
|
name: Test features
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
@ -209,4 +209,8 @@ jobs:
|
||||||
run: rustup update stable --no-self-update && rustup default stable
|
run: rustup update stable --no-self-update && rustup default stable
|
||||||
shell: bash
|
shell: bash
|
||||||
- run: cargo test --features rpk
|
- run: cargo test --features rpk
|
||||||
name: Run tests
|
name: Run `rpk` tests
|
||||||
|
- run: cargo test --features post-quantum
|
||||||
|
name: Run `post-quantum` tests
|
||||||
|
- run: cargo test --features post-quantum,rpk
|
||||||
|
name: Run `post-quantum,rpk` tests
|
||||||
|
|
|
||||||
31
Cargo.toml
31
Cargo.toml
|
|
@ -5,4 +5,33 @@ members = [
|
||||||
"tokio-boring",
|
"tokio-boring",
|
||||||
"hyper-boring"
|
"hyper-boring"
|
||||||
]
|
]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
|
[workspace.package]
|
||||||
|
version = "3.0.0"
|
||||||
|
repository = "https://github.com/cloudflare/boring"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[workspace.dependencies]
|
||||||
|
boring-sys = { version = "3.0", path = "./boring-sys" }
|
||||||
|
boring = { version = "3.0", path = "./boring" }
|
||||||
|
tokio-boring = { version = "3.0", path = "./tokio-boring" }
|
||||||
|
|
||||||
|
bindgen = { version = "0.65.1", default-features = false, features = ["runtime"] }
|
||||||
|
cmake = "0.1"
|
||||||
|
fslock = "0.2"
|
||||||
|
bitflags = "1.0"
|
||||||
|
foreign-types = "0.5"
|
||||||
|
lazy_static = "1"
|
||||||
|
libc = "0.2"
|
||||||
|
hex = "0.4"
|
||||||
|
rusty-hook = "^0.11"
|
||||||
|
futures = "0.3"
|
||||||
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
anyhow = "1"
|
||||||
|
antidote = "1.0.0"
|
||||||
|
http = "0.2"
|
||||||
|
hyper = { version = "0.14", default-features = false, features = ["full"] }
|
||||||
|
linked_hash_set = "0.1"
|
||||||
|
once_cell = "1.0"
|
||||||
|
tower-layer = "0.3"
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "boring-sys"
|
name = "boring-sys"
|
||||||
version = "2.1.0"
|
version = { workspace = true }
|
||||||
authors = ["Alex Crichton <alex@alexcrichton.com>",
|
authors = ["Alex Crichton <alex@alexcrichton.com>",
|
||||||
"Steven Fackler <sfackler@gmail.com>",
|
"Steven Fackler <sfackler@gmail.com>",
|
||||||
"Ivan Nikulin <ifaaan@gmail.com>"]
|
"Ivan Nikulin <ifaaan@gmail.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "FFI bindings to BoringSSL"
|
description = "FFI bindings to BoringSSL"
|
||||||
repository = "https://github.com/cloudflare/boring"
|
repository = { workspace = true }
|
||||||
documentation = "https://docs.rs/boring-sys"
|
documentation = "https://docs.rs/boring-sys"
|
||||||
links = "boringssl"
|
links = "boringssl"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
categories = ["cryptography", "external-ffi-bindings"]
|
categories = ["cryptography", "external-ffi-bindings"]
|
||||||
edition = "2021"
|
edition = { workspace = true }
|
||||||
include = [
|
include = [
|
||||||
"/*.md",
|
"/*.md",
|
||||||
"/*.toml",
|
"/*.toml",
|
||||||
|
|
@ -28,10 +28,9 @@ include = [
|
||||||
"/scripts"
|
"/scripts"
|
||||||
]
|
]
|
||||||
|
|
||||||
[build-dependencies]
|
[package.metadata.docs.rs]
|
||||||
bindgen = { version = "0.65.1", default-features = false, features = ["runtime"] }
|
features = ["rpk", "post-quantum"]
|
||||||
cmake = "0.1"
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
fslock = "0.2.1"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# Use a FIPS-validated version of boringssl.
|
# Use a FIPS-validated version of boringssl.
|
||||||
|
|
@ -42,3 +41,10 @@ rpk = []
|
||||||
|
|
||||||
# Enables post-quantum crypto (https://blog.cloudflare.com/post-quantum-for-all/)
|
# Enables post-quantum crypto (https://blog.cloudflare.com/post-quantum-for-all/)
|
||||||
post-quantum = []
|
post-quantum = []
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
bindgen = { workspace = true }
|
||||||
|
cmake = { workspace = true }
|
||||||
|
fslock = { workspace = true }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -333,10 +333,17 @@ fn ensure_patches_applied() -> io::Result<()> {
|
||||||
|
|
||||||
lock_file.lock()?;
|
lock_file.lock()?;
|
||||||
|
|
||||||
|
let boring_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(BORING_SSL_PATH);
|
||||||
|
|
||||||
let mut cmd = Command::new("git");
|
let mut cmd = Command::new("git");
|
||||||
|
|
||||||
cmd.args(["reset", "--hard"])
|
cmd.args(["reset", "--hard"]).current_dir(&boring_dir);
|
||||||
.current_dir(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(BORING_SSL_PATH));
|
|
||||||
|
run_command(&mut cmd)?;
|
||||||
|
|
||||||
|
let mut cmd = Command::new("git");
|
||||||
|
|
||||||
|
cmd.args(["clean", "-fdx"]).current_dir(&boring_dir);
|
||||||
|
|
||||||
run_command(&mut cmd)?;
|
run_command(&mut cmd)?;
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -11,6 +11,8 @@
|
||||||
unused_imports
|
unused_imports
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
|
|
||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
use std::ffi::c_void;
|
use std::ffi::c_void;
|
||||||
use std::os::raw::{c_char, c_int, c_uint, c_ulong};
|
use std::os::raw::{c_char, c_int, c_uint, c_ulong};
|
||||||
|
|
@ -21,16 +23,6 @@ mod generated {
|
||||||
}
|
}
|
||||||
pub use generated::*;
|
pub use generated::*;
|
||||||
|
|
||||||
#[cfg(feature = "post-quantum")]
|
|
||||||
mod ensure_post_quantum_crypto_patch_applied {
|
|
||||||
use super::KYBER512_encap;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "rpk")]
|
|
||||||
mod ensure_raw_public_key_patch_applied {
|
|
||||||
use super::SSL_CTX_set_server_raw_public_key_certificate;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
pub type BN_ULONG = u64;
|
pub type BN_ULONG = u64;
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,19 @@
|
||||||
[package]
|
[package]
|
||||||
name = "boring"
|
name = "boring"
|
||||||
version = "2.1.0"
|
version = { workspace = true }
|
||||||
authors = ["Steven Fackler <sfackler@gmail.com>", "Ivan Nikulin <ifaaan@gmail.com>"]
|
authors = ["Steven Fackler <sfackler@gmail.com>", "Ivan Nikulin <ifaaan@gmail.com>"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
description = "BoringSSL bindings"
|
description = "BoringSSL bindings"
|
||||||
repository = "https://github.com/cloudflare/boring"
|
repository = { workspace = true }
|
||||||
documentation = "https://docs.rs/boring"
|
documentation = "https://docs.rs/boring"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = ["crypto", "tls", "ssl", "dtls"]
|
keywords = ["crypto", "tls", "ssl", "dtls"]
|
||||||
categories = ["cryptography", "api-bindings"]
|
categories = ["cryptography", "api-bindings"]
|
||||||
edition = "2021"
|
edition = { workspace = true }
|
||||||
|
|
||||||
[dependencies]
|
[package.metadata.docs.rs]
|
||||||
bitflags = "1.0"
|
features = ["rpk", "post-quantum"]
|
||||||
foreign-types = "0.5"
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
lazy_static = "1"
|
|
||||||
libc = "0.2"
|
|
||||||
boring-sys = { version = ">=1.1.0,<3.0.0", path = "../boring-sys" }
|
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
hex = "0.4"
|
|
||||||
rusty-hook = "^0.11"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# Use a FIPS-validated version of boringssl.
|
# Use a FIPS-validated version of boringssl.
|
||||||
|
|
@ -30,4 +23,15 @@ fips = ["boring-sys/fips"]
|
||||||
rpk = ["boring-sys/rpk"]
|
rpk = ["boring-sys/rpk"]
|
||||||
|
|
||||||
# Enables post-quantum crypto (https://blog.cloudflare.com/post-quantum-for-all/)
|
# Enables post-quantum crypto (https://blog.cloudflare.com/post-quantum-for-all/)
|
||||||
post-quantum = ["boring-sys/post-quantum"]
|
post-quantum = ["boring-sys/post-quantum"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
bitflags = { workspace = true }
|
||||||
|
foreign-types = { workspace = true }
|
||||||
|
lazy_static = { workspace = true }
|
||||||
|
libc = { workspace = true }
|
||||||
|
boring-sys = { workspace = true }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
hex = { workspace = true }
|
||||||
|
rusty-hook = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
//!
|
//!
|
||||||
//! This crate provides a safe interface to the BoringSSL cryptography library.
|
//! This crate provides a safe interface to the BoringSSL cryptography library.
|
||||||
|
|
||||||
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate bitflags;
|
extern crate bitflags;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,19 @@
|
||||||
[package]
|
[package]
|
||||||
name = "hyper-boring"
|
name = "hyper-boring"
|
||||||
version = "2.1.2"
|
version = { workspace = true }
|
||||||
authors = ["Steven Fackler <sfackler@gmail.com>", "Ivan Nikulin <ifaaan@gmail.com>"]
|
authors = ["Steven Fackler <sfackler@gmail.com>", "Ivan Nikulin <ifaaan@gmail.com>"]
|
||||||
edition = "2021"
|
edition = { workspace = true }
|
||||||
description = "Hyper TLS support via BoringSSL"
|
description = "Hyper TLS support via BoringSSL"
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
repository = "https://github.com/cloudflare/boring"
|
repository = { workspace = true }
|
||||||
documentation = "https://docs.rs/hyper-boring"
|
documentation = "https://docs.rs/hyper-boring"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
exclude = ["test/*"]
|
exclude = ["test/*"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
features = ["rpk", "post-quantum"]
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["runtime"]
|
default = ["runtime"]
|
||||||
|
|
||||||
|
|
@ -26,17 +30,17 @@ post-quantum = ["tokio-boring/post-quantum"]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
antidote = "1.0.0"
|
antidote = { workspace = true }
|
||||||
http = "0.2"
|
http = { workspace = true }
|
||||||
hyper = { version = "0.14", default-features = false, features = ["client"] }
|
hyper = { workspace = true, features = ["client"] }
|
||||||
linked_hash_set = "0.1"
|
linked_hash_set = { workspace = true }
|
||||||
once_cell = "1.0"
|
once_cell = { workspace = true }
|
||||||
boring = { version = ">=1.1.0,<3.0.0", path = "../boring" }
|
boring = { workspace = true }
|
||||||
tokio = "1"
|
tokio = { workspace = true }
|
||||||
tokio-boring = { version = "2", path = "../tokio-boring" }
|
tokio-boring = { workspace = true }
|
||||||
tower-layer = "0.3"
|
tower-layer = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hyper = { version = "0.14", features = ["full"] }
|
hyper = { workspace = true }
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { workspace = true }
|
||||||
futures = "0.3"
|
futures = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
//! Hyper SSL support via OpenSSL.
|
//! Hyper SSL support via OpenSSL.
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
|
|
||||||
use crate::cache::{SessionCache, SessionKey};
|
use crate::cache::{SessionCache, SessionKey};
|
||||||
use antidote::Mutex;
|
use antidote::Mutex;
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,19 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tokio-boring"
|
name = "tokio-boring"
|
||||||
version = "2.1.5"
|
version = { workspace = true }
|
||||||
authors = ["Alex Crichton <alex@alexcrichton.com>", "Ivan Nikulin <ifaaan@gmail.com>"]
|
authors = ["Alex Crichton <alex@alexcrichton.com>", "Ivan Nikulin <ifaaan@gmail.com>"]
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
edition = "2021"
|
edition = { workspace = true }
|
||||||
repository = "https://github.com/cloudflare/boring"
|
repository = { workspace = true }
|
||||||
homepage = "https://github.com/cloudflare/boring"
|
homepage = "https://github.com/cloudflare/boring"
|
||||||
documentation = "https://docs.rs/tokio-boring"
|
documentation = "https://docs.rs/tokio-boring"
|
||||||
description = """
|
description = """
|
||||||
An implementation of SSL streams for Tokio backed by BoringSSL
|
An implementation of SSL streams for Tokio backed by BoringSSL
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[dependencies]
|
[package.metadata.docs.rs]
|
||||||
boring = { version = ">=1.1.0,<3.0.0", path = "../boring" }
|
features = ["rpk", "post-quantum"]
|
||||||
boring-sys = { version = ">=1.1.0,<3.0.0", path = "../boring-sys" }
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
tokio = "1"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
futures = "0.3"
|
|
||||||
tokio = { version = "1", features = ["full"] }
|
|
||||||
anyhow = "1"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# Use a FIPS-validated version of boringssl.
|
# Use a FIPS-validated version of boringssl.
|
||||||
|
|
@ -30,3 +24,14 @@ rpk = ["boring/rpk"]
|
||||||
|
|
||||||
# Enables post-quantum crypto (https://blog.cloudflare.com/post-quantum-for-all/)
|
# Enables post-quantum crypto (https://blog.cloudflare.com/post-quantum-for-all/)
|
||||||
post-quantum = ["boring/post-quantum"]
|
post-quantum = ["boring/post-quantum"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
boring = { workspace = true }
|
||||||
|
boring-sys = { workspace = true }
|
||||||
|
tokio = { workspace = true }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
futures = { workspace = true }
|
||||||
|
tokio = { workspace = true }
|
||||||
|
anyhow = { workspace = true }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
//! [`boring`] crate, on which this crate is built. Configuration of TLS parameters is still
|
//! [`boring`] crate, on which this crate is built. Configuration of TLS parameters is still
|
||||||
//! primarily done through the [`boring`] crate.
|
//! primarily done through the [`boring`] crate.
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
|
|
||||||
use boring::ssl::{
|
use boring::ssl::{
|
||||||
self, ConnectConfiguration, ErrorCode, MidHandshakeSslStream, ShutdownResult, SslAcceptor,
|
self, ConnectConfiguration, ErrorCode, MidHandshakeSslStream, ShutdownResult, SslAcceptor,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue