ssh-keydgen icon indicating copy to clipboard operation
ssh-keydgen copied to clipboard

Migrate to go modules

Open smantic opened this issue 1 year ago • 1 comments

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.

smantic avatar Dec 06 '24 05:12 smantic

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 .

smantic avatar Dec 06 '24 05:12 smantic