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

Migrate to go modules #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Migrate to go modules #11

wants to merge 2 commits into from

Conversation

smantic
Copy link

@smantic smantic commented Dec 6, 2024

Hi,

Sorry for necro-ing this repository. I stumbled upon it when someone came into the go discord asking how to install this project since it isn't using go modules.

Since this project has at least one new user and a non-zero amount of stars I figured it might be prudent to update this project so that it uses modules (introduced in go 1.11). This way at the very least users can practice prudent security by building this project with updated versions of go that may include any patches to the cryptography dependencies included in the go std library. Idk that there have been any patches significant for the project but its certainly possible after 9 years.

I updated the readme to include installation instructions, and updated the new minimum required version of go.
Which is now go.1.20 since "crypto/ecdsa" has since been updated to use "crypto/ecdh" and ecdh did not exist until go 1.20. I verified that go 1.20 is able to build this project.

I removed the vendor directory as it is not needed with modules, but it can be added back if desired with go mod vendor.

go mod init github.com/cornfeedhobo/ssh-keydgen && go mod tidy && rm -rf vendor
@smantic
Copy link
Author

smantic commented Dec 6, 2024

Also if anyone else reads this just wondering how to build the current project, you can do so with any up to date version of go with go mod init && go mod tidy && go mod vendor && go build .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant