16 meshlink_set_log_cb(NULL, MESHLINK_DEBUG, log_cb);
18 // Open a new meshlink instance.
20 assert(meshlink_destroy("encrypted_conf"));
21 meshlink_handle_t *mesh = meshlink_open_encrypted("encrypted_conf", "foo", "encrypted", DEV_CLASS_BACKBONE, "right", 5);
24 // Close the mesh and open it again, now with a different key.
28 mesh = meshlink_open_encrypted("encrypted_conf", "foo", "encrypted", DEV_CLASS_BACKBONE, "wrong", 5);
31 // Open it again, now with the right key.
33 mesh = meshlink_open_encrypted("encrypted_conf", "foo", "encrypted", DEV_CLASS_BACKBONE, "right", 5);
42 assert(meshlink_destroy("encrypted_conf"));
43 assert(access("encrypted_conf", F_OK) == -1 && errno == ENOENT);