wolfssl: include "ssl.h" by "src/openvpn/ssl.h"
PATCH 1/1 wolfssl: include "ssl.h" by "src/openvpn/ssl.h"
Including "ssl.h" conflicts with the wolfSSL ssl.h header file. The include/wolfssl directory is included before openvpn/src. include/wolfssl needs to be included so that openvpn can pick up wolfSSL compatibility headers instead of OpenSSL headers without changing the paths.
--- src/openvpn/auth_token.c | 2 +- src/openvpn/dco_linux.c | 2 +- src/openvpn/manage.c | 2 +- src/openvpn/openvpn.h | 2 +- src/openvpn/options.c | 2 +- src/openvpn/ps.h | 2 +- src/openvpn/push.c | 2 +- src/openvpn/ssl.c | 2 +- src/openvpn/tls_crypt.c | 2 +- tests/unit_tests/openvpn/mock_ssl_dependencies.c | 2 +- tests/unit_tests/openvpn/test_pkcs11.c | 2 +- tests/unit_tests/openvpn/test_ssl.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-)
src/openvpn/auth_token.c +1 -1
@@ -12,7 +12,7 @@#include "auth_token.h" #include "push.h" #include "integer.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" #include "ssl_verify.h" #include <inttypes.h>
src/openvpn/dco_linux.c +1 -1
@@ -37,7 +37,7 @@#include "socket.h" #include "tun.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" #include "fdmisc.h" #include "multi.h" #include "ssl_verify.h"
src/openvpn/manage.c +1 -1
@@ -37,7 +37,7 @@#include "otime.h" #include "integer.h" #include "misc.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" #include "common.h" #include "manage.h" #include "openvpn.h"
src/openvpn/openvpn.h +1 -1
@@ -28,7 +28,7 @@#include "options.h" #include "socket.h" #include "crypto.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" #include "packet_id.h" #include "comp.h" #include "tun.h"
src/openvpn/options.c +1 -1
@@ -42,7 +42,7 @@#include "run_command.h" #include "shaper.h" #include "crypto.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" #include "ssl_ncp.h" #include "options.h" #include "misc.h"
src/openvpn/ps.h +1 -1
@@ -28,7 +28,7 @@#include "basic.h" #include "buffer.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" typedef void (*post_fork_cleanup_func_t )(void *arg);
src/openvpn/push.c +1 -1
@@ -29,7 +29,7 @@#include "push.h" #include "options.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" #include "ssl_verify.h" #include "ssl_ncp.h" #include "manage.h"
src/openvpn/ssl.c +1 -1
@@ -54,7 +54,7 @@#include "route.h" #include "tls_crypt.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" #include "ssl_verify.h" #include "ssl_backend.h" #include "ssl_ncp.h"
src/openvpn/tls_crypt.c +1 -1
@@ -33,7 +33,7 @@#include "platform.h" #include "run_command.h" #include "session_id.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" #include "tls_crypt.h"
tests/unit_tests/openvpn/mock_ssl_dependencies.c +1 -1
@@ -34,7 +34,7 @@#include <cmocka.h> -#include "ssl.h" +#include "src/openvpn/ssl.h" #include "ssl_verify.h" int
tests/unit_tests/openvpn/test_pkcs11.c +1 -1
@@ -33,7 +33,7 @@#include "xkey_common.h" #include "cert_data.h" #include "pkcs11.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" #include <setjmp.h> #include <cmocka.h>
tests/unit_tests/openvpn/test_ssl.c +1 -1
@@ -44,7 +44,7 @@#include "ssl_verify_backend.h" #include "win32.h" #include "test_common.h" -#include "ssl.h" +#include "src/openvpn/ssl.h" #include "buffer.h" #include "packet_id.h"
Signature · 1 line
2.34.1
Gert Doering
NAKHi,
Quoted 1 line · Juliusz Sosinowicz
Including "
ssl.h" conflicts with the wolfSSLssl.hheader file. Theinclude/wolfssldirectory is included before openvpn/src.include/wolfsslneeds to be included so that openvpn can pick up wolfSSL compatibility headers instead of OpenSSL headers without changing the paths.
NAK.
All our local includes are included without path, so we're not starting "full path" for a single include now.
If this conflicts with WolfSSL, I'd be willing to consider a Makefile patch that puts WolfSSL includes behind openvpn/src (so our ssl.h is picked first).
gert
Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]...Quoted 1 line · Juliusz Sosinowicz
Including "
ssl.h" conflicts with the wolfSSLssl.hheader file. Theinclude/wolfssldirectory is included before openvpn/src.include/wolfsslneeds to be included so that openvpn can pick up wolfSSL compatibility headers instead of OpenSSL headers without changing the paths.
This breaks out-of-tree builds. Currently we only add top_buildir to CFLAGS (for config.h) but NOT top_srcdir. For in-tree builds these are identical so the patch might appear to work. But it breaks otherwise. Further changes to buildsystem configuration would be required.
Regards,
Signature · 1 line
Frank Lichtenheld
Hi Frank,
thank you for the explanation. I did not test out-of-tree builds before submitting the patch. I'll try to implement Gert's solution and write a Makefile patch instead.
Sincerely
Juliusz Sosinowicz
Quoted 8 lines · Frank Lichtenheld
Quoted 1 line · Juliusz Sosinowicz
Including "
ssl.h" conflicts with the wolfSSLssl.hheader file. Theinclude/wolfssldirectory is included before openvpn/src.include/wolfsslneeds to be included so that openvpn can pick up wolfSSL compatibility headers instead of OpenSSL headers without changing the paths.This breaks out-of-tree builds. Currently we only add
top_buildirto CFLAGS (forconfig.h) but NOTtop_srcdir. For in-tree builds these are identical so the patch might appear to work. But it breaks otherwise. Further changes to buildsystem configuration would be required.Regards,
Am 09.02.24 um 16:51 schrieb Juliusz Sosinowicz:
Quoted 1 line
Including "
ssl.h" conflicts with the wolfSSLssl.hheader file. Theinclude/wolfssldirectory is included before openvpn/src.include/wolfsslneeds to be included so that openvpn can pick up wolfSSL compatibility headers instead of OpenSSL headers without changing the paths.
Neither the ssl.h (2005, so forever) in OpenVPN nor the ssl.h in wolfssl (2014 according to git blame) are particulary new. Why is this now a problem when it was never before?
Arne
Hi Arne,
commit 70b39f2bea9fd6e57f31e32b2041246731140cb2 has added the use of ACK_SIZE and RELIABLE_ACK_SIZE in test_ssl.c. These are defined in reliable.h which should be included through your ssl.h. Since our ssl.h is being picked up, these never get defined and make check results in the following error:
test_ssl.c: In function ‘init_frame_parameters’:
test_ssl.c:160:17: warning: implicit declaration of function ‘ACK_SIZE’ [-Wimplicit-function-declaration] 160 | overhead += ACK_SIZE(RELIABLE_ACK_SIZE);
| ^~~~~~~~
test_ssl.c:160:26: error: ‘RELIABLE_ACK_SIZE’ undeclared (first use in this function) 160 | overhead += ACK_SIZE(RELIABLE_ACK_SIZE);
| ^~~~~~~~~~~~~~~~~
Somehow, this has never come up as an issue.
Sincerely
Juliusz Sosinowicz
Quoted 7 lines · Arne Schwabe
Am 09.02.24 um 16:51 schrieb Juliusz Sosinowicz:
Quoted 1 line
Including "
ssl.h" conflicts with the wolfSSLssl.hheader file. Theinclude/wolfssldirectory is included before openvpn/src.include/wolfsslneeds to be included so that openvpn can pick up wolfSSL compatibility headers instead of OpenSSL headers without changing the paths.Neither the
ssl.h(2005, so forever) in OpenVPN nor thessl.hin wolfssl (2014 according to git blame) are particulary new. Why is this now a problem when it was never before?Arne
Hi,
Quoted 5 lines · Juliusz Sosinowicz
commit
70b39f2bea9fd6e57f31e32b2041246731140cb2has added the use ofACK_SIZEandRELIABLE_ACK_SIZEintest_ssl.c. These are defined inreliable.hwhich should be included through yourssl.h. Since ourssl.his being picked up, these never get defined and make check results in the following error:
Seems the unit test compile flags could use a bit of shuffling to have our local include first... and that should solve it (if nothing else breaks, just test_ssl.c)
gert
Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]...Hi Gert,
that is the direction I went with the latest patch I sent over.
Sincerely
Juliusz Sosinowicz
Quoted 13 lines · Gert Doering
Hi,
Quoted 5 lines · Juliusz Sosinowicz
commit
70b39f2bea9fd6e57f31e32b2041246731140cb2has added the use ofACK_SIZEandRELIABLE_ACK_SIZEintest_ssl.c. These are defined inreliable.hwhich should be included through yourssl.h. Since ourssl.his being picked up, these never get defined and make check results in the following error:Seems the unit test compile flags could use a bit of shuffling to have our local include first... and that should solve it (if nothing else breaks, just
test_ssl.c)gert