mirror of
https://github.com/go-gost/x.git
synced 2026-10-20 08:18:33 +00:00
Go's crypto/tls (1.24+) appends post-quantum hybrid curves (X25519MLKEM768, SecP256r1MLKEM768, SecP384r1MLKEM1024) to the default CurvePreferences. toUTLSCurveIDs blindly cast each crypto/tls.CurveID to utls.CurveID, but the two enums diverge: utls v1.8.x does not define the two SecP* hybrids, so the cast produces unsupported curve IDs and the handshake aborts with "tls: CurvePreferences includes unsupported curve". Translate only the four curves utls understands and drop the rest; return nil when none survive so utls falls back to the fingerprint's defaults. This is the curve half of #887 (the unsafe cast that dropped ServerName/InsecureSkipVerify was the first half).