Skip to content

certs: give the benchmark certificate a subjectAltName - #1274

Open
MDA2AV wants to merge 1 commit into
mainfrom
fix/cert-subject-alt-name
Open

certs: give the benchmark certificate a subjectAltName#1274
MDA2AV wants to merge 1 commit into
mainfrom
fix/cert-subject-alt-name

Conversation

@MDA2AV

@MDA2AV MDA2AV commented Aug 22, 2026

Copy link
Copy Markdown
Owner

certs/server.crt carried CN=localhost and no subjectAltName.

RFC 9525 removed CN fallback entirely, so it is not a valid server certificate to anything current. More practically: some server libraries parse the extension while loading the pair and fail outright rather than at verification time.

sanic is one of those. Handing it the cert/key pair gives:

    for t, name in cert["subjectAltName"]
KeyError: 'subjectAltName'

and the process dies before serving anything. Every entry that loads the pair without inspecting it was unaffected, which is why the gap stayed invisible.

What changed

Regenerated over the existing private key, so only the certificate changes:

  • SANs for localhost, *.localhost, 127.0.0.1, 0.0.0.0, ::1 — the harness connects to localhost on every TLS profile
  • keyUsage / extendedKeyUsage=serverAuth
  • Added certs/generate.sh, since there was no record of how the pair had been produced

No regression

entry result
actix 71 / 0
aspnet-minimal 84 / 0

Between them those cover json-tls, static-tls, baseline-h2, static-h2 and the h3 profiles.

Note

This does not by itself unblock sanic. With the SAN in place sanic gets past the crash, but its TLS listener still never completes a handshake under its worker manager — at any worker count. It works only with single_process=True, which would pin the entry to one core. That looks like an upstream bug in sanic 25.3.0, so sanic stays unsubscribed from json-tls.

🤖 Generated with Claude Code

The committed certificate carried CN=localhost and no subjectAltName. RFC
9525 removed CN fallback entirely, so it is not a valid server certificate
to anything current -- and some server libraries parse the extension while
loading the pair and fail outright rather than at verification time.

sanic is one: handing it the cert/key pair raises

    for t, name in cert["subjectAltName"]
    KeyError: 'subjectAltName'

and the process dies before it serves anything. Every entry that loads the
pair without inspecting it was unaffected, so the gap stayed invisible.

Regenerated over the existing private key, so only the certificate changes:
SANs for localhost, *.localhost and the loopback addresses (the harness
connects to localhost on every TLS profile), plus the keyUsage and
extendedKeyUsage a server certificate should carry. Added generate.sh, since
there was no record of how the pair had been produced.

No regression: actix 71/0 and aspnet-minimal 84/0, which between them cover
json-tls, static-tls, baseline-h2, static-h2 and the h3 profiles.

This does not by itself unblock sanic -- see the note in that entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant