Skip to content

Commit

Permalink
Address even more comments forever
Browse files Browse the repository at this point in the history
  • Loading branch information
pgporada committed May 29, 2024
1 parent bad5f5a commit db8d228
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions ca/ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,6 @@ func tbsCertIsDeterministic(lintCertBytes []byte, leafCertBytes []byte) error {
return fmt.Errorf("while extracting leaf TBS cert: %w", err)
}

if lintRawTBSCert == nil || leafRawTBSCert == nil {
return fmt.Errorf("while extracting TBS cert: %w", err)
}

if !bytes.Equal(lintRawTBSCert, leafRawTBSCert) {
return fmt.Errorf("mismatch between lintCert and leafCert RawTBSCertificate DER bytes: \"%x\" != \"%x\"", lintRawTBSCert, leafRawTBSCert)
}
Expand Down
2 changes: 1 addition & 1 deletion ca/ca_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1392,8 +1392,8 @@ func TestVerifyTBSCertIsDeterministic(t *testing.T) {
t.Parallel()
err := tbsCertIsDeterministic(testCase.lintCertBytes, testCase.leafCertBytes)
if testCase.errorSubstr != "" {
test.AssertContains(t, fmt.Sprint(err), testCase.errorSubstr)
test.AssertError(t, err, "your lack of errors is disturbing")
test.AssertContains(t, err.Error(), testCase.errorSubstr)
} else {
test.AssertNotError(t, err, "unexpected error")
}
Expand Down

0 comments on commit db8d228

Please sign in to comment.