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