Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Update vendors to avoid KEM_SIKE503 and KEM_SIKE751 build failure #16

Merged
merged 5 commits into from
Sep 26, 2023

Conversation

kerolasa
Copy link
Contributor

The KEM_SIKE503 and KEM_SIKE751 definitions were removed from github.com/cisco/go-hpke vendor. These definitions should not be used in this repository either so that projects importing odoh-go and go-hpke work after go module update.

Reference: cisco/go-hpke@d6034a5

@bwesterb bwesterb self-requested a review April 11, 2023 10:25
@chris-wood
Copy link
Contributor

Hmm, it's strange that the build is failing. Let's fix that before we merge.

@kerolasa
Copy link
Contributor Author

This is a strange error indeed.

Error: ../../../go/pkg/mod/golang.org/x/crypto@v0.8.0/curve25519/curve25519_go120.go:9:8: malformed module path "crypto/ecdh": missing dot in first path element

That line: https://go.googlesource.com/crypto/+/refs/tags/v0.8.0/curve25519/curve25519_go120.go#9

Hold on. The package that import is "crypto/ecdh" and the package that is importing it is "golang.org/x/crypto". Maybe the crypto's are getting mixed up. Then again while that sound reasonable why wouldn't other crypto imports fail such as "crypto/cipher" in few other files.

https://github.com/cloudflare/odoh-go/actions/runs/4664626485/jobs/8261157767?pr=16#step:2:3

Maybe the standard lib in go-version: 1.13 is too old.

https://github.com/cloudflare/odoh-go/blob/master/.github/workflows/go.yml#L19
https://github.com/cloudflare/odoh-go/blob/master/.github/workflows/test.yaml#L18

The KEM_SIKE503 and KEM_SIKE751 definitions were removed from
github.com/cisco/go-hpke vendor.  These definitions should not be used in
this repository either so that projects importing odoh-go and go-hpke work
after go module update.

Reference: cisco/go-hpke@d6034a5
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
    find . -name '*.go' | grep -v vendor | xargs gofmt -s -w

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
All the warnings reported by: golangci-lint run ./...

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This will hopefully address the "Test with Coverage: malformed module path
"crypto/ecdh": missing dot in first path element" issue.  The required
version is based on fact commit that introduced crypto/ecdh started it's
exsistence in the go1.20.

    go-sources $ git tag --contain d88d91e32e1440307369d50ba17ce622399a8bc1
    go1.20

Reference: golang/go@d88d91e
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
@bwesterb bwesterb merged commit f39fa01 into cloudflare:master Sep 26, 2023
3 checks passed
@kerolasa kerolasa deleted the kem-fix branch September 26, 2023 12:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants