grpc 1.26.0 → 1.28.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 +1699 -1482
- data/etc/roots.pem +44 -0
- data/include/grpc/grpc_security.h +37 -15
- data/include/grpc/grpc_security_constants.h +27 -0
- data/include/grpc/impl/codegen/grpc_types.h +19 -0
- data/include/grpc/impl/codegen/port_platform.h +8 -1
- data/include/grpc/impl/codegen/sync.h +5 -3
- data/include/grpc/impl/codegen/sync_abseil.h +36 -0
- data/include/grpc/module.modulemap +3 -0
- data/{src/core/lib/json/json_common.h → include/grpc/support/sync_abseil.h} +7 -15
- data/src/core/ext/filters/client_channel/client_channel.cc +74 -32
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +31 -47
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +1 -3
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +1 -1
- data/src/core/ext/filters/client_channel/http_proxy.cc +8 -5
- data/src/core/ext/filters/client_channel/lb_policy.cc +4 -3
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +291 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +83 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +224 -367
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +88 -121
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +28 -57
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +18 -21
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +9 -13
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +85 -83
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +623 -767
- data/src/core/ext/filters/client_channel/lb_policy_factory.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +43 -75
- data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +57 -70
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +3 -3
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +2 -2
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +3 -3
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +31 -7
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +228 -286
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +2 -2
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +37 -176
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +7 -11
- data/src/core/ext/filters/client_channel/service_config.cc +91 -160
- data/src/core/ext/filters/client_channel/service_config.h +14 -21
- data/src/core/ext/filters/client_channel/xds/xds_api.cc +1426 -229
- data/src/core/ext/filters/client_channel/xds/xds_api.h +214 -115
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +236 -339
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +32 -45
- data/src/core/ext/filters/client_channel/xds/xds_channel.h +3 -1
- data/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc +14 -9
- data/src/core/ext/filters/client_channel/xds/xds_client.cc +986 -252
- data/src/core/ext/filters/client_channel/xds/xds_client.h +84 -36
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +53 -131
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +119 -152
- data/src/core/ext/filters/message_size/message_size_filter.cc +32 -35
- data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +3 -6
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +6 -8
- data/src/core/ext/transport/chttp2/transport/writing.cc +1 -1
- data/src/core/ext/transport/inproc/inproc_transport.cc +22 -42
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +30 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +54 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +46 -21
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +116 -29
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +4 -362
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +14 -1337
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +390 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +1411 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +29 -8
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +60 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +5 -3
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +6 -2
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +48 -5
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +154 -4
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +19 -15
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +46 -32
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +26 -4
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +70 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +42 -25
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +83 -25
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +43 -7
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +115 -0
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +7 -68
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +14 -201
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +240 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +1 -71
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +3 -228
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +258 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c +30 -0
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +104 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +383 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +33 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +144 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +527 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +112 -0
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.c +29 -0
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +62 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +199 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +33 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +793 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +2936 -0
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +58 -0
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +134 -0
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +227 -0
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +725 -0
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +296 -0
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +1072 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c +32 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +65 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +108 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +52 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +133 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +87 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +258 -0
- data/src/core/ext/upb-generated/envoy/type/range.upb.c +11 -0
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +27 -0
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.c +28 -0
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +249 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +30 -27
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +64 -52
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +13 -5
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +34 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +48 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +104 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +17 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +30 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +38 -34
- data/src/core/ext/upb-generated/validate/validate.upb.h +129 -99
- data/src/core/lib/channel/channel_trace.cc +32 -41
- data/src/core/lib/channel/channel_trace.h +3 -3
- data/src/core/lib/channel/channelz.cc +158 -248
- data/src/core/lib/channel/channelz.h +17 -10
- data/src/core/lib/channel/channelz_registry.cc +47 -74
- data/src/core/lib/channel/channelz_registry.h +4 -4
- data/src/core/lib/gpr/sync_abseil.cc +114 -0
- data/src/core/lib/gpr/sync_posix.cc +8 -5
- data/src/core/lib/gpr/sync_windows.cc +4 -2
- data/src/core/lib/gpr/time_precise.cc +1 -1
- data/src/core/lib/gprpp/host_port.cc +1 -1
- data/src/core/lib/gprpp/inlined_vector.h +1 -210
- data/src/core/lib/gprpp/memory.h +2 -6
- data/src/core/lib/gprpp/optional.h +6 -21
- data/src/core/lib/gprpp/string_view.h +5 -110
- data/src/core/lib/gprpp/sync.h +9 -0
- data/src/core/lib/iomgr/buffer_list.cc +36 -35
- data/src/core/lib/iomgr/error.h +4 -4
- data/src/core/lib/iomgr/ev_epollex_linux.cc +12 -4
- data/src/core/lib/iomgr/executor.cc +1 -1
- data/src/core/lib/iomgr/fork_posix.cc +4 -0
- data/src/core/lib/iomgr/load_file.cc +1 -0
- data/src/core/lib/iomgr/poller/eventmanager_libuv.cc +87 -0
- data/src/core/lib/iomgr/poller/eventmanager_libuv.h +88 -0
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +14 -0
- data/src/core/lib/iomgr/socket_utils_posix.h +12 -0
- data/src/core/lib/iomgr/tcp_client_posix.cc +17 -17
- data/src/core/lib/iomgr/tcp_client_posix.h +6 -6
- data/src/core/lib/iomgr/tcp_custom.h +3 -0
- data/src/core/lib/iomgr/tcp_posix.cc +608 -56
- data/src/core/lib/iomgr/tcp_server_custom.cc +15 -2
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +8 -0
- data/src/core/lib/iomgr/work_serializer.cc +155 -0
- data/src/core/lib/iomgr/work_serializer.h +65 -0
- data/src/core/lib/json/json.h +208 -68
- data/src/core/lib/json/json_reader.cc +511 -319
- data/src/core/lib/json/json_writer.cc +201 -110
- data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +1 -1
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +7 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.h +5 -1
- data/src/core/lib/security/credentials/credentials.h +10 -1
- data/src/core/lib/security/credentials/fake/fake_credentials.h +2 -1
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +10 -8
- data/src/core/lib/security/credentials/jwt/json_token.cc +26 -56
- data/src/core/lib/security/credentials/jwt/json_token.h +2 -1
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +8 -18
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +149 -159
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +2 -3
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +38 -35
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +1 -1
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +6 -4
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +2 -1
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +20 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +9 -0
- data/src/core/lib/security/credentials/tls/{spiffe_credentials.cc → tls_credentials.cc} +23 -24
- data/src/core/lib/security/credentials/tls/{spiffe_credentials.h → tls_credentials.h} +9 -9
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +13 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +22 -2
- data/src/core/lib/security/security_connector/load_system_roots_fallback.cc +2 -2
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +2 -2
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +31 -6
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +3 -15
- data/src/core/lib/security/security_connector/ssl_utils.cc +48 -4
- data/src/core/lib/security/security_connector/ssl_utils.h +12 -1
- data/src/core/lib/security/security_connector/tls/{spiffe_security_connector.cc → tls_security_connector.cc} +106 -70
- data/src/core/lib/security/security_connector/tls/{spiffe_security_connector.h → tls_security_connector.h} +22 -19
- data/src/core/lib/security/transport/client_auth_filter.cc +33 -0
- data/src/core/lib/security/transport/security_handshaker.cc +2 -2
- data/src/core/lib/security/util/json_util.cc +22 -15
- data/src/core/lib/security/util/json_util.h +2 -2
- data/src/core/lib/surface/completion_queue.cc +22 -1
- data/src/core/lib/surface/version.cc +1 -1
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +1 -1
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +12 -2
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +1 -1
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +3 -3
- data/src/core/tsi/fake_transport_security.cc +7 -3
- data/src/core/tsi/fake_transport_security.h +2 -0
- data/src/core/tsi/grpc_shadow_boringssl.h +1333 -1319
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +1 -1
- data/src/core/tsi/ssl_transport_security.cc +145 -8
- data/src/core/tsi/ssl_transport_security.h +15 -1
- data/src/core/tsi/transport_security.cc +13 -0
- data/src/core/tsi/transport_security_grpc.cc +2 -2
- data/src/core/tsi/transport_security_grpc.h +2 -2
- data/src/core/tsi/transport_security_interface.h +12 -0
- data/src/ruby/bin/math_pb.rb +5 -5
- data/src/ruby/ext/grpc/rb_call_credentials.c +4 -1
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +2 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +4 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/grpc/health/v1/health_pb.rb +3 -3
- data/src/ruby/pb/src/proto/grpc/testing/empty_pb.rb +1 -1
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +23 -13
- data/third_party/abseil-cpp/absl/algorithm/algorithm.h +159 -0
- data/third_party/abseil-cpp/absl/base/attributes.h +621 -0
- data/third_party/abseil-cpp/absl/base/call_once.h +226 -0
- data/third_party/abseil-cpp/absl/base/casts.h +184 -0
- data/third_party/abseil-cpp/absl/base/config.h +671 -0
- data/third_party/abseil-cpp/absl/base/const_init.h +76 -0
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.cc +129 -0
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +389 -0
- data/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +200 -0
- data/third_party/abseil-cpp/absl/base/internal/bits.h +218 -0
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +107 -0
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.h +94 -0
- data/third_party/abseil-cpp/absl/base/internal/endian.h +266 -0
- data/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -0
- data/third_party/abseil-cpp/absl/base/internal/hide_ptr.h +51 -0
- data/third_party/abseil-cpp/absl/base/internal/identity.h +37 -0
- data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +107 -0
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +187 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +107 -0
- data/third_party/abseil-cpp/absl/base/internal/per_thread_tls.h +52 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +240 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +183 -0
- data/third_party/abseil-cpp/absl/base/internal/scheduling_mode.h +58 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +233 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +243 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc +35 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +66 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +46 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc +81 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +93 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +37 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +416 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +66 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_annotations.h +271 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +152 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +259 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.cc +108 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.h +75 -0
- data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +66 -0
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +158 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +140 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +124 -0
- data/third_party/abseil-cpp/absl/base/log_severity.cc +27 -0
- data/third_party/abseil-cpp/absl/base/log_severity.h +121 -0
- data/third_party/abseil-cpp/absl/base/macros.h +220 -0
- data/third_party/abseil-cpp/absl/base/optimization.h +181 -0
- data/third_party/abseil-cpp/absl/base/options.h +211 -0
- data/third_party/abseil-cpp/absl/base/policy_checks.h +111 -0
- data/third_party/abseil-cpp/absl/base/port.h +26 -0
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +280 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +848 -0
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +265 -0
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +892 -0
- data/third_party/abseil-cpp/absl/memory/memory.h +695 -0
- data/third_party/abseil-cpp/absl/meta/type_traits.h +759 -0
- data/third_party/abseil-cpp/absl/numeric/int128.cc +404 -0
- data/third_party/abseil-cpp/absl/numeric/int128.h +1091 -0
- data/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +302 -0
- data/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +308 -0
- data/third_party/abseil-cpp/absl/strings/ascii.cc +200 -0
- data/third_party/abseil-cpp/absl/strings/ascii.h +242 -0
- data/third_party/abseil-cpp/absl/strings/charconv.cc +984 -0
- data/third_party/abseil-cpp/absl/strings/charconv.h +119 -0
- data/third_party/abseil-cpp/absl/strings/escaping.cc +949 -0
- data/third_party/abseil-cpp/absl/strings/escaping.h +164 -0
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +156 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +359 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +423 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +504 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.h +99 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.cc +180 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.h +58 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.cc +112 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.h +148 -0
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +36 -0
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.h +89 -0
- data/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +73 -0
- data/third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h +248 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +388 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +432 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +245 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +209 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +326 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +51 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +415 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +493 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +23 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +72 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +104 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +334 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +333 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +314 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +455 -0
- data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +53 -0
- data/third_party/abseil-cpp/absl/strings/internal/utf8.h +50 -0
- data/third_party/abseil-cpp/absl/strings/match.cc +40 -0
- data/third_party/abseil-cpp/absl/strings/match.h +90 -0
- data/third_party/abseil-cpp/absl/strings/numbers.cc +965 -0
- data/third_party/abseil-cpp/absl/strings/numbers.h +266 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +246 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.h +408 -0
- data/third_party/abseil-cpp/absl/strings/str_format.h +537 -0
- data/third_party/abseil-cpp/absl/strings/str_join.h +293 -0
- data/third_party/abseil-cpp/absl/strings/str_replace.cc +82 -0
- data/third_party/abseil-cpp/absl/strings/str_replace.h +219 -0
- data/third_party/abseil-cpp/absl/strings/str_split.cc +139 -0
- data/third_party/abseil-cpp/absl/strings/str_split.h +513 -0
- data/third_party/abseil-cpp/absl/strings/string_view.cc +235 -0
- data/third_party/abseil-cpp/absl/strings/string_view.h +622 -0
- data/third_party/abseil-cpp/absl/strings/strip.h +91 -0
- data/third_party/abseil-cpp/absl/strings/substitute.cc +171 -0
- data/third_party/abseil-cpp/absl/strings/substitute.h +693 -0
- data/third_party/abseil-cpp/absl/types/bad_optional_access.cc +48 -0
- data/third_party/abseil-cpp/absl/types/bad_optional_access.h +78 -0
- data/third_party/abseil-cpp/absl/types/internal/optional.h +396 -0
- data/third_party/abseil-cpp/absl/types/internal/span.h +128 -0
- data/third_party/abseil-cpp/absl/types/optional.h +776 -0
- data/third_party/abseil-cpp/absl/types/span.h +713 -0
- data/third_party/abseil-cpp/absl/utility/utility.h +350 -0
- data/{src/boringssl → third_party/boringssl-with-bazel}/err_data.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_bitstr.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_bool.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_d2i_fp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_dup.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_enum.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_gentm.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_i2d_fp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_int.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_mbstr.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_object.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_octet.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_print.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_strnid.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_time.c +3 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_type.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_utctm.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_utf8.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_lib.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_locl.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_par.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn_pack.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_enum.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_int.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_string.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_dec.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_enc.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_fre.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_new.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_typ.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_utl.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/time_support.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/base64/base64.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/bio.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/bio_mem.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/connect.c +3 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/fd.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/file.c +5 -6
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/hexdump.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/pair.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/printf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/socket.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/socket_helper.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bn_extra/bn_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bn_extra/convert.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/buf/buf.c +10 -69
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/asn1_compat.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/ber.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/cbb.c +41 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/cbs.c +60 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/unicode.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/chacha/chacha.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/chacha/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/cipher_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/derive_key.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesccm.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesctrhmac.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesgcmsiv.c +8 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_chacha20poly1305.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_null.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_rc2.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_rc4.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_tls.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/tls_cbc.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cmac/cmac.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/conf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/conf_def.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-aarch64-fuchsia.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-aarch64-linux.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm-linux.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm-linux.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-intel.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-ppc64le.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/crypto.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/curve25519/spake25519.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/check.c +3 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/dh.c +1 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/dh_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/params.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/digest_extra/digest_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dsa/dsa.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dsa/dsa_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ec_extra/ec_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ec_extra/ec_derive.c +2 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ecdh_extra/ecdh_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ecdsa_extra/ecdsa_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/engine/engine.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/err/err.c +6 -6
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/err/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/digestsign.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp_ctx.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_dsa_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ec.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ec_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ed25519.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ed25519_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_rsa.c +14 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_rsa_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_x25519.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_x25519_asn1.c +1 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/pbkdf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/print.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/scrypt.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/sign.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ex_data.c +0 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.c +108 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c +1282 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/internal.h +5 -7
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/key_wrap.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/mode_wrappers.c +0 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bcm.c +2 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/add.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/asm/x86_64-gcc.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/bn.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/bytes.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/cmp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/ctx.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/div.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/div_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/exponentiation.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/gcd.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/gcd_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/generic.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/jacobi.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/montgomery.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/montgomery_inv.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/mul.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/prime.c +11 -12
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/random.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/rsaz_exp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/rsaz_exp.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/shift.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/sqrt.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/aead.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/cipher.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/e_aes.c +3 -5
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/e_des.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/delocate.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/des/des.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/des/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/digest.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/digests.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/md32_common.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec_key.c +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec_montgomery.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/felem.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/oct.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p224-64.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64-table.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/scalar.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/simple.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/simple_mul.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/util.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/wnaf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ecdh/ecdh.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ecdsa/ecdsa.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/fips_shared_support.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/hmac/hmac.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/is_fips.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md4/md4.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md5/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md5/md5.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/cbc.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/cfb.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/ctr.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/gcm.c +45 -193
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +304 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/internal.h +8 -18
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/ofb.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/polyval.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/ctrdrbg.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/rand.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/urandom.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/blinding.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/padding.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/rsa.c +7 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/rsa_impl.c +60 -51
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/self_check/self_check.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha1-altivec.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha256.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha512.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/tls/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/tls/kdf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hkdf/hkdf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hrss/hrss.c +210 -311
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hrss/internal.h +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/internal.h +21 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/lhash/lhash.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/mem.c +70 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj.c +16 -21
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj_dat.h +27 -6
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj_xref.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_all.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_info.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_lib.c +7 -7
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_oth.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_pk8.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_pkey.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_x509.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_xaux.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/pkcs7.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/pkcs7_x509.c +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/p5_pbev2.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/pkcs8.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/pkcs8_x509.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305.c +2 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305_arm.c +21 -20
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305_vec.c +34 -17
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pool/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pool/pool.c +1 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/deterministic.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/forkunsafe.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/fuchsia.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/rand_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/windows.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rc4/rc4.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/refcount_c11.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/refcount_lock.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rsa_extra/rsa_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rsa_extra/rsa_print.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/siphash/siphash.c +3 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/stack/stack.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_none.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_pthread.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_win.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_digest.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_sign.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_strex.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_verify.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/algorithm.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/asn1_gen.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/by_dir.c +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/by_file.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/charmap.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/i2d_pr.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/rsa_pss.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_crl.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_req.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_x509.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_x509a.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/vpm_int.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_att.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_cmp.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_d2.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_def.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_ext.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_lu.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_obj.c +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_r2x.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_req.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_set.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_trs.c +1 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_txt.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_v3.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_vfy.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_vpm.c +3 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509cset.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509name.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509rset.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509spki.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_algor.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_all.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_attrib.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_crl.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_exten.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_info.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_name.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_pkey.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_pubkey.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_req.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_sig.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_spki.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_val.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_x509.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_x509a.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/ext_dat.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_cache.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_data.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_int.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_lib.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_map.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_node.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_tree.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_akey.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_akeya.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_alt.c +3 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_bcons.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_bitst.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_conf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_cpols.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_crld.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_enum.c +2 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_extku.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_genn.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ia5.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_info.c +4 -5
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_int.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_lib.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ncons.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ocsp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pci.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pcia.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pcons.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pku.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pmaps.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_prn.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_purp.c +2 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_skey.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_sxnet.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_utl.c +11 -12
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/aead.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/aes.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/arm_arch.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1_mac.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1t.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/base.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/base64.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bio.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/blowfish.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bn.h +32 -20
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/buf.h +9 -9
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/buffer.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bytestring.h +34 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cast.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/chacha.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cipher.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cmac.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/conf.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cpu.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/crypto.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/curve25519.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/des.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dh.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/digest.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dsa.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dtls1.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/e_os2.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ec.h +11 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ec_key.h +4 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ecdh.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ecdsa.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/engine.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/err.h +11 -9
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/evp.h +20 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ex_data.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hkdf.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hmac.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hrss.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/is_boringssl.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/lhash.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/md4.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/md5.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/mem.h +17 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/nid.h +9 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/obj.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/obj_mac.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/objects.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/opensslconf.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/opensslv.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ossl_typ.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pem.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs12.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs7.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs8.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/poly1305.h +5 -7
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pool.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rand.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rc4.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ripemd.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rsa.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/safestack.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/sha.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/siphash.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/span.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/srtp.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ssl.h +10 -20
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ssl3.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/stack.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/thread.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/tls1.h +0 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/type_check.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509_vfy.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509v3.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/bio_ssl.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_both.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_lib.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_pkt.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_srtp.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/dtls_method.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/dtls_record.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handoff.cc +126 -29
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake.cc +5 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake_client.cc +24 -13
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake_server.cc +1 -5
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/internal.h +32 -26
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_both.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_lib.cc +2 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_pkt.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_aead_ctx.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_asn1.cc +1 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_buffer.cc +34 -15
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_cert.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_cipher.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_file.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_key_share.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_lib.cc +13 -14
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_privkey.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_session.cc +2 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_stat.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_transcript.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_versions.cc +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_x509.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/t1_enc.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/t1_lib.cc +11 -171
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_both.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_client.cc +3 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_enc.cc +5 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_server.cc +78 -101
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls_method.cc +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls_record.cc +7 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_32.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_64.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_tables.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256_32.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256_64.h +0 -0
- data/third_party/upb/upb/decode.c +4 -0
- data/third_party/upb/upb/port.c +0 -1
- data/third_party/upb/upb/port_def.inc +1 -3
- data/third_party/upb/upb/table.c +2 -1
- metadata +680 -505
- data/src/core/lib/iomgr/logical_thread.cc +0 -103
- data/src/core/lib/iomgr/logical_thread.h +0 -52
- data/src/core/lib/json/json.cc +0 -94
- data/src/core/lib/json/json_reader.h +0 -146
- data/src/core/lib/json/json_string.cc +0 -367
- data/src/core/lib/json/json_writer.h +0 -84
- data/third_party/boringssl/crypto/fipsmodule/aes/aes.c +0 -860
@@ -23,6 +23,10 @@
|
|
23
23
|
|
24
24
|
#include <stdint.h>
|
25
25
|
|
26
|
+
#include <set>
|
27
|
+
|
28
|
+
#include "absl/types/optional.h"
|
29
|
+
|
26
30
|
#include <grpc/slice_buffer.h>
|
27
31
|
|
28
32
|
#include "src/core/ext/filters/client_channel/server_address.h"
|
@@ -31,151 +35,246 @@
|
|
31
35
|
|
32
36
|
namespace grpc_core {
|
33
37
|
|
34
|
-
class
|
38
|
+
class XdsClient;
|
39
|
+
|
40
|
+
class XdsApi {
|
35
41
|
public:
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
+
static const char* kLdsTypeUrl;
|
43
|
+
static const char* kRdsTypeUrl;
|
44
|
+
static const char* kCdsTypeUrl;
|
45
|
+
static const char* kEdsTypeUrl;
|
46
|
+
|
47
|
+
struct RdsUpdate {
|
48
|
+
// The name to use in the CDS request.
|
49
|
+
std::string cluster_name;
|
50
|
+
|
51
|
+
bool operator==(const RdsUpdate& other) const {
|
52
|
+
return cluster_name == other.cluster_name;
|
53
|
+
}
|
54
|
+
};
|
55
|
+
|
56
|
+
// TODO(roth): When we can use absl::variant<>, consider using that
|
57
|
+
// here, to enforce the fact that only one of the two fields can be set.
|
58
|
+
struct LdsUpdate {
|
59
|
+
// The name to use in the RDS request.
|
60
|
+
std::string route_config_name;
|
61
|
+
// The name to use in the CDS request. Present if the LDS response has it
|
62
|
+
// inlined.
|
63
|
+
absl::optional<RdsUpdate> rds_update;
|
64
|
+
|
65
|
+
bool operator==(const LdsUpdate& other) const {
|
66
|
+
return route_config_name == other.route_config_name &&
|
67
|
+
rds_update == other.rds_update;
|
68
|
+
}
|
69
|
+
};
|
70
|
+
|
71
|
+
using LdsUpdateMap = std::map<std::string /*server_name*/, LdsUpdate>;
|
72
|
+
|
73
|
+
using RdsUpdateMap = std::map<std::string /*route_config_name*/, RdsUpdate>;
|
74
|
+
|
75
|
+
struct CdsUpdate {
|
76
|
+
// The name to use in the EDS request.
|
77
|
+
// If empty, the cluster name will be used.
|
78
|
+
std::string eds_service_name;
|
79
|
+
// The LRS server to use for load reporting.
|
80
|
+
// If not set, load reporting will be disabled.
|
81
|
+
// If set to the empty string, will use the same server we obtained the CDS
|
82
|
+
// data from.
|
83
|
+
absl::optional<std::string> lrs_load_reporting_server_name;
|
84
|
+
};
|
42
85
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
86
|
+
using CdsUpdateMap = std::map<std::string /*cluster_name*/, CdsUpdate>;
|
87
|
+
|
88
|
+
class PriorityListUpdate {
|
89
|
+
public:
|
90
|
+
struct LocalityMap {
|
91
|
+
struct Locality {
|
92
|
+
bool operator==(const Locality& other) const {
|
93
|
+
return *name == *other.name && serverlist == other.serverlist &&
|
94
|
+
lb_weight == other.lb_weight && priority == other.priority;
|
47
95
|
}
|
96
|
+
|
97
|
+
// This comparator only compares the locality names.
|
98
|
+
struct Less {
|
99
|
+
bool operator()(const Locality& lhs, const Locality& rhs) const {
|
100
|
+
return XdsLocalityName::Less()(lhs.name, rhs.name);
|
101
|
+
}
|
102
|
+
};
|
103
|
+
|
104
|
+
RefCountedPtr<XdsLocalityName> name;
|
105
|
+
ServerAddressList serverlist;
|
106
|
+
uint32_t lb_weight;
|
107
|
+
uint32_t priority;
|
48
108
|
};
|
49
109
|
|
50
|
-
RefCountedPtr<XdsLocalityName
|
51
|
-
|
52
|
-
|
53
|
-
|
110
|
+
bool Contains(const RefCountedPtr<XdsLocalityName>& name) const {
|
111
|
+
return localities.find(name) != localities.end();
|
112
|
+
}
|
113
|
+
|
114
|
+
size_t size() const { return localities.size(); }
|
115
|
+
|
116
|
+
std::map<RefCountedPtr<XdsLocalityName>, Locality, XdsLocalityName::Less>
|
117
|
+
localities;
|
54
118
|
};
|
55
119
|
|
56
|
-
bool
|
57
|
-
|
120
|
+
bool operator==(const PriorityListUpdate& other) const;
|
121
|
+
bool operator!=(const PriorityListUpdate& other) const {
|
122
|
+
return !(*this == other);
|
58
123
|
}
|
59
124
|
|
60
|
-
|
125
|
+
void Add(LocalityMap::Locality locality);
|
61
126
|
|
62
|
-
|
63
|
-
localities;
|
64
|
-
};
|
127
|
+
const LocalityMap* Find(uint32_t priority) const;
|
65
128
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
129
|
+
bool Contains(uint32_t priority) const {
|
130
|
+
return priority < priorities_.size();
|
131
|
+
}
|
132
|
+
bool Contains(const RefCountedPtr<XdsLocalityName>& name);
|
70
133
|
|
71
|
-
|
134
|
+
bool empty() const { return priorities_.empty(); }
|
135
|
+
size_t size() const { return priorities_.size(); }
|
72
136
|
|
73
|
-
|
137
|
+
// Callers should make sure the priority list is non-empty.
|
138
|
+
uint32_t LowestPriority() const {
|
139
|
+
return static_cast<uint32_t>(priorities_.size()) - 1;
|
140
|
+
}
|
74
141
|
|
75
|
-
|
76
|
-
|
77
|
-
}
|
78
|
-
bool Contains(const RefCountedPtr<XdsLocalityName>& name);
|
142
|
+
private:
|
143
|
+
InlinedVector<LocalityMap, 2> priorities_;
|
144
|
+
};
|
79
145
|
|
80
|
-
|
81
|
-
|
146
|
+
// There are two phases of accessing this class's content:
|
147
|
+
// 1. to initialize in the control plane combiner;
|
148
|
+
// 2. to use in the data plane combiner.
|
149
|
+
// So no additional synchronization is needed.
|
150
|
+
class DropConfig : public RefCounted<DropConfig> {
|
151
|
+
public:
|
152
|
+
struct DropCategory {
|
153
|
+
bool operator==(const DropCategory& other) const {
|
154
|
+
return name == other.name &&
|
155
|
+
parts_per_million == other.parts_per_million;
|
156
|
+
}
|
82
157
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
}
|
158
|
+
std::string name;
|
159
|
+
const uint32_t parts_per_million;
|
160
|
+
};
|
87
161
|
|
88
|
-
|
89
|
-
InlinedVector<LocalityMap, 2> priorities_;
|
90
|
-
};
|
162
|
+
using DropCategoryList = InlinedVector<DropCategory, 2>;
|
91
163
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
class XdsDropConfig : public RefCounted<XdsDropConfig> {
|
97
|
-
public:
|
98
|
-
struct DropCategory {
|
99
|
-
bool operator==(const DropCategory& other) const {
|
100
|
-
return strcmp(name.get(), other.name.get()) == 0 &&
|
101
|
-
parts_per_million == other.parts_per_million;
|
164
|
+
void AddCategory(std::string name, uint32_t parts_per_million) {
|
165
|
+
drop_category_list_.emplace_back(
|
166
|
+
DropCategory{std::move(name), parts_per_million});
|
167
|
+
if (parts_per_million == 1000000) drop_all_ = true;
|
102
168
|
}
|
103
169
|
|
104
|
-
|
105
|
-
const
|
106
|
-
};
|
170
|
+
// The only method invoked from the data plane combiner.
|
171
|
+
bool ShouldDrop(const std::string** category_name) const;
|
107
172
|
|
108
|
-
|
173
|
+
const DropCategoryList& drop_category_list() const {
|
174
|
+
return drop_category_list_;
|
175
|
+
}
|
109
176
|
|
110
|
-
|
111
|
-
uint32_t parts_per_million) {
|
112
|
-
drop_category_list_.emplace_back(
|
113
|
-
DropCategory{std::move(name), parts_per_million});
|
114
|
-
}
|
177
|
+
bool drop_all() const { return drop_all_; }
|
115
178
|
|
116
|
-
|
117
|
-
|
179
|
+
bool operator==(const DropConfig& other) const {
|
180
|
+
return drop_category_list_ == other.drop_category_list_;
|
181
|
+
}
|
182
|
+
bool operator!=(const DropConfig& other) const { return !(*this == other); }
|
118
183
|
|
119
|
-
|
120
|
-
|
121
|
-
|
184
|
+
private:
|
185
|
+
DropCategoryList drop_category_list_;
|
186
|
+
bool drop_all_ = false;
|
187
|
+
};
|
122
188
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
return !(*this == other);
|
128
|
-
}
|
189
|
+
struct EdsUpdate {
|
190
|
+
PriorityListUpdate priority_list_update;
|
191
|
+
RefCountedPtr<DropConfig> drop_config;
|
192
|
+
};
|
129
193
|
|
130
|
-
|
131
|
-
DropCategoryList drop_category_list_;
|
132
|
-
};
|
194
|
+
using EdsUpdateMap = std::map<std::string /*eds_service_name*/, EdsUpdate>;
|
133
195
|
|
134
|
-
struct
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
196
|
+
struct ClusterLoadReport {
|
197
|
+
XdsClusterDropStats::DroppedRequestsMap dropped_requests;
|
198
|
+
std::map<RefCountedPtr<XdsLocalityName>, XdsClusterLocalityStats::Snapshot,
|
199
|
+
XdsLocalityName::Less>
|
200
|
+
locality_stats;
|
201
|
+
grpc_millis load_report_interval;
|
202
|
+
};
|
203
|
+
using ClusterLoadReportMap = std::map<
|
204
|
+
std::pair<std::string /*cluster_name*/, std::string /*eds_service_name*/>,
|
205
|
+
ClusterLoadReport>;
|
206
|
+
|
207
|
+
XdsApi(XdsClient* client, TraceFlag* tracer, const XdsBootstrap::Node* node);
|
208
|
+
|
209
|
+
// Creates a request to nack an unsupported resource type.
|
210
|
+
// Takes ownership of \a error.
|
211
|
+
grpc_slice CreateUnsupportedTypeNackRequest(const std::string& type_url,
|
212
|
+
const std::string& nonce,
|
213
|
+
grpc_error* error);
|
214
|
+
|
215
|
+
// Creates an LDS request querying \a server_name.
|
216
|
+
// Takes ownership of \a error.
|
217
|
+
grpc_slice CreateLdsRequest(const std::string& server_name,
|
218
|
+
const std::string& version,
|
219
|
+
const std::string& nonce, grpc_error* error,
|
220
|
+
bool populate_node);
|
221
|
+
|
222
|
+
// Creates an RDS request querying \a route_config_name.
|
223
|
+
// Takes ownership of \a error.
|
224
|
+
grpc_slice CreateRdsRequest(const std::string& route_config_name,
|
225
|
+
const std::string& version,
|
226
|
+
const std::string& nonce, grpc_error* error,
|
227
|
+
bool populate_node);
|
228
|
+
|
229
|
+
// Creates a CDS request querying \a cluster_names.
|
230
|
+
// Takes ownership of \a error.
|
231
|
+
grpc_slice CreateCdsRequest(const std::set<StringView>& cluster_names,
|
232
|
+
const std::string& version,
|
233
|
+
const std::string& nonce, grpc_error* error,
|
234
|
+
bool populate_node);
|
235
|
+
|
236
|
+
// Creates an EDS request querying \a eds_service_names.
|
237
|
+
// Takes ownership of \a error.
|
238
|
+
grpc_slice CreateEdsRequest(const std::set<StringView>& eds_service_names,
|
239
|
+
const std::string& version,
|
240
|
+
const std::string& nonce, grpc_error* error,
|
241
|
+
bool populate_node);
|
242
|
+
|
243
|
+
// Parses the ADS response and outputs the validated update for either CDS or
|
244
|
+
// EDS. If the response can't be parsed at the top level, \a type_url will
|
245
|
+
// point to an empty string; otherwise, it will point to the received data.
|
246
|
+
grpc_error* ParseAdsResponse(
|
247
|
+
const grpc_slice& encoded_response,
|
248
|
+
const std::string& expected_server_name,
|
249
|
+
const std::string& expected_route_config_name,
|
250
|
+
const std::set<StringView>& expected_cluster_names,
|
251
|
+
const std::set<StringView>& expected_eds_service_names,
|
252
|
+
absl::optional<LdsUpdate>* lds_update,
|
253
|
+
absl::optional<RdsUpdate>* rds_update, CdsUpdateMap* cds_update_map,
|
254
|
+
EdsUpdateMap* eds_update_map, std::string* version, std::string* nonce,
|
255
|
+
std::string* type_url);
|
256
|
+
|
257
|
+
// Creates an LRS request querying \a server_name.
|
258
|
+
grpc_slice CreateLrsInitialRequest(const std::string& server_name);
|
259
|
+
|
260
|
+
// Creates an LRS request sending a client-side load report.
|
261
|
+
grpc_slice CreateLrsRequest(ClusterLoadReportMap cluster_load_report_map);
|
262
|
+
|
263
|
+
// Parses the LRS response and returns \a
|
264
|
+
// load_reporting_interval for client-side load reporting. If there is any
|
265
|
+
// error, the output config is invalid.
|
266
|
+
grpc_error* ParseLrsResponse(const grpc_slice& encoded_response,
|
267
|
+
std::set<std::string>* cluster_names,
|
268
|
+
grpc_millis* load_reporting_interval);
|
139
269
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
// If set to the empty string, will use the same server we obtained
|
147
|
-
// the CDS data from.
|
148
|
-
grpc_core::UniquePtr<char> lrs_load_reporting_server_name;
|
270
|
+
private:
|
271
|
+
XdsClient* client_;
|
272
|
+
TraceFlag* tracer_;
|
273
|
+
const XdsBootstrap::Node* node_;
|
274
|
+
const std::string build_version_;
|
275
|
+
const std::string user_agent_name_;
|
149
276
|
};
|
150
277
|
|
151
|
-
// Creates an EDS request querying \a service_name.
|
152
|
-
grpc_slice XdsEdsRequestCreateAndEncode(const char* server_name,
|
153
|
-
const XdsBootstrap::Node* node,
|
154
|
-
const char* build_version);
|
155
|
-
|
156
|
-
// Parses the EDS response and returns the args to update locality map. If there
|
157
|
-
// is any error, the output update is invalid.
|
158
|
-
grpc_error* XdsEdsResponseDecodeAndParse(const grpc_slice& encoded_response,
|
159
|
-
EdsUpdate* update);
|
160
|
-
|
161
|
-
// Creates an LRS request querying \a server_name.
|
162
|
-
grpc_slice XdsLrsRequestCreateAndEncode(const char* server_name,
|
163
|
-
const XdsBootstrap::Node* node,
|
164
|
-
const char* build_version);
|
165
|
-
|
166
|
-
// Creates an LRS request sending client-side load reports. If all the counters
|
167
|
-
// in \a client_stats are zero, returns empty slice.
|
168
|
-
grpc_slice XdsLrsRequestCreateAndEncode(const char* server_name,
|
169
|
-
XdsClientStats* client_stats);
|
170
|
-
|
171
|
-
// Parses the LRS response and returns \a cluster_name and \a
|
172
|
-
// load_reporting_interval for client-side load reporting. If there is any
|
173
|
-
// error, the output config is invalid.
|
174
|
-
grpc_error* XdsLrsResponseDecodeAndParse(
|
175
|
-
const grpc_slice& encoded_response,
|
176
|
-
grpc_core::UniquePtr<char>* cluster_name,
|
177
|
-
grpc_millis* load_reporting_interval);
|
178
|
-
|
179
278
|
} // namespace grpc_core
|
180
279
|
|
181
280
|
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_XDS_XDS_API_H */
|
@@ -29,136 +29,198 @@
|
|
29
29
|
|
30
30
|
namespace grpc_core {
|
31
31
|
|
32
|
-
|
32
|
+
namespace {
|
33
|
+
|
34
|
+
UniquePtr<char> BootstrapString(const XdsBootstrap& bootstrap) {
|
35
|
+
gpr_strvec v;
|
36
|
+
gpr_strvec_init(&v);
|
37
|
+
char* tmp;
|
38
|
+
if (bootstrap.node() != nullptr) {
|
39
|
+
gpr_asprintf(&tmp,
|
40
|
+
"node={\n"
|
41
|
+
" id=\"%s\",\n"
|
42
|
+
" cluster=\"%s\",\n"
|
43
|
+
" locality={\n"
|
44
|
+
" region=\"%s\",\n"
|
45
|
+
" zone=\"%s\",\n"
|
46
|
+
" subzone=\"%s\"\n"
|
47
|
+
" },\n"
|
48
|
+
" metadata=%s,\n"
|
49
|
+
"},\n",
|
50
|
+
bootstrap.node()->id.c_str(),
|
51
|
+
bootstrap.node()->cluster.c_str(),
|
52
|
+
bootstrap.node()->locality_region.c_str(),
|
53
|
+
bootstrap.node()->locality_zone.c_str(),
|
54
|
+
bootstrap.node()->locality_subzone.c_str(),
|
55
|
+
bootstrap.node()->metadata.Dump().c_str());
|
56
|
+
gpr_strvec_add(&v, tmp);
|
57
|
+
}
|
58
|
+
gpr_asprintf(&tmp,
|
59
|
+
"servers=[\n"
|
60
|
+
" {\n"
|
61
|
+
" uri=\"%s\",\n"
|
62
|
+
" creds=[\n",
|
63
|
+
bootstrap.server().server_uri.c_str());
|
64
|
+
gpr_strvec_add(&v, tmp);
|
65
|
+
for (size_t i = 0; i < bootstrap.server().channel_creds.size(); ++i) {
|
66
|
+
const auto& creds = bootstrap.server().channel_creds[i];
|
67
|
+
gpr_asprintf(&tmp, " {type=\"%s\", config=%s},\n", creds.type.c_str(),
|
68
|
+
creds.config.Dump().c_str());
|
69
|
+
gpr_strvec_add(&v, tmp);
|
70
|
+
}
|
71
|
+
gpr_strvec_add(&v, gpr_strdup(" ]\n }\n]"));
|
72
|
+
UniquePtr<char> result(gpr_strvec_flatten(&v, nullptr));
|
73
|
+
gpr_strvec_destroy(&v);
|
74
|
+
return result;
|
75
|
+
}
|
76
|
+
|
77
|
+
} // namespace
|
78
|
+
|
79
|
+
std::unique_ptr<XdsBootstrap> XdsBootstrap::ReadFromFile(XdsClient* client,
|
80
|
+
TraceFlag* tracer,
|
81
|
+
grpc_error** error) {
|
33
82
|
grpc_core::UniquePtr<char> path(gpr_getenv("GRPC_XDS_BOOTSTRAP"));
|
34
83
|
if (path == nullptr) {
|
35
84
|
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
36
|
-
"
|
85
|
+
"Environment variable GRPC_XDS_BOOTSTRAP not defined");
|
37
86
|
return nullptr;
|
38
87
|
}
|
88
|
+
if (GRPC_TRACE_FLAG_ENABLED(*tracer)) {
|
89
|
+
gpr_log(GPR_INFO,
|
90
|
+
"[xds_client %p] Got bootstrap file location from "
|
91
|
+
"GRPC_XDS_BOOTSTRAP environment variable: %s",
|
92
|
+
client, path.get());
|
93
|
+
}
|
39
94
|
grpc_slice contents;
|
40
95
|
*error = grpc_load_file(path.get(), /*add_null_terminator=*/true, &contents);
|
41
96
|
if (*error != GRPC_ERROR_NONE) return nullptr;
|
42
|
-
|
97
|
+
StringView contents_str_view = StringViewFromSlice(contents);
|
98
|
+
if (GRPC_TRACE_FLAG_ENABLED(*tracer)) {
|
99
|
+
UniquePtr<char> str = StringViewToCString(contents_str_view);
|
100
|
+
gpr_log(GPR_DEBUG, "[xds_client %p] Bootstrap file contents: %s", client,
|
101
|
+
str.get());
|
102
|
+
}
|
103
|
+
Json json = Json::Parse(contents_str_view, error);
|
104
|
+
grpc_slice_unref_internal(contents);
|
105
|
+
if (*error != GRPC_ERROR_NONE) {
|
106
|
+
char* msg;
|
107
|
+
gpr_asprintf(&msg, "Failed to parse bootstrap file %s", path.get());
|
108
|
+
grpc_error* error_out =
|
109
|
+
GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(msg, error, 1);
|
110
|
+
gpr_free(msg);
|
111
|
+
GRPC_ERROR_UNREF(*error);
|
112
|
+
*error = error_out;
|
113
|
+
return nullptr;
|
114
|
+
}
|
115
|
+
std::unique_ptr<XdsBootstrap> result =
|
116
|
+
absl::make_unique<XdsBootstrap>(std::move(json), error);
|
117
|
+
if (*error == GRPC_ERROR_NONE && GRPC_TRACE_FLAG_ENABLED(*tracer)) {
|
118
|
+
gpr_log(GPR_INFO,
|
119
|
+
"[xds_client %p] Bootstrap config for creating xds client:\n%s",
|
120
|
+
client, BootstrapString(*result).get());
|
121
|
+
}
|
122
|
+
return result;
|
43
123
|
}
|
44
124
|
|
45
|
-
XdsBootstrap::XdsBootstrap(
|
46
|
-
|
47
|
-
tree_ = grpc_json_parse_string_with_len(
|
48
|
-
reinterpret_cast<char*>(GPR_SLICE_START_PTR(contents_)),
|
49
|
-
GPR_SLICE_LENGTH(contents_));
|
50
|
-
if (tree_ == nullptr) {
|
51
|
-
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
52
|
-
"failed to parse bootstrap file JSON");
|
53
|
-
return;
|
54
|
-
}
|
55
|
-
if (tree_->type != GRPC_JSON_OBJECT || tree_->key != nullptr) {
|
125
|
+
XdsBootstrap::XdsBootstrap(Json json, grpc_error** error) {
|
126
|
+
if (json.type() != Json::Type::OBJECT) {
|
56
127
|
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
57
128
|
"malformed JSON in bootstrap file");
|
58
129
|
return;
|
59
130
|
}
|
60
131
|
InlinedVector<grpc_error*, 1> error_list;
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
} else if (strcmp(child->key, "node") == 0) {
|
80
|
-
if (child->type != GRPC_JSON_OBJECT) {
|
81
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
82
|
-
"\"node\" field is not an object"));
|
83
|
-
}
|
84
|
-
if (seen_node) {
|
85
|
-
error_list.push_back(
|
86
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("duplicate \"node\" field"));
|
87
|
-
}
|
88
|
-
seen_node = true;
|
89
|
-
grpc_error* parse_error = ParseNode(child);
|
132
|
+
auto it = json.mutable_object()->find("xds_servers");
|
133
|
+
if (it == json.mutable_object()->end()) {
|
134
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
135
|
+
"\"xds_servers\" field not present"));
|
136
|
+
} else if (it->second.type() != Json::Type::ARRAY) {
|
137
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
138
|
+
"\"xds_servers\" field is not an array"));
|
139
|
+
} else {
|
140
|
+
grpc_error* parse_error = ParseXdsServerList(&it->second);
|
141
|
+
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
|
142
|
+
}
|
143
|
+
it = json.mutable_object()->find("node");
|
144
|
+
if (it != json.mutable_object()->end()) {
|
145
|
+
if (it->second.type() != Json::Type::OBJECT) {
|
146
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
147
|
+
"\"node\" field is not an object"));
|
148
|
+
} else {
|
149
|
+
grpc_error* parse_error = ParseNode(&it->second);
|
90
150
|
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
|
91
151
|
}
|
92
152
|
}
|
93
|
-
if (!seen_xds_server) {
|
94
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
95
|
-
"\"xds_server\" field not present"));
|
96
|
-
}
|
97
153
|
*error = GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing xds bootstrap file",
|
98
154
|
&error_list);
|
99
155
|
}
|
100
156
|
|
101
|
-
XdsBootstrap
|
102
|
-
grpc_json_destroy(tree_);
|
103
|
-
grpc_slice_unref_internal(contents_);
|
104
|
-
}
|
105
|
-
|
106
|
-
grpc_error* XdsBootstrap::ParseXdsServer(grpc_json* json) {
|
157
|
+
grpc_error* XdsBootstrap::ParseXdsServerList(Json* json) {
|
107
158
|
InlinedVector<grpc_error*, 1> error_list;
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
"\"server_uri\" field is not a string"));
|
118
|
-
}
|
119
|
-
if (server_uri_ != nullptr) {
|
120
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
121
|
-
"duplicate \"server_uri\" field"));
|
122
|
-
}
|
123
|
-
server_uri_ = child->value;
|
124
|
-
} else if (strcmp(child->key, "channel_creds") == 0) {
|
125
|
-
if (child->type != GRPC_JSON_ARRAY) {
|
126
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
127
|
-
"\"channel_creds\" field is not an array"));
|
128
|
-
}
|
129
|
-
if (seen_channel_creds) {
|
130
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
131
|
-
"duplicate \"channel_creds\" field"));
|
132
|
-
}
|
133
|
-
seen_channel_creds = true;
|
134
|
-
grpc_error* parse_error = ParseChannelCredsArray(child);
|
159
|
+
for (size_t i = 0; i < json->mutable_array()->size(); ++i) {
|
160
|
+
Json& child = json->mutable_array()->at(i);
|
161
|
+
if (child.type() != Json::Type::OBJECT) {
|
162
|
+
char* msg;
|
163
|
+
gpr_asprintf(&msg, "array element %" PRIuPTR " is not an object", i);
|
164
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg));
|
165
|
+
gpr_free(msg);
|
166
|
+
} else {
|
167
|
+
grpc_error* parse_error = ParseXdsServer(&child, i);
|
135
168
|
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
|
136
169
|
}
|
137
170
|
}
|
138
|
-
|
171
|
+
return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing \"xds_servers\" array",
|
172
|
+
&error_list);
|
173
|
+
}
|
174
|
+
|
175
|
+
grpc_error* XdsBootstrap::ParseXdsServer(Json* json, size_t idx) {
|
176
|
+
InlinedVector<grpc_error*, 1> error_list;
|
177
|
+
servers_.emplace_back();
|
178
|
+
XdsServer& server = servers_[servers_.size() - 1];
|
179
|
+
auto it = json->mutable_object()->find("server_uri");
|
180
|
+
if (it == json->mutable_object()->end()) {
|
139
181
|
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
140
182
|
"\"server_uri\" field not present"));
|
183
|
+
} else if (it->second.type() != Json::Type::STRING) {
|
184
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
185
|
+
"\"server_uri\" field is not a string"));
|
186
|
+
} else {
|
187
|
+
server.server_uri = std::move(*it->second.mutable_string_value());
|
141
188
|
}
|
142
|
-
|
143
|
-
|
189
|
+
it = json->mutable_object()->find("channel_creds");
|
190
|
+
if (it != json->mutable_object()->end()) {
|
191
|
+
if (it->second.type() != Json::Type::ARRAY) {
|
192
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
193
|
+
"\"channel_creds\" field is not an array"));
|
194
|
+
} else {
|
195
|
+
grpc_error* parse_error = ParseChannelCredsArray(&it->second, &server);
|
196
|
+
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
|
197
|
+
}
|
198
|
+
}
|
199
|
+
// Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error
|
200
|
+
// string is not static in this case.
|
201
|
+
if (error_list.empty()) return GRPC_ERROR_NONE;
|
202
|
+
char* msg;
|
203
|
+
gpr_asprintf(&msg, "errors parsing index %" PRIuPTR, idx);
|
204
|
+
grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg);
|
205
|
+
gpr_free(msg);
|
206
|
+
for (size_t i = 0; i < error_list.size(); ++i) {
|
207
|
+
error = grpc_error_add_child(error, error_list[i]);
|
208
|
+
}
|
209
|
+
return error;
|
144
210
|
}
|
145
211
|
|
146
|
-
grpc_error* XdsBootstrap::ParseChannelCredsArray(
|
212
|
+
grpc_error* XdsBootstrap::ParseChannelCredsArray(Json* json,
|
213
|
+
XdsServer* server) {
|
147
214
|
InlinedVector<grpc_error*, 1> error_list;
|
148
|
-
size_t
|
149
|
-
|
150
|
-
|
151
|
-
if (child->key != nullptr) {
|
152
|
-
char* msg;
|
153
|
-
gpr_asprintf(&msg, "array element %" PRIuPTR " key is not null", idx);
|
154
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg));
|
155
|
-
}
|
156
|
-
if (child->type != GRPC_JSON_OBJECT) {
|
215
|
+
for (size_t i = 0; i < json->mutable_array()->size(); ++i) {
|
216
|
+
Json& child = json->mutable_array()->at(i);
|
217
|
+
if (child.type() != Json::Type::OBJECT) {
|
157
218
|
char* msg;
|
158
|
-
gpr_asprintf(&msg, "array element %" PRIuPTR " is not an object",
|
219
|
+
gpr_asprintf(&msg, "array element %" PRIuPTR " is not an object", i);
|
159
220
|
error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg));
|
221
|
+
gpr_free(msg);
|
160
222
|
} else {
|
161
|
-
grpc_error* parse_error = ParseChannelCreds(child,
|
223
|
+
grpc_error* parse_error = ParseChannelCreds(&child, i, server);
|
162
224
|
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
|
163
225
|
}
|
164
226
|
}
|
@@ -166,36 +228,32 @@ grpc_error* XdsBootstrap::ParseChannelCredsArray(grpc_json* json) {
|
|
166
228
|
&error_list);
|
167
229
|
}
|
168
230
|
|
169
|
-
grpc_error* XdsBootstrap::ParseChannelCreds(
|
231
|
+
grpc_error* XdsBootstrap::ParseChannelCreds(Json* json, size_t idx,
|
232
|
+
XdsServer* server) {
|
170
233
|
InlinedVector<grpc_error*, 1> error_list;
|
171
234
|
ChannelCreds channel_creds;
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
"\"config\" field is not an object"));
|
190
|
-
}
|
191
|
-
if (channel_creds.config != nullptr) {
|
192
|
-
error_list.push_back(
|
193
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("duplicate \"config\" field"));
|
194
|
-
}
|
195
|
-
channel_creds.config = child;
|
235
|
+
auto it = json->mutable_object()->find("type");
|
236
|
+
if (it == json->mutable_object()->end()) {
|
237
|
+
error_list.push_back(
|
238
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("\"type\" field not present"));
|
239
|
+
} else if (it->second.type() != Json::Type::STRING) {
|
240
|
+
error_list.push_back(
|
241
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("\"type\" field is not a string"));
|
242
|
+
} else {
|
243
|
+
channel_creds.type = std::move(*it->second.mutable_string_value());
|
244
|
+
}
|
245
|
+
it = json->mutable_object()->find("config");
|
246
|
+
if (it != json->mutable_object()->end()) {
|
247
|
+
if (it->second.type() != Json::Type::OBJECT) {
|
248
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
249
|
+
"\"config\" field is not an object"));
|
250
|
+
} else {
|
251
|
+
channel_creds.config = std::move(it->second);
|
196
252
|
}
|
197
253
|
}
|
198
|
-
if (channel_creds.type
|
254
|
+
if (!channel_creds.type.empty()) {
|
255
|
+
server->channel_creds.emplace_back(std::move(channel_creds));
|
256
|
+
}
|
199
257
|
// Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error
|
200
258
|
// string is not static in this case.
|
201
259
|
if (error_list.empty()) return GRPC_ERROR_NONE;
|
@@ -209,242 +267,81 @@ grpc_error* XdsBootstrap::ParseChannelCreds(grpc_json* json, size_t idx) {
|
|
209
267
|
return error;
|
210
268
|
}
|
211
269
|
|
212
|
-
grpc_error* XdsBootstrap::ParseNode(
|
270
|
+
grpc_error* XdsBootstrap::ParseNode(Json* json) {
|
213
271
|
InlinedVector<grpc_error*, 1> error_list;
|
214
|
-
node_ =
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
if (child->key == nullptr) {
|
272
|
+
node_ = absl::make_unique<Node>();
|
273
|
+
auto it = json->mutable_object()->find("id");
|
274
|
+
if (it != json->mutable_object()->end()) {
|
275
|
+
if (it->second.type() != Json::Type::STRING) {
|
219
276
|
error_list.push_back(
|
220
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("
|
221
|
-
} else
|
222
|
-
|
223
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
224
|
-
"\"id\" field is not a string"));
|
225
|
-
}
|
226
|
-
if (node_->id != nullptr) {
|
227
|
-
error_list.push_back(
|
228
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("duplicate \"id\" field"));
|
229
|
-
}
|
230
|
-
node_->id = child->value;
|
231
|
-
} else if (strcmp(child->key, "cluster") == 0) {
|
232
|
-
if (child->type != GRPC_JSON_STRING) {
|
233
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
234
|
-
"\"cluster\" field is not a string"));
|
235
|
-
}
|
236
|
-
if (node_->cluster != nullptr) {
|
237
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
238
|
-
"duplicate \"cluster\" field"));
|
239
|
-
}
|
240
|
-
node_->cluster = child->value;
|
241
|
-
} else if (strcmp(child->key, "locality") == 0) {
|
242
|
-
if (child->type != GRPC_JSON_OBJECT) {
|
243
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
244
|
-
"\"locality\" field is not an object"));
|
245
|
-
}
|
246
|
-
if (seen_locality) {
|
247
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
248
|
-
"duplicate \"locality\" field"));
|
249
|
-
}
|
250
|
-
seen_locality = true;
|
251
|
-
grpc_error* parse_error = ParseLocality(child);
|
252
|
-
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
|
253
|
-
} else if (strcmp(child->key, "metadata") == 0) {
|
254
|
-
if (child->type != GRPC_JSON_OBJECT) {
|
255
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
256
|
-
"\"metadata\" field is not an object"));
|
257
|
-
}
|
258
|
-
if (seen_metadata) {
|
259
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
260
|
-
"duplicate \"metadata\" field"));
|
261
|
-
}
|
262
|
-
seen_metadata = true;
|
263
|
-
InlinedVector<grpc_error*, 1> parse_errors =
|
264
|
-
ParseMetadataStruct(child, &node_->metadata);
|
265
|
-
if (!parse_errors.empty()) {
|
266
|
-
grpc_error* parse_error = GRPC_ERROR_CREATE_FROM_VECTOR(
|
267
|
-
"errors parsing \"metadata\" object", &parse_errors);
|
268
|
-
error_list.push_back(parse_error);
|
269
|
-
}
|
277
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("\"id\" field is not a string"));
|
278
|
+
} else {
|
279
|
+
node_->id = std::move(*it->second.mutable_string_value());
|
270
280
|
}
|
271
281
|
}
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
node_->locality_zone = nullptr;
|
280
|
-
node_->locality_subzone = nullptr;
|
281
|
-
for (grpc_json* child = json->child; child != nullptr; child = child->next) {
|
282
|
-
if (child->key == nullptr) {
|
283
|
-
error_list.push_back(
|
284
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("JSON key is null"));
|
285
|
-
} else if (strcmp(child->key, "region") == 0) {
|
286
|
-
if (child->type != GRPC_JSON_STRING) {
|
287
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
288
|
-
"\"region\" field is not a string"));
|
289
|
-
}
|
290
|
-
if (node_->locality_region != nullptr) {
|
291
|
-
error_list.push_back(
|
292
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("duplicate \"region\" field"));
|
293
|
-
}
|
294
|
-
node_->locality_region = child->value;
|
295
|
-
} else if (strcmp(child->key, "zone") == 0) {
|
296
|
-
if (child->type != GRPC_JSON_STRING) {
|
297
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
298
|
-
"\"zone\" field is not a string"));
|
299
|
-
}
|
300
|
-
if (node_->locality_zone != nullptr) {
|
301
|
-
error_list.push_back(
|
302
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("duplicate \"zone\" field"));
|
303
|
-
}
|
304
|
-
node_->locality_zone = child->value;
|
305
|
-
} else if (strcmp(child->key, "subzone") == 0) {
|
306
|
-
if (child->type != GRPC_JSON_STRING) {
|
307
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
308
|
-
"\"subzone\" field is not a string"));
|
309
|
-
}
|
310
|
-
if (node_->locality_subzone != nullptr) {
|
311
|
-
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
312
|
-
"duplicate \"subzone\" field"));
|
313
|
-
}
|
314
|
-
node_->locality_subzone = child->value;
|
282
|
+
it = json->mutable_object()->find("cluster");
|
283
|
+
if (it != json->mutable_object()->end()) {
|
284
|
+
if (it->second.type() != Json::Type::STRING) {
|
285
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
286
|
+
"\"cluster\" field is not a string"));
|
287
|
+
} else {
|
288
|
+
node_->cluster = std::move(*it->second.mutable_string_value());
|
315
289
|
}
|
316
290
|
}
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
for (grpc_json* child = json->child; child != nullptr; child = child->next) {
|
326
|
-
if (child->key == nullptr) {
|
327
|
-
error_list.push_back(
|
328
|
-
GRPC_ERROR_CREATE_FROM_STATIC_STRING("JSON key is null"));
|
329
|
-
continue;
|
291
|
+
it = json->mutable_object()->find("locality");
|
292
|
+
if (it != json->mutable_object()->end()) {
|
293
|
+
if (it->second.type() != Json::Type::OBJECT) {
|
294
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
295
|
+
"\"locality\" field is not an object"));
|
296
|
+
} else {
|
297
|
+
grpc_error* parse_error = ParseLocality(&it->second);
|
298
|
+
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
|
330
299
|
}
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
300
|
+
}
|
301
|
+
it = json->mutable_object()->find("metadata");
|
302
|
+
if (it != json->mutable_object()->end()) {
|
303
|
+
if (it->second.type() != Json::Type::OBJECT) {
|
304
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
305
|
+
"\"metadata\" field is not an object"));
|
306
|
+
} else {
|
307
|
+
node_->metadata = std::move(it->second);
|
336
308
|
}
|
337
|
-
MetadataValue& value = (*result)[child->key];
|
338
|
-
grpc_error* parse_error = ParseMetadataValue(child, 0, &value);
|
339
|
-
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
|
340
309
|
}
|
341
|
-
return
|
310
|
+
return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing \"node\" object",
|
311
|
+
&error_list);
|
342
312
|
}
|
343
313
|
|
344
|
-
|
345
|
-
grpc_json* json, std::vector<MetadataValue>* result) {
|
314
|
+
grpc_error* XdsBootstrap::ParseLocality(Json* json) {
|
346
315
|
InlinedVector<grpc_error*, 1> error_list;
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
gpr_free(msg);
|
316
|
+
auto it = json->mutable_object()->find("region");
|
317
|
+
if (it != json->mutable_object()->end()) {
|
318
|
+
if (it->second.type() != Json::Type::STRING) {
|
319
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
320
|
+
"\"region\" field is not a string"));
|
321
|
+
} else {
|
322
|
+
node_->locality_region = std::move(*it->second.mutable_string_value());
|
355
323
|
}
|
356
|
-
result->emplace_back();
|
357
|
-
grpc_error* parse_error = ParseMetadataValue(child, idx, &result->back());
|
358
|
-
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
|
359
324
|
}
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
grpc_error* error = GRPC_ERROR_NONE;
|
366
|
-
auto context_func = [json, idx]() {
|
367
|
-
char* context;
|
368
|
-
if (json->key != nullptr) {
|
369
|
-
gpr_asprintf(&context, "key \"%s\"", json->key);
|
325
|
+
it = json->mutable_object()->find("zone");
|
326
|
+
if (it != json->mutable_object()->end()) {
|
327
|
+
if (it->second.type() != Json::Type::STRING) {
|
328
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
329
|
+
"\"zone\" field is not a string"));
|
370
330
|
} else {
|
371
|
-
|
331
|
+
node_->locality_zone = std::move(*it->second.mutable_string_value());
|
372
332
|
}
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
result->type = MetadataValue::Type::DOUBLE;
|
382
|
-
errno = 0; // To distinguish error.
|
383
|
-
result->double_value = strtod(json->value, nullptr);
|
384
|
-
if (errno != 0) {
|
385
|
-
char* context = context_func();
|
386
|
-
char* msg;
|
387
|
-
gpr_asprintf(&msg, "error parsing numeric value for %s: \"%s\"",
|
388
|
-
context, json->value);
|
389
|
-
error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg);
|
390
|
-
gpr_free(context);
|
391
|
-
gpr_free(msg);
|
392
|
-
}
|
393
|
-
break;
|
394
|
-
case GRPC_JSON_TRUE:
|
395
|
-
result->type = MetadataValue::Type::BOOL;
|
396
|
-
result->bool_value = true;
|
397
|
-
break;
|
398
|
-
case GRPC_JSON_FALSE:
|
399
|
-
result->type = MetadataValue::Type::BOOL;
|
400
|
-
result->bool_value = false;
|
401
|
-
break;
|
402
|
-
case GRPC_JSON_NULL:
|
403
|
-
result->type = MetadataValue::Type::MD_NULL;
|
404
|
-
break;
|
405
|
-
case GRPC_JSON_ARRAY: {
|
406
|
-
result->type = MetadataValue::Type::LIST;
|
407
|
-
InlinedVector<grpc_error*, 1> error_list =
|
408
|
-
ParseMetadataList(json, &result->list_value);
|
409
|
-
if (!error_list.empty()) {
|
410
|
-
// Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error
|
411
|
-
// string is not static in this case.
|
412
|
-
char* context = context_func();
|
413
|
-
char* msg;
|
414
|
-
gpr_asprintf(&msg, "errors parsing struct for %s", context);
|
415
|
-
error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg);
|
416
|
-
gpr_free(context);
|
417
|
-
gpr_free(msg);
|
418
|
-
for (size_t i = 0; i < error_list.size(); ++i) {
|
419
|
-
error = grpc_error_add_child(error, error_list[i]);
|
420
|
-
}
|
421
|
-
}
|
422
|
-
break;
|
423
|
-
}
|
424
|
-
case GRPC_JSON_OBJECT: {
|
425
|
-
result->type = MetadataValue::Type::STRUCT;
|
426
|
-
InlinedVector<grpc_error*, 1> error_list =
|
427
|
-
ParseMetadataStruct(json, &result->struct_value);
|
428
|
-
if (!error_list.empty()) {
|
429
|
-
// Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error
|
430
|
-
// string is not static in this case.
|
431
|
-
char* context = context_func();
|
432
|
-
char* msg;
|
433
|
-
gpr_asprintf(&msg, "errors parsing struct for %s", context);
|
434
|
-
error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg);
|
435
|
-
gpr_free(context);
|
436
|
-
gpr_free(msg);
|
437
|
-
for (size_t i = 0; i < error_list.size(); ++i) {
|
438
|
-
error = grpc_error_add_child(error, error_list[i]);
|
439
|
-
GRPC_ERROR_UNREF(error_list[i]);
|
440
|
-
}
|
441
|
-
}
|
442
|
-
break;
|
333
|
+
}
|
334
|
+
it = json->mutable_object()->find("subzone");
|
335
|
+
if (it != json->mutable_object()->end()) {
|
336
|
+
if (it->second.type() != Json::Type::STRING) {
|
337
|
+
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
338
|
+
"\"subzone\" field is not a string"));
|
339
|
+
} else {
|
340
|
+
node_->locality_subzone = std::move(*it->second.mutable_string_value());
|
443
341
|
}
|
444
|
-
default:
|
445
|
-
break;
|
446
342
|
}
|
447
|
-
return
|
343
|
+
return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing \"locality\" object",
|
344
|
+
&error_list);
|
448
345
|
}
|
449
346
|
|
450
347
|
} // namespace grpc_core
|