summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-11-11Release gotp v0.4.0 (2023-11-11)v0.4.0Shulhan
=== New features * all: implement command "get" The "get" command get and print the issuer by its LABEL. This will print the issuer secret, unencrypted. === Enhancements * all: unfold private key path before reading 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) * Makefile: add task to install and uninstall gotp in macOS
2023-11-11go.mod: update all dependenciesShulhan
2023-10-09Makefile: add task to install and uninstall gotp in macOSShulhan
2023-10-06all: convert the issuer's label to lowercase in NewIssuerShulhan
2023-10-06all: implement command "get"Shulhan
The "get" command get and print the issuer by its LABEL. This will print the issuer secret, unencrypted.
2023-10-06all: pass the configuration directory parameter to NewCliShulhan
Previously, the configuration directory initialized inside NewCli. This changes we make the NewCli accept the config directory so we can changes it during testing.
2023-10-06all: add task linter and fix all warningsShulhan
We use revive [1], fieldalignment [2], and shadow [3] as linters. [1] https://github.com/mgechev/revive [2] https://pkg.go.dev/golang.org/x/tools@v0.13.0/go/analysis/passes/fieldalignment/cmd/fieldalignment [3] https://pkg.go.dev/golang.org/x/tools@v0.13.0/go/analysis/passes/shadow/cmd/shadow
2023-10-06all: replace encrypt and decryption functions from "lib/crypto"Shulhan
The "lib/crypto" DecryptAoep and EncryptAoep support large message.
2023-10-06all: unfold private key path before readingShulhan
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)
2023-05-25Release gotp v0.3.1 (2023-05-25)v0.3.1Shulhan
=== Bug fix * all: load private key only when needed 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.
2023-05-19all: load private key only when neededShulhan
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.
2023-05-18Release gotp v0.3.0 (2023-05-17)v0.3.0Shulhan
=== New features * all: add command to remove the private key * all: add command to set private key === Chores * all: update Go version to 1.19 and all dependencies
2023-05-16all: add command to remove the private keyShulhan
The remove-private-key decrypt the issuer's value back using previous private key and store it back to file as plain text.
2023-05-16all: add command to set private keyShulhan
The set-private-key command encrypt the issuer's value (hash:secret...) in the file using private key. The supported private key is RSA.
2023-05-15all: check for zero file on config saveShulhan
If the file is not set, do nothing.
2023-05-15all: add method MarshalText to configShulhan
The MarshalText convert the config object back to INI format.
2023-05-15all: group the key for testing into testdata/keysShulhan
2023-05-15all: load the private key in loadConfigShulhan
This changes require the loadPrivateKey method detached from Cli and become function.
2023-05-15all: add function loadConfigShulhan
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.
2023-05-15all: remove setting Version in Makefile using ldflagsShulhan
Use the constant Version instead, no need to automate this. While at it, fix the test coverage HTML output file name.
2023-05-15all: update Go version to 1.19 and all dependenciesShulhan
2023-05-15all: convert the README from asciidoc to markdownShulhan
I use two remote repositories: GitHub and SourceHut. GitHub support rendering README using asciidoc while SourceHut not. This cause the repository that use README.adoc rendered as text in SourceHut which make the repository page less readable. Also, the pkg.go.dev now render README but only support Markdown. Since we cannot control the SourceHut and go.dev, the only option is to support converting Markdown in ciigo so I can write README using Markdown and the rest of documentation using Asciidoc.
2023-02-13Release gotp v0.2.3 (2023-02-12)v0.2.3Shulhan
=== Enhancements * all: add bash completion script === Chores * all: move the installation steps in AUR to Makefile * make: change the build and install directory The build task now create binary under _sys/usr/bin/, while the install task install the binary based on $DESTDIR environment variable, not $GOBIN.
2023-02-12go.mod: update all dependenciesShulhan
2022-09-18all: add bash completion scriptShulhan
2022-09-18all: move the installation steps in AUR to Makefile.Shulhan
2022-09-18make: change the build and install directoryShulhan
The build task now create binary under _sys/usr/bin/, while the install task install the binary based on $DESTDIR environment variable, not $GOBIN.
2022-09-06Release gotp v0.2.2 (2022-09-06)v0.2.2Shulhan
=== Bug fix * all: fix the go:embed reference to symbolic link === Chores * all: add task to serve and preview the documentation at _doc * all: group all documents into directory _doc
2022-09-06all: add task to serve and preview the documentation at _docShulhan
2022-09-06go.mod: update all dependenciesShulhan
2022-08-27all: fix the go:embed reference to symbolic linkShulhan
Due to previous commit, where we rename the README.adoc to README, and change it to symbolic link, the build then failed when doing go:embed.
2022-08-25all: group all documents into directory _docShulhan
2022-08-07Release gotp v0.2.1 (2022-08-07)v0.2.1Shulhan
=== Bug fixes * all: fix base32 decoding on secret === Chores * _AUR: add package build for Arch Linux * go.mod: set minimum Go version to 1.18 and update all modules
2022-08-07_AUR: add package build for Arch LinuxShulhan
This package build the gotp based on the latest tag and commit.
2022-08-07cmd/gotp: add the documentation for command gotpShulhan
2022-08-07all: replace golang.org/x/crypto/ssh/terminal with golang.org/x/termShulhan
The golang.org/x/crypto/ssh/terminal has been deprecated.
2022-08-07cmd/gotp: add subcommand "version"Shulhan
The "version" command print the module version based on the latest tag, with additional commit number and hash.
2022-08-07go.mod: set minimum Go version to 1.18 and update all modulesShulhan
The 1.17 has been deprecated since the release of 1.19. This update affect the test cases on Cli.
2022-08-07all: generate coverage when running testsShulhan
2022-08-07all: clean up codeShulhan
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)
2022-08-06all: fix base32 decoding on secretShulhan
The base32 decoding should be without padding otherwise it will return an error (for some base32 string): illegal base32 data at input byte 48
2022-03-14Release gotp v0.2.0 (2022-03-14)v0.2.0Shulhan
Release gotp under GPL 3.0 or later. See https://kilabit.info/journal/2022/gpl/ for more information.
2022-03-14all: re-licensing gotp under GPL-3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl/ for more information.
2022-03-14go.mod: update all dependenciesShulhan
2022-02-08Release gotp v0.1.0 (2022-02-08)v0.1.0Shulhan
The first release of gotp, a command line interface to manage and generate Time-based One Time Password (TOTP). Features, * Add a TOTP secret identified by unique LABEL. * Generate N number passwords using the secret identified by LABEL. * Import the TOTP configuration from other provider. Currently, the only supported PROVIDER is Aegis and the supported file is .txt. * List all labels stored in the configuration. * Remove LABEL from configuration. * Rename a LABEL into NEW-LABEL. * Encrypted secret using RSA based private key.
2022-02-08go.mod: update share moduleShulhan
This update make the configuration file sort the issuer by label, in ascending order. So, any "add" or "remove" that may changes the configuration will not reorder all labels.
2022-02-08Makefile: set the CGO_ENABLED to 1 on go test commandShulhan
In case user set the CGO_ENABLED environment to 0, running "make all" will fail with the following error: go: -race requires cgo; enable cgo by setting CGO_ENABLED=1
2021-10-27gotp: command line interface for Time-based One Time Password (TOTP)Shulhan
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