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

Clarify CertChainValidationResults.IsSucceeded #1182

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/certs/validation-expiration.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ func (evr ExpirationValidationResult) IsIgnored() bool {
// IsSucceeded indicates whether this validation check result is not flagged
// as ignored and no problems with the certificate chain were identified.
func (evr ExpirationValidationResult) IsSucceeded() bool {
return evr.IsOKState() && !evr.IsIgnored()
return !evr.IsIgnored() && evr.Err() == nil
}

// IsFailed indicates whether this validation check result is not flagged as
Expand Down
2 changes: 1 addition & 1 deletion internal/certs/validation-hostname.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (hnvr HostnameValidationResult) IsIgnored() bool {
// IsSucceeded indicates whether this validation check result is not flagged
// as ignored and no problems with the certificate chain were identified.
func (hnvr HostnameValidationResult) IsSucceeded() bool {
return hnvr.IsOKState() && !hnvr.IsIgnored()
return !hnvr.IsIgnored() && hnvr.Err() == nil
}

// IsFailed indicates whether this validation check result is not flagged as
Expand Down
2 changes: 1 addition & 1 deletion internal/certs/validation-sans.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (slvr SANsListValidationResult) IsIgnored() bool {
// IsSucceeded indicates whether this validation check result is not flagged
// as ignored and no problems with the certificate chain were identified.
func (slvr SANsListValidationResult) IsSucceeded() bool {
return slvr.IsOKState() && !slvr.IsIgnored()
return !slvr.IsIgnored() && slvr.Err() == nil
}

// IsFailed indicates whether this validation check result is not flagged as
Expand Down
Loading