12 meshlink_set_log_cb(NULL, MESHLINK_DEBUG, log_cb);
14 // Open a new meshlink instance.
16 assert(meshlink_destroy("encrypted_conf"));
17 meshlink_handle_t *mesh = meshlink_open_encrypted("encrypted_conf", "foo", "encrypted", DEV_CLASS_BACKBONE, "right", 5);
20 // Close the mesh and open it again, now with a different key.
24 mesh = meshlink_open_encrypted("encrypted_conf", "foo", "encrypted", DEV_CLASS_BACKBONE, "wrong", 5);
27 // Open it again, now with the right key.
29 mesh = meshlink_open_encrypted("encrypted_conf", "foo", "encrypted", DEV_CLASS_BACKBONE, "right", 5);
38 assert(meshlink_destroy("encrypted_conf"));
39 assert(access("encrypted_conf", F_OK) == -1 && errno == ENOENT);