summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2021-11-03 13:30:57 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2021-11-03 13:30:57 +0000
commitcdfa0d0bbc5bd8c2b782c5ce93fd6ce370bf39c1 (patch)
tree010a73721c5f2abe73a42c2bcce788ae059061e8
parentb02fbcd4408696ebe1342bea772b658c94404b25 (diff)
Print the name of the non conforming attribute in the XML parse error.
OK beck@
-rw-r--r--usr.sbin/rpki-client/rrdp_delta.c6
-rw-r--r--usr.sbin/rpki-client/rrdp_snapshot.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/rpki-client/rrdp_delta.c b/usr.sbin/rpki-client/rrdp_delta.c
index 450e6667e74..797c7588ad4 100644
--- a/usr.sbin/rpki-client/rrdp_delta.c
+++ b/usr.sbin/rpki-client/rrdp_delta.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rrdp_delta.c,v 1.4 2021/10/28 11:57:00 claudio Exp $ */
+/* $OpenBSD: rrdp_delta.c,v 1.5 2021/11/03 13:30:56 claudio Exp $ */
/*
* Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com>
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
@@ -87,7 +87,7 @@ start_delta_elem(struct delta_xml *dxml, const char **attr)
continue;
}
PARSE_FAIL(p, "parse failed - non conforming "
- "attribute found in delta elem");
+ "attribute '%s' found in delta elem", attr[i]);
}
if (!(has_xmlns && dxml->version && dxml->session_id && dxml->serial))
PARSE_FAIL(p, "parse failed - incomplete delta attributes");
@@ -136,7 +136,7 @@ start_publish_withdraw_elem(struct delta_xml *dxml, const char **attr,
continue;
}
PARSE_FAIL(p, "parse failed - non conforming "
- "attribute found in publish/withdraw elem");
+ "attribute '%s' found in publish/withdraw elem", attr[i]);
}
if (hasUri != 1)
PARSE_FAIL(p,
diff --git a/usr.sbin/rpki-client/rrdp_snapshot.c b/usr.sbin/rpki-client/rrdp_snapshot.c
index 4b4e062ffd7..e7d648f5f97 100644
--- a/usr.sbin/rpki-client/rrdp_snapshot.c
+++ b/usr.sbin/rpki-client/rrdp_snapshot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rrdp_snapshot.c,v 1.3 2021/10/28 11:57:00 claudio Exp $ */
+/* $OpenBSD: rrdp_snapshot.c,v 1.4 2021/11/03 13:30:56 claudio Exp $ */
/*
* Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com>
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
@@ -80,7 +80,7 @@ start_snapshot_elem(struct snapshot_xml *sxml, const char **attr)
}
PARSE_FAIL(p,
"parse failed - non conforming "
- "attribute found in snapshot elem");
+ "attribute '%s' found in snapshot elem", attr[i]);
}
if (!(has_xmlns && sxml->version && sxml->session_id && sxml->serial))
PARSE_FAIL(p,