Including "ssl.h" conflicts with the wolfSSL ssl.h header file. The openvpn/src directory needs to be included before include/wolfssl. 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/Makefile.am does not need to be modified because AM_CPPFLAGS is placed before AM_CFLAGS in the output Makefile.
Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20240212132522.125903-1-juliusz@wolfssl.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28229.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
| ... | ... |
@@ -41,7 +41,7 @@ if HAVE_SITNL |
| 41 | 41 |
check_PROGRAMS += networking_testdriver |
| 42 | 42 |
endif |
| 43 | 43 |
|
| 44 |
-argv_testdriver_CFLAGS = @TEST_CFLAGS@ -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat |
|
| 44 |
+argv_testdriver_CFLAGS = -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat @TEST_CFLAGS@ |
|
| 45 | 45 |
argv_testdriver_LDFLAGS = @TEST_LDFLAGS@ -L$(top_srcdir)/src/openvpn -Wl,--wrap=parse_line |
| 46 | 46 |
argv_testdriver_SOURCES = test_argv.c mock_msg.c mock_msg.h \ |
| 47 | 47 |
mock_get_random.c \ |
| ... | ... |
@@ -50,15 +50,16 @@ argv_testdriver_SOURCES = test_argv.c mock_msg.c mock_msg.h \ |
| 50 | 50 |
$(top_srcdir)/src/openvpn/win32-util.c \ |
| 51 | 51 |
$(top_srcdir)/src/openvpn/argv.c |
| 52 | 52 |
|
| 53 |
-buffer_testdriver_CFLAGS = @TEST_CFLAGS@ -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat |
|
| 53 |
+buffer_testdriver_CFLAGS = -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat @TEST_CFLAGS@ |
|
| 54 | 54 |
buffer_testdriver_LDFLAGS = @TEST_LDFLAGS@ -L$(top_srcdir)/src/openvpn -Wl,--wrap=parse_line |
| 55 | 55 |
buffer_testdriver_SOURCES = test_buffer.c mock_msg.c mock_msg.h \ |
| 56 | 56 |
mock_get_random.c \ |
| 57 | 57 |
$(top_srcdir)/src/openvpn/win32-util.c \ |
| 58 | 58 |
$(top_srcdir)/src/openvpn/platform.c |
| 59 | 59 |
|
| 60 |
-crypto_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 61 |
- -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn |
|
| 60 |
+crypto_testdriver_CFLAGS = \ |
|
| 61 |
+ -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
|
| 62 |
+ @TEST_CFLAGS@ |
|
| 62 | 63 |
crypto_testdriver_LDFLAGS = @TEST_LDFLAGS@ |
| 63 | 64 |
crypto_testdriver_SOURCES = test_crypto.c mock_msg.c mock_msg.h \ |
| 64 | 65 |
$(top_srcdir)/src/openvpn/buffer.c \ |
| ... | ... |
@@ -72,8 +73,9 @@ crypto_testdriver_SOURCES = test_crypto.c mock_msg.c mock_msg.h \ |
| 72 | 72 |
$(top_srcdir)/src/openvpn/win32-util.c \ |
| 73 | 73 |
$(top_srcdir)/src/openvpn/mss.c |
| 74 | 74 |
|
| 75 |
-ssl_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 76 |
- -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn |
|
| 75 |
+ssl_testdriver_CFLAGS = \ |
|
| 76 |
+ -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
|
| 77 |
+ @TEST_CFLAGS@ |
|
| 77 | 78 |
ssl_testdriver_LDFLAGS = @TEST_LDFLAGS@ $(OPTIONAL_CRYPTO_LIBS) |
| 78 | 79 |
ssl_testdriver_SOURCES = test_ssl.c mock_msg.c mock_msg.h \ |
| 79 | 80 |
mock_management.c mock_ssl_dependencies.c mock_win32_execve.c \ |
| ... | ... |
@@ -106,8 +108,9 @@ if WIN32 |
| 106 | 106 |
ssl_testdriver_LDADD = -lcrypt32 -lncrypt -lfwpuclnt -liphlpapi -lws2_32 |
| 107 | 107 |
endif |
| 108 | 108 |
|
| 109 |
-packet_id_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 110 |
- -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn |
|
| 109 |
+packet_id_testdriver_CFLAGS = \ |
|
| 110 |
+ -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
|
| 111 |
+ @TEST_CFLAGS@ |
|
| 111 | 112 |
packet_id_testdriver_LDFLAGS = @TEST_LDFLAGS@ |
| 112 | 113 |
packet_id_testdriver_SOURCES = test_packet_id.c mock_msg.c mock_msg.h \ |
| 113 | 114 |
mock_get_random.c \ |
| ... | ... |
@@ -119,8 +122,9 @@ packet_id_testdriver_SOURCES = test_packet_id.c mock_msg.c mock_msg.h \ |
| 119 | 119 |
$(top_srcdir)/src/openvpn/win32-util.c \ |
| 120 | 120 |
$(top_srcdir)/src/openvpn/session_id.c |
| 121 | 121 |
|
| 122 |
-pkt_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 123 |
- -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn |
|
| 122 |
+pkt_testdriver_CFLAGS = \ |
|
| 123 |
+ -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
|
| 124 |
+ @TEST_CFLAGS@ |
|
| 124 | 125 |
pkt_testdriver_LDFLAGS = @TEST_LDFLAGS@ |
| 125 | 126 |
pkt_testdriver_SOURCES = test_pkt.c mock_msg.c mock_msg.h mock_win32_execve.c \ |
| 126 | 127 |
$(top_srcdir)/src/openvpn/argv.c \ |
| ... | ... |
@@ -141,8 +145,9 @@ pkt_testdriver_SOURCES = test_pkt.c mock_msg.c mock_msg.h mock_win32_execve.c \ |
| 141 | 141 |
$(top_srcdir)/src/openvpn/tls_crypt.c |
| 142 | 142 |
|
| 143 | 143 |
if !WIN32 |
| 144 |
-tls_crypt_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 145 |
- -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn |
|
| 144 |
+tls_crypt_testdriver_CFLAGS = \ |
|
| 145 |
+ -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
|
| 146 |
+ @TEST_CFLAGS@ |
|
| 146 | 147 |
tls_crypt_testdriver_LDFLAGS = @TEST_LDFLAGS@ \ |
| 147 | 148 |
-Wl,--wrap=buffer_read_from_file \ |
| 148 | 149 |
-Wl,--wrap=buffer_write_file \ |
| ... | ... |
@@ -164,9 +169,9 @@ tls_crypt_testdriver_SOURCES = test_tls_crypt.c mock_msg.c mock_msg.h \ |
| 164 | 164 |
endif |
| 165 | 165 |
|
| 166 | 166 |
if HAVE_SITNL |
| 167 |
-networking_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 167 |
+networking_testdriver_CFLAGS = \ |
|
| 168 | 168 |
-I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
| 169 |
- $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 169 |
+ @TEST_CFLAGS@ $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 170 | 170 |
networking_testdriver_LDFLAGS = @TEST_LDFLAGS@ -L$(top_srcdir)/src/openvpn \ |
| 171 | 171 |
$(OPTIONAL_CRYPTO_LIBS) |
| 172 | 172 |
networking_testdriver_SOURCES = test_networking.c mock_msg.c \ |
| ... | ... |
@@ -180,9 +185,9 @@ networking_testdriver_SOURCES = test_networking.c mock_msg.c \ |
| 180 | 180 |
$(top_srcdir)/src/openvpn/platform.c |
| 181 | 181 |
endif |
| 182 | 182 |
|
| 183 |
-provider_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 183 |
+provider_testdriver_CFLAGS = \ |
|
| 184 | 184 |
-I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
| 185 |
- $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 185 |
+ @TEST_CFLAGS@ $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 186 | 186 |
provider_testdriver_LDFLAGS = @TEST_LDFLAGS@ \ |
| 187 | 187 |
$(OPTIONAL_CRYPTO_LIBS) |
| 188 | 188 |
|
| ... | ... |
@@ -196,9 +201,9 @@ provider_testdriver_SOURCES = test_provider.c mock_msg.c \ |
| 196 | 196 |
$(top_srcdir)/src/openvpn/platform.c |
| 197 | 197 |
|
| 198 | 198 |
if WIN32 |
| 199 |
-cryptoapi_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 199 |
+cryptoapi_testdriver_CFLAGS = \ |
|
| 200 | 200 |
-I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
| 201 |
- $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 201 |
+ @TEST_CFLAGS@ $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 202 | 202 |
cryptoapi_testdriver_LDFLAGS = @TEST_LDFLAGS@ \ |
| 203 | 203 |
$(OPTIONAL_CRYPTO_LIBS) -lcrypt32 -lncrypt |
| 204 | 204 |
cryptoapi_testdriver_SOURCES = test_cryptoapi.c mock_msg.c \ |
| ... | ... |
@@ -214,9 +219,9 @@ endif |
| 214 | 214 |
|
| 215 | 215 |
if HAVE_SOFTHSM2 |
| 216 | 216 |
if !WIN32 |
| 217 |
-pkcs11_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 217 |
+pkcs11_testdriver_CFLAGS = \ |
|
| 218 | 218 |
-I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
| 219 |
- $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 219 |
+ @TEST_CFLAGS@ $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 220 | 220 |
pkcs11_testdriver_LDFLAGS = @TEST_LDFLAGS@ \ |
| 221 | 221 |
$(OPTIONAL_CRYPTO_LIBS) |
| 222 | 222 |
pkcs11_testdriver_SOURCES = test_pkcs11.c mock_msg.c \ |
| ... | ... |
@@ -235,9 +240,9 @@ pkcs11_testdriver_SOURCES = test_pkcs11.c mock_msg.c \ |
| 235 | 235 |
endif |
| 236 | 236 |
endif |
| 237 | 237 |
|
| 238 |
-auth_token_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 238 |
+auth_token_testdriver_CFLAGS = \ |
|
| 239 | 239 |
-I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
| 240 |
- $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 240 |
+ @TEST_CFLAGS@ $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 241 | 241 |
auth_token_testdriver_LDFLAGS = @TEST_LDFLAGS@ \ |
| 242 | 242 |
$(OPTIONAL_CRYPTO_LIBS) |
| 243 | 243 |
|
| ... | ... |
@@ -253,8 +258,9 @@ auth_token_testdriver_SOURCES = test_auth_token.c mock_msg.c \ |
| 253 | 253 |
$(top_srcdir)/src/openvpn/base64.c |
| 254 | 254 |
|
| 255 | 255 |
|
| 256 |
-user_pass_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 257 |
- -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn |
|
| 256 |
+user_pass_testdriver_CFLAGS = \ |
|
| 257 |
+ -I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
|
| 258 |
+ @TEST_CFLAGS@ |
|
| 258 | 259 |
user_pass_testdriver_LDFLAGS = @TEST_LDFLAGS@ |
| 259 | 260 |
|
| 260 | 261 |
user_pass_testdriver_SOURCES = test_user_pass.c mock_msg.c \ |
| ... | ... |
@@ -269,9 +275,9 @@ user_pass_testdriver_SOURCES = test_user_pass.c mock_msg.c \ |
| 269 | 269 |
$(top_srcdir)/src/openvpn/base64.c |
| 270 | 270 |
|
| 271 | 271 |
|
| 272 |
-ncp_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 272 |
+ncp_testdriver_CFLAGS = \ |
|
| 273 | 273 |
-I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
| 274 |
- $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 274 |
+ @TEST_CFLAGS@ $(OPTIONAL_CRYPTO_CFLAGS) |
|
| 275 | 275 |
ncp_testdriver_LDFLAGS = @TEST_LDFLAGS@ \ |
| 276 | 276 |
$(OPTIONAL_CRYPTO_LIBS) |
| 277 | 277 |
|
| ... | ... |
@@ -287,9 +293,9 @@ ncp_testdriver_SOURCES = test_ncp.c mock_msg.c \ |
| 287 | 287 |
$(top_srcdir)/src/compat/compat-strsep.c \ |
| 288 | 288 |
$(top_srcdir)/src/openvpn/ssl_util.c |
| 289 | 289 |
|
| 290 |
-misc_testdriver_CFLAGS = @TEST_CFLAGS@ \ |
|
| 290 |
+misc_testdriver_CFLAGS = \ |
|
| 291 | 291 |
-I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \ |
| 292 |
- -DSOURCEDIR=\"$(top_srcdir)\" |
|
| 292 |
+ -DSOURCEDIR=\"$(top_srcdir)\" @TEST_CFLAGS@ |
|
| 293 | 293 |
|
| 294 | 294 |
misc_testdriver_LDFLAGS = @TEST_LDFLAGS@ |
| 295 | 295 |
|