With several certificates and no default set (SystemSettings defaultCertificateId), CertificateResolver::resolve_certificate logged tls.multiple-certificates-available at Warn on every handshake without SNI or for an unknown name, and served whichever certificate the hash map yielded first.
parse_certificates now picks a default when none is set: the certificate for defaultHostname (exact name, then a wildcard on its domain), otherwise the one whose name sorts first. It goes in under *, the same slot an admin-set default uses, so the resolver's existing fallback finds it.
The event is logged once per certificate load, and only when the hostname isn't covered by any certificate.
A default set in the console still wins, as before.
Tests: fallback_default_certificate unit tests (hostname, wildcard on its domain, same choice every time without a match). cargo check -p common --all-targets, fmt and the fork checks are clean.
Fixes #418 (reported in community t/232, post 34).
With several certificates and no default set (SystemSettings `defaultCertificateId`), `CertificateResolver::resolve_certificate` logged `tls.multiple-certificates-available` at Warn on every handshake without SNI or for an unknown name, and served whichever certificate the hash map yielded first.
- `parse_certificates` now picks a default when none is set: the certificate for `defaultHostname` (exact name, then a wildcard on its domain), otherwise the one whose name sorts first. It goes in under `*`, the same slot an admin-set default uses, so the resolver's existing fallback finds it.
- The event is logged once per certificate load, and only when the hostname isn't covered by any certificate.
- A default set in the console still wins, as before.
Tests: `fallback_default_certificate` unit tests (hostname, wildcard on its domain, same choice every time without a match). `cargo check -p common --all-targets`, fmt and the fork checks are clean.
With several certificates and no default set, every handshake without
SNI or for an unknown name logged tls.multiple-certificates-available at
Warn and got whichever certificate the hash map yielded first.
Loading the certificates now picks a default when none is set: the one
for defaultHostname (exact, then a wildcard on its domain), otherwise the
one whose name sorts first. The event is logged once per load, and only
when the hostname isn't covered.
Fixes#418
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #418 (reported in community t/232, post 34).
With several certificates and no default set (SystemSettings
defaultCertificateId),CertificateResolver::resolve_certificateloggedtls.multiple-certificates-availableat Warn on every handshake without SNI or for an unknown name, and served whichever certificate the hash map yielded first.parse_certificatesnow picks a default when none is set: the certificate fordefaultHostname(exact name, then a wildcard on its domain), otherwise the one whose name sorts first. It goes in under*, the same slot an admin-set default uses, so the resolver's existing fallback finds it.Tests:
fallback_default_certificateunit tests (hostname, wildcard on its domain, same choice every time without a match).cargo check -p common --all-targets, fmt and the fork checks are clean.