commit 8eb3464d70f61342965f27db47e0725da3258257
parent 41c80cf5ab22d3c204a0289df9e3c3a3297c5f28
Author: lash <dev@holbrook.no>
Date: Sun, 30 Mar 2025 15:34:04 +0100
Reinstate all crypto tests
Diffstat:
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/crypto/gcrypt.c b/src/crypto/gcrypt.c
@@ -57,7 +57,7 @@ const static char gpg_fingerprint_zero[LQ_FP_LEN];
const static char gpg_default_store_key;
-const static LQStore *gpg_key_store;
+static LQStore *gpg_key_store;
/**
* Verifies that installed gpg version is supported.
@@ -354,8 +354,8 @@ static int key_create(struct gpg_store *gpg) {
// set in the configuration.
// Caller must free it.
LQStore *key_store_get() {
- int r;
- char *p;
+// int r;
+// char *p;
// r = lq_config_get(gpg_cfg_idx_dir, (void**)&p);
// if (r) {
@@ -944,7 +944,7 @@ size_t lq_publickey_fingerprint(LQPubKey* pubk, char **out) {
}
void lq_crypto_free() {
- lq_free(gpg_key_store);
+ lq_free((void*)gpg_key_store);
}
#endif
diff --git a/src/store/mem.c b/src/store/mem.c
@@ -90,7 +90,7 @@ int lq_mem_content_get(enum payload_e typ, LQStore *store, const char *key, size
}
int lq_mem_content_put(enum payload_e typ, LQStore *store, const char *key, size_t *key_len, char *value, size_t value_len) {
- char *r;
+ const char *r;
struct hashmap *o;
struct pair_t v;
char path[LQ_PATH_MAX];
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
@@ -159,12 +159,12 @@ Suite * common_suite(void) {
s = suite_create("crypto");
tc = tcase_create("file");
-// tcase_add_test(tc, check_digest);
-// tcase_add_test(tc, check_privatekey);
-// tcase_add_test(tc, check_publickey);
-// tcase_add_test(tc, check_signature);
-// tcase_add_test(tc, check_verify);
-// tcase_add_test(tc, check_create_load);
+ tcase_add_test(tc, check_digest);
+ tcase_add_test(tc, check_privatekey);
+ tcase_add_test(tc, check_publickey);
+ tcase_add_test(tc, check_signature);
+ tcase_add_test(tc, check_verify);
+ tcase_add_test(tc, check_create_load);
tcase_add_test(tc, check_load_specific);
suite_add_tcase(s, tc);