skip to content

Why does the absence of unrecognized_name(112) prove nothing when a server holds no certificate for the requested host_name?

level: middleimportance: should knowfreq 45%

answer

  1. absence of an optional signal
  2. the specification offered two actions
  3. continuing is conforming
  4. the failure re-surfaces as a certificate verdict
  5. vary the host_name, watch the symptom

basics

~20 s

Because the alert was never required. RFC 6066 lets a server that does not recognise the requested host_name either abort with a fatal unrecognized_name(112) or simply continue the handshake, so silence is a conforming choice and carries no information.

solid answer

~40 s

RFC 6066 says a server that understood the `server_name` extension but does not recognise the name it carries SHOULD take one of two actions: abort with a fatal-level `unrecognized_name(112)`, or continue the handshake. It also says a warning-level `unrecognized_name(112)` is NOT RECOMMENDED, because a receiver's response to warning-level alerts is unpredictable. So a server that serves no certificate for the requested `host_name` is fully entitled to carry on with whatever certificate it has, and the failure then re-surfaces as the validating peer's own verdict on that certificate - which points at the certificate, not at the name that selected it. Diagnose it by varying only the `host_name` you send and watching whether the failure moves, never by waiting for an alert the specification did not require.

code

pseudocode · 11 lines
pseudocode
function on_server_name(host_name):
    if host_name is one we serve:
        return proceed with the matching configuration

    # RFC 6066: SHOULD take one of two actions
    if policy is strict:
        return alert unrecognized_name(112) at fatal level
    else:
        return proceed with the default configuration

    # a warning-level unrecognized_name(112) is NOT RECOMMENDED

go deeper

for a junior

Take away one rule: an alert the specification only recommends cannot be relied on to appear, so its absence tells you nothing about whether the requested name was served.

for a middle

Explain the two conforming actions RFC 6066 offers, why a warning-level alert is discouraged, and how continuing turns a name problem into a certificate-shaped verdict from the validating peer.

for a senior

Show the experiment rather than the rule: hold everything constant, vary only the requested name, and judge by whether the symptom follows it. Say why the certificate the alert named is usually not the fault.

for a principal

The judgment call is what your own front ends should do with an unserved name across an estate: refusing loudly makes diagnosis cheap, continuing quietly reveals less about which names a deployment serves.

## What the specification actually permits RFC 6066 defines the `server_name` extension and, with it, what a server does when it understood the extension but does not recognise the `host_name` inside it. The server SHOULD take one of two actions: 1. abort the handshake with a fatal-level `unrecognized_name(112)` alert, or 2. continue the handshake. The same text adds that sending a **warning-level** `unrecognized_name(112)` is NOT RECOMMENDED, because a receiver's behaviour on warning-level alerts is unpredictable. Read those strengths carefully, because the whole diagnostic point sits in them. Continuing is a listed, conforming action. Nothing obliges a server to announce that it does not know the name, and plenty of deployments have no notion of an "unknown" name at all - they have a default and they serve it. ## What "continue" looks like from the outside When the server continues, the handshake proceeds normally up to the point where the validating peer inspects what it was given. The peer applies its own checks, finds the certificate unsuitable for the name it asked for, and aborts with a certificate-shaped verdict such as `bad_certificate(42)`. The result is a failure whose description points at a certificate, produced by a cause that was a name. That is the trap: the alert you receive is an accurate report of the verdict the sender reached, and a misleading report of why the connection was doomed. ## Why silence is not evidence - The specification never required the alert, so its absence is consistent with every possible server behaviour. - A server with a single default certificate may never evaluate the name at all. - A warning-level one is discouraged, and under TLS 1.3 would be treated as an error regardless of the level claimed - so implementers who do not want to abort simply send nothing. - The peer that answered may be running a version or a configuration in which the name never influenced the choice. ## What each observation licenses | Observation | What it supports | Strength | |---|---|---| | Fatal `unrecognized_name(112)` received | The server positively declined the name | Strong | | Warning-level `unrecognized_name(112)` | Discouraged by the specification; intent unclear | Ambiguous | | No alert, then a certificate verdict from the validator | Consistent with an unknown name and with several other causes | Weak | | No alert, handshake completes and is accepted | The name was served, or the default was acceptable for it | Strong | ## The test that does work 1. Hold everything else constant - same peer, same offered parameters - and vary only the `host_name` carried in `server_name`. 2. Observe whether the failure moves. A failure that disappears for one name and not another is a name-driven failure, whatever description the alert carried. 3. Read the validating peer's verdict as the evidence, not the server's silence. This is the shape of almost every good TLS diagnosis: change one input, watch whether the symptom follows it, and stop treating an absent alert as a negative result. ## The wider lesson about optional behaviour Specifications are full of behaviour a peer MAY or SHOULD exhibit, and every one of those is a place where absence carries no information. An answer that says "there was no `unrecognized_name(112)`, so the name is fine" has promoted a SHOULD-choose-one-of-two into a MUST, and it will send an incident down the wrong path - usually towards re-issuing a certificate that was never the problem. The converse also holds and is worth stating: when the fatal alert *does* arrive, it is a positive, unambiguous statement from the server that the name was refused. Optional behaviours are weak as absences and strong as presences.

  • If the fatal alert does arrive, how strong is that evidence?
    Strong and positive. A server does not send unrecognized_name(112) by accident: it understood the extension, evaluated the name, and refused it. That closes the question in a way silence never can, and it is a good illustration of the general rule - an optional behaviour is weak evidence when absent and strong evidence when present.
  • Why would an implementer avoid the warning-level form entirely?
    Because it buys nothing and risks everything. The specification calls it NOT RECOMMENDED since receiver behaviour is unpredictable, and a receiver on TLS 1.3 treats error alerts as fatal whatever level is claimed. A server that wants to continue is better off continuing silently, so the warning-level variant has essentially no safe use.

saying these in an interview costs you the question

  • Says a missing unrecognized_name(112) proves the name was served
  • Believes the specification requires the alert for an unknown name
  • Treats the warning-level form as the normal, polite behaviour
  • Blames the certificate because the alert named a certificate
  • Assumes a server always evaluates the requested host_name