Summary
With UseHttps, TDextHttpSysEngine.Start first validates the certificate binding (RegisterSslBinding). The validation only looks at IP:port bindings. When port 443 has only hostname (SNI) or central-store bindings, it raises and the service doesn't start, even though HTTP.sys would serve HTTPS for that prefix.
Where
Sources/Server/Dext.Server.HttpSys.pas, TDextHttpSysEngine.RegisterSslBinding. It queries HttpServiceConfigSslCertInfo with HttpServiceConfigQueryExact on 0.0.0.0:<port> (or the configured IPv4 address), and on ERROR_FILE_NOT_FOUND raises:
No http.sys SSL binding exists for +:443. Inspect or provision it with: netsh http show sslcert ipport=+:443
It never checks either of the other two binding kinds:
HttpServiceConfigSslSniCertInfo: hostname bindings. IIS creates these for every site with "Require Server Name Indication", and win-acme creates them when it installs a certificate for such a site;
HttpServiceConfigSslCcsCertInfo: central certificate store bindings.
Why it matters
Running a Dext service on HTTP.sys next to IIS on the same 443 is a natural deployment: HTTP.sys routes by URL prefix, and the service reuses the certificate IIS/win-acme already manage and renew. Where those bindings are all per-hostname, the service can't start.
To be transparent: we found this reading the code while deploying to such a server, not by watching it fail. Our server also has a 0.0.0.0:443 binding, so it starts fine.
Suggested fix (either, or both)
- (a) When the IP:port lookup returns
ERROR_FILE_NOT_FOUND, look for an SNI binding for the host in the URL prefix (and a CCS binding for the port) before raising.
- (b) An option to skip the check (e.g.
ValidateSslBinding, default True), for setups where bindings are managed outside the service.
A small related one: with the address +, the message suggests netsh http show sslcert ipport=+:443, which netsh rejects. The query itself uses 0.0.0.0, so the message could print that.
Checked against f440e79a.
🤖 Generated with Claude Code
Summary
With
UseHttps,TDextHttpSysEngine.Startfirst validates the certificate binding (RegisterSslBinding). The validation only looks at IP:port bindings. When port 443 has only hostname (SNI) or central-store bindings, it raises and the service doesn't start, even though HTTP.sys would serve HTTPS for that prefix.Where
Sources/Server/Dext.Server.HttpSys.pas,TDextHttpSysEngine.RegisterSslBinding. It queriesHttpServiceConfigSslCertInfowithHttpServiceConfigQueryExacton0.0.0.0:<port>(or the configured IPv4 address), and onERROR_FILE_NOT_FOUNDraises:It never checks either of the other two binding kinds:
HttpServiceConfigSslSniCertInfo: hostname bindings. IIS creates these for every site with "Require Server Name Indication", and win-acme creates them when it installs a certificate for such a site;HttpServiceConfigSslCcsCertInfo: central certificate store bindings.Why it matters
Running a Dext service on HTTP.sys next to IIS on the same 443 is a natural deployment: HTTP.sys routes by URL prefix, and the service reuses the certificate IIS/win-acme already manage and renew. Where those bindings are all per-hostname, the service can't start.
To be transparent: we found this reading the code while deploying to such a server, not by watching it fail. Our server also has a
0.0.0.0:443binding, so it starts fine.Suggested fix (either, or both)
ERROR_FILE_NOT_FOUND, look for an SNI binding for the host in the URL prefix (and a CCS binding for the port) before raising.ValidateSslBinding, defaultTrue), for setups where bindings are managed outside the service.A small related one: with the address
+, the message suggestsnetsh http show sslcert ipport=+:443, which netsh rejects. The query itself uses0.0.0.0, so the message could print that.Checked against
f440e79a.🤖 Generated with Claude Code