17 meshlink_set_log_cb(NULL, MESHLINK_DEBUG, log_cb);
19 // Open a new meshlink instance.
21 assert(meshlink_destroy("encrypted_conf"));
22 meshlink_handle_t *mesh = meshlink_open_encrypted("encrypted_conf", "foo", "encrypted", DEV_CLASS_BACKBONE, "right", 5);
25 // Close the mesh and open it again, now with a different key.
29 mesh = meshlink_open_encrypted("encrypted_conf", "foo", "encrypted", DEV_CLASS_BACKBONE, "wrong", 5);
32 // Open it again, now with the right key.
34 mesh = meshlink_open_encrypted("encrypted_conf", "foo", "encrypted", DEV_CLASS_BACKBONE, "right", 5);
43 assert(meshlink_destroy("encrypted_conf"));
45 DIR *dir = opendir("encrypted_conf");
49 while((ent = readdir(dir))) {
50 fprintf(stderr, "%s\n", ent->d_name);
51 assert(!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, ".."));