diff --git a/jwk/ecdsa.go b/jwk/ecdsa.go index 7af943382..fdf6e3363 100644 --- a/jwk/ecdsa.go +++ b/jwk/ecdsa.go @@ -228,9 +228,9 @@ func ecdsaValidateKey(k interface { X() []byte Y() []byte }, checkPrivate bool) error { - crv, ok := ecutil.CurveForAlgorithm(k.Crv()) - if !ok { - return fmt.Errorf(`invalid curve algorithm %q`, k.Crv()) + crv, err := ourecdsa.CurveFromAlgorithm(k.Crv()) + if err != nil { + return fmt.Errorf(`invalid curve algorithm %q: %w`, k.Crv(), err) } keySize := ecutil.CalculateKeySize(crv) diff --git a/jws/BUILD.bazel b/jws/BUILD.bazel index 995344a30..34ee8a96d 100644 --- a/jws/BUILD.bazel +++ b/jws/BUILD.bazel @@ -24,11 +24,7 @@ go_library( deps = [ "//cert", "//internal/base64", -<<<<<<< HEAD "//internal/ecutil", - "//internal/iter", -======= ->>>>>>> 7497448 (Remove iterators (#999)) "//internal/json", "//internal/keyconv", "//internal/pool",