Create manpage dir in Makefile
Include man page in Makefile
Update & tidy dependencies
Exit with failure when verification fails
build sshign in integration tests
This should also clean up the sshign binary post-run.
add integration tests and speed up units
The integration tests are using golden files stored in a testdata folder. The .gitignore
file had to be updated to allow the folder to be committed.
The unit tests have been updated to use 2048-bit RSA keys purely to speed them up. We're
also calling t.Parallel() in order to let them run in parallel.
gotest.tools has been added as a dependency for some nice-to-have golden file assertions.
cleanup: separate glue code from logic
'main.go' is now relegated to simply glue code, generally to do with simple input/output.
The new 'key' package now contains the main logic of the tool. This is done for a few reasons:
* Keep an obvious barrier between glue code and main logic.
* Make the code testable via black box tests (i.e. tests are in the 'key_test' package).
* The code can be kept in separate files more cleanly.
* Main application logic is kept more generic (e.g. it doesn't care about _how_ a password is
requested, just that a password is requested, leaving us free to accept passwords via
command line arguments and/or environment variables)
cleanup: make verify and sign take mockable interface types
This includes the first pass at tests, too. Longer term, these should be split up.
clean up functions and add tests
sign: handle encrypted private keys
Add LICENSE and README.md
Read data to sign/verify from stdin
Move x/crypto/ssh import among others
Rename binary to sshign
Cause it's funnier and doesn't tie the implementation to Go