Index | Thread | Search

From:
Job Snijders <job@openbsd.org>
Subject:
rpki-client: print more of HTTP URLs
To:
tech@openbsd.org
Date:
Fri, 15 Aug 2025 10:25:53 +0000

Download raw body.

Thread
  • Job Snijders:

    rpki-client: print more of HTTP URLs

I'd like to be able to more easily point out to RRDP server operators
_this exact_ URL at _this_ time had issue $foobar.

Checking the maximum length of URLs in the field the current maximum is
around 150 characters. Add a bit more room for future eventualities, but
it bound to some upper limit.

With this, rpki-client -v prints lines like:

	rpki-client: https://rpki-rrdp.us-east-2.amazonaws.com/rrdp/20aa329b-fc52-4c61-bf53-09725c042942/0eac24d1-fe4a-41b7-9d76-c9f22cdfbe81/23478/snapshot.xml (108.156.60.53): downloaded 13036322 bytes without HTTP compression

instead of:

	rpki-client: https://rpki-rrdp.us-east-2.amazonaws.com/rrdp/20aa329b-fc52-4c61-bf53-09725... (108.156.60.53): downloaded 13036322 bytes without HTTP compression

OK?

Index: http.c
===================================================================
RCS file: /cvs/src/usr.sbin/rpki-client/http.c,v
diff -u -p -r1.98 http.c
--- http.c	1 Aug 2025 13:46:06 -0000	1.98
+++ http.c	15 Aug 2025 10:11:23 -0000
@@ -220,7 +220,7 @@ static enum res	data_inflate_write(struc
 static const char *
 http_info(const char *uri)
 {
-	static char buf[80];
+	static char buf[200];
 
 	if (strnvis(buf, uri, sizeof buf, VIS_SAFE) >= (int)sizeof buf) {
 		/* overflow, add indicator */
@@ -251,7 +251,7 @@ ip_info(const struct http_connection *co
 static const char *
 conn_info(const struct http_connection *conn)
 {
-	static char	 buf[100 + NI_MAXHOST];
+	static char	 buf[220 + NI_MAXHOST];
 	const char	*uri;
 
 	if (conn->req == NULL)