Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lscert hostname validation behavior #977

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

atc0005
Copy link
Owner

@atc0005 atc0005 commented Oct 4, 2024

Changes

Update hostname validation logic to ignore the result if a leaf certificate is not present in the given certificate chain OR if the dns-name flag was not used. Add a slight addendum/note explaining what is needed (if a leaf cert is present) or that the check is unsupported (if no leaf cert is present).

Add new functions to the internal/certs package to quickly answer whether any certificate of the specified type is present within a given certificate chain:

  • HasLeafCert
  • HasIntermediateCert
  • HasRootCert

References

Update hostname validation logic to ignore the result if
a leaf certificate is not present in the given certificate
chain OR if the `dns-name` flag was not used. Add a slight
addendum/note explaining what is needed (if a leaf cert is
present) or that the check is unsupported (if no leaf cert
is present).

Add new functions to the `internal/certs` package to quickly
answer whether any certificate of the specified type is
present within a given certificate chain:

- `HasLeafCert`
- `HasIntermediateCert`
- `HasRootCert`

refs GH-952
@atc0005 atc0005 added enhancement New feature or request app/lscert labels Oct 4, 2024
@atc0005 atc0005 added this to the v0.19.0 milestone Oct 4, 2024
@atc0005 atc0005 self-assigned this Oct 4, 2024
@atc0005 atc0005 merged commit fc263b8 into master Oct 4, 2024
27 of 31 checks passed
@atc0005 atc0005 deleted the i952-lscert-adjust-hostname-validation-behavior branch October 4, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/lscert enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lscert | Ignore hostname validation if not requested OR if leaf certificate is not present in evaluated chain
1 participant