Open upstream Request For Enhancement to export a sentinel error (or constant) for x509: certificate relies on legacy Common Name field, use SANs instead
#520
Milestone
Overview
GH-276 added initial support for matching the
x509: certificate relies on legacy Common Name field, use SANs instead
x509.HostnameError
error text and offering sysadmins advice for how to resolve it.Later work in this project shifted how this detection/advice was handled, but the core implementation remains the same:
Show implementation
check-cert/internal/certs/certs.go
Lines 77 to 83 in aa19a9c
check-cert/internal/certs/validation-hostname.go
Lines 167 to 197 in aa19a9c
Ideally we would not have to perform string matching to detect the error, but due to how the error is implemented upstream I am not aware of any other option:
I don't know what is required to open a proposal or Request for Enhancement (RFE) in the upstream Go project, but that appears to be the next step to have the error surfaced as an value that we can reliably match against. While string matching works now, I don't know how long it will continue to be provided with that exact pattern.
References
The text was updated successfully, but these errors were encountered: