Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion hack/tools/update-tls-profiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ set -e

OUTPUT=internal/shared/util/tlsprofiles/mozilla_data.json
INPUT=https://ssl-config.mozilla.org/guidelines/latest.json
tmp="$(mktemp "${OUTPUT}.tmp.XXXXXX")"
trap 'rm -f "${tmp}"' EXIT

if ! curl -L -s -f "${INPUT}" -o "${OUTPUT}"; then
if ! curl -L -s -f "${INPUT}" -o "${tmp}"; then
echo "ERROR: Failed to download ${INPUT} (HTTP error or connection failure)" >&2
exit 1
fi

mv "${tmp}" "${OUTPUT}"
trap - EXIT
7 changes: 7 additions & 0 deletions internal/shared/util/tlsprofiles/mozilla_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ func parseProfile(name string, cfg mozillaConfiguration) (tlsProfile, []string,
panic(fmt.Sprintf("tlsprofiles: profile %q has unrecognized tls_versions[0] %q: %v", name, cfg.TLSVersions[0], err))
}

if len(curveNums) == 0 {
panic(fmt.Sprintf("tlsprofiles: profile %q resolved no supported tls_curves from embedded mozilla_data.json", name))
}
if version < tlsVersion(tls.VersionTLS13) && len(cipherNums) == 0 {
panic(fmt.Sprintf("tlsprofiles: profile %q resolved no supported cipher suites from embedded mozilla_data.json", name))
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

This string literal is missing a closing quote (\") before the comma, which will cause the package to fail to compile. Add the missing quote so the fmt.Sprintf call is syntactically valid.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It obviously compiled since the CI passed.

}

return tlsProfile{
ciphers: cipherSlice{cipherNums: cipherNums},
curves: curveSlice{curveNums: curveNums},
Expand Down
Loading