-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
crypto/x509: checkSignature why the loop doesn't break
after finding algo
?
#52955
Comments
break
after finding algo
?break
after finding algo
?
… matching `algo` The loop should be terminated immediately when `algo` has been found Fixes golang#52955
cc @golang/security |
The loop should be terminated immediately when `algo` has been found Fixes golang#52955
The loop should be terminated immediately when `algo` has been found Fixes golang#52955
Adding a |
Change https://go.dev/cl/407215 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I read the
go
source code and found a performance issue, checkSignature why the loop doesn'tbreak
after findingalgo
?go/src/crypto/x509/x509.go
Lines 818 to 829 in aedf298
What did you expect to see?
The
for
of the checkSignature function requires an earlybreak
What did you see instead?
If this needs to be fixed, I'd be happy to submit a
pr
The text was updated successfully, but these errors were encountered: