Carlos Torres
|
4ef36ca
|
Add behavioral test setup and sleep timer
Setup before and after Ginkgo hooks to cleanup the test
environment. The hooks will write a nil byte slice to the system
clipboard, thus preventing any Pasy instance from running before or
after the suite.
A sleep timer was also added before reading from the clipboard when
testing the 'clip' command, as it may take a few milliseconds for the
buffer to update.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
5 months ago
|
1
|
+8/-0
|
Carlos Torres
|
b161639
|
Add Behavior tests
Introduce a behavioral test suite in order to validate Pasy usage as
an artifact.
The suite is structured through the Ginkgo framework and matcher
library. It checks every command currently implemented on Pasy,
as well as its output, that is, when there is any.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
5 months ago
|
3
|
+231/-1
|
Carlos Torres
|
3c90118
|
Update Readme
Include details about the 'clip' command and break the command
description paragraph in two.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
5 months ago
|
1
|
+15/-8
|
Carlos Torres
|
41a1c81
|
Add password clipping functionality
In this commit Pasy gains the functionality of copying a decrypted
password into the system's clipboard. This is an alternative to the
'show' command, which doesn't directly displays the password.
The command will block while the buffer contains the credential,
exiting after a 5 minutes timeout or when it's overwritten.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
5 months ago
|
4
|
+128/-0
|
Carlos Torres
|
9fab77b
|
Update Readme
Include a usage example with pipe input.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
5 months ago
|
1
|
+4/-0
|
Carlos Torres
|
1dcd318
|
Permit pipe input for the encrypting passphrase
When invoking the 'term.ReadPassword' function, a Tty Ioctl syscall is
invoked to get the Tty properties. This will fail on non Tty devices
such as pipes, which are expected to work with Pasy.
The error is 'ENOTTY', whose description is 'inappropriate ioctl
for device'.
This commit adds an input device check before attempting to read the
passphrase, and the correct handling of pipe devices as well.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
5 months ago
|
1
|
+22/-9
|
Carlos Torres
|
c9090d9
|
Include program version with each record
Pasy will likely increase its encryption processing parameters in the
future to keep up with hardware advances, but this will cause existing
hashes to not be directly compatible.
For this reason, password hashes now include the Pasy's major version,
allowing future changes to be detected and dealt with.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
5 months ago
|
3
|
+18/-7
|
Carlos Torres
|
0797d43
|
Add Readme
Include a Readme file to introduce and document general aspects of
the project.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
5 months ago
|
1
|
+116/-0
|
Carlos Torres
|
8ad61ca
|
Improve function documentation
Reword the documenting comment for the 'readPassword' function to be
more clear.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
1
|
+1/-1
|
Carlos Torres
|
0c2d01a
|
Refactor help message
Pasy's help message used to be generated by Mitchellh's Cli library.
This commit introduces its own function to generate the message,
which includes the short version of the help and version flags,
as well as a smaller indent.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
2
|
+44/-2
|
Carlos Torres
|
5331c43
|
Refactor error handling
Error messages contains the "error" prefix, which was previously
written manually on every output, together with other repetitive
elements, such as the Stderr buffer and a line break.
This commit groups those parameters into a dedicate function, thus
decreasing the redundancy.
Furthermore, the 'name.go' file was also renamed to reflect the nature
of its new contents.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
9
|
+36/-27
|
Carlos Torres
|
7b5a49a
|
Remove empty line from license file
One change commit to remove an empty line on the bottom of the license
file.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
1
|
+0/-1
|
Carlos Torres
|
c051024
|
Add help output to each command
Every Pasy command can also be invoked with the '-h' flag, which will
now print command specific help messages. The output is wrapped at 80
columns for readability.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
5
|
+44/-17
|
Carlos Torres
|
d691fde
|
Refactor command argument input
Changes:
- Add argument count checks for each command;
- Move password input block to dedicated function;
When reading a password from Stdin, the function 'readPassword' can be
used. This way both the 'add' and 'show' command will read credentials
in a unified manner.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
6
|
+72/-15
|
Carlos Torres
|
63315ea
|
Refactor main
Changes:
- Move the command and argument list 'CLI' setting within its
instantiation;
- Replace log printer with 'fmt';
- Make help messages be print to Stdout;
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
1
|
+11/-10
|
Carlos Torres
|
35e2d0a
|
Fix command initialization functions
A bug derived from checking the amount of arguments for each command on
the initialization function was preventing other invocations of it, such
in conjunction with the help flag.
This commit removes those checks, later to be added on the 'Run'
function.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
5
|
+12/-33
|
Carlos Torres
|
b46961a
|
Add tests for local 'crypto' package
Include unit tests for the functions 'randBytes', 'key', 'encrypt' and
'decrypt', as well as an integration test for the functions
'EncryptPass' and 'DecryptPass'.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
1
|
+549/-0
|
Carlos Torres
|
d50eae1
|
Tweak Argon2 parameters
Increase the amount of memory passes during key derivation in
acknowledgement of Alwen-Blocki attacks. The memory amount has been
reduced in half as a performance trade off, but still 4 times larger
than the recommended amount.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
1
|
+3/-3
|
Carlos Torres
|
71ae8d1
|
Prevent superfluous store writes on 'remove' calls
Currently, the 'store.Remove' function will write the loaded records
back to the data file even if nothing has changed on them.
This commit prevents this from happening by checking for changes before
writing, what decreases the amount of steps the program goes through
when trying to remove non existing records.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
1
|
+6/-1
|
Carlos Torres
|
5ba9c6e
|
Add source documentation
Introduce source code documentation for identifiers such as functions,
constants and variables, as well as packages.
Signed-off-by: Carlos Torres <torr@disroot.org>
|
1 year ago
|
11
|
+128/-3
|