Skip to contentSkip to conversation

Change in openvpn[master]: ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options

Openvpn-devel In review flichtenheld (Code Review) 2 participants 6 messages Jul 23, 2025 – Sep 2, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1753289942000.Ia5e0aad8a97d38f8d309a29ecfe3c578edff9595@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1101?usp=email

to review the following change.

Change subject: ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options
......................................................................

ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options

The argument changed type in OpenSSL 3.0.

Change-Id Ia5e0aad8a97d38f8d309a29ecfe3c578edff9595

---
M src/openvpn/ssl_openssl.c

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/01/1101/1

src/openvpn/ssl_openssl.c +1 -1
index 4c11cd4..ea9fec0 100644
@@ -312,7 +312,7 @@
     ASSERT(NULL != ctx);
 
     /* process SSL options */
-    long sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_TICKET;
+    uint64_t sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_TICKET;
 #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
     sslopt |= SSL_OP_CIPHER_SERVER_PREFERENCE;
 #endif

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia5e0aad8a97d38f8d309a29ecfe3c578edff9595
Gerrit-Change-Number: 1101
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld.

plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1101?usp=email )

Change subject: ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options
......................................................................

Patch Set 7: Code-Review+2

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia5e0aad8a97d38f8d309a29ecfe3c578edff9595
Gerrit-Change-Number: 1101
Gerrit-PatchSet: 7
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Tue, 26 Aug 2025 12:54:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw

PATCH v7 1/1 ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]...>

The argument changed type in OpenSSL 3.0.

Change-Id Ia5e0aad8a97d38f8d309a29ecfe3c578edff9595

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1101
This mail reflects revision 7 of this Change.

Acked-by according to Gerrit (reflected above):
Arne Schwabe <[email protected]...>

src/openvpn/ssl_openssl.c +1 -1
index 1948d12..aa1ac11 100644
@@ -308,7 +308,7 @@
     ASSERT(NULL != ctx);
 
     /* process SSL options */
-    long sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_TICKET;
+    uint64_t sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_TICKET;
 #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
     sslopt |= SSL_OP_CIPHER_SERVER_PREFERENCE;
 #endif
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options

This is actually an interesting one - in OpenSSL 1.1.x, the "sslopt" argument to SSL_CTX_set_options() is a "long", so back then, our code had the correct data type. With 3.0, this is now an "uint64_t", and for master/2.7, this is the right thing to do - even if it will cause some warnings on FreeBSD 13, for example, which still ships 1.1.1w

Your patch has been applied to the master branch.

commit 80c5cdef00fdef89738df1c17441f0bb987ccc97

Author: Frank Lichtenheld
Date:   Tue Aug 26 20:41:38 2025 +0200
     ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Arne Schwabe <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg32690.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#8) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1101?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by plaisthos

Change subject: ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options
......................................................................

ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options

The argument changed type in OpenSSL 3.0.

Change-Id Ia5e0aad8a97d38f8d309a29ecfe3c578edff9595

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32690.html

---
M src/openvpn/ssl_openssl.c

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/01/1101/8

src/openvpn/ssl_openssl.c +1 -1
index 1948d12..aa1ac11 100644
@@ -308,7 +308,7 @@
     ASSERT(NULL != ctx);
 
     /* process SSL options */
-    long sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_TICKET;
+    uint64_t sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_TICKET;
 #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
     sslopt |= SSL_OP_CIPHER_SERVER_PREFERENCE;
 #endif

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia5e0aad8a97d38f8d309a29ecfe3c578edff9595
Gerrit-Change-Number: 1101
Gerrit-PatchSet: 8
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1101?usp=email )

Change subject: ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options
......................................................................

ssl_openssl: Fix type of sslopts argument to SSL_CTX_set_options

The argument changed type in OpenSSL 3.0.

Change-Id Ia5e0aad8a97d38f8d309a29ecfe3c578edff9595

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32690.html

---
M src/openvpn/ssl_openssl.c

1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/ssl_openssl.c +1 -1
index 1948d12..aa1ac11 100644
@@ -308,7 +308,7 @@
     ASSERT(NULL != ctx);
 
     /* process SSL options */
-    long sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_TICKET;
+    uint64_t sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_TICKET;
 #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
     sslopt |= SSL_OP_CIPHER_SERVER_PREFERENCE;
 #endif

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia5e0aad8a97d38f8d309a29ecfe3c578edff9595
Gerrit-Change-Number: 1101
Gerrit-PatchSet: 8
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged