1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 15:23:33 +02:00

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
This commit is contained in:
tb
2026-04-03 02:36:38 +00:00
parent 8155187ede
commit cfe3850a6c
+3 -3
View File
@@ -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 <tb@openbsd.org>
* Copyright (c) 2021 Job Snijders <job@openbsd.org>
@@ -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;