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
@@ -15,7 +15,7 @@
15
15
  #ifndef OPENSSL_HEADER_AEAD_H
16
16
  #define OPENSSL_HEADER_AEAD_H
17
17
 
18
- #include <openssl/base.h> // IWYU pragma: export
18
+ #include <openssl/base.h> // IWYU pragma: export
19
19
 
20
20
  #if defined(__cplusplus)
21
21
  extern "C" {
@@ -326,7 +326,7 @@ OPENSSL_EXPORT int EVP_AEAD_CTX_seal(const EVP_AEAD_CTX *ctx, uint8_t *out,
326
326
  //
327
327
  // At most `in_len` bytes are written to `out`. In order to ensure success,
328
328
  // `max_out_len` should be at least `in_len`. On successful return, `*out_len`
329
- // is set to the the actual number of bytes written.
329
+ // is set to the actual number of bytes written.
330
330
  //
331
331
  // The length of `nonce`, `nonce_len`, must be equal to the result of
332
332
  // `EVP_AEAD_nonce_length` for this AEAD.
@@ -398,16 +398,14 @@ OPENSSL_EXPORT int EVP_AEAD_CTX_open_gather(
398
398
  size_t in_tag_len, const uint8_t *ad, size_t ad_len);
399
399
 
400
400
  // crypto_ivec_st (aka `CRYPTO_IVEC`) combines a pointer to input data with its
401
- // length. It is usually passed as an array of length of at most
402
- // `CRYPTO_IOVEC_MAX`.
401
+ // length. It is usually passed as an array.
403
402
  struct crypto_ivec_st {
404
403
  const uint8_t *in;
405
404
  size_t len;
406
405
  };
407
406
 
408
407
  // crypto_iovec_st (aka `CRYPTO_IOVEC` combines a pointer to input data and a
409
- // pointer to an output buffer with their common length. It is usually passed
410
- // as an array of length of at most `CRYPTO_IOVEC_MAX`.
408
+ // pointer to an output buffer with their common length.
411
409
  struct crypto_iovec_st {
412
410
  // `out` and `in` must be disjoint or equal
413
411
  uint8_t *out;
@@ -415,10 +413,6 @@ struct crypto_iovec_st {
415
413
  size_t len;
416
414
  };
417
415
 
418
- // CRYPTO_IOVEC_MAX is the maximum number of entries in an `CRYPTO_IOVEC` or
419
- // `CRYPTO_IVEC` parameter.
420
- #define CRYPTO_IOVEC_MAX 16
421
-
422
416
  // EVP_AEAD_CTX_sealv encrypts and authenticates the `in` bytes from `iovec`
423
417
  // and authenticates the `aadvec` bytes. It writes the same amount of
424
418
  // ciphertext to the `out` pointers of `iovec` and the authentication tag to
@@ -450,8 +444,6 @@ struct crypto_iovec_st {
450
444
  // directly or via `iovec` and `aadvec`, with the one exception that it is
451
445
  // permitted for the same `iovec` member's `in` and `out` members to be equal
452
446
  // (in-place operation).
453
- //
454
- // `num_iovec` and `num_aadvec` must be <= `CRYPTO_IOVEC_MAX`.
455
447
  OPENSSL_EXPORT
456
448
  int EVP_AEAD_CTX_sealv(const EVP_AEAD_CTX *ctx, const CRYPTO_IOVEC *iovec,
457
449
  size_t num_iovec, uint8_t *out_tag, size_t *out_tag_len,
@@ -493,8 +485,6 @@ int EVP_AEAD_CTX_sealv(const EVP_AEAD_CTX *ctx, const CRYPTO_IOVEC *iovec,
493
485
  // directly or via `iovec` and `aadvec`, with the one exception that it is
494
486
  // permitted for the same `iovec` member's `in` and `out` members to be equal
495
487
  // (in-place operation).
496
- //
497
- // `num_iovec` and `num_aadvec` must be <= `CRYPTO_IOVEC_MAX`.
498
488
  OPENSSL_EXPORT
499
489
  int EVP_AEAD_CTX_openv(const EVP_AEAD_CTX *ctx, const CRYPTO_IOVEC *iovec,
500
490
  size_t num_iovec, size_t *out_total_bytes,
@@ -531,8 +521,6 @@ int EVP_AEAD_CTX_openv(const EVP_AEAD_CTX *ctx, const CRYPTO_IOVEC *iovec,
531
521
  // directly or via `iovec` and `aadvec`, with the one exception that it is
532
522
  // permitted for the same `iovec` member's `in` and `out` members to be equal
533
523
  // (in-place operation).
534
- //
535
- // `num_iovec` and `num_aadvec` must be <= `CRYPTO_IOVEC_MAX`.
536
524
  OPENSSL_EXPORT
537
525
  int EVP_AEAD_CTX_openv_detached(const EVP_AEAD_CTX *ctx,
538
526
  const CRYPTO_IOVEC *iovec, size_t num_iovec,
@@ -646,9 +634,9 @@ extern "C++" {
646
634
 
647
635
  BSSL_NAMESPACE_BEGIN
648
636
 
649
- using ScopedEVP_AEAD_CTX =
650
- internal::StackAllocated<EVP_AEAD_CTX, void, EVP_AEAD_CTX_zero,
651
- EVP_AEAD_CTX_cleanup>;
637
+ BORINGSSL_MAKE_STACK_TRAITS(EVP_AEAD_CTX, EVP_AEAD_CTX_zero,
638
+ EVP_AEAD_CTX_cleanup)
639
+ using ScopedEVP_AEAD_CTX = internal::StackAllocated<EVP_AEAD_CTX>;
652
640
 
653
641
  BORINGSSL_MAKE_DELETER(EVP_AEAD_CTX, EVP_AEAD_CTX_free)
654
642
 
@@ -27,7 +27,7 @@
27
27
  // when included in assembly, adds that metadata. It also makes defines like
28
28
  // `OPENSSL_X86_64` available and includes the prefixing macros.
29
29
  //
30
- // Including this header in an assembly file imples:
30
+ // Including this header in an assembly file implies:
31
31
  //
32
32
  // - The file does not require an executable stack.
33
33
  //
@@ -15,7 +15,7 @@
15
15
  #ifndef OPENSSL_HEADER_ASN1_H
16
16
  #define OPENSSL_HEADER_ASN1_H
17
17
 
18
- #include <openssl/base.h> // IWYU pragma: export
18
+ #include <openssl/base.h> // IWYU pragma: export
19
19
 
20
20
  #include <time.h>
21
21
 
@@ -272,11 +272,6 @@ OPENSSL_EXPORT void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
272
272
  // It behaves like `d2i_SAMPLE`, except that `out` and the return value are cast
273
273
  // to `ASN1_VALUE` pointers.
274
274
  //
275
- // TODO(https://crbug.com/boringssl/444): C strict aliasing forbids type-punning
276
- // `T*` and `ASN1_VALUE*` the way this function signature does. When that bug is
277
- // resolved, we will need to pick which type `*out` is (probably `T*`). Do not
278
- // use a non-NULL `out` to avoid ending up on the wrong side of this question.
279
- //
280
275
  // This function may not be used with `ASN1_ITEM`s whose C type is
281
276
  // `ASN1_BOOLEAN`.
282
277
  //
@@ -916,7 +911,8 @@ DECLARE_ASN1_ITEM(ASN1_BIT_STRING)
916
911
  OPENSSL_EXPORT uint8_t ASN1_BIT_STRING_unused_bits(const ASN1_BIT_STRING *str);
917
912
 
918
913
  // ASN1_BIT_STRING_set calls `ASN1_STRING_set`.
919
- OPENSSL_EXPORT int ASN1_BIT_STRING_set(ASN1_BIT_STRING *str, const uint8_t *data,
914
+ OPENSSL_EXPORT int ASN1_BIT_STRING_set(ASN1_BIT_STRING *str,
915
+ const uint8_t *data,
920
916
  ossl_ssize_t length);
921
917
 
922
918
  // ASN1_BIT_STRING_set1 sets `str` to a BIT STRING containing `length` bytes
@@ -1324,8 +1320,8 @@ OPENSSL_EXPORT int ASN1_TIME_to_posix(const ASN1_TIME *t, int64_t *out);
1324
1320
  // non-standard four-digit timezone offsets on UTC times. On success, one is
1325
1321
  // returned. On failure, zero is returned. `ASN1_TIME_to_posix` should normally
1326
1322
  // be used instead of this function.
1327
- OPENSSL_EXPORT int ASN1_TIME_to_posix_nonstandard(
1328
- const ASN1_TIME *t, int64_t *out);
1323
+ OPENSSL_EXPORT int ASN1_TIME_to_posix_nonstandard(const ASN1_TIME *t,
1324
+ int64_t *out);
1329
1325
 
1330
1326
  // TODO(davidben): Expand and document function prototypes generated in macros.
1331
1327
 
@@ -1359,7 +1355,7 @@ DECLARE_ASN1_ITEM(ASN1_NULL)
1359
1355
 
1360
1356
  // Object identifiers.
1361
1357
  //
1362
- // An `ASN1_OBJECT` represents a ASN.1 OBJECT IDENTIFIER. See also obj.h for
1358
+ // An `ASN1_OBJECT` represents an ASN.1 OBJECT IDENTIFIER. See also obj.h for
1363
1359
  // additional functions relating to `ASN1_OBJECT`.
1364
1360
  //
1365
1361
  // TODO(davidben): What's the relationship between asn1.h and obj.h? Most of
@@ -73,7 +73,7 @@ extern "C" {
73
73
  // A consumer may use this symbol in the preprocessor to temporarily build
74
74
  // against multiple revisions of BoringSSL at the same time. It is not
75
75
  // recommended to do so for longer than is necessary.
76
- #define BORINGSSL_API_VERSION 42
76
+ #define BORINGSSL_API_VERSION 43
77
77
 
78
78
  #if defined(BORINGSSL_SHARED_LIBRARY)
79
79
 
@@ -395,6 +395,9 @@ typedef void *OPENSSL_BLOCK;
395
395
 
396
396
  #define BORINGSSL_MAKE_DELETER(type, deleter)
397
397
  #define BORINGSSL_MAKE_UP_REF(type, up_ref_func)
398
+ #define BORINGSSL_MAKE_STACK_TRAITS(type, init_func, cleanup_func)
399
+ #define BORINGSSL_MAKE_STACK_TRAITS_MOVABLE(type, init_func, cleanup_func, \
400
+ move_func)
398
401
 
399
402
  #else
400
403
 
@@ -427,12 +430,14 @@ struct Deleter {
427
430
  }
428
431
  };
429
432
 
430
- template <typename T, typename CleanupRet, void (*init)(T *),
431
- CleanupRet (*cleanup)(T *)>
433
+ template <typename T>
434
+ struct StackAllocatedTraits {};
435
+
436
+ template <typename T, typename Traits = StackAllocatedTraits<T> >
432
437
  class StackAllocated {
433
438
  public:
434
- StackAllocated() { init(&ctx_); }
435
- ~StackAllocated() { cleanup(&ctx_); }
439
+ StackAllocated() { Traits::Init(&ctx_); }
440
+ ~StackAllocated() { Traits::Cleanup(&ctx_); }
436
441
 
437
442
  StackAllocated(const StackAllocated &) = delete;
438
443
  StackAllocated &operator=(const StackAllocated &) = delete;
@@ -444,27 +449,29 @@ class StackAllocated {
444
449
  const T *operator->() const { return &ctx_; }
445
450
 
446
451
  void Reset() {
447
- cleanup(&ctx_);
448
- init(&ctx_);
452
+ Traits::Cleanup(&ctx_);
453
+ Traits::Init(&ctx_);
449
454
  }
450
455
 
451
456
  private:
452
457
  T ctx_;
453
458
  };
454
459
 
455
- template <typename T, typename CleanupRet, void (*init)(T *),
456
- CleanupRet (*cleanup)(T *), void (*move)(T *, T *)>
460
+ template <typename T>
461
+ struct StackAllocatedMovableTraits {};
462
+
463
+ template <typename T, typename Traits = StackAllocatedMovableTraits<T> >
457
464
  class StackAllocatedMovable {
458
465
  public:
459
- StackAllocatedMovable() { init(&ctx_); }
460
- ~StackAllocatedMovable() { cleanup(&ctx_); }
466
+ StackAllocatedMovable() { Traits::Init(&ctx_); }
467
+ ~StackAllocatedMovable() { Traits::Cleanup(&ctx_); }
461
468
 
462
469
  StackAllocatedMovable(StackAllocatedMovable &&other) {
463
- init(&ctx_);
464
- move(&ctx_, &other.ctx_);
470
+ Traits::Init(&ctx_);
471
+ Traits::Move(&ctx_, &other.ctx_);
465
472
  }
466
473
  StackAllocatedMovable &operator=(StackAllocatedMovable &&other) {
467
- move(&ctx_, &other.ctx_);
474
+ Traits::Move(&ctx_, &other.ctx_);
468
475
  return *this;
469
476
  }
470
477
 
@@ -475,8 +482,8 @@ class StackAllocatedMovable {
475
482
  const T *operator->() const { return &ctx_; }
476
483
 
477
484
  void Reset() {
478
- cleanup(&ctx_);
479
- init(&ctx_);
485
+ Traits::Cleanup(&ctx_);
486
+ Traits::Init(&ctx_);
480
487
  }
481
488
 
482
489
  private:
@@ -493,6 +500,26 @@ class StackAllocatedMovable {
493
500
  }; \
494
501
  }
495
502
 
503
+ #define BORINGSSL_MAKE_STACK_TRAITS(type, init_func, cleanup_func) \
504
+ namespace internal { \
505
+ template <> \
506
+ struct StackAllocatedTraits<type> { \
507
+ static void Init(type *ptr) { init_func(ptr); } \
508
+ static void Cleanup(type *ptr) { cleanup_func(ptr); } \
509
+ }; \
510
+ }
511
+
512
+ #define BORINGSSL_MAKE_STACK_TRAITS_MOVABLE(type, init_func, cleanup_func, \
513
+ move_func) \
514
+ namespace internal { \
515
+ template <> \
516
+ struct StackAllocatedMovableTraits<type> { \
517
+ static void Init(type *ptr) { init_func(ptr); } \
518
+ static void Cleanup(type *ptr) { cleanup_func(ptr); } \
519
+ static void Move(type *out, type *in) { move_func(out, in); } \
520
+ }; \
521
+ }
522
+
496
523
  // Holds ownership of heap-allocated BoringSSL structures. Sample usage:
497
524
  // bssl::UniquePtr<RSA> rsa(RSA_new());
498
525
  // bssl::UniquePtr<BIO> bio(BIO_new(BIO_s_mem()));
@@ -69,7 +69,9 @@ OPENSSL_EXPORT int BIO_up_ref(BIO *bio);
69
69
  // Basic I/O.
70
70
 
71
71
  // BIO_read attempts to read `len` bytes into `data`. It returns the number of
72
- // bytes read, zero on EOF, or a negative number on error.
72
+ // bytes read, zero on EOF, or a negative number on error. Callers that support
73
+ // non-blocking I/O should call `BIO_should_read` on error to check if the error
74
+ // is fatal or retryable.
73
75
  OPENSSL_EXPORT int BIO_read(BIO *bio, void *data, int len);
74
76
 
75
77
  // BIO_gets reads a line from `bio` and writes at most `size` bytes into `buf`.
@@ -84,12 +86,16 @@ OPENSSL_EXPORT int BIO_gets(BIO *bio, char *buf, int size);
84
86
 
85
87
  // BIO_write_ex writes `len` bytes from `data` to `bio`. On success, it returns
86
88
  // one and sets `*out_written` to the number of bytes written. Otherwise, it
87
- // returns zero. `out_written` may be NULL to ignore the value.
89
+ // returns zero. `out_written` may be NULL to ignore the value. Callers that
90
+ // support non-blocking I/O should call `BIO_should_write` on error to check if
91
+ // the error is fatal or retryable.
88
92
  OPENSSL_EXPORT int BIO_write_ex(BIO *bio, const void *data, size_t len,
89
93
  size_t *out_written);
90
94
 
91
95
  // BIO_write writes `len` bytes from `data` to `bio`. It returns the number of
92
- // bytes written or a negative number on error.
96
+ // bytes written or a negative number on error. Callers that support
97
+ // non-blocking I/O should call `BIO_should_write` on error to check if the
98
+ // error is fatal or retryable.
93
99
  OPENSSL_EXPORT int BIO_write(BIO *bio, const void *data, int len);
94
100
 
95
101
  // BIO_write_all writes `len` bytes from `data` to `bio`, looping as necessary.
@@ -100,8 +106,9 @@ OPENSSL_EXPORT int BIO_write_all(BIO *bio, const void *data, size_t len);
100
106
  // number of bytes written or a negative number on error.
101
107
  OPENSSL_EXPORT int BIO_puts(BIO *bio, const char *buf);
102
108
 
103
- // BIO_flush flushes any buffered output. It returns one on success and zero
104
- // otherwise.
109
+ // BIO_flush flushes any buffered output. It returns one on success and <= 0 on
110
+ // error. Callers that support non-blocking I/O should call `BIO_should_write`
111
+ // on error to check if the error is fatal or retryable.
105
112
  OPENSSL_EXPORT int BIO_flush(BIO *bio);
106
113
 
107
114
 
@@ -334,7 +341,7 @@ OPENSSL_EXPORT int BIO_read_asn1(BIO *bio, uint8_t **out, size_t *out_len,
334
341
  #define BIO_NOCLOSE 0
335
342
  #define BIO_CLOSE 1
336
343
 
337
- // BIO_s_mem returns a `BIO_METHOD` that uses a in-memory buffer.
344
+ // BIO_s_mem returns a `BIO_METHOD` that uses an in-memory buffer.
338
345
  OPENSSL_EXPORT const BIO_METHOD *BIO_s_mem(void);
339
346
 
340
347
  // BIO_new_mem_buf creates read-only BIO that reads from `len` bytes at `buf`.
@@ -386,7 +393,7 @@ OPENSSL_EXPORT int BIO_set_mem_eof_return(BIO *bio, int eof_value);
386
393
  // File descriptor BIOs.
387
394
  //
388
395
  // File descriptor BIOs are wrappers around the system's `read` and `write`
389
- // functions. If the close flag is set then then `close` is called on the
396
+ // functions. If the close flag is set then `close` is called on the
390
397
  // underlying file descriptor when the BIO is freed.
391
398
  //
392
399
  // `BIO_reset` attempts to seek the file pointer to the start of file using
@@ -657,9 +664,17 @@ OPENSSL_EXPORT int BIO_shutdown_wr(BIO *bio);
657
664
  OPENSSL_EXPORT int BIO_get_new_index(void);
658
665
 
659
666
  // BIO_meth_new returns a newly-allocated `BIO_METHOD` or NULL on allocation
660
- // error. The `type` specifies the type that will be returned by
661
- // `BIO_method_type`. If this is unnecessary, this value may be zero. The `name`
662
- // parameter is vestigial and may be NULL.
667
+ // error. `type` and `name` optionally identify the `BIO_METHOD`. Most callers
668
+ // will not need to inspect the type of their own `BIO`s and can pass zero and
669
+ // NULL, respectively, to skip this mechanism.
670
+ //
671
+ // `type` specifies the type that will be returned by `BIO_method_type` and
672
+ // matched by `BIO_find_type`. If used, it should be a combination of an index,
673
+ // allocated by `BIO_get_new_index`, and optionally the `BIO_TYPE_DESCRIPTOR`,
674
+ // `BIO_TYPE_FILTER`, and `BIO_TYPE_SOURCE_SINK` flags. If `BIO_TYPE_DESCRIPTOR`
675
+ // is set, the `BIO_METHOD` must implement `BIO_C_GET_FD`.
676
+ //
677
+ // `name` is unused. BoringSSL does not currently implement `BIO_method_name`.
663
678
  //
664
679
  // Use the `BIO_meth_set_*` functions below to initialize the `BIO_METHOD`. The
665
680
  // function implementations may use `BIO_set_data` and `BIO_get_data` to add
@@ -429,6 +429,16 @@ OPENSSL_EXPORT int CBS_is_valid_asn1_relative_oid(const CBS *cbs);
429
429
  // OID components are too large.
430
430
  OPENSSL_EXPORT char *CBS_asn1_relative_oid_to_text(const CBS *cbs);
431
431
 
432
+ // CBS_get_asn1_oid_component gets a single OID component from `cbs`. On
433
+ // success, it sets `*out` to the value, advances `cbs` past the component, and
434
+ // returns one. If the input does not contain a valid OID component or if the
435
+ // OID component is bigger than `uint64_t`, it returns zero.
436
+ //
437
+ // Specifically, this decodes a non-empty, minimal-width, base-128, big-endian
438
+ // integer. The high bit of each byte is set for continuation bytes and unset
439
+ // for the final byte. This encoding is also used for DER tag numbers 31 and up.
440
+ OPENSSL_EXPORT int CBS_get_asn1_oid_component(CBS *cbs, uint64_t *out);
441
+
432
442
  // CBS_parse_generalized_time returns one if `cbs` is a valid DER-encoded, ASN.1
433
443
  // GeneralizedTime body within the limitations imposed by RFC 5280, or zero
434
444
  // otherwise. If `allow_timezone_offset` is non-zero, four-digit timezone
@@ -449,6 +459,7 @@ OPENSSL_EXPORT int CBS_parse_generalized_time(const CBS *cbs, struct tm *out_tm,
449
459
  OPENSSL_EXPORT int CBS_parse_utc_time(const CBS *cbs, struct tm *out_tm,
450
460
  int allow_timezone_offset);
451
461
 
462
+
452
463
  // CRYPTO ByteBuilder.
453
464
  //
454
465
  // `CBB` objects allow one to build length-prefixed serialisations. A `CBB`
@@ -628,6 +639,10 @@ OPENSSL_EXPORT int CBB_add_u32(CBB *cbb, uint32_t value);
628
639
  // It returns one on success and zero otherwise.
629
640
  OPENSSL_EXPORT int CBB_add_u32le(CBB *cbb, uint32_t value);
630
641
 
642
+ // CBB_add_u48 appends a 48-bit, big-endian number from `value` to `cbb`. It
643
+ // returns one on success and zero otherwise.
644
+ OPENSSL_EXPORT int CBB_add_u48(CBB *cbb, uint64_t value);
645
+
631
646
  // CBB_add_u64 appends a 64-bit, big-endian number from `value` to `cbb`. It
632
647
  // returns one on success and zero otherwise.
633
648
  OPENSSL_EXPORT int CBB_add_u64(CBB *cbb, uint64_t value);
@@ -704,8 +719,24 @@ OPENSSL_EXPORT int CBB_add_asn1_relative_oid_from_text(CBB *cbb,
704
719
  const char *text,
705
720
  size_t len);
706
721
 
722
+ // CBB_add_asn1_relative_oid_from_der_to_text reads `data_len` bytes of
723
+ // DER-encoded ASN.1 RELATIVE-OID contents (not including the element framing)
724
+ // from `data` and writes the ASCII representation (e.g., "32473.1") to `cbb`
725
+ // (without a trailing NUL byte). It returns one on success and zero on
726
+ // failure.
727
+ //
728
+ // This function may fail if `data` is an invalid RELATIVE-OID, or if any OID
729
+ // components are too large.
730
+ OPENSSL_EXPORT int CBB_add_asn1_relative_oid_from_der_to_text(
731
+ CBB *cbb, const uint8_t *data, size_t data_len);
732
+
707
733
  // CBB_add_asn1_oid_component appends a single OID component to `cbb`.
708
734
  // It returns one on success and zero on error.
735
+ //
736
+ // Specifically, this encodes `value` as a non-empty, minimal-width, base-128,
737
+ // big-endian integer. The high bit of each byte is set for continuation bytes
738
+ // and unset for the final byte. This encoding is also used for DER tag numbers
739
+ // 31 and up.
709
740
  OPENSSL_EXPORT int CBB_add_asn1_oid_component(CBB *cbb, uint64_t value);
710
741
 
711
742
  // CBB_flush_asn1_set_of calls `CBB_flush` on `cbb` and then reorders the
@@ -754,7 +785,8 @@ extern "C++" {
754
785
 
755
786
  BSSL_NAMESPACE_BEGIN
756
787
 
757
- using ScopedCBB = internal::StackAllocated<CBB, void, CBB_zero, CBB_cleanup>;
788
+ BORINGSSL_MAKE_STACK_TRAITS(CBB, CBB_zero, CBB_cleanup)
789
+ using ScopedCBB = internal::StackAllocated<CBB>;
758
790
 
759
791
  BSSL_NAMESPACE_END
760
792
 
@@ -15,7 +15,7 @@
15
15
  #ifndef OPENSSL_HEADER_CIPHER_H
16
16
  #define OPENSSL_HEADER_CIPHER_H
17
17
 
18
- #include <openssl/base.h> // IWYU pragma: export
18
+ #include <openssl/base.h> // IWYU pragma: export
19
19
 
20
20
  #if defined(__cplusplus)
21
21
  extern "C" {
@@ -48,6 +48,11 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_256_ecb(void);
48
48
  OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_256_cbc(void);
49
49
  OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_256_ctr(void);
50
50
  OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_256_ofb(void);
51
+
52
+ // EVP_aes_256_xts implements AES-256-XTS. Unlike other `EVP_CIPHER`s, this
53
+ // object is single-shot. It does not support splitting a single operation (one
54
+ // set of key, IV, and input) into multiple `EVP_EncryptUpdate_ex` or
55
+ // `EVP_DecryptUpdate_ex` calls.
51
56
  OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_256_xts(void);
52
57
 
53
58
  // EVP_enc_null returns a 'cipher' that passes plaintext through as
@@ -459,7 +464,7 @@ OPENSSL_EXPORT int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
459
464
 
460
465
  // EVP_CIPH_FLAG_NON_FIPS_ALLOW is meaningless. In OpenSSL it permits non-FIPS
461
466
  // algorithms in FIPS mode. But BoringSSL FIPS mode doesn't prohibit algorithms
462
- // (it's up the the caller to use the FIPS module in a fashion compliant with
467
+ // (it's up to the caller to use the FIPS module in a fashion compliant with
463
468
  // their needs). Thus this exists only to allow code to compile.
464
469
  #define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0
465
470
 
@@ -718,7 +723,7 @@ struct evp_cipher_ctx_st {
718
723
  const EVP_CIPHER *cipher;
719
724
 
720
725
  // app_data is a pointer to opaque, user data.
721
- void *app_data; // application stuff
726
+ void *app_data; // application stuff
722
727
 
723
728
  // cipher_data points to the `cipher` specific state.
724
729
  void *cipher_data;
@@ -755,9 +760,6 @@ struct evp_cipher_ctx_st {
755
760
  int final_used;
756
761
 
757
762
  uint8_t final[EVP_MAX_BLOCK_LENGTH]; // possible final block
758
-
759
- // Has this structure been rendered unusable by a failure.
760
- int poisoned;
761
763
  } /* EVP_CIPHER_CTX */;
762
764
 
763
765
  typedef struct evp_cipher_info_st {
@@ -776,9 +778,9 @@ BSSL_NAMESPACE_BEGIN
776
778
 
777
779
  BORINGSSL_MAKE_DELETER(EVP_CIPHER_CTX, EVP_CIPHER_CTX_free)
778
780
 
779
- using ScopedEVP_CIPHER_CTX =
780
- internal::StackAllocated<EVP_CIPHER_CTX, int, EVP_CIPHER_CTX_init,
781
- EVP_CIPHER_CTX_cleanup>;
781
+ BORINGSSL_MAKE_STACK_TRAITS(EVP_CIPHER_CTX, EVP_CIPHER_CTX_init,
782
+ EVP_CIPHER_CTX_cleanup)
783
+ using ScopedEVP_CIPHER_CTX = internal::StackAllocated<EVP_CIPHER_CTX>;
782
784
 
783
785
  BSSL_NAMESPACE_END
784
786
 
@@ -0,0 +1,18 @@
1
+ // Copyright 2026 The BoringSSL Authors
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // https://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ /* This header is provided in order to make compiling against code that expects
16
+ OpenSSL easier. */
17
+
18
+ #include "base.h"
@@ -91,6 +91,42 @@ OPENSSL_EXPORT int ED25519_verify(const uint8_t *message, size_t message_len,
91
91
  const uint8_t signature[64],
92
92
  const uint8_t public_key[32]);
93
93
 
94
+ // ED25519_sign_prehashed sets `out_sig` to be a signature of `sha512_digest`
95
+ // using `private_key` following the Ed25519ph algorithm. It returns one on
96
+ // success, or zero otherwise. `sha512_digest` must be the 64-byte result of
97
+ // hashing the input message with SHA-512. `context` allows for domain
98
+ // separation; see https://www.rfc-editor.org/info/rfc8032/#section-8.3.
99
+ //
100
+ // This function can return zero either on allocation failure, or if
101
+ // `context_len` is greater than 255.
102
+ //
103
+ // Note that Ed25519ph (pre-hashed) and "pure" Ed25519 are different algorithms,
104
+ // calling `ED25519_sign` with the digest of a message will *not* return the
105
+ // same output as `ED25519_sign_prehashed`.
106
+ OPENSSL_EXPORT int ED25519_sign_prehashed(uint8_t out_sig[64],
107
+ const uint8_t *context,
108
+ size_t context_len,
109
+ const uint8_t sha512_digest[64],
110
+ const uint8_t private_key[64]);
111
+
112
+ // ED25519_verify_prehashed returns one if `signature` is a valid signature, by
113
+ // `public_key`, of `sha512_digest` following the Ed25519ph algorithm. It
114
+ // returns zero otherwise. `sha512_digest` must be the 64-byte result of hashing
115
+ // the input message with SHA-512. `context` allows for domain separation; see
116
+ // https://www.rfc-editor.org/info/rfc8032/#section-8.3.
117
+ //
118
+ // This function can return zero either if the signature is invalid, or if
119
+ // `context_len` is greater than 255.
120
+ //
121
+ // Note that Ed25519ph (pre-hashed) and "pure" Ed25519 are different algorithms,
122
+ // calling `ED25519_verify` with the digest of a message will *not* return the
123
+ // same output as `ED25519_verify_prehashed`.
124
+ OPENSSL_EXPORT int ED25519_verify_prehashed(const uint8_t *context,
125
+ size_t context_len,
126
+ const uint8_t sha512_digest[64],
127
+ const uint8_t signature[64],
128
+ const uint8_t public_key[32]);
129
+
94
130
  // ED25519_keypair_from_seed calculates a public and private key from an
95
131
  // Ed25519 “seed”. Seed values are not exposed by this API (although they
96
132
  // happen to be the first 32 bytes of a private key) so this function is for
@@ -314,7 +314,7 @@ OPENSSL_EXPORT void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
314
314
 
315
315
  // EVP_MD_CTX_FLAG_NON_FIPS_ALLOW is meaningless. In OpenSSL it permits non-FIPS
316
316
  // algorithms in FIPS mode. But BoringSSL FIPS mode doesn't prohibit algorithms
317
- // (it's up the the caller to use the FIPS module in a fashion compliant with
317
+ // (it's up to the caller to use the FIPS module in a fashion compliant with
318
318
  // their needs). Thus this exists only to allow code to compile.
319
319
  #define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0
320
320
 
@@ -381,9 +381,9 @@ BSSL_NAMESPACE_BEGIN
381
381
 
382
382
  BORINGSSL_MAKE_DELETER(EVP_MD_CTX, EVP_MD_CTX_free)
383
383
 
384
- using ScopedEVP_MD_CTX =
385
- internal::StackAllocatedMovable<EVP_MD_CTX, int, EVP_MD_CTX_init,
386
- EVP_MD_CTX_cleanup, EVP_MD_CTX_move>;
384
+ BORINGSSL_MAKE_STACK_TRAITS_MOVABLE(EVP_MD_CTX, EVP_MD_CTX_init,
385
+ EVP_MD_CTX_cleanup, EVP_MD_CTX_move)
386
+ using ScopedEVP_MD_CTX = internal::StackAllocatedMovable<EVP_MD_CTX>;
387
387
 
388
388
  BSSL_NAMESPACE_END
389
389
 
@@ -27,7 +27,7 @@ extern "C" {
27
27
 
28
28
 
29
29
  // point_conversion_form_t enumerates forms, as defined in X9.62 (ECDSA), for
30
- // the encoding of a elliptic curve point (x,y)
30
+ // the encoding of an elliptic curve point (x,y)
31
31
  typedef enum {
32
32
  // POINT_CONVERSION_COMPRESSED indicates that the point is encoded as z||x,
33
33
  // where the octet z specifies which solution of the quadratic equation y
@@ -336,6 +336,40 @@ OPENSSL_EXPORT int EC_encode_to_curve_p384_xmd_sha384_sswu(
336
336
  const EC_GROUP *group, EC_POINT *out, const uint8_t *dst, size_t dst_len,
337
337
  const uint8_t *msg, size_t msg_len);
338
338
 
339
+ // EC_wpa3_sae_hash_to_curve_p256 hashes `salt` and `ikm` to a point on `group`
340
+ // and writes the result to `out`, implementing the WPA3 SAE hash-to-curve
341
+ // variant for P-256 defined in IEEE Std 802.11-2020, Section 12.4.4.2.3. It
342
+ // returns one on success and zero on error. `salt` is the HKDF-Extract salt,
343
+ // which is the SSID. `ikm` is the HKDF-Extract input, or password and
344
+ // identifier concatenation.
345
+ //
346
+ // This generates the PT value. The PWE value still requires multiplication by
347
+ // the hashed MAC addresses.
348
+ OPENSSL_EXPORT int EC_wpa3_sae_hash_to_curve_p256(
349
+ const EC_GROUP *group, EC_POINT *out, const uint8_t *salt, size_t salt_len,
350
+ const uint8_t *ikm, size_t ikm_len);
351
+
352
+ // EC_wpa3_sae_hunt_and_peck_p256 hashes `salt` and `password` to a point on
353
+ // `group` and writes the result to `out`, using the WPA3 "hunt and peck"
354
+ // algorithm defined in IEEE Std 802.11-2020, Section 12.4.4.2.2. It returns one
355
+ // on success and zero on error. `group` must be P-256. `salt` is the
356
+ // HKDF-Extract salt, which is the MAC concatenation. `password` is the
357
+ // password, used to compute the HKDF-Extract input.
358
+ //
359
+ // Unlike a proper hash-to-curve construction, this algorithm is based on
360
+ // rejection sampling and cannot run in time independent of `in`. To reduce
361
+ // information leakage, the number of iterations is blinded up to
362
+ // `min_iterations`. If at most `min_iterations` are needed to find a point,
363
+ // only this fact is leaked. However, past `min_iterations`, the number of
364
+ // iterations used may be leaked as a side channel.
365
+ //
366
+ // Each iteration has a roughly 50% probability of finding an output. For
367
+ // example, a 64 iteration minimum reduces the chance of leak to 2^-64. However,
368
+ // running time scales linearly with `min_iterations`.
369
+ OPENSSL_EXPORT int EC_wpa3_sae_hunt_and_peck_p256(
370
+ const EC_GROUP *group, EC_POINT *out, const uint8_t *salt, size_t salt_len,
371
+ const uint8_t *password, size_t password_len, uint8_t min_iterations);
372
+
339
373
 
340
374
  // Deprecated functions.
341
375
 
@@ -16,7 +16,7 @@
16
16
  #ifndef OPENSSL_HEADER_EC_KEY_H
17
17
  #define OPENSSL_HEADER_EC_KEY_H
18
18
 
19
- #include <openssl/base.h> // IWYU pragma: export
19
+ #include <openssl/base.h> // IWYU pragma: export
20
20
 
21
21
  #include <openssl/ec.h>
22
22
  #include <openssl/engine.h>
@@ -101,7 +101,7 @@ OPENSSL_EXPORT unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
101
101
  // bitwise-OR of `EC_PKEY_*` values.
102
102
  OPENSSL_EXPORT void EC_KEY_set_enc_flags(EC_KEY *key, unsigned flags);
103
103
 
104
- // EC_KEY_get_conv_form returns the conversation form that will be used by
104
+ // EC_KEY_get_conv_form returns the conversion form that will be used by
105
105
  // `key`.
106
106
  OPENSSL_EXPORT point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
107
107