58 Commits

Author SHA1 Message Date
Pierre Carrier
e5e2d88106
drop COPYING, replaced by LICENSE 2022-06-06 11:28:21 +02:00
Pierre Carrier
23f38ab6a5
new email in README.md 2022-06-05 01:36:32 +02:00
Pierre Carrier
dff8505d32
add license 2022-02-24 19:29:09 -05:00
Pierre Carrier
880cce700d
goreleaser: distribute binaries w/ Go-native names v1.2.1 2022-02-20 22:12:15 -05:00
Hangkun Ung
85269f2746 Detect tag changes (#2) v1.2.0 2022-02-20 22:01:43 -05:00
Hangkun Ung
31632acfad Goreleaser (#1)
* Init

* Add config file

* Update x/sys to support windows arm64

* Release if tag

* asdf

* asdfa

* asdf
2022-02-20 22:01:43 -05:00
Hangkun Ung
3709c4a20b Add support for SHA256 and SHA512 2022-02-20 19:49:57 -05:00
M. J. Fromberger
bce7065e62 Fix commented-out unit tests.
I commented out this test while writing #45. Split the Codes function so we can
plumb in a time step for testing, and update the test. This does not change the
observed behaviour for the user.
2022-01-31 22:39:07 -05:00
M. J. Fromberger
656898bb52 Update Go versions in CI.
Include Go 1.16 and 1.17, drop 1.11 and 1.12.
2022-01-31 22:38:50 -05:00
M. J. Fromberger
b3d8c2bc50
Update encryption example to distinguish input
The example for how to encrypt a gauth.csv file using openssl implicitly assumes
the input and output are different files. But if you run that command while already
in the output directory, they will be the same path, and it appears openssl may
clobber the output.

To avert this, explicitly indicate in the example that the input is in the home
directory, and the output is elsewhere. The actual paths do not matter, this
is just to keep the example safe.
2021-07-30 13:02:20 -04:00
M. J. Fromberger
f5a1f722c0 Proposal: Extend configuration file format to support options.
This change is a follow-up to the discussion on #33, which proposes a
backward-compatible extension to the existing config file format to allow the
user to include otpauth URLs in addition to the standard format.

This is WIP, not ready to merge; it needs tests and a better story for the
progress indicator.
2021-03-11 07:15:38 -05:00
M. J. Fromberger
509311a279
Update build status badge. (#44)
Since the CI build is now on GitHub actions rather than Travis, point to the
Actions badge image instead.
2021-01-31 11:22:02 -08:00
Pierre Carrier
ba51841548 GitHub workflows, README: rename master to main v1.1 2021-01-28 22:03:07 -05:00
Pierre Carrier
2ccd802aa3 add LICENSE 2021-01-28 22:01:59 -05:00
M. J. Fromberger
65eff71872 Fix incorrect example input in the README file.
The "Google" example code used invalid base-32 characters ("8" and "9") and
thus generated errors when decoding the keys.
2021-01-28 20:23:17 -05:00
M. J. Fromberger
457efa2520 Override staticcheck version for older Go releases. 2021-01-27 12:28:22 -08:00
M. J. Fromberger
8e211fc2dd Convert CI from Travis to GitHub Actions.
The performance of GitHub Actions is faster and more consistent than the free
tier of Travis CI. Build, lint, tests, and staticcheck for the same versions of
Go using Actions instead.
2020-10-29 16:05:23 -04:00
M. J. Fromberger
c57414b83b
Fix padding removal when decrypting a config file. (#36)
OpenSSL uses PKCS#5 padding, and the decryption code was not removing it
correctly. In some cases, this causes the last line of the decrypted config to
be mangled and produces invalid results.

To support this:

- Move config loading to gauth.LoadConfigFile.
- Inject a hook to read the user's password.
- Add unit tests that decryption doesn't corrupt the result.
- Update module dependencies.
- Update Go versions in CI, and fix some config-check warnings.
2020-10-26 18:42:15 -07:00
Pierre Carrier
9083b3c311
Merge pull request #30 from creachadair/modpath
Update otp module path to github.
2019-06-10 20:54:09 +02:00
M. J. Fromberger
02ea9924ea Update otp module path to github.
No functional changes here; I'm just moving the source repository from
bitbucket to github and need to update the import path accordingly.
2019-06-10 10:12:34 -07:00
Pierre Carrier
f7ae5c4da3
Merge pull request #29 from creachadair/indirect
Consolidate and simplify the generation of codes.
2019-06-04 18:12:47 +02:00
M. J. Fromberger
9d95eb95fd Consolidate and simplify the generation of codes.
Rework gauth.Code as gauth.Codes, which returns the previous, current, and next
strings in one step. Remove authCodeOrDie, since there is now only one decode
step to check.

The implementation now uses the bitbucket.org/creachadair/otp package, which
makes the code simpler and subsumes normalizeSecret.
2019-06-03 22:20:08 -07:00
Pierre Carrier
c217b384f0
Merge pull request #28 from creachadair/formatting
Clean up output formatting code.
2019-06-04 05:48:38 +02:00
M. J. Fromberger
3e14d15f54 Clean up output formatting code.
Instead of manually computing column sizes, use the tabwriter library package.
The output is the same, but requires less fiddly space manipulation.
2019-06-02 08:23:28 -07:00
Pierre Carrier
61ada0495b
Merge pull request #27 from creachadair/librify
Separate OTP generation into a library
2019-06-02 14:29:57 +02:00
M. J. Fromberger
e30055f675 Add recent versions of Go to the .travis.yml. 2019-06-01 18:07:35 -07:00
M. J. Fromberger
0d0c6c886e Add go.mod and go.sum files to support Go modules. 2019-06-01 18:07:27 -07:00
M. J. Fromberger
bf81136148 Add basic unit tests for the gauth package. 2019-06-01 18:07:27 -07:00
M. J. Fromberger
87aa5234c1 Separate OTP generation into a library.
No functional changes are intended; the main package now imports the library
and uses it, but the implementation is unchanged.

Specific highlights:

- Change the names of the functions to avert stutter following the advice of
  Effective Go: https://golang.org/doc/effective_go.html#package-names

- Reorganize the helpers in main so control flow is easier to follow.

- Add documentation comments.
2019-06-01 18:07:27 -07:00
Carlos Tadeu Panato Junior
e16e5ca533 Better aligment (#17) 2019-06-02 00:03:23 +02:00
Kevin E Rad
64a70580db Adding windows support (#22) 2019-06-02 00:02:45 +02:00
Ferry Schuller
b790c569ab Update README.md (#12)
Tested Bittrex and Poloniex.
v1.0
2018-01-10 00:59:40 -08:00
Pierre Carrier
a2c540ca03 README.md: add Okta
Reported by E-mail by Bryan Baldwin.
2016-06-11 17:23:17 -04:00
Pierre Carrier
65ebfe1593 newline after terminal.ReadPassword
Closes issue #5.
2015-12-07 21:21:31 +00:00
Pierre Carrier
4a613d0cf2 Merge pull request #4 from pcarrier/travis_10_to_15
.travis.yml: test all go releases
2015-12-03 10:35:23 -08:00
Pierre Carrier
f9b7c97790 .travis.yml: use containers 2015-12-03 18:33:32 +00:00
Pierre Carrier
836cbf8a9e .travis.yml: test all go releases 2015-12-03 18:30:41 +00:00
Pierre Carrier
a5285a1f82 Merge pull request #3 from pcarrier/issues/2
fix encryption
2015-12-03 10:28:27 -08:00
Pierre Carrier
08c36af51e fix encryption
- moving to crypto/ssh/terminal, which should also work on Windows
  and be better maintained (code.google.com is going away)
- fix support for padding

Closes #2.
2015-12-03 18:21:57 +00:00
Pierre Carrier
5aec87c162 README.md: sort services 2015-10-29 12:30:44 -07:00
Pierre Carrier
4f1ac28963 Merge pull request #1 from solomon56/master
Added PKGBUILD for AUR on Archlinux
2014-12-15 23:46:24 -08:00
Solomon
b6f80c6c62 Added PKGBUILD for AUR on Archlinux 2014-10-16 22:16:21 -07:00
Pierre Carrier
637db4f567 README.md: add build status 2014-02-26 20:15:38 -08:00
Pierre Carrier
bc0fc1991e fix for travis complaint 2014-02-26 20:12:10 -08:00
Pierre Carrier
2bab16649c add .travis.yml 2014-02-26 20:10:06 -08:00
Pierre Carrier
88535c8fbe support for encryption 2013-11-21 19:17:19 -08:00
Pierre Carrier
5d5993dd8a README: compatibility list 2013-11-20 01:47:07 -08:00
Pierre Carrier
9821a5e692 README.md cleanup, time to sleep 2013-11-14 15:28:16 -08:00
Pierre Carrier
c3407fc375 justify myself in README.md 2013-11-14 03:18:38 -08:00
Pierre Carrier
efee605b1d move to CSV
Preserves order, easier to maintain, more Unixy, less error-prone.
Sorry if you have to migrate.
2013-11-14 03:18:38 -08:00