protocol-quic 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/ext/rakefile.rb +12 -0
  4. data/ext/ruby-protocol-quic-lock.yml +67 -0
  5. data/ext/teapot.rb +49 -0
  6. data/lib/protocol/quic/version.rb +4 -2
  7. data/lib/protocol/quic.rb +5 -5
  8. data/license.md +1 -1
  9. data/readme.md +55 -0
  10. data/releases.md +3 -0
  11. data.tar.gz.sig +0 -0
  12. metadata +32 -350
  13. metadata.gz.sig +0 -0
  14. data/ext/ngtcp2/AUTHORS +0 -44
  15. data/ext/ngtcp2/CMakeLists.txt +0 -431
  16. data/ext/ngtcp2/CMakeOptions.txt +0 -17
  17. data/ext/ngtcp2/COPYING +0 -22
  18. data/ext/ngtcp2/ChangeLog +0 -0
  19. data/ext/ngtcp2/Makefile.am +0 -60
  20. data/ext/ngtcp2/NEWS +0 -0
  21. data/ext/ngtcp2/README +0 -1
  22. data/ext/ngtcp2/README.rst +0 -258
  23. data/ext/ngtcp2/ci/build_boringssl.sh +0 -10
  24. data/ext/ngtcp2/ci/build_nghttp3.sh +0 -9
  25. data/ext/ngtcp2/ci/build_openssl1.sh +0 -8
  26. data/ext/ngtcp2/ci/build_openssl1_cross.sh +0 -9
  27. data/ext/ngtcp2/ci/build_openssl3.sh +0 -8
  28. data/ext/ngtcp2/ci/build_picotls.sh +0 -26
  29. data/ext/ngtcp2/ci/build_wolfssl.sh +0 -9
  30. data/ext/ngtcp2/ci/gen-certificate.sh +0 -8
  31. data/ext/ngtcp2/cmake/ExtractValidFlags.cmake +0 -31
  32. data/ext/ngtcp2/cmake/FindCUnit.cmake +0 -40
  33. data/ext/ngtcp2/cmake/FindJemalloc.cmake +0 -40
  34. data/ext/ngtcp2/cmake/FindLibev.cmake +0 -38
  35. data/ext/ngtcp2/cmake/FindLibnghttp3.cmake +0 -41
  36. data/ext/ngtcp2/cmake/Findwolfssl.cmake +0 -41
  37. data/ext/ngtcp2/cmake/Version.cmake +0 -11
  38. data/ext/ngtcp2/cmakeconfig.h.in +0 -36
  39. data/ext/ngtcp2/configure.ac +0 -755
  40. data/ext/ngtcp2/crypto/CMakeLists.txt +0 -56
  41. data/ext/ngtcp2/crypto/Makefile.am +0 -49
  42. data/ext/ngtcp2/crypto/boringssl/CMakeLists.txt +0 -64
  43. data/ext/ngtcp2/crypto/boringssl/Makefile.am +0 -39
  44. data/ext/ngtcp2/crypto/boringssl/boringssl.c +0 -630
  45. data/ext/ngtcp2/crypto/boringssl/libngtcp2_crypto_boringssl.pc.in +0 -33
  46. data/ext/ngtcp2/crypto/gnutls/CMakeLists.txt +0 -86
  47. data/ext/ngtcp2/crypto/gnutls/Makefile.am +0 -43
  48. data/ext/ngtcp2/crypto/gnutls/gnutls.c +0 -644
  49. data/ext/ngtcp2/crypto/gnutls/libngtcp2_crypto_gnutls.pc.in +0 -33
  50. data/ext/ngtcp2/crypto/includes/CMakeLists.txt +0 -56
  51. data/ext/ngtcp2/crypto/includes/Makefile.am +0 -45
  52. data/ext/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h +0 -893
  53. data/ext/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto_boringssl.h +0 -104
  54. data/ext/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto_gnutls.h +0 -107
  55. data/ext/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto_openssl.h +0 -132
  56. data/ext/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto_picotls.h +0 -246
  57. data/ext/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto_wolfssl.h +0 -106
  58. data/ext/ngtcp2/crypto/openssl/CMakeLists.txt +0 -86
  59. data/ext/ngtcp2/crypto/openssl/Makefile.am +0 -43
  60. data/ext/ngtcp2/crypto/openssl/libngtcp2_crypto_openssl.pc.in +0 -33
  61. data/ext/ngtcp2/crypto/openssl/openssl.c +0 -807
  62. data/ext/ngtcp2/crypto/picotls/CMakeLists.txt +0 -65
  63. data/ext/ngtcp2/crypto/picotls/Makefile.am +0 -39
  64. data/ext/ngtcp2/crypto/picotls/libngtcp2_crypto_picotls.pc.in +0 -33
  65. data/ext/ngtcp2/crypto/picotls/picotls.c +0 -707
  66. data/ext/ngtcp2/crypto/shared.c +0 -1431
  67. data/ext/ngtcp2/crypto/shared.h +0 -350
  68. data/ext/ngtcp2/crypto/wolfssl/CMakeLists.txt +0 -84
  69. data/ext/ngtcp2/crypto/wolfssl/Makefile.am +0 -43
  70. data/ext/ngtcp2/crypto/wolfssl/libngtcp2_crypto_wolfssl.pc.in +0 -33
  71. data/ext/ngtcp2/crypto/wolfssl/wolfssl.c +0 -534
  72. data/ext/ngtcp2/doc/Makefile.am +0 -65
  73. data/ext/ngtcp2/doc/make.bat +0 -35
  74. data/ext/ngtcp2/doc/mkapiref.py +0 -356
  75. data/ext/ngtcp2/doc/source/conf.py.in +0 -94
  76. data/ext/ngtcp2/doc/source/index.rst +0 -22
  77. data/ext/ngtcp2/doc/source/programmers-guide.rst +0 -476
  78. data/ext/ngtcp2/docker/Dockerfile +0 -39
  79. data/ext/ngtcp2/examples/CMakeLists.txt +0 -361
  80. data/ext/ngtcp2/examples/Makefile.am +0 -228
  81. data/ext/ngtcp2/examples/client.cc +0 -3049
  82. data/ext/ngtcp2/examples/client.h +0 -192
  83. data/ext/ngtcp2/examples/client_base.cc +0 -202
  84. data/ext/ngtcp2/examples/client_base.h +0 -213
  85. data/ext/ngtcp2/examples/debug.cc +0 -298
  86. data/ext/ngtcp2/examples/debug.h +0 -124
  87. data/ext/ngtcp2/examples/examplestest.cc +0 -84
  88. data/ext/ngtcp2/examples/gtlssimpleclient.c +0 -720
  89. data/ext/ngtcp2/examples/h09client.cc +0 -2601
  90. data/ext/ngtcp2/examples/h09client.h +0 -196
  91. data/ext/ngtcp2/examples/h09server.cc +0 -3024
  92. data/ext/ngtcp2/examples/h09server.h +0 -237
  93. data/ext/ngtcp2/examples/http.cc +0 -138
  94. data/ext/ngtcp2/examples/http.h +0 -44
  95. data/ext/ngtcp2/examples/network.h +0 -80
  96. data/ext/ngtcp2/examples/server.cc +0 -3731
  97. data/ext/ngtcp2/examples/server.h +0 -256
  98. data/ext/ngtcp2/examples/server_base.cc +0 -58
  99. data/ext/ngtcp2/examples/server_base.h +0 -195
  100. data/ext/ngtcp2/examples/shared.cc +0 -385
  101. data/ext/ngtcp2/examples/shared.h +0 -96
  102. data/ext/ngtcp2/examples/simpleclient.c +0 -683
  103. data/ext/ngtcp2/examples/template.h +0 -71
  104. data/ext/ngtcp2/examples/tests/README.rst +0 -60
  105. data/ext/ngtcp2/examples/tests/__init__.py +0 -0
  106. data/ext/ngtcp2/examples/tests/config.ini.in +0 -32
  107. data/ext/ngtcp2/examples/tests/conftest.py +0 -28
  108. data/ext/ngtcp2/examples/tests/ngtcp2test/__init__.py +0 -6
  109. data/ext/ngtcp2/examples/tests/ngtcp2test/certs.py +0 -476
  110. data/ext/ngtcp2/examples/tests/ngtcp2test/client.py +0 -187
  111. data/ext/ngtcp2/examples/tests/ngtcp2test/env.py +0 -191
  112. data/ext/ngtcp2/examples/tests/ngtcp2test/log.py +0 -101
  113. data/ext/ngtcp2/examples/tests/ngtcp2test/server.py +0 -137
  114. data/ext/ngtcp2/examples/tests/ngtcp2test/tls.py +0 -983
  115. data/ext/ngtcp2/examples/tests/test_01_handshake.py +0 -30
  116. data/ext/ngtcp2/examples/tests/test_02_resume.py +0 -46
  117. data/ext/ngtcp2/examples/tests/test_03_earlydata.py +0 -56
  118. data/ext/ngtcp2/examples/tests/test_04_clientcert.py +0 -57
  119. data/ext/ngtcp2/examples/tests/test_05_ciphers.py +0 -46
  120. data/ext/ngtcp2/examples/tls_client_context.h +0 -52
  121. data/ext/ngtcp2/examples/tls_client_context_boringssl.cc +0 -126
  122. data/ext/ngtcp2/examples/tls_client_context_boringssl.h +0 -49
  123. data/ext/ngtcp2/examples/tls_client_context_gnutls.cc +0 -74
  124. data/ext/ngtcp2/examples/tls_client_context_gnutls.h +0 -50
  125. data/ext/ngtcp2/examples/tls_client_context_openssl.cc +0 -137
  126. data/ext/ngtcp2/examples/tls_client_context_openssl.h +0 -49
  127. data/ext/ngtcp2/examples/tls_client_context_picotls.cc +0 -158
  128. data/ext/ngtcp2/examples/tls_client_context_picotls.h +0 -53
  129. data/ext/ngtcp2/examples/tls_client_context_wolfssl.cc +0 -177
  130. data/ext/ngtcp2/examples/tls_client_context_wolfssl.h +0 -51
  131. data/ext/ngtcp2/examples/tls_client_session.h +0 -52
  132. data/ext/ngtcp2/examples/tls_client_session_boringssl.cc +0 -110
  133. data/ext/ngtcp2/examples/tls_client_session_boringssl.h +0 -52
  134. data/ext/ngtcp2/examples/tls_client_session_gnutls.cc +0 -190
  135. data/ext/ngtcp2/examples/tls_client_session_gnutls.h +0 -52
  136. data/ext/ngtcp2/examples/tls_client_session_openssl.cc +0 -113
  137. data/ext/ngtcp2/examples/tls_client_session_openssl.h +0 -52
  138. data/ext/ngtcp2/examples/tls_client_session_picotls.cc +0 -147
  139. data/ext/ngtcp2/examples/tls_client_session_picotls.h +0 -52
  140. data/ext/ngtcp2/examples/tls_client_session_wolfssl.cc +0 -160
  141. data/ext/ngtcp2/examples/tls_client_session_wolfssl.h +0 -52
  142. data/ext/ngtcp2/examples/tls_server_context.h +0 -52
  143. data/ext/ngtcp2/examples/tls_server_context_boringssl.cc +0 -257
  144. data/ext/ngtcp2/examples/tls_server_context_boringssl.h +0 -54
  145. data/ext/ngtcp2/examples/tls_server_context_gnutls.cc +0 -99
  146. data/ext/ngtcp2/examples/tls_server_context_gnutls.h +0 -59
  147. data/ext/ngtcp2/examples/tls_server_context_openssl.cc +0 -338
  148. data/ext/ngtcp2/examples/tls_server_context_openssl.h +0 -54
  149. data/ext/ngtcp2/examples/tls_server_context_picotls.cc +0 -321
  150. data/ext/ngtcp2/examples/tls_server_context_picotls.h +0 -58
  151. data/ext/ngtcp2/examples/tls_server_context_wolfssl.cc +0 -284
  152. data/ext/ngtcp2/examples/tls_server_context_wolfssl.h +0 -55
  153. data/ext/ngtcp2/examples/tls_server_session.h +0 -52
  154. data/ext/ngtcp2/examples/tls_server_session_boringssl.cc +0 -84
  155. data/ext/ngtcp2/examples/tls_server_session_boringssl.h +0 -47
  156. data/ext/ngtcp2/examples/tls_server_session_gnutls.cc +0 -155
  157. data/ext/ngtcp2/examples/tls_server_session_gnutls.h +0 -46
  158. data/ext/ngtcp2/examples/tls_server_session_openssl.cc +0 -54
  159. data/ext/ngtcp2/examples/tls_server_session_openssl.h +0 -47
  160. data/ext/ngtcp2/examples/tls_server_session_picotls.cc +0 -70
  161. data/ext/ngtcp2/examples/tls_server_session_picotls.h +0 -47
  162. data/ext/ngtcp2/examples/tls_server_session_wolfssl.cc +0 -55
  163. data/ext/ngtcp2/examples/tls_server_session_wolfssl.h +0 -47
  164. data/ext/ngtcp2/examples/tls_session_base_gnutls.cc +0 -87
  165. data/ext/ngtcp2/examples/tls_session_base_gnutls.h +0 -51
  166. data/ext/ngtcp2/examples/tls_session_base_openssl.cc +0 -54
  167. data/ext/ngtcp2/examples/tls_session_base_openssl.h +0 -52
  168. data/ext/ngtcp2/examples/tls_session_base_picotls.cc +0 -56
  169. data/ext/ngtcp2/examples/tls_session_base_picotls.h +0 -54
  170. data/ext/ngtcp2/examples/tls_session_base_wolfssl.cc +0 -54
  171. data/ext/ngtcp2/examples/tls_session_base_wolfssl.h +0 -54
  172. data/ext/ngtcp2/examples/tls_shared_picotls.cc +0 -59
  173. data/ext/ngtcp2/examples/tls_shared_picotls.h +0 -36
  174. data/ext/ngtcp2/examples/util.cc +0 -646
  175. data/ext/ngtcp2/examples/util.h +0 -361
  176. data/ext/ngtcp2/examples/util_gnutls.cc +0 -136
  177. data/ext/ngtcp2/examples/util_openssl.cc +0 -131
  178. data/ext/ngtcp2/examples/util_test.cc +0 -237
  179. data/ext/ngtcp2/examples/util_test.h +0 -45
  180. data/ext/ngtcp2/examples/util_wolfssl.cc +0 -130
  181. data/ext/ngtcp2/fuzz/corpus/decode_frame/ack +0 -0
  182. data/ext/ngtcp2/fuzz/corpus/decode_frame/ack_ecn +0 -0
  183. data/ext/ngtcp2/fuzz/corpus/decode_frame/connection_close +0 -0
  184. data/ext/ngtcp2/fuzz/corpus/decode_frame/crypto +0 -1
  185. data/ext/ngtcp2/fuzz/corpus/decode_frame/data_blocked +0 -1
  186. data/ext/ngtcp2/fuzz/corpus/decode_frame/datagram +0 -1
  187. data/ext/ngtcp2/fuzz/corpus/decode_frame/datagram_len +0 -1
  188. data/ext/ngtcp2/fuzz/corpus/decode_frame/max_data +0 -1
  189. data/ext/ngtcp2/fuzz/corpus/decode_frame/max_stream_data +0 -0
  190. data/ext/ngtcp2/fuzz/corpus/decode_frame/max_streams +0 -0
  191. data/ext/ngtcp2/fuzz/corpus/decode_frame/new_connection_id +0 -1
  192. data/ext/ngtcp2/fuzz/corpus/decode_frame/new_token +0 -1
  193. data/ext/ngtcp2/fuzz/corpus/decode_frame/path_challenge +0 -1
  194. data/ext/ngtcp2/fuzz/corpus/decode_frame/path_response +0 -1
  195. data/ext/ngtcp2/fuzz/corpus/decode_frame/reset_stream +0 -0
  196. data/ext/ngtcp2/fuzz/corpus/decode_frame/retire_connection_id +0 -1
  197. data/ext/ngtcp2/fuzz/corpus/decode_frame/stop_sending +0 -0
  198. data/ext/ngtcp2/fuzz/corpus/decode_frame/stream +0 -0
  199. data/ext/ngtcp2/fuzz/corpus/decode_frame/stream_data_blocked +0 -0
  200. data/ext/ngtcp2/fuzz/corpus/decode_frame/stream_len +0 -0
  201. data/ext/ngtcp2/fuzz/corpus/decode_frame/streams_blocked +0 -0
  202. data/ext/ngtcp2/fuzz/corpus/ksl/random +0 -0
  203. data/ext/ngtcp2/fuzz/decode_frame.cc +0 -25
  204. data/ext/ngtcp2/fuzz/ksl.cc +0 -77
  205. data/ext/ngtcp2/interop/Dockerfile +0 -39
  206. data/ext/ngtcp2/interop/run_endpoint.sh +0 -93
  207. data/ext/ngtcp2/lib/CMakeLists.txt +0 -110
  208. data/ext/ngtcp2/lib/Makefile.am +0 -122
  209. data/ext/ngtcp2/lib/includes/CMakeLists.txt +0 -4
  210. data/ext/ngtcp2/lib/includes/Makefile.am +0 -25
  211. data/ext/ngtcp2/lib/includes/ngtcp2/ngtcp2.h +0 -5843
  212. data/ext/ngtcp2/lib/includes/ngtcp2/version.h.in +0 -51
  213. data/ext/ngtcp2/lib/libngtcp2.pc.in +0 -33
  214. data/ext/ngtcp2/lib/ngtcp2_acktr.c +0 -335
  215. data/ext/ngtcp2/lib/ngtcp2_acktr.h +0 -221
  216. data/ext/ngtcp2/lib/ngtcp2_addr.c +0 -117
  217. data/ext/ngtcp2/lib/ngtcp2_addr.h +0 -69
  218. data/ext/ngtcp2/lib/ngtcp2_balloc.c +0 -90
  219. data/ext/ngtcp2/lib/ngtcp2_balloc.h +0 -91
  220. data/ext/ngtcp2/lib/ngtcp2_bbr.c +0 -693
  221. data/ext/ngtcp2/lib/ngtcp2_bbr.h +0 -157
  222. data/ext/ngtcp2/lib/ngtcp2_bbr2.c +0 -1490
  223. data/ext/ngtcp2/lib/ngtcp2_bbr2.h +0 -149
  224. data/ext/ngtcp2/lib/ngtcp2_buf.c +0 -56
  225. data/ext/ngtcp2/lib/ngtcp2_buf.h +0 -108
  226. data/ext/ngtcp2/lib/ngtcp2_cc.c +0 -616
  227. data/ext/ngtcp2/lib/ngtcp2_cc.h +0 -422
  228. data/ext/ngtcp2/lib/ngtcp2_cid.c +0 -147
  229. data/ext/ngtcp2/lib/ngtcp2_cid.h +0 -175
  230. data/ext/ngtcp2/lib/ngtcp2_conn.c +0 -13731
  231. data/ext/ngtcp2/lib/ngtcp2_conn.h +0 -1119
  232. data/ext/ngtcp2/lib/ngtcp2_conn_stat.h +0 -131
  233. data/ext/ngtcp2/lib/ngtcp2_conv.c +0 -291
  234. data/ext/ngtcp2/lib/ngtcp2_conv.h +0 -208
  235. data/ext/ngtcp2/lib/ngtcp2_crypto.c +0 -895
  236. data/ext/ngtcp2/lib/ngtcp2_crypto.h +0 -148
  237. data/ext/ngtcp2/lib/ngtcp2_err.c +0 -154
  238. data/ext/ngtcp2/lib/ngtcp2_err.h +0 -34
  239. data/ext/ngtcp2/lib/ngtcp2_gaptr.c +0 -167
  240. data/ext/ngtcp2/lib/ngtcp2_gaptr.h +0 -98
  241. data/ext/ngtcp2/lib/ngtcp2_idtr.c +0 -79
  242. data/ext/ngtcp2/lib/ngtcp2_idtr.h +0 -89
  243. data/ext/ngtcp2/lib/ngtcp2_ksl.c +0 -819
  244. data/ext/ngtcp2/lib/ngtcp2_ksl.h +0 -345
  245. data/ext/ngtcp2/lib/ngtcp2_log.c +0 -822
  246. data/ext/ngtcp2/lib/ngtcp2_log.h +0 -123
  247. data/ext/ngtcp2/lib/ngtcp2_macro.h +0 -58
  248. data/ext/ngtcp2/lib/ngtcp2_map.c +0 -336
  249. data/ext/ngtcp2/lib/ngtcp2_map.h +0 -136
  250. data/ext/ngtcp2/lib/ngtcp2_mem.c +0 -113
  251. data/ext/ngtcp2/lib/ngtcp2_mem.h +0 -72
  252. data/ext/ngtcp2/lib/ngtcp2_net.h +0 -136
  253. data/ext/ngtcp2/lib/ngtcp2_objalloc.c +0 -40
  254. data/ext/ngtcp2/lib/ngtcp2_objalloc.h +0 -140
  255. data/ext/ngtcp2/lib/ngtcp2_opl.c +0 -46
  256. data/ext/ngtcp2/lib/ngtcp2_opl.h +0 -65
  257. data/ext/ngtcp2/lib/ngtcp2_path.c +0 -77
  258. data/ext/ngtcp2/lib/ngtcp2_path.h +0 -49
  259. data/ext/ngtcp2/lib/ngtcp2_pkt.c +0 -2527
  260. data/ext/ngtcp2/lib/ngtcp2_pkt.h +0 -1235
  261. data/ext/ngtcp2/lib/ngtcp2_pmtud.c +0 -160
  262. data/ext/ngtcp2/lib/ngtcp2_pmtud.h +0 -123
  263. data/ext/ngtcp2/lib/ngtcp2_ppe.c +0 -230
  264. data/ext/ngtcp2/lib/ngtcp2_ppe.h +0 -153
  265. data/ext/ngtcp2/lib/ngtcp2_pq.c +0 -164
  266. data/ext/ngtcp2/lib/ngtcp2_pq.h +0 -126
  267. data/ext/ngtcp2/lib/ngtcp2_pv.c +0 -172
  268. data/ext/ngtcp2/lib/ngtcp2_pv.h +0 -194
  269. data/ext/ngtcp2/lib/ngtcp2_qlog.c +0 -1219
  270. data/ext/ngtcp2/lib/ngtcp2_qlog.h +0 -161
  271. data/ext/ngtcp2/lib/ngtcp2_range.c +0 -61
  272. data/ext/ngtcp2/lib/ngtcp2_range.h +0 -80
  273. data/ext/ngtcp2/lib/ngtcp2_rcvry.h +0 -40
  274. data/ext/ngtcp2/lib/ngtcp2_ringbuf.c +0 -121
  275. data/ext/ngtcp2/lib/ngtcp2_ringbuf.h +0 -132
  276. data/ext/ngtcp2/lib/ngtcp2_rob.c +0 -319
  277. data/ext/ngtcp2/lib/ngtcp2_rob.h +0 -197
  278. data/ext/ngtcp2/lib/ngtcp2_rst.c +0 -138
  279. data/ext/ngtcp2/lib/ngtcp2_rst.h +0 -86
  280. data/ext/ngtcp2/lib/ngtcp2_rtb.c +0 -1676
  281. data/ext/ngtcp2/lib/ngtcp2_rtb.h +0 -468
  282. data/ext/ngtcp2/lib/ngtcp2_str.c +0 -233
  283. data/ext/ngtcp2/lib/ngtcp2_str.h +0 -94
  284. data/ext/ngtcp2/lib/ngtcp2_strm.c +0 -698
  285. data/ext/ngtcp2/lib/ngtcp2_strm.h +0 -310
  286. data/ext/ngtcp2/lib/ngtcp2_unreachable.c +0 -71
  287. data/ext/ngtcp2/lib/ngtcp2_unreachable.h +0 -46
  288. data/ext/ngtcp2/lib/ngtcp2_vec.c +0 -243
  289. data/ext/ngtcp2/lib/ngtcp2_vec.h +0 -120
  290. data/ext/ngtcp2/lib/ngtcp2_version.c +0 -39
  291. data/ext/ngtcp2/lib/ngtcp2_window_filter.c +0 -99
  292. data/ext/ngtcp2/lib/ngtcp2_window_filter.h +0 -65
  293. data/ext/ngtcp2/m4/ax_check_compile_flag.m4 +0 -74
  294. data/ext/ngtcp2/m4/ax_cxx_compile_stdcxx.m4 +0 -1009
  295. data/ext/ngtcp2/tests/CMakeLists.txt +0 -68
  296. data/ext/ngtcp2/tests/Makefile.am +0 -94
  297. data/ext/ngtcp2/tests/main.c +0 -358
  298. data/ext/ngtcp2/tests/ngtcp2_acktr_test.c +0 -367
  299. data/ext/ngtcp2/tests/ngtcp2_acktr_test.h +0 -37
  300. data/ext/ngtcp2/tests/ngtcp2_conn_test.c +0 -9821
  301. data/ext/ngtcp2/tests/ngtcp2_conn_test.h +0 -104
  302. data/ext/ngtcp2/tests/ngtcp2_conv_test.c +0 -430
  303. data/ext/ngtcp2/tests/ngtcp2_conv_test.h +0 -46
  304. data/ext/ngtcp2/tests/ngtcp2_crypto_test.c +0 -667
  305. data/ext/ngtcp2/tests/ngtcp2_crypto_test.h +0 -35
  306. data/ext/ngtcp2/tests/ngtcp2_gaptr_test.c +0 -127
  307. data/ext/ngtcp2/tests/ngtcp2_gaptr_test.h +0 -36
  308. data/ext/ngtcp2/tests/ngtcp2_idtr_test.c +0 -79
  309. data/ext/ngtcp2/tests/ngtcp2_idtr_test.h +0 -34
  310. data/ext/ngtcp2/tests/ngtcp2_ksl_test.c +0 -502
  311. data/ext/ngtcp2/tests/ngtcp2_ksl_test.h +0 -39
  312. data/ext/ngtcp2/tests/ngtcp2_map_test.c +0 -206
  313. data/ext/ngtcp2/tests/ngtcp2_map_test.h +0 -38
  314. data/ext/ngtcp2/tests/ngtcp2_pkt_test.c +0 -1645
  315. data/ext/ngtcp2/tests/ngtcp2_pkt_test.h +0 -68
  316. data/ext/ngtcp2/tests/ngtcp2_pmtud_test.c +0 -153
  317. data/ext/ngtcp2/tests/ngtcp2_pmtud_test.h +0 -34
  318. data/ext/ngtcp2/tests/ngtcp2_pv_test.c +0 -129
  319. data/ext/ngtcp2/tests/ngtcp2_pv_test.h +0 -35
  320. data/ext/ngtcp2/tests/ngtcp2_range_test.c +0 -105
  321. data/ext/ngtcp2/tests/ngtcp2_range_test.h +0 -36
  322. data/ext/ngtcp2/tests/ngtcp2_ringbuf_test.c +0 -91
  323. data/ext/ngtcp2/tests/ngtcp2_ringbuf_test.h +0 -35
  324. data/ext/ngtcp2/tests/ngtcp2_rob_test.c +0 -552
  325. data/ext/ngtcp2/tests/ngtcp2_rob_test.h +0 -37
  326. data/ext/ngtcp2/tests/ngtcp2_rtb_test.c +0 -470
  327. data/ext/ngtcp2/tests/ngtcp2_rtb_test.h +0 -38
  328. data/ext/ngtcp2/tests/ngtcp2_str_test.c +0 -96
  329. data/ext/ngtcp2/tests/ngtcp2_str_test.h +0 -36
  330. data/ext/ngtcp2/tests/ngtcp2_strm_test.c +0 -575
  331. data/ext/ngtcp2/tests/ngtcp2_strm_test.h +0 -36
  332. data/ext/ngtcp2/tests/ngtcp2_test_helper.c +0 -404
  333. data/ext/ngtcp2/tests/ngtcp2_test_helper.h +0 -191
  334. data/ext/ngtcp2/tests/ngtcp2_vec_test.c +0 -426
  335. data/ext/ngtcp2/tests/ngtcp2_vec_test.h +0 -36
  336. data/ext/ngtcp2/third-party/CMakeLists.txt +0 -34
  337. data/ext/ngtcp2/third-party/Makefile.am +0 -31
  338. data/ext/ngtcp2/third-party/http-parser/AUTHORS +0 -68
  339. data/ext/ngtcp2/third-party/http-parser/LICENSE-MIT +0 -23
  340. data/ext/ngtcp2/third-party/http-parser/Makefile +0 -157
  341. data/ext/ngtcp2/third-party/http-parser/README.md +0 -246
  342. data/ext/ngtcp2/third-party/http-parser/bench.c +0 -111
  343. data/ext/ngtcp2/third-party/http-parser/contrib/parsertrace.c +0 -160
  344. data/ext/ngtcp2/third-party/http-parser/contrib/url_parser.c +0 -47
  345. data/ext/ngtcp2/third-party/http-parser/http_parser.c +0 -2419
  346. data/ext/ngtcp2/third-party/http-parser/http_parser.gyp +0 -111
  347. data/ext/ngtcp2/third-party/http-parser/http_parser.h +0 -431
  348. data/ext/ngtcp2/third-party/http-parser/test.c +0 -4411
@@ -1,755 +0,0 @@
1
- # ngtcp2
2
- #
3
- # Copyright (c) 2016 ngtcp2 contributors
4
- # Copyright (c) 2012 nghttp2 contributors
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining
7
- # a copy of this software and associated documentation files (the
8
- # "Software"), to deal in the Software without restriction, including
9
- # without limitation the rights to use, copy, modify, merge, publish,
10
- # distribute, sublicense, and/or sell copies of the Software, and to
11
- # permit persons to whom the Software is furnished to do so, subject to
12
- # the following conditions:
13
- #
14
- # The above copyright notice and this permission notice shall be
15
- # included in all copies or substantial portions of the Software.
16
- #
17
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
- # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
- # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
- # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
- # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
- # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
- # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
- AC_PREREQ(2.61)
25
- AC_INIT([ngtcp2], [0.14.0-DEV], [t-tujikawa@users.sourceforge.net])
26
- AC_CONFIG_AUX_DIR([.])
27
- AC_CONFIG_MACRO_DIR([m4])
28
- AC_CONFIG_HEADERS([config.h])
29
- AC_USE_SYSTEM_EXTENSIONS
30
-
31
- LT_PREREQ([2.2.6])
32
- LT_INIT()
33
-
34
- AC_CANONICAL_BUILD
35
- AC_CANONICAL_HOST
36
- AC_CANONICAL_TARGET
37
-
38
- AM_INIT_AUTOMAKE([subdir-objects])
39
-
40
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
41
-
42
- # See versioning rule:
43
- # https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
44
- AC_SUBST(LT_CURRENT, 10)
45
- AC_SUBST(LT_REVISION, 1)
46
- AC_SUBST(LT_AGE, 0)
47
-
48
- AC_SUBST(CRYPTO_OPENSSL_LT_CURRENT, 4)
49
- AC_SUBST(CRYPTO_OPENSSL_LT_REVISION, 0)
50
- AC_SUBST(CRYPTO_OPENSSL_LT_AGE, 0)
51
-
52
- AC_SUBST(CRYPTO_GNUTLS_LT_CURRENT, 4)
53
- AC_SUBST(CRYPTO_GNUTLS_LT_REVISION, 0)
54
- AC_SUBST(CRYPTO_GNUTLS_LT_AGE, 0)
55
-
56
- AC_SUBST(CRYPTO_WOLFSSL_LT_CURRENT, 1)
57
- AC_SUBST(CRYPTO_WOLFSSL_LT_REVISION, 0)
58
- AC_SUBST(CRYPTO_WOLFSSL_LT_AGE, 0)
59
-
60
- # from nghttp2
61
- major=`echo $PACKAGE_VERSION |cut -d. -f1 | sed -e "s/[^0-9]//g"`
62
- minor=`echo $PACKAGE_VERSION |cut -d. -f2 | sed -e "s/[^0-9]//g"`
63
- patch=`echo $PACKAGE_VERSION |cut -d. -f3 | cut -d- -f1 | sed -e "s/[^0-9]//g"`
64
-
65
- PACKAGE_VERSION_NUM=`printf "0x%02x%02x%02x" "$major" "$minor" "$patch"`
66
-
67
- AC_SUBST(PACKAGE_VERSION_NUM)
68
-
69
- # Checks for command-line options from ngtcp2
70
- AC_ARG_ENABLE([werror],
71
- [AS_HELP_STRING([--enable-werror],
72
- [Turn on compile time warnings])],
73
- [werror=$enableval], [werror=no])
74
-
75
- AC_ARG_ENABLE([debug],
76
- [AS_HELP_STRING([--enable-debug],
77
- [Turn on debug output])],
78
- [debug=$enableval], [debug=no])
79
-
80
- if test "x${debug}" = "xyes"; then
81
- DEBUGCFLAGS="-O0 -g3"
82
- AC_SUBST([DEBUGCFLAGS])
83
- AC_DEFINE([DEBUGBUILD], [1], [Define to 1 to enable debug output.])
84
- fi
85
-
86
- AC_ARG_ENABLE([memdebug],
87
- [AS_HELP_STRING([--enable-memdebug],
88
- [Turn on memory allocation debug output])],
89
- [memdebug=$enableval], [memdebug=no])
90
-
91
- AC_ARG_ENABLE([mempool],
92
- [AS_HELP_STRING([--enable-mempool], [Turn on memory pool [default=yes]])],
93
- [mempool=$enableval], [mempool=yes])
94
-
95
- AC_ARG_ENABLE(asan,
96
- AS_HELP_STRING([--enable-asan],
97
- [Enable AddressSanitizer (ASAN)]),
98
- [asan=$enableval], [asan=no])
99
-
100
- AC_ARG_ENABLE([lib-only],
101
- [AS_HELP_STRING([--enable-lib-only],
102
- [Build libngtcp2 and libngtcp2_crypto only.])],
103
- [lib_only=$enableval], [lib_only=no])
104
-
105
- AC_ARG_WITH([jemalloc],
106
- [AS_HELP_STRING([--with-jemalloc],
107
- [Use jemalloc [default=check]])],
108
- [request_jemalloc=$withval], [request_jemalloc=check])
109
-
110
- AC_ARG_WITH([cunit],
111
- [AS_HELP_STRING([--with-cunit],
112
- [Use cunit [default=check]])],
113
- [request_cunit=$withval], [request_cunit=check])
114
-
115
- AC_ARG_WITH([libnghttp3],
116
- [AS_HELP_STRING([--with-libnghttp3],
117
- [Use libnghttp3 [default=check]])],
118
- [request_libnghttp3=$withval], [request_libnghttp3=check])
119
-
120
- AC_ARG_WITH([libev],
121
- [AS_HELP_STRING([--with-libev],
122
- [Use libev [default=check]])],
123
- [request_libev=$withval], [request_libev=check])
124
-
125
- AC_ARG_WITH([openssl],
126
- [AS_HELP_STRING([--with-openssl],
127
- [Use openssl [default=check]])],
128
- [request_openssl=$withval], [request_openssl=check])
129
-
130
- AC_ARG_WITH([gnutls],
131
- [AS_HELP_STRING([--with-gnutls],
132
- [Use gnutls [default=no]])],
133
- [request_gnutls=$withval], [request_gnutls=no])
134
-
135
- AC_ARG_WITH([boringssl],
136
- [AS_HELP_STRING([--with-boringssl],
137
- [Use boringssl [default=no]])],
138
- [request_boringssl=$withval], [request_boringssl=no])
139
-
140
- AC_ARG_WITH([picotls],
141
- [AS_HELP_STRING([--with-picotls],
142
- [Use picotls [default=no]])],
143
- [request_picotls=$withval], [request_picotls=no])
144
-
145
- AC_ARG_WITH([wolfssl],
146
- [AS_HELP_STRING([--with-wolfssl],
147
- [Use wolfSSL [default=no]])],
148
- [request_wolfssl=$withval], [request_wolfssl=no])
149
-
150
- AC_ARG_VAR([BORINGSSL_CFLAGS], [C compiler flags for BORINGSSL])
151
- AC_ARG_VAR([BORINGSSL_LIBS], [linker flags for BORINGSSL])
152
-
153
- AC_ARG_VAR([PICOTLS_CFLAGS], [C compiler flags for PICOTLS])
154
- AC_ARG_VAR([PICOTLS_LIBS], [linker flags for PICOTLS])
155
-
156
- AC_ARG_VAR([WOLFSSL_CFLAGS], [C compiler flags for WOLFSSL])
157
- AC_ARG_VAR([WOLFSSL_LIBS], [linker flags for WOLFSSL])
158
-
159
- AC_ARG_VAR([LIBEV_CFLAGS], [C compiler flags for libev, skipping any checks])
160
- AC_ARG_VAR([LIBEV_LIBS], [linker flags for libev, skipping any checks])
161
-
162
- AC_ARG_VAR([JEMALLOC_CFLAGS],
163
- [C compiler flags for jemalloc, skipping any checks])
164
- AC_ARG_VAR([JEMALLOC_LIBS], [linker flags for jemalloc, skipping any checks])
165
-
166
- AC_ARG_VAR([LIBTOOL_LDFLAGS],
167
- [libtool specific flags (e.g., -static-libtool-libs)])
168
-
169
- # Checks for programs
170
- AC_PROG_CC
171
- AC_PROG_CXX
172
- AC_PROG_CPP
173
- AC_PROG_INSTALL
174
- AC_PROG_LN_S
175
- AC_PROG_MAKE_SET
176
- AC_PROG_MKDIR_P
177
-
178
- PKG_PROG_PKG_CONFIG([0.20])
179
-
180
- AX_CXX_COMPILE_STDCXX([20], [noext], [optional])
181
-
182
- case "${build}" in
183
- *-apple-darwin*)
184
- EXTRA_DEFS="-D__APPLE_USE_RFC_3542"
185
- AC_SUBST([EXTRA_DEFS])
186
- ;;
187
- esac
188
-
189
- # Checks for libraries.
190
-
191
- # cunit
192
- have_cunit=no
193
- if test "x${request_cunit}" != "xno"; then
194
- PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
195
- # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We
196
- # do this because Debian (Ubuntu) lacks pkg-config file for cunit.
197
- if test "x${have_cunit}" = "xno"; then
198
- AC_MSG_WARN([${CUNIT_PKG_ERRORS}])
199
- AC_CHECK_LIB([cunit], [CU_initialize_registry],
200
- [have_cunit=yes], [have_cunit=no])
201
- if test "x${have_cunit}" = "xyes"; then
202
- CUNIT_LIBS="-lcunit"
203
- CUNIT_CFLAGS=""
204
- AC_SUBST([CUNIT_LIBS])
205
- AC_SUBST([CUNIT_CFLAGS])
206
- fi
207
- fi
208
- if test "x${have_cunit}" = "xyes"; then
209
- # cunit in Mac OS X requires ncurses. Note that in Mac OS X, test
210
- # program can be built without -lncurses, but it emits runtime
211
- # error.
212
- case "${build}" in
213
- *-apple-darwin*)
214
- CUNIT_LIBS="$CUNIT_LIBS -lncurses"
215
- AC_SUBST([CUNIT_LIBS])
216
- ;;
217
- esac
218
- fi
219
- fi
220
-
221
- if test "x${request_cunit}" = "xyes" &&
222
- test "x${have_cunit}" != "xyes"; then
223
- AC_MSG_ERROR([cunit was requested (--with-cunit) but not found])
224
- fi
225
-
226
- AM_CONDITIONAL([HAVE_CUNIT], [ test "x${have_cunit}" = "xyes" ])
227
-
228
- AM_CONDITIONAL([ENABLE_SHARED], [ test "x${enable_shared}" = "xyes" ])
229
-
230
- # OpenSSL (required for libngtcp2_crypto_openssl,
231
- # libngtcp2_crypto_picotls and examples)
232
- have_openssl=no
233
- have_vanilla_openssl=no
234
- if test "x${request_openssl}" != "xno"; then
235
- PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.1.1],
236
- [have_openssl=yes], [have_openssl=no])
237
- if test "x${have_openssl}" = "xno"; then
238
- AC_MSG_NOTICE($OPENSSL_PKG_ERRORS)
239
- else
240
- have_vanilla_openssl=yes
241
- VANILLA_OPENSSL_LIBS="$OPENSSL_LIBS"
242
- VANILLA_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
243
-
244
- AC_SUBST(VANILLA_OPENSSL_LIBS)
245
- AC_SUBST(VANILLA_OPENSSL_CFLAGS)
246
-
247
- # Until OpenSSL gains mainline support for QUIC, check for a
248
- # patched version.
249
-
250
- save_CFLAGS="$CFLAGS"
251
- save_LIBS="$LIBS"
252
- CFLAGS="$OPENSSL_CFLAGS $CFLAGS"
253
- LIBS="$OPENSSL_LIBS $LIBS"
254
-
255
- AC_MSG_CHECKING([for SSL_is_quic])
256
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
257
- #include <openssl/ssl.h>
258
- ]], [[
259
- SSL *ssl = NULL;
260
- SSL_is_quic(ssl);
261
- ]])],
262
- [AC_MSG_RESULT([yes]); have_openssl_quic=yes],
263
- [AC_MSG_RESULT([no]); have_openssl_quic=no])
264
-
265
- CFLAGS="$save_CFLAGS"
266
- LIBS="$save_LIBS"
267
-
268
- if test "x${have_openssl_quic}" = "xno"; then
269
- AC_MSG_NOTICE([openssl does not have QUIC interface, disabling it])
270
- have_openssl=no
271
- OPENSSL_LIBS=
272
- OPENSSL_CFLAGS=
273
- fi
274
- fi
275
- fi
276
-
277
- if test "x${request_openssl}" = "xyes" &&
278
- test "x${have_openssl}" != "xyes"; then
279
- AC_MSG_ERROR([openssl was requested (--with-openssl) but not found])
280
- fi
281
-
282
- AM_CONDITIONAL([HAVE_OPENSSL], [ test "x${have_openssl}" = "xyes" ])
283
-
284
- # GnuTLS (required for libngtcp2_crypto_gnutls)
285
- have_gnutls=no
286
- if test "x${request_gnutls}" != "xno"; then
287
- PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.7.2],
288
- [have_gnutls=yes], [have_gnutls=no])
289
- if test "x${have_gnutls}" = "xno"; then
290
- AC_MSG_NOTICE($GNUTLS_PKG_ERRORS)
291
- fi
292
- fi
293
-
294
- if test "x${request_gnutls}" = "xyes" &&
295
- test "x${have_gnutls}" != "xyes"; then
296
- AC_MSG_ERROR([gnutls was requested (--with-gnutls) but not found])
297
- fi
298
-
299
- AM_CONDITIONAL([HAVE_GNUTLS], [ test "x${have_gnutls}" = "xyes" ])
300
-
301
- # BoringSSL (required for libngtcp2_crypto_boringssl)
302
- have_boringssl=no
303
- if test "x${request_boringssl}" != "xno"; then
304
- save_CFLAGS="$CFLAGS"
305
- save_LIBS="$LIBS"
306
- CFLAGS="$BORINGSSL_CFLAGS $CFLAGS"
307
- LIBS="$BORINGSSL_LIBS $LIBS"
308
-
309
- AC_MSG_CHECKING([for SSL_set_quic_early_data_context])
310
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
311
- #include <openssl/ssl.h>
312
- ]], [[
313
- SSL *ssl = NULL;
314
- SSL_set_quic_early_data_context(ssl, NULL, 0);
315
- ]])],
316
- [AC_MSG_RESULT([yes]); have_boringssl=yes],
317
- [AC_MSG_RESULT([no]); have_boringssl=no])
318
-
319
- CFLAGS="$save_CFLAGS"
320
- LIBS="$save_LIBS"
321
- fi
322
-
323
- if test "x${request_boringssl}" = "xyes" &&
324
- test "x${have_boringssl}" != "xyes"; then
325
- AC_MSG_ERROR([boringssl was requested (--with-boringssl) but not found])
326
- fi
327
-
328
- AM_CONDITIONAL([HAVE_BORINGSSL], [ test "x${have_boringssl}" = "xyes" ])
329
-
330
- # Picotls openssl backend (required for libngtcp2_crypto_picotls)
331
- have_picotls=no
332
- if test "x${request_picotls}" != "xno"; then
333
- save_CFLAGS="$CFLAGS"
334
- save_LIBS="$LIBS"
335
- CFLAGS="$PICOTLS_CFLAGS $VANILLA_OPENSSL_CFLAGS $CFLAGS"
336
- LIBS="$PICOTLS_LIBS $VANILLA_OPENSSL_LIBS $LIBS"
337
-
338
- AC_MSG_CHECKING([for ptls_openssl_random_bytes])
339
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
340
- #include <picotls.h>
341
- #include <picotls/openssl.h>
342
- ]], [[
343
- ptls_openssl_random_bytes(NULL, 0);
344
- ]])],
345
- [AC_MSG_RESULT([yes]); have_picotls=yes],
346
- [AC_MSG_RESULT([no]); have_picotls=no])
347
-
348
- CFLAGS="$save_CFLAGS"
349
- LIBS="$save_LIBS"
350
- fi
351
-
352
- if test "x${request_picotls}" = "xyes" &&
353
- test "x${have_picotls}" != "xyes"; then
354
- AC_MSG_ERROR([picotls was requested (--with-picotls) but not found])
355
- fi
356
-
357
- AM_CONDITIONAL([HAVE_PICOTLS], [ test "x${have_picotls}" = "xyes" ])
358
-
359
- # wolfSSL (required for libngtcp2_crypto_wolfssl)
360
- have_wolfssl=no
361
- if test "x${request_wolfssl}" != "xno"; then
362
- PKG_CHECK_MODULES([WOLFSSL], [wolfssl >= 5.5.0],
363
- [have_wolfssl=yes], [have_wolfssl=no])
364
- if test "x${have_wolfssl}" = "xno"; then
365
- AC_MSG_NOTICE($WOLFSSL_PKG_ERRORS)
366
- fi
367
- fi
368
-
369
- if test "x${request_wolfssl}" = "xyes" &&
370
- test "x${have_wolfssl}" != "xyes"; then
371
- AC_MSG_ERROR([wolfssl was requested (--with-wolfssl) but not found])
372
- fi
373
-
374
- AM_CONDITIONAL([HAVE_WOLFSSL], [ test "x${have_wolfssl}" = "xyes" ])
375
-
376
- have_crypto=no
377
- if test "x${have_openssl}" = "xyes" ||
378
- test "x${have_gnutls}" = "xyes" ||
379
- test "x${have_boringssl}" = "xyes" ||
380
- test "x${have_picotls}" = "xyes" ||
381
- test "x${have_wolfssl}" = "xyes"; then
382
- have_crypto=yes
383
- fi
384
-
385
- AM_CONDITIONAL([HAVE_CRYPTO], [ test "x${have_crypto}" = "xyes" ])
386
-
387
- # libnghttp3 (required for examples)
388
- have_libnghttp3=no
389
- if test "x${request_libnghttp3}" != "xno"; then
390
- PKG_CHECK_MODULES([LIBNGHTTP3], [libnghttp3 >= 0.2.0],
391
- [have_libnghttp3=yes], [have_libnghttp3=no])
392
- if test "${have_libnghttp3}" = "xno"; then
393
- AC_MSG_NOTICE($LIBNGHTTP3_PKG_ERRORS)
394
- fi
395
- fi
396
-
397
- if test "x${request_libnghttp3}" = "xyes" &&
398
- test "x${have_libnghttp3}" != "xyes"; then
399
- AC_MSG_ERROR([libnghttp3 was requested (--with-libnghttp3) but not found])
400
- fi
401
-
402
- AM_CONDITIONAL([HAVE_NGHTTP3], [ test "x${have_libnghttp3}" = "xyes" ])
403
-
404
- # libev (required for examples)
405
- have_libev=no
406
- if test "x${request_libev}" != "xno"; then
407
- if test "x${LIBEV_LIBS}" = "x" && test "x${LIBEV_CFLAGS}" = "x"; then
408
- # libev does not have pkg-config file. Check it in an old way.
409
- save_LIBS=$LIBS
410
- # android requires -lm for floor
411
- AC_CHECK_LIB([ev], [ev_time], [have_libev=yes], [have_libev=no], [-lm])
412
- if test "x${have_libev}" = "xyes"; then
413
- AC_CHECK_HEADER([ev.h], [have_libev=yes], [have_libev=no])
414
- if test "x${have_libev}" = "xyes"; then
415
- LIBEV_LIBS=-lev
416
- LIBEV_CFLAGS=
417
- fi
418
- fi
419
- LIBS=$save_LIBS
420
- else
421
- have_libev=yes
422
- fi
423
- fi
424
-
425
- if test "x${request_libev}" = "xyes" &&
426
- test "x${have_libev}" != "xyes"; then
427
- AC_MSG_ERROR([libev was requested (--with-libev) but not found])
428
- fi
429
-
430
- if test "x${lib_only}" = "xno" &&
431
- test "x${HAVE_CXX20}" != "x1"; then
432
- AC_MSG_WARN([C++ compiler is not capable of C++20. Examples will not be built.])
433
- fi
434
-
435
- enable_examples=no
436
- if test "x${lib_only}" = "xno" &&
437
- test "x${have_libnghttp3}" = "xyes" &&
438
- test "x${have_crypto}" = "xyes" &&
439
- test "x${have_libev}" = "xyes" &&
440
- test "x${HAVE_CXX20}" = "x1"; then
441
- enable_examples=yes
442
-
443
- if test "x${have_openssl}" = "xyes"; then
444
- AC_DEFINE([ENABLE_EXAMPLE_OPENSSL], [1],
445
- [Define to 1 in order to build examples/{client,server}])
446
- fi
447
-
448
- if test "x${have_gnutls}" = "xyes"; then
449
- AC_DEFINE([ENABLE_EXAMPLE_GNUTLS], [1],
450
- [Define to 1 in order to build examples/{gtlsclient,gtlsserver}])
451
- fi
452
-
453
- if test "x${have_boringssl}" = "xyes"; then
454
- AC_DEFINE([ENABLE_EXAMPLE_BORINGSSL], [1],
455
- [Define to 1 in order to build examples/{bsslclient,bsslserver}])
456
- fi
457
-
458
- if test "x${have_picotls}" = "xyes"; then
459
- AC_DEFINE([ENABLE_EXAMPLE_PICOTLS], [1],
460
- [Define to 1 in order to build examples/{ptlsclient,ptlsserver}])
461
- fi
462
-
463
- if test "x${have_wolfssl}" = "xyes"; then
464
- AC_DEFINE([ENABLE_EXAMPLE_WOLFSSL], [1],
465
- [Define to 1 in order to build examples/{wsslclient,wsslserver}])
466
- fi
467
- fi
468
-
469
- AM_CONDITIONAL([ENABLE_EXAMPLES], [ test "x${enable_examples}" = "xyes" ])
470
- AM_CONDITIONAL([ENABLE_EXAMPLE_OPENSSL], [ test "x${enable_examples}" = "xyes" && test "x${have_openssl}" = "xyes" ])
471
- AM_CONDITIONAL([ENABLE_EXAMPLE_GNUTLS], [ test "x${enable_examples}" = "xyes" && test "x${have_gnutls}" = "xyes" ])
472
- AM_CONDITIONAL([ENABLE_EXAMPLE_BORINGSSL], [ test "x${enable_examples}" = "xyes" && test "x${have_boringssl}" = "xyes" ])
473
- AM_CONDITIONAL([ENABLE_EXAMPLE_PICOTLS], [ test "x${enable_examples}" = "xyes" && test "x${have_picotls}" = "xyes" ])
474
- AM_CONDITIONAL([ENABLE_EXAMPLE_WOLFSSL], [ test "x${enable_examples}" = "xyes" && test "x${have_wolfssl}" = "xyes" ])
475
-
476
- AC_SUBST([EXAMPLES_ENABLED], "${enable_examples}")
477
- AC_SUBST([EXAMPLES_OPENSSL], "${have_openssl}")
478
- AC_SUBST([EXAMPLES_GNUTLS], "${have_gnutls}")
479
- AC_SUBST([EXAMPLES_BORINGSSL], "${have_boringssl}")
480
- AC_SUBST([EXAMPLES_PICOTLS], "${have_picotls}")
481
- AC_SUBST([EXAMPLES_WOLFSSL], "${have_wolfssl}")
482
-
483
- # jemalloc
484
- have_jemalloc=no
485
- if test "x${request_jemalloc}" != "xno"; then
486
- if test "x${JEMALLOC_LIBS}" = "x" && test "x${JEMALLOC_CFLAGS}" = "x"; then
487
- save_LIBS=$LIBS
488
- AC_SEARCH_LIBS([malloc_stats_print], [jemalloc], [have_jemalloc=yes], [],
489
- [$PTHREAD_LDFLAGS])
490
-
491
- if test "x${have_jemalloc}" = "xyes"; then
492
- jemalloc_libs=${ac_cv_search_malloc_stats_print}
493
- else
494
- # On Darwin, malloc_stats_print is je_malloc_stats_print
495
- AC_SEARCH_LIBS([je_malloc_stats_print], [jemalloc], [have_jemalloc=yes],
496
- [], [$PTHREAD_LDFLAGS])
497
-
498
- if test "x${have_jemalloc}" = "xyes"; then
499
- jemalloc_libs=${ac_cv_search_je_malloc_stats_print}
500
- fi
501
- fi
502
-
503
- LIBS=$save_LIBS
504
-
505
- if test "x${have_jemalloc}" = "xyes" &&
506
- test "x${jemalloc_libs}" != "xnone required"; then
507
- JEMALLOC_LIBS=${jemalloc_libs}
508
- fi
509
- else
510
- have_jemalloc=yes
511
- fi
512
- fi
513
-
514
- if test "x${request_jemalloc}" = "xyes" &&
515
- test "x${have_jemalloc}" != "xyes"; then
516
- AC_MSG_ERROR([jemalloc was requested (--with-jemalloc) but not found])
517
- fi
518
-
519
- # Checks for header files.
520
- AC_CHECK_HEADERS([ \
521
- arpa/inet.h \
522
- netinet/in.h \
523
- stddef.h \
524
- stdint.h \
525
- stdlib.h \
526
- string.h \
527
- unistd.h \
528
- sys/endian.h \
529
- endian.h \
530
- byteswap.h \
531
- asm/types.h \
532
- linux/netlink.h \
533
- linux/rtnetlink.h
534
- ])
535
-
536
- # Checks for typedefs, structures, and compiler characteristics.
537
- AC_TYPE_SIZE_T
538
- AC_TYPE_SSIZE_T
539
- AC_TYPE_UINT8_T
540
- AC_TYPE_UINT16_T
541
- AC_TYPE_UINT32_T
542
- AC_TYPE_UINT64_T
543
- AC_TYPE_INT8_T
544
- AC_TYPE_INT16_T
545
- AC_TYPE_INT32_T
546
- AC_TYPE_INT64_T
547
- AC_TYPE_OFF_T
548
- AC_TYPE_PID_T
549
- AC_TYPE_UID_T
550
- AC_CHECK_TYPES([ptrdiff_t])
551
- AC_C_BIGENDIAN
552
- AC_C_INLINE
553
- AC_SYS_LARGEFILE
554
-
555
- # Checks for library functions.
556
- AC_CHECK_FUNCS([ \
557
- memmove \
558
- memset \
559
- ])
560
-
561
- # Checks for symbols.
562
- AC_CHECK_DECLS([be64toh], [], [], [[
563
- #ifdef HAVE_ENDIAN_H
564
- # include <endian.h>
565
- #endif
566
- #ifdef HAVE_SYS_ENDIAN_H
567
- # include <sys/endian.h>
568
- #endif
569
- ]])
570
-
571
- AC_CHECK_DECLS([bswap_64], [], [], [[
572
- #include <byteswap.h>
573
- ]])
574
-
575
- # More compiler flags from nghttp2.
576
- save_CFLAGS=$CFLAGS
577
- save_CXXFLAGS=$CXXFLAGS
578
-
579
- CFLAGS=
580
- CXXFLAGS=
581
-
582
- if test "x$werror" != "xno"; then
583
- # For C compiler
584
- AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
585
- AX_CHECK_COMPILE_FLAG([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
586
- AX_CHECK_COMPILE_FLAG([-Werror], [CFLAGS="$CFLAGS -Werror"])
587
- AX_CHECK_COMPILE_FLAG([-Wmissing-prototypes], [CFLAGS="$CFLAGS -Wmissing-prototypes"])
588
- AX_CHECK_COMPILE_FLAG([-Wstrict-prototypes], [CFLAGS="$CFLAGS -Wstrict-prototypes"])
589
- AX_CHECK_COMPILE_FLAG([-Wmissing-declarations], [CFLAGS="$CFLAGS -Wmissing-declarations"])
590
- AX_CHECK_COMPILE_FLAG([-Wpointer-arith], [CFLAGS="$CFLAGS -Wpointer-arith"])
591
- AX_CHECK_COMPILE_FLAG([-Wdeclaration-after-statement], [CFLAGS="$CFLAGS -Wdeclaration-after-statement"])
592
- AX_CHECK_COMPILE_FLAG([-Wformat-security], [CFLAGS="$CFLAGS -Wformat-security"])
593
- AX_CHECK_COMPILE_FLAG([-Wwrite-strings], [CFLAGS="$CFLAGS -Wwrite-strings"])
594
- AX_CHECK_COMPILE_FLAG([-Wshadow], [CFLAGS="$CFLAGS -Wshadow"])
595
- AX_CHECK_COMPILE_FLAG([-Winline], [CFLAGS="$CFLAGS -Winline"])
596
- AX_CHECK_COMPILE_FLAG([-Wnested-externs], [CFLAGS="$CFLAGS -Wnested-externs"])
597
- AX_CHECK_COMPILE_FLAG([-Wfloat-equal], [CFLAGS="$CFLAGS -Wfloat-equal"])
598
- AX_CHECK_COMPILE_FLAG([-Wundef], [CFLAGS="$CFLAGS -Wundef"])
599
- AX_CHECK_COMPILE_FLAG([-Wendif-labels], [CFLAGS="$CFLAGS -Wendif-labels"])
600
- AX_CHECK_COMPILE_FLAG([-Wempty-body], [CFLAGS="$CFLAGS -Wempty-body"])
601
- AX_CHECK_COMPILE_FLAG([-Wcast-align], [CFLAGS="$CFLAGS -Wcast-align"])
602
- AX_CHECK_COMPILE_FLAG([-Wclobbered], [CFLAGS="$CFLAGS -Wclobbered"])
603
- AX_CHECK_COMPILE_FLAG([-Wvla], [CFLAGS="$CFLAGS -Wvla"])
604
- AX_CHECK_COMPILE_FLAG([-Wpragmas], [CFLAGS="$CFLAGS -Wpragmas"])
605
- AX_CHECK_COMPILE_FLAG([-Wunreachable-code], [CFLAGS="$CFLAGS -Wunreachable-code"])
606
- AX_CHECK_COMPILE_FLAG([-Waddress], [CFLAGS="$CFLAGS -Waddress"])
607
- AX_CHECK_COMPILE_FLAG([-Wattributes], [CFLAGS="$CFLAGS -Wattributes"])
608
- AX_CHECK_COMPILE_FLAG([-Wdiv-by-zero], [CFLAGS="$CFLAGS -Wdiv-by-zero"])
609
- AX_CHECK_COMPILE_FLAG([-Wshorten-64-to-32], [CFLAGS="$CFLAGS -Wshorten-64-to-32"])
610
-
611
- AX_CHECK_COMPILE_FLAG([-Wconversion], [CFLAGS="$CFLAGS -Wconversion"])
612
- AX_CHECK_COMPILE_FLAG([-Wextended-offsetof], [CFLAGS="$CFLAGS -Wextended-offsetof"])
613
- AX_CHECK_COMPILE_FLAG([-Wformat-nonliteral], [CFLAGS="$CFLAGS -Wformat-nonliteral"])
614
- AX_CHECK_COMPILE_FLAG([-Wlanguage-extension-token], [CFLAGS="$CFLAGS -Wlanguage-extension-token"])
615
- AX_CHECK_COMPILE_FLAG([-Wmissing-field-initializers], [CFLAGS="$CFLAGS -Wmissing-field-initializers"])
616
- AX_CHECK_COMPILE_FLAG([-Wmissing-noreturn], [CFLAGS="$CFLAGS -Wmissing-noreturn"])
617
- AX_CHECK_COMPILE_FLAG([-Wmissing-variable-declarations], [CFLAGS="$CFLAGS -Wmissing-variable-declarations"])
618
- # Not used because we cannot change public structs
619
- # AX_CHECK_COMPILE_FLAG([-Wpadded], [CFLAGS="$CFLAGS -Wpadded"])
620
- AX_CHECK_COMPILE_FLAG([-Wsign-conversion], [CFLAGS="$CFLAGS -Wsign-conversion"])
621
- # Not used because this basically disallows default case
622
- # AX_CHECK_COMPILE_FLAG([-Wswitch-enum], [CFLAGS="$CFLAGS -Wswitch-enum"])
623
- AX_CHECK_COMPILE_FLAG([-Wunreachable-code-break], [CFLAGS="$CFLAGS -Wunreachable-code-break"])
624
- AX_CHECK_COMPILE_FLAG([-Wunused-macros], [CFLAGS="$CFLAGS -Wunused-macros"])
625
- AX_CHECK_COMPILE_FLAG([-Wunused-parameter], [CFLAGS="$CFLAGS -Wunused-parameter"])
626
- AX_CHECK_COMPILE_FLAG([-Wredundant-decls], [CFLAGS="$CFLAGS -Wredundant-decls"])
627
- # Only work with Clang for the moment
628
- AX_CHECK_COMPILE_FLAG([-Wheader-guard], [CFLAGS="$CFLAGS -Wheader-guard"])
629
- AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CFLAGS="$CFLAGS -Wsometimes-uninitialized"])
630
-
631
- # Only work with gcc7 for the moment
632
- AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [CFLAGS="$CFLAGS -Wduplicated-branches"])
633
-
634
- # This is required because we pass format string as "const char*.
635
- AX_CHECK_COMPILE_FLAG([-Wno-format-nonliteral], [CFLAGS="$CFLAGS -Wno-format-nonliteral"])
636
-
637
- # For C++ compiler
638
- AC_LANG_PUSH(C++)
639
- AX_CHECK_COMPILE_FLAG([-Wall], [CXXFLAGS="$CXXFLAGS -Wall"])
640
- AX_CHECK_COMPILE_FLAG([-Werror], [CXXFLAGS="$CXXFLAGS -Werror"])
641
- AX_CHECK_COMPILE_FLAG([-Wformat-security], [CXXFLAGS="$CXXFLAGS -Wformat-security"])
642
- AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CXXFLAGS="$CXXFLAGS -Wsometimes-uninitialized"])
643
- # Disable noexcept-type warning of g++-7. This is not harmful as
644
- # long as all source files are compiled with the same compiler.
645
- AX_CHECK_COMPILE_FLAG([-Wno-noexcept-type], [CXXFLAGS="$CXXFLAGS -Wno-noexcept-type"])
646
- AC_LANG_POP()
647
- fi
648
-
649
- WARNCFLAGS=$CFLAGS
650
- WARNCXXFLAGS=$CXXFLAGS
651
-
652
- CFLAGS=$save_CFLAGS
653
- CXXFLAGS=$save_CXXFLAGS
654
-
655
- AC_SUBST([WARNCFLAGS])
656
- AC_SUBST([WARNCXXFLAGS])
657
-
658
- if test "x$asan" != "xno"; then
659
- # Assume both C and C++ compiler either support ASAN or not.
660
- save_LDFLAGS="$LDFLAGS"
661
- LDFLAGS="$LDFLAGS -fsanitize=address"
662
- AX_CHECK_COMPILE_FLAG([-fsanitize=address],
663
- [CFLAGS="$CFLAGS -fsanitize=address"; CXXFLAGS="$CXXFLAGS -fsanitize=address"],
664
- [LDFLAGS="$save_LDFLAGS"])
665
- fi
666
-
667
- if test "x${memdebug}" = "xyes"; then
668
- AC_DEFINE([MEMDEBUG], [1],
669
- [Define to 1 to enable memory allocation debug output.])
670
- fi
671
-
672
- if test "x${mempool}" != "xyes"; then
673
- AC_DEFINE([NOMEMPOOL], [1], [Define to 1 to disable memory pool.])
674
- fi
675
-
676
- # extra flags for API function visibility
677
- EXTRACFLAG=
678
- AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [EXTRACFLAG="-fvisibility=hidden"])
679
-
680
- AC_SUBST([EXTRACFLAG])
681
-
682
- AC_CONFIG_FILES([
683
- Makefile
684
- lib/Makefile
685
- lib/libngtcp2.pc
686
- lib/includes/Makefile
687
- lib/includes/ngtcp2/version.h
688
- tests/Makefile
689
- crypto/Makefile
690
- crypto/openssl/Makefile
691
- crypto/openssl/libngtcp2_crypto_openssl.pc
692
- crypto/includes/Makefile
693
- crypto/gnutls/Makefile
694
- crypto/gnutls/libngtcp2_crypto_gnutls.pc
695
- crypto/boringssl/Makefile
696
- crypto/boringssl/libngtcp2_crypto_boringssl.pc
697
- crypto/picotls/Makefile
698
- crypto/picotls/libngtcp2_crypto_picotls.pc
699
- crypto/wolfssl/Makefile
700
- crypto/wolfssl/libngtcp2_crypto_wolfssl.pc
701
- doc/Makefile
702
- doc/source/conf.py
703
- third-party/Makefile
704
- examples/Makefile
705
- examples/tests/config.ini
706
- ])
707
- AC_OUTPUT
708
-
709
- AC_MSG_NOTICE([summary of build options:
710
-
711
- Package version: ${VERSION}
712
- Library version: $LT_CURRENT:$LT_REVISION:$LT_AGE
713
- Install prefix: ${prefix}
714
- System types:
715
- Build: ${build}
716
- Host: ${host}
717
- Target: ${target}
718
- Compiler:
719
- C preprocessor: ${CPP}
720
- CPPFLAGS: ${CPPFLAGS}
721
- C compiler: ${CC}
722
- CFLAGS: ${CFLAGS}
723
- C++ compiler: ${CXX}
724
- CXXFLAGS: ${CXXFLAGS}
725
- LDFLAGS: ${LDFLAGS}
726
- WARNCFLAGS: ${WARNCFLAGS}
727
- WARNCXXFLAGS: ${WARNCXXFLAGS}
728
- EXTRACFLAG: ${EXTRACFLAG}
729
- LIBS: ${LIBS}
730
- Library:
731
- Shared: ${enable_shared}
732
- Static: ${enable_static}
733
- Libtool:
734
- LIBTOOL_LDFLAGS: ${LIBTOOL_LDFLAGS}
735
- Crypto helper libraries:
736
- libngtcp2_crypto_openssl: ${have_openssl}
737
- libngtcp2_crypto_gnutls: ${have_gnutls}
738
- libngtcp2_crypto_boringssl: ${have_boringssl}
739
- libngtcp2_crypto_picotls: ${have_picotls}
740
- libngtcp2_crypto_wolfssl: ${have_wolfssl}
741
- Test:
742
- CUnit: ${have_cunit} (CFLAGS='${CUNIT_CFLAGS}' LIBS='${CUNIT_LIBS}')
743
- Debug:
744
- Debug: ${debug} (CFLAGS='${DEBUGCFLAGS}')
745
- Libs:
746
- OpenSSL: ${have_openssl} (CFLAGS='${OPENSSL_CFLAGS}' LIBS='${OPENSSL_LIBS}')
747
- Libev: ${have_libev} (CFLAGS='${LIBEV_CFLAGS}' LIBS='${LIBEV_LIBS}')
748
- Libnghttp3: ${have_libnghttp3} (CFLAGS='${LIBNGHTTP3_CFLAGS}' LIBS='${LIBNGHTTP3_LIBS}')
749
- Jemalloc: ${have_jemalloc} (CFLAGS='${JEMALLOC_CFLAGS}' LIBS='${JEMALLOC_LIBS}')
750
- GnuTLS: ${have_gnutls} (CFLAGS='${GNUTLS_CFLAGS}' LIBS='${GNUTLS_LIBS}')
751
- BoringSSL: ${have_boringssl} (CFLAGS='${BORINGSSL_CFLAGS}' LIBS='${BORINGSSL_LIBS}')
752
- Picotls: ${have_picotls} (CFLAGS='${PICOTLS_CFLAGS}' LIBS='${PICOTLS_LIBS}')
753
- wolfSSL: ${have_wolfssl} (CFLAGS='${WOLFSSL_CFLAGS}' LIBS='${WOLFSSL_LIBS}')
754
- Examples: ${enable_examples}
755
- ])