internal/wycheproof: update TestEcdsa to use ecdsa.VerifyASN1

Change-Id: Ibd6ce156550615cb85c06e734641c34fca0cfcd0
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/220697
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
This commit is contained in:
Katie Hockman
2020-03-20 14:53:29 +00:00
parent 1b76d66859
commit 97fc981609
3 changed files with 23 additions and 10 deletions
+1 -3
View File
@@ -7,8 +7,6 @@ package wycheproof
import (
"crypto/ecdsa"
"testing"
wecdsa "golang.org/x/crypto/internal/wycheproof/internal/ecdsa"
)
func TestEcdsa(t *testing.T) {
@@ -157,7 +155,7 @@ func TestEcdsa(t *testing.T) {
h.Reset()
h.Write(decodeHex(sig.Msg))
hashed := h.Sum(nil)
got := wecdsa.VerifyASN1(pub, hashed, decodeHex(sig.Sig))
got := verifyASN1(pub, hashed, decodeHex(sig.Sig))
if want := shouldPass(sig.Result, sig.Flags, flagsShouldPass); got != want {
t.Errorf("tcid: %d, type: %s, comment: %q, wanted success: %t", sig.TcId, sig.Result, sig.Comment, want)
}