Skip to content

Commit

Permalink
tools: switch back to official OpenSSL
Browse files Browse the repository at this point in the history
Change `tools/dep_updaters/update-openssl.sh` to fetch updates from
official OpenSSL.

PR-URL: #57301
Refs: #57142
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
richardlau authored Mar 5, 2025
1 parent 8342183 commit 2bf0bd2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/dep_updaters/update-openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ cleanup() {

download() {
LATEST_TAG_NAME="$("$NODE" --input-type=module <<'EOF'
const res = await fetch('https://api.github.com/repos/quictls/openssl/git/matching-refs/tags/openssl-3.0');
const res = await fetch('https://api.github.com/repos/openssl/openssl/git/matching-refs/tags/openssl-3.0');
if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res });
const releases = await res.json()
const latest = releases.findLast(({ ref }) => ref.includes('quic'));
const latest = releases.at(-1);
if(!latest) throw new Error(`Could not find latest release`);
console.log(latest.ref.replace('refs/tags/',''));
EOF
Expand All @@ -39,14 +39,14 @@ EOF

OPENSSL_TARBALL="openssl.tar.gz"

curl -sL -o "$OPENSSL_TARBALL" "https://api.github.com/repos/quictls/openssl/tarball/$LATEST_TAG_NAME"
curl -sL -o "$OPENSSL_TARBALL" "https://api.github.com/repos/openssl/openssl/tarball/$LATEST_TAG_NAME"

log_and_verify_sha256sum "openssl" "$OPENSSL_TARBALL"

gzip -dc "$OPENSSL_TARBALL" | tar xf -

rm "$OPENSSL_TARBALL"
mv quictls-openssl-* openssl
mv openssl-openssl-* openssl
echo "Replacing existing OpenSSL..."
rm -rf "$DEPS_DIR/openssl/openssl"
mv "$WORKSPACE/openssl" "$DEPS_DIR/openssl/"
Expand All @@ -56,7 +56,7 @@ EOF
echo "Please git add openssl, and commit the new version:"
echo ""
echo "$ git add -A deps/openssl/openssl"
echo "$ git commit -m \"deps: upgrade openssl sources to quictls/openssl-$NEW_VERSION\""
echo "$ git commit -m \"deps: upgrade openssl sources to openssl/openssl-$NEW_VERSION\""
echo ""
# The last line of the script should always print the new version,
# as we need to add it to $GITHUB_ENV variable.
Expand Down

0 comments on commit 2bf0bd2

Please sign in to comment.