Skip to content

Commit

Permalink
crypto/secp256r1: refactor by simplfying return
Browse files Browse the repository at this point in the history
(cherry picked from commit 1be1875156e2a5a417801deb59546b167e5456c6)
  • Loading branch information
ulerdogan authored and anshalshukla committed Nov 3, 2023
1 parent 0d115db commit d64d8e7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crypto/secp256r1/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ func Verify(hash []byte, r, s, x, y *big.Int) bool {

// Verify the signature with the public key,
// then return true if it's valid, false otherwise
if ok := ecdsa.Verify(publicKey, hash, r, s); ok {
return true
}

return false
return ecdsa.Verify(publicKey, hash, r, s)
}

// Check the malleability issue
Expand Down

0 comments on commit d64d8e7

Please sign in to comment.