grpc 1.85.0 → 1.86.0.pre1

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 (634) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +13 -9
  3. data/etc/roots.pem +0 -583
  4. data/include/grpc/channel_factory.h +78 -0
  5. data/include/grpc/credentials.h +21 -0
  6. data/include/grpc/grpc.h +7 -0
  7. data/include/grpc/grpc_security_constants.h +2 -0
  8. data/include/grpc/module.modulemap +1 -0
  9. data/src/core/call/call_filters.cc +4 -1
  10. data/src/core/call/call_filters.h +3 -1
  11. data/src/core/call/call_spine.h +12 -6
  12. data/src/core/call/call_state.h +3 -3
  13. data/src/core/call/client_call.cc +4 -1
  14. data/src/core/call/client_call.h +1 -0
  15. data/src/core/call/evaluate_args.cc +15 -14
  16. data/src/core/call/filter_fusion.h +2 -15
  17. data/src/core/call/interception_chain.h +2 -7
  18. data/src/core/call/metadata_batch.cc +5 -0
  19. data/src/core/call/metadata_batch.h +34 -3
  20. data/src/core/call/request_buffer.cc +1 -1
  21. data/src/core/call/server_call.cc +3 -3
  22. data/src/core/call/server_call.h +15 -0
  23. data/src/core/channelz/channelz_registry.cc +4 -4
  24. data/src/core/channelz/ztrace_collector.h +11 -2
  25. data/src/core/client_channel/backup_poller.cc +1 -2
  26. data/src/core/client_channel/channel_factory.cc +110 -0
  27. data/src/core/client_channel/channel_factory.h +45 -0
  28. data/src/core/client_channel/global_subchannel_pool.cc +2 -2
  29. data/src/core/client_channel/lame_channel.cc +59 -0
  30. data/src/core/client_channel/lame_channel.h +86 -0
  31. data/src/core/credentials/call/external/aws_request_signer.cc +2 -1
  32. data/src/core/credentials/call/external/url_external_account_credentials.cc +6 -17
  33. data/src/core/credentials/call/external/url_external_account_credentials.h +0 -1
  34. data/src/core/credentials/call/jwt/jwt_verifier.cc +25 -13
  35. data/src/core/credentials/call/oauth2/oauth2_credentials.cc +6 -4
  36. data/src/core/credentials/call/regional_access_boundary_fetcher.cc +16 -0
  37. data/src/core/credentials/call/regional_access_boundary_fetcher.h +6 -2
  38. data/src/core/credentials/transport/tls/grpc_tls_credentials_options.cc +14 -0
  39. data/src/core/credentials/transport/tls/grpc_tls_credentials_options.h +12 -2
  40. data/src/core/credentials/transport/tls/ssl_utils.cc +20 -0
  41. data/src/core/credentials/transport/tls/ssl_utils.h +4 -0
  42. data/src/core/credentials/transport/tls/tls_security_connector.cc +6 -2
  43. data/src/core/ext/filters/http/server/http_server_filter.cc +6 -1
  44. data/src/core/ext/filters/rbac/rbac_filter.cc +3 -41
  45. data/src/core/ext/filters/rbac/rbac_filter.h +2 -11
  46. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +2 -2
  47. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +31 -24
  48. data/src/core/ext/transport/chttp2/server/chttp2_server.h +1 -2
  49. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +69 -102
  50. data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +1 -1
  51. data/src/core/ext/transport/chttp2/transport/flow_control.h +2 -2
  52. data/src/core/ext/transport/chttp2/transport/flow_control_manager.h +1 -1
  53. data/src/core/ext/transport/chttp2/transport/frame.cc +15 -19
  54. data/src/core/ext/transport/chttp2/transport/frame.h +1 -1
  55. data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +18 -61
  56. data/src/core/ext/transport/chttp2/transport/frame_goaway.h +0 -4
  57. data/src/core/ext/transport/chttp2/transport/frame_security.cc +1 -2
  58. data/src/core/ext/transport/chttp2/transport/frame_settings.cc +9 -0
  59. data/src/core/ext/transport/chttp2/transport/goaway.cc +1 -1
  60. data/src/core/ext/transport/chttp2/transport/goaway.h +0 -5
  61. data/src/core/ext/transport/chttp2/transport/header_assembler.h +1 -5
  62. data/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc +3 -0
  63. data/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +8 -0
  64. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +33 -0
  65. data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +34 -19
  66. data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +5 -2
  67. data/src/core/ext/transport/chttp2/transport/http2_server_transport.cc +134 -82
  68. data/src/core/ext/transport/chttp2/transport/http2_server_transport.h +30 -15
  69. data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +4 -3
  70. data/src/core/ext/transport/chttp2/transport/http2_transport.cc +9 -33
  71. data/src/core/ext/transport/chttp2/transport/http2_transport.h +1 -6
  72. data/src/core/ext/transport/chttp2/transport/http2_transport_stats.h +60 -0
  73. data/src/core/ext/transport/chttp2/transport/internal.h +6 -1
  74. data/src/core/ext/transport/chttp2/transport/keepalive.h +1 -4
  75. data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -8
  76. data/src/core/ext/transport/chttp2/transport/ping_promise.cc +35 -11
  77. data/src/core/ext/transport/chttp2/transport/ping_promise.h +52 -47
  78. data/src/core/ext/transport/chttp2/transport/read_context.h +19 -5
  79. data/src/core/ext/transport/chttp2/transport/security_frame.h +7 -6
  80. data/src/core/ext/transport/chttp2/transport/stream_data_queue.h +7 -5
  81. data/src/core/ext/transport/chttp2/transport/transport_common.cc +47 -0
  82. data/src/core/ext/transport/chttp2/transport/transport_common.h +29 -0
  83. data/src/core/ext/transport/chttp2/transport/writable_streams.h +1 -1
  84. data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +1 -7
  85. data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb.h +16 -0
  86. data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb_minitable.c +4 -3
  87. data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb.h +129 -81
  88. data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.c +50 -39
  89. data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb.h +411 -163
  90. data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.c +95 -44
  91. data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.h +3 -0
  92. data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb.h +41 -8
  93. data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb_minitable.c +8 -5
  94. data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb.h +427 -222
  95. data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c +97 -66
  96. data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.h +1 -0
  97. data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb.h +130 -99
  98. data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb_minitable.c +29 -27
  99. data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb.h +49 -33
  100. data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb_minitable.c +19 -8
  101. data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb.h +95 -3
  102. data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.c +33 -6
  103. data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.h +1 -0
  104. data/src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb.h +93 -11
  105. data/src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb_minitable.c +8 -5
  106. data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb.h +656 -134
  107. data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +117 -51
  108. data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.h +2 -0
  109. data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb.h +45 -23
  110. data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.c +19 -10
  111. data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb.h +99 -34
  112. data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.c +12 -7
  113. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb.h +344 -273
  114. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.c +62 -69
  115. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.h +1 -3
  116. data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb.h +53 -22
  117. data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb_minitable.c +9 -7
  118. data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb.h +108 -0
  119. data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb_minitable.c +26 -2
  120. data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb_minitable.h +1 -0
  121. data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb.h +809 -231
  122. data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +183 -77
  123. data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.h +3 -0
  124. data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb.h +151 -26
  125. data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb_minitable.c +17 -9
  126. data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb.h +24 -8
  127. data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb_minitable.c +6 -5
  128. data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb.h +2 -1
  129. data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb.h +224 -16
  130. data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb_minitable.c +83 -10
  131. data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb_minitable.h +2 -0
  132. data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb.h +95 -79
  133. data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.c +23 -22
  134. data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb.h +34 -18
  135. data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb_minitable.c +10 -9
  136. data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb.h +243 -2
  137. data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.c +53 -5
  138. data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.h +3 -0
  139. data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb.h +53 -22
  140. data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb_minitable.c +9 -7
  141. data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h +23 -7
  142. data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb_minitable.c +9 -4
  143. data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +516 -215
  144. data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c +99 -60
  145. data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.h +1 -0
  146. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.h +60 -28
  147. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb_minitable.c +12 -10
  148. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +109 -0
  149. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.c +32 -2
  150. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.h +1 -0
  151. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb.h +37 -4
  152. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb_minitable.c +7 -4
  153. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb.h +65 -47
  154. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb_minitable.c +29 -12
  155. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +20 -4
  156. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb_minitable.c +6 -3
  157. data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb.h +776 -88
  158. data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.c +195 -35
  159. data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.h +5 -0
  160. data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb.h +23 -7
  161. data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.c +10 -3
  162. data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb.h +44 -0
  163. data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb_minitable.c +11 -2
  164. data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb_minitable.h +1 -0
  165. data/src/core/ext/upb-gen/envoy/type/v3/scope.upb.h +218 -0
  166. data/src/core/ext/upb-gen/envoy/type/v3/scope.upb_minitable.c +70 -0
  167. data/src/core/ext/upb-gen/envoy/type/v3/scope.upb_minitable.h +31 -0
  168. data/src/core/ext/upbdefs-gen/envoy/admin/v3/clusters.upbdefs.c +30 -24
  169. data/src/core/ext/upbdefs-gen/envoy/admin/v3/server_info.upbdefs.c +166 -152
  170. data/src/core/ext/upbdefs-gen/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +467 -422
  171. data/src/core/ext/upbdefs-gen/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +15 -0
  172. data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +120 -110
  173. data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/cluster.upbdefs.c +912 -857
  174. data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/cluster.upbdefs.h +5 -0
  175. data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/outlier_detection.upbdefs.c +26 -19
  176. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/address.upbdefs.c +59 -54
  177. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.c +356 -346
  178. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.h +5 -0
  179. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/http_service.upbdefs.c +49 -37
  180. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.c +599 -483
  181. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.h +10 -0
  182. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_option.upbdefs.c +65 -49
  183. data/src/core/ext/upbdefs-gen/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +165 -161
  184. data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener.upbdefs.c +369 -327
  185. data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener.upbdefs.h +5 -15
  186. data/src/core/ext/upbdefs-gen/envoy/config/metrics/v3/stats.upbdefs.c +129 -121
  187. data/src/core/ext/upbdefs-gen/envoy/config/overload/v3/overload.upbdefs.c +224 -204
  188. data/src/core/ext/upbdefs-gen/envoy/config/overload/v3/overload.upbdefs.h +5 -0
  189. data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.c +2046 -1932
  190. data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.h +15 -0
  191. data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/opentelemetry.upbdefs.c +70 -37
  192. data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/zipkin.upbdefs.c +7 -3
  193. data/src/core/ext/upbdefs-gen/envoy/data/accesslog/v3/accesslog.upbdefs.c +5 -3
  194. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/composite/v3/composite.upbdefs.c +121 -78
  195. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/composite/v3/composite.upbdefs.h +10 -0
  196. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.c +165 -160
  197. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +121 -118
  198. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upbdefs.c +68 -37
  199. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upbdefs.h +15 -0
  200. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/router/v3/router.upbdefs.c +48 -40
  201. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upbdefs.c +44 -37
  202. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +919 -870
  203. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +5 -0
  204. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upbdefs.c +26 -14
  205. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +44 -36
  206. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +372 -371
  207. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.c +32 -28
  208. data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.c +17 -15
  209. data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/status_code_input.upbdefs.c +4 -1
  210. data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/status_code_input.upbdefs.h +5 -0
  211. data/src/core/ext/upbdefs-gen/envoy/type/v3/scope.upbdefs.c +76 -0
  212. data/src/core/ext/upbdefs-gen/envoy/type/v3/scope.upbdefs.h +37 -0
  213. data/src/core/ext/upbdefs-gen/envoy/type/v3/token_bucket.upbdefs.c +1 -1
  214. data/src/core/filter/ext_proc/ext_proc_filter.cc +537 -259
  215. data/src/core/filter/ext_proc/ext_proc_filter.h +47 -14
  216. data/src/core/filter/ext_proc/ext_proc_messages.cc +38 -17
  217. data/src/core/filter/ext_proc/ext_proc_messages.h +19 -7
  218. data/src/core/filter/filter_args.h +5 -60
  219. data/src/core/handshaker/http_connect/http_connect_client_handshaker.cc +1 -1
  220. data/src/core/handshaker/security/pipelined_secure_endpoint.cc +23 -22
  221. data/src/core/handshaker/security/secure_endpoint.cc +16 -16
  222. data/src/core/lib/channel/channel_stack.cc +0 -12
  223. data/src/core/lib/channel/channel_stack.h +0 -8
  224. data/src/core/lib/channel/promise_based_filter.cc +57 -44
  225. data/src/core/lib/channel/promise_based_filter.h +29 -41
  226. data/src/core/lib/event_engine/ares_resolver.cc +10 -4
  227. data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +1 -1
  228. data/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc +3 -3
  229. data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +1 -5
  230. data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +10 -12
  231. data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.cc +3 -17
  232. data/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +21 -1
  233. data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +5 -5
  234. data/src/core/lib/event_engine/posix_engine/posix_engine.cc +10 -12
  235. data/src/core/lib/event_engine/posix_engine/posix_interface.h +1 -1
  236. data/src/core/lib/event_engine/posix_engine/timer.cc +2 -2
  237. data/src/core/lib/event_engine/shim.cc +1 -6
  238. data/src/core/lib/event_engine/shim.h +0 -5
  239. data/src/core/lib/event_engine/windows/windows_engine.cc +4 -4
  240. data/src/core/lib/event_engine/windows/windows_listener.cc +1 -1
  241. data/src/core/lib/experiments/experiments.cc +144 -261
  242. data/src/core/lib/experiments/experiments.h +48 -120
  243. data/src/core/lib/iomgr/iomgr_windows.cc +1 -6
  244. data/src/core/lib/iomgr/tcp_posix.cc +21 -21
  245. data/src/core/lib/iomgr/tcp_server_posix.cc +64 -242
  246. data/src/core/lib/iomgr/tcp_server_windows.cc +0 -469
  247. data/src/core/lib/promise/activity.cc +8 -8
  248. data/src/core/lib/promise/activity.h +5 -5
  249. data/src/core/lib/promise/inter_activity_pipe.h +3 -3
  250. data/src/core/lib/promise/party.cc +5 -5
  251. data/src/core/lib/promise/status_flag.h +7 -2
  252. data/src/core/lib/resource_quota/memory_quota.cc +2 -2
  253. data/src/core/lib/security/authorization/rbac_policy.h +2 -2
  254. data/src/core/lib/surface/call.cc +13 -3
  255. data/src/core/lib/surface/call.h +23 -6
  256. data/src/core/lib/surface/channel_create.cc +7 -1
  257. data/src/core/lib/surface/channel_init.h +1 -8
  258. data/src/core/lib/surface/filter_stack_call.cc +16 -0
  259. data/src/core/lib/surface/filter_stack_call.h +1 -0
  260. data/src/core/lib/surface/init.cc +3 -3
  261. data/src/core/lib/surface/legacy_channel.cc +4 -1
  262. data/src/core/lib/surface/version.cc +2 -2
  263. data/src/core/lib/transport/transport.cc +15 -8
  264. data/src/core/lib/transport/transport_framing_endpoint_extension.h +8 -2
  265. data/src/core/load_balancing/outlier_detection/outlier_detection.cc +99 -8
  266. data/src/core/load_balancing/outlier_detection/outlier_detection_metrics.cc +38 -0
  267. data/src/core/load_balancing/outlier_detection/outlier_detection_metrics.h +55 -0
  268. data/src/core/load_balancing/ring_hash/ring_hash.cc +2 -1
  269. data/src/core/load_balancing/rls/rls.cc +21 -1
  270. data/src/core/load_balancing/xds/cds.cc +4 -51
  271. data/src/core/plugin_registry/grpc_plugin_registry.cc +10 -13
  272. data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +0 -7
  273. data/src/core/resolver/xds/xds_resolver.cc +1 -1
  274. data/src/core/server/server.cc +60 -4
  275. data/src/core/server/server_config_selector.h +4 -18
  276. data/src/core/server/server_config_selector_filter.cc +20 -146
  277. data/src/core/server/server_config_selector_filter.h +2 -2
  278. data/src/core/server/xds_server_config_fetcher.cc +5 -20
  279. data/src/core/transport/auth_context.cc +15 -5
  280. data/src/core/transport/auth_context.h +5 -0
  281. data/src/core/tsi/ssl_telemetry_utils.cc +9 -1
  282. data/src/core/tsi/ssl_transport_security.cc +158 -52
  283. data/src/core/tsi/ssl_transport_security.h +18 -2
  284. data/src/core/tsi/ssl_transport_security_utils.cc +123 -12
  285. data/src/core/tsi/ssl_transport_security_utils.h +19 -0
  286. data/src/core/util/latent_see.cc +65 -3
  287. data/src/core/util/latent_see.h +57 -12
  288. data/src/core/util/linux/cpu.cc +12 -6
  289. data/src/core/util/mpscq.cc +2 -2
  290. data/src/core/util/sync_abseil.cc +3 -3
  291. data/src/core/util/trie_lookup.h +5 -1
  292. data/src/core/util/windows/env.cc +1 -0
  293. data/src/core/util/work_serializer.cc +1 -1
  294. data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +10 -9
  295. data/src/core/xds/grpc/file_watcher_certificate_provider_factory.h +3 -3
  296. data/src/core/xds/grpc/streaming_call_promise_wrapper.cc +5 -2
  297. data/src/core/xds/grpc/streaming_call_promise_wrapper.h +2 -5
  298. data/src/core/xds/grpc/xds_audit_logger_registry.cc +0 -54
  299. data/src/core/xds/grpc/xds_audit_logger_registry.h +0 -8
  300. data/src/core/xds/grpc/xds_bootstrap_grpc_builder.cc +2 -28
  301. data/src/core/xds/grpc/xds_bootstrap_grpc_builder.h +0 -20
  302. data/src/core/xds/grpc/xds_client_grpc.cc +4 -4
  303. data/src/core/xds/grpc/xds_client_grpc.h +1 -1
  304. data/src/core/xds/grpc/xds_cluster_parser.cc +5 -1
  305. data/src/core/xds/grpc/xds_common_types_parser.cc +12 -0
  306. data/src/core/xds/grpc/xds_endpoint_parser.cc +3 -3
  307. data/src/core/xds/grpc/xds_http_composite_filter.cc +0 -5
  308. data/src/core/xds/grpc/xds_http_composite_filter.h +1 -27
  309. data/src/core/xds/grpc/xds_http_ext_proc_filter.cc +1 -5
  310. data/src/core/xds/grpc/xds_http_ext_proc_filter.h +3 -29
  311. data/src/core/xds/grpc/xds_http_fault_filter.cc +0 -4
  312. data/src/core/xds/grpc/xds_http_fault_filter.h +0 -26
  313. data/src/core/xds/grpc/xds_http_filter.h +1 -63
  314. data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +0 -5
  315. data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +1 -27
  316. data/src/core/xds/grpc/xds_http_rbac_filter.cc +0 -527
  317. data/src/core/xds/grpc/xds_http_rbac_filter.h +0 -15
  318. data/src/core/xds/grpc/xds_http_stateful_session_filter.cc +0 -5
  319. data/src/core/xds/grpc/xds_http_stateful_session_filter.h +0 -26
  320. data/src/core/xds/grpc/xds_listener.cc +0 -2
  321. data/src/core/xds/grpc/xds_listener.h +0 -2
  322. data/src/core/xds/grpc/xds_listener_parser.cc +0 -7
  323. data/src/core/xds/grpc/xds_matcher.cc +17 -11
  324. data/src/core/xds/grpc/xds_matcher.h +2 -1
  325. data/src/core/xds/grpc/xds_matcher_context.cc +11 -0
  326. data/src/core/xds/grpc/xds_matcher_context.h +3 -2
  327. data/src/core/xds/grpc/xds_matcher_input.cc +19 -1
  328. data/src/core/xds/grpc/xds_matcher_parse.cc +3 -2
  329. data/src/core/xds/grpc/xds_route_config.cc +0 -2
  330. data/src/core/xds/grpc/xds_route_config.h +0 -2
  331. data/src/core/xds/grpc/xds_route_config_parser.cc +0 -5
  332. data/src/core/xds/grpc/xds_routing.cc +22 -112
  333. data/src/core/xds/grpc/xds_routing.h +2 -27
  334. data/src/core/xds/grpc/xds_transport_factory_grpc.cc +236 -0
  335. data/src/core/xds/grpc/xds_transport_factory_grpc.h +95 -0
  336. data/src/core/xds/grpc/xds_transport_grpc.cc +78 -241
  337. data/src/core/xds/grpc/xds_transport_grpc.h +41 -51
  338. data/src/core/xds/xds_client/lrs_client.cc +3 -5
  339. data/src/core/xds/xds_client/lrs_client.h +2 -1
  340. data/src/core/xds/xds_client/xds_client.cc +36 -23
  341. data/src/core/xds/xds_client/xds_client.h +6 -5
  342. data/src/core/xds/xds_client/xds_transport.h +110 -108
  343. data/src/core/xds/xds_client/xds_transport_factory.h +43 -0
  344. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +4 -0
  345. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +6 -0
  346. data/src/ruby/lib/grpc/generic/rpc_server.rb +2 -2
  347. data/src/ruby/lib/grpc/version.rb +1 -1
  348. data/third_party/boringssl-with-bazel/crypto/asn1/a_type.cc +54 -19
  349. data/third_party/boringssl-with-bazel/crypto/asn1/asn1_lib.cc +1 -1
  350. data/third_party/boringssl-with-bazel/crypto/asn1/internal.h +58 -12
  351. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_dec.cc +13 -13
  352. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_enc.cc +13 -11
  353. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_fre.cc +14 -18
  354. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_new.cc +31 -35
  355. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_typ.cc +0 -2
  356. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_utl.cc +17 -24
  357. data/third_party/boringssl-with-bazel/crypto/bio/bio.cc +0 -1
  358. data/third_party/boringssl-with-bazel/crypto/bio/bio_mem.cc +9 -3
  359. data/third_party/boringssl-with-bazel/crypto/bio/connect.cc +3 -3
  360. data/third_party/boringssl-with-bazel/crypto/bio/fd.cc +0 -1
  361. data/third_party/boringssl-with-bazel/crypto/bio/file.cc +0 -1
  362. data/third_party/boringssl-with-bazel/crypto/bio/internal.h +2 -3
  363. data/third_party/boringssl-with-bazel/crypto/bio/pair.cc +0 -1
  364. data/third_party/boringssl-with-bazel/crypto/bio/socket.cc +1 -1
  365. data/third_party/boringssl-with-bazel/crypto/bytestring/cbb.cc +70 -45
  366. data/third_party/boringssl-with-bazel/crypto/bytestring/cbs.cc +15 -34
  367. data/third_party/boringssl-with-bazel/crypto/bytestring/internal.h +5 -0
  368. data/third_party/boringssl-with-bazel/crypto/cipher/e_aesgcmsiv.cc +20 -165
  369. data/third_party/boringssl-with-bazel/crypto/cipher/e_tls.cc +7 -4
  370. data/third_party/boringssl-with-bazel/crypto/cipher/internal.h +159 -0
  371. data/third_party/boringssl-with-bazel/crypto/curve25519/curve25519.cc +295 -16
  372. data/third_party/boringssl-with-bazel/crypto/curve25519/internal.h +25 -14
  373. data/third_party/boringssl-with-bazel/crypto/dh/params.cc +1 -1
  374. data/third_party/boringssl-with-bazel/crypto/ec/hash_to_curve.cc +208 -36
  375. data/third_party/boringssl-with-bazel/crypto/err/err.cc +3 -2
  376. data/third_party/boringssl-with-bazel/crypto/evp/evp.cc +3 -0
  377. data/third_party/boringssl-with-bazel/crypto/evp/evp_kem.cc +25 -6
  378. data/third_party/boringssl-with-bazel/crypto/evp/internal.h +15 -11
  379. data/third_party/boringssl-with-bazel/crypto/evp/p_ec.cc +121 -0
  380. data/third_party/boringssl-with-bazel/crypto/evp/p_mlkem.cc +34 -9
  381. data/third_party/boringssl-with-bazel/crypto/evp/p_rsa.cc +76 -8
  382. data/third_party/boringssl-with-bazel/crypto/evp/p_xwing.cc +47 -20
  383. data/third_party/boringssl-with-bazel/crypto/ex_data.cc +1 -1
  384. data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/aes_nohw.cc.inc +1 -1
  385. data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/gcm.cc.inc +2 -2
  386. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bcm.cc +1 -0
  387. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/add.cc.inc +9 -4
  388. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc +4 -4
  389. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/exponentiation.cc.inc +2 -2
  390. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/internal.h +12 -6
  391. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/jacobi.cc.inc +1 -1
  392. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/montgomery_inv.cc.inc +4 -4
  393. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/prime.cc.inc +3 -3
  394. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/rsaz_exp.cc.inc +6 -6
  395. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/sqrt.cc.inc +21 -21
  396. data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/aead.cc.inc +4 -2
  397. data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/cipher.cc.inc +97 -132
  398. data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/internal.h +7 -6
  399. data/third_party/boringssl-with-bazel/crypto/fipsmodule/dh/dh.cc.inc +3 -3
  400. data/third_party/boringssl-with-bazel/crypto/fipsmodule/dh/internal.h +1 -1
  401. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/ec.cc.inc +77 -17
  402. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/ec_montgomery.cc.inc +13 -13
  403. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/felem.cc.inc +117 -34
  404. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/internal.h +67 -18
  405. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/oct.cc.inc +29 -151
  406. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256-nistz.cc.inc +740 -0
  407. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256-nistz.h +207 -0
  408. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256.cc.inc +407 -519
  409. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/simple.cc.inc +27 -28
  410. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ecdsa/ecdsa.cc.inc +1 -1
  411. data/third_party/boringssl-with-bazel/crypto/fipsmodule/entropy/jitter.cc.inc +1 -1
  412. data/third_party/boringssl-with-bazel/crypto/fipsmodule/fips_shared_support.cc +4 -4
  413. data/third_party/boringssl-with-bazel/crypto/fipsmodule/keccak/internal.h +70 -1
  414. data/third_party/boringssl-with-bazel/crypto/fipsmodule/keccak/keccak.cc.inc +292 -52
  415. data/third_party/boringssl-with-bazel/crypto/fipsmodule/mldsa/mldsa.cc.inc +226 -69
  416. data/third_party/boringssl-with-bazel/crypto/fipsmodule/mlkem/mlkem.cc.inc +238 -83
  417. data/third_party/boringssl-with-bazel/crypto/fipsmodule/rsa/rsa_impl.cc.inc +6 -6
  418. data/third_party/boringssl-with-bazel/crypto/fipsmodule/sha/sha1.cc.inc +2 -2
  419. data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/fors.cc.inc +1 -1
  420. data/third_party/boringssl-with-bazel/crypto/hpke/hpke.cc +327 -272
  421. data/third_party/boringssl-with-bazel/crypto/hrss/hrss.cc +14 -14
  422. data/third_party/boringssl-with-bazel/crypto/internal.h +63 -0
  423. data/third_party/boringssl-with-bazel/crypto/mem_internal.h +38 -3
  424. data/third_party/boringssl-with-bazel/crypto/obj/obj_dat.h +97 -1
  425. data/third_party/boringssl-with-bazel/crypto/pem/internal.h +86 -0
  426. data/third_party/boringssl-with-bazel/crypto/pem/pem_all.cc +8 -5
  427. data/third_party/boringssl-with-bazel/crypto/pem/pem_lib.cc +41 -73
  428. data/third_party/boringssl-with-bazel/crypto/pem/pem_pk8.cc +3 -0
  429. data/third_party/boringssl-with-bazel/crypto/pem/pem_pkey.cc +10 -4
  430. data/third_party/boringssl-with-bazel/crypto/pem/pem_x509.cc +3 -0
  431. data/third_party/boringssl-with-bazel/crypto/pem/pem_xaux.cc +3 -0
  432. data/third_party/boringssl-with-bazel/crypto/pkcs7/pkcs7.cc +1 -1
  433. data/third_party/boringssl-with-bazel/crypto/pkcs7/pkcs7_x509.cc +2 -2
  434. data/third_party/boringssl-with-bazel/crypto/pkcs8/pkcs8_x509.cc +1 -1
  435. data/third_party/boringssl-with-bazel/crypto/poly1305/internal.h +17 -0
  436. data/third_party/boringssl-with-bazel/crypto/poly1305/poly1305_arm.cc +1 -13
  437. data/third_party/boringssl-with-bazel/crypto/poly1305/poly1305_vec.cc +3 -3
  438. data/third_party/boringssl-with-bazel/crypto/slhdsa/slhdsa.cc +23 -6
  439. data/third_party/boringssl-with-bazel/crypto/stack/stack.cc +7 -0
  440. data/third_party/boringssl-with-bazel/crypto/trust_token/internal.h +1 -1
  441. data/third_party/boringssl-with-bazel/crypto/x509/a_verify.cc +14 -7
  442. data/third_party/boringssl-with-bazel/crypto/x509/internal.h +110 -76
  443. data/third_party/boringssl-with-bazel/crypto/x509/name_print.cc +1 -1
  444. data/third_party/boringssl-with-bazel/crypto/x509/rsa_pss.cc +1 -1
  445. data/third_party/boringssl-with-bazel/crypto/x509/t_req.cc +1 -1
  446. data/third_party/boringssl-with-bazel/crypto/x509/t_x509.cc +6 -5
  447. data/third_party/boringssl-with-bazel/crypto/x509/v3_crld.cc +11 -53
  448. data/third_party/boringssl-with-bazel/crypto/x509/v3_ncons.cc +5 -5
  449. data/third_party/boringssl-with-bazel/crypto/x509/v3_purp.cc +16 -39
  450. data/third_party/boringssl-with-bazel/crypto/x509/v3_skey.cc +1 -1
  451. data/third_party/boringssl-with-bazel/crypto/x509/v3_utl.cc +12 -16
  452. data/third_party/boringssl-with-bazel/crypto/x509/x509_cmp.cc +9 -11
  453. data/third_party/boringssl-with-bazel/crypto/x509/x509_mtc.cc +598 -0
  454. data/third_party/boringssl-with-bazel/crypto/x509/x509_obj.cc +9 -8
  455. data/third_party/boringssl-with-bazel/crypto/x509/x509_set.cc +14 -18
  456. data/third_party/boringssl-with-bazel/crypto/x509/x509_vfy.cc +315 -390
  457. data/third_party/boringssl-with-bazel/crypto/x509/x509_vpm.cc +1 -1
  458. data/third_party/boringssl-with-bazel/crypto/x509/x509name.cc +31 -29
  459. data/third_party/boringssl-with-bazel/crypto/x509/x_all.cc +10 -9
  460. data/third_party/boringssl-with-bazel/crypto/x509/x_crl.cc +3 -53
  461. data/third_party/boringssl-with-bazel/crypto/x509/x_name.cc +37 -59
  462. data/third_party/boringssl-with-bazel/crypto/x509/x_pubkey.cc +29 -47
  463. data/third_party/boringssl-with-bazel/crypto/x509/x_req.cc +2 -1
  464. data/third_party/boringssl-with-bazel/crypto/x509/x_x509.cc +53 -53
  465. data/third_party/boringssl-with-bazel/gen/boringssl_prefix_symbols_internal_x86_64_win_asm.inc +24 -0
  466. data/third_party/boringssl-with-bazel/gen/boringssl_prefix_symbols_internal_x86_win_asm.inc +24 -0
  467. data/third_party/boringssl-with-bazel/gen/crypto/err_data.cc +509 -497
  468. data/third_party/boringssl-with-bazel/include/openssl/aead.h +7 -19
  469. data/third_party/boringssl-with-bazel/include/openssl/asm_base.h +1 -1
  470. data/third_party/boringssl-with-bazel/include/openssl/asn1.h +6 -10
  471. data/third_party/boringssl-with-bazel/include/openssl/base.h +43 -16
  472. data/third_party/boringssl-with-bazel/include/openssl/bio.h +25 -10
  473. data/third_party/boringssl-with-bazel/include/openssl/bytestring.h +33 -1
  474. data/third_party/boringssl-with-bazel/include/openssl/cipher.h +11 -9
  475. data/third_party/boringssl-with-bazel/include/openssl/configuration.h +18 -0
  476. data/third_party/boringssl-with-bazel/include/openssl/curve25519.h +36 -0
  477. data/third_party/boringssl-with-bazel/include/openssl/digest.h +4 -4
  478. data/third_party/boringssl-with-bazel/include/openssl/ec.h +35 -1
  479. data/third_party/boringssl-with-bazel/include/openssl/ec_key.h +2 -2
  480. data/third_party/boringssl-with-bazel/include/openssl/evp.h +120 -3
  481. data/third_party/boringssl-with-bazel/include/openssl/evp_errors.h +1 -0
  482. data/third_party/boringssl-with-bazel/include/openssl/hmac.h +2 -2
  483. data/third_party/boringssl-with-bazel/include/openssl/hpke.h +38 -7
  484. data/third_party/boringssl-with-bazel/include/openssl/mem.h +5 -5
  485. data/third_party/boringssl-with-bazel/include/openssl/nid.h +42 -0
  486. data/third_party/boringssl-with-bazel/include/openssl/pem.h +650 -351
  487. data/third_party/boringssl-with-bazel/include/openssl/posix_time.h +4 -4
  488. data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols.h +130 -4
  489. data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols_internal_S.h +48 -0
  490. data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols_internal_c.h +24 -0
  491. data/third_party/boringssl-with-bazel/include/openssl/rsa.h +1 -1
  492. data/third_party/boringssl-with-bazel/include/openssl/slhdsa.h +25 -1
  493. data/third_party/boringssl-with-bazel/include/openssl/ssl.h +256 -87
  494. data/third_party/boringssl-with-bazel/include/openssl/stack.h +9 -0
  495. data/third_party/boringssl-with-bazel/include/openssl/types.h +18 -0
  496. data/third_party/boringssl-with-bazel/include/openssl/x509.h +40 -21
  497. data/third_party/boringssl-with-bazel/ssl/bio_ssl.cc +3 -5
  498. data/third_party/boringssl-with-bazel/ssl/d1_both.cc +146 -81
  499. data/third_party/boringssl-with-bazel/ssl/d1_lib.cc +39 -34
  500. data/third_party/boringssl-with-bazel/ssl/d1_pkt.cc +6 -6
  501. data/third_party/boringssl-with-bazel/ssl/d1_srtp.cc +10 -8
  502. data/third_party/boringssl-with-bazel/ssl/dtls_method.cc +4 -4
  503. data/third_party/boringssl-with-bazel/ssl/dtls_record.cc +15 -14
  504. data/third_party/boringssl-with-bazel/ssl/encrypted_client_hello.cc +41 -25
  505. data/third_party/boringssl-with-bazel/ssl/extensions.cc +153 -171
  506. data/third_party/boringssl-with-bazel/ssl/handoff.cc +79 -64
  507. data/third_party/boringssl-with-bazel/ssl/handshake.cc +15 -16
  508. data/third_party/boringssl-with-bazel/ssl/handshake_client.cc +35 -78
  509. data/third_party/boringssl-with-bazel/ssl/handshake_server.cc +75 -155
  510. data/third_party/boringssl-with-bazel/ssl/internal.h +419 -308
  511. data/third_party/boringssl-with-bazel/ssl/s3_both.cc +17 -150
  512. data/third_party/boringssl-with-bazel/ssl/s3_lib.cc +2 -3
  513. data/third_party/boringssl-with-bazel/ssl/s3_pkt.cc +10 -9
  514. data/third_party/boringssl-with-bazel/ssl/ssl_asn1.cc +13 -13
  515. data/third_party/boringssl-with-bazel/ssl/ssl_buffer.cc +8 -8
  516. data/third_party/boringssl-with-bazel/ssl/ssl_cert.cc +58 -24
  517. data/third_party/boringssl-with-bazel/ssl/ssl_cipher.cc +198 -26
  518. data/third_party/boringssl-with-bazel/ssl/ssl_credential.cc +164 -37
  519. data/third_party/boringssl-with-bazel/ssl/ssl_file.cc +10 -8
  520. data/third_party/boringssl-with-bazel/ssl/ssl_key_share.cc +2 -95
  521. data/third_party/boringssl-with-bazel/ssl/ssl_lib.cc +785 -472
  522. data/third_party/boringssl-with-bazel/ssl/ssl_privkey.cc +78 -67
  523. data/third_party/boringssl-with-bazel/ssl/ssl_session.cc +187 -150
  524. data/third_party/boringssl-with-bazel/ssl/ssl_stat.cc +6 -3
  525. data/third_party/boringssl-with-bazel/ssl/ssl_transcript.cc +1 -1
  526. data/third_party/boringssl-with-bazel/ssl/ssl_versions.cc +25 -19
  527. data/third_party/boringssl-with-bazel/ssl/ssl_x509.cc +148 -114
  528. data/third_party/boringssl-with-bazel/ssl/t1_enc.cc +28 -19
  529. data/third_party/boringssl-with-bazel/ssl/tls13_both.cc +24 -22
  530. data/third_party/boringssl-with-bazel/ssl/tls13_client.cc +30 -30
  531. data/third_party/boringssl-with-bazel/ssl/tls13_enc.cc +17 -16
  532. data/third_party/boringssl-with-bazel/ssl/tls13_server.cc +55 -63
  533. data/third_party/boringssl-with-bazel/ssl/tls_method.cc +12 -12
  534. data/third_party/boringssl-with-bazel/ssl/tls_record.cc +23 -20
  535. data/third_party/boringssl-with-bazel/third_party/fiat/p256_64.h +38 -0
  536. data/third_party/boringssl-with-bazel/third_party/fiat/p256_64_msvc.h +2 -0
  537. data/third_party/boringssl-with-bazel/third_party/fiat/p256_field.c.inc +26 -0
  538. data/third_party/boringssl-with-bazel/third_party/fiat/p256_point.br.c.inc +0 -54
  539. data/third_party/cares/cares/include/ares.h +8 -0
  540. data/third_party/cares/cares/include/ares_dns_record.h +3 -2
  541. data/third_party/cares/cares/include/ares_version.h +3 -3
  542. data/third_party/cares/cares/src/lib/ares_addrinfo_localhost.c +20 -20
  543. data/third_party/cares/cares/src/lib/ares_cancel.c +17 -8
  544. data/third_party/cares/cares/src/lib/ares_close_sockets.c +81 -16
  545. data/third_party/cares/cares/src/lib/ares_conn.c +256 -10
  546. data/third_party/cares/cares/src/lib/ares_conn.h +40 -3
  547. data/third_party/cares/cares/src/lib/ares_cookie.c +2 -2
  548. data/third_party/cares/cares/src/lib/ares_destroy.c +75 -10
  549. data/third_party/cares/cares/src/lib/ares_getaddrinfo.c +85 -10
  550. data/third_party/cares/cares/src/lib/ares_gethostbyaddr.c +5 -0
  551. data/third_party/cares/cares/src/lib/ares_gethostbyname.c +4 -0
  552. data/third_party/cares/cares/src/lib/ares_getnameinfo.c +10 -2
  553. data/third_party/cares/cares/src/lib/ares_hosts_file.c +8 -0
  554. data/third_party/cares/cares/src/lib/ares_inet_net_pton.h +28 -0
  555. data/third_party/cares/cares/src/lib/ares_init.c +55 -10
  556. data/third_party/cares/cares/src/lib/ares_library_init.c +25 -7
  557. data/third_party/cares/cares/src/lib/ares_options.c +38 -10
  558. data/third_party/cares/cares/src/lib/ares_parse_into_addrinfo.c +1 -1
  559. data/third_party/cares/cares/src/lib/ares_private.h +186 -27
  560. data/third_party/cares/cares/src/lib/ares_process.c +604 -112
  561. data/third_party/cares/cares/src/lib/ares_qcache.c +200 -36
  562. data/third_party/cares/cares/src/lib/ares_query.c +5 -0
  563. data/third_party/cares/cares/src/lib/ares_search.c +10 -0
  564. data/third_party/cares/cares/src/lib/ares_send.c +81 -10
  565. data/third_party/cares/cares/src/lib/ares_set_socket_functions.c +3 -1
  566. data/third_party/cares/cares/src/lib/ares_socket.c +28 -0
  567. data/third_party/cares/cares/src/lib/ares_socket.h +23 -0
  568. data/third_party/cares/cares/src/lib/ares_sysconfig.c +6 -3
  569. data/third_party/cares/cares/src/lib/ares_sysconfig_files.c +33 -11
  570. data/third_party/cares/cares/src/lib/ares_sysconfig_win.c +132 -80
  571. data/third_party/cares/cares/src/lib/ares_timeout.c +11 -0
  572. data/third_party/cares/cares/src/lib/ares_update_servers.c +55 -11
  573. data/third_party/cares/cares/src/lib/dsa/ares_array.c +20 -5
  574. data/third_party/cares/cares/src/lib/dsa/ares_htable.c +8 -4
  575. data/third_party/cares/cares/src/lib/dsa/ares_htable_dict.c +2 -0
  576. data/third_party/cares/cares/src/lib/dsa/ares_llist.c +4 -1
  577. data/third_party/cares/cares/src/lib/event/ares_event_configchg.c +5 -2
  578. data/third_party/cares/cares/src/lib/event/ares_event_select.c +14 -1
  579. data/third_party/cares/cares/src/lib/event/ares_event_thread.c +8 -0
  580. data/third_party/cares/cares/src/lib/event/ares_event_wake_pipe.c +7 -1
  581. data/third_party/cares/cares/src/lib/event/ares_event_win32.c +3 -0
  582. data/third_party/cares/cares/src/lib/include/ares_mem.h +3 -0
  583. data/third_party/cares/cares/src/lib/include/ares_str.h +17 -0
  584. data/third_party/cares/cares/src/lib/inet_net_pton.c +37 -28
  585. data/third_party/cares/cares/src/lib/legacy/ares_expand_name.c +1 -1
  586. data/third_party/cares/cares/src/lib/legacy/ares_parse_a_reply.c +5 -2
  587. data/third_party/cares/cares/src/lib/legacy/ares_parse_aaaa_reply.c +5 -2
  588. data/third_party/cares/cares/src/lib/legacy/ares_parse_ns_reply.c +2 -2
  589. data/third_party/cares/cares/src/lib/legacy/ares_parse_ptr_reply.c +2 -2
  590. data/third_party/cares/cares/src/lib/legacy/ares_parse_uri_reply.c +1 -1
  591. data/third_party/cares/cares/src/lib/record/ares_dns_mapping.c +19 -4
  592. data/third_party/cares/cares/src/lib/record/ares_dns_multistring.c +3 -1
  593. data/third_party/cares/cares/src/lib/record/ares_dns_name.c +67 -4
  594. data/third_party/cares/cares/src/lib/record/ares_dns_parse.c +62 -34
  595. data/third_party/cares/cares/src/lib/record/ares_dns_private.h +4 -0
  596. data/third_party/cares/cares/src/lib/record/ares_dns_record.c +47 -7
  597. data/third_party/cares/cares/src/lib/record/ares_dns_write.c +13 -5
  598. data/third_party/cares/cares/src/lib/str/ares_buf.c +33 -16
  599. data/third_party/cares/cares/src/lib/str/ares_str.c +54 -0
  600. data/third_party/cares/cares/src/lib/util/ares_iface_ips.c +22 -10
  601. data/third_party/cares/cares/src/lib/util/ares_iface_ips.h +1 -0
  602. data/third_party/cares/cares/src/lib/util/ares_math.c +17 -2
  603. data/third_party/cares/cares/src/lib/util/ares_math.h +32 -7
  604. data/third_party/cares/cares/src/lib/util/ares_rand.c +4 -4
  605. data/third_party/cares/cares/src/lib/util/ares_threads.c +1 -2
  606. data/third_party/cares/cares/src/lib/util/ares_time.h +1 -0
  607. data/third_party/cares/cares/src/lib/util/ares_uri.c +9 -3
  608. data/third_party/zlib/compress.c +34 -10
  609. data/third_party/zlib/crc32.c +49 -115
  610. data/third_party/zlib/deflate.c +107 -61
  611. data/third_party/zlib/deflate.h +7 -1
  612. data/third_party/zlib/gzguts.h +33 -31
  613. data/third_party/zlib/infback.c +20 -67
  614. data/third_party/zlib/inffast.c +7 -6
  615. data/third_party/zlib/inffixed.h +91 -91
  616. data/third_party/zlib/inflate.c +38 -151
  617. data/third_party/zlib/inflate.h +1 -1
  618. data/third_party/zlib/inftrees.c +134 -9
  619. data/third_party/zlib/inftrees.h +3 -1
  620. data/third_party/zlib/trees.c +14 -12
  621. data/third_party/zlib/uncompr.c +39 -23
  622. data/third_party/zlib/zconf.h +27 -19
  623. data/third_party/zlib/zlib.h +215 -96
  624. data/third_party/zlib/zutil.c +49 -35
  625. data/third_party/zlib/zutil.h +87 -10
  626. metadata +4095 -4049
  627. data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +0 -916
  628. data/src/core/ext/filters/rbac/rbac_service_config_parser.h +0 -84
  629. data/src/core/server/xds_channel_stack_modifier.cc +0 -108
  630. data/src/core/server/xds_channel_stack_modifier.h +0 -62
  631. data/src/core/server/xds_server_config_fetcher_legacy.cc +0 -1340
  632. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256_internal.h +0 -193
  633. data/third_party/boringssl-with-bazel/crypto/kyber/internal.h +0 -165
  634. data/third_party/boringssl-with-bazel/crypto/kyber/kyber.cc +0 -870
@@ -1,7 +1,7 @@
1
1
  /* zlib.h -- interface of the 'zlib' general purpose compression library
2
- version 1.3.1.1, January xxth, 2024
2
+ version 1.3.2, February 17th, 2026
3
3
 
4
- Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
4
+ Copyright (C) 1995-2026 Jean-loup Gailly and Mark Adler
5
5
 
6
6
  This software is provided 'as-is', without any express or implied
7
7
  warranty. In no event will the authors be held liable for any damages
@@ -24,25 +24,29 @@
24
24
 
25
25
 
26
26
  The data format used by the zlib library is described by RFCs (Request for
27
- Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
27
+ Comments) 1950 to 1952 at https://datatracker.ietf.org/doc/html/rfc1950
28
28
  (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
29
29
  */
30
30
 
31
31
  #ifndef ZLIB_H
32
32
  #define ZLIB_H
33
33
 
34
- #include "zconf.h"
34
+ #ifdef ZLIB_BUILD
35
+ # include <zconf.h>
36
+ #else
37
+ # include "zconf.h"
38
+ #endif
35
39
 
36
40
  #ifdef __cplusplus
37
41
  extern "C" {
38
42
  #endif
39
43
 
40
- #define ZLIB_VERSION "1.3.1.1-motley"
41
- #define ZLIB_VERNUM 0x1311
44
+ #define ZLIB_VERSION "1.3.2"
45
+ #define ZLIB_VERNUM 0x1320
42
46
  #define ZLIB_VER_MAJOR 1
43
47
  #define ZLIB_VER_MINOR 3
44
- #define ZLIB_VER_REVISION 1
45
- #define ZLIB_VER_SUBREVISION 1
48
+ #define ZLIB_VER_REVISION 2
49
+ #define ZLIB_VER_SUBREVISION 0
46
50
 
47
51
  /*
48
52
  The 'zlib' compression library provides in-memory compression and
@@ -441,7 +445,7 @@ ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush);
441
445
 
442
446
  The Z_BLOCK option assists in appending to or combining deflate streams.
443
447
  To assist in this, on return inflate() always sets strm->data_type to the
444
- number of unused bits in the last byte taken from strm->next_in, plus 64 if
448
+ number of unused bits in the input taken from strm->next_in, plus 64 if
445
449
  inflate() is currently decoding the last block in the deflate stream, plus
446
450
  128 if inflate() returned immediately after decoding an end-of-block code or
447
451
  decoding the complete header up to just before the first byte of the deflate
@@ -587,18 +591,21 @@ ZEXTERN int ZEXPORT deflateInit2(z_streamp strm,
587
591
 
588
592
  The strategy parameter is used to tune the compression algorithm. Use the
589
593
  value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
590
- filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
591
- string match), or Z_RLE to limit match distances to one (run-length
592
- encoding). Filtered data consists mostly of small values with a somewhat
593
- random distribution. In this case, the compression algorithm is tuned to
594
- compress them better. The effect of Z_FILTERED is to force more Huffman
595
- coding and less string matching; it is somewhat intermediate between
596
- Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as
597
- fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The
598
- strategy parameter only affects the compression ratio but not the
599
- correctness of the compressed output even if it is not set appropriately.
600
- Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
601
- decoder for special applications.
594
+ filter (or predictor), Z_RLE to limit match distances to one (run-length
595
+ encoding), or Z_HUFFMAN_ONLY to force Huffman encoding only (no string
596
+ matching). Filtered data consists mostly of small values with a somewhat
597
+ random distribution, as produced by the PNG filters. In this case, the
598
+ compression algorithm is tuned to compress them better. The effect of
599
+ Z_FILTERED is to force more Huffman coding and less string matching than the
600
+ default; it is intermediate between Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.
601
+ Z_RLE is almost as fast as Z_HUFFMAN_ONLY, but should give better
602
+ compression for PNG image data than Huffman only. The degree of string
603
+ matching from most to none is: Z_DEFAULT_STRATEGY, Z_FILTERED, Z_RLE, then
604
+ Z_HUFFMAN_ONLY. The strategy parameter affects the compression ratio but
605
+ never the correctness of the compressed output, even if it is not set
606
+ optimally for the given data. Z_FIXED uses the default string matching, but
607
+ prevents the use of dynamic Huffman codes, allowing for a simpler decoder
608
+ for special applications.
602
609
 
603
610
  deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
604
611
  memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
@@ -758,8 +765,8 @@ ZEXTERN int ZEXPORT deflateTune(z_streamp strm,
758
765
  returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
759
766
  */
760
767
 
761
- ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm,
762
- uLong sourceLen);
768
+ ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen);
769
+ ZEXTERN z_size_t ZEXPORT deflateBound_z(z_streamp strm, z_size_t sourceLen);
763
770
  /*
764
771
  deflateBound() returns an upper bound on the compressed size after
765
772
  deflation of sourceLen bytes. It must be called after deflateInit() or
@@ -771,6 +778,9 @@ ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm,
771
778
  to return Z_STREAM_END. Note that it is possible for the compressed size to
772
779
  be larger than the value returned by deflateBound() if flush options other
773
780
  than Z_FINISH or Z_NO_FLUSH are used.
781
+
782
+ delfateBound_z() is the same, but takes and returns a size_t length. Note
783
+ that a long is 32 bits on Windows.
774
784
  */
775
785
 
776
786
  ZEXTERN int ZEXPORT deflatePending(z_streamp strm,
@@ -785,6 +795,21 @@ ZEXTERN int ZEXPORT deflatePending(z_streamp strm,
785
795
  or bits are Z_NULL, then those values are not set.
786
796
 
787
797
  deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
798
+ stream state was inconsistent. If an int is 16 bits and memLevel is 9, then
799
+ it is possible for the number of pending bytes to not fit in an unsigned. In
800
+ that case Z_BUF_ERROR is returned and *pending is set to the maximum value
801
+ of an unsigned.
802
+ */
803
+
804
+ ZEXTERN int ZEXPORT deflateUsed(z_streamp strm,
805
+ int *bits);
806
+ /*
807
+ deflateUsed() returns in *bits the most recent number of deflate bits used
808
+ in the last byte when flushing to a byte boundary. The result is in 1..8, or
809
+ 0 if there has not yet been a flush. This helps determine the location of
810
+ the last bit of a deflate stream.
811
+
812
+ deflateUsed returns Z_OK if success, or Z_STREAM_ERROR if the source
788
813
  stream state was inconsistent.
789
814
  */
790
815
 
@@ -987,13 +1012,15 @@ ZEXTERN int ZEXPORT inflatePrime(z_streamp strm,
987
1012
  int bits,
988
1013
  int value);
989
1014
  /*
990
- This function inserts bits in the inflate input stream. The intent is
991
- that this function is used to start inflating at a bit position in the
992
- middle of a byte. The provided bits will be used before any bytes are used
993
- from next_in. This function should only be used with raw inflate, and
994
- should be used before the first inflate() call after inflateInit2() or
995
- inflateReset(). bits must be less than or equal to 16, and that many of the
996
- least significant bits of value will be inserted in the input.
1015
+ This function inserts bits in the inflate input stream. The intent is to
1016
+ use inflatePrime() to start inflating at a bit position in the middle of a
1017
+ byte. The provided bits will be used before any bytes are used from
1018
+ next_in. This function should be used with raw inflate, before the first
1019
+ inflate() call, after inflateInit2() or inflateReset(). It can also be used
1020
+ after an inflate() return indicates the end of a deflate block or header
1021
+ when using Z_BLOCK. bits must be less than or equal to 16, and that many of
1022
+ the least significant bits of value will be inserted in the input. The
1023
+ other bits in value can be non-zero, and will be ignored.
997
1024
 
998
1025
  If bits is negative, then the input stream bit buffer is emptied. Then
999
1026
  inflatePrime() can be called again to put bits in the buffer. This is used
@@ -1001,7 +1028,15 @@ ZEXTERN int ZEXPORT inflatePrime(z_streamp strm,
1001
1028
  to feeding inflate codes.
1002
1029
 
1003
1030
  inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
1004
- stream state was inconsistent.
1031
+ stream state was inconsistent, or if bits is out of range. If inflate was
1032
+ in the middle of processing a header, trailer, or stored block lengths, then
1033
+ it is possible for there to be only eight bits available in the bit buffer.
1034
+ In that case, bits > 8 is considered out of range. However, when used as
1035
+ outlined above, there will always be 16 bits available in the buffer for
1036
+ insertion. As noted in its documentation above, inflate records the number
1037
+ of bits in the bit buffer on return in data_type. 32 minus that is the
1038
+ number of bits available for insertion. inflatePrime does not update
1039
+ data_type with the new number of bits in buffer.
1005
1040
  */
1006
1041
 
1007
1042
  ZEXTERN long ZEXPORT inflateMark(z_streamp strm);
@@ -1047,20 +1082,22 @@ ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm,
1047
1082
 
1048
1083
  The text, time, xflags, and os fields are filled in with the gzip header
1049
1084
  contents. hcrc is set to true if there is a header CRC. (The header CRC
1050
- was valid if done is set to one.) If extra is not Z_NULL, then extra_max
1051
- contains the maximum number of bytes to write to extra. Once done is true,
1052
- extra_len contains the actual extra field length, and extra contains the
1053
- extra field, or that field truncated if extra_max is less than extra_len.
1054
- If name is not Z_NULL, then up to name_max characters are written there,
1055
- terminated with a zero unless the length is greater than name_max. If
1056
- comment is not Z_NULL, then up to comm_max characters are written there,
1057
- terminated with a zero unless the length is greater than comm_max. When any
1058
- of extra, name, or comment are not Z_NULL and the respective field is not
1059
- present in the header, then that field is set to Z_NULL to signal its
1060
- absence. This allows the use of deflateSetHeader() with the returned
1061
- structure to duplicate the header. However if those fields are set to
1062
- allocated memory, then the application will need to save those pointers
1063
- elsewhere so that they can be eventually freed.
1085
+ was valid if done is set to one.) The extra, name, and comment pointers
1086
+ much each be either Z_NULL or point to space to store that information from
1087
+ the header. If extra is not Z_NULL, then extra_max contains the maximum
1088
+ number of bytes that can be written to extra. Once done is true, extra_len
1089
+ contains the actual extra field length, and extra contains the extra field,
1090
+ or that field truncated if extra_max is less than extra_len. If name is not
1091
+ Z_NULL, then up to name_max characters, including the terminating zero, are
1092
+ written there. If comment is not Z_NULL, then up to comm_max characters,
1093
+ including the terminating zero, are written there. The application can tell
1094
+ that the name or comment did not fit in the provided space by the absence of
1095
+ a terminating zero. If any of extra, name, or comment are not present in
1096
+ the header, then that field's pointer is set to Z_NULL. This allows the use
1097
+ of deflateSetHeader() with the returned structure to duplicate the header.
1098
+ Note that if those fields initially pointed to allocated memory, then the
1099
+ application will need to save them elsewhere so that they can be eventually
1100
+ freed.
1064
1101
 
1065
1102
  If inflateGetHeader is not used, then the header information is simply
1066
1103
  discarded. The header is always checked for validity, including the header
@@ -1208,13 +1245,14 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
1208
1245
  21: FASTEST -- deflate algorithm with only one, lowest compression level
1209
1246
  22,23: 0 (reserved)
1210
1247
 
1211
- The sprintf variant used by gzprintf (zero is best):
1248
+ The sprintf variant used by gzprintf (all zeros is best):
1212
1249
  24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
1213
- 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
1250
+ 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() is not secure!
1214
1251
  26: 0 = returns value, 1 = void -- 1 means inferred string length returned
1252
+ 27: 0 = gzprintf() present, 1 = not -- 1 means gzprintf() returns an error
1215
1253
 
1216
1254
  Remainder:
1217
- 27-31: 0 (reserved)
1255
+ 28-31: 0 (reserved)
1218
1256
  */
1219
1257
 
1220
1258
  #ifndef Z_SOLO
@@ -1226,11 +1264,14 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
1226
1264
  stream-oriented functions. To simplify the interface, some default options
1227
1265
  are assumed (compression level and memory usage, standard memory allocation
1228
1266
  functions). The source code of these utility functions can be modified if
1229
- you need special options.
1267
+ you need special options. The _z versions of the functions use the size_t
1268
+ type for lengths. Note that a long is 32 bits on Windows.
1230
1269
  */
1231
1270
 
1232
- ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen,
1271
+ ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen,
1233
1272
  const Bytef *source, uLong sourceLen);
1273
+ ZEXTERN int ZEXPORT compress_z(Bytef *dest, z_size_t *destLen,
1274
+ const Bytef *source, z_size_t sourceLen);
1234
1275
  /*
1235
1276
  Compresses the source buffer into the destination buffer. sourceLen is
1236
1277
  the byte length of the source buffer. Upon entry, destLen is the total size
@@ -1244,9 +1285,12 @@ ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen,
1244
1285
  buffer.
1245
1286
  */
1246
1287
 
1247
- ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen,
1288
+ ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen,
1248
1289
  const Bytef *source, uLong sourceLen,
1249
1290
  int level);
1291
+ ZEXTERN int ZEXPORT compress2_z(Bytef *dest, z_size_t *destLen,
1292
+ const Bytef *source, z_size_t sourceLen,
1293
+ int level);
1250
1294
  /*
1251
1295
  Compresses the source buffer into the destination buffer. The level
1252
1296
  parameter has the same meaning as in deflateInit. sourceLen is the byte
@@ -1261,21 +1305,24 @@ ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen,
1261
1305
  */
1262
1306
 
1263
1307
  ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen);
1308
+ ZEXTERN z_size_t ZEXPORT compressBound_z(z_size_t sourceLen);
1264
1309
  /*
1265
1310
  compressBound() returns an upper bound on the compressed size after
1266
1311
  compress() or compress2() on sourceLen bytes. It would be used before a
1267
1312
  compress() or compress2() call to allocate the destination buffer.
1268
1313
  */
1269
1314
 
1270
- ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen,
1315
+ ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen,
1271
1316
  const Bytef *source, uLong sourceLen);
1317
+ ZEXTERN int ZEXPORT uncompress_z(Bytef *dest, z_size_t *destLen,
1318
+ const Bytef *source, z_size_t sourceLen);
1272
1319
  /*
1273
1320
  Decompresses the source buffer into the destination buffer. sourceLen is
1274
- the byte length of the source buffer. Upon entry, destLen is the total size
1321
+ the byte length of the source buffer. On entry, *destLen is the total size
1275
1322
  of the destination buffer, which must be large enough to hold the entire
1276
1323
  uncompressed data. (The size of the uncompressed data must have been saved
1277
1324
  previously by the compressor and transmitted to the decompressor by some
1278
- mechanism outside the scope of this compression library.) Upon exit, destLen
1325
+ mechanism outside the scope of this compression library.) On exit, *destLen
1279
1326
  is the actual size of the uncompressed data.
1280
1327
 
1281
1328
  uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
@@ -1285,8 +1332,10 @@ ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen,
1285
1332
  buffer with the uncompressed data up to that point.
1286
1333
  */
1287
1334
 
1288
- ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen,
1335
+ ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen,
1289
1336
  const Bytef *source, uLong *sourceLen);
1337
+ ZEXTERN int ZEXPORT uncompress2_z(Bytef *dest, z_size_t *destLen,
1338
+ const Bytef *source, z_size_t *sourceLen);
1290
1339
  /*
1291
1340
  Same as uncompress, except that sourceLen is a pointer, where the
1292
1341
  length of the source is *sourceLen. On return, *sourceLen is the number of
@@ -1314,13 +1363,17 @@ ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
1314
1363
  'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression
1315
1364
  as in "wb9F". (See the description of deflateInit2 for more information
1316
1365
  about the strategy parameter.) 'T' will request transparent writing or
1317
- appending with no compression and not using the gzip format.
1318
-
1319
- "a" can be used instead of "w" to request that the gzip stream that will
1320
- be written be appended to the file. "+" will result in an error, since
1366
+ appending with no compression and not using the gzip format. 'T' cannot be
1367
+ used to force transparent reading. Transparent reading is automatically
1368
+ performed if there is no gzip header at the start. Transparent reading can
1369
+ be disabled with the 'G' option, which will instead return an error if there
1370
+ is no gzip header. 'N' will open the file in non-blocking mode.
1371
+
1372
+ 'a' can be used instead of 'w' to request that the gzip stream that will
1373
+ be written be appended to the file. '+' will result in an error, since
1321
1374
  reading and writing to the same gzip file is not supported. The addition of
1322
- "x" when writing will create the file exclusively, which fails if the file
1323
- already exists. On systems that support it, the addition of "e" when
1375
+ 'x' when writing will create the file exclusively, which fails if the file
1376
+ already exists. On systems that support it, the addition of 'e' when
1324
1377
  reading or writing will set the flag to close the file on an execve() call.
1325
1378
 
1326
1379
  These functions, as well as gzip, will read and decode a sequence of gzip
@@ -1339,14 +1392,22 @@ ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
1339
1392
  insufficient memory to allocate the gzFile state, or if an invalid mode was
1340
1393
  specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
1341
1394
  errno can be checked to determine if the reason gzopen failed was that the
1342
- file could not be opened.
1395
+ file could not be opened. Note that if 'N' is in mode for non-blocking, the
1396
+ open() itself can fail in order to not block. In that case gzopen() will
1397
+ return NULL and errno will be EAGAIN or ENONBLOCK. The call to gzopen() can
1398
+ then be re-tried. If the application would like to block on opening the
1399
+ file, then it can use open() without O_NONBLOCK, and then gzdopen() with the
1400
+ resulting file descriptor and 'N' in the mode, which will set it to non-
1401
+ blocking.
1343
1402
  */
1344
1403
 
1345
1404
  ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode);
1346
1405
  /*
1347
1406
  Associate a gzFile with the file descriptor fd. File descriptors are
1348
1407
  obtained from calls like open, dup, creat, pipe or fileno (if the file has
1349
- been previously opened with fopen). The mode parameter is as in gzopen.
1408
+ been previously opened with fopen). The mode parameter is as in gzopen. An
1409
+ 'e' in mode will set fd's flag to close the file on an execve() call. An 'N'
1410
+ in mode will set fd's non-blocking flag.
1350
1411
 
1351
1412
  The next call of gzclose on the returned gzFile will also close the file
1352
1413
  descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
@@ -1416,10 +1477,16 @@ ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len);
1416
1477
  stream. Alternatively, gzerror can be used before gzclose to detect this
1417
1478
  case.
1418
1479
 
1480
+ gzread can be used to read a gzip file on a non-blocking device. If the
1481
+ input stalls and there is no uncompressed data to return, then gzread() will
1482
+ return -1, and errno will be EAGAIN or EWOULDBLOCK. gzread() can then be
1483
+ called again.
1484
+
1419
1485
  gzread returns the number of uncompressed bytes actually read, less than
1420
1486
  len for end of file, or -1 for error. If len is too large to fit in an int,
1421
1487
  then nothing is read, -1 is returned, and the error state is set to
1422
- Z_STREAM_ERROR.
1488
+ Z_STREAM_ERROR. If some data was read before an error, then that data is
1489
+ returned until exhausted, after which the next call will signal the error.
1423
1490
  */
1424
1491
 
1425
1492
  ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
@@ -1443,15 +1510,20 @@ ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
1443
1510
  multiple of size, then the final partial item is nevertheless read into buf
1444
1511
  and the end-of-file flag is set. The length of the partial item read is not
1445
1512
  provided, but could be inferred from the result of gztell(). This behavior
1446
- is the same as the behavior of fread() implementations in common libraries,
1447
- but it prevents the direct use of gzfread() to read a concurrently written
1448
- file, resetting and retrying on end-of-file, when size is not 1.
1513
+ is the same as that of fread() implementations in common libraries. This
1514
+ could result in data loss if used with size != 1 when reading a concurrently
1515
+ written file or a non-blocking file. In that case, use size == 1 or gzread()
1516
+ instead.
1449
1517
  */
1450
1518
 
1451
1519
  ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len);
1452
1520
  /*
1453
1521
  Compress and write the len uncompressed bytes at buf to file. gzwrite
1454
- returns the number of uncompressed bytes written or 0 in case of error.
1522
+ returns the number of uncompressed bytes written, or 0 in case of error or
1523
+ if len is 0. If the write destination is non-blocking, then gzwrite() may
1524
+ return a number of bytes written that is not 0 and less than len.
1525
+
1526
+ If len does not fit in an int, then 0 is returned and nothing is written.
1455
1527
  */
1456
1528
 
1457
1529
  ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size,
@@ -1466,9 +1538,18 @@ ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size,
1466
1538
  if there was an error. If the multiplication of size and nitems overflows,
1467
1539
  i.e. the product does not fit in a z_size_t, then nothing is written, zero
1468
1540
  is returned, and the error state is set to Z_STREAM_ERROR.
1541
+
1542
+ If writing a concurrently read file or a non-blocking file with size != 1,
1543
+ a partial item could be written, with no way of knowing how much of it was
1544
+ not written, resulting in data loss. In that case, use size == 1 or
1545
+ gzwrite() instead.
1469
1546
  */
1470
1547
 
1548
+ #if defined(STDC) || defined(Z_HAVE_STDARG_H)
1471
1549
  ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
1550
+ #else
1551
+ ZEXTERN int ZEXPORTVA gzprintf();
1552
+ #endif
1472
1553
  /*
1473
1554
  Convert, format, compress, and write the arguments (...) to file under
1474
1555
  control of the string format, as in fprintf. gzprintf returns the number of
@@ -1476,11 +1557,19 @@ ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
1476
1557
  of error. The number of uncompressed bytes written is limited to 8191, or
1477
1558
  one less than the buffer size given to gzbuffer(). The caller should assure
1478
1559
  that this limit is not exceeded. If it is exceeded, then gzprintf() will
1479
- return an error (0) with nothing written. In this case, there may also be a
1480
- buffer overflow with unpredictable consequences, which is possible only if
1481
- zlib was compiled with the insecure functions sprintf() or vsprintf(),
1482
- because the secure snprintf() or vsnprintf() functions were not available.
1483
- This can be determined using zlibCompileFlags().
1560
+ return an error (0) with nothing written.
1561
+
1562
+ In that last case, there may also be a buffer overflow with unpredictable
1563
+ consequences, which is possible only if zlib was compiled with the insecure
1564
+ functions sprintf() or vsprintf(), because the secure snprintf() and
1565
+ vsnprintf() functions were not available. That would only be the case for
1566
+ a non-ANSI C compiler. zlib may have been built without gzprintf() because
1567
+ secure functions were not available and having gzprintf() be insecure was
1568
+ not an option, in which case, gzprintf() returns Z_STREAM_ERROR. All of
1569
+ these possibilities can be determined using zlibCompileFlags().
1570
+
1571
+ If a Z_BUF_ERROR is returned, then nothing was written due to a stall on
1572
+ the non-blocking write destination.
1484
1573
  */
1485
1574
 
1486
1575
  ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
@@ -1489,6 +1578,11 @@ ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
1489
1578
  the terminating null character.
1490
1579
 
1491
1580
  gzputs returns the number of characters written, or -1 in case of error.
1581
+ The number of characters written may be less than the length of the string
1582
+ if the write destination is non-blocking.
1583
+
1584
+ If the length of the string does not fit in an int, then -1 is returned
1585
+ and nothing is written.
1492
1586
  */
1493
1587
 
1494
1588
  ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
@@ -1501,8 +1595,13 @@ ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
1501
1595
  left untouched.
1502
1596
 
1503
1597
  gzgets returns buf which is a null-terminated string, or it returns NULL
1504
- for end-of-file or in case of error. If there was an error, the contents at
1505
- buf are indeterminate.
1598
+ for end-of-file or in case of error. If some data was read before an error,
1599
+ then that data is returned until exhausted, after which the next call will
1600
+ return NULL to signal the error.
1601
+
1602
+ gzgets can be used on a file being concurrently written, and on a non-
1603
+ blocking device, both as for gzread(). However lines may be broken in the
1604
+ middle, leaving it up to the application to reassemble them as needed.
1506
1605
  */
1507
1606
 
1508
1607
  ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
@@ -1513,11 +1612,19 @@ ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
1513
1612
 
1514
1613
  ZEXTERN int ZEXPORT gzgetc(gzFile file);
1515
1614
  /*
1516
- Read and decompress one byte from file. gzgetc returns this byte or -1
1517
- in case of end of file or error. This is implemented as a macro for speed.
1518
- As such, it does not do all of the checking the other functions do. I.e.
1519
- it does not check to see if file is NULL, nor whether the structure file
1520
- points to has been clobbered or not.
1615
+ Read and decompress one byte from file. gzgetc returns this byte or -1 in
1616
+ case of end of file or error. If some data was read before an error, then
1617
+ that data is returned until exhausted, after which the next call will return
1618
+ -1 to signal the error.
1619
+
1620
+ This is implemented as a macro for speed. As such, it does not do all of
1621
+ the checking the other functions do. I.e. it does not check to see if file
1622
+ is NULL, nor whether the structure file points to has been clobbered or not.
1623
+
1624
+ gzgetc can be used to read a gzip file on a non-blocking device. If the
1625
+ input stalls and there is no uncompressed data to return, then gzgetc() will
1626
+ return -1, and errno will be EAGAIN or EWOULDBLOCK. gzread() can then be
1627
+ called again.
1521
1628
  */
1522
1629
 
1523
1630
  ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
@@ -1530,6 +1637,11 @@ ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
1530
1637
  output buffer size of pushed characters is allowed. (See gzbuffer above.)
1531
1638
  The pushed character will be discarded if the stream is repositioned with
1532
1639
  gzseek() or gzrewind().
1640
+
1641
+ gzungetc(-1, file) will force any pending seek to execute. Then gztell()
1642
+ will report the position, even if the requested seek reached end of file.
1643
+ This can be used to determine the number of uncompressed bytes in a gzip
1644
+ file without having to read it into a buffer.
1533
1645
  */
1534
1646
 
1535
1647
  ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
@@ -1559,7 +1671,8 @@ ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
1559
1671
  If the file is opened for reading, this function is emulated but can be
1560
1672
  extremely slow. If the file is opened for writing, only forward seeks are
1561
1673
  supported; gzseek then compresses a sequence of zeroes up to the new
1562
- starting position.
1674
+ starting position. For reading or writing, any actual seeking is deferred
1675
+ until the next read or write operation, or close operation when writing.
1563
1676
 
1564
1677
  gzseek returns the resulting offset location as measured in bytes from
1565
1678
  the beginning of the uncompressed stream, or -1 in case of error, in
@@ -1567,7 +1680,7 @@ ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
1567
1680
  would be before the current position.
1568
1681
  */
1569
1682
 
1570
- ZEXTERN int ZEXPORT gzrewind(gzFile file);
1683
+ ZEXTERN int ZEXPORT gzrewind(gzFile file);
1571
1684
  /*
1572
1685
  Rewind file. This function is supported only for reading.
1573
1686
 
@@ -1575,7 +1688,7 @@ ZEXTERN int ZEXPORT gzrewind(gzFile file);
1575
1688
  */
1576
1689
 
1577
1690
  /*
1578
- ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
1691
+ ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
1579
1692
 
1580
1693
  Return the starting position for the next gzread or gzwrite on file.
1581
1694
  This position represents a number of bytes in the uncompressed data stream,
@@ -1620,8 +1733,11 @@ ZEXTERN int ZEXPORT gzdirect(gzFile file);
1620
1733
 
1621
1734
  If gzdirect() is used immediately after gzopen() or gzdopen() it will
1622
1735
  cause buffers to be allocated to allow reading the file to determine if it
1623
- is a gzip file. Therefore if gzbuffer() is used, it should be called before
1624
- gzdirect().
1736
+ is a gzip file. Therefore if gzbuffer() is used, it should be called before
1737
+ gzdirect(). If the input is being written concurrently or the device is non-
1738
+ blocking, then gzdirect() may give a different answer once four bytes of
1739
+ input have been accumulated, which is what is needed to confirm or deny a
1740
+ gzip header. Before this, gzdirect() will return true (1).
1625
1741
 
1626
1742
  When writing, gzdirect() returns true (1) if transparent writing was
1627
1743
  requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note:
@@ -1631,7 +1747,7 @@ ZEXTERN int ZEXPORT gzdirect(gzFile file);
1631
1747
  gzip file reading and decompression, which may not be desired.)
1632
1748
  */
1633
1749
 
1634
- ZEXTERN int ZEXPORT gzclose(gzFile file);
1750
+ ZEXTERN int ZEXPORT gzclose(gzFile file);
1635
1751
  /*
1636
1752
  Flush all pending output for file, if necessary, close file and
1637
1753
  deallocate the (de)compression state. Note that once file is closed, you
@@ -1659,9 +1775,10 @@ ZEXTERN int ZEXPORT gzclose_w(gzFile file);
1659
1775
  ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
1660
1776
  /*
1661
1777
  Return the error message for the last error which occurred on file.
1662
- errnum is set to zlib error number. If an error occurred in the file system
1663
- and not in the compression library, errnum is set to Z_ERRNO and the
1664
- application may consult errno to get the exact error code.
1778
+ If errnum is not NULL, *errnum is set to zlib error number. If an error
1779
+ occurred in the file system and not in the compression library, *errnum is
1780
+ set to Z_ERRNO and the application may consult errno to get the exact error
1781
+ code.
1665
1782
 
1666
1783
  The application must not modify the returned string. Future calls to
1667
1784
  this function may invalidate the previously returned string. If file is
@@ -1712,7 +1829,8 @@ ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len);
1712
1829
  ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf,
1713
1830
  z_size_t len);
1714
1831
  /*
1715
- Same as adler32(), but with a size_t length.
1832
+ Same as adler32(), but with a size_t length. Note that a long is 32 bits
1833
+ on Windows.
1716
1834
  */
1717
1835
 
1718
1836
  /*
@@ -1748,7 +1866,8 @@ ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len);
1748
1866
  ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf,
1749
1867
  z_size_t len);
1750
1868
  /*
1751
- Same as crc32(), but with a size_t length.
1869
+ Same as crc32(), but with a size_t length. Note that a long is 32 bits on
1870
+ Windows.
1752
1871
  */
1753
1872
 
1754
1873
  /*
@@ -1758,14 +1877,14 @@ ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2);
1758
1877
  seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
1759
1878
  calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
1760
1879
  check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
1761
- len2. len2 must be non-negative.
1880
+ len2. len2 must be non-negative, otherwise zero is returned.
1762
1881
  */
1763
1882
 
1764
1883
  /*
1765
1884
  ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2);
1766
1885
 
1767
1886
  Return the operator corresponding to length len2, to be used with
1768
- crc32_combine_op(). len2 must be non-negative.
1887
+ crc32_combine_op(). len2 must be non-negative, otherwise zero is returned.
1769
1888
  */
1770
1889
 
1771
1890
  ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
@@ -1888,9 +2007,9 @@ ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */
1888
2007
  ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int);
1889
2008
  ZEXTERN z_off_t ZEXPORT gztell64(gzFile);
1890
2009
  ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile);
1891
- ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
1892
- ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
1893
- ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
2010
+ ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
2011
+ ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
2012
+ ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
1894
2013
  # endif
1895
2014
  #else
1896
2015
  ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *);