From cfe3850a6ca012f2bbd8df7cf7db655cb5f22885 Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 3 Apr 2026 02:36:38 +0000 Subject: [PATCH] rpki-client: const for ext and OID in cert_parse_extensions() This is the last step of sprinkling const for OpenSSL 4. Move the extension retrieved via X509_get_ext() to a const. The extension is first passed to the simple X509_EXTENSION_get_object() getter and in the extension parsers to X509V3_EXT_d2i(). The OID is passed to the const correct OBJ_obj2nid() and OBJ_obj2text(). discussed with claudio --- usr.sbin/rpki-client/cert.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rpki-client/cert.c b/usr.sbin/rpki-client/cert.c index 7913fb9fa06..f1e44b73177 100644 --- a/usr.sbin/rpki-client/cert.c +++ b/usr.sbin/rpki-client/cert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cert.c,v 1.229 2026/04/03 02:33:21 tb Exp $ */ +/* $OpenBSD: cert.c,v 1.230 2026/04/03 02:36:38 tb Exp $ */ /* * Copyright (c) 2022,2025 Theo Buehler * Copyright (c) 2021 Job Snijders @@ -1511,8 +1511,8 @@ static int cert_parse_extensions(const char *fn, struct cert *cert) { X509 *x = cert->x509; - X509_EXTENSION *ext; - ASN1_OBJECT *obj; + const X509_EXTENSION *ext; + const ASN1_OBJECT *obj; int extsz, i, nid; int bc, ski, aki, ku, eku, crldp, aia, sia, cp, ip, as;