sigchk

sign and check files using ed25519
git clone git://z3bra.org/sick
Log | Files | Refs | Submodules | README | LICENSE

commit be05c7998b1e7b6c601aef8d9728939fdc0a0ddb
parent 8b077cdef13a6abd89c5c7e534ff6863ffd7ca0c
Author: z3bra <willyatmailoodotorg>
Date:   Thu Apr 28 21:55:18 2016

Rename function names

Diffstat:
 sick.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sick.c b/sick.c @@ -30,8 +30,8 @@ enum { void usage(char *name); char *base_name(char *path); -unsigned char *readsig(char *file); -int genkey(char *alias); +unsigned char *read_sig(char *file); +int keygen(char *alias); int sign(char *file, char *key); int verify(char *file, char *key); int check(char *file, char *keyring); @@ -53,7 +53,7 @@ base_name(char *path) } unsigned char * -readsig(char *file) +read_sig(char *file) { int fd = 0; struct stat sb; @@ -76,8 +76,9 @@ readsig(char *file) return sig; } + int -genkey(char *alias) +keygen(char *alias) { int fd = 0; size_t len = 0; @@ -193,7 +194,7 @@ verify(char *file, char *key) char *base = NULL; unsigned char sig[64], pub[PRIVSIZ], *msg = NULL; - memcpy(sig, readsig(file), 64); + memcpy(sig, read_sig(file), 64); /* read the content of the public key into the pub[] buffer */ fd = open(key, O_RDONLY); @@ -299,7 +300,7 @@ main(int argc, char **argv) } break; case ACTION_GENKEY: - genkey(key); + keygen(key); break; case ACTION_SIGN: /* TODO: only check the pubkey matchng the private */