| Age | Commit message (Collapse) | Author |
|
The "share" module has been moved to moved from github, to sourcehut.
|
|
The lib/crypto.LoadPrivateKeyInteractive provides a simple way to read
passphrase from stdin that also support SSH_ASKPASS.
While at it, add test for Cli with passphrase.
|
|
Instead of prompting user, make the private key static, located at
"$XDG_CONFIG_DIR/gotp/gotp.key".
Implements: https://todo.sr.ht/~shulhan/gotp/1
|
|
By unfolding, user can set the path to private key using "~" that points
to their home.
This make the key can works across home directory, in case user have
multiple homes (Linux and macOS have different home path and maybe
user name, but both can use "~" as substitution for $HOME)
|
|
In case the configuration use private key with passphrase, the bash
completion will hang due to the command ask for passphrase.
This changes fix this issue by loading private key only when doing add,
generate, import, or remote-private-key.
|
|
If the file is not set, do nothing.
|
|
The MarshalText convert the config object back to INI format.
|
|
This changes require the loadPrivateKey method detached from Cli and
become function.
|
|
The loadConfig load the configuration from raw bytes.
This replace part of newConfig with loadConfig to minimize duplicate.
The idea of loadConfig is to simplify testing later.
|
|
Changes,
* Replace variable declaration ":=" using explicit one
* Use raw string literal whenever possible
* Realign struct Config from 56 to 40 bytes (-16 bytes)
* Realign struct Issuer from 88 to 72 bytes (-16 bytes)
|
|
See https://kilabit.info/journal/2022/gpl/ for more information.
|
|
The gotp currently has the following features,
* add: add new TOTP issuer with their label and secret
* gen: generate password
* import: import TOTP from other provider, currently support Aegis
* list: print all registered TOTP configuration by labels
* remove: delete a TOTP configuration from file by label
* rename: changes the TOTP configuration by its label
|