grpc 1.30.2 → 1.31.0.pre1
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 +560 -619
- data/include/grpc/grpc_security_constants.h +3 -0
- data/include/grpc/impl/codegen/grpc_types.h +7 -5
- data/include/grpc/impl/codegen/port_platform.h +0 -32
- data/src/core/ext/filters/client_channel/backend_metric.cc +12 -9
- data/src/core/ext/filters/client_channel/client_channel.cc +406 -265
- data/src/core/ext/filters/client_channel/config_selector.cc +62 -0
- data/src/core/ext/filters/client_channel/config_selector.h +93 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +24 -2
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +2 -0
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +6 -5
- data/src/core/ext/filters/client_channel/http_proxy.cc +6 -4
- data/src/core/ext/filters/client_channel/lb_policy.h +2 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +39 -23
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +4 -6
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc +376 -68
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +4 -5
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +5 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +6 -5
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +8 -6
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +9 -7
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +7 -5
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +33 -48
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +6 -2
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +21 -18
- data/src/core/ext/filters/client_channel/resolver_registry.cc +13 -14
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +6 -7
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +33 -28
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +39 -20
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +142 -0
- data/src/core/ext/filters/client_channel/subchannel.cc +1 -1
- data/src/core/ext/filters/client_channel/xds/xds_api.cc +327 -123
- data/src/core/ext/filters/client_channel/xds/xds_api.h +72 -7
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +12 -23
- data/src/core/ext/filters/client_channel/xds/xds_client.cc +112 -33
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +10 -10
- data/src/core/ext/filters/http/client/http_client_filter.cc +5 -5
- data/src/core/ext/filters/http/http_filters_plugin.cc +2 -1
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +74 -33
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.h +3 -1
- data/src/core/ext/filters/message_size/message_size_filter.cc +56 -80
- data/src/core/ext/filters/message_size/message_size_filter.h +6 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +383 -347
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +6 -2
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +1 -1
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +7 -13
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +7 -8
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +19 -4
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +22 -27
- data/src/core/ext/transport/chttp2/transport/flow_control.h +14 -16
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +9 -12
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +4 -6
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +5 -6
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +12 -13
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +6 -7
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +9 -12
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +25 -29
- data/src/core/ext/transport/chttp2/transport/hpack_table.cc +13 -17
- data/src/core/ext/transport/chttp2/transport/internal.h +13 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +33 -43
- data/src/core/ext/transport/chttp2/transport/writing.cc +9 -14
- data/src/core/ext/transport/inproc/inproc_transport.cc +35 -15
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +0 -1
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +3 -4
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h +80 -69
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h +24 -23
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h +66 -56
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +1 -2
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +2 -2
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +317 -311
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +42 -34
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +7 -7
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +79 -61
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +55 -49
- data/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h +9 -8
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +1 -1
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +163 -169
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +51 -45
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h +4 -5
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +107 -100
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +137 -117
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +9 -9
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +105 -87
- data/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h +12 -13
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +1 -1
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +95 -101
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +1 -2
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +1 -1
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +49 -65
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +49 -42
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +70 -62
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +1 -2
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +81 -65
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +1 -1
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +91 -80
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +9 -10
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +1 -2
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +36 -31
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +7 -7
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +648 -696
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +16 -15
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +1 -2
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +1 -1
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +95 -88
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +234 -199
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +5 -5
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h +13 -13
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +1 -2
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +20 -18
- data/src/core/ext/upb-generated/envoy/type/http.upb.h +0 -1
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +18 -17
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +14 -14
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +23 -23
- data/src/core/ext/upb-generated/envoy/type/percent.upb.h +8 -9
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +15 -16
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +7 -8
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +36 -35
- data/src/core/ext/upb-generated/gogoproto/gogo.upb.h +0 -1
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +0 -1
- data/src/core/ext/upb-generated/google/api/http.upb.h +29 -28
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +5 -6
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +3 -3
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +412 -386
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +5 -6
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +1 -2
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +33 -54
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +5 -6
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +27 -28
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +8 -8
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +1 -1
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +32 -45
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +4 -4
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +157 -178
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +14 -13
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +6 -7
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +59 -56
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +11 -12
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +0 -1
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +5 -6
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +6 -6
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +41 -68
- data/src/core/ext/upb-generated/validate/validate.upb.h +536 -535
- data/src/core/lib/channel/channel_trace.cc +2 -6
- data/src/core/lib/channel/channelz.cc +5 -15
- data/src/core/lib/gpr/log_linux.cc +6 -8
- data/src/core/lib/gpr/log_posix.cc +6 -8
- data/src/core/lib/gpr/string.cc +10 -9
- data/src/core/lib/gpr/string.h +4 -2
- data/src/core/lib/gprpp/global_config_env.cc +8 -6
- data/src/core/lib/http/httpcli.cc +13 -10
- data/src/core/lib/http/httpcli_security_connector.cc +5 -5
- data/src/core/lib/iomgr/cfstream_handle.cc +1 -0
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +10 -10
- data/src/core/lib/iomgr/error_cfstream.cc +9 -8
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +5 -6
- data/src/core/lib/iomgr/ev_epollex_linux.cc +15 -21
- data/src/core/lib/iomgr/ev_poll_posix.cc +6 -5
- data/src/core/lib/iomgr/ev_posix.cc +2 -0
- data/src/core/lib/iomgr/iomgr.cc +10 -0
- data/src/core/lib/iomgr/iomgr.h +10 -0
- data/src/core/lib/iomgr/is_epollexclusive_available.cc +14 -0
- data/src/core/lib/iomgr/port.h +1 -21
- data/src/core/lib/iomgr/resolve_address_custom.cc +13 -18
- data/src/core/lib/iomgr/resolve_address_windows.cc +8 -8
- data/src/core/lib/iomgr/resource_quota.cc +34 -31
- data/src/core/lib/iomgr/sockaddr_utils.cc +7 -5
- data/src/core/lib/iomgr/sockaddr_utils.h +1 -1
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +95 -55
- data/src/core/lib/iomgr/socket_windows.cc +4 -5
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +9 -11
- data/src/core/lib/iomgr/tcp_client_custom.cc +6 -9
- data/src/core/lib/iomgr/tcp_client_posix.cc +27 -36
- data/src/core/lib/iomgr/tcp_client_windows.cc +9 -9
- data/src/core/lib/iomgr/tcp_custom.cc +1 -1
- data/src/core/lib/iomgr/tcp_custom.h +1 -1
- 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 +6 -14
- data/src/core/lib/iomgr/tcp_server_posix.cc +34 -41
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +3 -4
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +5 -7
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +4 -9
- data/src/core/lib/iomgr/tcp_server_windows.cc +16 -16
- data/src/core/lib/iomgr/timer_generic.cc +13 -12
- data/src/core/lib/iomgr/udp_server.cc +24 -23
- data/src/core/lib/iomgr/udp_server.h +5 -2
- data/src/core/lib/iomgr/unix_sockets_posix.cc +9 -14
- data/src/core/lib/iomgr/unix_sockets_posix.h +3 -1
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +5 -2
- data/src/core/lib/json/json_reader.cc +20 -21
- data/src/core/lib/security/credentials/credentials.h +5 -3
- 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 +12 -9
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +7 -4
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +19 -28
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +6 -6
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +20 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +10 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +10 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +10 -10
- data/src/core/lib/security/security_connector/security_connector.cc +2 -0
- data/src/core/lib/security/security_connector/security_connector.h +1 -1
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +18 -11
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +5 -0
- data/src/core/lib/security/security_connector/ssl_utils.cc +44 -23
- data/src/core/lib/security/security_connector/ssl_utils.h +6 -2
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +27 -24
- data/src/core/lib/security/transport/client_auth_filter.cc +10 -9
- data/src/core/lib/security/util/json_util.cc +12 -13
- data/src/core/lib/slice/slice.cc +38 -1
- data/src/core/lib/slice/slice_internal.h +1 -0
- data/src/core/lib/surface/call.cc +40 -41
- data/src/core/lib/surface/completion_queue.cc +271 -14
- data/src/core/lib/surface/completion_queue.h +8 -0
- data/src/core/lib/surface/init.cc +2 -0
- data/src/core/lib/surface/server.cc +565 -632
- data/src/core/lib/surface/server.h +34 -12
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/transport.h +6 -0
- data/src/core/lib/uri/uri_parser.cc +8 -15
- data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +23 -13
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +2 -0
- data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +2 -0
- data/src/core/tsi/ssl_transport_security.cc +102 -11
- data/src/core/tsi/ssl_transport_security.h +14 -2
- data/src/core/tsi/transport_security_interface.h +5 -0
- data/src/ruby/ext/grpc/extconf.rb +5 -2
- data/src/ruby/ext/grpc/rb_call.c +3 -2
- data/src/ruby/ext/grpc/rb_call.h +4 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +54 -10
- data/src/ruby/lib/grpc/generic/interceptors.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/boringssl-with-bazel/err_data.c +89 -83
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_enum.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.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 +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +1 -1
- 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/cipher_extra/tls_cbc.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/hash_to_curve.c +12 -52
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/internal.h +0 -22
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +143 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.c +17 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +11 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.c +13 -11
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64.c +24 -23
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256.c +20 -16
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/util.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +62 -0
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +29 -15
- 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/trust_token/internal.h +0 -29
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +116 -363
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +7 -45
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_strex.c +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +8 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c +4 -4
- 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 +13 -6
- 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 +41 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +4 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +28 -9
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +25 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +35 -13
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c +0 -154
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +28 -6
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +5 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +74 -35
- data/third_party/boringssl-with-bazel/src/include/openssl/aes.h +16 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +22 -22
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +69 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +33 -16
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +1 -10
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +789 -715
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +3 -3
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +9 -2
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +9 -0
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +17 -14
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +7 -7
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +28 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +4 -24
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +5 -5
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +45 -24
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +31 -21
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +12 -9
- data/third_party/upb/upb/decode.c +467 -504
- data/third_party/upb/upb/encode.c +163 -121
- data/third_party/upb/upb/msg.c +130 -64
- data/third_party/upb/upb/msg.h +418 -14
- data/third_party/upb/upb/port_def.inc +35 -6
- data/third_party/upb/upb/port_undef.inc +8 -1
- data/third_party/upb/upb/table.c +53 -75
- data/third_party/upb/upb/table.int.h +11 -43
- data/third_party/upb/upb/upb.c +148 -124
- data/third_party/upb/upb/upb.h +65 -147
- data/third_party/upb/upb/upb.hpp +86 -0
- metadata +40 -37
- data/third_party/upb/upb/generated_util.h +0 -105
@@ -27,6 +27,10 @@
|
|
27
27
|
#include <inttypes.h>
|
28
28
|
#include <io.h>
|
29
29
|
|
30
|
+
#include <vector>
|
31
|
+
|
32
|
+
#include "absl/strings/str_cat.h"
|
33
|
+
|
30
34
|
#include <grpc/support/alloc.h>
|
31
35
|
#include <grpc/support/log.h>
|
32
36
|
#include <grpc/support/log_windows.h>
|
@@ -42,6 +46,7 @@
|
|
42
46
|
#include "src/core/lib/iomgr/socket_windows.h"
|
43
47
|
#include "src/core/lib/iomgr/tcp_server.h"
|
44
48
|
#include "src/core/lib/iomgr/tcp_windows.h"
|
49
|
+
#include "src/core/lib/slice/slice_internal.h"
|
45
50
|
|
46
51
|
#define MIN_SAFE_ACCEPT_QUEUE_SIZE 100
|
47
52
|
|
@@ -222,14 +227,13 @@ static grpc_error* prepare_socket(SOCKET sock,
|
|
222
227
|
|
223
228
|
failure:
|
224
229
|
GPR_ASSERT(error != GRPC_ERROR_NONE);
|
225
|
-
char* tgtaddr = grpc_sockaddr_to_uri(addr);
|
226
230
|
grpc_error_set_int(
|
227
|
-
grpc_error_set_str(
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
+
grpc_error_set_str(
|
232
|
+
GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
|
233
|
+
"Failed to prepare server socket", &error, 1),
|
234
|
+
GRPC_ERROR_STR_TARGET_ADDRESS,
|
235
|
+
grpc_slice_from_cpp_string(grpc_sockaddr_to_uri(addr))),
|
231
236
|
GRPC_ERROR_INT_FD, (intptr_t)sock);
|
232
|
-
gpr_free(tgtaddr);
|
233
237
|
GRPC_ERROR_UNREF(error);
|
234
238
|
if (sock != INVALID_SOCKET) closesocket(sock);
|
235
239
|
return error;
|
@@ -301,8 +305,6 @@ static void on_accept(void* arg, grpc_error* error) {
|
|
301
305
|
grpc_winsocket_callback_info* info = &sp->socket->read_info;
|
302
306
|
grpc_endpoint* ep = NULL;
|
303
307
|
grpc_resolved_address peer_name;
|
304
|
-
char* peer_name_string;
|
305
|
-
char* fd_name;
|
306
308
|
DWORD transfered_bytes;
|
307
309
|
DWORD flags;
|
308
310
|
BOOL wsa_success;
|
@@ -337,7 +339,6 @@ static void on_accept(void* arg, grpc_error* error) {
|
|
337
339
|
closesocket(sock);
|
338
340
|
} else {
|
339
341
|
if (!sp->shutting_down) {
|
340
|
-
peer_name_string = NULL;
|
341
342
|
err = setsockopt(sock, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT,
|
342
343
|
(char*)&sp->socket->socket, sizeof(sp->socket->socket));
|
343
344
|
if (err) {
|
@@ -348,6 +349,7 @@ static void on_accept(void* arg, grpc_error* error) {
|
|
348
349
|
int peer_name_len = (int)peer_name.len;
|
349
350
|
err = getpeername(sock, (grpc_sockaddr*)peer_name.addr, &peer_name_len);
|
350
351
|
peer_name.len = (size_t)peer_name_len;
|
352
|
+
std::string peer_name_string;
|
351
353
|
if (!err) {
|
352
354
|
peer_name_string = grpc_sockaddr_to_uri(&peer_name);
|
353
355
|
} else {
|
@@ -355,11 +357,9 @@ static void on_accept(void* arg, grpc_error* error) {
|
|
355
357
|
gpr_log(GPR_ERROR, "getpeername error: %s", utf8_message);
|
356
358
|
gpr_free(utf8_message);
|
357
359
|
}
|
358
|
-
|
359
|
-
ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name),
|
360
|
-
sp->server->channel_args, peer_name_string);
|
361
|
-
gpr_free(fd_name);
|
362
|
-
gpr_free(peer_name_string);
|
360
|
+
std::string fd_name = absl::StrCat("tcp_server:", peer_name_string);
|
361
|
+
ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name.c_str()),
|
362
|
+
sp->server->channel_args, peer_name_string.c_str());
|
363
363
|
} else {
|
364
364
|
closesocket(sock);
|
365
365
|
}
|
@@ -520,8 +520,8 @@ done:
|
|
520
520
|
return error;
|
521
521
|
}
|
522
522
|
|
523
|
-
static void tcp_server_start(grpc_tcp_server* s,
|
524
|
-
|
523
|
+
static void tcp_server_start(grpc_tcp_server* s,
|
524
|
+
const std::vector<grpc_pollset*>* /*pollsets*/,
|
525
525
|
grpc_tcp_server_cb on_accept_cb,
|
526
526
|
void* on_accept_cb_arg) {
|
527
527
|
grpc_tcp_listener* sp;
|
@@ -22,12 +22,15 @@
|
|
22
22
|
|
23
23
|
#include <inttypes.h>
|
24
24
|
|
25
|
+
#include <string>
|
26
|
+
|
27
|
+
#include "absl/strings/str_cat.h"
|
28
|
+
|
25
29
|
#include "src/core/lib/iomgr/timer.h"
|
26
30
|
|
27
31
|
#include <grpc/support/alloc.h>
|
28
32
|
#include <grpc/support/cpu.h>
|
29
33
|
#include <grpc/support/log.h>
|
30
|
-
#include <grpc/support/string_util.h>
|
31
34
|
#include <grpc/support/sync.h>
|
32
35
|
|
33
36
|
#include "src/core/lib/debug/trace.h"
|
@@ -706,38 +709,36 @@ static grpc_timer_check_result timer_check(grpc_millis* next) {
|
|
706
709
|
|
707
710
|
// tracing
|
708
711
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_timer_check_trace)) {
|
709
|
-
|
712
|
+
std::string next_str;
|
710
713
|
if (next == nullptr) {
|
711
|
-
next_str =
|
714
|
+
next_str = "NULL";
|
712
715
|
} else {
|
713
|
-
|
716
|
+
next_str = absl::StrCat(*next);
|
714
717
|
}
|
715
718
|
#if GPR_ARCH_64
|
716
719
|
gpr_log(GPR_INFO,
|
717
720
|
"TIMER CHECK BEGIN: now=%" PRId64 " next=%s tls_min=%" PRId64
|
718
721
|
" glob_min=%" PRId64,
|
719
|
-
now, next_str, min_timer,
|
722
|
+
now, next_str.c_str(), min_timer,
|
720
723
|
static_cast<grpc_millis>(gpr_atm_no_barrier_load(
|
721
724
|
(gpr_atm*)(&g_shared_mutables.min_timer))));
|
722
725
|
#else
|
723
726
|
gpr_log(GPR_INFO, "TIMER CHECK BEGIN: now=%" PRId64 " next=%s min=%" PRId64,
|
724
|
-
now, next_str, min_timer);
|
727
|
+
now, next_str.c_str(), min_timer);
|
725
728
|
#endif
|
726
|
-
gpr_free(next_str);
|
727
729
|
}
|
728
730
|
// actual code
|
729
731
|
grpc_timer_check_result r =
|
730
732
|
run_some_expired_timers(now, next, shutdown_error);
|
731
733
|
// tracing
|
732
734
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_timer_check_trace)) {
|
733
|
-
|
735
|
+
std::string next_str;
|
734
736
|
if (next == nullptr) {
|
735
|
-
next_str =
|
737
|
+
next_str = "NULL";
|
736
738
|
} else {
|
737
|
-
|
739
|
+
next_str = absl::StrCat(*next);
|
738
740
|
}
|
739
|
-
gpr_log(GPR_INFO, "TIMER CHECK END: r=%d; next=%s", r, next_str);
|
740
|
-
gpr_free(next_str);
|
741
|
+
gpr_log(GPR_INFO, "TIMER CHECK END: r=%d; next=%s", r, next_str.c_str());
|
741
742
|
}
|
742
743
|
return r;
|
743
744
|
}
|
@@ -44,7 +44,11 @@
|
|
44
44
|
#include <sys/types.h>
|
45
45
|
#include <unistd.h>
|
46
46
|
|
47
|
+
#include <string>
|
48
|
+
#include <vector>
|
49
|
+
|
47
50
|
#include "absl/container/inlined_vector.h"
|
51
|
+
#include "absl/strings/str_cat.h"
|
48
52
|
|
49
53
|
#include <grpc/grpc.h>
|
50
54
|
#include <grpc/support/alloc.h>
|
@@ -74,7 +78,7 @@ class GrpcUdpListener {
|
|
74
78
|
~GrpcUdpListener();
|
75
79
|
|
76
80
|
/* Called when grpc server starts to listening on the grpc_fd. */
|
77
|
-
void StartListening(grpc_pollset
|
81
|
+
void StartListening(const std::vector<grpc_pollset*>* pollsets,
|
78
82
|
GrpcUdpHandlerFactory* handler_factory);
|
79
83
|
|
80
84
|
/* Called when data is available to read from the socket.
|
@@ -148,13 +152,11 @@ GrpcUdpListener::GrpcUdpListener(grpc_udp_server* server, int fd,
|
|
148
152
|
server_(server),
|
149
153
|
orphan_notified_(false),
|
150
154
|
already_shutdown_(false) {
|
151
|
-
char* name;
|
152
155
|
std::string addr_str = grpc_sockaddr_to_string(addr, true);
|
153
|
-
|
154
|
-
emfd_ = grpc_fd_create(fd, name, true);
|
156
|
+
std::string name = absl::StrCat("udp-server-listener:", addr_str);
|
157
|
+
emfd_ = grpc_fd_create(fd, name.c_str(), true);
|
155
158
|
memcpy(&addr_, addr, sizeof(grpc_resolved_address));
|
156
159
|
GPR_ASSERT(emfd_);
|
157
|
-
gpr_free(name);
|
158
160
|
gpr_mu_init(&mutex_);
|
159
161
|
}
|
160
162
|
|
@@ -184,10 +186,9 @@ struct grpc_udp_server {
|
|
184
186
|
/* shutdown callback */
|
185
187
|
grpc_closure* shutdown_complete;
|
186
188
|
|
187
|
-
/* all pollsets interested in new connections
|
188
|
-
|
189
|
-
|
190
|
-
size_t pollset_count;
|
189
|
+
/* all pollsets interested in new connections. The object pointed at is not
|
190
|
+
* owned by this struct. */
|
191
|
+
const std::vector<grpc_pollset*>* pollsets;
|
191
192
|
/* opaque object to pass to callbacks */
|
192
193
|
void* user_data;
|
193
194
|
|
@@ -281,7 +282,7 @@ static void deactivated_all_ports(grpc_udp_server* s) {
|
|
281
282
|
|
282
283
|
GPR_ASSERT(s->shutdown);
|
283
284
|
|
284
|
-
if (s->listeners.
|
285
|
+
if (s->listeners.empty()) {
|
285
286
|
gpr_mu_unlock(&s->mu);
|
286
287
|
finish_shutdown(s);
|
287
288
|
return;
|
@@ -700,29 +701,29 @@ int grpc_udp_server_get_fd(grpc_udp_server* s, unsigned port_index) {
|
|
700
701
|
return s->listeners[port_index].fd();
|
701
702
|
}
|
702
703
|
|
703
|
-
void grpc_udp_server_start(grpc_udp_server*
|
704
|
-
|
704
|
+
void grpc_udp_server_start(grpc_udp_server* udp_server,
|
705
|
+
const std::vector<grpc_pollset*>* pollsets,
|
706
|
+
void* user_data) {
|
705
707
|
gpr_log(GPR_DEBUG, "grpc_udp_server_start");
|
706
|
-
gpr_mu_lock(&
|
707
|
-
GPR_ASSERT(
|
708
|
-
|
709
|
-
|
708
|
+
gpr_mu_lock(&udp_server->mu);
|
709
|
+
GPR_ASSERT(udp_server->active_ports == 0);
|
710
|
+
udp_server->pollsets = pollsets;
|
711
|
+
udp_server->user_data = user_data;
|
710
712
|
|
711
|
-
for (
|
712
|
-
|
713
|
+
for (auto& listener : udp_server->listeners) {
|
714
|
+
listener.StartListening(pollsets, udp_server->handler_factory);
|
713
715
|
}
|
714
716
|
|
715
|
-
gpr_mu_unlock(&
|
717
|
+
gpr_mu_unlock(&udp_server->mu);
|
716
718
|
}
|
717
719
|
|
718
|
-
void GrpcUdpListener::StartListening(grpc_pollset
|
719
|
-
size_t pollset_count,
|
720
|
+
void GrpcUdpListener::StartListening(const std::vector<grpc_pollset*>* pollsets,
|
720
721
|
GrpcUdpHandlerFactory* handler_factory) {
|
721
722
|
gpr_mu_lock(&mutex_);
|
722
723
|
handler_factory_ = handler_factory;
|
723
724
|
udp_handler_ = handler_factory->CreateUdpHandler(emfd_, server_->user_data);
|
724
|
-
for (
|
725
|
-
grpc_pollset_add_fd(
|
725
|
+
for (grpc_pollset* pollset : *pollsets) {
|
726
|
+
grpc_pollset_add_fd(pollset, emfd_);
|
726
727
|
}
|
727
728
|
GRPC_CLOSURE_INIT(&read_closure_, on_read, this, grpc_schedule_on_exec_ctx);
|
728
729
|
grpc_fd_notify_on_read(emfd_, &read_closure_);
|
@@ -21,6 +21,8 @@
|
|
21
21
|
|
22
22
|
#include <grpc/support/port_platform.h>
|
23
23
|
|
24
|
+
#include <vector>
|
25
|
+
|
24
26
|
#include "src/core/lib/iomgr/endpoint.h"
|
25
27
|
#include "src/core/lib/iomgr/ev_posix.h"
|
26
28
|
#include "src/core/lib/iomgr/resolve_address.h"
|
@@ -72,8 +74,9 @@ class GrpcUdpHandlerFactory {
|
|
72
74
|
grpc_udp_server* grpc_udp_server_create(const grpc_channel_args* args);
|
73
75
|
|
74
76
|
/* Start listening to bound ports. user_data is passed to callbacks. */
|
75
|
-
void grpc_udp_server_start(grpc_udp_server* udp_server,
|
76
|
-
|
77
|
+
void grpc_udp_server_start(grpc_udp_server* udp_server,
|
78
|
+
const std::vector<grpc_pollset*>* pollsets,
|
79
|
+
void* user_data);
|
77
80
|
|
78
81
|
int grpc_udp_server_get_fd(grpc_udp_server* s, unsigned port_index);
|
79
82
|
|
@@ -28,6 +28,8 @@
|
|
28
28
|
#include <sys/types.h>
|
29
29
|
#include <sys/un.h>
|
30
30
|
|
31
|
+
#include "absl/strings/str_cat.h"
|
32
|
+
|
31
33
|
#include "src/core/lib/iomgr/unix_sockets_posix.h"
|
32
34
|
|
33
35
|
#include <grpc/support/alloc.h>
|
@@ -44,14 +46,10 @@ grpc_error* grpc_resolve_unix_domain_address(const char* name,
|
|
44
46
|
struct sockaddr_un* un;
|
45
47
|
if (strlen(name) >
|
46
48
|
GPR_ARRAY_SIZE(((struct sockaddr_un*)nullptr)->sun_path) - 1) {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
GPR_ARRAY_SIZE(un->sun_path) - 1);
|
52
|
-
err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(err_msg);
|
53
|
-
gpr_free(err_msg);
|
54
|
-
return err;
|
49
|
+
return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
|
50
|
+
absl::StrCat("Path name should not have more than ",
|
51
|
+
GPR_ARRAY_SIZE(un->sun_path) - 1, " characters")
|
52
|
+
.c_str());
|
55
53
|
}
|
56
54
|
*addrs = static_cast<grpc_resolved_addresses*>(
|
57
55
|
gpr_malloc(sizeof(grpc_resolved_addresses)));
|
@@ -88,17 +86,14 @@ void grpc_unlink_if_unix_domain_socket(
|
|
88
86
|
}
|
89
87
|
}
|
90
88
|
|
91
|
-
|
89
|
+
std::string grpc_sockaddr_to_uri_unix_if_possible(
|
92
90
|
const grpc_resolved_address* resolved_addr) {
|
93
91
|
const grpc_sockaddr* addr =
|
94
92
|
reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
|
95
93
|
if (addr->sa_family != AF_UNIX) {
|
96
|
-
return
|
94
|
+
return "";
|
97
95
|
}
|
98
|
-
|
99
|
-
char* result;
|
100
|
-
gpr_asprintf(&result, "unix:%s", ((struct sockaddr_un*)addr)->sun_path);
|
101
|
-
return result;
|
96
|
+
return absl::StrCat("unix:", ((struct sockaddr_un*)addr)->sun_path);
|
102
97
|
}
|
103
98
|
|
104
99
|
#endif
|
@@ -21,6 +21,8 @@
|
|
21
21
|
|
22
22
|
#include <grpc/support/port_platform.h>
|
23
23
|
|
24
|
+
#include <string>
|
25
|
+
|
24
26
|
#include "src/core/lib/iomgr/port.h"
|
25
27
|
|
26
28
|
#include <grpc/support/string_util.h>
|
@@ -37,7 +39,7 @@ int grpc_is_unix_socket(const grpc_resolved_address* resolved_addr);
|
|
37
39
|
void grpc_unlink_if_unix_domain_socket(
|
38
40
|
const grpc_resolved_address* resolved_addr);
|
39
41
|
|
40
|
-
|
42
|
+
std::string grpc_sockaddr_to_uri_unix_if_possible(
|
41
43
|
const grpc_resolved_address* resolved_addr);
|
42
44
|
|
43
45
|
#endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */
|
@@ -22,6 +22,8 @@
|
|
22
22
|
|
23
23
|
#ifndef GRPC_HAVE_UNIX_SOCKET
|
24
24
|
|
25
|
+
#include <string>
|
26
|
+
|
25
27
|
#include <grpc/support/log.h>
|
26
28
|
|
27
29
|
void grpc_create_socketpair_if_unix(int sv[2]) {
|
@@ -42,8 +44,9 @@ int grpc_is_unix_socket(const grpc_resolved_address* addr) { return false; }
|
|
42
44
|
|
43
45
|
void grpc_unlink_if_unix_domain_socket(const grpc_resolved_address* addr) {}
|
44
46
|
|
45
|
-
|
46
|
-
|
47
|
+
std::string grpc_sockaddr_to_uri_unix_if_possible(
|
48
|
+
const grpc_resolved_address* addr) {
|
49
|
+
return "";
|
47
50
|
}
|
48
51
|
|
49
52
|
#endif
|
@@ -20,8 +20,12 @@
|
|
20
20
|
|
21
21
|
#include <string.h>
|
22
22
|
|
23
|
+
#include <string>
|
24
|
+
|
25
|
+
#include "absl/strings/str_cat.h"
|
26
|
+
#include "absl/strings/str_format.h"
|
27
|
+
|
23
28
|
#include <grpc/support/log.h>
|
24
|
-
#include <grpc/support/string_util.h>
|
25
29
|
|
26
30
|
#include "src/core/lib/json/json.h"
|
27
31
|
|
@@ -176,11 +180,10 @@ Json* JsonReader::CreateAndLinkValue() {
|
|
176
180
|
if (errors_.size() == GRPC_JSON_MAX_ERRORS) {
|
177
181
|
truncated_errors_ = true;
|
178
182
|
} else {
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
gpr_free(msg);
|
183
|
+
errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
|
184
|
+
absl::StrFormat("duplicate key \"%s\" at index %" PRIuPTR, key_,
|
185
|
+
CurrentIndex())
|
186
|
+
.c_str()));
|
184
187
|
}
|
185
188
|
}
|
186
189
|
value = &(*parent->mutable_object())[std::move(key_)];
|
@@ -198,11 +201,10 @@ bool JsonReader::StartContainer(Json::Type type) {
|
|
198
201
|
if (errors_.size() == GRPC_JSON_MAX_ERRORS) {
|
199
202
|
truncated_errors_ = true;
|
200
203
|
} else {
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
gpr_free(msg);
|
204
|
+
errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
|
205
|
+
absl::StrFormat("exceeded max stack depth (%d) at index %" PRIuPTR,
|
206
|
+
GRPC_JSON_MAX_DEPTH, CurrentIndex())
|
207
|
+
.c_str()));
|
206
208
|
}
|
207
209
|
return false;
|
208
210
|
}
|
@@ -824,17 +826,14 @@ grpc_error* JsonReader::Parse(absl::string_view input, Json* output) {
|
|
824
826
|
"errors and try again to see additional errors"));
|
825
827
|
}
|
826
828
|
if (status == Status::GRPC_JSON_INTERNAL_ERROR) {
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
gpr_free(msg);
|
829
|
+
reader.errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
|
830
|
+
absl::StrCat("internal error in JSON parser at index ",
|
831
|
+
reader.CurrentIndex())
|
832
|
+
.c_str()));
|
832
833
|
} else if (status == Status::GRPC_JSON_PARSE_ERROR) {
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
reader.errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg));
|
837
|
-
gpr_free(msg);
|
834
|
+
reader.errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
|
835
|
+
absl::StrCat("JSON parse error at index ", reader.CurrentIndex())
|
836
|
+
.c_str()));
|
838
837
|
}
|
839
838
|
if (!reader.errors_.empty()) {
|
840
839
|
return GRPC_ERROR_CREATE_FROM_VECTOR("JSON parsing failed",
|
@@ -23,6 +23,8 @@
|
|
23
23
|
|
24
24
|
#include <string.h>
|
25
25
|
|
26
|
+
#include <string>
|
27
|
+
|
26
28
|
#include <grpc/grpc.h>
|
27
29
|
#include <grpc/grpc_security.h>
|
28
30
|
#include <grpc/support/sync.h>
|
@@ -79,13 +81,13 @@ typedef enum {
|
|
79
81
|
/* --- Google utils --- */
|
80
82
|
|
81
83
|
/* It is the caller's responsibility to gpr_free the result if not NULL. */
|
82
|
-
|
84
|
+
std::string grpc_get_well_known_google_credentials_file_path(void);
|
83
85
|
|
84
86
|
/* Implementation function for the different platforms. */
|
85
|
-
|
87
|
+
std::string grpc_get_well_known_google_credentials_file_path_impl(void);
|
86
88
|
|
87
89
|
/* Override for testing only. Not thread-safe */
|
88
|
-
typedef
|
90
|
+
typedef std::string (*grpc_well_known_credentials_path_getter)(void);
|
89
91
|
void grpc_override_well_known_credentials_path_getter(
|
90
92
|
grpc_well_known_credentials_path_getter getter);
|
91
93
|
|