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

chore: move hyper to a newer MSRV #4983

Merged
merged 30 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
dee300e
chore: move hyper to a newer MSRV
dougch Dec 17, 2024
239b731
chore: Move s2n-tls-hyper to a separate workspace
dougch Dec 17, 2024
237ee15
move integration to the standard workspace
dougch Dec 17, 2024
b8bb646
update integration path
dougch Dec 17, 2024
d1dec6b
fix GHA integraiton path
dougch Dec 17, 2024
bd709c5
add the hyper dep back
dougch Dec 17, 2024
f3aaf2b
fix path for external build GHA
dougch Dec 18, 2024
68f352c
PR feedback
dougch Dec 18, 2024
6bbfff9
revert pinning change
dougch Dec 18, 2024
c26dfb0
move the original workspace down a level
dougch Dec 19, 2024
52fad50
fix paths for extended tests
dougch Dec 19, 2024
55ce66e
bump MSRV once more
dougch Dec 19, 2024
9fbbcee
fix cert paths
dougch Dec 19, 2024
741cc4d
Fix generate paths in GHA
dougch Dec 19, 2024
2be3b36
move rust-examples
dougch Dec 20, 2024
07033db
fix pcap GHA path
dougch Dec 20, 2024
8fc068a
CaSe MatTerS
dougch Dec 20, 2024
c57b4dc
fix cert symlink paths
dougch Dec 20, 2024
26c1c57
move README; fix var
dougch Dec 20, 2024
fe70621
make MSRV match workspace
dougch Dec 20, 2024
a28a7cf
Update bindings/README.md
dougch Dec 20, 2024
0cf71ce
Fix msrv-url; more PR feedback
dougch Dec 20, 2024
ce46cd6
fix GHA paths
dougch Dec 20, 2024
ee8fda1
additional Readme
dougch Dec 20, 2024
e8c567b
symlink to one certs dir
dougch Dec 20, 2024
1081cb7
Update bindings/rust/README.md
dougch Dec 20, 2024
a441753
Update bindings/rust/README.md
dougch Dec 20, 2024
c855fe6
Update bindings/rust/README.md
dougch Dec 23, 2024
49239a0
Update bindings/rust/README.md
dougch Dec 23, 2024
bce62bf
Update bindings/rust/README.md
dougch Dec 23, 2024
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
16 changes: 12 additions & 4 deletions .github/workflows/ci_rust.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the followup list: I think we'll also want rustfmt and asan running in the standard workspace.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ env:
# Pin the nightly toolchain to prevent breakage.
# This should be occasionally updated.
RUST_NIGHTLY_TOOLCHAIN: nightly-2024-12-01
ROOT_PATH: bindings/rust
# Extended support MSRV
ROOT_PATH: bindings/rust/extended
# Standard support MSRV
STANDARD_PATH: bindings/rust/standard
EXAMPLE_WORKSPACE: bindings/rust-examples
PCAP_TEST_PATH: tests/pcap

Expand Down Expand Up @@ -49,6 +52,11 @@ jobs:
working-directory: ${{env.ROOT_PATH}}
run: cargo test

# Test the standard workspace
- name: Standard Workspace Tests
working-directory: ${{env.STANDARD_PATH}}
run: cargo test

- name: "Feature Tests: Fingerprint, kTLS, QUIC, and PQ"
working-directory: ${{env.ROOT_PATH}}
# Test all features except for FIPS, which is tested separately.
Expand All @@ -59,7 +67,7 @@ jobs:
run: cargo test --features unstable-renegotiate

- name: Network-enabled integration tests
working-directory: ${{env.ROOT_PATH}}/integration
working-directory: ${{env.STANDARD_PATH}}/integration
# no-default-features is used because network tests are hidden behind a
# default "negative" feature. This is because we don't want network tests
# invoked on the `cargo test --all-features` pattern.
Expand All @@ -83,7 +91,7 @@ jobs:

cd ${{env.ROOT_PATH}}
./generate.sh
ldd target/debug/integration | grep libs2n.so
ldd standard/target/debug/integration | grep libs2n.so
dougch marked this conversation as resolved.
Show resolved Hide resolved

# our benchmark testing includes interop tests between s2n-tls, rustls, and
# openssl
Expand All @@ -102,7 +110,7 @@ jobs:
run: ${{env.ROOT_PATH}}/generate.sh --skip-tests

- name: bench tests
working-directory: ${{env.ROOT_PATH}}/bench
working-directory: ${{env.STANDARD_PATH}}/bench
run: cargo test

s2n-tls-binding-examples:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- cron: "0 18 * * *"

env:
ROOT_PATH: bindings/rust
ROOT_PATH: bindings/rust/extended
goatgoose marked this conversation as resolved.
Show resolved Hide resolved

jobs:
audit:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/regression_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
types: [checks_requested]
branches: [main]

env:
ROOT_PATH: bindings/rust/extended

jobs:
regression-test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -54,7 +57,7 @@ jobs:

# Generate bindings for main branch
- name: Generate bindings (mainline)
run: ${{env.ROOT_PATH}}bindings/rust/generate.sh --skip-tests
run: ${{env.ROOT_PATH}}/generate.sh --skip-tests

# Run performance tests using Valgrind for main branch
- name: Run scalar performance test (mainline)
Expand All @@ -68,7 +71,7 @@ jobs:

# Generate bindings for PR branch
- name: Generate bindings (PR branch)
run: ${{env.ROOT_PATH}}bindings/rust/generate.sh --skip-tests
run: ${{env.ROOT_PATH}}/generate.sh --skip-tests

# Run performance tests using Valgrind for PR branch
- name: Run scalar performance test (PR branch)
Expand Down
21 changes: 18 additions & 3 deletions bindings/rust/README.md → bindings/README.md
goatgoose marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,30 @@ In order to generate rust bindings for s2n-tls, you need to have the following i
Generating rust bindings can be accomplished by running the `generate.sh` script:

```
$ ./bindings/rust/generate.sh
$ ./bindings/rust/extended/generate.sh
```

This script generates the low-level bindings in the crate `s2n-tls-sys`, which is used by the `s2n-tls` crate to provide higher-level bindings.
See [s2n-tls-sys](https://github.com/aws/s2n-tls/blob/main/bindings/rust/s2n-tls-sys/README.md) for more information on `s2n-tls-sys` crate.

## Minimum Supported Rust Version (MSRV)

`s2n-tls` will maintain a rolling MSRV (minimum supported rust version) policy of at least 6 months. The current s2n-quic version is not guaranteed to build on Rust versions earlier than the MSRV.
There are three workspaces, with slightly different MSRV policies, to keep broad support for the bindings, while allowing newer MSRV for integrations, like `s2n-tls-hyper`.
dougch marked this conversation as resolved.
Show resolved Hide resolved

### Extended

The current MSRV for `s2n-tls`, `s2n-tls-sys` and `s2n-tls-tokio` is [1.63.0][msrv-url].
dougch marked this conversation as resolved.
Show resolved Hide resolved

### Standard

We will maintain a rolling MSRV (minimum supported rust version) policy of at least 6 months. The current s2n-quic version is not guaranteed to build on Rust versions earlier than the MSRV.

The current MSRV for the standard workspace is [1.74.0][msrv-url].

### Rust Examples

The current MSRV for the Rust Examples workspace is [stable][msrv-url].



The current MSRV is [1.63.0][msrv-url].

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ edition.workspace = true

[dependencies]
clap = { version = "4", features = ["derive"] }
s2n-tls = { path = "../../rust/s2n-tls" }
s2n-tls-tokio = { path = "../../rust/s2n-tls-tokio" }
s2n-tls = { path = "../../rust/extended/s2n-tls" }
s2n-tls-tokio = { path = "../../rust/extended/s2n-tls-tokio" }
tokio = { version = "1", features = ["full"] }
4 changes: 2 additions & 2 deletions bindings/rust-examples/tokio-server-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license.workspace = true
edition.workspace = true

[dependencies]
s2n-tls = { path = "../../rust/s2n-tls" }
s2n-tls-tokio = { path = "../../rust/s2n-tls-tokio" }
s2n-tls = { path = "../../rust/extended/s2n-tls" }
s2n-tls-tokio = { path = "../../rust/extended/s2n-tls-tokio" }
tokio = { version = "1", features = ["full"] }
clap = { version = "4", features = ["derive"] }
1 change: 0 additions & 1 deletion bindings/rust/bench/certs/ecdsa256

This file was deleted.

1 change: 0 additions & 1 deletion bindings/rust/bench/certs/ecdsa384

This file was deleted.

9 changes: 0 additions & 9 deletions bindings/rust/bench/certs/readme.md

This file was deleted.

1 change: 0 additions & 1 deletion bindings/rust/bench/certs/rsa2048

This file was deleted.

1 change: 0 additions & 1 deletion bindings/rust/bench/certs/rsa3072

This file was deleted.

1 change: 0 additions & 1 deletion bindings/rust/bench/certs/rsa4096

This file was deleted.

goatgoose marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
dougch marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
[workspace]
members = [
"integration",
"s2n-tls",
"s2n-tls-sys",
"s2n-tls-tokio",
"s2n-tls-hyper",
"s2n-tls-tokio"
]
# generate can't be included in the workspace because of a bootstrapping problem
# s2n-tls-sys/Cargo.toml (part of the workspace) is generated by
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions bindings/rust/generate.sh → bindings/rust/extended/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ mkdir -p s2n-tls-sys/src/features
# we copy the C sources into the `lib` directory so they get published in the
# actual crate artifact.
cp -r \
../../api \
../../crypto \
../../error \
../../stuffer \
../../tls \
../../utils \
../../../api \
../../../crypto \
../../../error \
../../../stuffer \
../../../tls \
../../../utils \
s2n-tls-sys/lib/

cp -r \
../../tests/features \
../../../tests/features \
s2n-tls-sys/lib/tests/

cp -r \
../../CMakeLists.txt \
../../cmake \
../../../CMakeLists.txt \
../../../cmake \
s2n-tls-sys/lib/

# generate the bindings modules from the copied sources
Expand All @@ -52,7 +52,7 @@ cargo publish --dry-run --allow-dirty
cargo publish --dry-run --allow-dirty --all-features
popd

pushd integration
pushd ../standard/integration
cargo run
popd

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Default for CertKeyPair {
impl CertKeyPair {
/// This is the directory holding all of the pems used for s2n-tls unit tests
const TEST_PEMS_PATH: &'static str =
concat!(env!("CARGO_MANIFEST_DIR"), "/../../../tests/pems/");
concat!(env!("CARGO_MANIFEST_DIR"), "/../../../../tests/pems/");

/// Create a test CertKeyPair
/// * `prefix`: The *relative* prefix from the s2n-tls/tests/pems/ folder.
Expand Down
6 changes: 6 additions & 0 deletions bindings/rust/standard/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[workspace]
members = [
dougch marked this conversation as resolved.
Show resolved Hide resolved
"bench",
"integration",
"s2n-tls-hyper"
]
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
s2n-tls = { path = "../s2n-tls" }
s2n-tls = { path = "../../extended/s2n-tls" }
errno = "0.3"
libc = "0.2"
strum = { version = "0.25", features = ["derive"] }
Expand All @@ -14,7 +14,7 @@ openssl = { version = "0.10", features = ["vendored"] }

[dev-dependencies]
criterion = "0.5"
pprof = { version = "0.12", features = ["criterion", "flamegraph"] }
pprof = { version = "0.14", features = ["criterion", "flamegraph"] }
# env_logger and log are used to enable logging for rustls, which can help with
# debugging interop failures
env_logger = "0.10"
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions bindings/rust/standard/bench/certs/ecdsa256
1 change: 1 addition & 0 deletions bindings/rust/standard/bench/certs/ecdsa384
9 changes: 9 additions & 0 deletions bindings/rust/standard/bench/certs/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This folder actually just contains symlinks to the files in s2n-tls/test/pems/permutations

```
ln -s ../../../../../tests/pems/permutations/ec_ecdsa_p256_sha256 ecdsa256
ln -s ../../../../../tests/pems/permutations/ec_ecdsa_p384_sha384 ecdsa384
ln -s ../../../../../tests/pems/permutations/rsae_pkcs_2048_sha256 rsa2048
ln -s ../../../../../tests/pems/permutations/rsae_pkcs_3072_sha384 rsa3072
ln -s ../../../../../tests/pems/permutations/rsae_pkcs_4096_sha384 rsa4096
```
1 change: 1 addition & 0 deletions bindings/rust/standard/bench/certs/rsa2048
1 change: 1 addition & 0 deletions bindings/rust/standard/bench/certs/rsa3072
1 change: 1 addition & 0 deletions bindings/rust/standard/bench/certs/rsa4096
File renamed without changes.
14 changes: 14 additions & 0 deletions bindings/rust/standard/certs/cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
goatgoose marked this conversation as resolved.
Show resolved Hide resolved
MIICLDCCAdOgAwIBAgIUTihKtj/RM4hq5r9fmryUGwDlYC4wCgYIKoZIzj0EAwIw
azELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkFaMQ4wDAYDVQQHDAVUZW1wZTEPMA0G
A1UECgwGQW1hem9uMRowGAYDVQQLDBFBbWF6b25XZWJTZXJ2aWNlczESMBAGA1UE
AwwJbG9jYWxob3N0MCAXDTIzMDUyNDA2MjYyN1oYDzIxMjMwNDMwMDYyNjI3WjBr
MQswCQYDVQQGEwJVUzELMAkGA1UECAwCQVoxDjAMBgNVBAcMBVRlbXBlMQ8wDQYD
VQQKDAZBbWF6b24xGjAYBgNVBAsMEUFtYXpvbldlYlNlcnZpY2VzMRIwEAYDVQQD
DAlsb2NhbGhvc3QwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS4be8OVofY925i
AVfv2brqeJF55DeUSP3Q1cUI3QhPxw8ZFBTg25rnYsbpGQBsW1iSmE6v1YHGlmf5
mAbhoAKJo1MwUTAdBgNVHQ4EFgQUCpoWu/Qw0+c9wyejGR0n16FNofwwHwYDVR0j
BBgwFoAUCpoWu/Qw0+c9wyejGR0n16FNofwwDwYDVR0TAQH/BAUwAwEB/zAKBggq
hkjOPQQDAgNHADBEAiBdYxkSxWkqaY6fv4QhNVPX8pNysB02lHBoLR2yVFf7MwIg
f+86G4gdpIi8tGO7Q217BAIpsWwCMrYw7O41ltGHOog=
-----END CERTIFICATE-----
23 changes: 23 additions & 0 deletions bindings/rust/standard/certs/cert_localhost_ipv6.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIF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COKnt/OeY0yMqCxbws3l3H+uwPwwAACIUn
3e5+RtotiQQBreSiHJJ6omFpd+cyvluZwZ20t3dhlgGU5NUN3zcHkdc8hGpaxtfJ
AaunssA40QcjQFQYI8ADTiQHW20rZcsVRKkwRkNVps/vMDpLBCyBp96xhTAtkoDH
Xs/Zi1bJiJ8xw3TkDeJFShpP+cQPYHI36qWqNjTei9eHrNX8sNFAdNZVyitoZ3/W
FrPdms/ivlvgQbWWB3EKxD+PsQXoYvjkGhMNmg==
-----END CERTIFICATE-----
33 changes: 33 additions & 0 deletions bindings/rust/standard/certs/cert_rsa.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-----BEGIN CERTIFICATE-----
MIIFqzCCA5OgAwIBAgIUPecTUedBPhAjrzsM16hwH5f/8HswDQYJKoZIhvcNAQEL
BQAwZDELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkFaMQ4wDAYDVQQHDAVUZW1wZTEN
MAsGA1UECgwETWFhczEVMBMGA1UECwwMQmlvQ29tcHV0aW5nMRIwEAYDVQQDDAls
b2NhbGhvc3QwIBcNMjMwNTI0MDYyNjI3WhgPMjEyMzA0MzAwNjI2MjdaMGQxCzAJ
BgNVBAYTAlVTMQswCQYDVQQIDAJBWjEOMAwGA1UEBwwFVGVtcGUxDTALBgNVBAoM
BE1hYXMxFTATBgNVBAsMDEJpb0NvbXB1dGluZzESMBAGA1UEAwwJbG9jYWxob3N0
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnflx61sSH4pF9AmdOR3r
ilFM9Z1RIZ4aZXk5Dov9UP4KykCIFC12I7wryyKHH5PoKjKKtYW+4G/lAOw/O7kP
6oDfbcQbH3E5LCT7k2a+tOwxywxmsQFpK/YCicKxkFvbKqfbb+S5U9CZ9Rmx3jGh
FldIVXYrkdq2AfFu7U0BB5rdDQLBx1GAZjtmDjP9dpPe0GuukInHqaogO9d08x2O
3WN3grxdj2NN0tjaR6/S+a1L4vwcybJ5UZ8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2axo2m5f/x77FREZCmyVA9I8fYDo3A7srGgkwMc+isdrbzytSC2KKo4/XnpvIRWo
vvKKslTzyaMoSv3i9qj23kWowRKqrguCs0wG1d7QiCRdEAsFO+MZPzsde5zKqcQ1
AC8kSUZrFRjFfZfc0JAB7pI6BSlVwzVItdIdlA9jzEZr2c7430djTyidyTKiWj3D
FkfWZeLWo9l/1vC+Qyeo
-----END CERTIFICATE-----
27 changes: 27 additions & 0 deletions bindings/rust/standard/certs/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

# This script will generate all of the certs used for examples and tests in
# the rust bindings crates.

# Used for TLS 1.2 connections.
echo "generating rsa key and cert"
openssl req -x509 -newkey rsa:4096 -keyout key_rsa.pem -out cert_rsa.pem -sha256 -days 36500 -nodes -subj "/C=US/ST=AZ/L=Tempe/O=Maas/OU=BioComputing/CN=localhost"


# Used for TLS 1.3 connections.
echo "generating ec key and cert"
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -keyout key.pem -out cert.pem -sha256 -days 36500 -nodes -subj "/C=US/ST=AZ/L=Tempe/O=Amazon/OU=AmazonWebServices/CN=localhost"


# Used for testing IPv6. Includes the localhost IPv6 address as a SAN.
echo "generating localhost IPv6 key and cert"
openssl req -x509 \
-newkey rsa:2048 \
-keyout key_localhost_ipv6.pem \
-out cert_localhost_ipv6.pem \
-sha256 \
-days 36500 \
-nodes \
-subj "/C=US/ST=MA/L=Boston/O=Amazon/OU=AmazonWebServices/CN=localhost" \
-addext "subjectAltName = IP:0:0:0:0:0:0:0:1"
5 changes: 5 additions & 0 deletions bindings/rust/standard/certs/key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg7CYotHO5H76smTyL
DHb6esNVfzBEDAi+vZMvtM2SItahRANCAAS4be8OVofY925iAVfv2brqeJF55DeU
SP3Q1cUI3QhPxw8ZFBTg25rnYsbpGQBsW1iSmE6v1YHGlmf5mAbhoAKJ
-----END PRIVATE KEY-----
Loading
Loading