Integrate vault into build process

Right now it's still not used, but integrated into the build process
anyways.
This commit is contained in:
Johannes Bauer 2019-10-25 16:16:13 +02:00
parent 17d1b9a52d
commit 6ac94dbd83
2 changed files with 5 additions and 4 deletions

View File

@ -32,7 +32,8 @@ OBJS := \
thread.o \
udp.o \
util.o \
uuid.o
uuid.o \
vault.o
parsers:
$(PYPGMOPTS) -n edit parsers/parser_edit.py

View File

@ -152,7 +152,7 @@ bool vault_open(struct vault_t *vault) {
break;
}
if (EVP_DecryptFinal_ex(ctx, vault->data + len, &len) != 1) {
if (EVP_DecryptFinal_ex(ctx, (uint8_t*)vault->data + len, &len) != 1) {
success = false;
break;
}
@ -220,7 +220,7 @@ bool vault_close(struct vault_t *vault) {
break;
}
if (EVP_EncryptFinal_ex(ctx, vault->data + len, &len) != 1) {
if (EVP_EncryptFinal_ex(ctx, (uint8_t*)vault->data + len, &len) != 1) {
success = false;
break;
}
@ -250,7 +250,7 @@ void vault_free(struct vault_t *vault) {
free(vault);
}
#ifndef __TEST_VAULT__
#ifdef __TEST_VAULT__
static void dump(const uint8_t *data, unsigned int length) {
for (unsigned int i = 0; i < length; i++) {