|
89 | 89 | 'nghttp3/lib/nghttp3_unreachable.c', |
90 | 90 | 'nghttp3/lib/nghttp3_vec.c', |
91 | 91 | 'nghttp3/lib/nghttp3_version.c', |
| 92 | + ], |
| 93 | +'ngtcp2_test_server_sources': [ |
| 94 | +'ngtcp2/examples/tls_server_session_ossl.cc', |
| 95 | +'ngtcp2/examples/tls_server_context_ossl.cc', |
| 96 | +'ngtcp2/examples/tls_session_base_ossl.cc', |
| 97 | +'ngtcp2/examples/util_openssl.cc', |
| 98 | +'ngtcp2/examples/http.cc', |
| 99 | +'ngtcp2/examples/server_base.cc', |
| 100 | +'ngtcp2/examples/shared.cc', |
| 101 | +'ngtcp2/examples/server.cc', |
| 102 | +'ngtcp2/examples/util.cc', |
| 103 | +'ngtcp2/examples/debug.cc', |
| 104 | +'ngtcp2/examples/siphash.cc', |
| 105 | +'ngtcp2/third-party/urlparse/urlparse.c', |
| 106 | +'ngtcp2/third-party/libev/ev.c', |
| 107 | + ], |
| 108 | +'ngtcp2_test_client_sources': [ |
| 109 | +'ngtcp2/examples/tls_client_session_ossl.cc', |
| 110 | +'ngtcp2/examples/tls_client_context_ossl.cc', |
| 111 | +'ngtcp2/examples/tls_session_base_ossl.cc', |
| 112 | +'ngtcp2/examples/util_openssl.cc', |
| 113 | +'ngtcp2/examples/http.cc', |
| 114 | +'ngtcp2/examples/client_base.cc', |
| 115 | +'ngtcp2/examples/shared.cc', |
| 116 | +'ngtcp2/examples/client.cc', |
| 117 | +'ngtcp2/examples/util.cc', |
| 118 | +'ngtcp2/examples/debug.cc', |
| 119 | +'ngtcp2/examples/siphash.cc', |
| 120 | +'ngtcp2/third-party/urlparse/urlparse.c', |
| 121 | +'ngtcp2/third-party/libev/ev.c', |
92 | 122 | ] |
93 | 123 | }, |
94 | 124 | 'targets': [ |
|
133 | 163 | 'HAVE_NETINET_IN_H', |
134 | 164 | ], |
135 | 165 | }], |
136 | | -# TODO: Support OpenSSL 3.5 shared library builds. |
137 | | -# The complexity here is that we need to use the ngtcp2 ossl |
138 | | -# adapter, which does not include any conditional checks to |
139 | | -# see if the version of OpenSSL used has the necessary QUIC |
140 | | -# APIs, so we need to ensure that we conditionally enable use |
141 | | -# of the adapter only when we know that the OpenSSL version we |
142 | | -# are compiling against has the necessary APIs. We can do that |
143 | | -# by checkig the OpenSSL version number but, currently, the |
144 | | -# code that does so checks only the VERSION.dat file that is |
145 | | -# bundled with the openssl dependency. We'll need to update |
146 | | -# that to support the shared library case, where the version |
147 | | -# of the shared library needs to be determined. |
148 | | -# |
149 | 166 | # TODO: Support Boringssl here also. ngtcp2 provides an adapter |
150 | 167 | # for Boringssl. If we can detect that boringssl is being used |
151 | 168 | # here then we can use that adapter and also set the |
|
227 | 244 | 'sources': [ |
228 | 245 | '<@(nghttp3_sources)' |
229 | 246 | ] |
| 247 | + }, |
| 248 | + { |
| 249 | +'target_name': 'ngtcp2_test_server', |
| 250 | +'type': 'executable', |
| 251 | +'cflags': [ '-Wno-everything' ], |
| 252 | +'include_dirs': [ |
| 253 | +'', |
| 254 | +'ngtcp2/examples/', |
| 255 | +'ngtcp2/lib/includes/', |
| 256 | +'ngtcp2/crypto/includes/', |
| 257 | +'ngtcp2/third-party/urlparse/', |
| 258 | +'ngtcp2/third-party/libev/', |
| 259 | +'../../nghttp2/lib', |
| 260 | + ], |
| 261 | +'dependencies': [ |
| 262 | +'ngtcp2', |
| 263 | +'nghttp3', |
| 264 | +'../openssl/openssl.gyp:openssl', |
| 265 | +'../nghttp2/nghttp2.gyp:sfparse', |
| 266 | + ], |
| 267 | +'defines': [ |
| 268 | +'HAVE_CONFIG_H', |
| 269 | +'WITH_EXAMPLE_OSSL', |
| 270 | +'EV_STANDALONE=1', |
| 271 | + ], |
| 272 | +'conditions': [ |
| 273 | + ['OS=="mac"', { |
| 274 | +'defines': [ |
| 275 | +'__APPLE_USE_RFC_3542', |
| 276 | + ] |
| 277 | + }], |
| 278 | + ['OS=="solaris"', { |
| 279 | +'defines': [ |
| 280 | +'IPTOS_ECN_MASK=0x03', |
| 281 | + ], |
| 282 | +'link_settings': { |
| 283 | +'libraries': [ '-lsocket', '-lnsl' ], |
| 284 | + }, |
| 285 | + }], |
| 286 | + ['OS=="win"', { |
| 287 | +'defines': [ |
| 288 | +'WIN32', |
| 289 | +'_WINDOWS', |
| 290 | + ], |
| 291 | +'msvs_settings': { |
| 292 | +'VCCLCompilerTool': { |
| 293 | +'CompileAs': '1' |
| 294 | + }, |
| 295 | + }, |
| 296 | + }], |
| 297 | + ['OS!="win"', { |
| 298 | +'defines': [ |
| 299 | +'HAVE_UNISTD_H', |
| 300 | +'HAVE_ARPA_INET_H', |
| 301 | +'HAVE_NETINET_IN_H', |
| 302 | +'HAVE_NETINET_IP_H', |
| 303 | + ], |
| 304 | + }], |
| 305 | + [ 'OS=="linux" or OS=="openharmony"', { |
| 306 | +'link_settings': { |
| 307 | +'libraries': [ '-ldl', '-lrt' ], |
| 308 | + }, |
| 309 | + }], |
| 310 | + ], |
| 311 | +'sources': [ |
| 312 | +'<@(ngtcp2_test_server_sources)' |
| 313 | + ] |
| 314 | + }, |
| 315 | + { |
| 316 | +'target_name': 'ngtcp2_test_client', |
| 317 | +'type': 'executable', |
| 318 | +'cflags': [ '-Wno-everything' ], |
| 319 | +'include_dirs': [ |
| 320 | +'', |
| 321 | +'ngtcp2/examples/', |
| 322 | +'ngtcp2/lib/includes/', |
| 323 | +'ngtcp2/crypto/includes/', |
| 324 | +'ngtcp2/third-party/urlparse/', |
| 325 | +'ngtcp2/third-party/libev/', |
| 326 | +'../../nghttp2/lib', |
| 327 | + ], |
| 328 | +'dependencies': [ |
| 329 | +'ngtcp2', |
| 330 | +'nghttp3', |
| 331 | +'../openssl/openssl.gyp:openssl', |
| 332 | +'../nghttp2/nghttp2.gyp:sfparse', |
| 333 | + ], |
| 334 | +'defines': [ |
| 335 | +'HAVE_CONFIG_H', |
| 336 | +'WITH_EXAMPLE_OSSL', |
| 337 | +'EV_STANDALONE=1', |
| 338 | + ], |
| 339 | +'conditions': [ |
| 340 | + ['OS=="mac"', { |
| 341 | +'defines': [ |
| 342 | +'__APPLE_USE_RFC_3542', |
| 343 | + ] |
| 344 | + }], |
| 345 | + ['OS=="solaris"', { |
| 346 | +'defines': [ |
| 347 | +'IPTOS_ECN_MASK=0x03', |
| 348 | + ], |
| 349 | +'link_settings': { |
| 350 | +'libraries': [ '-lsocket', '-lnsl' ], |
| 351 | + }, |
| 352 | + }], |
| 353 | + ['OS=="win"', { |
| 354 | +'defines': [ |
| 355 | +'WIN32', |
| 356 | +'_WINDOWS', |
| 357 | + ], |
| 358 | +'msvs_settings': { |
| 359 | +'VCCLCompilerTool': { |
| 360 | +'CompileAs': '1' |
| 361 | + }, |
| 362 | + }, |
| 363 | + }], |
| 364 | + ['OS!="win"', { |
| 365 | +'defines': [ |
| 366 | +'HAVE_UNISTD_H', |
| 367 | +'HAVE_ARPA_INET_H', |
| 368 | +'HAVE_NETINET_IN_H', |
| 369 | +'HAVE_NETINET_IP_H', |
| 370 | + ], |
| 371 | + }], |
| 372 | + [ 'OS=="linux" or OS=="openharmony"', { |
| 373 | +'link_settings': { |
| 374 | +'libraries': [ '-ldl', '-lrt' ], |
| 375 | + }, |
| 376 | + }], |
| 377 | + ], |
| 378 | +'sources': [ |
| 379 | +'<@(ngtcp2_test_client_sources)' |
| 380 | + ] |
230 | 381 | } |
231 | 382 | ] |
232 | 383 | } |
0 commit comments