hx509: Show query expression parse errors

This commit is contained in:
Nicolas Williams
2019-11-07 21:47:54 -06:00
parent a40d4056bd
commit 4500a14f95
3 changed files with 22 additions and 6 deletions

View File

@@ -2873,9 +2873,9 @@ acert(struct acert_options *opt, int argc, char **argv)
hx509_query *q = NULL;
if (opt->expr_string) {
if ((ret = hx509_query_alloc(context, &q)))
if ((ret = hx509_query_alloc(context, &q)) ||
(ret = hx509_query_match_expr(context, q, opt->expr_string)))
hx509_err(context, 1, ret, "Could not initialize query");
hx509_query_match_expr(context, q, opt->expr_string);
if ((ret = hx509_certs_find(context, certs, q, &cert)) || !cert)
hx509_err(context, 1, ret, "No matching certificate");
ret = acert1(opt, -1, cert, &matched);