When Mercurial talks to a remote over HTTPS, OpenSSL is the engine that handles encryption and certificates. If OpenSSL is misconfigured or outdated, the connection fails—sometimes without warning. Common causes include mismatched TLS versions, missing CA certificates, expired server certs, or incompatible cipher suites.
Check your Mercurial configuration first. In .hgrc, confirm hostfingerprints and cacerts settings point to valid certificate files. Align TLS versions in your OpenSSL build with what the remote host supports. Older OpenSSL builds may default to insecure protocols that modern servers refuse.
Updating OpenSSL can resolve most issues. Many Mercurial installations link against the system OpenSSL library. Verify the version with openssl version. On Linux, upgrade through your package manager. On macOS, use Homebrew. If Mercurial runs inside a custom environment, rebuild it against the new OpenSSL headers and libraries.