plaisthos has uploaded this change for review. ( 
http://gerrit.openvpn.net/c/openvpn/+/1588?usp=email )


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 <[email protected]>
---
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/1

diff --git a/src/openvpn/ssl_verify_openssl.c b/src/openvpn/ssl_verify_openssl.c
index fc14789..f39f34a 100644
--- a/src/openvpn/ssl_verify_openssl.c
+++ b/src/openvpn/ssl_verify_openssl.c
@@ -195,8 +195,6 @@
 {
     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 @@
         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 = asn1 = X509_NAME_ENTRY_get_data(x509ne);
     if (!asn1)
     {
         return FAILURE;

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1588?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia43bb88d9ddf2e82c638011353a64c770f2c2c0a
Gerrit-Change-Number: 1588
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to