]> granicus.if.org Git - p11-kit/commitdiff
trust: Prefer parsing the persist format to PEM
authorStef Walter <stef@thewalter.net>
Tue, 27 Aug 2013 19:37:29 +0000 (21:37 +0200)
committerStef Walter <stef@thewalter.net>
Wed, 28 Aug 2013 19:51:37 +0000 (21:51 +0200)
This is because the persist format contains PEM, and if the PEM
parser gets it first, then it'll ignore the other non PEM data.

trust/token.c

index 8670ff4818d7c9842758a114c24172a0e94cb0e5..cfcdba69322c31efab80befe333e5c24de7713b0 100644 (file)
@@ -748,8 +748,8 @@ p11_token_new (CK_SLOT_ID slot,
 
        token->parser = p11_parser_new (p11_builder_get_cache (token->builder));
        return_val_if_fail (token->parser != NULL, NULL);
-       p11_parser_formats (token->parser, p11_parser_format_pem,
-                           p11_parser_format_x509, p11_parser_format_persist, NULL);
+       p11_parser_formats (token->parser, p11_parser_format_persist,
+                           p11_parser_format_pem, p11_parser_format_x509, NULL);
 
        token->loaded = p11_dict_new (p11_dict_str_hash, p11_dict_str_equal, free, free);
        return_val_if_fail (token->loaded != NULL, NULL);