| Age | Commit message (Collapse) | Author |
|
|
|
The "share" project has been moved to SourceHut with new name
"pakakeh.go".
|
|
Although log print to stderr, this allow user to filter between awwan
output and command output, for example by piping stderr to /dev/null
$ awwan env-get "key" dir/ 2>/dev/null
The output env-get is not poluted by other logs.
|
|
Using vim, or UNIX in general, the file always end with "\n".
If we read the whole file then the passphrase will end with it, this
cause the decryption may fail (or wrong encryption passphrase used).
|
|
In the environment where passphrase cannot be inputted manually, for
example, automatic integration or deployment, we need some mechanism
where awwan can be executed to copy or decrypt the encrypted file.
The option is by reading plain passphrase from file named "awwan.pass"
inside the ".ssh" directory.
If its exists and not empty, awwan will not prompt for passphrase from
terminal, instead use the content of that file as passhprase.
|
|
This is to minimize log length in stdout and stderr, which make it
more readable.
|
|
Using hidden file (with "." prefix in name) cluttering the workspace
directory.
Since we already have ".ssh" as indicator of workspace, we should use it,
the same principal that ~/.ssh/ store user's private key.
|
|
The cryptoContext contains the default hash, loaded privateKey, dummy
terminal, base directory, and default label; all of those fields are
required for encryption and decryption.
The cryptoContext have three methods: encrypt, decrypt, and
loadPrivateKey.
By moving to separate struct the cryptoContext instance can be shared
with Session.
|