]> granicus.if.org Git - p11-kit/commitdiff
trust: Support token directory paths in user's home directory
authorStef Walter <stef@thewalter.net>
Mon, 8 Jul 2013 16:30:16 +0000 (18:30 +0200)
committerStef Walter <stef@thewalter.net>
Mon, 8 Jul 2013 16:30:16 +0000 (18:30 +0200)
trust/module.c
trust/token.c

index d2fcba688bd13773286d11eff26b05f5fdf69d6c..25a72b7b44be5c04d8a6f761316f5ec10b44fcdc 100644 (file)
@@ -195,6 +195,7 @@ create_tokens_inlock (p11_array *tokens,
                const char *prefix;
                const char *label;
        } labels[] = {
+               { "~/", "User Trust" },
                { DATADIR, "Default Trust" },
                { SYSCONFDIR, "System Trust" },
                { NULL },
index 77ff73995b5379209ac03bc8b39ca973b5f14ba2..ca24762c582a1735354a2c99e06c7ac3368adf9c 100644 (file)
@@ -643,7 +643,7 @@ p11_token_new (CK_SLOT_ID slot,
        token->loaded = p11_dict_new (p11_dict_str_hash, p11_dict_str_equal, free, free);
        return_val_if_fail (token->loaded != NULL, NULL);
 
-       token->path = strdup (path);
+       token->path = p11_path_expand (path);
        return_val_if_fail (token->path != NULL, NULL);
 
        token->anchors = p11_path_build (token->path, "anchors", NULL);