]> granicus.if.org Git - p11-kit/commitdiff
trust: Continue parsing if the file cannot be read as persist format
authorDaiki Ueno <dueno@redhat.com>
Tue, 25 Dec 2018 07:32:19 +0000 (08:32 +0100)
committerDaiki Ueno <ueno@gnu.org>
Fri, 4 Jan 2019 14:12:04 +0000 (15:12 +0100)
A corrupted file that contains "[p11-kit-object-v1]" can be a valid
PEM certs file.  Continue with the next format if it cannot be read as
a persistent format.

trust/parser.c

index e912c3adcbbe2ffc8270947eb5aeece9e5482f39..e84e47cc740e04fffd27a7b0a944fe524d8e175c 100644 (file)
@@ -639,7 +639,7 @@ p11_parser_format_persist (p11_parser *parser,
        }
 
        p11_array_free (objects);
-       return ret ? P11_PARSE_SUCCESS : P11_PARSE_FAILURE;
+       return ret ? P11_PARSE_SUCCESS : P11_PARSE_UNRECOGNIZED;
 }
 
 p11_parser *