safe

Password protected secret keeper
git clone git://git.z3bra.org/safe.git
Log | Files | Refs | README | LICENSE

commit 69ffa57a1da9f61a17c3b08b4958c486cbcaa45b
parent 5b1b2e8e67f4e3a59fc95af9d9036600d6900cc3
Author: Willy Goiffon <dev@z3bra.org>
Date:   Tue,  4 Jun 2019 14:52:15 +0200

Remove secret_exists()

Diffstat:
safe.c | 19-------------------
1 file changed, 0 insertions(+), 19 deletions(-)

diff --git a/safe.c b/safe.c @@ -159,20 +159,6 @@ xdecrypt(struct safe *s, uint8_t *c, size_t clen, uint8_t *m, unsigned long long } int -secret_exists(const char *secret) -{ - struct stat sb; - - if (!stat(secret, &sb)) - return 1; - - if (errno == ENOENT) - return 0; - - err(1, "stat: %s", secret); -} - -int readpass(const char *prompt, uint8_t **target, size_t *len) { char pass[BUFSIZ], *p; @@ -439,11 +425,6 @@ main(int argc, char *argv[]) deriv((char *)passphrase, &s); } - if (secret_exists(MASTER) && check_master(&s) < 0) { - fprintf(stderr, "master password incorrect\n"); - return -1; - } - if (dflag) return agent(&s, sockp);