]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/test-country.c
Implement signing/verifying databases
[people/ms/libloc.git] / src / test-country.c
index 2f2bd986cc106b6b450ee279d964917c9a365b38..43836956d4d24677bb71f1a095aac0ed0423bb63 100644 (file)
@@ -49,7 +49,7 @@ int main(int argc, char** argv) {
 
        // Create a database
        struct loc_writer* writer;
-       err = loc_writer_new(ctx, &writer);
+       err = loc_writer_new(ctx, &writer, NULL);
        if (err < 0)
                exit(EXIT_FAILURE);
 
@@ -75,7 +75,7 @@ int main(int argc, char** argv) {
        }
        loc_country_unref(country);
 
-       FILE* f = fopen("test.db", "w");
+       FILE* f = fopen("test.db", "w+");
        if (!f) {
                fprintf(stderr, "Could not open file for writing: %s\n", strerror(errno));
                exit(EXIT_FAILURE);