Skip to content

Commit

Permalink
move acceptance test into its own external workspace crate
Browse files Browse the repository at this point in the history
  • Loading branch information
stevefan1999-personal committed Sep 25, 2024
1 parent cbd8453 commit dd55e98
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 55 deletions.
52 changes: 24 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 10 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[workspace]
members = ["acceptance-test"]

[workspace.dependencies]
rustls = { version = "0.23.13", default-features = false }
pki-types = { package = "rustls-pki-types", version = "1.8.0", default-features = false }

[package]
name = "rustls-rustcrypto"
description = """
Expand All @@ -13,7 +20,6 @@ categories = ["cryptography", "no-std"]
keywords = ["rustls", "tls"]
edition = "2021"
rust-version = "1.75"
resolver = "1" # Hack to enable the `custom` feature of `getrandom`

# Ensure all dependencies + feats are mapped to crate features for correct usage
# default features often have std breaking no_std and potentially other unwanted
Expand All @@ -31,40 +37,20 @@ p256 = { version = "0.13.2", default-features = false, features = ["pem", "ecdsa
p384 = { version = "0.13.0", default-features = false, features = ["pem", "ecdsa", "ecdh"] }
paste = { version = "1.0.15", default-features = false }
pkcs8 = { version = "0.10.2", default-features = false, features = ["pem", "pkcs5"] }
pki-types = { package = "rustls-pki-types", version = "1.8.0", default-features = false }
pki-types.workspace = true
rand_core = { version = "0.6.4", default-features = false, features = ["getrandom"] }
rsa = { version = "0.9.6", default-features = false, features = ["sha2"] }
rustls = { version = "0.23.13", default-features = false }
rustls.workspace = true
sec1 = { version = "0.7.3", default-features = false, features = ["pkcs8", "pem"] }
sha2 = { version = "0.10.8", default-features = false }
signature = { version = "2.2.0", default-features = false }
webpki = { package = "rustls-webpki", version = "0.102.8", default-features = false }
x25519-dalek = { version = "2", default-features = false }

[dev-dependencies]
anyhow = "1.0.89"
bytes = "1.7.2"
claim = "0.5.0"
env_logger = "0.11.5"
futures = "0.3.30"
getrandom = { version = "0.2", features = ["custom"] } # workaround to build on no_std targets
http = "1.1.0"
http-body-util = "0.1.2"
hyper = { version = "1.4.1", default-features = false, features = ["http1", "http2", "client", "server"] }
hyper-rustls = { version = "0.27.3", default-features = false, features = ["http1", "http2", "webpki-roots"] }
hyper-util = { version = "0.1.9", features = ["tokio", "server-auto", "service", "http1", "http2"] }
indoc = "2.0.5"
rcgen = "0.13.1"
reqwest = { version = "0.12.7", default-features = false, features = ["http2", "charset", "rustls-tls-manual-roots-no-provider", "json"] }
test-case = "3.3.1"
tokio = { version = "1.40.0", features = ["rt-multi-thread", "macros"] }
tokio-rustls = { version = "0.26.0", default-features = false }
webpki-root-certs = "0.26.6"

[features]
default = ["std", "tls12", "zeroize"]
logging = ["rustls/logging"]
tls12 = ["rustls/tls12", "hyper-rustls/tls12", "tokio-rustls/tls12"]
tls12 = ["rustls/tls12"]

# Only enable feature in upstream if there is an overall effect e.g. aead/alloc in-place
# zeroize is another typical that can be turned off
Expand All @@ -74,6 +60,3 @@ std = ["alloc", "webpki/std", "pki-types/std", "rustls/std", "ed25519-dalek/std"
# TODO: go through all of these to ensure to_vec etc. impls are exposed
alloc = ["webpki/alloc", "pki-types/alloc", "aead/alloc", "ed25519-dalek/alloc"]
zeroize = ["ed25519-dalek/zeroize", "x25519-dalek/zeroize"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(TODO)'] }
36 changes: 36 additions & 0 deletions acceptance-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[package]
name = "acceptance-test"
version = "0.1.0"
edition = "2021"

[dev-dependencies]
anyhow = "1.0.89"
bytes = "1.7.2"
claim = "0.5.0"
env_logger = "0.11.5"
futures = "0.3.30"
http-body-util = "0.1.2"
hyper = { version = "1.4.1", default-features = false, features = ["http1", "http2", "client", "server"] }
hyper-util = { version = "0.1.9", features = ["tokio", "server-auto", "service", "http1", "http2"] }
indoc = "2.0.5"
pki-types.workspace = true
rcgen = "0.13.1"
reqwest = { version = "0.12.7", default-features = false, features = ["http2", "charset", "rustls-tls-manual-roots-no-provider", "json"] }
rustls-rustcrypto = { path = ".." }
rustls.workspace = true
test-case = "3.3.1"
tokio = { version = "1.40.0", features = ["rt-multi-thread", "macros"] }
tokio-rustls = { version = "0.26.0", default-features = false }
webpki-root-certs = "0.26.6"

[features]
default = ["std", "tls12"]
logging = ["rustls/logging"]
tls12 = ["rustls/tls12", "tokio-rustls/tls12"]
# TODO: go through all of these that what gets exposed re: std error type
std = ["alloc", "pki-types/std", "rustls/std"]
# TODO: go through all of these to ensure to_vec etc. impls are exposed
alloc = ["pki-types/alloc"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(TODO)'] }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit dd55e98

Please sign in to comment.