mirror of https://github.com/ericonr/get-otp.git
Install cbc-file in bin.
Allows it to be used as a system utility.
This commit is contained in:
parent
2075f4b4d2
commit
cb41214e59
|
@ -36,7 +36,7 @@ $ encrypt-otp otp_accounts.json
|
|||
|
||||
## cbc-file
|
||||
|
||||
Hidden utility, does the encryption magic. Despite the name, uses
|
||||
Mostly hidden utility, does the encryption magic. Despite the name, uses
|
||||
[ChaCha20+Poly1305](https://tools.ietf.org/html/rfc7539) for encryption, as
|
||||
implemented by [BearSSL](https://www.bearssl.org/), together with
|
||||
[argon2](https://github.com/p-h-c/phc-winner-argon2) for key derivation.
|
||||
|
|
|
@ -7,7 +7,7 @@ if [ ! -e "$file" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if @PREFIX@/libexec/cbc-file lock "$file" > "$dest"; then
|
||||
if @PREFIX@/bin/cbc-file lock "$file" > "$dest"; then
|
||||
echo "'$dest' successfully generated!"
|
||||
exit 0
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
file="${OTP_ACCOUNTS:-$HOME/.local/share/otp_accounts}"
|
||||
json="$(@PREFIX@/libexec/cbc-file unlock "$file")"
|
||||
json="$(@PREFIX@/bin/cbc-file unlock "$file")"
|
||||
[ -z "$json" ] && exit 1
|
||||
|
||||
label="$(printf %s "$json" |
|
||||
|
|
3
makefile
3
makefile
|
@ -14,8 +14,7 @@ encrypt-otp: encrypt-otp.in
|
|||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/libexec
|
||||
install -Dm755 cbc-file $(DESTDIR)$(PREFIX)/libexec/
|
||||
install -Dm755 cbc-file $(DESTDIR)$(PREFIX)/bin/
|
||||
install -Dm755 get-otp $(DESTDIR)$(PREFIX)/bin/
|
||||
install -Dm755 encrypt-otp $(DESTDIR)$(PREFIX)/bin/
|
||||
|
||||
|
|
Loading…
Reference in New Issue