crypto/secp256r1: refactor by simplfying return

(cherry picked from commit 1be1875156)
This commit is contained in:
Ulaş Erdoğan 2023-08-11 00:36:35 +03:00 committed by Anshal Shukla
parent 0d115db168
commit d64d8e73c1

View file

@ -28,11 +28,7 @@ func Verify(hash []byte, r, s, x, y *big.Int) bool {
// Verify the signature with the public key, // Verify the signature with the public key,
// then return true if it's valid, false otherwise // then return true if it's valid, false otherwise
if ok := ecdsa.Verify(publicKey, hash, r, s); ok { return ecdsa.Verify(publicKey, hash, r, s)
return true
}
return false
} }
// Check the malleability issue // Check the malleability issue