-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump GitHub Actions versions and use Go 1.22 and 1.21 #477
Conversation
staticcheck: | ||
# TODO: replace deprecated elliptic.Marshal, elliptic.GenerateKey, | ||
# elliptic.Unmarshal, params.ScalarBaseMult before re-enabling SA1019. | ||
checks: ["*", "-SA1019"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole staticcheck
override needs to be removed once the necessary API changes are made. I believe @armfazh already started on making those, so I just ignored the linter warning for now.
A summary of errors can be found in the commit message. The original errors were:
::error file=kem/hybrid/ckem.go,line=106,col=9::SA1019: elliptic.Marshal has been deprecated since Go 1.21: for ECDH, use the crypto/ecdh package. This function returns an encoding equivalent to that of PublicKey.Bytes in crypto/ecdh. (staticcheck)
::error file=kem/hybrid/ckem.go,line=125,col=20::SA1019: elliptic.GenerateKey has been deprecated since Go 1.21: for ECDH, use the GenerateKey methods of the [crypto/ecdh] package; for ECDSA, use the GenerateKey function of the crypto/ecdsa package. (staticcheck)
::error file=kem/hybrid/ckem.go,line=196,col=10::SA1019: elliptic.Unmarshal has been deprecated since Go 1.21: for ECDH, use the crypto/ecdh package. This function accepts an encoding equivalent to that of the NewPublicKey methods in crypto/ecdh. (staticcheck)
::error file=ecc/p384/point_test.go,line=18,col=24::SA1019: params.ScalarBaseMult has been deprecated since Go 1.21: the [CurveParams] methods are deprecated and are not guaranteed to provide any security property. For ECDH, use the [crypto/ecdh] package. For ECDSA, use the [crypto/ecdsa] package with a [Curve] value returned directly from [P224], [P256], [P384], or [P521]. (staticcheck)
::error file=group/short.go,line=231,col=9::SA1019: elliptic.Marshal has been deprecated since Go 1.21: for ECDH, use the crypto/ecdh package. This function returns an encoding equivalent to that of PublicKey.Bytes in crypto/ecdh. (staticcheck)
::error file=group/short.go,line=257,col=11::SA1019: elliptic.Unmarshal has been deprecated since Go 1.21: for ECDH, use the crypto/ecdh package. This function accepts an encoding equivalent to that of the NewPublicKey methods in crypto/ecdh. (staticcheck)
::error file=hpke/shortkem.go,line=79,col=19::SA1019: elliptic.GenerateKey has been deprecated since Go 1.21: for ECDH, use the GenerateKey methods of the [crypto/ecdh] package; for ECDSA, use the GenerateKey function of the crypto/ecdsa package. (staticcheck)
::error file=hpke/shortkem.go,line=99,col=10::SA1019: elliptic.Unmarshal has been deprecated since Go 1.21: for ECDH, use the crypto/ecdh package. This function accepts an encoding equivalent to that of the NewPublicKey methods in crypto/ecdh. (staticcheck)
::error file=hpke/shortkem.go,line=120,col=9::SA1019: elliptic.Marshal has been deprecated since Go 1.21: for ECDH, use the crypto/ecdh package. This function returns an encoding equivalent to that of PublicKey.Bytes in crypto/ecdh. (staticcheck)
* Use latest macOS and Windows versions instead of referring to an outdated version that might be removed later. See the table at https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories * Drop Go 1.20, update Go 1.21, add 1.22 to the test matrix. * Bump `github/codeql-action` actions to v3 as v2 is deprecated: https://github.com/github/codeql-action?tab=readme-ov-file#supported-versions-of-the-codeql-action * Bump Go version in go.mod to the minimum Go version supported by Go. * Bump golangci-lint for Go 1.22 and fix some linting errors. The following SA1019 errors were ignored and need to be fixed later: (3x) SA1019: elliptic.Marshal has been deprecated since Go 1.21: for ECDH, use the crypto/ecdh package. This function returns an encoding equivalent to that of PublicKey.Bytes in crypto/ecdh. (staticcheck) (2x) SA1019: elliptic.GenerateKey has been deprecated since Go 1.21: for ECDH, use the GenerateKey methods of the [crypto/ecdh] package; for ECDSA, use the GenerateKey function of the crypto/ecdsa package. (staticcheck) (3x) SA1019: elliptic.Unmarshal has been deprecated since Go 1.21: for ECDH, use the crypto/ecdh package. This function accepts an encoding equivalent to that of the NewPublicKey methods in crypto/ecdh. (staticcheck) (1x) SA1019: params.ScalarBaseMult has been deprecated since Go 1.21: the [CurveParams] methods are deprecated and are not guaranteed to provide any security property. For ECDH, use the [crypto/ecdh] package. For ECDSA, use the [crypto/ecdsa] package with a [Curve] value returned directly from [P224], [P256], [P384], or [P521]. (staticcheck)
de932b0
to
cb66762
Compare
Changes since last push:
|
stable
andoldstable
aliases instead of hard-coding specific point releases foractions/setup-go
. The arm64 builder is using a Docker image, so use the1.22
image tag. We can use thelatest
tag in the future to avoid having to update the version.github/codeql-action
actions to v3 as v2 is deprecated: https://github.com/github/codeql-action?tab=readme-ov-file#supported-versions-of-the-codeql-actionThe following SA1019 errors were ignored and need to be fixed later: