9 Commits

Author SHA1 Message Date
Pierre Carrier
9adade7502
upgrade deps, clean up (#83) 2025-02-07 23:48:54 +01:00
M. J. Fromberger
687b44867e Update module dependencies.
- github.com/creachadair/otp to v0.4.0
- golang.org/x/crypto to v0.1.0
- Update go mod vendor
- Update gofmt (changes from 1.19)
- Update CI configuration.
- Fix CI status badge.

No functional changes.
2022-11-07 17:27:16 -05:00
Pierre Carrier
7977410aa3 go.mod: upgrade deps
```
$ go get -u ./...
$ go mod tidy
```
2022-07-03 21:46:12 +02: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
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
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
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
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
M. J. Fromberger
0d0c6c886e Add go.mod and go.sum files to support Go modules. 2019-06-01 18:07:27 -07:00