From: "comododragon (Code Review)"
Date: Mon, 23 Jun 2025 10:49:27 +0000
In-Reply-To:
References:
Reply-To: rein.vanbaaren@...1435..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, frank@...2641...
Message-ID: <28d3f2f21b21ed97553d525f2da1f45285b52615-EmailReplacePatchSet-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="9EyxvtJooss="; charset=UTF-8
Subject: [Openvpn-devel] [M] Change in openvpn[master]: Added PQE to WolfSSL
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: plaisthos , flichtenheld
Cc: openvpn-devel
--9EyxvtJooss=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: comododragon, flichtenheld.
Hello flichtenheld, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1046?usp=3Demail
to look at the new patch set (#2).
Change subject: Added PQE to WolfSSL
......................................................................
Added PQE to WolfSSL
Change-Id: Ie0529c2074964b3be034f01e0ef53090a6edbd35
---
M README.wolfssl
M src/openvpn/ssl_openssl.c
2 files changed, 47 insertions(+), 8 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/46/1046/2
diff --git a/README.wolfssl b/README.wolfssl
index a5dfe31..27b9087 100644
--- a/README.wolfssl
+++ b/README.wolfssl
@@ -28,3 +28,40 @@
* blowfish support (BF-CBC), you must use something like
cipher AES-128-CBC to avoid trying to use BF-CBC
* Windows CryptoAPI support
+
+*************************************************************************
+To build WolfSSL with these PQE, you'll want to configure it like this:
+
+```bash
+./configure --enable-openvpn --enable-kyber --enable-mlkem --enable-curve2=
5519
+```
+
+WolfSSL supports the following Quantum Safe algorithms by specifying them =
using the `tls-groups`
+option in a config.
+
+```
+ML_KEM_512
+ML_KEM_768
+ML_KEM_1024
+P256_ML_KEM_512
+P384_ML_KEM_768
+P256_ML_KEM_768
+P521_ML_KEM_1024
+P384_ML_KEM_1024
+X25519_ML_KEM_512
+X448_ML_KEM_768
+X25519_ML_KEM_768
+
+KYBER_LEVEL1
+KYBER_LEVEL3
+KYBER_LEVEL5
+
+P256_KYBER_LEVEL1
+P384_KYBER_LEVEL3
+P256_KYBER_LEVEL3
+P521_KYBER_LEVEL5
+
+X25519_KYBER_LEVEL1
+X448_KYBER_LEVEL3
+X25519_KYBER_LEVEL3
+```
diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
index 2fc77d8..dd3dcca 100644
--- a/src/openvpn/ssl_openssl.c
+++ b/src/openvpn/ssl_openssl.c
@@ -76,6 +76,8 @@
#include
#endif
+#include "wolfssl_compat.h"
+
OSSL_LIB_CTX *tls_libctx; /* Global */
static void unload_xkey_provider(void);
@@ -560,7 +562,13 @@
tls_ctx_set_tls_groups(struct tls_root_ctx *ctx, const char *groups)
{
ASSERT(ctx);
-#if OPENSSL_VERSION_NUMBER < 0x30000000L
+#if defined(ENABLE_CRYPTO_WOLFSSL) || OPENSSL_VERSION_NUMBER >=3D 0x300000=
00L
+ if (!SSL_CTX_set1_groups_list(ctx->ctx, groups))
+ {
+ crypto_msg(M_FATAL, "Failed to set allowed TLS group list: %s",
+ groups);
+ }
+#else
struct gc_arena gc =3D gc_new();
/* This method could be as easy as
* SSL_CTX_set1_groups_list(ctx->ctx, groups)
@@ -607,13 +615,7 @@
groups);
}
gc_free(&gc);
-#else /* if OPENSSL_VERSION_NUMBER < 0x30000000L */
- if (!SSL_CTX_set1_groups_list(ctx->ctx, groups))
- {
- crypto_msg(M_FATAL, "Failed to set allowed TLS group list: %s",
- groups);
- }
-#endif /* if OPENSSL_VERSION_NUMBER < 0x30000000L */
+#endif
}
void
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1046?usp=3Demail
To unsubscribe, or for help writing mail filters, visit http://gerrit.openv=
pn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie0529c2074964b3be034f01e0ef53090a6edbd35
Gerrit-Change-Number: 1046
Gerrit-PatchSet: 2
Gerrit-Owner: comododragon
Gerrit-Reviewer: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: flichtenheld
Gerrit-Attention: comododragon
Gerrit-MessageType: newpatchset
--9EyxvtJooss=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: comododragon, flichtenheld.
comododragon uploaded patch set #2 to this change.
<=
p>View C=
hange
Added PQE to WolfSSL
Change-Id: Ie0529c2074964b3be034f01e0=
ef53090a6edbd35
---
M README.wolfssl
M src/openvpn/ssl_openssl.c2 files changed, 47 insertions(+), 8 deletions(-)
git pull ssh:=
//gerrit.openvpn.net:29418/openvpn refs/changes/46/1046/2
diff --=
git a/README.wolfssl b/README.wolfssl
index a5dfe31..27b908=
7 100644
--- a/README.wolfssl
+++ b/README.=
wolfssl
@@ -28,3 +28,40 @@
* blowfish sup=
port (BF-CBC), you must use something like
cipher AES-1=
28-CBC to avoid trying to use BF-CBC
* Windows CryptoAPI =
support
+
<=
span style=3D"color: hsl(120, 100%, 40%);">+*******************************=
******************************************
+To build WolfSSL with these PQE, you'll want to =
configure it like this:
+
+```bash<=
br>+./configure --enable-openvp=
n --enable-kyber --enable-mlkem --enable-curve25519
+```
+
+W=
olfSSL supports the following Quantum Safe algorithms by specifying them us=
ing the `tls-groups`
+option in a config.
+
+```
+ML_KEM_512
+ML_KEM_768
+ML_KEM_1024
+P256_ML_KEM_512
+P384_ML_KEM_768
+P256_ML_KEM_768
+P521_ML_KEM_1024
+P384_ML_KEM_1024
+X=
25519_ML_KEM_512
+X44=
8_ML_KEM_768
+X25519_=
ML_KEM_768
++KYBER_LEVEL1
+KYBER_LEVEL3
+KYBER_LEVEL5
+
+P256_KYBER_LEVEL1
+P384_KYBER_LEVEL3
+P256_KYBER_LEVEL3
+P521_KYBER_LEVEL5
+=
+X25519_KYBER_LEVEL1=
+X448_KYBER_LEVEL3=
span>
+X25519_KYBER_LEVEL3=
span>
+```
d=
iff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
index 2fc77d8..dd3dcca 100644
--- a/src/openvpn/ssl_=
openssl.c
+++ b/src/openvpn/ssl_openssl.c
@=
@ -76,6 +76,8 @@
#include <openssl/applink.c>=
#endif
+#include "wolfssl_compat.h"
+
OSSL_LIB_CTX *tls_libct=
x; /* Global */
static void unload_xkey_=
provider(void);
@@ -560,7 +562,13 @@
tls_c=
tx_set_tls_groups(struct tls_root_ctx *ctx, const char *groups)
<=
span> {
ASSERT(ctx);
-#if OPENSSL_VERSION_NUMBER < 0x30000000L
<=
span style=3D"color: hsl(120, 100%, 40%);">+#if defined(ENABLE_CRYPTO_WOLFS=
SL) || OPENSSL_VERSION_NUMBER >=3D 0x30000000L
+ if (!SSL_CTX_set1_groups_list(ctx->ctx=
, groups))
+ {
+ crypto_msg(M_FA=
TAL, "Failed to set allowed TLS group list: %s",
+ groups);
<=
span style=3D"color: hsl(120, 100%, 40%);">+ }
+#else
struct gc_arena gc=
=3D gc_new();
/* This method could be as easy as
* SSL_CTX_set1_groups_list(ctx->ctx, groups)@@ -607,13 +615,7 @@
groups);=
span>
}
gc_free(&gc);
-#else /* if OPENSSL_VERSION_NUMBER =
< 0x30000000L */
- =
if (!SSL_CTX_set1_groups_list(ctx->ctx, groups))
- {
- crypto_msg(M_FATAL, "Failed to set allowed TLS=
group list: %s",
=
- groups);
- }
-#endif /*=
if OPENSSL_VERSION_NUMBER < 0x30000000L */
+#endif
}
void
To view, visit change 1046. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie0529c2074964b3be034f01e0ef=
53090a6edbd35
Gerrit-Change-Number: 1046
Gerrit-PatchSet: 2
Gerrit-Owner: comododragon <rein.vanbaaren@=
...1435...>
Gerrit-Reviewer: flichtenheld <frank@...2716...=
1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...=
41...>
Gerrit-Attention: comododragon <rein.vanbaa=
ren@...1435...>
Gerrit-MessageType: newpatchset
--9EyxvtJooss=--