Skip to content

Commit b6ddedd

Browse files
authored
Fix rustls integ tests; bump to v1.15.2 (#959)
* Fix rustls integ (again) * Bump version to v1.15.2
1 parent 0207364 commit b6ddedd

File tree

2 files changed

+33
-10
lines changed

2 files changed

+33
-10
lines changed

aws-lc-rs/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "aws-lc-rs"
33
authors = ["AWS-LibCrypto"]
4-
version = "1.15.1"
4+
version = "1.15.2"
55
# this crate re-exports whatever sys crate that was selected
6-
links = "aws_lc_rs_1_15_1_sys"
6+
links = "aws_lc_rs_1_15_2_sys"
77
edition = "2021"
88
rust-version = "1.70.0"
99
keywords = ["crypto", "cryptography", "security"]

aws-lc-rs/scripts/run-rustls-integration.sh

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fi
108108
rm Cargo.lock
109109
RCGEN_AWS_LC_RS_STRING="^aws-lc-rs = .*"
110110
RCGEN_AWS_LC_RS_PATH_STRING="aws-lc-rs = { path = \"${ROOT}/aws-lc-rs\", default-features = false, features = [\"aws-lc-sys\"] }"
111-
sed_replace ./Cargo.toml "s|${RCGEN_AWS_LC_RS_STRING}|${RCGEN_AWS_LC_RS_PATH_STRING}|g"
111+
sed_replace ./Cargo.toml "s|${RCGEN_AWS_LC_RS_STRING}|${RCGEN_AWS_LC_RS_PATH_STRING}|gm"
112112
cargo add --path "${ROOT}/aws-lc-rs" --package rustls-cert-gen
113113
cargo update
114114
cargo update "aws-lc-rs@${AWS_LC_RS_VERSION}"
@@ -121,11 +121,20 @@ if [[ $latest_release == "1" ]]; then
121121
git checkout "${RUSTLS_WEBPKI_COMMIT}"
122122
fi
123123
rm Cargo.lock
124-
WEBPKI_RCGEN_STRING="^rcgen = { .* }"
124+
WEBPKI_RCGEN_STRING="^rcgen = \\{ .*?\\}"
125125
WEBPKI_RCGEN_PATH_STRING="rcgen = { path = \"${RUSTLS_RCGEN_DIR}/rcgen\" , default-features = false, features = [\"aws_lc_rs\"] }"
126126
WEBPKI_AWS_LC_RS_STRING="^aws-lc-rs = { version.* }"
127127
WEBPKI_AWS_LC_RS_PATH_STRING="aws-lc-rs = { path = \"${ROOT}/aws-lc-rs\", optional = true, default-features = false, features = [\"aws-lc-sys\"] }"
128-
find ./ -type f -name "Cargo.toml" | xargs perl -0777 -pi -e 's|'"${WEBPKI_RCGEN_STRING}"'|'"${WEBPKI_RCGEN_PATH_STRING}"'|g; s|'"${WEBPKI_AWS_LC_RS_STRING}"'|'"${WEBPKI_AWS_LC_RS_PATH_STRING}"'|g'
128+
WEBPKI_AWS_LC_RS_WORKSPACE_OPTIONAL_STRING="^aws-lc-rs = \\{ workspace = true, optional = true.*?\\}"
129+
WEBPKI_AWS_LC_RS_WORKSPACE_NON_OPTIONAL_STRING="^aws-lc-rs = \\{ workspace = true[^\\}]*\\}"
130+
WEBPKI_AWS_LC_RS_PATH_NON_OPTIONAL_STRING="aws-lc-rs = { path = \"${ROOT}/aws-lc-rs\", default-features = false, features = [\"aws-lc-sys\"] }"
131+
while IFS= read -r -d '' cargo_toml; do
132+
sed_replace "${cargo_toml}" \
133+
"s|${WEBPKI_RCGEN_STRING}|${WEBPKI_RCGEN_PATH_STRING}|gm" \
134+
"s|${WEBPKI_AWS_LC_RS_STRING}|${WEBPKI_AWS_LC_RS_PATH_STRING}|gm" \
135+
"s|${WEBPKI_AWS_LC_RS_WORKSPACE_OPTIONAL_STRING}|${WEBPKI_AWS_LC_RS_PATH_STRING}|gm" \
136+
"s|${WEBPKI_AWS_LC_RS_WORKSPACE_NON_OPTIONAL_STRING}|${WEBPKI_AWS_LC_RS_PATH_NON_OPTIONAL_STRING}|gm"
137+
done < <(find ./ -type f -name "Cargo.toml" -print0)
129138

130139
# Trigger Cargo to generate the lock file
131140
cargo update
@@ -140,15 +149,29 @@ if [[ $latest_release == "1" ]]; then
140149
fi
141150
rm Cargo.lock
142151
# Update the Cargo.toml to use the GitHub repository reference under test.
143-
RUSTLS_RCGEN_STRING="^rcgen = { .* }"
152+
RUSTLS_RCGEN_STRING="^rcgen = \\{ .*?\\}"
144153
RUSTLS_RCGEN_PATH_STRING="rcgen = { path = \"${RUSTLS_RCGEN_DIR}/rcgen\" , default-features = false, features = [\"aws_lc_rs\", \"pem\"] }"
145154
RUSTLS_AWS_LC_RS_STRING="^aws-lc-rs = { version.* }"
146-
RUSTLS_AWS_LC_RS_PATH_STRING="aws-lc-rs = { path = \"${ROOT}/aws-lc-rs\", default-features = false, features = [\"aws-lc-sys\"] }"
155+
RUSTLS_AWS_LC_RS_PATH_STRING="aws-lc-rs = { path = \"${ROOT}/aws-lc-rs\", optional = true, default-features = false, features = [\"aws-lc-sys\"] }"
156+
RUSTLS_AWS_LC_RS_PATH_NON_OPTIONAL_STRING="aws-lc-rs = { path = \"${ROOT}/aws-lc-rs\", default-features = false, features = [\"aws-lc-sys\"] }"
147157
RUSTLS_AWS_LC_RS_NON_OPTIONAL_PATH_STRING="aws-lc-rs = { path = \"${ROOT}/aws-lc-rs\", default-features = false, features = [\"unstable\", \"aws-lc-sys\"] }"
148-
RUSTLS_WEBPKI_STRING="^webpki = { package = \"rustls-webpki\",.*}"
158+
RUSTLS_AWS_LC_RS_WORKSPACE_OPTIONAL_STRING="^aws-lc-rs = \\{ workspace = true, optional = true.*?\\}"
159+
RUSTLS_AWS_LC_RS_WORKSPACE_NON_OPTIONAL_STRING="^aws-lc-rs = \\{ workspace = true[^\\}]*\\}"
160+
RUSTLS_WEBPKI_STRING="^webpki = \\{ package = \"rustls-webpki\",[\s\S]*?\\}"
149161
RUSTLS_WEBPKI_PATH_STRING="webpki = { package = \"rustls-webpki\", path = \"${RUSTLS_WEBPKI_DIR}\", features = [\"alloc\"], default-features = false }"
150-
sed_replace ./rustls-post-quantum/Cargo.toml "s|${RUSTLS_AWS_LC_RS_STRING}|${RUSTLS_AWS_LC_RS_NON_OPTIONAL_PATH_STRING}|g"
151-
find ./ -type f -name "Cargo.toml" | xargs perl -0777 -pi -e 's|'"${RUSTLS_RCGEN_STRING}"'|'"${RUSTLS_RCGEN_PATH_STRING}"'|g; s|'"${RUSTLS_AWS_LC_RS_STRING}"'|'"${RUSTLS_AWS_LC_RS_PATH_STRING}"'|g; s|'"${RUSTLS_WEBPKI_STRING}"'|'"${RUSTLS_WEBPKI_PATH_STRING}"'|g'
162+
sed_replace ./rustls-post-quantum/Cargo.toml \
163+
"s|${RUSTLS_AWS_LC_RS_STRING}|${RUSTLS_AWS_LC_RS_NON_OPTIONAL_PATH_STRING}|gm" \
164+
"s|${RUSTLS_AWS_LC_RS_WORKSPACE_OPTIONAL_STRING}|${RUSTLS_AWS_LC_RS_NON_OPTIONAL_PATH_STRING}|gm" \
165+
"s|${RUSTLS_AWS_LC_RS_WORKSPACE_NON_OPTIONAL_STRING}|${RUSTLS_AWS_LC_RS_NON_OPTIONAL_PATH_STRING}|gm"
166+
while IFS= read -r -d '' cargo_toml; do
167+
[[ "${cargo_toml}" == "./rustls-post-quantum/Cargo.toml" ]] && continue
168+
sed_replace "${cargo_toml}" \
169+
"s|${RUSTLS_RCGEN_STRING}|${RUSTLS_RCGEN_PATH_STRING}|gm" \
170+
"s|${RUSTLS_AWS_LC_RS_STRING}|${RUSTLS_AWS_LC_RS_PATH_NON_OPTIONAL_STRING}|gm" \
171+
"s|${RUSTLS_AWS_LC_RS_WORKSPACE_OPTIONAL_STRING}|${RUSTLS_AWS_LC_RS_PATH_STRING}|gm" \
172+
"s|${RUSTLS_AWS_LC_RS_WORKSPACE_NON_OPTIONAL_STRING}|${RUSTLS_AWS_LC_RS_PATH_NON_OPTIONAL_STRING}|gm" \
173+
"s|${RUSTLS_WEBPKI_STRING}|${RUSTLS_WEBPKI_PATH_STRING}|gm"
174+
done < <(find ./ -type f -name "Cargo.toml" -print0)
152175

153176
# Trigger Cargo to generate the lock file
154177
cargo update

0 commit comments

Comments
 (0)