Skip to content
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

Replace deprecated elliptic.Marshal #26800

Merged
merged 2 commits into from
Aug 29, 2023
Merged

Conversation

harryzcy
Copy link
Contributor

@harryzcy harryzcy commented Aug 29, 2023

In PR #26786, the Go version for golangci-lint is bumped to 1.21. This causes the following error:

models/migrations/v1_16/v210.go:132:23: 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)
                                        PublicKey:       elliptic.Marshal(elliptic.P256(), parsed.PubKey.X, parsed.PubKey.Y),

The change now uses func (*PublicKey) ECDH, which is added in Go 1.20.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Aug 29, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 29, 2023
@silverwind
Copy link
Member

silverwind commented Aug 29, 2023

Interestingly the lint run in #26799 did succeed, so no deprecation was detected. Still good to merge this.

@puni9869 puni9869 added reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Aug 29, 2023
@silverwind
Copy link
Member

Leave it open a bit more, I'm not 100% sure the change is correct.

@silverwind silverwind removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 29, 2023
@puni9869
Copy link
Member

Backport?

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 29, 2023
@silverwind
Copy link
Member

Can't backport as it requires go 1.20 or higher.

@puni9869 puni9869 added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Aug 29, 2023
@harryzcy harryzcy closed this Aug 29, 2023
@harryzcy harryzcy reopened this Aug 29, 2023
@GiteaBot GiteaBot removed the lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged label Aug 29, 2023
Copy link
Member

@KN4CK3R KN4CK3R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's identical.

@silverwind silverwind merged commit 2d9249b into go-gitea:main Aug 29, 2023
24 checks passed
@GiteaBot GiteaBot added this to the 1.21.0 milestone Aug 29, 2023
@harryzcy harryzcy deleted the crypto-ecdh branch August 29, 2023 23:34
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 30, 2023
* giteaofficial/main:
  Use `Set[Type]` instead of `map[Type]bool/struct{}`. (go-gitea#26804)
  Fix verifyCommits error when push a new branch (go-gitea#26664)
  Fix Uint8Array comparisons and update vitest (go-gitea#26805)
  Add various missing files-changed dependencies (go-gitea#26799)
  Improve flex list item padding (go-gitea#26779)
  Include the GITHUB_TOKEN/GITEA_TOKEN secret for fork pull requests (go-gitea#26759)
  feat(API): add route and implementation for creating/updating repository secret (go-gitea#26766)
  Replace deprecated `elliptic.Marshal` (go-gitea#26800)
  Updating the js libraries to latest version. (go-gitea#26795)
  Fix some slice append usages (go-gitea#26778)
  Use Go 1.21 for golangci-lint (go-gitea#26786)
  Fix notification circle (border-radius) (go-gitea#26794)
  Fix context filter has no effect in dashboard (go-gitea#26695)
  Add default label in branch select list (go-gitea#26697)
  Remove redundant nil check in `WalkGitLog` (go-gitea#26773)
  Remove fomantic `item` module (go-gitea#26775)
  Update info regarding internet connection for build (go-gitea#26776)
  Fix being unable to use a repo that prohibits accepting PRs as a PR source. (go-gitea#26785)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants