grpc 1.28.0 → 1.37.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +1734 -22357
- data/etc/roots.pem +257 -573
- data/include/grpc/compression.h +1 -1
- data/include/grpc/grpc.h +31 -9
- data/include/grpc/grpc_security.h +274 -180
- data/include/grpc/grpc_security_constants.h +4 -0
- data/include/grpc/impl/codegen/README.md +22 -0
- data/include/grpc/impl/codegen/atm_windows.h +4 -0
- data/include/grpc/impl/codegen/byte_buffer.h +1 -1
- data/include/grpc/impl/codegen/grpc_types.h +32 -30
- data/include/grpc/impl/codegen/log.h +0 -2
- data/include/grpc/impl/codegen/port_platform.h +36 -90
- data/include/grpc/impl/codegen/sync_windows.h +4 -0
- data/include/grpc/module.modulemap +24 -39
- data/include/grpc/slice_buffer.h +3 -3
- data/include/grpc/support/sync.h +3 -3
- data/include/grpc/support/time.h +7 -7
- data/src/core/ext/filters/client_channel/backend_metric.cc +16 -12
- data/src/core/ext/filters/client_channel/backup_poller.cc +3 -2
- data/src/core/ext/filters/client_channel/client_channel.cc +3845 -2414
- data/src/core/ext/filters/client_channel/client_channel.h +1 -7
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +0 -3
- data/src/core/ext/filters/client_channel/client_channel_factory.h +2 -1
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +4 -3
- data/src/core/ext/filters/client_channel/config_selector.cc +58 -0
- data/src/core/ext/filters/client_channel/config_selector.h +133 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.cc +191 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.h +99 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +26 -122
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +15 -10
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +25 -30
- data/src/core/ext/filters/client_channel/health/health_check_client.h +7 -7
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +15 -16
- data/src/core/ext/filters/client_channel/http_proxy.cc +44 -34
- data/src/core/ext/filters/client_channel/lb_policy.cc +28 -20
- data/src/core/ext/filters/client_channel/lb_policy.h +50 -38
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +96 -0
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +101 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +20 -11
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +481 -510
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +76 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +37 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +1 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +6 -41
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +3 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +3 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +24 -18
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +922 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +23 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +27 -0
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +11 -10
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +18 -46
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +744 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +520 -134
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +53 -26
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +29 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +795 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +722 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +1384 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +18 -8
- data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +27 -67
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +12 -10
- data/src/core/ext/filters/client_channel/resolver.cc +9 -10
- data/src/core/ext/filters/client_channel/resolver.h +10 -20
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +111 -110
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +4 -34
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +22 -24
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +15 -13
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +82 -123
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +642 -184
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +10 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +61 -61
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +102 -108
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +1 -5
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +377 -0
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +38 -31
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +829 -46
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +28 -0
- data/src/core/ext/filters/client_channel/resolver_factory.h +8 -8
- data/src/core/ext/filters/client_channel/resolver_registry.cc +55 -52
- data/src/core/ext/filters/client_channel/resolver_registry.h +10 -10
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +47 -93
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +30 -26
- data/src/core/ext/filters/client_channel/retry_throttle.cc +5 -3
- data/src/core/ext/filters/client_channel/retry_throttle.h +4 -2
- data/src/core/ext/filters/client_channel/server_address.cc +132 -13
- data/src/core/ext/filters/client_channel/server_address.h +80 -32
- data/src/core/ext/filters/client_channel/service_config.cc +114 -149
- data/src/core/ext/filters/client_channel/service_config.h +33 -100
- data/src/core/ext/filters/client_channel/service_config_call_data.h +86 -0
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +142 -0
- data/src/core/ext/filters/client_channel/service_config_parser.cc +89 -0
- data/src/core/ext/filters/client_channel/service_config_parser.h +92 -0
- data/src/core/ext/filters/client_channel/subchannel.cc +211 -230
- data/src/core/ext/filters/client_channel/subchannel.h +116 -118
- data/src/core/ext/filters/client_channel/subchannel_interface.h +41 -5
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.cc +16 -2
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +16 -10
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +1 -1
- data/src/core/ext/filters/deadline/deadline_filter.cc +87 -79
- data/src/core/ext/filters/deadline/deadline_filter.h +7 -11
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +495 -0
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +39 -0
- data/src/core/ext/filters/fault_injection/service_config_parser.cc +189 -0
- data/src/core/ext/filters/fault_injection/service_config_parser.h +85 -0
- data/src/core/ext/filters/http/client/http_client_filter.cc +29 -34
- data/src/core/ext/filters/http/client_authority_filter.cc +10 -10
- data/src/core/ext/filters/http/http_filters_plugin.cc +34 -15
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +258 -221
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +399 -0
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.h +31 -0
- data/src/core/ext/filters/http/server/http_server_filter.cc +3 -3
- data/src/core/ext/filters/max_age/max_age_filter.cc +38 -34
- data/src/core/ext/filters/message_size/message_size_filter.cc +64 -90
- data/src/core/ext/filters/message_size/message_size_filter.h +12 -5
- data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +1 -1
- data/src/core/ext/filters/workarounds/workaround_utils.cc +1 -1
- data/src/core/ext/transport/chttp2/client/authority.cc +3 -3
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +87 -31
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +19 -2
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +23 -10
- data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +21 -10
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +37 -49
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +803 -355
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +16 -2
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +13 -3
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +19 -18
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +65 -21
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +7 -7
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +4 -6
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +343 -347
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +13 -1
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +36 -33
- data/src/core/ext/transport/chttp2/transport/flow_control.h +27 -19
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +14 -13
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +6 -7
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +2 -3
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +5 -6
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +2 -3
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +12 -13
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +2 -3
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +8 -9
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +4 -4
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +15 -18
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +2 -3
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +30 -17
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +2 -3
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +37 -37
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +2 -3
- data/src/core/ext/transport/chttp2/transport/hpack_table.cc +13 -17
- data/src/core/ext/transport/chttp2/transport/hpack_table.h +2 -2
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +4 -5
- data/src/core/ext/transport/chttp2/transport/huffsyms.h +2 -3
- data/src/core/ext/transport/chttp2/transport/internal.h +38 -23
- data/src/core/ext/transport/chttp2/transport/parsing.cc +52 -74
- data/src/core/ext/transport/chttp2/transport/stream_map.h +2 -3
- data/src/core/ext/transport/chttp2/transport/writing.cc +30 -28
- data/src/core/ext/transport/inproc/inproc_transport.cc +106 -33
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c +406 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h +1459 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +1 -1
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +1 -1
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +10 -4
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +243 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +865 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +350 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +1348 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +74 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +253 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +453 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +1801 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +77 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +56 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +364 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +124 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +428 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +88 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +334 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +1066 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +103 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +388 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +78 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +149 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +241 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +839 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +170 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +767 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +88 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +182 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +755 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +65 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +95 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +126 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +243 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +305 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +367 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +33 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +73 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +130 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +557 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +159 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +623 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +40 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +107 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c +144 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h +488 -0
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c +141 -0
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h +452 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +178 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +662 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +65 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +237 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +941 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +3790 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +159 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +49 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +122 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c +29 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +67 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c +79 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h +268 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +78 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +281 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +41 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +113 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +362 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1488 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +19 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +35 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +113 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +458 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +73 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +219 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +146 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +621 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/rds.upb.c → service/cluster/v3/cds.upb.c} +7 -9
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c +25 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +146 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +499 -0
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +151 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/srds.upb.c → service/route/v3/rds.upb.c} +7 -7
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/cds.upb.c → service/route/v3/srds.upb.c} +7 -7
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +93 -0
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +323 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +128 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h +90 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +84 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +78 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +64 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +166 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +146 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h +124 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +207 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +301 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +283 -0
- data/src/core/ext/upb-generated/envoy/type/{http.upb.c → v3/http.upb.c} +3 -2
- data/src/core/ext/upb-generated/envoy/type/{http.upb.h → v3/http.upb.h} +9 -9
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +40 -0
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +99 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +51 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +130 -0
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c +30 -0
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +68 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +1 -1
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +242 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +830 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +251 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +871 -0
- data/src/core/ext/upb-generated/google/api/http.upb.c +3 -3
- data/src/core/ext/upb-generated/google/api/http.upb.h +52 -32
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +12 -6
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +107 -106
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +691 -496
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +12 -6
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +8 -2
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +5 -5
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +55 -57
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +12 -6
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +9 -9
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +82 -28
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +1 -1
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +17 -10
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +5 -5
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +40 -45
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +43 -43
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +236 -184
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +5 -5
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +29 -13
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +2 -2
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +19 -7
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +17 -17
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +122 -62
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +3 -3
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +30 -12
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +31 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +64 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +1 -1
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +28 -0
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +71 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +27 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +60 -0
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +9 -9
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +48 -68
- data/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c +33 -0
- data/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.h +77 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +71 -70
- data/src/core/ext/upb-generated/validate/validate.upb.h +732 -586
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.c +28 -0
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.h +60 -0
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c +52 -0
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h +143 -0
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c +42 -0
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h +84 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.c +36 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.h +94 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c +54 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h +166 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c +36 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h +85 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c +354 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h +140 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +38 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +41 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +251 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +105 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +383 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +115 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +543 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +145 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +136 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +127 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +272 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +135 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +143 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +66 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +263 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +233 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +231 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +85 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +68 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +107 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +113 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +146 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +195 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +193 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c +141 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c +141 -0
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +101 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +944 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +290 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +71 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c +102 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +120 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +76 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +505 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +115 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +44 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +170 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +97 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +246 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +142 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c +73 -0
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +80 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c +80 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c +74 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c +130 -0
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +64 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +73 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +69 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c +63 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +81 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +92 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +95 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +34 -0
- data/src/core/ext/{upb-generated/gogoproto/gogo.upb.h → upbdefs-generated/envoy/type/v3/http.upbdefs.h} +10 -10
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +47 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +39 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +386 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +165 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +37 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +65 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +66 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +42 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +70 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +33 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +49 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c +44 -0
- data/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +310 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +145 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c +42 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c +62 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c +45 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c +49 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c +67 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c +50 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h +35 -0
- data/src/core/ext/xds/certificate_provider_factory.h +61 -0
- data/src/core/ext/xds/certificate_provider_registry.cc +103 -0
- data/src/core/ext/xds/certificate_provider_registry.h +57 -0
- data/src/core/ext/xds/certificate_provider_store.cc +87 -0
- data/src/core/ext/xds/certificate_provider_store.h +112 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +144 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +69 -0
- data/src/core/ext/xds/xds_api.cc +3791 -0
- data/src/core/ext/xds/xds_api.h +671 -0
- data/src/core/ext/xds/xds_bootstrap.cc +555 -0
- data/src/core/ext/xds/xds_bootstrap.h +120 -0
- data/src/core/ext/xds/xds_certificate_provider.cc +405 -0
- data/src/core/ext/xds/xds_certificate_provider.h +151 -0
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_channel_args.h +9 -6
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client.cc +983 -773
- data/src/core/ext/xds/xds_client.h +365 -0
- data/src/core/ext/xds/xds_client_stats.cc +159 -0
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client_stats.h +80 -40
- data/src/core/ext/xds/xds_http_fault_filter.cc +226 -0
- data/src/core/ext/xds/xds_http_fault_filter.h +63 -0
- data/src/core/ext/xds/xds_http_filters.cc +114 -0
- data/src/core/ext/xds/xds_http_filters.h +130 -0
- data/src/core/ext/xds/xds_server_config_fetcher.cc +532 -0
- data/src/core/lib/channel/channel_args.cc +24 -22
- data/src/core/lib/channel/channel_args.h +3 -2
- data/src/core/lib/channel/channel_stack.cc +12 -0
- data/src/core/lib/channel/channel_stack.h +27 -13
- data/src/core/lib/channel/channel_trace.cc +6 -8
- data/src/core/lib/channel/channel_trace.h +1 -1
- data/src/core/lib/channel/channelz.cc +137 -97
- data/src/core/lib/channel/channelz.h +47 -26
- data/src/core/lib/channel/channelz_registry.cc +34 -15
- data/src/core/lib/channel/channelz_registry.h +3 -1
- data/src/core/lib/channel/connected_channel.cc +7 -5
- data/src/core/lib/channel/context.h +1 -1
- data/src/core/lib/channel/handshaker.cc +15 -59
- data/src/core/lib/channel/handshaker.h +7 -22
- data/src/core/lib/channel/handshaker_registry.cc +5 -17
- data/src/core/lib/channel/status_util.cc +14 -5
- data/src/core/lib/channel/status_util.h +5 -0
- data/src/core/lib/compression/compression.cc +8 -4
- data/src/core/lib/compression/compression_args.cc +3 -2
- data/src/core/lib/compression/compression_internal.cc +10 -5
- data/src/core/lib/compression/compression_internal.h +2 -1
- data/src/core/lib/compression/message_compress.cc +5 -1
- data/src/core/lib/compression/stream_compression_identity.cc +1 -3
- data/src/core/lib/debug/stats.cc +21 -27
- data/src/core/lib/debug/stats.h +5 -3
- data/src/core/lib/debug/stats_data.cc +1 -0
- data/src/core/lib/debug/stats_data.h +13 -13
- data/src/core/lib/gpr/alloc.cc +3 -2
- data/src/core/lib/gpr/cpu_iphone.cc +10 -2
- data/src/core/lib/gpr/log.cc +59 -17
- data/src/core/lib/gpr/log_linux.cc +23 -9
- data/src/core/lib/gpr/log_posix.cc +19 -7
- data/src/core/lib/gpr/log_windows.cc +18 -4
- data/src/core/lib/gpr/murmur_hash.cc +1 -1
- data/src/core/lib/gpr/spinlock.h +12 -5
- data/src/core/lib/gpr/string.cc +33 -55
- data/src/core/lib/gpr/string.h +9 -24
- data/src/core/lib/gpr/sync.cc +4 -4
- data/src/core/lib/gpr/sync_abseil.cc +5 -6
- data/src/core/lib/gpr/sync_posix.cc +2 -8
- data/src/core/lib/gpr/sync_windows.cc +2 -2
- data/src/core/lib/gpr/time.cc +16 -12
- data/src/core/lib/gpr/time_posix.cc +1 -1
- data/src/core/lib/gpr/time_precise.cc +5 -2
- data/src/core/lib/gpr/time_precise.h +6 -2
- data/src/core/lib/gpr/tls.h +4 -0
- data/src/core/lib/gpr/tls_msvc.h +2 -0
- data/src/core/lib/gpr/tls_stdcpp.h +48 -0
- data/src/core/lib/gpr/useful.h +5 -4
- data/src/core/lib/gprpp/arena.h +3 -2
- data/src/core/lib/gprpp/atomic.h +9 -9
- data/src/core/lib/gprpp/dual_ref_counted.h +331 -0
- data/src/core/lib/gprpp/examine_stack.cc +43 -0
- data/src/core/lib/gprpp/examine_stack.h +46 -0
- data/src/core/lib/gprpp/fork.cc +3 -3
- data/src/core/lib/gprpp/global_config_env.cc +8 -6
- data/src/core/lib/gprpp/host_port.cc +29 -35
- data/src/core/lib/gprpp/host_port.h +14 -17
- data/src/core/lib/gprpp/manual_constructor.h +1 -1
- data/src/core/lib/gprpp/mpscq.cc +2 -2
- data/src/core/lib/gprpp/orphanable.h +4 -8
- data/src/core/lib/gprpp/ref_counted.h +91 -68
- data/src/core/lib/gprpp/ref_counted_ptr.h +173 -7
- data/src/core/lib/gprpp/stat.h +38 -0
- data/src/core/lib/gprpp/stat_posix.cc +49 -0
- data/src/core/lib/gprpp/stat_windows.cc +48 -0
- data/src/core/lib/gprpp/sync.h +129 -40
- data/src/core/lib/gprpp/thd.h +3 -3
- data/src/core/lib/gprpp/thd_posix.cc +42 -37
- data/src/core/lib/gprpp/thd_windows.cc +3 -1
- data/src/core/lib/gprpp/time_util.cc +77 -0
- data/src/core/lib/gprpp/time_util.h +42 -0
- data/src/core/lib/http/format_request.cc +46 -65
- data/src/core/lib/http/httpcli.cc +16 -14
- data/src/core/lib/http/httpcli.h +4 -6
- data/src/core/lib/http/httpcli_security_connector.cc +13 -13
- data/src/core/lib/http/parser.cc +47 -27
- data/src/core/lib/http/parser.h +2 -3
- data/src/core/lib/iomgr/buffer_list.h +23 -22
- data/src/core/lib/iomgr/call_combiner.cc +8 -5
- data/src/core/lib/iomgr/call_combiner.h +3 -2
- data/src/core/lib/iomgr/cfstream_handle.cc +6 -4
- data/src/core/lib/iomgr/closure.h +2 -3
- data/src/core/lib/iomgr/combiner.cc +2 -1
- data/src/core/lib/iomgr/dualstack_socket_posix.cc +47 -0
- data/src/core/lib/iomgr/endpoint.cc +5 -1
- data/src/core/lib/iomgr/endpoint.h +8 -4
- data/src/core/lib/iomgr/endpoint_cfstream.cc +38 -14
- data/src/core/lib/iomgr/endpoint_pair.h +2 -3
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +10 -10
- data/src/core/lib/iomgr/error.cc +23 -21
- data/src/core/lib/iomgr/error.h +1 -2
- data/src/core/lib/iomgr/error_cfstream.cc +9 -8
- data/src/core/lib/iomgr/error_internal.h +1 -1
- data/src/core/lib/iomgr/ev_apple.cc +359 -0
- data/src/core/lib/iomgr/ev_apple.h +43 -0
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +46 -43
- data/src/core/lib/iomgr/ev_epollex_linux.cc +46 -45
- data/src/core/lib/iomgr/ev_poll_posix.cc +18 -15
- data/src/core/lib/iomgr/ev_posix.cc +5 -6
- data/src/core/lib/iomgr/exec_ctx.cc +7 -3
- data/src/core/lib/iomgr/exec_ctx.h +26 -10
- data/src/core/lib/iomgr/executor.cc +2 -1
- data/src/core/lib/iomgr/executor.h +1 -1
- data/src/core/lib/iomgr/executor/mpmcqueue.h +5 -5
- data/src/core/lib/iomgr/executor/threadpool.h +4 -4
- data/src/core/lib/iomgr/iomgr.cc +1 -1
- data/src/core/lib/iomgr/iomgr_posix.cc +0 -1
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +84 -21
- data/src/core/lib/iomgr/is_epollexclusive_available.cc +14 -0
- data/src/core/lib/iomgr/load_file.h +1 -1
- data/src/core/lib/iomgr/lockfree_event.cc +19 -14
- data/src/core/lib/iomgr/lockfree_event.h +2 -2
- data/src/core/lib/iomgr/parse_address.cc +322 -0
- data/src/core/lib/iomgr/parse_address.h +77 -0
- data/src/core/lib/iomgr/poller/eventmanager_libuv.cc +2 -1
- data/src/core/lib/iomgr/poller/eventmanager_libuv.h +1 -1
- data/src/core/lib/iomgr/pollset_set_custom.cc +11 -11
- data/src/core/lib/{gprpp/optional.h → iomgr/pollset_uv.h} +11 -12
- data/src/core/lib/iomgr/port.h +2 -21
- data/src/core/lib/iomgr/python_util.h +46 -0
- data/src/core/lib/iomgr/resolve_address.cc +4 -4
- data/src/core/lib/iomgr/resolve_address.h +4 -6
- data/src/core/lib/iomgr/resolve_address_custom.cc +42 -57
- data/src/core/lib/iomgr/resolve_address_custom.h +4 -2
- data/src/core/lib/iomgr/resolve_address_posix.cc +11 -16
- data/src/core/lib/iomgr/resolve_address_windows.cc +16 -25
- data/src/core/lib/iomgr/resource_quota.cc +39 -38
- data/src/core/lib/iomgr/sockaddr_utils.cc +161 -44
- data/src/core/lib/iomgr/sockaddr_utils.h +40 -19
- data/src/core/lib/iomgr/socket_factory_posix.cc +3 -2
- data/src/core/lib/iomgr/socket_factory_posix.h +2 -3
- data/src/core/lib/iomgr/socket_mutator.cc +3 -2
- data/src/core/lib/iomgr/socket_mutator.h +2 -3
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +103 -81
- data/src/core/lib/iomgr/socket_utils_posix.h +3 -0
- data/src/core/lib/iomgr/socket_windows.cc +4 -5
- data/src/core/lib/iomgr/tcp_client.cc +3 -3
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +14 -18
- data/src/core/lib/iomgr/tcp_client_custom.cc +13 -15
- data/src/core/lib/iomgr/tcp_client_posix.cc +31 -37
- data/src/core/lib/iomgr/tcp_client_windows.cc +10 -11
- data/src/core/lib/iomgr/tcp_custom.cc +56 -36
- data/src/core/lib/iomgr/tcp_custom.h +1 -1
- data/src/core/lib/iomgr/tcp_posix.cc +48 -29
- data/src/core/lib/iomgr/tcp_server.cc +3 -4
- data/src/core/lib/iomgr/tcp_server.h +7 -5
- data/src/core/lib/iomgr/tcp_server_custom.cc +39 -45
- data/src/core/lib/iomgr/tcp_server_posix.cc +38 -44
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +3 -4
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +7 -8
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +10 -18
- data/src/core/lib/iomgr/tcp_server_windows.cc +16 -16
- data/src/core/lib/iomgr/tcp_uv.cc +5 -4
- data/src/core/lib/iomgr/tcp_windows.cc +26 -10
- data/src/core/lib/iomgr/time_averaged_stats.h +2 -3
- data/src/core/lib/iomgr/timer_custom.cc +5 -5
- data/src/core/lib/iomgr/timer_generic.cc +20 -20
- data/src/core/lib/{gprpp/inlined_vector.h → iomgr/timer_generic.h} +19 -17
- data/src/core/lib/iomgr/timer_heap.h +2 -3
- data/src/core/lib/iomgr/timer_manager.cc +3 -3
- data/src/core/lib/iomgr/udp_server.cc +33 -38
- data/src/core/lib/iomgr/udp_server.h +6 -4
- data/src/core/lib/iomgr/unix_sockets_posix.cc +36 -30
- data/src/core/lib/iomgr/unix_sockets_posix.h +8 -1
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +12 -2
- data/src/core/lib/iomgr/wakeup_fd_nospecial.cc +1 -1
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +2 -2
- data/src/core/lib/json/json.h +15 -4
- data/src/core/lib/json/json_reader.cc +33 -30
- data/src/core/lib/json/json_util.cc +58 -0
- data/src/core/lib/json/json_util.h +204 -0
- data/src/core/lib/json/json_writer.cc +15 -13
- data/src/core/lib/matchers/matchers.cc +339 -0
- data/src/core/lib/matchers/matchers.h +160 -0
- data/src/core/lib/security/context/security_context.cc +4 -3
- data/src/core/lib/security/context/security_context.h +3 -1
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +2 -1
- data/src/core/lib/security/credentials/alts/alts_credentials.h +1 -1
- data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +1 -1
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +12 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.h +6 -3
- data/src/core/lib/security/credentials/credentials.cc +7 -91
- data/src/core/lib/security/credentials/credentials.h +18 -66
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +413 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +80 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +213 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.h +72 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +497 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.h +120 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +135 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.h +48 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +213 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.h +58 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +3 -2
- data/src/core/lib/security/credentials/fake/fake_credentials.h +4 -0
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +8 -6
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +90 -67
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +8 -6
- data/src/core/lib/security/credentials/iam/iam_credentials.h +4 -0
- data/src/core/lib/security/credentials/insecure/insecure_credentials.cc +64 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +4 -4
- data/src/core/lib/security/credentials/jwt/json_token.h +2 -5
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +7 -4
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +13 -0
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +13 -19
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +2 -3
- data/src/core/lib/security/credentials/local/local_credentials.cc +2 -1
- data/src/core/lib/security/credentials/local/local_credentials.h +1 -1
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +109 -97
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +14 -7
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +20 -7
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +2 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +27 -6
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +12 -2
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +346 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +213 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +399 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +138 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +78 -140
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +74 -167
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +18 -13
- data/src/core/lib/security/credentials/tls/tls_credentials.h +3 -3
- data/src/core/lib/security/credentials/tls/tls_utils.cc +91 -0
- data/src/core/lib/security/credentials/tls/tls_utils.h +38 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.cc +244 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.h +69 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +22 -7
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +27 -32
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +121 -0
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +87 -0
- data/src/core/lib/security/security_connector/load_system_roots.h +4 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +3 -2
- data/src/core/lib/security/security_connector/load_system_roots_linux.h +2 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +4 -4
- data/src/core/lib/security/security_connector/security_connector.cc +6 -3
- data/src/core/lib/security/security_connector/security_connector.h +6 -4
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +42 -40
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +8 -5
- data/src/core/lib/security/security_connector/ssl_utils.cc +100 -27
- data/src/core/lib/security/security_connector/ssl_utils.h +37 -31
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +394 -284
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +108 -42
- data/src/core/lib/security/transport/auth_filters.h +0 -5
- data/src/core/lib/security/transport/client_auth_filter.cc +11 -11
- data/src/core/lib/security/transport/secure_endpoint.cc +9 -3
- data/src/core/lib/security/transport/security_handshaker.cc +36 -8
- data/src/core/lib/security/transport/server_auth_filter.cc +2 -1
- data/src/core/lib/security/util/json_util.cc +12 -13
- data/src/core/lib/security/util/json_util.h +1 -0
- data/src/core/lib/slice/slice.cc +45 -5
- data/src/core/lib/slice/slice_buffer.cc +2 -1
- data/src/core/lib/slice/slice_intern.cc +13 -16
- data/src/core/lib/slice/slice_internal.h +17 -2
- data/src/core/lib/slice/slice_utils.h +9 -0
- data/src/core/lib/surface/byte_buffer_reader.cc +2 -47
- data/src/core/lib/surface/call.cc +95 -88
- data/src/core/lib/surface/call.h +2 -1
- data/src/core/lib/surface/call_details.cc +8 -8
- data/src/core/lib/surface/call_log_batch.cc +50 -58
- data/src/core/lib/surface/channel.cc +86 -72
- data/src/core/lib/surface/channel.h +54 -7
- data/src/core/lib/surface/channel_init.cc +1 -1
- data/src/core/lib/surface/channel_ping.cc +2 -3
- data/src/core/lib/surface/completion_queue.cc +64 -63
- data/src/core/lib/surface/completion_queue.h +16 -16
- data/src/core/lib/surface/event_string.cc +18 -25
- data/src/core/lib/surface/event_string.h +3 -1
- data/src/core/lib/surface/init.cc +45 -29
- data/src/core/lib/surface/init_secure.cc +1 -4
- data/src/core/lib/surface/lame_client.cc +47 -54
- data/src/core/lib/surface/lame_client.h +5 -0
- data/src/core/lib/surface/server.cc +1309 -1300
- data/src/core/lib/surface/server.h +469 -45
- data/src/core/lib/surface/validate_metadata.h +3 -0
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/authority_override.cc +40 -0
- data/src/core/lib/transport/authority_override.h +37 -0
- data/src/core/lib/transport/bdp_estimator.cc +1 -1
- data/src/core/lib/transport/bdp_estimator.h +2 -1
- data/src/core/lib/transport/byte_stream.h +10 -5
- data/src/core/lib/transport/connectivity_state.cc +23 -17
- data/src/core/lib/transport/connectivity_state.h +31 -15
- data/src/core/lib/transport/error_utils.cc +13 -0
- data/src/core/lib/transport/error_utils.h +7 -1
- data/src/core/lib/transport/metadata.cc +19 -5
- data/src/core/lib/transport/metadata.h +2 -2
- data/src/core/lib/transport/metadata_batch.cc +27 -0
- data/src/core/lib/transport/metadata_batch.h +20 -7
- data/src/core/lib/transport/static_metadata.cc +296 -277
- data/src/core/lib/transport/static_metadata.h +81 -74
- data/src/core/lib/transport/status_conversion.cc +6 -14
- data/src/core/lib/transport/status_metadata.cc +4 -3
- data/src/core/lib/transport/timeout_encoding.cc +4 -4
- data/src/core/lib/transport/transport.cc +7 -6
- data/src/core/lib/transport/transport.h +24 -10
- data/src/core/lib/transport/transport_op_string.cc +61 -102
- data/src/core/lib/uri/uri_parser.cc +135 -258
- data/src/core/lib/uri/uri_parser.h +60 -23
- data/src/core/plugin_registry/grpc_plugin_registry.cc +65 -12
- data/src/core/tsi/alts/crypt/aes_gcm.cc +0 -2
- data/src/core/tsi/alts/crypt/gsec.cc +5 -4
- data/src/core/tsi/alts/frame_protector/frame_handler.cc +8 -6
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +49 -38
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +8 -4
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +98 -48
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +9 -1
- data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h +2 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc +8 -6
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +4 -4
- data/src/core/tsi/fake_transport_security.cc +27 -20
- data/src/core/tsi/local_transport_security.cc +5 -1
- data/src/core/tsi/local_transport_security.h +6 -7
- data/src/core/tsi/ssl/session_cache/ssl_session.h +0 -2
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +0 -2
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +3 -4
- data/src/core/tsi/ssl_transport_security.cc +226 -105
- data/src/core/tsi/ssl_transport_security.h +28 -16
- data/src/core/tsi/ssl_types.h +0 -2
- data/src/core/tsi/transport_security.cc +10 -8
- data/src/core/tsi/transport_security.h +6 -9
- data/src/core/tsi/transport_security_grpc.h +2 -3
- data/src/core/tsi/transport_security_interface.h +9 -4
- data/src/ruby/bin/math_services_pb.rb +4 -4
- data/src/ruby/ext/grpc/extconf.rb +15 -4
- data/src/ruby/ext/grpc/rb_call.c +12 -3
- data/src/ruby/ext/grpc/rb_call.h +4 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +57 -12
- data/src/ruby/ext/grpc/rb_channel.c +10 -1
- data/src/ruby/ext/grpc/rb_channel_credentials.c +20 -1
- data/src/ruby/ext/grpc/rb_channel_credentials.h +4 -0
- data/src/ruby/ext/grpc/rb_compression_options.c +1 -1
- data/src/ruby/ext/grpc/rb_enable_cpp.cc +1 -1
- data/src/ruby/ext/grpc/rb_event_thread.c +2 -0
- data/src/ruby/ext/grpc/rb_grpc.c +4 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +44 -18
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +83 -44
- data/src/ruby/ext/grpc/rb_server.c +13 -1
- data/src/ruby/ext/grpc/rb_server_credentials.c +19 -3
- data/src/ruby/ext/grpc/rb_server_credentials.h +4 -0
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.c +215 -0
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.h +35 -0
- data/src/ruby/ext/grpc/rb_xds_server_credentials.c +169 -0
- data/src/ruby/ext/grpc/rb_xds_server_credentials.h +35 -0
- data/src/ruby/lib/grpc/errors.rb +103 -42
- data/src/ruby/lib/grpc/generic/active_call.rb +2 -3
- data/src/ruby/lib/grpc/generic/client_stub.rb +5 -3
- data/src/ruby/lib/grpc/generic/interceptors.rb +5 -5
- data/src/ruby/lib/grpc/generic/rpc_server.rb +9 -10
- data/src/ruby/lib/grpc/generic/service.rb +5 -4
- data/src/ruby/lib/grpc/structs.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/generate_proto_ruby.sh +5 -3
- data/src/ruby/pb/grpc/health/v1/health_services_pb.rb +2 -2
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +51 -0
- data/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb +61 -11
- data/src/ruby/spec/call_spec.rb +1 -1
- data/src/ruby/spec/channel_credentials_spec.rb +42 -0
- data/src/ruby/spec/channel_spec.rb +17 -6
- data/src/ruby/spec/client_auth_spec.rb +27 -1
- data/src/ruby/spec/debug_message_spec.rb +134 -0
- data/src/ruby/spec/errors_spec.rb +1 -1
- data/src/ruby/spec/generic/active_call_spec.rb +21 -10
- data/src/ruby/spec/generic/client_stub_spec.rb +4 -4
- data/src/ruby/spec/generic/rpc_server_spec.rb +1 -1
- data/src/ruby/spec/generic/service_spec.rb +2 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_import2.proto +23 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto +7 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/same_package_service_name.proto +27 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/same_ruby_package_service_name.proto +29 -0
- data/src/ruby/spec/pb/codegen/package_option_spec.rb +29 -7
- data/src/ruby/spec/server_credentials_spec.rb +25 -0
- data/src/ruby/spec/server_spec.rb +22 -0
- data/src/ruby/spec/support/services.rb +10 -4
- data/src/ruby/spec/testdata/ca.pem +18 -13
- data/src/ruby/spec/testdata/client.key +26 -14
- data/src/ruby/spec/testdata/client.pem +18 -12
- data/src/ruby/spec/testdata/server1.key +26 -14
- data/src/ruby/spec/testdata/server1.pem +20 -14
- data/src/ruby/spec/user_agent_spec.rb +74 -0
- data/third_party/abseil-cpp/absl/algorithm/container.h +1764 -0
- data/third_party/abseil-cpp/absl/base/attributes.h +99 -38
- data/third_party/abseil-cpp/absl/base/call_once.h +1 -1
- data/third_party/abseil-cpp/absl/base/casts.h +9 -6
- data/third_party/abseil-cpp/absl/base/config.h +60 -17
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +428 -335
- data/third_party/abseil-cpp/absl/base/internal/bits.h +17 -16
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +166 -0
- data/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +398 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.cc +93 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.h +130 -0
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +4 -4
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +620 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +126 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +29 -1
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +2 -2
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +7 -5
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +25 -38
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +19 -25
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +8 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +28 -5
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +8 -0
- data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +3 -1
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +2 -2
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +3 -3
- data/third_party/abseil-cpp/absl/base/macros.h +36 -109
- data/third_party/abseil-cpp/absl/base/optimization.h +61 -1
- data/third_party/abseil-cpp/absl/base/options.h +31 -4
- data/third_party/abseil-cpp/absl/base/policy_checks.h +1 -1
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +94 -39
- data/third_party/abseil-cpp/absl/container/fixed_array.h +532 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +606 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +33 -36
- data/third_party/abseil-cpp/absl/container/internal/common.h +206 -0
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +33 -8
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +460 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +161 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +208 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h +85 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +270 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +321 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +30 -0
- data/third_party/abseil-cpp/absl/container/internal/have_sse.h +50 -0
- data/third_party/abseil-cpp/absl/container/internal/layout.h +743 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +197 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +48 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +1903 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +139 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h +32 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +1945 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.h +71 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +382 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +196 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +89 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +108 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +248 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +24 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +93 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +346 -0
- data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +149 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +173 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h +158 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +140 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +231 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +36 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.h +99 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +101 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +1560 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +40 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +81 -0
- data/third_party/abseil-cpp/absl/functional/bind_front.h +184 -0
- data/third_party/abseil-cpp/absl/functional/function_ref.h +139 -0
- data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +95 -0
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +106 -0
- data/third_party/abseil-cpp/absl/hash/hash.h +325 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +346 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.h +96 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +55 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +996 -0
- data/third_party/abseil-cpp/absl/memory/memory.h +4 -0
- data/third_party/abseil-cpp/absl/meta/type_traits.h +2 -8
- data/third_party/abseil-cpp/absl/numeric/int128.cc +13 -27
- data/third_party/abseil-cpp/absl/numeric/int128.h +16 -15
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +51 -0
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +399 -0
- data/third_party/abseil-cpp/absl/status/status.cc +445 -0
- data/third_party/abseil-cpp/absl/status/status.h +817 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.cc +38 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +51 -0
- data/third_party/abseil-cpp/absl/status/statusor.cc +71 -0
- data/third_party/abseil-cpp/absl/status/statusor.h +760 -0
- data/third_party/abseil-cpp/absl/strings/charconv.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/cord.cc +1998 -0
- data/third_party/abseil-cpp/absl/strings/cord.h +1276 -0
- data/third_party/abseil-cpp/absl/strings/escaping.cc +9 -9
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +173 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +222 -136
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +136 -64
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +14 -21
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +7 -14
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +31 -7
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +147 -135
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +999 -87
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +3 -3
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +4 -12
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +8 -6
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +13 -11
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +2 -2
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +4 -4
- data/third_party/abseil-cpp/absl/strings/str_cat.h +1 -1
- data/third_party/abseil-cpp/absl/strings/str_format.h +289 -13
- data/third_party/abseil-cpp/absl/strings/str_split.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/str_split.h +1 -0
- data/third_party/abseil-cpp/absl/strings/string_view.h +26 -19
- data/third_party/abseil-cpp/absl/strings/substitute.cc +5 -5
- data/third_party/abseil-cpp/absl/strings/substitute.h +32 -29
- data/third_party/abseil-cpp/absl/synchronization/barrier.cc +52 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.h +79 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +57 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +99 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +140 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +60 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +698 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h +141 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +155 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc +249 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +106 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +115 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +492 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +159 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +2739 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +1065 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +78 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.h +123 -0
- data/third_party/abseil-cpp/absl/time/civil_time.cc +175 -0
- data/third_party/abseil-cpp/absl/time/civil_time.h +538 -0
- data/third_party/abseil-cpp/absl/time/clock.cc +569 -0
- data/third_party/abseil-cpp/absl/time/clock.h +74 -0
- data/third_party/abseil-cpp/absl/time/duration.cc +953 -0
- data/third_party/abseil-cpp/absl/time/format.cc +160 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time.h +332 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +632 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +386 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h +102 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc +94 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc +140 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.h +52 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +1029 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc +45 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.h +76 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc +113 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h +93 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +965 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h +137 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +309 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.h +55 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +187 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc +159 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.h +132 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +122 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +116 -0
- data/third_party/abseil-cpp/absl/time/internal/get_current_time_chrono.inc +31 -0
- data/third_party/abseil-cpp/absl/time/internal/get_current_time_posix.inc +24 -0
- data/third_party/abseil-cpp/absl/time/time.cc +499 -0
- data/third_party/abseil-cpp/absl/time/time.h +1583 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +64 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +82 -0
- data/third_party/abseil-cpp/absl/types/internal/variant.h +1646 -0
- data/third_party/abseil-cpp/absl/types/optional.h +9 -9
- data/third_party/abseil-cpp/absl/types/span.h +49 -36
- data/third_party/abseil-cpp/absl/types/variant.h +861 -0
- data/third_party/abseil-cpp/absl/utility/utility.h +2 -2
- data/third_party/address_sorting/include/address_sorting/address_sorting.h +2 -0
- data/third_party/boringssl-with-bazel/err_data.c +759 -707
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c +6 -6
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_enum.c +5 -5
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c +6 -6
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +6 -13
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c +5 -3
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +15 -20
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_locl.h +30 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_enum.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_string.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +28 -79
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +39 -85
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +5 -16
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +10 -61
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c +158 -0
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c +3 -10
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c +8 -9
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +60 -45
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/derive_key.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_chacha20poly1305.c +6 -81
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/internal.h +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-win.c +41 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.c +18 -7
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/cpu-intel.c +13 -4
- data/third_party/boringssl-with-bazel/src/crypto/crypto.c +11 -0
- data/third_party/boringssl-with-bazel/src/{third_party/fiat → crypto/curve25519}/curve25519.c +18 -26
- data/third_party/boringssl-with-bazel/src/{third_party/fiat → crypto/curve25519}/curve25519_tables.h +13 -21
- data/third_party/boringssl-with-bazel/src/{third_party/fiat → crypto/curve25519}/internal.h +14 -22
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/{dh → dh_extra}/dh_asn1.c +0 -0
- data/third_party/boringssl-with-bazel/src/crypto/{dh → dh_extra}/params.c +179 -0
- data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +25 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +19 -43
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c +55 -4
- data/third_party/boringssl-with-bazel/src/crypto/dsa/internal.h +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c +2 -17
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/hash_to_curve.c +385 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/internal.h +56 -0
- data/third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_extra.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/err/err.c +33 -32
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +159 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c +6 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.c +17 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c +5 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn.c +13 -20
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c +2 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/exponentiation.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +34 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery.c +8 -8
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/mul.c +30 -154
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/cipher.c +21 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +173 -35
- data/third_party/boringssl-with-bazel/src/crypto/{dh → fipsmodule/dh}/check.c +0 -0
- data/third_party/boringssl-with-bazel/src/crypto/{dh → fipsmodule/dh}/dh.c +149 -211
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c +16 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c +301 -117
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c +22 -28
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_montgomery.c +96 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/felem.c +25 -7
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +434 -161
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/oct.c +63 -71
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.c +18 -25
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64-table.h +9481 -9485
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64.c +104 -122
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256.c +740 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256_table.h +297 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/scalar.c +90 -11
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple.c +125 -148
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.c +189 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/util.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/wnaf.c +61 -18
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c +20 -5
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect.c +137 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect.h +49 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h +64 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +69 -5
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +162 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c +24 -121
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/blinding.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +5 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +73 -40
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +122 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +217 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c +44 -35
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +532 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/internal.h +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +47 -16
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_dat.h +15 -1
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +7 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +36 -5
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c +10 -7
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.c +13 -11
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c +6 -10
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c +16 -0
- data/third_party/boringssl-with-bazel/src/crypto/stack/stack.c +7 -13
- data/third_party/boringssl-with-bazel/src/crypto/thread_pthread.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_win.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +318 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +1399 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +858 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c +766 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_strex.c +7 -7
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +10 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +5 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509.c +0 -67
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +21 -37
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c +27 -21
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_r2x.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c +10 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +89 -11
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +7 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c +67 -67
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +62 -44
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +67 -25
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +13 -11
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +10 -10
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c +22 -17
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +38 -17
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +28 -40
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pkey.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c +0 -154
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +20 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +68 -9
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/ext_dat.h +1 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +5 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +5 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +25 -24
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +32 -28
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c +42 -22
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ia5.c +3 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c +25 -36
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +126 -40
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +7 -7
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +6 -6
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +24 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/aes.h +16 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +54 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +662 -556
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +0 -167
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +19 -7
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +4 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/blake2.h +62 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +22 -7
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +25 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cpu.h +22 -32
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +10 -5
- data/third_party/boringssl-with-bazel/src/include/openssl/des.h +6 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +82 -20
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +11 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ec.h +15 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +6 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/err.h +2 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +85 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/nid.h +5 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +3 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +202 -134
- data/third_party/boringssl-with-bazel/src/include/openssl/rand.h +6 -17
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +31 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/sha.h +26 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +2 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +359 -120
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +33 -10
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +310 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +1140 -755
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +1 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +593 -440
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +18 -5
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +0 -4
- data/third_party/boringssl-with-bazel/src/ssl/d1_lib.cc +3 -3
- data/third_party/boringssl-with-bazel/src/ssl/dtls_method.cc +13 -4
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +181 -57
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +45 -26
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +43 -45
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +32 -10
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +160 -80
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +10 -10
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +2 -3
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +21 -21
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +77 -8
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +7 -6
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +8 -9
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +131 -15
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +13 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +50 -15
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +6 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +5 -5
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +53 -30
- data/third_party/boringssl-with-bazel/src/ssl/t1_lib.cc +636 -100
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +2 -3
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +187 -68
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +71 -90
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +247 -73
- data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +63 -25
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +5 -3
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_32.h +245 -175
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_64.h +135 -75
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_32.h +1593 -1672
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_64.h +512 -503
- data/third_party/re2/re2/bitmap256.h +117 -0
- data/third_party/re2/re2/bitstate.cc +385 -0
- data/third_party/re2/re2/compile.cc +1279 -0
- data/third_party/re2/re2/dfa.cc +2130 -0
- data/third_party/re2/re2/filtered_re2.cc +121 -0
- data/third_party/re2/re2/filtered_re2.h +109 -0
- data/third_party/re2/re2/mimics_pcre.cc +197 -0
- data/third_party/re2/re2/nfa.cc +713 -0
- data/third_party/re2/re2/onepass.cc +623 -0
- data/third_party/re2/re2/parse.cc +2464 -0
- data/third_party/re2/re2/perl_groups.cc +119 -0
- data/third_party/re2/re2/pod_array.h +55 -0
- data/third_party/re2/re2/prefilter.cc +710 -0
- data/third_party/re2/re2/prefilter.h +108 -0
- data/third_party/re2/re2/prefilter_tree.cc +407 -0
- data/third_party/re2/re2/prefilter_tree.h +139 -0
- data/third_party/re2/re2/prog.cc +988 -0
- data/third_party/re2/re2/prog.h +436 -0
- data/third_party/re2/re2/re2.cc +1362 -0
- data/third_party/re2/re2/re2.h +1002 -0
- data/third_party/re2/re2/regexp.cc +980 -0
- data/third_party/re2/re2/regexp.h +659 -0
- data/third_party/re2/re2/set.cc +154 -0
- data/third_party/re2/re2/set.h +80 -0
- data/third_party/re2/re2/simplify.cc +657 -0
- data/third_party/re2/re2/sparse_array.h +392 -0
- data/third_party/re2/re2/sparse_set.h +264 -0
- data/third_party/re2/re2/stringpiece.cc +65 -0
- data/third_party/re2/re2/stringpiece.h +210 -0
- data/third_party/re2/re2/tostring.cc +351 -0
- data/third_party/re2/re2/unicode_casefold.cc +582 -0
- data/third_party/re2/re2/unicode_casefold.h +78 -0
- data/third_party/re2/re2/unicode_groups.cc +6269 -0
- data/third_party/re2/re2/unicode_groups.h +67 -0
- data/third_party/re2/re2/walker-inl.h +246 -0
- data/third_party/re2/util/benchmark.h +156 -0
- data/third_party/re2/util/flags.h +26 -0
- data/third_party/re2/util/logging.h +109 -0
- data/third_party/re2/util/malloc_counter.h +19 -0
- data/third_party/re2/util/mix.h +41 -0
- data/third_party/re2/util/mutex.h +148 -0
- data/third_party/re2/util/pcre.cc +1025 -0
- data/third_party/re2/util/pcre.h +681 -0
- data/third_party/re2/util/rune.cc +260 -0
- data/third_party/re2/util/strutil.cc +149 -0
- data/third_party/re2/util/strutil.h +21 -0
- data/third_party/re2/util/test.h +50 -0
- data/third_party/re2/util/utf.h +44 -0
- data/third_party/re2/util/util.h +42 -0
- data/third_party/upb/third_party/wyhash/wyhash.h +145 -0
- data/third_party/upb/upb/decode.c +604 -511
- data/third_party/upb/upb/decode.h +20 -1
- data/third_party/upb/upb/decode.int.h +163 -0
- data/third_party/upb/upb/decode_fast.c +1040 -0
- data/third_party/upb/upb/decode_fast.h +126 -0
- data/third_party/upb/upb/def.c +2178 -0
- data/third_party/upb/upb/def.h +315 -0
- data/third_party/upb/upb/def.hpp +439 -0
- data/third_party/upb/upb/encode.c +311 -211
- data/third_party/upb/upb/encode.h +27 -2
- data/third_party/upb/upb/msg.c +215 -70
- data/third_party/upb/upb/msg.h +558 -14
- data/third_party/upb/upb/port_def.inc +105 -63
- data/third_party/upb/upb/port_undef.inc +10 -7
- data/third_party/upb/upb/reflection.c +408 -0
- data/third_party/upb/upb/reflection.h +168 -0
- data/third_party/upb/upb/table.c +73 -269
- data/third_party/upb/upb/table.int.h +25 -57
- data/third_party/upb/upb/text_encode.c +421 -0
- data/third_party/upb/upb/text_encode.h +38 -0
- data/third_party/upb/upb/upb.c +138 -135
- data/third_party/upb/upb/upb.h +119 -146
- data/third_party/upb/upb/upb.hpp +88 -0
- data/third_party/upb/upb/upb.int.h +29 -0
- data/third_party/xxhash/xxhash.h +5443 -0
- metadata +686 -160
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +0 -1754
- data/src/core/ext/filters/client_channel/parse_address.cc +0 -237
- data/src/core/ext/filters/client_channel/parse_address.h +0 -53
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +0 -484
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +0 -65
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +0 -359
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +0 -122
- data/src/core/ext/filters/client_channel/xds/xds_api.cc +0 -1779
- data/src/core/ext/filters/client_channel/xds/xds_api.h +0 -280
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +0 -347
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +0 -87
- data/src/core/ext/filters/client_channel/xds/xds_channel.h +0 -46
- data/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc +0 -104
- data/src/core/ext/filters/client_channel/xds/xds_client.h +0 -274
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +0 -116
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -246
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +0 -905
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +0 -390
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +0 -1411
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -73
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +0 -218
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +0 -34
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +0 -69
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +0 -54
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +0 -305
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -111
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +0 -328
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +0 -292
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +0 -847
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +0 -95
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +0 -322
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +0 -196
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +0 -642
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +0 -168
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +0 -658
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +0 -35
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +0 -80
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +0 -132
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +0 -436
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -128
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +0 -392
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +0 -30
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +0 -91
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +0 -240
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -17
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +0 -33
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +0 -88
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +0 -258
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -111
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +0 -324
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c +0 -30
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +0 -104
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +0 -383
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +0 -17
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +0 -33
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +0 -144
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +0 -527
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +0 -42
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +0 -62
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +0 -199
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +0 -17
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +0 -33
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +0 -793
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +0 -2936
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +0 -58
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +0 -134
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +0 -227
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +0 -725
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +0 -296
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +0 -1072
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c +0 -32
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +0 -65
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c +0 -23
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +0 -50
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c +0 -52
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +0 -130
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +0 -47
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +0 -108
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +0 -52
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +0 -133
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +0 -87
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +0 -258
- data/src/core/ext/upb-generated/envoy/type/percent.upb.c +0 -38
- data/src/core/ext/upb-generated/envoy/type/percent.upb.h +0 -87
- data/src/core/ext/upb-generated/envoy/type/range.upb.c +0 -49
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +0 -112
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.c +0 -28
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +0 -62
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +0 -88
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +0 -249
- data/src/core/ext/upb-generated/gogoproto/gogo.upb.c +0 -17
- data/src/core/lib/gprpp/map.h +0 -59
- data/src/core/lib/gprpp/string_view.h +0 -60
- data/src/core/lib/iomgr/iomgr_posix.h +0 -26
- data/src/core/lib/security/transport/target_authority_table.cc +0 -75
- data/src/core/lib/security/transport/target_authority_table.h +0 -40
- data/src/core/lib/slice/slice_hash_table.h +0 -199
- data/src/core/lib/slice/slice_weak_hash_table.h +0 -102
- data/src/core/tsi/grpc_shadow_boringssl.h +0 -3311
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.cc +0 -129
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pku.c +0 -110
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_sxnet.c +0 -274
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256.c +0 -1063
- data/third_party/upb/upb/generated_util.h +0 -105
- data/third_party/upb/upb/port.c +0 -26
@@ -38,6 +38,11 @@
|
|
38
38
|
|
39
39
|
const size_t kTsiAltsNumOfPeerProperties = 5;
|
40
40
|
|
41
|
+
// Frame size negotiation extends send frame size range to
|
42
|
+
// [kTsiAltsMinFrameSize, kTsiAltsMaxFrameSize].
|
43
|
+
const size_t kTsiAltsMinFrameSize = 16 * 1024;
|
44
|
+
const size_t kTsiAltsMaxFrameSize = 1024 * 1024;
|
45
|
+
|
41
46
|
typedef struct alts_tsi_handshaker alts_tsi_handshaker;
|
42
47
|
|
43
48
|
/**
|
@@ -54,6 +59,8 @@ typedef struct alts_tsi_handshaker alts_tsi_handshaker;
|
|
54
59
|
* - interested_parties: set of pollsets interested in this connection.
|
55
60
|
* - self: address of ALTS TSI handshaker instance to be returned from the
|
56
61
|
* method.
|
62
|
+
* - user_specified_max_frame_size: Determines the maximum frame size used by
|
63
|
+
* frame protector that is specified via user. If unspecified, the value is 0.
|
57
64
|
*
|
58
65
|
* It returns TSI_OK on success and an error status code on failure. Note that
|
59
66
|
* if interested_parties is nullptr, a dedicated TSI thread will be created and
|
@@ -62,7 +69,8 @@ typedef struct alts_tsi_handshaker alts_tsi_handshaker;
|
|
62
69
|
tsi_result alts_tsi_handshaker_create(
|
63
70
|
const grpc_alts_credentials_options* options, const char* target_name,
|
64
71
|
const char* handshaker_service_url, bool is_client,
|
65
|
-
grpc_pollset_set* interested_parties, tsi_handshaker** self
|
72
|
+
grpc_pollset_set* interested_parties, tsi_handshaker** self,
|
73
|
+
size_t user_specified_max_frame_size);
|
66
74
|
|
67
75
|
/**
|
68
76
|
* This method creates an ALTS TSI handshaker result instance.
|
@@ -20,6 +20,8 @@
|
|
20
20
|
|
21
21
|
#include "src/core/tsi/alts/handshaker/transport_security_common_api.h"
|
22
22
|
|
23
|
+
#include "upb/upb.hpp"
|
24
|
+
|
23
25
|
bool grpc_gcp_rpc_protocol_versions_set_max(
|
24
26
|
grpc_gcp_rpc_protocol_versions* versions, uint32_t max_major,
|
25
27
|
uint32_t max_minor) {
|
@@ -212,9 +214,7 @@ bool grpc_gcp_rpc_protocol_versions_check(
|
|
212
214
|
? &local_versions->min_rpc_version
|
213
215
|
: &peer_versions->min_rpc_version;
|
214
216
|
bool result = grpc_core::internal::grpc_gcp_rpc_protocol_version_compare(
|
215
|
-
max_common_version, min_common_version) >= 0
|
216
|
-
? true
|
217
|
-
: false;
|
217
|
+
max_common_version, min_common_version) >= 0;
|
218
218
|
if (result && highest_common_version != nullptr) {
|
219
219
|
memcpy(highest_common_version, max_common_version,
|
220
220
|
sizeof(grpc_gcp_rpc_protocol_versions_version));
|
@@ -31,7 +31,7 @@
|
|
31
31
|
#include "src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h"
|
32
32
|
|
33
33
|
/* V-table for alts_grpc_record_protocol implementations. */
|
34
|
-
|
34
|
+
struct alts_grpc_record_protocol_vtable {
|
35
35
|
tsi_result (*protect)(alts_grpc_record_protocol* self,
|
36
36
|
grpc_slice_buffer* unprotected_slices,
|
37
37
|
grpc_slice_buffer* protected_slices);
|
@@ -39,8 +39,7 @@ typedef struct {
|
|
39
39
|
grpc_slice_buffer* protected_slices,
|
40
40
|
grpc_slice_buffer* unprotected_slices);
|
41
41
|
void (*destruct)(alts_grpc_record_protocol* self);
|
42
|
-
}
|
43
|
-
|
42
|
+
};
|
44
43
|
/* Main struct for alts_grpc_record_protocol implementation, shared by both
|
45
44
|
* integrity-only record protocol and privacy-integrity record protocol.
|
46
45
|
* Integrity-only record protocol has additional data elements.
|
@@ -56,16 +56,18 @@ static void maybe_append_error_msg(const char* appendix, char** dst) {
|
|
56
56
|
|
57
57
|
/* Use little endian to interpret a string of bytes as uint32_t. */
|
58
58
|
static uint32_t load_32_le(const unsigned char* buffer) {
|
59
|
-
return ((
|
60
|
-
((
|
59
|
+
return (static_cast<uint32_t>(buffer[3]) << 24) |
|
60
|
+
(static_cast<uint32_t>(buffer[2]) << 16) |
|
61
|
+
(static_cast<uint32_t>(buffer[1]) << 8) |
|
62
|
+
static_cast<uint32_t>(buffer[0]);
|
61
63
|
}
|
62
64
|
|
63
65
|
/* Store uint32_t as a string of little endian bytes. */
|
64
66
|
static void store_32_le(uint32_t value, unsigned char* buffer) {
|
65
|
-
buffer[3] =
|
66
|
-
buffer[2] =
|
67
|
-
buffer[1] =
|
68
|
-
buffer[0] =
|
67
|
+
buffer[3] = static_cast<unsigned char>(value >> 24) & 0xFF;
|
68
|
+
buffer[2] = static_cast<unsigned char>(value >> 16) & 0xFF;
|
69
|
+
buffer[1] = static_cast<unsigned char>(value >> 8) & 0xFF;
|
70
|
+
buffer[0] = static_cast<unsigned char>(value) & 0xFF;
|
69
71
|
}
|
70
72
|
|
71
73
|
/* Ensures header and tag iovec have sufficient length. */
|
@@ -87,10 +87,10 @@ static bool read_frame_size(const grpc_slice_buffer* sb,
|
|
87
87
|
}
|
88
88
|
GPR_ASSERT(remaining == 0);
|
89
89
|
/* Gets little-endian frame size. */
|
90
|
-
uint32_t frame_size = ((
|
91
|
-
((
|
92
|
-
((
|
93
|
-
(
|
90
|
+
uint32_t frame_size = (static_cast<uint32_t>(frame_size_buffer[3]) << 24) |
|
91
|
+
(static_cast<uint32_t>(frame_size_buffer[2]) << 16) |
|
92
|
+
(static_cast<uint32_t>(frame_size_buffer[1]) << 8) |
|
93
|
+
static_cast<uint32_t>(frame_size_buffer[0]);
|
94
94
|
if (frame_size > kMaxFrameLength) {
|
95
95
|
gpr_log(GPR_ERROR, "Frame size is larger than maximum frame size");
|
96
96
|
return false;
|
@@ -42,14 +42,13 @@
|
|
42
42
|
| size | data |
|
43
43
|
where the size field value is the size of the size field plus the size of
|
44
44
|
the data encoded in little endian on 4 bytes. */
|
45
|
-
|
45
|
+
struct tsi_fake_frame {
|
46
46
|
unsigned char* data;
|
47
47
|
size_t size;
|
48
48
|
size_t allocated_size;
|
49
49
|
size_t offset;
|
50
50
|
int needs_draining;
|
51
|
-
}
|
52
|
-
|
51
|
+
};
|
53
52
|
typedef enum {
|
54
53
|
TSI_FAKE_CLIENT_INIT = 0,
|
55
54
|
TSI_FAKE_SERVER_INIT = 1,
|
@@ -58,7 +57,7 @@ typedef enum {
|
|
58
57
|
TSI_FAKE_HANDSHAKE_MESSAGE_MAX = 4
|
59
58
|
} tsi_fake_handshake_message;
|
60
59
|
|
61
|
-
|
60
|
+
struct tsi_fake_handshaker {
|
62
61
|
tsi_handshaker base;
|
63
62
|
int is_client;
|
64
63
|
tsi_fake_handshake_message next_message_to_send;
|
@@ -68,23 +67,20 @@ typedef struct {
|
|
68
67
|
unsigned char* outgoing_bytes_buffer;
|
69
68
|
size_t outgoing_bytes_buffer_size;
|
70
69
|
tsi_result result;
|
71
|
-
}
|
72
|
-
|
73
|
-
typedef struct {
|
70
|
+
};
|
71
|
+
struct tsi_fake_frame_protector {
|
74
72
|
tsi_frame_protector base;
|
75
73
|
tsi_fake_frame protect_frame;
|
76
74
|
tsi_fake_frame unprotect_frame;
|
77
75
|
size_t max_frame_size;
|
78
|
-
}
|
79
|
-
|
80
|
-
typedef struct {
|
76
|
+
};
|
77
|
+
struct tsi_fake_zero_copy_grpc_protector {
|
81
78
|
tsi_zero_copy_grpc_protector base;
|
82
79
|
grpc_slice_buffer header_sb;
|
83
80
|
grpc_slice_buffer protected_sb;
|
84
81
|
size_t max_frame_size;
|
85
82
|
size_t parsed_frame_size;
|
86
|
-
}
|
87
|
-
|
83
|
+
};
|
88
84
|
/* --- Utils. ---*/
|
89
85
|
|
90
86
|
static const char* tsi_fake_handshake_message_strings[] = {
|
@@ -478,24 +474,32 @@ static void fake_zero_copy_grpc_protector_destroy(
|
|
478
474
|
gpr_free(impl);
|
479
475
|
}
|
480
476
|
|
477
|
+
static tsi_result fake_zero_copy_grpc_protector_max_frame_size(
|
478
|
+
tsi_zero_copy_grpc_protector* self, size_t* max_frame_size) {
|
479
|
+
if (self == nullptr || max_frame_size == nullptr) return TSI_INVALID_ARGUMENT;
|
480
|
+
tsi_fake_zero_copy_grpc_protector* impl =
|
481
|
+
reinterpret_cast<tsi_fake_zero_copy_grpc_protector*>(self);
|
482
|
+
*max_frame_size = impl->max_frame_size;
|
483
|
+
return TSI_OK;
|
484
|
+
}
|
485
|
+
|
481
486
|
static const tsi_zero_copy_grpc_protector_vtable
|
482
487
|
zero_copy_grpc_protector_vtable = {
|
483
488
|
fake_zero_copy_grpc_protector_protect,
|
484
489
|
fake_zero_copy_grpc_protector_unprotect,
|
485
490
|
fake_zero_copy_grpc_protector_destroy,
|
486
|
-
|
491
|
+
fake_zero_copy_grpc_protector_max_frame_size,
|
487
492
|
};
|
488
493
|
|
489
494
|
/* --- tsi_handshaker_result methods implementation. ---*/
|
490
495
|
|
491
|
-
|
496
|
+
struct fake_handshaker_result {
|
492
497
|
tsi_handshaker_result base;
|
493
498
|
unsigned char* unused_bytes;
|
494
499
|
size_t unused_bytes_size;
|
495
|
-
}
|
496
|
-
|
500
|
+
};
|
497
501
|
static tsi_result fake_handshaker_result_extract_peer(
|
498
|
-
const tsi_handshaker_result* self
|
502
|
+
const tsi_handshaker_result* /*self*/, tsi_peer* peer) {
|
499
503
|
/* Construct a tsi_peer with 1 property: certificate type, security_level. */
|
500
504
|
tsi_result result = tsi_construct_peer(2, peer);
|
501
505
|
if (result != TSI_OK) return result;
|
@@ -529,7 +533,8 @@ static tsi_result fake_handshaker_result_create_frame_protector(
|
|
529
533
|
static tsi_result fake_handshaker_result_get_unused_bytes(
|
530
534
|
const tsi_handshaker_result* self, const unsigned char** bytes,
|
531
535
|
size_t* bytes_size) {
|
532
|
-
fake_handshaker_result* result = (
|
536
|
+
fake_handshaker_result* result = reinterpret_cast<fake_handshaker_result*>(
|
537
|
+
const_cast<tsi_handshaker_result*>(self));
|
533
538
|
*bytes_size = result->unused_bytes_size;
|
534
539
|
*bytes = result->unused_bytes;
|
535
540
|
return TSI_OK;
|
@@ -582,11 +587,13 @@ static tsi_result fake_handshaker_get_bytes_to_send_to_peer(
|
|
582
587
|
}
|
583
588
|
if (!impl->outgoing_frame.needs_draining) {
|
584
589
|
tsi_fake_handshake_message next_message_to_send =
|
590
|
+
// NOLINTNEXTLINE(bugprone-misplaced-widening-cast)
|
585
591
|
static_cast<tsi_fake_handshake_message>(impl->next_message_to_send + 2);
|
586
592
|
const char* msg_string =
|
587
593
|
tsi_fake_handshake_message_to_string(impl->next_message_to_send);
|
588
|
-
result = tsi_fake_frame_set_data(
|
589
|
-
|
594
|
+
result = tsi_fake_frame_set_data(
|
595
|
+
reinterpret_cast<unsigned char*>(const_cast<char*>(msg_string)),
|
596
|
+
strlen(msg_string), &impl->outgoing_frame);
|
590
597
|
if (result != TSI_OK) return result;
|
591
598
|
if (next_message_to_send > TSI_FAKE_HANDSHAKE_MESSAGE_MAX) {
|
592
599
|
next_message_to_send = TSI_FAKE_HANDSHAKE_MESSAGE_MAX;
|
@@ -31,6 +31,8 @@
|
|
31
31
|
#include "src/core/lib/iomgr/exec_ctx.h"
|
32
32
|
#include "src/core/tsi/transport_security_grpc.h"
|
33
33
|
|
34
|
+
namespace {
|
35
|
+
|
34
36
|
/* Main struct for local TSI zero-copy frame protector. */
|
35
37
|
typedef struct local_zero_copy_grpc_protector {
|
36
38
|
tsi_zero_copy_grpc_protector base;
|
@@ -197,7 +199,9 @@ static const tsi_handshaker_vtable handshaker_vtable = {
|
|
197
199
|
nullptr, /* shutdown */
|
198
200
|
};
|
199
201
|
|
200
|
-
|
202
|
+
} // namespace
|
203
|
+
|
204
|
+
tsi_result tsi_local_handshaker_create(bool is_client, tsi_handshaker** self) {
|
201
205
|
if (self == nullptr) {
|
202
206
|
gpr_log(GPR_ERROR, "Invalid arguments to local_tsi_handshaker_create()");
|
203
207
|
return TSI_INVALID_ARGUMENT;
|
@@ -29,12 +29,6 @@
|
|
29
29
|
#define TSI_LOCAL_NUM_OF_PEER_PROPERTIES 1
|
30
30
|
#define TSI_LOCAL_PROCESS_ID_PEER_PROPERTY "process_id"
|
31
31
|
|
32
|
-
/**
|
33
|
-
* Main struct for local TSI handshaker. All APIs in the header are
|
34
|
-
* thread-comptabile.
|
35
|
-
*/
|
36
|
-
typedef struct local_tsi_handshaker local_tsi_handshaker;
|
37
|
-
|
38
32
|
/**
|
39
33
|
* This method creates a local TSI handshaker instance.
|
40
34
|
*
|
@@ -45,7 +39,12 @@ typedef struct local_tsi_handshaker local_tsi_handshaker;
|
|
45
39
|
* method.
|
46
40
|
*
|
47
41
|
* It returns TSI_OK on success and an error status code on failure.
|
42
|
+
*
|
43
|
+
* This handshaker is also being used as a minimalist handshaker for insecure
|
44
|
+
* security connector. If this handshaker ever needs to do anything more that
|
45
|
+
* does not fit with an insecure connector, we would need to add a separate
|
46
|
+
* handshaker for insecure connectors.
|
48
47
|
*/
|
49
|
-
tsi_result
|
48
|
+
tsi_result tsi_local_handshaker_create(bool is_client, tsi_handshaker** self);
|
50
49
|
|
51
50
|
#endif /* GRPC_CORE_TSI_LOCAL_TRANSPORT_SECURITY_H */
|
@@ -32,7 +32,7 @@ namespace {
|
|
32
32
|
|
33
33
|
class BoringSslCachedSession : public SslCachedSession {
|
34
34
|
public:
|
35
|
-
BoringSslCachedSession(SslSessionPtr session)
|
35
|
+
explicit BoringSslCachedSession(SslSessionPtr session)
|
36
36
|
: session_(std::move(session)) {}
|
37
37
|
|
38
38
|
SslSessionPtr CopySession() const override {
|
@@ -84,7 +84,6 @@ class SslSessionLRUCache::Node {
|
|
84
84
|
|
85
85
|
SslSessionLRUCache::SslSessionLRUCache(size_t capacity) : capacity_(capacity) {
|
86
86
|
GPR_ASSERT(capacity > 0);
|
87
|
-
gpr_mu_init(&lock_);
|
88
87
|
entry_by_key_ = grpc_avl_create(&cache_avl_vtable);
|
89
88
|
}
|
90
89
|
|
@@ -96,7 +95,6 @@ SslSessionLRUCache::~SslSessionLRUCache() {
|
|
96
95
|
node = next;
|
97
96
|
}
|
98
97
|
grpc_avl_unref(entry_by_key_, nullptr);
|
99
|
-
gpr_mu_destroy(&lock_);
|
100
98
|
}
|
101
99
|
|
102
100
|
size_t SslSessionLRUCache::Size() {
|
@@ -21,8 +21,6 @@
|
|
21
21
|
|
22
22
|
#include <grpc/support/port_platform.h>
|
23
23
|
|
24
|
-
#include "src/core/tsi/grpc_shadow_boringssl.h"
|
25
|
-
|
26
24
|
#include <grpc/slice.h>
|
27
25
|
#include <grpc/support/sync.h>
|
28
26
|
|
@@ -33,6 +31,7 @@ extern "C" {
|
|
33
31
|
#include "src/core/lib/avl/avl.h"
|
34
32
|
#include "src/core/lib/gprpp/memory.h"
|
35
33
|
#include "src/core/lib/gprpp/ref_counted.h"
|
34
|
+
#include "src/core/lib/gprpp/sync.h"
|
36
35
|
#include "src/core/tsi/ssl/session_cache/ssl_session.h"
|
37
36
|
|
38
37
|
/// Cache for SSL sessions for sessions resumption.
|
@@ -55,7 +54,7 @@ class SslSessionLRUCache : public grpc_core::RefCounted<SslSessionLRUCache> {
|
|
55
54
|
|
56
55
|
// Use Create function instead of using this directly.
|
57
56
|
explicit SslSessionLRUCache(size_t capacity);
|
58
|
-
~SslSessionLRUCache();
|
57
|
+
~SslSessionLRUCache() override;
|
59
58
|
|
60
59
|
// Not copyable nor movable.
|
61
60
|
SslSessionLRUCache(const SslSessionLRUCache&) = delete;
|
@@ -78,7 +77,7 @@ class SslSessionLRUCache : public grpc_core::RefCounted<SslSessionLRUCache> {
|
|
78
77
|
void PushFront(Node* node);
|
79
78
|
void AssertInvariants();
|
80
79
|
|
81
|
-
|
80
|
+
grpc_core::Mutex lock_;
|
82
81
|
size_t capacity_;
|
83
82
|
|
84
83
|
Node* use_order_list_head_ = nullptr;
|
@@ -18,8 +18,6 @@
|
|
18
18
|
|
19
19
|
#include <grpc/support/port_platform.h>
|
20
20
|
|
21
|
-
#include "src/core/tsi/grpc_shadow_boringssl.h"
|
22
|
-
|
23
21
|
#include "src/core/tsi/ssl_transport_security.h"
|
24
22
|
|
25
23
|
#include <limits.h>
|
@@ -35,6 +33,8 @@
|
|
35
33
|
#include <sys/socket.h>
|
36
34
|
#endif
|
37
35
|
|
36
|
+
#include <string>
|
37
|
+
|
38
38
|
#include <grpc/grpc_security.h>
|
39
39
|
#include <grpc/support/alloc.h>
|
40
40
|
#include <grpc/support/log.h>
|
@@ -42,12 +42,16 @@
|
|
42
42
|
#include <grpc/support/sync.h>
|
43
43
|
#include <grpc/support/thd_id.h>
|
44
44
|
|
45
|
+
#include "absl/strings/match.h"
|
46
|
+
#include "absl/strings/string_view.h"
|
47
|
+
|
45
48
|
extern "C" {
|
46
49
|
#include <openssl/bio.h>
|
47
50
|
#include <openssl/crypto.h> /* For OPENSSL_free */
|
48
51
|
#include <openssl/engine.h>
|
49
52
|
#include <openssl/err.h>
|
50
53
|
#include <openssl/ssl.h>
|
54
|
+
#include <openssl/tls1.h>
|
51
55
|
#include <openssl/x509.h>
|
52
56
|
#include <openssl/x509v3.h>
|
53
57
|
}
|
@@ -105,7 +109,7 @@ struct tsi_ssl_server_handshaker_factory {
|
|
105
109
|
size_t alpn_protocol_list_length;
|
106
110
|
};
|
107
111
|
|
108
|
-
|
112
|
+
struct tsi_ssl_handshaker {
|
109
113
|
tsi_handshaker base;
|
110
114
|
SSL* ssl;
|
111
115
|
BIO* network_io;
|
@@ -113,31 +117,28 @@ typedef struct {
|
|
113
117
|
unsigned char* outgoing_bytes_buffer;
|
114
118
|
size_t outgoing_bytes_buffer_size;
|
115
119
|
tsi_ssl_handshaker_factory* factory_ref;
|
116
|
-
}
|
117
|
-
|
118
|
-
typedef struct {
|
120
|
+
};
|
121
|
+
struct tsi_ssl_handshaker_result {
|
119
122
|
tsi_handshaker_result base;
|
120
123
|
SSL* ssl;
|
121
124
|
BIO* network_io;
|
122
125
|
unsigned char* unused_bytes;
|
123
126
|
size_t unused_bytes_size;
|
124
|
-
}
|
125
|
-
|
126
|
-
typedef struct {
|
127
|
+
};
|
128
|
+
struct tsi_ssl_frame_protector {
|
127
129
|
tsi_frame_protector base;
|
128
130
|
SSL* ssl;
|
129
131
|
BIO* network_io;
|
130
132
|
unsigned char* buffer;
|
131
133
|
size_t buffer_size;
|
132
134
|
size_t buffer_offset;
|
133
|
-
}
|
134
|
-
|
135
|
+
};
|
135
136
|
/* --- Library Initialization. ---*/
|
136
137
|
|
137
138
|
static gpr_once g_init_openssl_once = GPR_ONCE_INIT;
|
138
139
|
static int g_ssl_ctx_ex_factory_index = -1;
|
139
140
|
static const unsigned char kSslSessionIdContext[] = {'g', 'r', 'p', 'c'};
|
140
|
-
#
|
141
|
+
#if !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE)
|
141
142
|
static const char kSslEnginePrefix[] = "engine:";
|
142
143
|
#endif
|
143
144
|
|
@@ -161,8 +162,8 @@ static unsigned long openssl_thread_id_cb(void) {
|
|
161
162
|
#endif
|
162
163
|
|
163
164
|
static void init_openssl(void) {
|
164
|
-
#if
|
165
|
-
OPENSSL_init_ssl(0,
|
165
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10100000
|
166
|
+
OPENSSL_init_ssl(0, nullptr);
|
166
167
|
#else
|
167
168
|
SSL_library_init();
|
168
169
|
SSL_load_error_strings();
|
@@ -238,7 +239,7 @@ static void ssl_info_callback(const SSL* ssl, int where, int ret) {
|
|
238
239
|
|
239
240
|
/* Returns 1 if name looks like an IP address, 0 otherwise.
|
240
241
|
This is a very rough heuristic, and only handles IPv6 in hexadecimal form. */
|
241
|
-
static int looks_like_ip_address(
|
242
|
+
static int looks_like_ip_address(absl::string_view name) {
|
242
243
|
size_t dot_count = 0;
|
243
244
|
size_t num_size = 0;
|
244
245
|
for (size_t i = 0; i < name.size(); ++i) {
|
@@ -336,8 +337,7 @@ static tsi_result add_pem_certificate(X509* cert, tsi_peer_property* property) {
|
|
336
337
|
return TSI_INTERNAL_ERROR;
|
337
338
|
}
|
338
339
|
tsi_result result = tsi_construct_string_peer_property(
|
339
|
-
TSI_X509_PEM_CERT_PROPERTY, (
|
340
|
-
static_cast<size_t>(len), property);
|
340
|
+
TSI_X509_PEM_CERT_PROPERTY, contents, static_cast<size_t>(len), property);
|
341
341
|
BIO_free(bio);
|
342
342
|
return result;
|
343
343
|
}
|
@@ -345,13 +345,10 @@ static tsi_result add_pem_certificate(X509* cert, tsi_peer_property* property) {
|
|
345
345
|
/* Gets the subject SANs from an X509 cert as a tsi_peer_property. */
|
346
346
|
static tsi_result add_subject_alt_names_properties_to_peer(
|
347
347
|
tsi_peer* peer, GENERAL_NAMES* subject_alt_names,
|
348
|
-
size_t subject_alt_name_count) {
|
348
|
+
size_t subject_alt_name_count, int* current_insert_index) {
|
349
349
|
size_t i;
|
350
350
|
tsi_result result = TSI_OK;
|
351
351
|
|
352
|
-
/* Reset for DNS entries filtering. */
|
353
|
-
peer->property_count -= subject_alt_name_count;
|
354
|
-
|
355
352
|
for (i = 0; i < subject_alt_name_count; i++) {
|
356
353
|
GENERAL_NAME* subject_alt_name =
|
357
354
|
sk_GENERAL_NAME_value(subject_alt_names, TSI_SIZE_AS_SIZE(i));
|
@@ -376,7 +373,17 @@ static tsi_result add_subject_alt_names_properties_to_peer(
|
|
376
373
|
result = tsi_construct_string_peer_property(
|
377
374
|
TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY,
|
378
375
|
reinterpret_cast<const char*>(name), static_cast<size_t>(name_size),
|
379
|
-
&peer->properties[
|
376
|
+
&peer->properties[(*current_insert_index)++]);
|
377
|
+
if (result != TSI_OK) {
|
378
|
+
OPENSSL_free(name);
|
379
|
+
break;
|
380
|
+
}
|
381
|
+
if (subject_alt_name->type == GEN_URI) {
|
382
|
+
result = tsi_construct_string_peer_property(
|
383
|
+
TSI_X509_URI_PEER_PROPERTY, reinterpret_cast<const char*>(name),
|
384
|
+
static_cast<size_t>(name_size),
|
385
|
+
&peer->properties[(*current_insert_index)++]);
|
386
|
+
}
|
380
387
|
OPENSSL_free(name);
|
381
388
|
} else if (subject_alt_name->type == GEN_IPADD) {
|
382
389
|
char ntop_buf[INET6_ADDRSTRLEN];
|
@@ -401,7 +408,11 @@ static tsi_result add_subject_alt_names_properties_to_peer(
|
|
401
408
|
|
402
409
|
result = tsi_construct_string_peer_property_from_cstring(
|
403
410
|
TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY, name,
|
404
|
-
&peer->properties[
|
411
|
+
&peer->properties[(*current_insert_index)++]);
|
412
|
+
} else {
|
413
|
+
result = tsi_construct_string_peer_property_from_cstring(
|
414
|
+
TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY, "other types of SAN",
|
415
|
+
&peer->properties[(*current_insert_index)++]);
|
405
416
|
}
|
406
417
|
if (result != TSI_OK) break;
|
407
418
|
}
|
@@ -424,34 +435,45 @@ static tsi_result peer_from_x509(X509* cert, int include_certificate_type,
|
|
424
435
|
property_count = (include_certificate_type ? static_cast<size_t>(1) : 0) +
|
425
436
|
2 /* common name, certificate */ +
|
426
437
|
static_cast<size_t>(subject_alt_name_count);
|
438
|
+
for (int i = 0; i < subject_alt_name_count; i++) {
|
439
|
+
GENERAL_NAME* subject_alt_name =
|
440
|
+
sk_GENERAL_NAME_value(subject_alt_names, TSI_SIZE_AS_SIZE(i));
|
441
|
+
if (subject_alt_name->type == GEN_URI) {
|
442
|
+
property_count += 1;
|
443
|
+
}
|
444
|
+
}
|
427
445
|
result = tsi_construct_peer(property_count, peer);
|
428
446
|
if (result != TSI_OK) return result;
|
447
|
+
int current_insert_index = 0;
|
429
448
|
do {
|
430
449
|
if (include_certificate_type) {
|
431
450
|
result = tsi_construct_string_peer_property_from_cstring(
|
432
451
|
TSI_CERTIFICATE_TYPE_PEER_PROPERTY, TSI_X509_CERTIFICATE_TYPE,
|
433
|
-
&peer->properties[
|
452
|
+
&peer->properties[current_insert_index++]);
|
434
453
|
if (result != TSI_OK) break;
|
435
454
|
}
|
436
455
|
result = peer_property_from_x509_common_name(
|
437
|
-
cert, &peer->properties[
|
456
|
+
cert, &peer->properties[current_insert_index++]);
|
438
457
|
if (result != TSI_OK) break;
|
439
458
|
|
440
|
-
result =
|
441
|
-
cert, &peer->properties[
|
459
|
+
result =
|
460
|
+
add_pem_certificate(cert, &peer->properties[current_insert_index++]);
|
442
461
|
if (result != TSI_OK) break;
|
443
462
|
|
444
463
|
if (subject_alt_name_count != 0) {
|
445
464
|
result = add_subject_alt_names_properties_to_peer(
|
446
|
-
peer, subject_alt_names, static_cast<size_t>(subject_alt_name_count)
|
465
|
+
peer, subject_alt_names, static_cast<size_t>(subject_alt_name_count),
|
466
|
+
¤t_insert_index);
|
447
467
|
if (result != TSI_OK) break;
|
448
468
|
}
|
449
|
-
} while (
|
469
|
+
} while (false);
|
450
470
|
|
451
471
|
if (subject_alt_names != nullptr) {
|
452
472
|
sk_GENERAL_NAME_pop_free(subject_alt_names, GENERAL_NAME_free);
|
453
473
|
}
|
454
474
|
if (result != TSI_OK) tsi_peer_destruct(peer);
|
475
|
+
|
476
|
+
GPR_ASSERT((int)peer->property_count == current_insert_index);
|
455
477
|
return result;
|
456
478
|
}
|
457
479
|
|
@@ -528,12 +550,12 @@ static tsi_result ssl_ctx_use_certificate_chain(SSL_CTX* context,
|
|
528
550
|
X509* certificate = nullptr;
|
529
551
|
BIO* pem;
|
530
552
|
GPR_ASSERT(pem_cert_chain_size <= INT_MAX);
|
531
|
-
pem = BIO_new_mem_buf((
|
532
|
-
static_cast<int>(pem_cert_chain_size));
|
553
|
+
pem = BIO_new_mem_buf(pem_cert_chain, static_cast<int>(pem_cert_chain_size));
|
533
554
|
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;
|
534
555
|
|
535
556
|
do {
|
536
|
-
certificate =
|
557
|
+
certificate =
|
558
|
+
PEM_read_bio_X509_AUX(pem, nullptr, nullptr, const_cast<char*>(""));
|
537
559
|
if (certificate == nullptr) {
|
538
560
|
result = TSI_INVALID_ARGUMENT;
|
539
561
|
break;
|
@@ -542,9 +564,9 @@ static tsi_result ssl_ctx_use_certificate_chain(SSL_CTX* context,
|
|
542
564
|
result = TSI_INVALID_ARGUMENT;
|
543
565
|
break;
|
544
566
|
}
|
545
|
-
while (
|
567
|
+
while (true) {
|
546
568
|
X509* certificate_authority =
|
547
|
-
PEM_read_bio_X509(pem, nullptr, nullptr, (
|
569
|
+
PEM_read_bio_X509(pem, nullptr, nullptr, const_cast<char*>(""));
|
548
570
|
if (certificate_authority == nullptr) {
|
549
571
|
ERR_clear_error();
|
550
572
|
break; /* Done reading. */
|
@@ -559,14 +581,14 @@ static tsi_result ssl_ctx_use_certificate_chain(SSL_CTX* context,
|
|
559
581
|
though.
|
560
582
|
*/
|
561
583
|
}
|
562
|
-
} while (
|
584
|
+
} while (false);
|
563
585
|
|
564
586
|
if (certificate != nullptr) X509_free(certificate);
|
565
587
|
BIO_free(pem);
|
566
588
|
return result;
|
567
589
|
}
|
568
590
|
|
569
|
-
#
|
591
|
+
#if !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE)
|
570
592
|
static tsi_result ssl_ctx_use_engine_private_key(SSL_CTX* context,
|
571
593
|
const char* pem_key,
|
572
594
|
size_t pem_key_size) {
|
@@ -639,7 +661,7 @@ static tsi_result ssl_ctx_use_engine_private_key(SSL_CTX* context,
|
|
639
661
|
if (engine_name != nullptr) gpr_free(engine_name);
|
640
662
|
return result;
|
641
663
|
}
|
642
|
-
#endif /* OPENSSL_IS_BORINGSSL */
|
664
|
+
#endif /* !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE) */
|
643
665
|
|
644
666
|
static tsi_result ssl_ctx_use_pem_private_key(SSL_CTX* context,
|
645
667
|
const char* pem_key,
|
@@ -648,10 +670,11 @@ static tsi_result ssl_ctx_use_pem_private_key(SSL_CTX* context,
|
|
648
670
|
EVP_PKEY* private_key = nullptr;
|
649
671
|
BIO* pem;
|
650
672
|
GPR_ASSERT(pem_key_size <= INT_MAX);
|
651
|
-
pem = BIO_new_mem_buf(
|
673
|
+
pem = BIO_new_mem_buf(pem_key, static_cast<int>(pem_key_size));
|
652
674
|
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;
|
653
675
|
do {
|
654
|
-
private_key =
|
676
|
+
private_key =
|
677
|
+
PEM_read_bio_PrivateKey(pem, nullptr, nullptr, const_cast<char*>(""));
|
655
678
|
if (private_key == nullptr) {
|
656
679
|
result = TSI_INVALID_ARGUMENT;
|
657
680
|
break;
|
@@ -660,7 +683,7 @@ static tsi_result ssl_ctx_use_pem_private_key(SSL_CTX* context,
|
|
660
683
|
result = TSI_INVALID_ARGUMENT;
|
661
684
|
break;
|
662
685
|
}
|
663
|
-
} while (
|
686
|
+
} while (false);
|
664
687
|
if (private_key != nullptr) EVP_PKEY_free(private_key);
|
665
688
|
BIO_free(pem);
|
666
689
|
return result;
|
@@ -670,11 +693,11 @@ static tsi_result ssl_ctx_use_pem_private_key(SSL_CTX* context,
|
|
670
693
|
static tsi_result ssl_ctx_use_private_key(SSL_CTX* context, const char* pem_key,
|
671
694
|
size_t pem_key_size) {
|
672
695
|
// BoringSSL does not have ENGINE support
|
673
|
-
#
|
696
|
+
#if !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE)
|
674
697
|
if (strncmp(pem_key, kSslEnginePrefix, strlen(kSslEnginePrefix)) == 0) {
|
675
698
|
return ssl_ctx_use_engine_private_key(context, pem_key, pem_key_size);
|
676
699
|
} else
|
677
|
-
#endif /* OPENSSL_IS_BORINGSSL */
|
700
|
+
#endif /* !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE) */
|
678
701
|
{
|
679
702
|
return ssl_ctx_use_pem_private_key(context, pem_key, pem_key_size);
|
680
703
|
}
|
@@ -692,7 +715,7 @@ static tsi_result x509_store_load_certs(X509_STORE* cert_store,
|
|
692
715
|
X509_NAME* root_name = nullptr;
|
693
716
|
BIO* pem;
|
694
717
|
GPR_ASSERT(pem_roots_size <= INT_MAX);
|
695
|
-
pem = BIO_new_mem_buf(
|
718
|
+
pem = BIO_new_mem_buf(pem_roots, static_cast<int>(pem_roots_size));
|
696
719
|
if (cert_store == nullptr) return TSI_INVALID_ARGUMENT;
|
697
720
|
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;
|
698
721
|
if (root_names != nullptr) {
|
@@ -700,8 +723,8 @@ static tsi_result x509_store_load_certs(X509_STORE* cert_store,
|
|
700
723
|
if (*root_names == nullptr) return TSI_OUT_OF_RESOURCES;
|
701
724
|
}
|
702
725
|
|
703
|
-
while (
|
704
|
-
root = PEM_read_bio_X509_AUX(pem, nullptr, nullptr, (
|
726
|
+
while (true) {
|
727
|
+
root = PEM_read_bio_X509_AUX(pem, nullptr, nullptr, const_cast<char*>(""));
|
705
728
|
if (root == nullptr) {
|
706
729
|
ERR_clear_error();
|
707
730
|
break; /* We're at the end of stream. */
|
@@ -811,10 +834,10 @@ tsi_result tsi_ssl_extract_x509_subject_names_from_pem_cert(
|
|
811
834
|
tsi_result result = TSI_OK;
|
812
835
|
X509* cert = nullptr;
|
813
836
|
BIO* pem;
|
814
|
-
pem = BIO_new_mem_buf(
|
837
|
+
pem = BIO_new_mem_buf(pem_cert, static_cast<int>(strlen(pem_cert)));
|
815
838
|
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;
|
816
839
|
|
817
|
-
cert = PEM_read_bio_X509(pem, nullptr, nullptr, (
|
840
|
+
cert = PEM_read_bio_X509(pem, nullptr, nullptr, const_cast<char*>(""));
|
818
841
|
if (cert == nullptr) {
|
819
842
|
gpr_log(GPR_ERROR, "Invalid certificate");
|
820
843
|
result = TSI_INVALID_ARGUMENT;
|
@@ -872,6 +895,61 @@ static int NullVerifyCallback(int /*preverify_ok*/, X509_STORE_CTX* /*ctx*/) {
|
|
872
895
|
return 1;
|
873
896
|
}
|
874
897
|
|
898
|
+
// Sets the min and max TLS version of |ssl_context| to |min_tls_version| and
|
899
|
+
// |max_tls_version|, respectively. Calling this method is a no-op when using
|
900
|
+
// OpenSSL versions < 1.1.
|
901
|
+
static tsi_result tsi_set_min_and_max_tls_versions(
|
902
|
+
SSL_CTX* ssl_context, tsi_tls_version min_tls_version,
|
903
|
+
tsi_tls_version max_tls_version) {
|
904
|
+
if (ssl_context == nullptr) {
|
905
|
+
gpr_log(GPR_INFO,
|
906
|
+
"Invalid nullptr argument to |tsi_set_min_and_max_tls_versions|.");
|
907
|
+
return TSI_INVALID_ARGUMENT;
|
908
|
+
}
|
909
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10100000
|
910
|
+
// Set the min TLS version of the SSL context if using OpenSSL version
|
911
|
+
// >= 1.1.0. This OpenSSL version is required because the
|
912
|
+
// |SSL_CTX_set_min_proto_version| and |SSL_CTX_set_max_proto_version| APIs
|
913
|
+
// only exist in this version range.
|
914
|
+
switch (min_tls_version) {
|
915
|
+
case tsi_tls_version::TSI_TLS1_2:
|
916
|
+
SSL_CTX_set_min_proto_version(ssl_context, TLS1_2_VERSION);
|
917
|
+
break;
|
918
|
+
#if defined(TLS1_3_VERSION)
|
919
|
+
// If the library does not support TLS 1.3 and the caller requests a minimum
|
920
|
+
// of TLS 1.3, then return an error because the caller's request cannot be
|
921
|
+
// satisfied.
|
922
|
+
case tsi_tls_version::TSI_TLS1_3:
|
923
|
+
SSL_CTX_set_min_proto_version(ssl_context, TLS1_3_VERSION);
|
924
|
+
break;
|
925
|
+
#endif
|
926
|
+
default:
|
927
|
+
gpr_log(GPR_INFO, "TLS version is not supported.");
|
928
|
+
return TSI_FAILED_PRECONDITION;
|
929
|
+
}
|
930
|
+
|
931
|
+
// Set the max TLS version of the SSL context.
|
932
|
+
switch (max_tls_version) {
|
933
|
+
case tsi_tls_version::TSI_TLS1_2:
|
934
|
+
SSL_CTX_set_max_proto_version(ssl_context, TLS1_2_VERSION);
|
935
|
+
break;
|
936
|
+
case tsi_tls_version::TSI_TLS1_3:
|
937
|
+
#if defined(TLS1_3_VERSION)
|
938
|
+
SSL_CTX_set_max_proto_version(ssl_context, TLS1_3_VERSION);
|
939
|
+
#else
|
940
|
+
// If the library does not support TLS 1.3, then set the max TLS version
|
941
|
+
// to TLS 1.2 instead.
|
942
|
+
SSL_CTX_set_max_proto_version(ssl_context, TLS1_2_VERSION);
|
943
|
+
#endif
|
944
|
+
break;
|
945
|
+
default:
|
946
|
+
gpr_log(GPR_INFO, "TLS version is not supported.");
|
947
|
+
return TSI_FAILED_PRECONDITION;
|
948
|
+
}
|
949
|
+
#endif
|
950
|
+
return TSI_OK;
|
951
|
+
}
|
952
|
+
|
875
953
|
/* --- tsi_ssl_root_certs_store methods implementation. ---*/
|
876
954
|
|
877
955
|
tsi_ssl_root_certs_store* tsi_ssl_root_certs_store_create(
|
@@ -1080,11 +1158,11 @@ static const tsi_frame_protector_vtable frame_protector_vtable = {
|
|
1080
1158
|
/* --- tsi_server_handshaker_factory methods implementation. --- */
|
1081
1159
|
|
1082
1160
|
static void tsi_ssl_handshaker_factory_destroy(
|
1083
|
-
tsi_ssl_handshaker_factory*
|
1084
|
-
if (
|
1161
|
+
tsi_ssl_handshaker_factory* factory) {
|
1162
|
+
if (factory == nullptr) return;
|
1085
1163
|
|
1086
|
-
if (
|
1087
|
-
|
1164
|
+
if (factory->vtable != nullptr && factory->vtable->destroy != nullptr) {
|
1165
|
+
factory->vtable->destroy(factory);
|
1088
1166
|
}
|
1089
1167
|
/* Note, we don't free(self) here because this object is always directly
|
1090
1168
|
* embedded in another object. If tsi_ssl_handshaker_factory_init allocates
|
@@ -1092,17 +1170,18 @@ static void tsi_ssl_handshaker_factory_destroy(
|
|
1092
1170
|
}
|
1093
1171
|
|
1094
1172
|
static tsi_ssl_handshaker_factory* tsi_ssl_handshaker_factory_ref(
|
1095
|
-
tsi_ssl_handshaker_factory*
|
1096
|
-
if (
|
1097
|
-
gpr_refn(&
|
1098
|
-
return
|
1173
|
+
tsi_ssl_handshaker_factory* factory) {
|
1174
|
+
if (factory == nullptr) return nullptr;
|
1175
|
+
gpr_refn(&factory->refcount, 1);
|
1176
|
+
return factory;
|
1099
1177
|
}
|
1100
1178
|
|
1101
|
-
static void tsi_ssl_handshaker_factory_unref(
|
1102
|
-
|
1179
|
+
static void tsi_ssl_handshaker_factory_unref(
|
1180
|
+
tsi_ssl_handshaker_factory* factory) {
|
1181
|
+
if (factory == nullptr) return;
|
1103
1182
|
|
1104
|
-
if (gpr_unref(&
|
1105
|
-
tsi_ssl_handshaker_factory_destroy(
|
1183
|
+
if (gpr_unref(&factory->refcount)) {
|
1184
|
+
tsi_ssl_handshaker_factory_destroy(factory);
|
1106
1185
|
}
|
1107
1186
|
}
|
1108
1187
|
|
@@ -1136,8 +1215,8 @@ tsi_result tsi_ssl_get_cert_chain_contents(STACK_OF(X509) * peer_chain,
|
|
1136
1215
|
return TSI_INTERNAL_ERROR;
|
1137
1216
|
}
|
1138
1217
|
tsi_result result = tsi_construct_string_peer_property(
|
1139
|
-
TSI_X509_PEM_CERT_CHAIN_PROPERTY, (
|
1140
|
-
|
1218
|
+
TSI_X509_PEM_CERT_CHAIN_PROPERTY, contents, static_cast<size_t>(len),
|
1219
|
+
property);
|
1141
1220
|
BIO_free(bio);
|
1142
1221
|
return result;
|
1143
1222
|
}
|
@@ -1283,7 +1362,7 @@ static const tsi_handshaker_result_vtable handshaker_result_vtable = {
|
|
1283
1362
|
};
|
1284
1363
|
|
1285
1364
|
static tsi_result ssl_handshaker_result_create(
|
1286
|
-
tsi_ssl_handshaker* handshaker,
|
1365
|
+
tsi_ssl_handshaker* handshaker, unsigned char* unused_bytes,
|
1287
1366
|
size_t unused_bytes_size, tsi_handshaker_result** handshaker_result) {
|
1288
1367
|
if (handshaker == nullptr || handshaker_result == nullptr ||
|
1289
1368
|
(unused_bytes_size > 0 && unused_bytes == nullptr)) {
|
@@ -1297,11 +1376,8 @@ static tsi_result ssl_handshaker_result_create(
|
|
1297
1376
|
handshaker->ssl = nullptr;
|
1298
1377
|
result->network_io = handshaker->network_io;
|
1299
1378
|
handshaker->network_io = nullptr;
|
1300
|
-
|
1301
|
-
|
1302
|
-
static_cast<unsigned char*>(gpr_malloc(unused_bytes_size));
|
1303
|
-
memcpy(result->unused_bytes, unused_bytes, unused_bytes_size);
|
1304
|
-
}
|
1379
|
+
/* Transfer ownership of |unused_bytes| to the handshaker result. */
|
1380
|
+
result->unused_bytes = unused_bytes;
|
1305
1381
|
result->unused_bytes_size = unused_bytes_size;
|
1306
1382
|
*handshaker_result = &result->base;
|
1307
1383
|
return TSI_OK;
|
@@ -1394,6 +1470,36 @@ static void ssl_handshaker_destroy(tsi_handshaker* self) {
|
|
1394
1470
|
gpr_free(impl);
|
1395
1471
|
}
|
1396
1472
|
|
1473
|
+
// Removes the bytes remaining in |impl->SSL|'s read BIO and writes them to
|
1474
|
+
// |bytes_remaining|.
|
1475
|
+
static tsi_result ssl_bytes_remaining(tsi_ssl_handshaker* impl,
|
1476
|
+
unsigned char** bytes_remaining,
|
1477
|
+
size_t* bytes_remaining_size) {
|
1478
|
+
if (impl == nullptr || bytes_remaining == nullptr ||
|
1479
|
+
bytes_remaining_size == nullptr) {
|
1480
|
+
return TSI_INVALID_ARGUMENT;
|
1481
|
+
}
|
1482
|
+
// Atempt to read all of the bytes in SSL's read BIO. These bytes should
|
1483
|
+
// contain application data records that were appended to a handshake record
|
1484
|
+
// containing the ClientFinished or ServerFinished message.
|
1485
|
+
size_t bytes_in_ssl = BIO_pending(SSL_get_rbio(impl->ssl));
|
1486
|
+
if (bytes_in_ssl == 0) return TSI_OK;
|
1487
|
+
*bytes_remaining = static_cast<uint8_t*>(gpr_malloc(bytes_in_ssl));
|
1488
|
+
int bytes_read = BIO_read(SSL_get_rbio(impl->ssl), *bytes_remaining,
|
1489
|
+
static_cast<int>(bytes_in_ssl));
|
1490
|
+
// If an unexpected number of bytes were read, return an error status and free
|
1491
|
+
// all of the bytes that were read.
|
1492
|
+
if (bytes_read < 0 || static_cast<size_t>(bytes_read) != bytes_in_ssl) {
|
1493
|
+
gpr_log(GPR_ERROR,
|
1494
|
+
"Failed to read the expected number of bytes from SSL object.");
|
1495
|
+
gpr_free(*bytes_remaining);
|
1496
|
+
*bytes_remaining = nullptr;
|
1497
|
+
return TSI_INTERNAL_ERROR;
|
1498
|
+
}
|
1499
|
+
*bytes_remaining_size = static_cast<size_t>(bytes_read);
|
1500
|
+
return TSI_OK;
|
1501
|
+
}
|
1502
|
+
|
1397
1503
|
static tsi_result ssl_handshaker_next(
|
1398
1504
|
tsi_handshaker* self, const unsigned char* received_bytes,
|
1399
1505
|
size_t received_bytes_size, const unsigned char** bytes_to_send,
|
@@ -1434,9 +1540,19 @@ static tsi_result ssl_handshaker_next(
|
|
1434
1540
|
if (ssl_handshaker_get_result(impl) == TSI_HANDSHAKE_IN_PROGRESS) {
|
1435
1541
|
*handshaker_result = nullptr;
|
1436
1542
|
} else {
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1543
|
+
// Any bytes that remain in |impl->ssl|'s read BIO after the handshake is
|
1544
|
+
// complete must be extracted and set to the unused bytes of the handshaker
|
1545
|
+
// result. This indicates to the gRPC stack that there are bytes from the
|
1546
|
+
// peer that must be processed.
|
1547
|
+
unsigned char* unused_bytes = nullptr;
|
1548
|
+
size_t unused_bytes_size = 0;
|
1549
|
+
status = ssl_bytes_remaining(impl, &unused_bytes, &unused_bytes_size);
|
1550
|
+
if (status != TSI_OK) return status;
|
1551
|
+
if (unused_bytes_size > received_bytes_size) {
|
1552
|
+
gpr_log(GPR_ERROR, "More unused bytes than received bytes.");
|
1553
|
+
gpr_free(unused_bytes);
|
1554
|
+
return TSI_INTERNAL_ERROR;
|
1555
|
+
}
|
1440
1556
|
status = ssl_handshaker_result_create(impl, unused_bytes, unused_bytes_size,
|
1441
1557
|
handshaker_result);
|
1442
1558
|
if (status == TSI_OK) {
|
@@ -1575,16 +1691,17 @@ static int select_protocol_list(const unsigned char** out,
|
|
1575
1691
|
/* --- tsi_ssl_client_handshaker_factory methods implementation. --- */
|
1576
1692
|
|
1577
1693
|
tsi_result tsi_ssl_client_handshaker_factory_create_handshaker(
|
1578
|
-
tsi_ssl_client_handshaker_factory*
|
1579
|
-
tsi_handshaker** handshaker) {
|
1580
|
-
return create_tsi_ssl_handshaker(
|
1581
|
-
&
|
1694
|
+
tsi_ssl_client_handshaker_factory* factory,
|
1695
|
+
const char* server_name_indication, tsi_handshaker** handshaker) {
|
1696
|
+
return create_tsi_ssl_handshaker(factory->ssl_context, 1,
|
1697
|
+
server_name_indication, &factory->base,
|
1698
|
+
handshaker);
|
1582
1699
|
}
|
1583
1700
|
|
1584
1701
|
void tsi_ssl_client_handshaker_factory_unref(
|
1585
|
-
tsi_ssl_client_handshaker_factory*
|
1586
|
-
if (
|
1587
|
-
tsi_ssl_handshaker_factory_unref(&
|
1702
|
+
tsi_ssl_client_handshaker_factory* factory) {
|
1703
|
+
if (factory == nullptr) return;
|
1704
|
+
tsi_ssl_handshaker_factory_unref(&factory->base);
|
1588
1705
|
}
|
1589
1706
|
|
1590
1707
|
static void tsi_ssl_client_handshaker_factory_destroy(
|
@@ -1603,7 +1720,7 @@ static int client_handshaker_factory_npn_callback(
|
|
1603
1720
|
const unsigned char* in, unsigned int inlen, void* arg) {
|
1604
1721
|
tsi_ssl_client_handshaker_factory* factory =
|
1605
1722
|
static_cast<tsi_ssl_client_handshaker_factory*>(arg);
|
1606
|
-
return select_protocol_list(
|
1723
|
+
return select_protocol_list(const_cast<const unsigned char**>(out), outlen,
|
1607
1724
|
factory->alpn_protocol_list,
|
1608
1725
|
factory->alpn_protocol_list_length, in, inlen);
|
1609
1726
|
}
|
@@ -1611,18 +1728,18 @@ static int client_handshaker_factory_npn_callback(
|
|
1611
1728
|
/* --- tsi_ssl_server_handshaker_factory methods implementation. --- */
|
1612
1729
|
|
1613
1730
|
tsi_result tsi_ssl_server_handshaker_factory_create_handshaker(
|
1614
|
-
tsi_ssl_server_handshaker_factory*
|
1615
|
-
if (
|
1731
|
+
tsi_ssl_server_handshaker_factory* factory, tsi_handshaker** handshaker) {
|
1732
|
+
if (factory->ssl_context_count == 0) return TSI_INVALID_ARGUMENT;
|
1616
1733
|
/* Create the handshaker with the first context. We will switch if needed
|
1617
1734
|
because of SNI in ssl_server_handshaker_factory_servername_callback. */
|
1618
|
-
return create_tsi_ssl_handshaker(
|
1619
|
-
&
|
1735
|
+
return create_tsi_ssl_handshaker(factory->ssl_contexts[0], 0, nullptr,
|
1736
|
+
&factory->base, handshaker);
|
1620
1737
|
}
|
1621
1738
|
|
1622
1739
|
void tsi_ssl_server_handshaker_factory_unref(
|
1623
|
-
tsi_ssl_server_handshaker_factory*
|
1624
|
-
if (
|
1625
|
-
tsi_ssl_handshaker_factory_unref(&
|
1740
|
+
tsi_ssl_server_handshaker_factory* factory) {
|
1741
|
+
if (factory == nullptr) return;
|
1742
|
+
tsi_ssl_handshaker_factory_unref(&factory->base);
|
1626
1743
|
}
|
1627
1744
|
|
1628
1745
|
static void tsi_ssl_server_handshaker_factory_destroy(
|
@@ -1645,8 +1762,8 @@ static void tsi_ssl_server_handshaker_factory_destroy(
|
|
1645
1762
|
gpr_free(self);
|
1646
1763
|
}
|
1647
1764
|
|
1648
|
-
static int does_entry_match_name(
|
1649
|
-
|
1765
|
+
static int does_entry_match_name(absl::string_view entry,
|
1766
|
+
absl::string_view name) {
|
1650
1767
|
if (entry.empty()) return 0;
|
1651
1768
|
|
1652
1769
|
/* Take care of '.' terminations. */
|
@@ -1658,7 +1775,7 @@ static int does_entry_match_name(grpc_core::StringView entry,
|
|
1658
1775
|
if (entry.empty()) return 0;
|
1659
1776
|
}
|
1660
1777
|
|
1661
|
-
if (name
|
1778
|
+
if (absl::EqualsIgnoreCase(name, entry)) {
|
1662
1779
|
return 1; /* Perfect match. */
|
1663
1780
|
}
|
1664
1781
|
if (entry.front() != '*') return 0;
|
@@ -1669,23 +1786,21 @@ static int does_entry_match_name(grpc_core::StringView entry,
|
|
1669
1786
|
return 0;
|
1670
1787
|
}
|
1671
1788
|
size_t name_subdomain_pos = name.find('.');
|
1672
|
-
if (name_subdomain_pos ==
|
1789
|
+
if (name_subdomain_pos == absl::string_view::npos) return 0;
|
1673
1790
|
if (name_subdomain_pos >= name.size() - 2) return 0;
|
1674
|
-
|
1791
|
+
absl::string_view name_subdomain =
|
1675
1792
|
name.substr(name_subdomain_pos + 1); /* Starts after the dot. */
|
1676
1793
|
entry.remove_prefix(2); /* Remove *. */
|
1677
1794
|
size_t dot = name_subdomain.find('.');
|
1678
|
-
if (dot ==
|
1679
|
-
grpc_core::UniquePtr<char> name_subdomain_cstr(
|
1680
|
-
grpc_core::StringViewToCString(name_subdomain));
|
1795
|
+
if (dot == absl::string_view::npos || dot == name_subdomain.size() - 1) {
|
1681
1796
|
gpr_log(GPR_ERROR, "Invalid toplevel subdomain: %s",
|
1682
|
-
|
1797
|
+
std::string(name_subdomain).c_str());
|
1683
1798
|
return 0;
|
1684
1799
|
}
|
1685
1800
|
if (name_subdomain.back() == '.') {
|
1686
1801
|
name_subdomain.remove_suffix(1);
|
1687
1802
|
}
|
1688
|
-
return !entry.empty() && name_subdomain
|
1803
|
+
return !entry.empty() && absl::EqualsIgnoreCase(name_subdomain, entry);
|
1689
1804
|
}
|
1690
1805
|
|
1691
1806
|
static int ssl_server_handshaker_factory_servername_callback(SSL* ssl,
|
@@ -1707,7 +1822,7 @@ static int ssl_server_handshaker_factory_servername_callback(SSL* ssl,
|
|
1707
1822
|
}
|
1708
1823
|
}
|
1709
1824
|
gpr_log(GPR_ERROR, "No match found for server name: %s.", servername);
|
1710
|
-
return
|
1825
|
+
return SSL_TLSEXT_ERR_NOACK;
|
1711
1826
|
}
|
1712
1827
|
|
1713
1828
|
#if TSI_OPENSSL_ALPN_SUPPORT
|
@@ -1791,11 +1906,14 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options(
|
|
1791
1906
|
return TSI_INVALID_ARGUMENT;
|
1792
1907
|
}
|
1793
1908
|
|
1794
|
-
#if
|
1909
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10100000
|
1795
1910
|
ssl_context = SSL_CTX_new(TLS_method());
|
1796
1911
|
#else
|
1797
1912
|
ssl_context = SSL_CTX_new(TLSv1_2_method());
|
1798
1913
|
#endif
|
1914
|
+
result = tsi_set_min_and_max_tls_versions(
|
1915
|
+
ssl_context, options->min_tls_version, options->max_tls_version);
|
1916
|
+
if (result != TSI_OK) return result;
|
1799
1917
|
if (ssl_context == nullptr) {
|
1800
1918
|
gpr_log(GPR_ERROR, "Could not create ssl context.");
|
1801
1919
|
return TSI_INVALID_ARGUMENT;
|
@@ -1861,7 +1979,7 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options(
|
|
1861
1979
|
SSL_CTX_set_next_proto_select_cb(
|
1862
1980
|
ssl_context, client_handshaker_factory_npn_callback, impl);
|
1863
1981
|
}
|
1864
|
-
} while (
|
1982
|
+
} while (false);
|
1865
1983
|
if (result != TSI_OK) {
|
1866
1984
|
tsi_ssl_handshaker_factory_unref(&impl->base);
|
1867
1985
|
return result;
|
@@ -1955,11 +2073,15 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options(
|
|
1955
2073
|
|
1956
2074
|
for (i = 0; i < options->num_key_cert_pairs; i++) {
|
1957
2075
|
do {
|
1958
|
-
#if
|
2076
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10100000
|
1959
2077
|
impl->ssl_contexts[i] = SSL_CTX_new(TLS_method());
|
1960
2078
|
#else
|
1961
2079
|
impl->ssl_contexts[i] = SSL_CTX_new(TLSv1_2_method());
|
1962
2080
|
#endif
|
2081
|
+
result = tsi_set_min_and_max_tls_versions(impl->ssl_contexts[i],
|
2082
|
+
options->min_tls_version,
|
2083
|
+
options->max_tls_version);
|
2084
|
+
if (result != TSI_OK) return result;
|
1963
2085
|
if (impl->ssl_contexts[i] == nullptr) {
|
1964
2086
|
gpr_log(GPR_ERROR, "Could not create ssl context.");
|
1965
2087
|
result = TSI_OUT_OF_RESOURCES;
|
@@ -2044,7 +2166,7 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options(
|
|
2044
2166
|
SSL_CTX_set_next_protos_advertised_cb(
|
2045
2167
|
impl->ssl_contexts[i],
|
2046
2168
|
server_handshaker_factory_npn_advertised_callback, impl);
|
2047
|
-
} while (
|
2169
|
+
} while (false);
|
2048
2170
|
|
2049
2171
|
if (result != TSI_OK) {
|
2050
2172
|
tsi_ssl_handshaker_factory_unref(&impl->base);
|
@@ -2058,8 +2180,7 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options(
|
|
2058
2180
|
|
2059
2181
|
/* --- tsi_ssl utils. --- */
|
2060
2182
|
|
2061
|
-
int tsi_ssl_peer_matches_name(const tsi_peer* peer,
|
2062
|
-
grpc_core::StringView name) {
|
2183
|
+
int tsi_ssl_peer_matches_name(const tsi_peer* peer, absl::string_view name) {
|
2063
2184
|
size_t i = 0;
|
2064
2185
|
size_t san_count = 0;
|
2065
2186
|
const tsi_peer_property* cn_property = nullptr;
|
@@ -2073,7 +2194,7 @@ int tsi_ssl_peer_matches_name(const tsi_peer* peer,
|
|
2073
2194
|
TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY) == 0) {
|
2074
2195
|
san_count++;
|
2075
2196
|
|
2076
|
-
|
2197
|
+
absl::string_view entry(property->value.data, property->value.length);
|
2077
2198
|
if (!like_ip && does_entry_match_name(entry, name)) {
|
2078
2199
|
return 1;
|
2079
2200
|
} else if (like_ip && name == entry) {
|
@@ -2088,8 +2209,8 @@ int tsi_ssl_peer_matches_name(const tsi_peer* peer,
|
|
2088
2209
|
|
2089
2210
|
/* If there's no SAN, try the CN, but only if its not like an IP Address */
|
2090
2211
|
if (san_count == 0 && cn_property != nullptr && !like_ip) {
|
2091
|
-
if (does_entry_match_name(
|
2092
|
-
|
2212
|
+
if (does_entry_match_name(absl::string_view(cn_property->value.data,
|
2213
|
+
cn_property->value.length),
|
2093
2214
|
name)) {
|
2094
2215
|
return 1;
|
2095
2216
|
}
|