mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-05-28 04:03:29 -04:00
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 <arne@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1588
Message-Id: <20260326110658.25741-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36291.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 3316a18ebe)
This commit is contained in:
parent
4577a0dc21
commit
82f676574d
1 changed files with 2 additions and 4 deletions
|
|
@ -195,8 +195,6 @@ extract_x509_field_ssl(X509_NAME *x509, const char *field_name, char *out, size_
|
|||
{
|
||||
int lastpos = -1;
|
||||
int tmp = -1;
|
||||
X509_NAME_ENTRY *x509ne = NULL;
|
||||
ASN1_STRING *asn1 = NULL;
|
||||
unsigned char *buf = NULL;
|
||||
|
||||
ASN1_OBJECT *field_name_obj = OBJ_txt2obj(field_name, 0);
|
||||
|
|
@ -222,13 +220,13 @@ extract_x509_field_ssl(X509_NAME *x509, const char *field_name, char *out, size_
|
|||
return FAILURE;
|
||||
}
|
||||
|
||||
x509ne = X509_NAME_get_entry(x509, lastpos);
|
||||
const X509_NAME_ENTRY *x509ne = X509_NAME_get_entry(x509, lastpos);
|
||||
if (!x509ne)
|
||||
{
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
asn1 = X509_NAME_ENTRY_get_data(x509ne);
|
||||
const ASN1_STRING *asn1 = X509_NAME_ENTRY_get_data(x509ne);
|
||||
if (!asn1)
|
||||
{
|
||||
return FAILURE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue