From 1be1875156e2a5a417801deb59546b167e5456c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ula=C5=9F=20Erdo=C4=9Fan?= Date: Fri, 11 Aug 2023 00:36:35 +0300 Subject: [PATCH] crypto/secp256r1: refactor by simplfying return --- crypto/secp256r1/verifier.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crypto/secp256r1/verifier.go b/crypto/secp256r1/verifier.go index e45d49e352..a9e833cd65 100644 --- a/crypto/secp256r1/verifier.go +++ b/crypto/secp256r1/verifier.go @@ -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