grpc 1.69.0 → 1.71.0
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.
- checksums.yaml +4 -4
- data/Makefile +249 -283
- data/include/grpc/event_engine/endpoint_config.h +5 -5
- data/include/grpc/event_engine/event_engine.h +44 -5
- data/include/grpc/status.h +1 -1
- data/include/grpc/support/atm.h +0 -13
- data/include/grpc/support/json.h +16 -16
- data/src/core/call/request_buffer.cc +224 -0
- data/src/core/call/request_buffer.h +192 -0
- data/src/core/channelz/channelz.cc +2 -2
- data/src/core/channelz/channelz.h +3 -22
- data/src/core/channelz/channelz_registry.cc +0 -7
- data/src/core/client_channel/client_channel.cc +18 -29
- data/src/core/client_channel/client_channel.h +2 -2
- data/src/core/client_channel/client_channel_args.h +21 -0
- data/src/core/client_channel/client_channel_filter.cc +54 -131
- data/src/core/client_channel/client_channel_filter.h +11 -9
- data/src/core/client_channel/client_channel_plugin.cc +2 -1
- data/src/core/client_channel/client_channel_service_config.cc +1 -1
- data/src/core/client_channel/client_channel_service_config.h +5 -5
- data/src/core/client_channel/direct_channel.cc +1 -1
- data/src/core/client_channel/direct_channel.h +1 -1
- data/src/core/client_channel/lb_metadata.cc +7 -8
- data/src/core/client_channel/lb_metadata.h +3 -3
- data/src/core/client_channel/load_balanced_call_destination.cc +4 -4
- data/src/core/client_channel/retry_filter.cc +1 -1
- data/src/core/client_channel/retry_filter.h +1 -1
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +10 -12
- data/src/core/client_channel/retry_filter_legacy_call_data.h +7 -7
- data/src/core/client_channel/retry_interceptor.cc +408 -0
- data/src/core/client_channel/retry_interceptor.h +157 -0
- data/src/core/client_channel/retry_service_config.cc +1 -1
- data/src/core/client_channel/retry_service_config.h +16 -3
- data/src/core/client_channel/retry_throttle.cc +33 -18
- data/src/core/client_channel/retry_throttle.h +3 -3
- data/src/core/client_channel/subchannel.cc +43 -76
- data/src/core/client_channel/subchannel.h +4 -4
- data/src/core/client_channel/subchannel_stream_client.cc +0 -1
- data/src/core/client_channel/subchannel_stream_client.h +3 -3
- data/src/core/config/config_vars.cc +1 -0
- data/src/core/config/config_vars.h +1 -0
- data/src/core/config/load_config.cc +3 -2
- data/src/core/config/load_config.h +1 -1
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +4 -11
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.h +7 -7
- data/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +1 -1
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +8 -15
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +6 -6
- data/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc +1 -1
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +0 -7
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +6 -6
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.cc +1 -1
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h +1 -1
- data/src/core/ext/filters/http/client/http_client_filter.cc +1 -6
- data/src/core/ext/filters/http/client/http_client_filter.h +4 -4
- data/src/core/ext/filters/http/client_authority_filter.cc +6 -11
- data/src/core/ext/filters/http/client_authority_filter.h +6 -6
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +18 -22
- data/src/core/ext/filters/http/message_compress/compression_filter.h +18 -13
- data/src/core/ext/filters/http/server/http_server_filter.cc +3 -8
- data/src/core/ext/filters/http/server/http_server_filter.h +4 -4
- data/src/core/ext/filters/message_size/message_size_filter.cc +13 -25
- data/src/core/ext/filters/message_size/message_size_filter.h +20 -21
- data/src/core/ext/filters/rbac/rbac_filter.cc +0 -7
- data/src/core/ext/filters/rbac/rbac_filter.h +6 -6
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +3 -3
- data/src/core/ext/filters/stateful_session/stateful_session_filter.cc +1 -6
- data/src/core/ext/filters/stateful_session/stateful_session_filter.h +4 -4
- data/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc +1 -1
- data/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h +2 -2
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +1 -2
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +4 -3
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +612 -100
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +189 -13
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h +4 -4
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +85 -59
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +7 -7
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/flow_control.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/frame.h +5 -5
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +8 -8
- data/src/core/ext/transport/chttp2/transport/frame_security.cc +1 -3
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +5 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +32 -31
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +6 -7
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +3 -3
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +2 -2
- data/src/core/ext/transport/chttp2/transport/internal.h +19 -8
- data/src/core/ext/transport/chttp2/transport/parsing.cc +14 -14
- data/src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/ping_callbacks.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/ping_callbacks.h +2 -2
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.h +2 -2
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/varint.cc +4 -4
- data/src/core/ext/transport/chttp2/transport/writing.cc +16 -22
- data/src/core/ext/transport/inproc/inproc_transport.cc +1 -3
- data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +15 -10
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb.h +3 -1
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb.h +16 -0
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.c +3 -2
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb.h +66 -36
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c +19 -17
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb.h +116 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.c +31 -5
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.h +2 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb.h +97 -6
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +17 -11
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_cmsg_headers.upb.h +151 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_cmsg_headers.upb_minitable.c +60 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_cmsg_headers.upb_minitable.h +32 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb.h +228 -21
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.c +65 -17
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.h +6 -0
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb.h +7 -106
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb_minitable.c +7 -28
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb.h +85 -0
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb_minitable.c +25 -3
- data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb.h +2 -1
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb.h +152 -0
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.c +40 -10
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.h +2 -0
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb.h +253 -4
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +70 -13
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.h +4 -0
- data/src/core/ext/upb-gen/envoy/config/trace/v3/trace.upb.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/trace/v3/trace.upb_minitable.c +0 -1
- data/src/core/ext/upb-gen/envoy/config/trace/v3/trace.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +16 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c +3 -2
- 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 -0
- 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 +13 -2
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb_minitable.c +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +102 -24
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb_minitable.c +28 -19
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +37 -7
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb_minitable.c +7 -5
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb.h +251 -18
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb_minitable.c +41 -16
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb_minitable.h +2 -0
- data/src/core/ext/upb-gen/envoy/service/status/v3/csds.upb.h +2 -1
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb.h +142 -0
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.c +55 -0
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.h +32 -0
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb.h +33 -0
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.c +7 -4
- data/src/core/ext/upbdefs-gen/envoy/admin/v3/config_dump_shared.upbdefs.c +11 -10
- data/src/core/ext/upbdefs-gen/envoy/admin/v3/server_info.upbdefs.c +6 -4
- data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/cluster.upbdefs.c +418 -413
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.c +161 -153
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.c +270 -261
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_cmsg_headers.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_cmsg_headers.upbdefs.h +33 -0
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_option.upbdefs.c +29 -19
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_option.upbdefs.h +15 -0
- data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener_components.upbdefs.c +58 -65
- data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener_components.upbdefs.h +0 -5
- data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/quic_config.upbdefs.c +73 -63
- data/src/core/ext/upbdefs-gen/envoy/config/overload/v3/overload.upbdefs.c +49 -48
- data/src/core/ext/upbdefs-gen/envoy/config/rbac/v3/rbac.upbdefs.c +117 -100
- data/src/core/ext/upbdefs-gen/envoy/config/rbac/v3/rbac.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.c +917 -898
- data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/trace.upbdefs.c +15 -18
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.c +33 -33
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +460 -457
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upbdefs.c +16 -19
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +95 -95
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +202 -191
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.c +19 -17
- data/src/core/ext/upbdefs-gen/envoy/service/discovery/v3/discovery.upbdefs.c +148 -135
- data/src/core/ext/upbdefs-gen/envoy/service/discovery/v3/discovery.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/service/status/v3/csds.upbdefs.c +23 -22
- data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.c +41 -0
- data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.h +33 -0
- data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/filter_state.upbdefs.c +26 -19
- data/src/core/filter/blackboard.cc +2 -2
- data/src/core/filter/filter_args.h +112 -0
- data/src/core/handshaker/handshaker.cc +0 -3
- data/src/core/handshaker/http_connect/http_connect_handshaker.cc +4 -6
- data/src/core/handshaker/http_connect/http_proxy_mapper.cc +31 -32
- data/src/core/handshaker/http_connect/http_proxy_mapper.h +4 -4
- data/src/core/handshaker/http_connect/xds_http_proxy_mapper.cc +5 -5
- data/src/core/handshaker/http_connect/xds_http_proxy_mapper.h +5 -5
- data/src/core/handshaker/proxy_mapper.h +4 -4
- data/src/core/handshaker/proxy_mapper_registry.cc +5 -6
- data/src/core/handshaker/proxy_mapper_registry.h +4 -4
- data/src/core/handshaker/security/secure_endpoint.cc +2 -2
- data/src/core/handshaker/security/security_handshaker.cc +3 -5
- data/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc +6 -4
- data/src/core/lib/channel/channel_args.cc +13 -13
- data/src/core/lib/channel/channel_args.h +8 -8
- data/src/core/lib/channel/connected_channel.cc +1 -1
- data/src/core/lib/channel/promise_based_filter.cc +9 -9
- data/src/core/lib/channel/promise_based_filter.h +84 -159
- data/src/core/lib/compression/compression.cc +3 -2
- data/src/core/lib/compression/compression_internal.cc +9 -9
- data/src/core/lib/compression/compression_internal.h +3 -3
- data/src/core/lib/debug/trace_flags.cc +5 -2
- data/src/core/lib/debug/trace_flags.h +2 -1
- data/src/core/lib/event_engine/ares_resolver.cc +9 -11
- data/src/core/lib/event_engine/ares_resolver.h +6 -10
- data/src/core/lib/event_engine/cf_engine/cf_engine.cc +2 -4
- data/src/core/lib/event_engine/cf_engine/cf_engine.h +2 -4
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +6 -7
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h +2 -4
- data/src/core/lib/event_engine/cf_engine/cftype_unique_ref.h +2 -4
- data/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc +3 -7
- data/src/core/lib/event_engine/cf_engine/dns_service_resolver.h +2 -4
- data/src/core/lib/event_engine/channel_args_endpoint_config.cc +5 -7
- data/src/core/lib/event_engine/channel_args_endpoint_config.h +6 -7
- data/src/core/lib/event_engine/common_closures.h +2 -4
- data/src/core/lib/event_engine/default_event_engine.cc +62 -33
- data/src/core/lib/event_engine/default_event_engine.h +24 -33
- data/src/core/lib/event_engine/default_event_engine_factory.cc +6 -12
- data/src/core/lib/event_engine/default_event_engine_factory.h +2 -4
- data/src/core/lib/event_engine/event_engine.cc +2 -4
- data/src/core/lib/event_engine/extensions/can_track_errors.h +2 -4
- data/src/core/lib/event_engine/extensions/chaotic_good_extension.h +2 -4
- data/src/core/lib/event_engine/extensions/supports_fd.h +2 -4
- data/src/core/lib/event_engine/extensions/tcp_trace.h +2 -4
- data/src/core/lib/event_engine/forkable.cc +2 -4
- data/src/core/lib/event_engine/forkable.h +2 -4
- data/src/core/lib/event_engine/grpc_polled_fd.h +2 -4
- data/src/core/lib/event_engine/handle_containers.h +2 -4
- data/src/core/lib/event_engine/memory_allocator_factory.h +2 -4
- data/src/core/lib/event_engine/poller.h +2 -4
- data/src/core/lib/event_engine/posix.h +2 -4
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +4 -50
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h +2 -4
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +4 -51
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.h +2 -4
- data/src/core/lib/event_engine/posix_engine/event_poller.h +2 -4
- data/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/event_poller_posix_default.h +2 -4
- data/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +2 -4
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.h +2 -4
- data/src/core/lib/event_engine/posix_engine/lockfree_event.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/lockfree_event.h +2 -4
- data/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.h +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +20 -10
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +9 -6
- data/src/core/lib/event_engine/posix_engine/posix_engine.h +2 -6
- data/src/core/lib/event_engine/posix_engine/posix_engine_closure.h +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +3 -5
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +2 -4
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +5 -6
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +2 -4
- data/src/core/lib/event_engine/posix_engine/timer.cc +4 -6
- data/src/core/lib/event_engine/posix_engine/timer.h +4 -6
- data/src/core/lib/event_engine/posix_engine/timer_heap.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/timer_heap.h +2 -4
- data/src/core/lib/event_engine/posix_engine/timer_manager.cc +5 -7
- data/src/core/lib/event_engine/posix_engine/timer_manager.h +4 -6
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc +4 -8
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +24 -25
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc +2 -4
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h +2 -4
- data/src/core/lib/event_engine/query_extensions.h +2 -4
- data/src/core/lib/event_engine/ref_counted_dns_resolver_interface.h +2 -4
- data/src/core/lib/event_engine/resolved_address.cc +2 -4
- data/src/core/lib/event_engine/resolved_address_internal.h +2 -4
- data/src/core/lib/event_engine/shim.cc +2 -4
- data/src/core/lib/event_engine/shim.h +2 -4
- data/src/core/lib/event_engine/slice.cc +2 -4
- data/src/core/lib/event_engine/slice_buffer.cc +2 -4
- data/src/core/lib/event_engine/tcp_socket_utils.cc +6 -8
- data/src/core/lib/event_engine/tcp_socket_utils.h +5 -7
- data/src/core/lib/event_engine/thread_local.cc +2 -4
- data/src/core/lib/event_engine/thread_local.h +2 -4
- data/src/core/lib/event_engine/thread_pool/thread_count.cc +2 -4
- data/src/core/lib/event_engine/thread_pool/thread_count.h +4 -18
- data/src/core/lib/event_engine/thread_pool/thread_pool.h +2 -4
- data/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +2 -4
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +3 -5
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +2 -4
- data/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc +2 -4
- data/src/core/lib/event_engine/thready_event_engine/thready_event_engine.h +2 -4
- data/src/core/lib/event_engine/time_util.cc +2 -4
- data/src/core/lib/event_engine/time_util.h +2 -4
- data/src/core/lib/event_engine/utils.cc +2 -4
- data/src/core/lib/event_engine/utils.h +2 -4
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +2 -4
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h +2 -4
- data/src/core/lib/event_engine/windows/iocp.cc +2 -4
- data/src/core/lib/event_engine/windows/iocp.h +2 -4
- data/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc +2 -4
- data/src/core/lib/event_engine/windows/native_windows_dns_resolver.h +2 -4
- data/src/core/lib/event_engine/windows/win_socket.cc +2 -4
- data/src/core/lib/event_engine/windows/win_socket.h +2 -4
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +2 -4
- data/src/core/lib/event_engine/windows/windows_endpoint.h +4 -6
- data/src/core/lib/event_engine/windows/windows_engine.cc +3 -4
- data/src/core/lib/event_engine/windows/windows_engine.h +2 -4
- data/src/core/lib/event_engine/windows/windows_listener.cc +2 -4
- data/src/core/lib/event_engine/windows/windows_listener.h +2 -4
- data/src/core/lib/event_engine/work_queue/basic_work_queue.cc +2 -4
- data/src/core/lib/event_engine/work_queue/basic_work_queue.h +2 -4
- data/src/core/lib/event_engine/work_queue/work_queue.h +2 -4
- data/src/core/lib/experiments/experiments.cc +147 -207
- data/src/core/lib/experiments/experiments.h +79 -96
- data/src/core/lib/iomgr/buffer_list.h +22 -21
- data/src/core/lib/iomgr/cfstream_handle.cc +0 -2
- data/src/core/lib/iomgr/closure.h +1 -4
- data/src/core/lib/iomgr/combiner.cc +0 -1
- data/src/core/lib/iomgr/error.cc +2 -2
- data/src/core/lib/iomgr/event_engine_shims/closure.cc +0 -1
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +1 -3
- data/src/core/lib/iomgr/event_engine_shims/tcp_client.cc +0 -1
- data/src/core/lib/iomgr/exec_ctx.cc +1 -7
- data/src/core/lib/iomgr/exec_ctx.h +1 -132
- data/src/core/lib/iomgr/executor.cc +0 -11
- data/src/core/lib/iomgr/resolve_address_posix.cc +0 -2
- data/src/core/lib/iomgr/resolve_address_windows.cc +0 -2
- data/src/core/lib/iomgr/socket_utils_posix.cc +3 -2
- data/src/core/lib/iomgr/tcp_posix.cc +3 -2
- data/src/core/lib/iomgr/tcp_server_posix.cc +1 -3
- data/src/core/lib/iomgr/tcp_server_windows.cc +0 -1
- data/src/core/lib/iomgr/timer_manager.cc +1 -9
- data/src/core/lib/promise/activity.cc +2 -0
- data/src/core/lib/promise/activity.h +33 -12
- data/src/core/lib/promise/detail/join_state.h +16 -68
- data/src/core/lib/promise/detail/promise_factory.h +85 -25
- data/src/core/lib/promise/detail/promise_like.h +16 -19
- data/src/core/lib/promise/detail/seq_state.h +102 -315
- data/src/core/lib/promise/for_each.h +14 -5
- data/src/core/lib/promise/if.h +48 -20
- data/src/core/lib/promise/interceptor_list.h +9 -9
- data/src/core/lib/promise/latch.h +14 -6
- data/src/core/lib/promise/loop.h +58 -18
- data/src/core/lib/promise/map.h +145 -49
- data/src/core/lib/promise/party.cc +84 -15
- data/src/core/lib/promise/party.h +229 -32
- data/src/core/lib/promise/pipe.h +12 -12
- data/src/core/lib/promise/poll.h +8 -5
- data/src/core/lib/promise/prioritized_race.h +16 -22
- data/src/core/lib/promise/promise.h +2 -3
- data/src/core/lib/promise/race.h +4 -12
- data/src/core/lib/promise/seq.h +41 -6
- data/src/core/lib/promise/sleep.cc +3 -3
- data/src/core/lib/promise/sleep.h +15 -1
- data/src/core/lib/promise/status_flag.h +19 -3
- data/src/core/lib/promise/try_join.h +119 -5
- data/src/core/lib/promise/try_seq.h +39 -12
- data/src/core/lib/resource_quota/arena.h +87 -0
- data/src/core/lib/resource_quota/connection_quota.h +4 -0
- data/src/core/lib/resource_quota/memory_quota.cc +53 -49
- data/src/core/lib/resource_quota/memory_quota.h +4 -4
- data/src/core/lib/security/authorization/evaluate_args.cc +3 -3
- data/src/core/lib/security/authorization/evaluate_args.h +3 -3
- data/src/core/lib/security/authorization/grpc_server_authz_filter.cc +0 -7
- data/src/core/lib/security/authorization/grpc_server_authz_filter.h +6 -6
- data/src/core/lib/security/authorization/matchers.h +3 -3
- data/src/core/lib/security/authorization/rbac_policy.cc +1 -1
- data/src/core/lib/security/authorization/rbac_policy.h +3 -3
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +1 -2
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +1 -3
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +0 -1
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +1 -1
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +2 -2
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +1 -1
- data/src/core/lib/security/credentials/iam/iam_credentials.h +2 -2
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +1 -2
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +2 -2
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +0 -1
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +4 -4
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +3 -3
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +0 -1
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +2 -2
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +12 -13
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +14 -14
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +23 -15
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +3 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc +0 -1
- data/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h +1 -2
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +2 -2
- data/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.cc +4 -5
- data/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h +4 -4
- data/src/core/lib/security/credentials/xds/xds_credentials.cc +2 -1
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +1 -1
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +3 -3
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +1 -1
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +9 -9
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +13 -13
- data/src/core/lib/security/transport/auth_filters.h +95 -7
- data/src/core/lib/security/transport/client_auth_filter.cc +96 -6
- data/src/core/lib/security/transport/server_auth_filter.cc +0 -8
- data/src/core/lib/slice/slice_buffer.cc +2 -2
- data/src/core/lib/slice/slice_buffer.h +2 -2
- data/src/core/lib/surface/call.cc +0 -4
- data/src/core/lib/surface/call.h +4 -3
- data/src/core/lib/surface/call_utils.cc +2 -2
- data/src/core/lib/surface/call_utils.h +10 -4
- data/src/core/lib/surface/channel.cc +6 -14
- data/src/core/lib/surface/channel.h +3 -3
- data/src/core/lib/surface/channel_init.cc +1 -1
- data/src/core/lib/surface/client_call.cc +56 -41
- data/src/core/lib/surface/client_call.h +7 -2
- data/src/core/lib/surface/completion_queue.cc +10 -49
- data/src/core/lib/surface/event_string.cc +7 -1
- data/src/core/lib/surface/filter_stack_call.cc +2 -4
- data/src/core/lib/surface/filter_stack_call.h +1 -1
- data/src/core/lib/surface/init.cc +17 -12
- data/src/core/lib/surface/init_internally.h +13 -2
- data/src/core/lib/surface/legacy_channel.cc +10 -8
- data/src/core/lib/surface/legacy_channel.h +2 -2
- data/src/core/lib/surface/server_call.cc +116 -84
- data/src/core/lib/surface/server_call.h +2 -0
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/call_filters.cc +10 -4
- data/src/core/lib/transport/call_filters.h +108 -59
- data/src/core/lib/transport/call_spine.cc +12 -49
- data/src/core/lib/transport/call_spine.h +174 -7
- data/src/core/lib/transport/call_state.h +140 -47
- data/src/core/lib/transport/connectivity_state.cc +8 -9
- data/src/core/lib/transport/connectivity_state.h +2 -4
- data/src/core/lib/transport/http2_errors.h +5 -3
- data/src/core/lib/transport/interception_chain.cc +8 -0
- data/src/core/lib/transport/interception_chain.h +36 -7
- data/src/core/lib/transport/metadata.h +88 -0
- data/src/core/lib/transport/metadata_batch.cc +2 -2
- data/src/core/lib/transport/metadata_batch.h +79 -18
- data/src/core/lib/transport/timeout_encoding.cc +15 -15
- data/src/core/lib/transport/timeout_encoding.h +3 -2
- data/src/core/lib/transport/transport.cc +0 -1
- data/src/core/lib/transport/transport.h +12 -7
- data/src/core/load_balancing/backend_metric_parser.cc +21 -28
- data/src/core/load_balancing/endpoint_list.cc +11 -1
- data/src/core/load_balancing/endpoint_list.h +20 -13
- data/src/core/load_balancing/grpclb/client_load_reporting_filter.cc +1 -6
- data/src/core/load_balancing/grpclb/client_load_reporting_filter.h +4 -4
- data/src/core/load_balancing/grpclb/grpclb.cc +21 -38
- data/src/core/load_balancing/health_check_client.cc +16 -48
- data/src/core/load_balancing/health_check_client_internal.h +7 -7
- data/src/core/load_balancing/lb_policy.cc +4 -6
- data/src/core/load_balancing/lb_policy.h +4 -12
- data/src/core/load_balancing/lb_policy_registry.cc +10 -8
- data/src/core/load_balancing/outlier_detection/outlier_detection.cc +57 -68
- data/src/core/load_balancing/outlier_detection/outlier_detection.h +4 -3
- data/src/core/load_balancing/pick_first/pick_first.cc +110 -77
- data/src/core/load_balancing/priority/priority.cc +8 -13
- data/src/core/load_balancing/ring_hash/ring_hash.cc +210 -158
- data/src/core/load_balancing/ring_hash/ring_hash.h +4 -11
- data/src/core/load_balancing/rls/rls.cc +105 -194
- data/src/core/load_balancing/rls/rls.h +97 -1
- data/src/core/load_balancing/round_robin/round_robin.cc +14 -19
- data/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc +4 -4
- data/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h +2 -2
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +20 -29
- data/src/core/load_balancing/weighted_target/weighted_target.cc +7 -15
- data/src/core/load_balancing/xds/cds.cc +11 -15
- data/src/core/load_balancing/xds/xds_cluster_impl.cc +15 -18
- data/src/core/load_balancing/xds/xds_cluster_manager.cc +10 -18
- data/src/core/load_balancing/xds/xds_override_host.cc +45 -92
- data/src/core/load_balancing/xds/xds_wrr_locality.cc +10 -12
- data/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +11 -11
- data/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc +10 -15
- data/src/core/resolver/dns/native/dns_resolver.cc +1 -1
- data/src/core/resolver/fake/fake_resolver.cc +10 -11
- data/src/core/resolver/fake/fake_resolver.h +2 -2
- data/src/core/resolver/google_c2p/google_c2p_resolver.cc +9 -12
- data/src/core/resolver/polling_resolver.cc +2 -5
- data/src/core/resolver/polling_resolver.h +3 -3
- data/src/core/resolver/resolver_registry.cc +4 -3
- data/src/core/resolver/xds/xds_config.cc +6 -6
- data/src/core/resolver/xds/xds_config.h +2 -2
- data/src/core/resolver/xds/xds_dependency_manager.cc +190 -183
- data/src/core/resolver/xds/xds_dependency_manager.h +28 -18
- data/src/core/resolver/xds/xds_resolver.cc +81 -122
- data/src/core/server/server.cc +353 -95
- data/src/core/server/server.h +214 -65
- data/src/core/server/server_call_tracer_filter.cc +3 -7
- data/src/core/server/server_config_selector_filter.cc +8 -15
- data/src/core/server/xds_server_config_fetcher.cc +93 -159
- data/src/core/service_config/service_config_channel_arg_filter.cc +7 -19
- data/src/core/service_config/service_config_impl.cc +3 -3
- data/src/core/telemetry/call_tracer.cc +8 -8
- data/src/core/telemetry/call_tracer.h +6 -5
- data/src/core/telemetry/metrics.cc +3 -3
- data/src/core/telemetry/metrics.h +2 -8
- data/src/core/telemetry/tcp_tracer.h +32 -32
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +3 -3
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +14 -14
- data/src/core/tsi/fake_transport_security.cc +5 -0
- data/src/core/util/backoff.cc +15 -4
- data/src/core/util/dump_args.h +1 -9
- data/src/core/util/env.h +3 -4
- data/src/core/util/examine_stack.cc +2 -2
- data/src/core/util/examine_stack.h +3 -4
- data/src/core/util/gpr_time.cc +0 -2
- data/src/core/util/http_client/httpcli.cc +69 -22
- data/src/core/util/http_client/httpcli.h +18 -8
- data/src/core/util/http_client/httpcli_security_connector.cc +2 -2
- data/src/core/util/json/json_channel_args.h +2 -1
- data/src/core/util/json/json_object_loader.cc +4 -4
- data/src/core/util/json/json_object_loader.h +12 -12
- data/src/core/util/json/json_reader.cc +4 -4
- data/src/core/util/json/json_writer.cc +3 -3
- data/src/core/util/latent_see.cc +3 -3
- data/src/core/util/latent_see.h +2 -2
- data/src/core/util/linux/env.cc +3 -4
- data/src/core/util/lru_cache.h +4 -4
- data/src/core/util/match.h +7 -7
- data/src/core/util/matchers.cc +1 -2
- data/src/core/util/matchers.h +7 -12
- data/src/core/util/posix/env.cc +2 -2
- data/src/core/util/posix/sync.cc +0 -1
- data/src/core/util/posix/time.cc +0 -1
- data/src/core/util/ref_counted.h +1 -0
- data/src/core/util/ref_counted_ptr.h +1 -1
- data/src/core/util/ring_buffer.h +4 -5
- data/src/core/util/status_helper.cc +16 -20
- data/src/core/util/status_helper.h +5 -5
- data/src/core/util/sync_abseil.cc +0 -1
- data/src/core/util/table.h +6 -21
- data/src/core/util/time.cc +1 -1
- data/src/core/util/time.h +3 -3
- data/src/core/util/time_precise.cc +0 -1
- data/src/core/util/type_list.h +56 -0
- data/src/core/util/uri.cc +6 -4
- data/src/core/util/uri.h +7 -0
- data/src/core/util/useful.h +13 -15
- data/src/core/util/validation_errors.cc +5 -5
- data/src/core/util/wait_for_single_owner.h +62 -0
- data/src/core/util/windows/env.cc +3 -3
- data/src/core/util/windows/sync.cc +0 -1
- data/src/core/util/windows/time.cc +0 -1
- data/src/core/util/work_serializer.cc +27 -267
- data/src/core/util/work_serializer.h +3 -27
- data/src/core/xds/grpc/certificate_provider_store.cc +12 -17
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +2 -2
- data/src/core/xds/grpc/xds_audit_logger_registry.cc +1 -1
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +11 -14
- data/src/core/xds/grpc/xds_bootstrap_grpc.h +2 -2
- data/src/core/xds/grpc/xds_certificate_provider.cc +15 -15
- data/src/core/xds/grpc/xds_client_grpc.cc +7 -8
- data/src/core/xds/grpc/xds_cluster.h +4 -4
- data/src/core/xds/grpc/xds_cluster_parser.cc +26 -26
- data/src/core/xds/grpc/xds_cluster_specifier_plugin.cc +4 -4
- data/src/core/xds/grpc/xds_common_types.cc +2 -2
- data/src/core/xds/grpc/xds_common_types.h +4 -4
- data/src/core/xds/grpc/xds_common_types_parser.cc +29 -31
- data/src/core/xds/grpc/xds_common_types_parser.h +8 -7
- data/src/core/xds/grpc/xds_endpoint.cc +3 -4
- data/src/core/xds/grpc/xds_endpoint_parser.cc +68 -37
- data/src/core/xds/grpc/xds_health_status.cc +4 -4
- data/src/core/xds/grpc/xds_health_status.h +4 -3
- data/src/core/xds/grpc/xds_http_fault_filter.cc +18 -20
- data/src/core/xds/grpc/xds_http_fault_filter.h +4 -3
- data/src/core/xds/grpc/xds_http_filter.h +3 -3
- data/src/core/xds/grpc/xds_http_filter_registry.cc +7 -7
- data/src/core/xds/grpc/xds_http_filter_registry.h +3 -3
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +7 -7
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +4 -3
- data/src/core/xds/grpc/xds_http_rbac_filter.cc +30 -23
- data/src/core/xds/grpc/xds_http_rbac_filter.h +4 -3
- data/src/core/xds/grpc/xds_http_stateful_session_filter.cc +10 -10
- data/src/core/xds/grpc/xds_http_stateful_session_filter.h +4 -3
- data/src/core/xds/grpc/xds_lb_policy_registry.cc +4 -4
- data/src/core/xds/grpc/xds_listener.cc +4 -6
- data/src/core/xds/grpc/xds_listener.h +10 -10
- data/src/core/xds/grpc/xds_listener_parser.cc +58 -51
- data/src/core/xds/grpc/xds_listener_parser.h +2 -1
- data/src/core/xds/grpc/xds_metadata.cc +5 -5
- data/src/core/xds/grpc/xds_metadata.h +8 -0
- data/src/core/xds/grpc/xds_metadata_parser.cc +65 -52
- data/src/core/xds/grpc/xds_route_config.cc +9 -15
- data/src/core/xds/grpc/xds_route_config.h +9 -9
- data/src/core/xds/grpc/xds_route_config_parser.cc +114 -116
- data/src/core/xds/grpc/xds_route_config_parser.h +4 -4
- data/src/core/xds/grpc/xds_routing.cc +6 -6
- data/src/core/xds/grpc/xds_routing.h +5 -5
- data/src/core/xds/grpc/xds_server_grpc.cc +22 -1
- data/src/core/xds/grpc/xds_server_grpc.h +5 -2
- data/src/core/xds/grpc/xds_server_grpc_interface.h +33 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +5 -6
- data/src/core/xds/xds_client/lrs_client.cc +71 -83
- data/src/core/xds/xds_client/lrs_client.h +8 -8
- data/src/core/xds/xds_client/xds_api.cc +5 -228
- data/src/core/xds/xds_client/xds_api.h +1 -133
- data/src/core/xds/xds_client/xds_bootstrap.cc +11 -1
- data/src/core/xds/xds_client/xds_bootstrap.h +7 -0
- data/src/core/xds/xds_client/xds_client.cc +1030 -704
- data/src/core/xds/xds_client/xds_client.h +135 -29
- data/src/core/xds/xds_client/xds_resource_type.h +2 -3
- data/src/core/xds/xds_client/xds_resource_type_impl.h +13 -8
- data/src/ruby/ext/grpc/extconf.rb +1 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_bitstr.c → a_bitstr.cc} +16 -57
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.cc +53 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.cc +47 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_dup.cc +42 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.cc +109 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_i2d_fp.cc +43 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_int.c → a_int.cc} +15 -56
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_mbstr.c → a_mbstr.cc} +22 -62
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_object.c → a_object.cc} +14 -56
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.cc +32 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_strex.c → a_strex.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_strnid.c → a_strnid.cc} +20 -59
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_time.c → a_time.cc} +41 -76
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_type.c → a_type.cc} +17 -59
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.cc +109 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{asn1_lib.c → asn1_lib.cc} +17 -59
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.cc +61 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.cc +56 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.cc +63 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_string.cc +52 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/internal.h +13 -57
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{posix_time.c → posix_time.cc} +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{tasn_dec.c → tasn_dec.cc} +17 -58
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{tasn_enc.c → tasn_enc.cc} +22 -61
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.cc +164 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{tasn_new.c → tasn_new.cc} +20 -61
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.cc +84 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{tasn_utl.c → tasn_utl.cc} +26 -65
- data/third_party/boringssl-with-bazel/src/crypto/base64/{base64.c → base64.cc} +22 -67
- data/third_party/boringssl-with-bazel/src/crypto/bcm_support.h +19 -13
- data/third_party/boringssl-with-bazel/src/crypto/bio/{bio.c → bio.cc} +45 -113
- data/third_party/boringssl-with-bazel/src/crypto/bio/{bio_mem.c → bio_mem.cc} +21 -62
- data/third_party/boringssl-with-bazel/src/crypto/bio/{connect.c → connect.cc} +40 -73
- data/third_party/boringssl-with-bazel/src/crypto/bio/errno.cc +50 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/{fd.c → fd.cc} +14 -56
- data/third_party/boringssl-with-bazel/src/crypto/bio/{file.c → file.cc} +17 -59
- data/third_party/boringssl-with-bazel/src/crypto/bio/hexdump.cc +152 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/internal.h +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/bio/{pair.c → pair.cc} +37 -71
- data/third_party/boringssl-with-bazel/src/crypto/bio/printf.cc +59 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket.cc +147 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/{socket_helper.c → socket_helper.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/blake2/{blake2.c → blake2.cc} +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/{bn_extra/bn_asn1.c → bn/bn_asn1.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{bn_extra/convert.c → bn/convert.cc} +34 -76
- data/third_party/boringssl-with-bazel/src/crypto/buf/buf.cc +118 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/asn1_compat.cc +53 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/{ber.c → ber.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/{cbb.c → cbb.cc} +45 -61
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/{cbs.c → cbs.cc} +42 -41
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/{unicode.c → unicode.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/chacha/{chacha.c → chacha.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/chacha/internal.h +18 -18
- data/third_party/boringssl-with-bazel/src/crypto/cipher/derive_key.cc +110 -0
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra/e_aesctrhmac.c → cipher/e_aesctrhmac.cc} +18 -23
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra/e_aesgcmsiv.c → cipher/e_aesgcmsiv.cc} +42 -38
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra/e_chacha20poly1305.c → cipher/e_chacha20poly1305.cc} +13 -20
- data/third_party/boringssl-with-bazel/src/crypto/cipher/e_des.cc +198 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher/e_null.cc +51 -0
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra/e_rc2.c → cipher/e_rc2.cc} +50 -88
- data/third_party/boringssl-with-bazel/src/crypto/cipher/e_rc4.cc +54 -0
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra/e_tls.c → cipher/e_tls.cc} +14 -13
- data/third_party/boringssl-with-bazel/src/crypto/cipher/get_cipher.cc +85 -0
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra → cipher}/internal.h +29 -69
- data/third_party/boringssl-with-bazel/src/crypto/{cipher_extra/tls_cbc.c → cipher/tls_cbc.cc} +13 -51
- data/third_party/boringssl-with-bazel/src/crypto/conf/{conf.c → conf.cc} +31 -72
- data/third_party/boringssl-with-bazel/src/crypto/conf/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_apple.c → cpu_aarch64_apple.cc} +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_fuchsia.c → cpu_aarch64_fuchsia.cc} +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_linux.c → cpu_aarch64_linux.cc} +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_openbsd.c → cpu_aarch64_openbsd.cc} +17 -17
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_sysreg.c → cpu_aarch64_sysreg.cc} +15 -14
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_win.cc +41 -0
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_arm_freebsd.c → cpu_arm_freebsd.cc} +15 -15
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_arm_linux.c → cpu_arm_linux.cc} +17 -17
- data/third_party/boringssl-with-bazel/src/crypto/cpu_arm_linux.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_intel.c → cpu_intel.cc} +60 -99
- data/third_party/boringssl-with-bazel/src/crypto/{crypto.c → crypto.cc} +18 -23
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/{curve25519.c → curve25519.cc} +40 -43
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_64_adx.cc +18 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_tables.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/{spake25519.c → spake25519.cc} +34 -28
- data/third_party/boringssl-with-bazel/src/crypto/des/{des.c → des.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/des/internal.h +27 -69
- data/third_party/boringssl-with-bazel/src/crypto/dh/dh_asn1.cc +124 -0
- data/third_party/boringssl-with-bazel/src/crypto/{dh_extra/params.c → dh/params.cc} +13 -51
- data/third_party/boringssl-with-bazel/src/crypto/{digest_extra/digest_extra.c → digest/digest_extra.cc} +126 -86
- data/third_party/boringssl-with-bazel/src/crypto/dsa/{dsa.c → dsa.cc} +166 -212
- data/third_party/boringssl-with-bazel/src/crypto/dsa/{dsa_asn1.c → dsa_asn1.cc} +13 -53
- data/third_party/boringssl-with-bazel/src/crypto/dsa/internal.h +13 -15
- data/third_party/boringssl-with-bazel/src/crypto/{ec_extra/ec_asn1.c → ec/ec_asn1.cc} +59 -61
- data/third_party/boringssl-with-bazel/src/crypto/{ec_extra/ec_derive.c → ec/ec_derive.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{ec_extra/hash_to_curve.c → ec/hash_to_curve.cc} +79 -77
- data/third_party/boringssl-with-bazel/src/crypto/{ec_extra → ec}/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/ecdh/ecdh.cc +73 -0
- data/third_party/boringssl-with-bazel/src/crypto/{ecdsa_extra/ecdsa_asn1.c → ecdsa/ecdsa_asn1.cc} +32 -86
- data/third_party/boringssl-with-bazel/src/crypto/engine/{engine.c → engine.cc} +24 -20
- data/third_party/boringssl-with-bazel/src/crypto/err/{err.c → err.cc} +41 -134
- data/third_party/boringssl-with-bazel/src/crypto/err/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/evp/{evp.c → evp.cc} +37 -88
- data/third_party/boringssl-with-bazel/src/crypto/evp/{evp_asn1.c → evp_asn1.cc} +122 -198
- data/third_party/boringssl-with-bazel/src/crypto/evp/{evp_ctx.c → evp_ctx.cc} +20 -63
- data/third_party/boringssl-with-bazel/src/crypto/evp/internal.h +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_dh.c → p_dh.cc} +38 -22
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_dh_asn1.c → p_dh_asn1.cc} +51 -29
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_dsa_asn1.c → p_dsa_asn1.cc} +75 -134
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_ec.c → p_ec.cc} +31 -75
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_ec_asn1.c → p_ec_asn1.cc} +36 -82
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_ed25519.c → p_ed25519.cc} +34 -31
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_ed25519_asn1.c → p_ed25519_asn1.cc} +26 -25
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_hkdf.c → p_hkdf.cc} +30 -26
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_rsa.c → p_rsa.cc} +54 -91
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_rsa_asn1.c → p_rsa_asn1.cc} +26 -69
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_x25519.c → p_x25519.cc} +34 -31
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_x25519_asn1.c → p_x25519_asn1.cc} +30 -29
- data/third_party/boringssl-with-bazel/src/crypto/evp/pbkdf.cc +98 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/{print.c → print.cc} +17 -56
- data/third_party/boringssl-with-bazel/src/crypto/evp/{scrypt.c → scrypt.cc} +20 -13
- data/third_party/boringssl-with-bazel/src/crypto/evp/sign.cc +114 -0
- data/third_party/boringssl-with-bazel/src/crypto/ex_data.cc +141 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.cc.inc +191 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/{aes_nohw.c.inc → aes_nohw.cc.inc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{modes/cbc.c.inc → aes/cbc.cc.inc} +13 -47
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{modes/cfb.c.inc → aes/cfb.cc.inc} +13 -47
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/ctr.cc.inc +100 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{modes/gcm.c.inc → aes/gcm.cc.inc} +175 -314
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{modes/gcm_nohw.c.inc → aes/gcm_nohw.cc.inc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/internal.h +419 -70
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/{key_wrap.c.inc → key_wrap.cc.inc} +14 -48
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.cc.inc +84 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/ofb.cc.inc +53 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{modes/polyval.c.inc → aes/polyval.cc.inc} +14 -15
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{bcm.c → bcm.cc} +116 -113
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm_interface.h +665 -25
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{add.c.inc → add.cc.inc} +14 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/asm/{x86_64-gcc.c.inc → x86_64-gcc.cc.inc} +19 -6
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{bn.c.inc → bn.cc.inc} +25 -79
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{bytes.c.inc → bytes.cc.inc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{cmp.c.inc → cmp.cc.inc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{ctx.c.inc → ctx.cc.inc} +20 -63
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{div.c.inc → div.cc.inc} +42 -93
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{div_extra.c.inc → div_extra.cc.inc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{exponentiation.c.inc → exponentiation.cc.inc} +38 -131
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{gcd.c.inc → gcd.cc.inc} +16 -113
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{gcd_extra.c.inc → gcd_extra.cc.inc} +45 -37
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{generic.c.inc → generic.cc.inc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +25 -134
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/jacobi.cc.inc +108 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{montgomery.c.inc → montgomery.cc.inc} +24 -126
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{montgomery_inv.c.inc → montgomery_inv.cc.inc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{mul.c.inc → mul.cc.inc} +24 -70
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{prime.c.inc → prime.cc.inc} +44 -141
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{random.c.inc → random.cc.inc} +13 -107
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{rsaz_exp.c.inc → rsaz_exp.cc.inc} +18 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.h +20 -17
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{shift.c.inc → shift.cc.inc} +16 -59
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{sqrt.c.inc → sqrt.cc.inc} +13 -53
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/{aead.c.inc → aead.cc.inc} +30 -22
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/{cipher.c.inc → cipher.cc.inc} +20 -65
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/{e_aes.c.inc → e_aes.cc.inc} +113 -335
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/{e_aesccm.c.inc → e_aesccm.cc.inc} +21 -58
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/internal.h +14 -65
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cmac/{cmac.c.inc → cmac.cc.inc} +19 -53
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/delocate.h +26 -22
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/{check.c.inc → check.cc.inc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/{dh.c.inc → dh.cc.inc} +28 -74
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/internal.h +13 -15
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/{digest.c.inc → digest.cc.inc} +30 -68
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.cc.inc +178 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/internal.h +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/md32_common.h +13 -47
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digestsign/{digestsign.c.inc → digestsign.cc.inc} +14 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/builtin_curves.h +91 -91
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{ec.c.inc → ec.cc.inc} +24 -81
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{ec_key.c.inc → ec_key.cc.inc} +26 -86
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{ec_montgomery.c.inc → ec_montgomery.cc.inc} +14 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{felem.c.inc → felem.cc.inc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +19 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{oct.c.inc → oct.cc.inc} +19 -72
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{p224-64.c.inc → p224-64.cc.inc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz-table.h +15 -10
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{p256-nistz.c.inc → p256-nistz.cc.inc} +37 -30
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz.h +22 -17
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{p256.c.inc → p256.cc.inc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256_table.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{scalar.c.inc → scalar.cc.inc} +21 -15
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{simple.c.inc → simple.cc.inc} +14 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{simple_mul.c.inc → simple_mul.cc.inc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{util.c.inc → util.cc.inc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{wnaf.c.inc → wnaf.cc.inc} +38 -81
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.cc.inc +88 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/{ecdsa.c.inc → ecdsa.cc.inc} +19 -58
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/fips_shared_support.cc +28 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/hkdf/{hkdf.c.inc → hkdf.cc.inc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/hmac/{hmac.c.inc → hmac.cc.inc} +16 -57
- data/third_party/boringssl-with-bazel/src/crypto/{keccak → fipsmodule/keccak}/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{keccak/keccak.c → fipsmodule/keccak/keccak.cc.inc} +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/mldsa/mldsa.cc.inc +1993 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/mlkem/mlkem.cc.inc +1165 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/{ctrdrbg.c.inc → ctrdrbg.cc.inc} +22 -28
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +18 -24
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/{rand.c.inc → rand.cc.inc} +34 -30
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/blinding.cc.inc +147 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +13 -56
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/{padding.c.inc → padding.cc.inc} +32 -73
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/{rsa.c.inc → rsa.cc.inc} +93 -148
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/{rsa_impl.c.inc → rsa_impl.cc.inc} +82 -137
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/{fips.c.inc → fips.cc.inc} +26 -18
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/{self_check.c.inc → self_check.cc.inc} +68 -64
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/service_indicator/internal.h +34 -34
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/service_indicator/{service_indicator.c.inc → service_indicator.cc.inc} +23 -24
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/internal.h +43 -57
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/{sha1.c.inc → sha1.cc.inc} +39 -88
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/{sha256.c.inc → sha256.cc.inc} +50 -110
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/{sha512.c.inc → sha512.cc.inc} +61 -131
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/address.h +119 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/fors.cc.inc +169 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/fors.h +58 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/merkle.cc.inc +161 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/merkle.h +70 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/params.h +78 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/slhdsa.cc.inc +329 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/thash.cc.inc +173 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/thash.h +85 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/wots.cc.inc +171 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/slhdsa/wots.h +50 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/{kdf.c.inc → kdf.cc.inc} +13 -51
- data/third_party/boringssl-with-bazel/src/crypto/hpke/{hpke.c → hpke.cc} +19 -16
- data/third_party/boringssl-with-bazel/src/crypto/hrss/{hrss.c → hrss.cc} +73 -122
- data/third_party/boringssl-with-bazel/src/crypto/hrss/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +242 -442
- data/third_party/boringssl-with-bazel/src/crypto/kyber/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/kyber/{kyber.c → kyber.cc} +52 -28
- data/third_party/boringssl-with-bazel/src/crypto/lhash/internal.h +31 -75
- data/third_party/boringssl-with-bazel/src/crypto/lhash/{lhash.c → lhash.cc} +21 -62
- data/third_party/boringssl-with-bazel/src/crypto/{fipsmodule/md4/md4.c.inc → md4/md4.cc} +21 -67
- data/third_party/boringssl-with-bazel/src/crypto/md5/internal.h +37 -0
- data/third_party/boringssl-with-bazel/src/crypto/{fipsmodule/md5/md5.c.inc → md5/md5.cc} +17 -58
- data/third_party/boringssl-with-bazel/src/crypto/{mem.c → mem.cc} +47 -77
- data/third_party/boringssl-with-bazel/src/crypto/mldsa/mldsa.cc +90 -0
- data/third_party/boringssl-with-bazel/src/crypto/mlkem/mlkem.cc +97 -1042
- data/third_party/boringssl-with-bazel/src/crypto/obj/{obj.c → obj.cc} +40 -85
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_dat.h +14 -56
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.cc +80 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/internal.h +44 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_all.cc +149 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_info.c → pem_info.cc} +20 -60
- data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_lib.c → pem_lib.cc} +59 -107
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_oth.cc +45 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_pk8.c → pem_pk8.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_pkey.c → pem_pkey.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_x509.cc +22 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_xaux.cc +22 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/{pkcs7.c → pkcs7.cc} +17 -17
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/{pkcs7_x509.c → pkcs7_x509.cc} +40 -37
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/{p5_pbev2.c → p5_pbev2.cc} +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/{pkcs8.c → pkcs8.cc} +170 -210
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/{pkcs8_x509.c → pkcs8_x509.cc} +101 -149
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/{poly1305.c → poly1305.cc} +15 -15
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/{poly1305_arm.c → poly1305_arm.cc} +16 -14
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/{poly1305_vec.c → poly1305_vec.cc} +26 -23
- data/third_party/boringssl-with-bazel/src/crypto/pool/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/pool/{pool.c → pool.cc} +24 -23
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra/deterministic.c → rand/deterministic.cc} +14 -14
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra/fork_detect.c → rand/fork_detect.cc} +23 -24
- data/third_party/boringssl-with-bazel/src/crypto/rand/forkunsafe.cc +44 -0
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra/getentropy.c → rand/getentropy.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra → rand}/getrandom_fillin.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/rand/ios.cc +42 -0
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra/passive.c → rand/passive.cc} +34 -30
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra/rand_extra.c → rand/rand.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/rand/sysrand_internal.h +37 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand/trusty.cc +46 -0
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra/urandom.c → rand/urandom.cc} +19 -19
- data/third_party/boringssl-with-bazel/src/crypto/{rand_extra/windows.c → rand/windows.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/rc4/rc4.cc +56 -0
- data/third_party/boringssl-with-bazel/src/crypto/{refcount.c → refcount.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/rsa/internal.h +36 -0
- data/third_party/boringssl-with-bazel/src/crypto/{rsa_extra/rsa_asn1.c → rsa/rsa_asn1.cc} +13 -54
- data/third_party/boringssl-with-bazel/src/crypto/{rsa_extra/rsa_crypt.c → rsa/rsa_crypt.cc} +94 -133
- data/third_party/boringssl-with-bazel/src/crypto/rsa/rsa_extra.cc +19 -0
- data/third_party/boringssl-with-bazel/src/crypto/rsa/rsa_print.cc +27 -0
- data/third_party/boringssl-with-bazel/src/crypto/sha/sha1.cc +52 -0
- data/third_party/boringssl-with-bazel/src/crypto/sha/sha256.cc +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/sha/sha512.cc +104 -0
- data/third_party/boringssl-with-bazel/src/crypto/siphash/{siphash.c → siphash.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/slhdsa.cc +113 -0
- data/third_party/boringssl-with-bazel/src/crypto/spake2plus/internal.h +204 -0
- data/third_party/boringssl-with-bazel/src/crypto/spake2plus/spake2plus.cc +501 -0
- data/third_party/boringssl-with-bazel/src/crypto/stack/{stack.c → stack.cc} +23 -61
- data/third_party/boringssl-with-bazel/src/crypto/thread.cc +68 -0
- data/third_party/boringssl-with-bazel/src/crypto/{thread_none.c → thread_none.cc} +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/{thread_pthread.c → thread_pthread.cc} +21 -20
- data/third_party/boringssl-with-bazel/src/crypto/{thread_win.c → thread_win.cc} +33 -29
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/{pmbtoken.c → pmbtoken.cc} +159 -171
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/{trust_token.c → trust_token.cc} +32 -34
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/{voprf.c → voprf.cc} +178 -182
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_digest.cc +52 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_sign.cc +97 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_verify.cc +74 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{algorithm.c → algorithm.cc} +14 -56
- data/third_party/boringssl-with-bazel/src/crypto/x509/{asn1_gen.c → asn1_gen.cc} +19 -62
- data/third_party/boringssl-with-bazel/src/crypto/x509/{by_dir.c → by_dir.cc} +32 -77
- data/third_party/boringssl-with-bazel/src/crypto/x509/{by_file.c → by_file.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/ext_dat.h +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/i2d_pr.cc +37 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +13 -57
- data/third_party/boringssl-with-bazel/src/crypto/x509/{name_print.c → name_print.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/{policy.c → policy.cc} +200 -190
- data/third_party/boringssl-with-bazel/src/crypto/x509/{rsa_pss.c → rsa_pss.cc} +59 -96
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.cc +103 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{t_req.c → t_req.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/{t_x509.c → t_x509.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.cc +79 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_akey.c → v3_akey.cc} +17 -57
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_akeya.cc +31 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_alt.c → v3_alt.cc} +17 -58
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_bcons.cc +95 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_bitst.cc +102 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_conf.c → v3_conf.cc} +18 -60
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_cpols.c → v3_cpols.cc} +60 -98
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_crld.c → v3_crld.cc} +16 -57
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_enum.cc +73 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_extku.cc +114 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_genn.c → v3_genn.cc} +20 -62
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_ia5.cc +79 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_info.c → v3_info.cc} +20 -67
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_int.cc +81 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_lib.c → v3_lib.cc} +23 -63
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_ncons.c → v3_ncons.cc} +15 -56
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_ocsp.c → v3_ocsp.cc} +17 -9
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_pcons.cc +101 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_pmaps.c → v3_pmaps.cc} +15 -56
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_prn.c → v3_prn.cc} +15 -56
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_purp.c → v3_purp.cc} +29 -63
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_skey.cc +131 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_utl.c → v3_utl.cc} +30 -78
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509.cc +47 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_att.c → x509_att.cc} +16 -57
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_cmp.c → x509_cmp.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_d2.cc +66 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_def.cc +44 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_ext.c → x509_ext.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_lu.c → x509_lu.cc} +20 -65
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_obj.c → x509_obj.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_req.c → x509_req.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_set.c → x509_set.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_trs.c → x509_trs.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_txt.c → x509_txt.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_v3.c → x509_v3.cc} +15 -57
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_vfy.c → x509_vfy.cc} +229 -267
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_vpm.c → x509_vpm.cc} +68 -68
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509cset.c → x509cset.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509name.c → x509name.cc} +13 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509rset.cc +67 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509spki.cc +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_algor.cc +107 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_all.c → x_all.cc} +23 -61
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.cc +55 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_crl.c → x_crl.cc} +19 -61
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_exten.cc +36 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_name.c → x_name.cc} +52 -87
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_pubkey.c → x_pubkey.cc} +17 -57
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_req.cc +74 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.cc +51 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_spki.cc +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_val.cc +28 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_x509.c → x_x509.cc} +61 -99
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_x509a.c → x_x509a.cc} +17 -57
- data/third_party/boringssl-with-bazel/src/gen/crypto/{err_data.c → err_data.cc} +468 -453
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/aes.h +13 -47
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +13 -51
- data/third_party/boringssl-with-bazel/src/include/openssl/asm_base.h +14 -14
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +23 -62
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1_mac.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +248 -328
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +24 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/base64.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/bcm_public.h +82 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/blake2.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/blowfish.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/bn.h +14 -121
- data/third_party/boringssl-with-bazel/src/include/openssl/buf.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/buffer.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +31 -16
- data/third_party/boringssl-with-bazel/src/include/openssl/cast.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/chacha.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +31 -59
- data/third_party/boringssl-with-bazel/src/include/openssl/cmac.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/conf.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/cpu.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +25 -14
- data/third_party/boringssl-with-bazel/src/include/openssl/ctrdrbg.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/curve25519.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/des.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +17 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +19 -56
- data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +17 -58
- data/third_party/boringssl-with-bazel/src/include/openssl/dtls1.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/e_os2.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/ec.h +14 -66
- data/third_party/boringssl-with-bazel/src/include/openssl/ec_key.h +31 -72
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdh.h +14 -65
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +13 -51
- data/third_party/boringssl-with-bazel/src/include/openssl/engine.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/err.h +13 -107
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +14 -56
- data/third_party/boringssl-with-bazel/src/include/openssl/evp_errors.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/ex_data.h +13 -107
- data/third_party/boringssl-with-bazel/src/include/openssl/experimental/kyber.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/hkdf.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/hmac.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/hrss.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/is_boringssl.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/kdf.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/lhash.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/md4.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/md5.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/mem.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/mldsa.h +20 -26
- data/third_party/boringssl-with-bazel/src/include/openssl/mlkem.h +13 -37
- data/third_party/boringssl-with-bazel/src/include/openssl/nid.h +27 -69
- data/third_party/boringssl-with-bazel/src/include/openssl/obj.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/obj_mac.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/objects.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslv.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/ossl_typ.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +22 -60
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs12.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs8.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/poly1305.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/pool.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/posix_time.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/rand.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/rc4.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/ripemd.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +23 -63
- data/third_party/boringssl-with-bazel/src/include/openssl/safestack.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/service_indicator.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/sha.h +15 -95
- data/third_party/boringssl-with-bazel/src/include/openssl/siphash.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/slhdsa.h +174 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +24 -32
- data/third_party/boringssl-with-bazel/src/include/openssl/srtp.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +358 -290
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl3.h +15 -114
- data/third_party/boringssl-with-bazel/src/include/openssl/stack.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/target.h +23 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/thread.h +15 -57
- data/third_party/boringssl-with-bazel/src/include/openssl/time.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +27 -156
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +15 -15
- data/third_party/boringssl-with-bazel/src/include/openssl/type_check.h +13 -55
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +14 -61
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +13 -13
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3_errors.h +13 -53
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +15 -14
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +680 -434
- data/third_party/boringssl-with-bazel/src/ssl/d1_lib.cc +129 -174
- data/third_party/boringssl-with-bazel/src/ssl/d1_pkt.cc +176 -131
- data/third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc +21 -127
- data/third_party/boringssl-with-bazel/src/ssl/dtls_method.cc +107 -104
- data/third_party/boringssl-with-bazel/src/ssl/dtls_record.cc +311 -312
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +54 -47
- data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +677 -475
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +66 -73
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +61 -153
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +198 -331
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +88 -212
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +949 -531
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +47 -157
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +29 -159
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +18 -112
- data/third_party/boringssl-with-bazel/src/ssl/ssl_aead_ctx.cc +103 -196
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +52 -145
- data/third_party/boringssl-with-bazel/src/ssl/ssl_buffer.cc +15 -20
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +117 -157
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +229 -365
- data/third_party/boringssl-with-bazel/src/ssl/ssl_credential.cc +216 -31
- data/third_party/boringssl-with-bazel/src/ssl/ssl_file.cc +13 -109
- data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +34 -33
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +194 -350
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +38 -83
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +101 -236
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +17 -91
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +109 -157
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +44 -30
- data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +66 -195
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +45 -176
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +58 -42
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +146 -94
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +251 -180
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +236 -107
- data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +64 -117
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +52 -134
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_32.h +6 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_64.h +6 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_64_adx.h +4 -1
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_32.h +1 -1
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_64.h +3 -0
- metadata +357 -348
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opencensus.upb.h +0 -426
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opencensus.upb_minitable.c +0 -87
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opencensus.upb_minitable.h +0 -32
- data/src/core/ext/upb-gen/opencensus/proto/trace/v1/trace_config.upb.h +0 -408
- data/src/core/ext/upb-gen/opencensus/proto/trace/v1/trace_config.upb_minitable.c +0 -124
- data/src/core/ext/upb-gen/opencensus/proto/trace/v1/trace_config.upb_minitable.h +0 -38
- data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/opencensus.upbdefs.c +0 -108
- data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/opencensus.upbdefs.h +0 -33
- data/src/core/ext/upbdefs-gen/opencensus/proto/trace/v1/trace_config.upbdefs.c +0 -67
- data/src/core/ext/upbdefs-gen/opencensus/proto/trace/v1/trace_config.upbdefs.h +0 -48
- data/src/core/util/atm.cc +0 -34
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c +0 -95
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c +0 -89
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_dup.c +0 -84
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c +0 -151
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_i2d_fp.c +0 -85
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.c +0 -74
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +0 -183
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c +0 -103
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c +0 -98
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c +0 -105
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_string.c +0 -94
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +0 -212
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c +0 -126
- data/third_party/boringssl-with-bazel/src/crypto/bio/errno.c +0 -92
- data/third_party/boringssl-with-bazel/src/crypto/bio/hexdump.c +0 -192
- data/third_party/boringssl-with-bazel/src/crypto/bio/printf.c +0 -102
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket.c +0 -189
- data/third_party/boringssl-with-bazel/src/crypto/buf/buf.c +0 -158
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/asn1_compat.c +0 -53
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c +0 -127
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/derive_key.c +0 -152
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_des.c +0 -228
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_null.c +0 -90
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc4.c +0 -94
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_win.c +0 -41
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_64_adx.c +0 -18
- data/third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.c +0 -165
- data/third_party/boringssl-with-bazel/src/crypto/dilithium/dilithium.c +0 -1539
- data/third_party/boringssl-with-bazel/src/crypto/dilithium/internal.h +0 -58
- data/third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_extra.c +0 -124
- data/third_party/boringssl-with-bazel/src/crypto/evp/pbkdf.c +0 -146
- data/third_party/boringssl-with-bazel/src/crypto/evp/sign.c +0 -156
- data/third_party/boringssl-with-bazel/src/crypto/ex_data.c +0 -236
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.c.inc +0 -127
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.c.inc +0 -124
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/jacobi.c.inc +0 -146
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c.inc +0 -304
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.c.inc +0 -130
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/fips_shared_support.c +0 -29
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/internal.h +0 -37
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.c.inc +0 -196
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/internal.h +0 -428
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.c.inc +0 -87
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/blinding.c.inc +0 -241
- data/third_party/boringssl-with-bazel/src/crypto/mldsa/internal.h +0 -73
- data/third_party/boringssl-with-bazel/src/crypto/mldsa/mldsa.c +0 -1687
- data/third_party/boringssl-with-bazel/src/crypto/mlkem/internal.h +0 -90
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c +0 -122
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c +0 -243
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_oth.c +0 -87
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_x509.c +0 -64
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_xaux.c +0 -64
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c +0 -44
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/ios.c +0 -42
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/sysrand_internal.h +0 -37
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c +0 -46
- data/third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c +0 -98
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/internal.h +0 -79
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_print.c +0 -22
- data/third_party/boringssl-with-bazel/src/crypto/spx/address.c +0 -101
- data/third_party/boringssl-with-bazel/src/crypto/spx/address.h +0 -50
- data/third_party/boringssl-with-bazel/src/crypto/spx/fors.c +0 -133
- data/third_party/boringssl-with-bazel/src/crypto/spx/fors.h +0 -54
- data/third_party/boringssl-with-bazel/src/crypto/spx/merkle.c +0 -150
- data/third_party/boringssl-with-bazel/src/crypto/spx/merkle.h +0 -61
- data/third_party/boringssl-with-bazel/src/crypto/spx/params.h +0 -71
- data/third_party/boringssl-with-bazel/src/crypto/spx/spx.c +0 -140
- data/third_party/boringssl-with-bazel/src/crypto/spx/spx_util.c +0 -53
- data/third_party/boringssl-with-bazel/src/crypto/spx/spx_util.h +0 -44
- data/third_party/boringssl-with-bazel/src/crypto/spx/thash.c +0 -136
- data/third_party/boringssl-with-bazel/src/crypto/spx/thash.h +0 -70
- data/third_party/boringssl-with-bazel/src/crypto/spx/wots.c +0 -135
- data/third_party/boringssl-with-bazel/src/crypto/spx/wots.h +0 -45
- data/third_party/boringssl-with-bazel/src/crypto/thread.c +0 -110
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_digest.c +0 -94
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_sign.c +0 -136
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_verify.c +0 -116
- data/third_party/boringssl-with-bazel/src/crypto/x509/i2d_pr.c +0 -79
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +0 -145
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +0 -121
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_akeya.c +0 -73
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_bcons.c +0 -135
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_bitst.c +0 -141
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_enum.c +0 -112
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_extku.c +0 -154
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_ia5.c +0 -122
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_int.c +0 -121
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_pcons.c +0 -142
- data/third_party/boringssl-with-bazel/src/crypto/x509/v3_skey.c +0 -170
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509.c +0 -89
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_d2.c +0 -108
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_def.c +0 -86
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c +0 -109
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509spki.c +0 -133
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_algor.c +0 -149
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c +0 -97
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_exten.c +0 -78
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_req.c +0 -116
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +0 -93
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_spki.c +0 -79
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_val.c +0 -70
- data/third_party/boringssl-with-bazel/src/include/openssl/experimental/dilithium.h +0 -129
- data/third_party/boringssl-with-bazel/src/include/openssl/experimental/spx.h +0 -90
@@ -1,115 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
*
|
15
|
-
* 2. Redistributions in binary form must reproduce the above copyright
|
16
|
-
* notice, this list of conditions and the following disclaimer in
|
17
|
-
* the documentation and/or other materials provided with the
|
18
|
-
* distribution.
|
19
|
-
*
|
20
|
-
* 3. All advertising materials mentioning features or use of this
|
21
|
-
* software must display the following acknowledgment:
|
22
|
-
* "This product includes software developed by the OpenSSL Project
|
23
|
-
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
24
|
-
*
|
25
|
-
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
26
|
-
* endorse or promote products derived from this software without
|
27
|
-
* prior written permission. For written permission, please contact
|
28
|
-
* openssl-core@openssl.org.
|
29
|
-
*
|
30
|
-
* 5. Products derived from this software may not be called "OpenSSL"
|
31
|
-
* nor may "OpenSSL" appear in their names without prior written
|
32
|
-
* permission of the OpenSSL Project.
|
33
|
-
*
|
34
|
-
* 6. Redistributions of any form whatsoever must retain the following
|
35
|
-
* acknowledgment:
|
36
|
-
* "This product includes software developed by the OpenSSL Project
|
37
|
-
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
38
|
-
*
|
39
|
-
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
40
|
-
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
41
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
42
|
-
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
43
|
-
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
44
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
45
|
-
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
46
|
-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
47
|
-
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
48
|
-
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
49
|
-
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
50
|
-
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
51
|
-
* ====================================================================
|
52
|
-
*
|
53
|
-
* This product includes cryptographic software written by Eric Young
|
54
|
-
* (eay@cryptsoft.com). This product includes software written by Tim
|
55
|
-
* Hudson (tjh@cryptsoft.com).
|
56
|
-
*
|
57
|
-
*/
|
58
|
-
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
59
|
-
* All rights reserved.
|
60
|
-
*
|
61
|
-
* This package is an SSL implementation written
|
62
|
-
* by Eric Young (eay@cryptsoft.com).
|
63
|
-
* The implementation was written so as to conform with Netscapes SSL.
|
64
|
-
*
|
65
|
-
* This library is free for commercial and non-commercial use as long as
|
66
|
-
* the following conditions are aheared to. The following conditions
|
67
|
-
* apply to all code found in this distribution, be it the RC4, RSA,
|
68
|
-
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
69
|
-
* included with this distribution is covered by the same copyright terms
|
70
|
-
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
71
|
-
*
|
72
|
-
* Copyright remains Eric Young's, and as such any Copyright notices in
|
73
|
-
* the code are not to be removed.
|
74
|
-
* If this package is used in a product, Eric Young should be given attribution
|
75
|
-
* as the author of the parts of the library used.
|
76
|
-
* This can be in the form of a textual message at program startup or
|
77
|
-
* in documentation (online or textual) provided with the package.
|
78
|
-
*
|
79
|
-
* Redistribution and use in source and binary forms, with or without
|
80
|
-
* modification, are permitted provided that the following conditions
|
81
|
-
* are met:
|
82
|
-
* 1. Redistributions of source code must retain the copyright
|
83
|
-
* notice, this list of conditions and the following disclaimer.
|
84
|
-
* 2. Redistributions in binary form must reproduce the above copyright
|
85
|
-
* notice, this list of conditions and the following disclaimer in the
|
86
|
-
* documentation and/or other materials provided with the distribution.
|
87
|
-
* 3. All advertising materials mentioning features or use of this software
|
88
|
-
* must display the following acknowledgement:
|
89
|
-
* "This product includes cryptographic software written by
|
90
|
-
* Eric Young (eay@cryptsoft.com)"
|
91
|
-
* The word 'cryptographic' can be left out if the rouines from the library
|
92
|
-
* being used are not cryptographic related :-).
|
93
|
-
* 4. If you include any Windows specific code (or a derivative thereof) from
|
94
|
-
* the apps directory (application code) you must include an acknowledgement:
|
95
|
-
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
96
|
-
*
|
97
|
-
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
98
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
99
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
100
|
-
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
101
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
102
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
103
|
-
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
104
|
-
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
105
|
-
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
106
|
-
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
107
|
-
* SUCH DAMAGE.
|
108
|
-
*
|
109
|
-
* The licence and distribution terms for any publically available version or
|
110
|
-
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
111
|
-
* copied and put under another distribution licence
|
112
|
-
* [including the GNU Public Licence.] */
|
1
|
+
// Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved.
|
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.
|
113
14
|
|
114
15
|
#include <openssl/ssl.h>
|
115
16
|
|
@@ -117,6 +18,8 @@
|
|
117
18
|
#include <limits.h>
|
118
19
|
#include <string.h>
|
119
20
|
|
21
|
+
#include <algorithm>
|
22
|
+
|
120
23
|
#include <openssl/err.h>
|
121
24
|
#include <openssl/evp.h>
|
122
25
|
#include <openssl/mem.h>
|
@@ -140,33 +43,153 @@ static const unsigned int kMinMTU = 256 - 28;
|
|
140
43
|
// the underlying BIO supplies one.
|
141
44
|
static const unsigned int kDefaultMTU = 1500 - 28;
|
142
45
|
|
46
|
+
// BitRange returns a |uint8_t| with bits |start|, inclusive, to |end|,
|
47
|
+
// exclusive, set.
|
48
|
+
static uint8_t BitRange(size_t start, size_t end) {
|
49
|
+
assert(start <= end && end <= 8);
|
50
|
+
return static_cast<uint8_t>(~((1u << start) - 1) & ((1u << end) - 1));
|
51
|
+
}
|
143
52
|
|
144
|
-
//
|
53
|
+
// FirstUnmarkedRangeInByte returns the first unmarked range in bits |b|.
|
54
|
+
static DTLSMessageBitmap::Range FirstUnmarkedRangeInByte(uint8_t b) {
|
55
|
+
size_t start, end;
|
56
|
+
for (start = 0; start < 8; start++) {
|
57
|
+
if ((b & (1u << start)) == 0) {
|
58
|
+
break;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
for (end = start; end < 8; end++) {
|
62
|
+
if ((b & (1u << end)) != 0) {
|
63
|
+
break;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
return DTLSMessageBitmap::Range{start, end};
|
67
|
+
}
|
68
|
+
|
69
|
+
bool DTLSMessageBitmap::Init(size_t num_bits) {
|
70
|
+
if (num_bits + 7 < num_bits) {
|
71
|
+
OPENSSL_PUT_ERROR(SSL, ERR_R_OVERFLOW);
|
72
|
+
return false;
|
73
|
+
}
|
74
|
+
size_t num_bytes = (num_bits + 7) / 8;
|
75
|
+
size_t bits_rounded = num_bytes * 8;
|
76
|
+
if (!bytes_.Init(num_bytes)) {
|
77
|
+
return false;
|
78
|
+
}
|
79
|
+
MarkRange(num_bits, bits_rounded);
|
80
|
+
first_unmarked_byte_ = 0;
|
81
|
+
return true;
|
82
|
+
}
|
83
|
+
|
84
|
+
void DTLSMessageBitmap::MarkRange(size_t start, size_t end) {
|
85
|
+
assert(start <= end);
|
86
|
+
// Don't bother touching bytes that have already been marked.
|
87
|
+
start = std::max(start, first_unmarked_byte_ << 3);
|
88
|
+
// Clamp everything within range.
|
89
|
+
start = std::min(start, bytes_.size() << 3);
|
90
|
+
end = std::min(end, bytes_.size() << 3);
|
91
|
+
if (start >= end) {
|
92
|
+
return;
|
93
|
+
}
|
94
|
+
|
95
|
+
if ((start >> 3) == (end >> 3)) {
|
96
|
+
bytes_[start >> 3] |= BitRange(start & 7, end & 7);
|
97
|
+
} else {
|
98
|
+
bytes_[start >> 3] |= BitRange(start & 7, 8);
|
99
|
+
for (size_t i = (start >> 3) + 1; i < (end >> 3); i++) {
|
100
|
+
bytes_[i] = 0xff;
|
101
|
+
}
|
102
|
+
if ((end & 7) != 0) {
|
103
|
+
bytes_[end >> 3] |= BitRange(0, end & 7);
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
// Maintain the |first_unmarked_byte_| invariant. This work is amortized
|
108
|
+
// across all |MarkRange| calls.
|
109
|
+
while (first_unmarked_byte_ < bytes_.size() &&
|
110
|
+
bytes_[first_unmarked_byte_] == 0xff) {
|
111
|
+
first_unmarked_byte_++;
|
112
|
+
}
|
113
|
+
// If the whole message is marked, we no longer need to spend memory on the
|
114
|
+
// bitmap.
|
115
|
+
if (first_unmarked_byte_ >= bytes_.size()) {
|
116
|
+
bytes_.Reset();
|
117
|
+
first_unmarked_byte_ = 0;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
DTLSMessageBitmap::Range DTLSMessageBitmap::NextUnmarkedRange(
|
122
|
+
size_t start) const {
|
123
|
+
// Don't bother looking at bytes that are known to be fully marked.
|
124
|
+
start = std::max(start, first_unmarked_byte_ << 3);
|
125
|
+
|
126
|
+
size_t idx = start >> 3;
|
127
|
+
if (idx >= bytes_.size()) {
|
128
|
+
return Range{0, 0};
|
129
|
+
}
|
130
|
+
|
131
|
+
// Look at the bits from |start| up to a byte boundary.
|
132
|
+
uint8_t byte = bytes_[idx] | BitRange(0, start & 7);
|
133
|
+
if (byte == 0xff) {
|
134
|
+
// Nothing unmarked at this byte. Keep searching for an unmarked bit.
|
135
|
+
for (idx = idx + 1; idx < bytes_.size(); idx++) {
|
136
|
+
if (bytes_[idx] != 0xff) {
|
137
|
+
byte = bytes_[idx];
|
138
|
+
break;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
if (idx >= bytes_.size()) {
|
142
|
+
return Range{0, 0};
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
Range range = FirstUnmarkedRangeInByte(byte);
|
147
|
+
assert(!range.empty());
|
148
|
+
bool should_extend = range.end == 8;
|
149
|
+
range.start += idx << 3;
|
150
|
+
range.end += idx << 3;
|
151
|
+
if (!should_extend) {
|
152
|
+
// The range did not end at a byte boundary. We're done.
|
153
|
+
return range;
|
154
|
+
}
|
145
155
|
|
146
|
-
|
147
|
-
|
148
|
-
|
156
|
+
// Collect all fully unmarked bytes.
|
157
|
+
for (idx = idx + 1; idx < bytes_.size(); idx++) {
|
158
|
+
if (bytes_[idx] != 0) {
|
159
|
+
break;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
range.end = idx << 3;
|
163
|
+
|
164
|
+
// Add any bits from the remaining byte, if any.
|
165
|
+
if (idx < bytes_.size()) {
|
166
|
+
Range extra = FirstUnmarkedRangeInByte(bytes_[idx]);
|
167
|
+
if (extra.start == 0) {
|
168
|
+
range.end += extra.end;
|
169
|
+
}
|
170
|
+
}
|
171
|
+
|
172
|
+
return range;
|
149
173
|
}
|
150
174
|
|
151
|
-
|
175
|
+
// Receiving handshake messages.
|
176
|
+
|
177
|
+
static UniquePtr<DTLSIncomingMessage> dtls_new_incoming_message(
|
152
178
|
const struct hm_header_st *msg_hdr) {
|
153
179
|
ScopedCBB cbb;
|
154
|
-
UniquePtr<
|
180
|
+
UniquePtr<DTLSIncomingMessage> frag = MakeUnique<DTLSIncomingMessage>();
|
155
181
|
if (!frag) {
|
156
182
|
return nullptr;
|
157
183
|
}
|
158
184
|
frag->type = msg_hdr->type;
|
159
185
|
frag->seq = msg_hdr->seq;
|
160
|
-
frag->msg_len = msg_hdr->msg_len;
|
161
186
|
|
162
187
|
// Allocate space for the reassembled message and fill in the header.
|
163
|
-
frag->data
|
164
|
-
(uint8_t *)OPENSSL_malloc(DTLS1_HM_HEADER_LENGTH + msg_hdr->msg_len);
|
165
|
-
if (frag->data == NULL) {
|
188
|
+
if (!frag->data.InitForOverwrite(DTLS1_HM_HEADER_LENGTH + msg_hdr->msg_len)) {
|
166
189
|
return nullptr;
|
167
190
|
}
|
168
191
|
|
169
|
-
if (!CBB_init_fixed(cbb.get(), frag->data, DTLS1_HM_HEADER_LENGTH) ||
|
192
|
+
if (!CBB_init_fixed(cbb.get(), frag->data.data(), DTLS1_HM_HEADER_LENGTH) ||
|
170
193
|
!CBB_add_u8(cbb.get(), msg_hdr->type) ||
|
171
194
|
!CBB_add_u24(cbb.get(), msg_hdr->msg_len) ||
|
172
195
|
!CBB_add_u16(cbb.get(), msg_hdr->seq) ||
|
@@ -176,88 +199,26 @@ static UniquePtr<hm_fragment> dtls1_hm_fragment_new(
|
|
176
199
|
return nullptr;
|
177
200
|
}
|
178
201
|
|
179
|
-
|
180
|
-
|
181
|
-
// Initialize reassembly bitmask.
|
182
|
-
if (msg_hdr->msg_len + 7 < msg_hdr->msg_len) {
|
183
|
-
OPENSSL_PUT_ERROR(SSL, ERR_R_OVERFLOW);
|
184
|
-
return nullptr;
|
185
|
-
}
|
186
|
-
size_t bitmask_len = (msg_hdr->msg_len + 7) / 8;
|
187
|
-
frag->reassembly = (uint8_t *)OPENSSL_zalloc(bitmask_len);
|
188
|
-
if (frag->reassembly == NULL) {
|
189
|
-
return nullptr;
|
190
|
-
}
|
202
|
+
if (!frag->reassembly.Init(msg_hdr->msg_len)) {
|
203
|
+
return nullptr;
|
191
204
|
}
|
192
205
|
|
193
206
|
return frag;
|
194
207
|
}
|
195
208
|
|
196
|
-
// bit_range returns a |uint8_t| with bits |start|, inclusive, to |end|,
|
197
|
-
// exclusive, set.
|
198
|
-
static uint8_t bit_range(size_t start, size_t end) {
|
199
|
-
return (uint8_t)(~((1u << start) - 1) & ((1u << end) - 1));
|
200
|
-
}
|
201
|
-
|
202
|
-
// dtls1_hm_fragment_mark marks bytes |start|, inclusive, to |end|, exclusive,
|
203
|
-
// as received in |frag|. If |frag| becomes complete, it clears
|
204
|
-
// |frag->reassembly|. The range must be within the bounds of |frag|'s message
|
205
|
-
// and |frag->reassembly| must not be NULL.
|
206
|
-
static void dtls1_hm_fragment_mark(hm_fragment *frag, size_t start,
|
207
|
-
size_t end) {
|
208
|
-
size_t msg_len = frag->msg_len;
|
209
|
-
|
210
|
-
if (frag->reassembly == NULL || start > end || end > msg_len) {
|
211
|
-
assert(0);
|
212
|
-
return;
|
213
|
-
}
|
214
|
-
// A zero-length message will never have a pending reassembly.
|
215
|
-
assert(msg_len > 0);
|
216
|
-
|
217
|
-
if (start == end) {
|
218
|
-
return;
|
219
|
-
}
|
220
|
-
|
221
|
-
if ((start >> 3) == (end >> 3)) {
|
222
|
-
frag->reassembly[start >> 3] |= bit_range(start & 7, end & 7);
|
223
|
-
} else {
|
224
|
-
frag->reassembly[start >> 3] |= bit_range(start & 7, 8);
|
225
|
-
for (size_t i = (start >> 3) + 1; i < (end >> 3); i++) {
|
226
|
-
frag->reassembly[i] = 0xff;
|
227
|
-
}
|
228
|
-
if ((end & 7) != 0) {
|
229
|
-
frag->reassembly[end >> 3] |= bit_range(0, end & 7);
|
230
|
-
}
|
231
|
-
}
|
232
|
-
|
233
|
-
// Check if the fragment is complete.
|
234
|
-
for (size_t i = 0; i < (msg_len >> 3); i++) {
|
235
|
-
if (frag->reassembly[i] != 0xff) {
|
236
|
-
return;
|
237
|
-
}
|
238
|
-
}
|
239
|
-
if ((msg_len & 7) != 0 &&
|
240
|
-
frag->reassembly[msg_len >> 3] != bit_range(0, msg_len & 7)) {
|
241
|
-
return;
|
242
|
-
}
|
243
|
-
|
244
|
-
OPENSSL_free(frag->reassembly);
|
245
|
-
frag->reassembly = NULL;
|
246
|
-
}
|
247
|
-
|
248
209
|
// dtls1_is_current_message_complete returns whether the current handshake
|
249
210
|
// message is complete.
|
250
211
|
static bool dtls1_is_current_message_complete(const SSL *ssl) {
|
251
212
|
size_t idx = ssl->d1->handshake_read_seq % SSL_MAX_HANDSHAKE_FLIGHT;
|
252
|
-
|
253
|
-
return frag !=
|
213
|
+
DTLSIncomingMessage *frag = ssl->d1->incoming_messages[idx].get();
|
214
|
+
return frag != nullptr && frag->reassembly.IsComplete();
|
254
215
|
}
|
255
216
|
|
256
217
|
// dtls1_get_incoming_message returns the incoming message corresponding to
|
257
218
|
// |msg_hdr|. If none exists, it creates a new one and inserts it in the
|
258
219
|
// queue. Otherwise, it checks |msg_hdr| is consistent with the existing one. It
|
259
220
|
// returns NULL on failure. The caller does not take ownership of the result.
|
260
|
-
static
|
221
|
+
static DTLSIncomingMessage *dtls1_get_incoming_message(
|
261
222
|
SSL *ssl, uint8_t *out_alert, const struct hm_header_st *msg_hdr) {
|
262
223
|
if (msg_hdr->seq < ssl->d1->handshake_read_seq ||
|
263
224
|
msg_hdr->seq - ssl->d1->handshake_read_seq >= SSL_MAX_HANDSHAKE_FLIGHT) {
|
@@ -266,13 +227,13 @@ static hm_fragment *dtls1_get_incoming_message(
|
|
266
227
|
}
|
267
228
|
|
268
229
|
size_t idx = msg_hdr->seq % SSL_MAX_HANDSHAKE_FLIGHT;
|
269
|
-
|
230
|
+
DTLSIncomingMessage *frag = ssl->d1->incoming_messages[idx].get();
|
270
231
|
if (frag != NULL) {
|
271
232
|
assert(frag->seq == msg_hdr->seq);
|
272
233
|
// The new fragment must be compatible with the previous fragments from this
|
273
234
|
// message.
|
274
|
-
if (frag->type != msg_hdr->type ||
|
275
|
-
frag->msg_len != msg_hdr->msg_len) {
|
235
|
+
if (frag->type != msg_hdr->type || //
|
236
|
+
frag->msg_len() != msg_hdr->msg_len) {
|
276
237
|
OPENSSL_PUT_ERROR(SSL, SSL_R_FRAGMENT_MISMATCH);
|
277
238
|
*out_alert = SSL_AD_ILLEGAL_PARAMETER;
|
278
239
|
return NULL;
|
@@ -281,7 +242,7 @@ static hm_fragment *dtls1_get_incoming_message(
|
|
281
242
|
}
|
282
243
|
|
283
244
|
// This is the first fragment from this message.
|
284
|
-
ssl->d1->incoming_messages[idx] =
|
245
|
+
ssl->d1->incoming_messages[idx] = dtls_new_incoming_message(msg_hdr);
|
285
246
|
if (!ssl->d1->incoming_messages[idx]) {
|
286
247
|
*out_alert = SSL_AD_INTERNAL_ERROR;
|
287
248
|
return NULL;
|
@@ -289,115 +250,184 @@ static hm_fragment *dtls1_get_incoming_message(
|
|
289
250
|
return ssl->d1->incoming_messages[idx].get();
|
290
251
|
}
|
291
252
|
|
253
|
+
bool dtls1_process_handshake_fragments(SSL *ssl, uint8_t *out_alert,
|
254
|
+
DTLSRecordNumber record_number,
|
255
|
+
Span<const uint8_t> record) {
|
256
|
+
bool implicit_ack = false;
|
257
|
+
bool skipped_fragments = false;
|
258
|
+
CBS cbs = record;
|
259
|
+
while (CBS_len(&cbs) > 0) {
|
260
|
+
// Read a handshake fragment.
|
261
|
+
struct hm_header_st msg_hdr;
|
262
|
+
CBS body;
|
263
|
+
if (!dtls1_parse_fragment(&cbs, &msg_hdr, &body)) {
|
264
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_BAD_HANDSHAKE_RECORD);
|
265
|
+
*out_alert = SSL_AD_DECODE_ERROR;
|
266
|
+
return false;
|
267
|
+
}
|
268
|
+
|
269
|
+
const size_t frag_off = msg_hdr.frag_off;
|
270
|
+
const size_t frag_len = msg_hdr.frag_len;
|
271
|
+
const size_t msg_len = msg_hdr.msg_len;
|
272
|
+
if (frag_off > msg_len || frag_len > msg_len - frag_off) {
|
273
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_BAD_HANDSHAKE_RECORD);
|
274
|
+
*out_alert = SSL_AD_ILLEGAL_PARAMETER;
|
275
|
+
return false;
|
276
|
+
}
|
277
|
+
|
278
|
+
if (msg_hdr.seq < ssl->d1->handshake_read_seq ||
|
279
|
+
ssl->d1->handshake_read_overflow) {
|
280
|
+
// Ignore fragments from the past. This is a retransmit of data we already
|
281
|
+
// received.
|
282
|
+
//
|
283
|
+
// TODO(crbug.com/42290594): Use this to drive retransmits.
|
284
|
+
continue;
|
285
|
+
}
|
286
|
+
|
287
|
+
if (record_number.epoch() != ssl->d1->read_epoch.epoch ||
|
288
|
+
ssl->d1->next_read_epoch != nullptr) {
|
289
|
+
// New messages can only arrive in the latest epoch. This can fail if the
|
290
|
+
// record came from |prev_read_epoch|, or if it came from |read_epoch| but
|
291
|
+
// |next_read_epoch| exists. (It cannot come from |next_read_epoch|
|
292
|
+
// because |next_read_epoch| becomes |read_epoch| once it receives a
|
293
|
+
// record.)
|
294
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_EXCESS_HANDSHAKE_DATA);
|
295
|
+
*out_alert = SSL_AD_UNEXPECTED_MESSAGE;
|
296
|
+
return false;
|
297
|
+
}
|
298
|
+
|
299
|
+
if (msg_len > ssl_max_handshake_message_len(ssl)) {
|
300
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_EXCESSIVE_MESSAGE_SIZE);
|
301
|
+
*out_alert = SSL_AD_ILLEGAL_PARAMETER;
|
302
|
+
return false;
|
303
|
+
}
|
304
|
+
|
305
|
+
if (SSL_in_init(ssl) && ssl_has_final_version(ssl) &&
|
306
|
+
ssl_protocol_version(ssl) >= TLS1_3_VERSION) {
|
307
|
+
// During the handshake, if we receive any portion of the next flight, the
|
308
|
+
// peer must have received our most recent flight. In DTLS 1.3, this is an
|
309
|
+
// implicit ACK. See RFC 9147, Section 7.1.
|
310
|
+
//
|
311
|
+
// This only applies during the handshake. After the handshake, the next
|
312
|
+
// message may be part of a post-handshake transaction. It also does not
|
313
|
+
// apply immediately after the handshake. As a client, receiving a
|
314
|
+
// KeyUpdate or NewSessionTicket does not imply the server has received
|
315
|
+
// our Finished. The server may have sent those messages in half-RTT.
|
316
|
+
implicit_ack = true;
|
317
|
+
}
|
318
|
+
|
319
|
+
if (msg_hdr.seq - ssl->d1->handshake_read_seq > SSL_MAX_HANDSHAKE_FLIGHT) {
|
320
|
+
// Ignore fragments too far in the future.
|
321
|
+
skipped_fragments = true;
|
322
|
+
continue;
|
323
|
+
}
|
324
|
+
|
325
|
+
DTLSIncomingMessage *frag =
|
326
|
+
dtls1_get_incoming_message(ssl, out_alert, &msg_hdr);
|
327
|
+
if (frag == nullptr) {
|
328
|
+
return false;
|
329
|
+
}
|
330
|
+
assert(frag->msg_len() == msg_len);
|
331
|
+
|
332
|
+
if (frag->reassembly.IsComplete()) {
|
333
|
+
// The message is already assembled.
|
334
|
+
continue;
|
335
|
+
}
|
336
|
+
assert(msg_len > 0);
|
337
|
+
|
338
|
+
// Copy the body into the fragment.
|
339
|
+
Span<uint8_t> dest = frag->msg().subspan(frag_off, CBS_len(&body));
|
340
|
+
OPENSSL_memcpy(dest.data(), CBS_data(&body), CBS_len(&body));
|
341
|
+
frag->reassembly.MarkRange(frag_off, frag_off + frag_len);
|
342
|
+
}
|
343
|
+
|
344
|
+
if (implicit_ack) {
|
345
|
+
dtls1_stop_timer(ssl);
|
346
|
+
dtls_clear_outgoing_messages(ssl);
|
347
|
+
}
|
348
|
+
|
349
|
+
if (!skipped_fragments) {
|
350
|
+
ssl->d1->records_to_ack.PushBack(record_number);
|
351
|
+
|
352
|
+
if (ssl_has_final_version(ssl) &&
|
353
|
+
ssl_protocol_version(ssl) >= TLS1_3_VERSION &&
|
354
|
+
!ssl->d1->ack_timer.IsSet() && !ssl->d1->sending_ack) {
|
355
|
+
// Schedule sending an ACK. The delay serves several purposes:
|
356
|
+
// - If there are more records to come, we send only one ACK.
|
357
|
+
// - If there are more records to come and the flight is now complete, we
|
358
|
+
// will send the reply (which implicitly ACKs the previous flight) and
|
359
|
+
// cancel the timer.
|
360
|
+
// - If there are more records to come, the flight is now complete, but
|
361
|
+
// generating the response is delayed (e.g. a slow, async private key),
|
362
|
+
// the timer will fire and we send an ACK anyway.
|
363
|
+
OPENSSL_timeval now = ssl_ctx_get_current_time(ssl->ctx.get());
|
364
|
+
ssl->d1->ack_timer.StartMicroseconds(
|
365
|
+
now, uint64_t{ssl->d1->timeout_duration_ms} * 1000 / 4);
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
return true;
|
370
|
+
}
|
371
|
+
|
292
372
|
ssl_open_record_t dtls1_open_handshake(SSL *ssl, size_t *out_consumed,
|
293
373
|
uint8_t *out_alert, Span<uint8_t> in) {
|
294
374
|
uint8_t type;
|
375
|
+
DTLSRecordNumber record_number;
|
295
376
|
Span<uint8_t> record;
|
296
|
-
auto ret = dtls_open_record(ssl, &type, &record, out_consumed,
|
377
|
+
auto ret = dtls_open_record(ssl, &type, &record_number, &record, out_consumed,
|
378
|
+
out_alert, in);
|
297
379
|
if (ret != ssl_open_record_success) {
|
298
380
|
return ret;
|
299
381
|
}
|
300
382
|
|
301
383
|
switch (type) {
|
302
384
|
case SSL3_RT_APPLICATION_DATA:
|
303
|
-
//
|
304
|
-
|
305
|
-
OPENSSL_PUT_ERROR(SSL, SSL_R_UNEXPECTED_RECORD);
|
306
|
-
*out_alert = SSL_AD_UNEXPECTED_MESSAGE;
|
307
|
-
return ssl_open_record_error;
|
308
|
-
}
|
309
|
-
|
310
|
-
// Out-of-order application data may be received between ChangeCipherSpec
|
311
|
-
// and finished. Discard it.
|
385
|
+
// In DTLS 1.2, out-of-order application data may be received between
|
386
|
+
// ChangeCipherSpec and Finished. Discard it.
|
312
387
|
return ssl_open_record_discard;
|
313
388
|
|
314
389
|
case SSL3_RT_CHANGE_CIPHER_SPEC:
|
390
|
+
if (record.size() != 1u || record[0] != SSL3_MT_CCS) {
|
391
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_BAD_CHANGE_CIPHER_SPEC);
|
392
|
+
*out_alert = SSL_AD_ILLEGAL_PARAMETER;
|
393
|
+
return ssl_open_record_error;
|
394
|
+
}
|
395
|
+
|
315
396
|
// We do not support renegotiation, so encrypted ChangeCipherSpec records
|
316
397
|
// are illegal.
|
317
|
-
if (
|
398
|
+
if (record_number.epoch() != 0) {
|
318
399
|
OPENSSL_PUT_ERROR(SSL, SSL_R_UNEXPECTED_RECORD);
|
319
400
|
*out_alert = SSL_AD_UNEXPECTED_MESSAGE;
|
320
401
|
return ssl_open_record_error;
|
321
402
|
}
|
322
403
|
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
return ssl_open_record_error;
|
404
|
+
// Ignore ChangeCipherSpec from a previous epoch.
|
405
|
+
if (record_number.epoch() != ssl->d1->read_epoch.epoch) {
|
406
|
+
return ssl_open_record_discard;
|
327
407
|
}
|
328
408
|
|
329
409
|
// Flag the ChangeCipherSpec for later.
|
410
|
+
// TODO(crbug.com/42290594): Should we reject this in DTLS 1.3?
|
330
411
|
ssl->d1->has_change_cipher_spec = true;
|
331
412
|
ssl_do_msg_callback(ssl, 0 /* read */, SSL3_RT_CHANGE_CIPHER_SPEC,
|
332
413
|
record);
|
333
414
|
return ssl_open_record_success;
|
334
415
|
|
416
|
+
case SSL3_RT_ACK:
|
417
|
+
return dtls1_process_ack(ssl, out_alert, record_number, record);
|
418
|
+
|
335
419
|
case SSL3_RT_HANDSHAKE:
|
336
|
-
|
337
|
-
|
420
|
+
if (!dtls1_process_handshake_fragments(ssl, out_alert, record_number,
|
421
|
+
record)) {
|
422
|
+
return ssl_open_record_error;
|
423
|
+
}
|
424
|
+
return ssl_open_record_success;
|
338
425
|
|
339
426
|
default:
|
340
427
|
OPENSSL_PUT_ERROR(SSL, SSL_R_UNEXPECTED_RECORD);
|
341
428
|
*out_alert = SSL_AD_UNEXPECTED_MESSAGE;
|
342
429
|
return ssl_open_record_error;
|
343
430
|
}
|
344
|
-
|
345
|
-
CBS cbs;
|
346
|
-
CBS_init(&cbs, record.data(), record.size());
|
347
|
-
while (CBS_len(&cbs) > 0) {
|
348
|
-
// Read a handshake fragment.
|
349
|
-
struct hm_header_st msg_hdr;
|
350
|
-
CBS body;
|
351
|
-
if (!dtls1_parse_fragment(&cbs, &msg_hdr, &body)) {
|
352
|
-
OPENSSL_PUT_ERROR(SSL, SSL_R_BAD_HANDSHAKE_RECORD);
|
353
|
-
*out_alert = SSL_AD_DECODE_ERROR;
|
354
|
-
return ssl_open_record_error;
|
355
|
-
}
|
356
|
-
|
357
|
-
const size_t frag_off = msg_hdr.frag_off;
|
358
|
-
const size_t frag_len = msg_hdr.frag_len;
|
359
|
-
const size_t msg_len = msg_hdr.msg_len;
|
360
|
-
if (frag_off > msg_len || frag_off + frag_len < frag_off ||
|
361
|
-
frag_off + frag_len > msg_len ||
|
362
|
-
msg_len > ssl_max_handshake_message_len(ssl)) {
|
363
|
-
OPENSSL_PUT_ERROR(SSL, SSL_R_EXCESSIVE_MESSAGE_SIZE);
|
364
|
-
*out_alert = SSL_AD_ILLEGAL_PARAMETER;
|
365
|
-
return ssl_open_record_error;
|
366
|
-
}
|
367
|
-
|
368
|
-
// The encrypted epoch in DTLS has only one handshake message.
|
369
|
-
if (ssl->d1->r_epoch == 1 && msg_hdr.seq != ssl->d1->handshake_read_seq) {
|
370
|
-
OPENSSL_PUT_ERROR(SSL, SSL_R_UNEXPECTED_RECORD);
|
371
|
-
*out_alert = SSL_AD_UNEXPECTED_MESSAGE;
|
372
|
-
return ssl_open_record_error;
|
373
|
-
}
|
374
|
-
|
375
|
-
if (msg_hdr.seq < ssl->d1->handshake_read_seq ||
|
376
|
-
msg_hdr.seq >
|
377
|
-
(unsigned)ssl->d1->handshake_read_seq + SSL_MAX_HANDSHAKE_FLIGHT) {
|
378
|
-
// Ignore fragments from the past, or ones too far in the future.
|
379
|
-
continue;
|
380
|
-
}
|
381
|
-
|
382
|
-
hm_fragment *frag = dtls1_get_incoming_message(ssl, out_alert, &msg_hdr);
|
383
|
-
if (frag == NULL) {
|
384
|
-
return ssl_open_record_error;
|
385
|
-
}
|
386
|
-
assert(frag->msg_len == msg_len);
|
387
|
-
|
388
|
-
if (frag->reassembly == NULL) {
|
389
|
-
// The message is already assembled.
|
390
|
-
continue;
|
391
|
-
}
|
392
|
-
assert(msg_len > 0);
|
393
|
-
|
394
|
-
// Copy the body into the fragment.
|
395
|
-
OPENSSL_memcpy(frag->data + DTLS1_HM_HEADER_LENGTH + frag_off,
|
396
|
-
CBS_data(&body), CBS_len(&body));
|
397
|
-
dtls1_hm_fragment_mark(frag, frag_off, frag_off + frag_len);
|
398
|
-
}
|
399
|
-
|
400
|
-
return ssl_open_record_success;
|
401
431
|
}
|
402
432
|
|
403
433
|
bool dtls1_get_message(const SSL *ssl, SSLMessage *out) {
|
@@ -406,10 +436,10 @@ bool dtls1_get_message(const SSL *ssl, SSLMessage *out) {
|
|
406
436
|
}
|
407
437
|
|
408
438
|
size_t idx = ssl->d1->handshake_read_seq % SSL_MAX_HANDSHAKE_FLIGHT;
|
409
|
-
|
439
|
+
const DTLSIncomingMessage *frag = ssl->d1->incoming_messages[idx].get();
|
410
440
|
out->type = frag->type;
|
411
|
-
|
412
|
-
|
441
|
+
out->raw = CBS(frag->data);
|
442
|
+
out->body = CBS(frag->msg());
|
413
443
|
out->is_v2_hello = false;
|
414
444
|
if (!ssl->s3->has_message) {
|
415
445
|
ssl_do_msg_callback(ssl, 0 /* read */, SSL3_RT_HANDSHAKE, out->raw);
|
@@ -424,6 +454,9 @@ void dtls1_next_message(SSL *ssl) {
|
|
424
454
|
size_t index = ssl->d1->handshake_read_seq % SSL_MAX_HANDSHAKE_FLIGHT;
|
425
455
|
ssl->d1->incoming_messages[index].reset();
|
426
456
|
ssl->d1->handshake_read_seq++;
|
457
|
+
if (ssl->d1->handshake_read_seq == 0) {
|
458
|
+
ssl->d1->handshake_read_overflow = true;
|
459
|
+
}
|
427
460
|
ssl->s3->has_message = false;
|
428
461
|
// If we previously sent a flight, mark it as having a reply, so
|
429
462
|
// |on_handshake_complete| can manage post-handshake retransmission.
|
@@ -483,26 +516,41 @@ ssl_open_record_t dtls1_open_change_cipher_spec(SSL *ssl, size_t *out_consumed,
|
|
483
516
|
|
484
517
|
// Sending handshake messages.
|
485
518
|
|
486
|
-
void DTLS_OUTGOING_MESSAGE::Clear() { data.Reset(); }
|
487
|
-
|
488
519
|
void dtls_clear_outgoing_messages(SSL *ssl) {
|
489
|
-
|
490
|
-
|
491
|
-
}
|
492
|
-
ssl->d1->outgoing_messages_len = 0;
|
520
|
+
ssl->d1->outgoing_messages.clear();
|
521
|
+
ssl->d1->sent_records = nullptr;
|
493
522
|
ssl->d1->outgoing_written = 0;
|
494
523
|
ssl->d1->outgoing_offset = 0;
|
495
524
|
ssl->d1->outgoing_messages_complete = false;
|
496
525
|
ssl->d1->flight_has_reply = false;
|
526
|
+
ssl->d1->sending_flight = false;
|
527
|
+
dtls_clear_unused_write_epochs(ssl);
|
528
|
+
}
|
529
|
+
|
530
|
+
void dtls_clear_unused_write_epochs(SSL *ssl) {
|
531
|
+
ssl->d1->extra_write_epochs.EraseIf(
|
532
|
+
[ssl](const UniquePtr<DTLSWriteEpoch> &write_epoch) -> bool {
|
533
|
+
// Non-current epochs may be discarded once there are no incomplete
|
534
|
+
// outgoing messages that reference them.
|
535
|
+
//
|
536
|
+
// TODO(crbug.com/42290594): Epoch 1 (0-RTT) should be retained until
|
537
|
+
// epoch 3 (app data) is available.
|
538
|
+
for (const auto &msg : ssl->d1->outgoing_messages) {
|
539
|
+
if (msg.epoch == write_epoch->epoch() && !msg.IsFullyAcked()) {
|
540
|
+
return false;
|
541
|
+
}
|
542
|
+
}
|
543
|
+
return true;
|
544
|
+
});
|
497
545
|
}
|
498
546
|
|
499
547
|
bool dtls1_init_message(const SSL *ssl, CBB *cbb, CBB *body, uint8_t type) {
|
500
548
|
// Pick a modest size hint to save most of the |realloc| calls.
|
501
|
-
if (!CBB_init(cbb, 64) ||
|
502
|
-
!CBB_add_u8(cbb, type) ||
|
503
|
-
!CBB_add_u24(cbb, 0 /* length (filled in later) */) ||
|
504
|
-
!CBB_add_u16(cbb, ssl->d1->handshake_write_seq) ||
|
505
|
-
!CBB_add_u24(cbb, 0 /* offset */) ||
|
549
|
+
if (!CBB_init(cbb, 64) || //
|
550
|
+
!CBB_add_u8(cbb, type) || //
|
551
|
+
!CBB_add_u24(cbb, 0 /* length (filled in later) */) || //
|
552
|
+
!CBB_add_u16(cbb, ssl->d1->handshake_write_seq) || //
|
553
|
+
!CBB_add_u24(cbb, 0 /* offset */) || //
|
506
554
|
!CBB_add_u24_length_prefixed(cbb, body)) {
|
507
555
|
return false;
|
508
556
|
}
|
@@ -524,20 +572,6 @@ bool dtls1_finish_message(const SSL *ssl, CBB *cbb, Array<uint8_t> *out_msg) {
|
|
524
572
|
return true;
|
525
573
|
}
|
526
574
|
|
527
|
-
// ssl_size_t_greater_than_32_bits returns whether |v| exceeds the bounds of a
|
528
|
-
// 32-bit value. The obvious thing doesn't work because, in some 32-bit build
|
529
|
-
// configurations, the compiler warns that the test is always false and breaks
|
530
|
-
// the build.
|
531
|
-
static bool ssl_size_t_greater_than_32_bits(size_t v) {
|
532
|
-
#if defined(OPENSSL_64_BIT)
|
533
|
-
return v > 0xffffffff;
|
534
|
-
#elif defined(OPENSSL_32_BIT)
|
535
|
-
return false;
|
536
|
-
#else
|
537
|
-
#error "Building for neither 32- nor 64-bits."
|
538
|
-
#endif
|
539
|
-
}
|
540
|
-
|
541
575
|
// add_outgoing adds a new handshake message or ChangeCipherSpec to the current
|
542
576
|
// outgoing flight. It returns true on success and false on error.
|
543
577
|
static bool add_outgoing(SSL *ssl, bool is_ccs, Array<uint8_t> data) {
|
@@ -548,34 +582,46 @@ static bool add_outgoing(SSL *ssl, bool is_ccs, Array<uint8_t> data) {
|
|
548
582
|
dtls_clear_outgoing_messages(ssl);
|
549
583
|
}
|
550
584
|
|
551
|
-
static_assert(SSL_MAX_HANDSHAKE_FLIGHT <
|
552
|
-
(1 << 8 * sizeof(ssl->d1->outgoing_messages_len)),
|
553
|
-
"outgoing_messages_len is too small");
|
554
|
-
if (ssl->d1->outgoing_messages_len >= SSL_MAX_HANDSHAKE_FLIGHT ||
|
555
|
-
ssl_size_t_greater_than_32_bits(data.size())) {
|
556
|
-
assert(false);
|
557
|
-
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
|
558
|
-
return false;
|
559
|
-
}
|
560
|
-
|
561
585
|
if (!is_ccs) {
|
586
|
+
if (ssl->d1->handshake_write_overflow) {
|
587
|
+
OPENSSL_PUT_ERROR(SSL, ERR_R_OVERFLOW);
|
588
|
+
return false;
|
589
|
+
}
|
562
590
|
// TODO(svaldez): Move this up a layer to fix abstraction for SSLTranscript
|
563
591
|
// on hs.
|
564
|
-
if (ssl->s3->hs != NULL &&
|
565
|
-
!ssl->s3->hs->transcript.Update(data)) {
|
592
|
+
if (ssl->s3->hs != NULL && !ssl->s3->hs->transcript.Update(data)) {
|
566
593
|
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
|
567
594
|
return false;
|
568
595
|
}
|
569
596
|
ssl->d1->handshake_write_seq++;
|
597
|
+
if (ssl->d1->handshake_write_seq == 0) {
|
598
|
+
ssl->d1->handshake_write_overflow = true;
|
599
|
+
}
|
570
600
|
}
|
571
601
|
|
572
|
-
|
573
|
-
|
574
|
-
msg
|
575
|
-
msg
|
576
|
-
|
602
|
+
DTLSOutgoingMessage msg;
|
603
|
+
msg.data = std::move(data);
|
604
|
+
msg.epoch = ssl->d1->write_epoch.epoch();
|
605
|
+
msg.is_ccs = is_ccs;
|
606
|
+
// Zero-length messages need 1 bit to track whether the peer has received the
|
607
|
+
// message header. (Normally the message header is implicitly received when
|
608
|
+
// any fragment of the message is received at all.)
|
609
|
+
if (!is_ccs && !msg.acked.Init(std::max(msg.msg_len(), size_t{1}))) {
|
610
|
+
return false;
|
611
|
+
}
|
612
|
+
|
613
|
+
// This should not fail if |SSL_MAX_HANDSHAKE_FLIGHT| was sized correctly.
|
614
|
+
//
|
615
|
+
// TODO(crbug.com/42290594): This can currently fail in DTLS 1.3. The caller
|
616
|
+
// can configure how many tickets to send, up to kMaxTickets. Additionally, if
|
617
|
+
// we send 0.5-RTT tickets in 0-RTT, we may even have tickets queued up with
|
618
|
+
// the server flight.
|
619
|
+
if (!ssl->d1->outgoing_messages.TryPushBack(std::move(msg))) {
|
620
|
+
assert(false);
|
621
|
+
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
|
622
|
+
return false;
|
623
|
+
}
|
577
624
|
|
578
|
-
ssl->d1->outgoing_messages_len++;
|
579
625
|
return true;
|
580
626
|
}
|
581
627
|
|
@@ -615,139 +661,207 @@ static void dtls1_update_mtu(SSL *ssl) {
|
|
615
661
|
|
616
662
|
enum seal_result_t {
|
617
663
|
seal_error,
|
618
|
-
|
619
|
-
|
620
|
-
seal_success,
|
664
|
+
seal_continue,
|
665
|
+
seal_flush,
|
621
666
|
};
|
622
667
|
|
623
|
-
//
|
624
|
-
//
|
668
|
+
// seal_next_record seals one record's worth of messages to |out| and advances
|
669
|
+
// |ssl|'s internal state past the data that was sealed. If progress was made,
|
670
|
+
// it returns |seal_flush| or |seal_continue| and sets
|
625
671
|
// |*out_len| to the number of bytes written.
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
672
|
+
//
|
673
|
+
// If the function stopped because the next message could not be combined into
|
674
|
+
// this record, it returns |seal_continue| and the caller should loop again.
|
675
|
+
// Otherwise, it returns |seal_flush| and the packet is complete (either because
|
676
|
+
// there are no more messages or the packet is full).
|
677
|
+
static seal_result_t seal_next_record(SSL *ssl, Span<uint8_t> out,
|
678
|
+
size_t *out_len) {
|
679
|
+
*out_len = 0;
|
680
|
+
|
681
|
+
// Skip any fully acked messages.
|
682
|
+
while (ssl->d1->outgoing_written < ssl->d1->outgoing_messages.size() &&
|
683
|
+
ssl->d1->outgoing_messages[ssl->d1->outgoing_written].IsFullyAcked()) {
|
684
|
+
ssl->d1->outgoing_offset = 0;
|
685
|
+
ssl->d1->outgoing_written++;
|
686
|
+
}
|
631
687
|
|
632
|
-
|
633
|
-
|
688
|
+
// There was nothing left to write.
|
689
|
+
if (ssl->d1->outgoing_written >= ssl->d1->outgoing_messages.size()) {
|
690
|
+
return seal_flush;
|
691
|
+
}
|
634
692
|
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
693
|
+
const auto &first_msg = ssl->d1->outgoing_messages[ssl->d1->outgoing_written];
|
694
|
+
size_t prefix_len = dtls_seal_prefix_len(ssl, first_msg.epoch);
|
695
|
+
size_t max_in_len = dtls_seal_max_input_len(ssl, first_msg.epoch, out.size());
|
696
|
+
if (max_in_len == 0) {
|
697
|
+
// There is no room for a single record.
|
698
|
+
return seal_flush;
|
699
|
+
}
|
641
700
|
|
642
|
-
|
701
|
+
if (first_msg.is_ccs) {
|
702
|
+
static const uint8_t kChangeCipherSpec[1] = {SSL3_MT_CCS};
|
703
|
+
DTLSRecordNumber record_number;
|
704
|
+
if (!dtls_seal_record(ssl, &record_number, out.data(), out_len, out.size(),
|
643
705
|
SSL3_RT_CHANGE_CIPHER_SPEC, kChangeCipherSpec,
|
644
|
-
sizeof(kChangeCipherSpec),
|
706
|
+
sizeof(kChangeCipherSpec), first_msg.epoch)) {
|
645
707
|
return seal_error;
|
646
708
|
}
|
647
709
|
|
648
|
-
ssl_do_msg_callback(ssl, 1
|
710
|
+
ssl_do_msg_callback(ssl, /*is_write=*/1, SSL3_RT_CHANGE_CIPHER_SPEC,
|
649
711
|
kChangeCipherSpec);
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
// DTLS messages are serialized as a single fragment in |msg|.
|
654
|
-
CBS cbs, body;
|
655
|
-
struct hm_header_st hdr;
|
656
|
-
CBS_init(&cbs, msg->data.data(), msg->data.size());
|
657
|
-
if (!dtls1_parse_fragment(&cbs, &hdr, &body) ||
|
658
|
-
hdr.frag_off != 0 ||
|
659
|
-
hdr.frag_len != CBS_len(&body) ||
|
660
|
-
hdr.msg_len != CBS_len(&body) ||
|
661
|
-
!CBS_skip(&body, ssl->d1->outgoing_offset) ||
|
662
|
-
CBS_len(&cbs) != 0) {
|
663
|
-
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
|
664
|
-
return seal_error;
|
712
|
+
ssl->d1->outgoing_offset = 0;
|
713
|
+
ssl->d1->outgoing_written++;
|
714
|
+
return seal_continue;
|
665
715
|
}
|
666
716
|
|
667
|
-
//
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
717
|
+
// TODO(crbug.com/374991962): For now, only send one message per record in
|
718
|
+
// epoch 0. Sending multiple is allowed and more efficient, but breaks
|
719
|
+
// b/378742138.
|
720
|
+
const bool allow_multiple_messages = first_msg.epoch != 0;
|
721
|
+
|
722
|
+
// Pack as many handshake fragments into one record as we can. We stage the
|
723
|
+
// fragments in the output buffer, to be sealed in-place.
|
724
|
+
bool should_continue = false;
|
725
|
+
Span<uint8_t> fragments = out.subspan(prefix_len, max_in_len);
|
726
|
+
CBB cbb;
|
727
|
+
CBB_init_fixed(&cbb, fragments.data(), fragments.size());
|
728
|
+
DTLSSentRecord sent_record;
|
729
|
+
sent_record.first_msg = ssl->d1->outgoing_written;
|
730
|
+
sent_record.first_msg_start = ssl->d1->outgoing_offset;
|
731
|
+
while (ssl->d1->outgoing_written < ssl->d1->outgoing_messages.size()) {
|
732
|
+
const auto &msg = ssl->d1->outgoing_messages[ssl->d1->outgoing_written];
|
733
|
+
if (msg.epoch != first_msg.epoch || msg.is_ccs) {
|
734
|
+
// We can only pack messages if the epoch matches. There may be more room
|
735
|
+
// in the packet, so tell the caller to keep going.
|
736
|
+
should_continue = true;
|
737
|
+
break;
|
738
|
+
}
|
675
739
|
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
740
|
+
// Decode |msg|'s header.
|
741
|
+
CBS cbs(msg.data), body_cbs;
|
742
|
+
struct hm_header_st hdr;
|
743
|
+
if (!dtls1_parse_fragment(&cbs, &hdr, &body_cbs) || //
|
744
|
+
hdr.frag_off != 0 || //
|
745
|
+
hdr.frag_len != CBS_len(&body_cbs) || //
|
746
|
+
hdr.msg_len != CBS_len(&body_cbs) || //
|
747
|
+
CBS_len(&cbs) != 0) {
|
748
|
+
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
|
749
|
+
return seal_error;
|
750
|
+
}
|
751
|
+
|
752
|
+
// Iterate over every un-acked range in the message, if any.
|
753
|
+
Span<const uint8_t> body = body_cbs;
|
754
|
+
for (;;) {
|
755
|
+
auto range = msg.acked.NextUnmarkedRange(ssl->d1->outgoing_offset);
|
756
|
+
if (range.empty()) {
|
757
|
+
// Advance to the next message.
|
758
|
+
ssl->d1->outgoing_offset = 0;
|
759
|
+
ssl->d1->outgoing_written++;
|
760
|
+
break;
|
761
|
+
}
|
762
|
+
|
763
|
+
// Determine how much progress can be made (minimum one byte of progress).
|
764
|
+
size_t capacity = fragments.size() - CBB_len(&cbb);
|
765
|
+
if (capacity < DTLS1_HM_HEADER_LENGTH + 1) {
|
766
|
+
goto packet_full;
|
767
|
+
}
|
768
|
+
size_t todo = std::min(range.size(), capacity - DTLS1_HM_HEADER_LENGTH);
|
769
|
+
|
770
|
+
// Empty messages are special-cased in ACK tracking. We act as if they
|
771
|
+
// have one byte, but in reality that byte is tracking the header.
|
772
|
+
Span<const uint8_t> frag;
|
773
|
+
if (!body.empty()) {
|
774
|
+
frag = body.subspan(range.start, todo);
|
775
|
+
}
|
776
|
+
|
777
|
+
// Assemble the fragment.
|
778
|
+
size_t frag_start = CBB_len(&cbb);
|
779
|
+
CBB child;
|
780
|
+
if (!CBB_add_u8(&cbb, hdr.type) || //
|
781
|
+
!CBB_add_u24(&cbb, hdr.msg_len) || //
|
782
|
+
!CBB_add_u16(&cbb, hdr.seq) || //
|
783
|
+
!CBB_add_u24(&cbb, range.start) || //
|
784
|
+
!CBB_add_u24_length_prefixed(&cbb, &child) || //
|
785
|
+
!CBB_add_bytes(&child, frag.data(), frag.size()) || //
|
786
|
+
!CBB_flush(&cbb)) {
|
787
|
+
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
|
788
|
+
return seal_error;
|
789
|
+
}
|
790
|
+
size_t frag_end = CBB_len(&cbb);
|
791
|
+
|
792
|
+
// TODO(davidben): It is odd that, on output, we inform the caller of
|
793
|
+
// retransmits and individual fragments, but on input we only inform the
|
794
|
+
// caller of complete messages.
|
795
|
+
ssl_do_msg_callback(ssl, /*is_write=*/1, SSL3_RT_HANDSHAKE,
|
796
|
+
fragments.subspan(frag_start, frag_end - frag_start));
|
797
|
+
|
798
|
+
ssl->d1->outgoing_offset = range.start + todo;
|
799
|
+
if (todo < range.size()) {
|
800
|
+
// The packet was the limiting factor.
|
801
|
+
goto packet_full;
|
802
|
+
}
|
803
|
+
}
|
804
|
+
|
805
|
+
if (!allow_multiple_messages) {
|
806
|
+
should_continue = true;
|
807
|
+
break;
|
808
|
+
}
|
691
809
|
}
|
692
810
|
|
693
|
-
|
694
|
-
|
811
|
+
packet_full:
|
812
|
+
sent_record.last_msg = ssl->d1->outgoing_written;
|
813
|
+
sent_record.last_msg_end = ssl->d1->outgoing_offset;
|
695
814
|
|
696
|
-
|
697
|
-
|
815
|
+
// We could not fit anything. Don't try to make a record.
|
816
|
+
if (CBB_len(&cbb) == 0) {
|
817
|
+
assert(!should_continue);
|
818
|
+
return seal_flush;
|
819
|
+
}
|
820
|
+
|
821
|
+
if (!dtls_seal_record(ssl, &sent_record.number, out.data(), out_len,
|
822
|
+
out.size(), SSL3_RT_HANDSHAKE, CBB_data(&cbb),
|
823
|
+
CBB_len(&cbb), first_msg.epoch)) {
|
698
824
|
return seal_error;
|
699
825
|
}
|
700
826
|
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
827
|
+
// If DTLS 1.3 (or if the version is not yet known and it may be DTLS 1.3),
|
828
|
+
// save the record number to match against ACKs later.
|
829
|
+
if (ssl->s3->version == 0 || ssl_protocol_version(ssl) >= TLS1_3_VERSION) {
|
830
|
+
if (ssl->d1->sent_records == nullptr) {
|
831
|
+
ssl->d1->sent_records =
|
832
|
+
MakeUnique<MRUQueue<DTLSSentRecord, DTLS_MAX_ACK_BUFFER>>();
|
833
|
+
if (ssl->d1->sent_records == nullptr) {
|
834
|
+
return seal_error;
|
835
|
+
}
|
836
|
+
}
|
837
|
+
ssl->d1->sent_records->PushBack(sent_record);
|
705
838
|
}
|
706
839
|
|
707
|
-
|
708
|
-
return seal_partial;
|
840
|
+
return should_continue ? seal_continue : seal_flush;
|
709
841
|
}
|
710
842
|
|
711
843
|
// seal_next_packet writes as much of the next flight as possible to |out| and
|
712
844
|
// advances |ssl->d1->outgoing_written| and |ssl->d1->outgoing_offset| as
|
713
845
|
// appropriate.
|
714
|
-
static bool seal_next_packet(SSL *ssl, uint8_t
|
715
|
-
size_t max_out) {
|
716
|
-
bool made_progress = false;
|
846
|
+
static bool seal_next_packet(SSL *ssl, Span<uint8_t> out, size_t *out_len) {
|
717
847
|
size_t total = 0;
|
718
|
-
|
719
|
-
for (; ssl->d1->outgoing_written < ssl->d1->outgoing_messages_len;
|
720
|
-
ssl->d1->outgoing_written++) {
|
721
|
-
const DTLS_OUTGOING_MESSAGE *msg =
|
722
|
-
&ssl->d1->outgoing_messages[ssl->d1->outgoing_written];
|
848
|
+
for (;;) {
|
723
849
|
size_t len;
|
724
|
-
|
850
|
+
seal_result_t ret = seal_next_record(ssl, out, &len);
|
725
851
|
switch (ret) {
|
726
852
|
case seal_error:
|
727
853
|
return false;
|
728
854
|
|
729
|
-
case
|
730
|
-
|
731
|
-
|
732
|
-
case seal_partial:
|
733
|
-
case seal_success:
|
734
|
-
out += len;
|
735
|
-
max_out -= len;
|
855
|
+
case seal_flush:
|
856
|
+
case seal_continue:
|
857
|
+
out = out.subspan(len);
|
736
858
|
total += len;
|
737
|
-
made_progress = true;
|
738
|
-
|
739
|
-
if (ret == seal_partial) {
|
740
|
-
goto packet_full;
|
741
|
-
}
|
742
859
|
break;
|
743
860
|
}
|
744
|
-
}
|
745
861
|
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
OPENSSL_PUT_ERROR(SSL, SSL_R_MTU_TOO_SMALL);
|
750
|
-
return false;
|
862
|
+
if (ret == seal_flush) {
|
863
|
+
break;
|
864
|
+
}
|
751
865
|
}
|
752
866
|
|
753
867
|
*out_len = total;
|
@@ -765,29 +879,44 @@ static int send_flight(SSL *ssl) {
|
|
765
879
|
return -1;
|
766
880
|
}
|
767
881
|
|
882
|
+
if (ssl->d1->num_timeouts > DTLS1_MAX_TIMEOUTS) {
|
883
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_READ_TIMEOUT_EXPIRED);
|
884
|
+
return -1;
|
885
|
+
}
|
886
|
+
|
768
887
|
dtls1_update_mtu(ssl);
|
769
888
|
|
770
889
|
Array<uint8_t> packet;
|
771
|
-
if (!packet.
|
890
|
+
if (!packet.InitForOverwrite(ssl->d1->mtu)) {
|
772
891
|
return -1;
|
773
892
|
}
|
774
893
|
|
775
|
-
while (ssl->d1->outgoing_written < ssl->d1->
|
894
|
+
while (ssl->d1->outgoing_written < ssl->d1->outgoing_messages.size()) {
|
776
895
|
uint8_t old_written = ssl->d1->outgoing_written;
|
777
896
|
uint32_t old_offset = ssl->d1->outgoing_offset;
|
778
897
|
|
779
898
|
size_t packet_len;
|
780
|
-
if (!seal_next_packet(ssl, packet
|
899
|
+
if (!seal_next_packet(ssl, Span(packet), &packet_len)) {
|
781
900
|
return -1;
|
782
901
|
}
|
783
902
|
|
784
|
-
|
785
|
-
|
786
|
-
//
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
903
|
+
if (packet_len == 0 &&
|
904
|
+
ssl->d1->outgoing_written < ssl->d1->outgoing_messages.size()) {
|
905
|
+
// We made no progress with the packet size available, but did not reach
|
906
|
+
// the end.
|
907
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_MTU_TOO_SMALL);
|
908
|
+
return false;
|
909
|
+
}
|
910
|
+
|
911
|
+
if (packet_len != 0) {
|
912
|
+
int bio_ret = BIO_write(ssl->wbio.get(), packet.data(), packet_len);
|
913
|
+
if (bio_ret <= 0) {
|
914
|
+
// Retry this packet the next time around.
|
915
|
+
ssl->d1->outgoing_written = old_written;
|
916
|
+
ssl->d1->outgoing_offset = old_offset;
|
917
|
+
ssl->s3->rwstate = SSL_ERROR_WANT_WRITE;
|
918
|
+
return bio_ret;
|
919
|
+
}
|
791
920
|
}
|
792
921
|
}
|
793
922
|
|
@@ -799,26 +928,143 @@ static int send_flight(SSL *ssl) {
|
|
799
928
|
return 1;
|
800
929
|
}
|
801
930
|
|
802
|
-
|
931
|
+
void dtls1_finish_flight(SSL *ssl) {
|
932
|
+
if (ssl->d1->outgoing_messages.empty() ||
|
933
|
+
ssl->d1->outgoing_messages_complete) {
|
934
|
+
return; // Nothing to do.
|
935
|
+
}
|
936
|
+
|
937
|
+
if (ssl->d1->outgoing_messages[0].epoch <= 2) {
|
938
|
+
// DTLS 1.3 handshake messages (epoch 2 and below) implicitly ACK the
|
939
|
+
// previous flight, so there is no need to ACK previous records. This
|
940
|
+
// clears the ACK buffer slightly earlier than the specification suggests.
|
941
|
+
// See the discussion in
|
942
|
+
// https://mailarchive.ietf.org/arch/msg/tls/kjJnquJOVaWxu5hUCmNzB35eqY0/
|
943
|
+
ssl->d1->records_to_ack.Clear();
|
944
|
+
ssl->d1->ack_timer.Stop();
|
945
|
+
ssl->d1->sending_ack = false;
|
946
|
+
}
|
947
|
+
|
803
948
|
ssl->d1->outgoing_messages_complete = true;
|
804
|
-
|
805
|
-
|
806
|
-
|
949
|
+
ssl->d1->sending_flight = true;
|
950
|
+
// Stop retransmitting the previous flight. In DTLS 1.3, we'll have stopped
|
951
|
+
// the timer already, but DTLS 1.2 keeps it running until the next flight is
|
952
|
+
// ready.
|
953
|
+
dtls1_stop_timer(ssl);
|
807
954
|
}
|
808
955
|
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
ssl
|
956
|
+
void dtls1_schedule_ack(SSL *ssl) {
|
957
|
+
ssl->d1->ack_timer.Stop();
|
958
|
+
ssl->d1->sending_ack = !ssl->d1->records_to_ack.empty();
|
959
|
+
}
|
960
|
+
|
961
|
+
static int send_ack(SSL *ssl) {
|
962
|
+
assert(ssl_protocol_version(ssl) >= TLS1_3_VERSION);
|
963
|
+
|
964
|
+
// Ensure we don't send so many ACKs that we overflow the MTU. There is a
|
965
|
+
// 2-byte length prefix and each ACK is 16 bytes.
|
966
|
+
dtls1_update_mtu(ssl);
|
967
|
+
size_t max_plaintext =
|
968
|
+
dtls_seal_max_input_len(ssl, ssl->d1->write_epoch.epoch(), ssl->d1->mtu);
|
969
|
+
if (max_plaintext < 2 + 16) {
|
970
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_MTU_TOO_SMALL); // No room for even one ACK.
|
971
|
+
return -1;
|
972
|
+
}
|
973
|
+
size_t num_acks =
|
974
|
+
std::min((max_plaintext - 2) / 16, ssl->d1->records_to_ack.size());
|
975
|
+
|
976
|
+
// Assemble the ACK. RFC 9147 says to sort ACKs numerically. It is unclear if
|
977
|
+
// other implementations do this, but go ahead and sort for now. See
|
978
|
+
// https://mailarchive.ietf.org/arch/msg/tls/kjJnquJOVaWxu5hUCmNzB35eqY0/.
|
979
|
+
// Remove this if rfc9147bis removes this requirement.
|
980
|
+
InplaceVector<DTLSRecordNumber, DTLS_MAX_ACK_BUFFER> sorted;
|
981
|
+
for (size_t i = ssl->d1->records_to_ack.size() - num_acks;
|
982
|
+
i < ssl->d1->records_to_ack.size(); i++) {
|
983
|
+
sorted.PushBack(ssl->d1->records_to_ack[i]);
|
984
|
+
}
|
985
|
+
std::sort(sorted.begin(), sorted.end());
|
986
|
+
|
987
|
+
uint8_t buf[2 + 16 * DTLS_MAX_ACK_BUFFER];
|
988
|
+
CBB cbb, child;
|
989
|
+
CBB_init_fixed(&cbb, buf, sizeof(buf));
|
990
|
+
BSSL_CHECK(CBB_add_u16_length_prefixed(&cbb, &child));
|
991
|
+
for (const auto &number : sorted) {
|
992
|
+
BSSL_CHECK(CBB_add_u64(&child, number.epoch()));
|
993
|
+
BSSL_CHECK(CBB_add_u64(&child, number.sequence()));
|
994
|
+
}
|
995
|
+
BSSL_CHECK(CBB_flush(&cbb));
|
996
|
+
|
997
|
+
// Encrypt it.
|
998
|
+
uint8_t record[DTLS1_3_RECORD_HEADER_WRITE_LENGTH + sizeof(buf) +
|
999
|
+
1 /* record type */ + EVP_AEAD_MAX_OVERHEAD];
|
1000
|
+
size_t record_len;
|
1001
|
+
DTLSRecordNumber record_number;
|
1002
|
+
if (!dtls_seal_record(ssl, &record_number, record, &record_len,
|
1003
|
+
sizeof(record), SSL3_RT_ACK, CBB_data(&cbb),
|
1004
|
+
CBB_len(&cbb), ssl->d1->write_epoch.epoch())) {
|
1005
|
+
return -1;
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
ssl_do_msg_callback(ssl, /*is_write=*/1, SSL3_RT_ACK,
|
1009
|
+
Span(CBB_data(&cbb), CBB_len(&cbb)));
|
1010
|
+
|
1011
|
+
int bio_ret =
|
1012
|
+
BIO_write(ssl->wbio.get(), record, static_cast<int>(record_len));
|
1013
|
+
if (bio_ret <= 0) {
|
1014
|
+
ssl->s3->rwstate = SSL_ERROR_WANT_WRITE;
|
1015
|
+
return bio_ret;
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
if (BIO_flush(ssl->wbio.get()) <= 0) {
|
1019
|
+
ssl->s3->rwstate = SSL_ERROR_WANT_WRITE;
|
1020
|
+
return -1;
|
1021
|
+
}
|
816
1022
|
|
817
|
-
return
|
1023
|
+
return 1;
|
818
1024
|
}
|
819
1025
|
|
820
|
-
|
821
|
-
|
1026
|
+
int dtls1_flush(SSL *ssl) {
|
1027
|
+
// Send the pending ACK, if any.
|
1028
|
+
if (ssl->d1->sending_ack) {
|
1029
|
+
int ret = send_ack(ssl);
|
1030
|
+
if (ret <= 0) {
|
1031
|
+
return ret;
|
1032
|
+
}
|
1033
|
+
ssl->d1->sending_ack = false;
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
// Send the pending flight, if any.
|
1037
|
+
if (ssl->d1->sending_flight) {
|
1038
|
+
int ret = send_flight(ssl);
|
1039
|
+
if (ret <= 0) {
|
1040
|
+
return ret;
|
1041
|
+
}
|
1042
|
+
|
1043
|
+
// Reset state for the next send.
|
1044
|
+
ssl->d1->outgoing_written = 0;
|
1045
|
+
ssl->d1->outgoing_offset = 0;
|
1046
|
+
ssl->d1->sending_flight = false;
|
1047
|
+
|
1048
|
+
// Schedule the next retransmit timer. In DTLS 1.3, we retransmit all
|
1049
|
+
// flights until ACKed. In DTLS 1.2, the final Finished flight is never
|
1050
|
+
// ACKed, so we do not keep the timer running after the handshake.
|
1051
|
+
if (SSL_in_init(ssl) || ssl_protocol_version(ssl) >= TLS1_3_VERSION) {
|
1052
|
+
if (ssl->d1->num_timeouts == 0) {
|
1053
|
+
ssl->d1->timeout_duration_ms = ssl->initial_timeout_duration_ms;
|
1054
|
+
} else {
|
1055
|
+
ssl->d1->timeout_duration_ms =
|
1056
|
+
std::min(ssl->d1->timeout_duration_ms * 2, uint32_t{60000});
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
OPENSSL_timeval now = ssl_ctx_get_current_time(ssl->ctx.get());
|
1060
|
+
ssl->d1->retransmit_timer.StartMicroseconds(
|
1061
|
+
now, uint64_t{ssl->d1->timeout_duration_ms} * 1000);
|
1062
|
+
}
|
1063
|
+
}
|
1064
|
+
|
1065
|
+
return 1;
|
822
1066
|
}
|
823
1067
|
|
1068
|
+
unsigned int dtls1_min_mtu(void) { return kMinMTU; }
|
1069
|
+
|
824
1070
|
BSSL_NAMESPACE_END
|