Skip to main content
Back to blog

Connection Not Private, and Your Browser Chose What to Accept

How-To

Connection Not Private, and Your Browser Chose What to Accept article illustration

The warning is about a comparison, and you supplied one side of it. Its other side arrived from the server, inside a certificate. Which of the two names was wrong decides what there is for you to do about it, and the document that specifies the comparison is precise about where each name comes from.

Two names meet, and they come from different places

Name checking in Transport Layer Security has had its own specification since November 2023, when RFC 9525, Service Identity in TLS, replaced the version that had stood since 2011. It says so in its own abstract: “This document obsoletes RFC 6125.” The useful part of it, for anybody staring at one of these warnings, is the vocabulary, because it gives separate names to the two things being held up against each other.

One of them belongs to the server. A presented identifier is “An identifier presented by a server to a client within a PKIX certificate”. Several can sit in one certificate, and where a single machine answers for more than one domain, it may carry a distinct set for each.

Its counterpart is assembled at your end. A reference identifier is “An identifier expected by the client when examining presented identifiers”, and the entry goes further, naming what it is built from: “It is constructed from the source domain and, optionally, an application service type”.

So the question becomes what the source domain was. The specification pins that term down as well, calling it “The FQDN that a client expects an application service to present in the certificate”, and the definition goes on to say where such a thing comes from. “This is typically input by a human user, configured into a client, or provided by reference such as a URL”.

Read those three definitions together and the message on your screen reads differently. It is not a verdict about a website. It is the result of holding something a certificate claims against something that reached your browser by one of the three routes that definition lists.

The browser decides what it will accept first

The order of operations is where this stops being abstract. RFC 9525 sets the procedure out in three steps, and the first happens before the server has said anything.

Independence is the point, and the wording is emphatic. “The client MUST construct a list of acceptable reference identifiers and MUST do so independently of the identifiers presented by the server”. Nothing arriving in the certificate can widen the set of names that would have satisfied your browser, because that set was closed before the certificate was read.

Then the comparison runs in one direction. With that list in hand the client “checks each of its reference identifiers against the server’s presented identifiers”, and both outcomes are defined by exhaustion rather than by judgement. “The search succeeds if any presented identifier matches one of the reference identifiers”. “The search fails if the client exhausts its list of reference identifiers without finding a match”.

What feeds that list is therefore the whole game. The specification lists the plausible inputs, among them a web address somebody typed, configured account information and a hyperlink in a page, and then declines to standardise how they are turned into names, noting only that “the security of a system that uses this document will depend on how reference identifiers are generated” and that the step therefore deserves care.

One exclusion there is sharper than the rest. Resolving a name can throw up further names on the way, and those are ruled out in terms: “any intermediate values are not reference identifiers and MUST NOT be treated as such”. The stated reason is that “not treating intermediate domain names as reference identifiers removes DNS and DNS resolution from the attack surface”. Anything that rewrites one answer in transit therefore cannot get a name of its own onto the list, so a redirection that works has to be made where the names are published, which is the version that raises no error for a visitor at all.

What the specification for the match declines to cover

The document that defines the name comparison keeps declining to define anything around it, explicitly and more than once, and that is what makes a browser warning harder to read than it looks.

Certificate chains are not its business. On the chain standing behind a certificate, the applicability section is blunt: “It does not address the name forms in the chain of certificates used to validate a certificate, nor does it create or check the validity of such a chain”. It then hands the job on without softening it, noting that “In order to ensure proper authentication, applications need to verify the entire certification path”.

Neither is whether the certificate is still good. After setting out the three steps, the specification allows that “a client should perform further checks, such as expiration and revocation”, and immediately puts them outside its own remit, because “methods for doing so are out of scope for this document”.

Nor is getting to the server in the first place. Among the listed exclusions, “the resolution process itself is out of scope for this specification”.

Nor is what an authority checked before issuing anything, a question answered elsewhere, in how far that assurance reaches.

Then the exclusion closest to the thing you are looking at. Among the topics ruled out are user interface issues, on the ground that “such issues are properly the responsibility of client software developers”.

Put those exclusions together. A single panel on your screen is reporting the combined outcome of a name comparison, a path validation, a validity period and a revocation state, each governed somewhere else, and the specification nearest to the message declines to specify the message. Whatever wording and error code your browser chose is a product decision, not a standard, which is why the same failure is described differently depending on what you are using to read it.

When nothing matches, an override has conditions

The outcome section is short, and it attaches terms to the escape hatch.

Start with the success case, which is quietly surprising. Where a match is found, “the client MUST use the matched reference identifier as the validated identity of the application service”. The identity the connection proceeds under is the one your browser assembled. Containing it was the certificate’s whole job.

On failure the default is to stop. Where a person is at the controls, the client “SHOULD inform the user of the identity mismatch and automatically terminate the communication attempt with a bad certificate error”, and the reason given is behavioural rather than cryptographic: “in order to prevent users from inadvertently bypassing security protections in hostile situations”.

A way through is allowed, and its conditions are the interesting half. “Such clients MAY give advanced users the option of proceeding with acceptance despite the identity mismatch”, qualified at once by the observation that “it needs to be handled with extreme caution”, with one safeguard spelled out: “by forcing the user to view the entire certification path before proceeding”. What the specification wants you reading before you continue is the material it had declared outside its own scope.

And remembering the decision is treated as worse than taking it. On offering to trust the certificate for later visits, the rule points the opposite way, because local policy fixing one certificate for one peer “SHOULD be made available only as prior configuration rather than a just-in-time override for a failed connection”. A choice made calmly in advance is acceptable. The same choice made while a connection is failing is what the document resists, and a failing connection is the working condition of the attack this comparison exists to catch.

Where to look, and in what order

Two things are worth reading before you decide anything, and they go in an order.

First, which name the certificate offers. One of the specification’s summarised rules is a warning about where people look: “Do not include or check strings that look like domain names in the subject’s Common Name”. The field whose label looks like the obvious place is not the field a modern client compares, so a name that appears to match there has settled nothing.

Second, the name your browser was working from. That is the half you can account for, and accounting for it means retracing how you arrived: typed, pasted, followed from a link, or restored by a reopened tab. A name you cannot retrace is itself the finding, whatever the certificate says.

The same discipline shows up on one of our own pages. It prints the exact name it put to the system next to every result, so the gap between reading an answer and reading the answer to a particular question is visible on the page itself.

A related caution sits under the one tool here whose subject you choose. It reports on whatever value you type into the box, and it holds no view on whether that was the right thing to type. Neither page inspects a certificate, and neither would notice two names failing to agree.

That failure is what the panel on your screen is reporting, in wording nobody standardised, about a comparison whose acceptable answers were fixed before the server spoke. Work out which of the two names you can account for. If it is yours, look to the server. If it is not, look again at the route that brought you here.