You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the lscert and check_cert tools, using both the filename and server flags together is blocked by config validation. The dns-name flag is optional for both tools.
For lscert, the VerifyHostname() method call is performed only if the server flag is set and only if there are certs present in the chain:
If the optional dns-name flag is provided it is used for hostname verification, but the current implementation requires that the server flag is set; this implementation disables hostname verification if examining a certificate file. It is likely that this was an intentional decision; this behavior was already present in the initial prototype release, so I don't have a GH issue noting the intention behind the choice.
For check_cert, the logic to determine whether hostname verification is applied is more complex.
Msg("disabling hostname verification as requested for empty SANs list")
If the leaf cert has an empty SANs list and the user opted to skip hostname verification (when SANs list is empty) we emit a warning and then skip hostname verification
If there is a verification error we check if it was because the SANs list was empty and fail with verbose feedback to assist sysadmin with resolving the issue
If there was a verification error for another reason we fail with a recommendation to specify the correct site FQDN instead of a host FQDN
For check_cert, the first "gate" is whether a certificate is present in the chain (this is a little ironic as the block just above it fails the plugin if zero certs were found). Then, hostname verification is performed regardless of whether the filename or server flag was used. Instead of requiring that the dns-name flag is used if the filename flag was specified, hostname verification is performed anyway and presumably the user is guided to provide the dns-name flag based on the hostname verification error encountered.
The text was updated successfully, but these errors were encountered:
For the
lscert
andcheck_cert
tools, using both thefilename
andserver
flags together is blocked by config validation. Thedns-name
flag is optional for both tools.For
lscert
, theVerifyHostname()
method call is performed only if theserver
flag is set and only if there are certs present in the chain:check-cert/cmd/lscert/main.go
Lines 206 to 226 in eb5eb94
If the optional
dns-name
flag is provided it is used for hostname verification, but the current implementation requires that theserver
flag is set; this implementation disables hostname verification if examining a certificate file. It is likely that this was an intentional decision; this behavior was already present in the initial prototype release, so I don't have a GH issue noting the intention behind the choice.For
check_cert
, the logic to determine whether hostname verification is applied is more complex.check-cert/cmd/check_cert/main.go
Lines 313 to 321 in eb5eb94
server
flag value for later hostname verification (may be empty)dns-name
flag is used, we pick that value for hostname verification over theserver
flag valuecheck-cert/cmd/check_cert/main.go
Lines 331 to 339 in eb5eb94
check-cert/cmd/check_cert/main.go
Line 354 in eb5eb94
check-cert/cmd/check_cert/main.go
Lines 367 to 370 in eb5eb94
check-cert/cmd/check_cert/main.go
Line 404 in eb5eb94
For
check_cert
, the first "gate" is whether a certificate is present in the chain (this is a little ironic as the block just above it fails the plugin if zero certs were found). Then, hostname verification is performed regardless of whether thefilename
orserver
flag was used. Instead of requiring that thedns-name
flag is used if thefilename
flag was specified, hostname verification is performed anyway and presumably the user is guided to provide thedns-name
flag based on the hostname verification error encountered.The text was updated successfully, but these errors were encountered: