From: "plaisthos (Code Review)" Date: Wed, 25 Mar 2026 15:08:18 +0000 In-Reply-To: References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="TFIfNn2mhY4="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Use const specifices in extract_x509_field_ssl List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: openvpn-devel --TFIfNn2mhY4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld. Hello flichtenheld,=20 I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1588?usp=3Demail to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review-1 by flichtenheld Change subject: Use const specifices in extract_x509_field_ssl ...................................................................... Use const specifices in extract_x509_field_ssl The new OpenSSL 4.0 will return const objects from these objects, so make them const in our code as well. Change-Id: Ia43bb88d9ddf2e82c638011353a64c770f2c2c0a Signed-off-by: Arne Schwabe --- M src/openvpn/ssl_verify_openssl.c 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/88/1588/2 diff --git a/src/openvpn/ssl_verify_openssl.c b/src/openvpn/ssl_verify_open= ssl.c index 46401cd..4c492a3 100644 --- a/src/openvpn/ssl_verify_openssl.c +++ b/src/openvpn/ssl_verify_openssl.c @@ -195,8 +195,6 @@ { int lastpos =3D -1; int tmp =3D -1; - X509_NAME_ENTRY *x509ne =3D NULL; - ASN1_STRING *asn1 =3D NULL; unsigned char *buf =3D NULL; ASN1_OBJECT *field_name_obj =3D OBJ_txt2obj(field_name, 0); @@ -222,13 +220,13 @@ return FAILURE; } - x509ne =3D X509_NAME_get_entry(x509, lastpos); + const X509_NAME_ENTRY *x509ne =3D X509_NAME_get_entry(x509, lastpos); if (!x509ne) { return FAILURE; } - asn1 =3D X509_NAME_ENTRY_get_data(x509ne); + const ASN1_STRING *asn1 =3D X509_NAME_ENTRY_get_data(x509ne); if (!asn1) { return FAILURE; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1588?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ia43bb88d9ddf2e82c638011353a64c770f2c2c0a Gerrit-Change-Number: 1588 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld --TFIfNn2mhY4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld.

plaisthos uploaded patch set #2 to this change.

<= a href=3D"http://gerrit.openvpn.net/c/openvpn/+/1588?usp=3Demail">View Chan= ge

The following approvals got outdated and were removed: Code-Review-1 by flichtenheld

Use const specifices in  ext=
ract_x509_field_ssl

The new OpenSSL 4.0 will return const objects fr= om these objects, so
make them const in our code as well.

Change-= Id: Ia43bb88d9ddf2e82c638011353a64c770f2c2c0a
Signed-off-by: Arne Schwab= e <arne@...1227...>
---
M src/openvpn/ssl_verify_openssl.c
1= file changed, 2 insertions(+), 4 deletions(-)

g=
it pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/88/1588/2
=
diff --git a/src/openvpn/ssl_verify_openssl.c b/src/openvpn/ssl_verify_o=
penssl.c
index 46401cd..4c492a3 100644
--- = a/src/openvpn/ssl_verify_openssl.c
+++ b/src/openvpn/ssl_ve= rify_openssl.c
@@ -195,8 +195,6 @@
{
int lastpos =3D -1;
int tmp =3D -1;
- X509_NAME_ENTRY *x50= 9ne =3D NULL;
- ASN1= _STRING *asn1 =3D NULL;
unsigned char *buf =3D NULL;

ASN1_OBJECT *field_name_obj =3D OBJ_t= xt2obj(field_name, 0);
@@ -222,13 +220,13 @@
return FAILURE;

}
<= br>- x509ne =3D X509_NAME_get_= entry(x509, lastpos);
+ const X509_NAME_ENTRY *x509ne =3D X509_NAME_get_entry(x509, lastpos);=
if (!x509ne)
{
= return FAILURE;
}

= - asn1 =3D X509_NAME_ENTRY_get= _data(x509ne);
+ c= onst ASN1_STRING *asn1 =3D X509_NAME_ENTRY_get_data(x509ne);
if (!asn1)

{
return FA= ILURE;

To view, visit change 1588. To unsub= scribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia43bb88d9ddf2e82c638011353a= 64c770f2c2c0a
Gerrit-Change-Number: 1588
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
= --TFIfNn2mhY4=--